459242451@qq.com 3 anos atrás
pai
commit
5a801f6725

+ 1 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/qdtl/TlCommonController.java

@@ -157,6 +157,7 @@ public class TlCommonController extends BaseController {
         // 当日巡检完成率(总以及各个镇)
         Map<String, Object> checkPercent = planRecordService.queryCheckPercent(date);
 
+        
         return AjaxResult.success(map);
     }
 }

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/PlanTask.java

@@ -82,6 +82,8 @@ public class PlanTask {
                             planRecord.setCard(planUser.getCard());
                             planRecord.setScore(inspectionPlan.getScore());
                             planRecord.setCheckpointCard(lineLocation.getLocationCode());
+                            planRecord.setLineId(inspectionPlan.getLineId());
+                            planRecord.setLineName("");
                             planRecords.add(planRecord);
                         }
                     }

+ 43 - 133
ruoyi-system/src/main/java/com/ruoyi/qdtl/domain/TlPlanRecord.java

@@ -1,178 +1,88 @@
 package com.ruoyi.qdtl.domain;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 /**
  * 巡检计划记录对象 tl_plan_record
- * 
+ *
  * @author ruoyi
  * @date 2022-03-30
  */
-public class TlPlanRecord extends BaseEntity
-{
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class TlPlanRecord extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** id */
+    /**
+     * id
+     */
     private Long id;
 
-    /** 计划id */
+    /**
+     * 计划id
+     */
     @Excel(name = "计划id")
     private Long planId;
 
-    /** 计划日期 */
+    /**
+     * 计划日期
+     */
     @Excel(name = "计划日期")
     private String planDate;
 
-    /** 名称 */
+    /**
+     * 名称
+     */
     @Excel(name = "名称")
     private String planName;
 
-    /** 人员id */
+    /**
+     * 人员id
+     */
     @Excel(name = "人员id")
     private Long userId;
 
-    /** 人员姓名 */
+    /**
+     * 人员姓名
+     */
     @Excel(name = "人员姓名")
     private String nickName;
 
-    /** 设备卡号 */
+    /**
+     * 设备卡号
+     */
     @Excel(name = "设备卡号")
     private String card;
 
-    /** 巡检点卡号 */
+    /**
+     * 巡检点卡号
+     */
     @Excel(name = "巡检点卡号")
     private String checkpointCard;
 
-    /** 巡检器卡号 */
+    /**
+     * 巡检器卡号
+     */
     @Excel(name = "巡检器卡号")
     private String deviceCode;
 
-    /** 经纬度 */
+    /**
+     * 经纬度
+     */
     @Excel(name = "经纬度")
     private String fence;
 
-    /** 计划分数 */
+    /**
+     * 计划分数
+     */
     @Excel(name = "计划分数")
     private String score;
 
-    public void setId(Long id) 
-    {
-        this.id = id;
-    }
-
-    public Long getId() 
-    {
-        return id;
-    }
-    public void setPlanId(Long planId) 
-    {
-        this.planId = planId;
-    }
-
-    public Long getPlanId() 
-    {
-        return planId;
-    }
-    public void setPlanDate(String planDate) 
-    {
-        this.planDate = planDate;
-    }
-
-    public String getPlanDate() 
-    {
-        return planDate;
-    }
-    public void setPlanName(String planName) 
-    {
-        this.planName = planName;
-    }
-
-    public String getPlanName() 
-    {
-        return planName;
-    }
-    public void setUserId(Long userId) 
-    {
-        this.userId = userId;
-    }
-
-    public Long getUserId() 
-    {
-        return userId;
-    }
-    public void setNickName(String nickName) 
-    {
-        this.nickName = nickName;
-    }
-
-    public String getNickName() 
-    {
-        return nickName;
-    }
-    public void setCard(String card) 
-    {
-        this.card = card;
-    }
-
-    public String getCard() 
-    {
-        return card;
-    }
-    public void setCheckpointCard(String checkpointCard) 
-    {
-        this.checkpointCard = checkpointCard;
-    }
-
-    public String getCheckpointCard() 
-    {
-        return checkpointCard;
-    }
-    public void setDeviceCode(String deviceCode) 
-    {
-        this.deviceCode = deviceCode;
-    }
-
-    public String getDeviceCode() 
-    {
-        return deviceCode;
-    }
-    public void setFence(String fence) 
-    {
-        this.fence = fence;
-    }
-
-    public String getFence() 
-    {
-        return fence;
-    }
-    public void setScore(String score) 
-    {
-        this.score = score;
-    }
-
-    public String getScore() 
-    {
-        return score;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("planId", getPlanId())
-            .append("planDate", getPlanDate())
-            .append("planName", getPlanName())
-            .append("userId", getUserId())
-            .append("nickName", getNickName())
-            .append("card", getCard())
-            .append("checkpointCard", getCheckpointCard())
-            .append("deviceCode", getDeviceCode())
-            .append("fence", getFence())
-            .append("createTime", getCreateTime())
-            .append("score", getScore())
-            .toString();
-    }
+    private Long lineId;
+
+    private String lineName;
+
 }

+ 10 - 3
ruoyi-system/src/main/resources/mapper/qdtl/TlPlanRecordMapper.xml

@@ -17,6 +17,8 @@
         <result property="fence" column="fence"/>
         <result property="createTime" column="create_time"/>
         <result property="score" column="score"/>
+        <result property="lineId" column="line_id"/>
+        <result property="lineName" column="line_name"/>
     </resultMap>
 
     <sql id="selectTlPlanRecordVo">
@@ -31,7 +33,9 @@
                device_code,
                fence,
                create_time,
-               score
+               score,
+               line_id,
+               line_name
         from tl_plan_record
     </sql>
 
@@ -94,7 +98,7 @@
 
     <insert id="batchInsert">
         insert into tl_plan_record
-        (plan_id, plan_date, plan_name, user_id, nick_name, card, score)
+        (plan_id, plan_date, plan_name, user_id, nick_name, card, checkpoint_card, score, line_id, line_name)
         values
         <foreach collection="list" item="item" separator=",">
             (
@@ -104,7 +108,10 @@
             #{item.userId},
             #{item.nickName},
             #{item.card},
-            #{item.score}
+            #{item.checkpointCard},
+            #{item.score},
+            #{item.lineId},
+            #{item.lineName}
             )
         </foreach>
     </insert>

+ 4 - 0
sql/ry_20210908.sql

@@ -1019,6 +1019,10 @@ alter table sys_user
 -- 已同步
 alter table tl_plan_record
     add line_id bigint null comment '线路id';
+alter table tl_plan_record
+    add line_name varchar(100) null comment '线路名称';
+
+