Browse Source

新增维保计划增加按需维保字段

别傲 5 years ago
parent
commit
bb8fde404b

+ 6 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/MaintenancePlan.java

@@ -66,5 +66,10 @@ public class MaintenancePlan extends BaseEntity {
     /**
      * 状态 0:待完成,1:已完成,2:超期
      */
-	private Byte status;
+	private Integer status;
+
+    /**
+     * 是否按需维保(0:否 1:是)
+     */
+    private String demand;
 }

+ 5 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/dao/entity/model/request/MaintenanceGenerateRequest.java

@@ -46,4 +46,9 @@ public class MaintenanceGenerateRequest {
      */
     @NotNull(message = "notEmpty")
     private Integer interval;
+
+    /**
+     * 是否按需维保(0:否 1:是)
+     */
+    private String demand;
 }

+ 1 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/service/MaintenancePlanService.java

@@ -146,6 +146,7 @@ public class MaintenancePlanService extends ServiceImpl<MaintenancePlanMapper, M
                 entry.setProjectId(projectId);
                 entry.setWorkerId(plan.getWorkerId());
                 entry.setType(maintenanceType[periods - 1]);
+                entry.setDemand(request.getDemand());
                 if (i == 0) {
                     entry.setPlanDate(firstTime);
                 } else {

+ 1 - 0
lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml

@@ -12,6 +12,7 @@
 		<result column="count" property="count" jdbcType="INTEGER" />
 		<result column="type" property="type" jdbcType="TINYINT" />
 		<result column="status" property="status" jdbcType="TINYINT" />
+		<result column="demand" property="demand" jdbcType="VARCHAR" />
 	</resultMap>
 
 	<sql id="Base_Column_List" >