Kaynağa Gözat

agv工时管理海康对应表结构调整,统计默认查当月

yejian016332 3 yıl önce
ebeveyn
işleme
0f56cab4bc
11 değiştirilmiş dosya ile 123 ekleme ve 136 silme
  1. 5 8
      imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/externalApi/AgvHikOrderDetailInfoMapper.xml
  2. 2 3
      imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/externalApi/AgvHikOrderDetailInfoController.java
  3. 20 20
      imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/externalApi/HikAgvControl.java
  4. 9 22
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderDetailInfoPageDTO.java
  5. 9 22
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderDetailInfoSaveDTO.java
  6. 9 22
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderDetailInfoUpdateDTO.java
  7. 14 2
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderInfoPageDTO.java
  8. 14 4
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderInfoSaveDTO.java
  9. 13 4
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderInfoUpdateDTO.java
  10. 11 25
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/entity/AgvHikOrderDetailInfo.java
  11. 17 4
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/entity/AgvHikOrderInfo.java

+ 5 - 8
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/externalApi/AgvHikOrderDetailInfoMapper.xml

@@ -11,13 +11,11 @@
         <result column="update_user" jdbcType="BIGINT" property="updateUser"/>
         <result column="update_user" jdbcType="BIGINT" property="updateUser"/>
         <result column="req_code" jdbcType="BIGINT" property="reqCode"/>
-        <result column="request_code" jdbcType="VARCHAR" property="requestCode"/>
-        <result column="request_message" jdbcType="VARCHAR" property="requestMessage"/>
         <result column="task_code" jdbcType="VARCHAR" property="taskCode"/>
         <result column="request_time" jdbcType="VARCHAR" property="requestTime"/>
-        <result column="callback_code" jdbcType="VARCHAR" property="callbackCode"/>
-        <result column="callback_message" jdbcType="VARCHAR" property="callbackMessage"/>
         <result column="callback_time" jdbcType="VARCHAR" property="callbackTime"/>
+        <result column="alert_message" jdbcType="VARCHAR" property="alertMessage"/>
+        <result column="alert_begin_time" jdbcType="VARCHAR" property="alertBeginTime"/>
         <result column="coo_x" jdbcType="VARCHAR" property="cooX"/>
         <result column="coo_y" jdbcType="VARCHAR" property="cooY"/>
         <result column="current_position_code" jdbcType="VARCHAR" property="currentPositionCode"/>
@@ -29,8 +27,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id,create_time,create_user,update_time,update_user,reqCode,requestCode,requestMessage,taskCode,requestTime,
-        callbackCode,callbackMessage,callbackTime,cooX,cooY,currentPositionCode,mapCode,mapDataCode,method,robotCode
+        id,create_time,create_user,update_time,update_user,req_code,task_code,request_time,callback_time,alert_message,alert_begin_time,coo_x,coo_y,current_position_code,map_code,map_data_code,method,robot_code
     </sql>
 
     <!-- 分页 -->
@@ -46,7 +43,7 @@
         tmp1.task_code,
         tmp1.request_time
         FROM (SELECT
-        left( a.request_time,7) AS statisticalDate,
+        left( a.request_time,10) AS statisticalDate,
         a.task_code,
         a.request_time,
         a.method
@@ -55,7 +52,7 @@
         tmp2.task_code,
         tmp2.request_time
         FROM (SELECT
-        left( b.request_time,7) AS statisticalDate,
+        left( b.request_time,10) AS statisticalDate,
         b.task_code,
         b.request_time,
         b.method

+ 2 - 3
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/externalApi/AgvHikOrderDetailInfoController.java

@@ -73,9 +73,8 @@ public class AgvHikOrderDetailInfoController extends SuperController<AgvHikOrder
             statisticalBeginDate = com.github.zuihou.common.util.DateUtil.beginMonthTime(new Date());
             statisticalEndDate = com.github.zuihou.common.util.DateUtil.endMonthTime(new Date());
         }else{
-            Date searchDate = com.github.zuihou.common.util.DateUtil.stringToDate0(data.getStatisticalDate(),"yyyy-MM");
-            statisticalBeginDate = com.github.zuihou.common.util.DateUtil.beginMonthTime(searchDate);
-            statisticalEndDate =  com.github.zuihou.common.util.DateUtil.endMonthTime(searchDate);
+            statisticalBeginDate = data.getStatisticalDate() + " 00:00:00";
+            statisticalEndDate =  data.getStatisticalDate() + " 23:59:59";
         }
         wrapper.between(AgvHikOrderDetailInfo::getRequestTime,statisticalBeginDate,statisticalEndDate);
         baseService.pageList(page, wrapper);

+ 20 - 20
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/externalApi/HikAgvControl.java

@@ -97,7 +97,7 @@ public class HikAgvControl {
         }
 
         LbqWrapper<AgvHikOrderInfo> agvHikOrderInfoWrapper = new LbqWrapper<AgvHikOrderInfo>();
-        agvHikOrderInfoWrapper.eq(AgvHikOrderInfo::getAgvTaskId, Integer.valueOf(taskCode));
+        agvHikOrderInfoWrapper.eq(AgvHikOrderInfo::getTaskCode, Integer.valueOf(taskCode));
         AgvHikOrderInfo agvHikOrderInfo = agvHikOrderInfoService.getOne(agvHikOrderInfoWrapper);
 
         if("0".equals(code)){
@@ -143,25 +143,25 @@ public class HikAgvControl {
                 // 托板未到位需重新驱动agv托起托板再次放
                 // 异步唤醒
                 // 查询到上一次任务的重点,发agv重新托起在放
-                if(0 == agvHikOrderInfo.getRepeatActionType()){
-                    String goal = "";
-                    for (AgvLocationRelationEnum agvLocationRelationEnum : AgvLocationRelationEnum.values()) {
-                        if (agvLocationRelationEnum.getPreserveLocation().equals(agvHikOrderInfo.getGoal())){
-                            goal =  agvLocationRelationEnum.getSafeLocation();
-                        }
-                    }
-                    externalApiService.addAgvTask(agvHikOrderInfo.getGoal(), AgvActionEnum.SITUANDUP.getActionId(), goal,0, agvHikOrderInfo.getTaskId(), agvHikOrderInfo.getTaskNodeId(), Integer.valueOf(taskCode),1);
-                }else if(1 == agvHikOrderInfo.getRepeatActionType()){
-
-                    String goal = "";
-                    for (AgvLocationRelationEnum agvLocationRelationEnum : AgvLocationRelationEnum.values()) {
-                        if (agvLocationRelationEnum.getSafeLocation().equals(agvHikOrderInfo.getGoal())){
-                            goal =  agvLocationRelationEnum.getPreserveLocation();
-                        }
-                    }
-                    externalApiService.addAgvTask(agvHikOrderInfo.getGoal(), 0, goal, AgvActionEnum.SITUANDDOWN.getActionId(), agvHikOrderInfo.getTaskId(), agvHikOrderInfo.getTaskNodeId(), agvHikOrderInfo.getParentAgvTaskId(),2);
-                }
-                redisTemplate.delete(taskCode);
+//                if(0 == agvHikOrderInfo.getRepeatActionType()){
+//                    String goal = "";
+//                    for (AgvLocationRelationEnum agvLocationRelationEnum : AgvLocationRelationEnum.values()) {
+//                        if (agvLocationRelationEnum.getPreserveLocation().equals(agvHikOrderInfo.getGoal())){
+//                            goal =  agvLocationRelationEnum.getSafeLocation();
+//                        }
+//                    }
+//                    externalApiService.addAgvTask(agvHikOrderInfo.getGoal(), AgvActionEnum.SITUANDUP.getActionId(), goal,0, agvHikOrderInfo.getTaskId(), agvHikOrderInfo.getTaskNodeId(), taskCode,1);
+//                }else if(1 == agvHikOrderInfo.getRepeatActionType()){
+//
+//                    String goal = "";
+//                    for (AgvLocationRelationEnum agvLocationRelationEnum : AgvLocationRelationEnum.values()) {
+//                        if (agvLocationRelationEnum.getSafeLocation().equals(agvHikOrderInfo.getGoal())){
+//                            goal =  agvLocationRelationEnum.getPreserveLocation();
+//                        }
+//                    }
+//                    externalApiService.addAgvTask(agvHikOrderInfo.getGoal(), 0, goal, AgvActionEnum.SITUANDDOWN.getActionId(), agvHikOrderInfo.getTaskId(), agvHikOrderInfo.getTaskNodeId(), agvHikOrderInfo.getTaskCode(),2);
+//                }
+//                redisTemplate.delete(taskCode);
                 return HikR.success().setReqCode(agvHikOrderDetailInfo.getReqCode());
             }
         }else{

+ 9 - 22
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderDetailInfoPageDTO.java

@@ -30,19 +30,7 @@ public class AgvHikOrderDetailInfoPageDTO {
      * 下单请求编号
      */
     @ApiModelProperty(value = "下单请求编号")
-    private Long reqCode;
-
-    /**
-     * 状态码
-     */
-    @ApiModelProperty(value = "下单返回状态码")
-    private String requestCode;
-
-    /**
-     * 状态信息
-     */
-    @ApiModelProperty(value = "下单返回状态信息")
-    private String requestMessage;
+    private String reqCode;
 
     /**
      *  任务单号
@@ -51,29 +39,28 @@ public class AgvHikOrderDetailInfoPageDTO {
     private String taskCode;
 
     /**
-     * 请求返回时间
+     * 请求时间
      */
-    @ApiModelProperty(value = "请求返回时间")
+    @ApiModelProperty(value = "请求时间")
     private String requestTime;
 
     /**
      * 回调返回时间
      */
     @ApiModelProperty(value = "回调返回时间")
-    @TableField("callback_time")
     private String callbackTime;
 
     /**
-     * 回调状态码
+     * 告警信息
      */
-    @ApiModelProperty(value = "回调状态码")
-    private String callbackCode;
+    @ApiModelProperty(value = "告警信息")
+    private String alertMessage;
 
     /**
-     * 回调信息
+     * 告警开始时间
      */
-    @ApiModelProperty(value = "回调状态信息")
-    private String callbackMessage;
+    @ApiModelProperty(value = "告警开始时间")
+    private String alertBeginTime;
 
     /**
      * 地码 X 坐标

+ 9 - 22
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderDetailInfoSaveDTO.java

@@ -30,19 +30,7 @@ public class AgvHikOrderDetailInfoSaveDTO {
      * 下单请求编号
      */
     @ApiModelProperty(value = "下单请求编号")
-    private Long reqCode;
-
-    /**
-     * 状态码
-     */
-    @ApiModelProperty(value = "下单返回状态码")
-    private String requestCode;
-
-    /**
-     * 状态信息
-     */
-    @ApiModelProperty(value = "下单返回状态信息")
-    private String requestMessage;
+    private String reqCode;
 
     /**
      *  任务单号
@@ -51,29 +39,28 @@ public class AgvHikOrderDetailInfoSaveDTO {
     private String taskCode;
 
     /**
-     * 请求返回时间
+     * 请求时间
      */
-    @ApiModelProperty(value = "请求返回时间")
+    @ApiModelProperty(value = "请求时间")
     private String requestTime;
 
     /**
      * 回调返回时间
      */
     @ApiModelProperty(value = "回调返回时间")
-    @TableField("callback_time")
     private String callbackTime;
 
     /**
-     * 回调状态码
+     * 告警信息
      */
-    @ApiModelProperty(value = "回调状态码")
-    private String callbackCode;
+    @ApiModelProperty(value = "告警信息")
+    private String alertMessage;
 
     /**
-     * 回调信息
+     * 告警开始时间
      */
-    @ApiModelProperty(value = "回调状态信息")
-    private String callbackMessage;
+    @ApiModelProperty(value = "告警开始时间")
+    private String alertBeginTime;
 
     /**
      * 地码 X 坐标

+ 9 - 22
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderDetailInfoUpdateDTO.java

@@ -36,19 +36,7 @@ public class AgvHikOrderDetailInfoUpdateDTO {
      * 下单请求编号
      */
     @ApiModelProperty(value = "下单请求编号")
-    private Long reqCode;
-
-    /**
-     * 状态码
-     */
-    @ApiModelProperty(value = "下单返回状态码")
-    private String requestCode;
-
-    /**
-     * 状态信息
-     */
-    @ApiModelProperty(value = "下单返回状态信息")
-    private String requestMessage;
+    private String reqCode;
 
     /**
      *  任务单号
@@ -57,29 +45,28 @@ public class AgvHikOrderDetailInfoUpdateDTO {
     private String taskCode;
 
     /**
-     * 请求返回时间
+     * 请求时间
      */
-    @ApiModelProperty(value = "请求返回时间")
+    @ApiModelProperty(value = "请求时间")
     private String requestTime;
 
     /**
      * 回调返回时间
      */
     @ApiModelProperty(value = "回调返回时间")
-    @TableField("callback_time")
     private String callbackTime;
 
     /**
-     * 回调状态码
+     * 告警信息
      */
-    @ApiModelProperty(value = "回调状态码")
-    private String callbackCode;
+    @ApiModelProperty(value = "告警信息")
+    private String alertMessage;
 
     /**
-     * 回调信息
+     * 告警开始时间
      */
-    @ApiModelProperty(value = "回调状态信息")
-    private String callbackMessage;
+    @ApiModelProperty(value = "告警开始时间")
+    private String alertBeginTime;
 
     /**
      * 地码 X 坐标

+ 14 - 2
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderInfoPageDTO.java

@@ -89,11 +89,23 @@ public class AgvHikOrderInfoPageDTO implements Serializable {
     private String taskNodeId;
 
 
+    /**
+     * agv任务请求返回时间
+     */
+    @ApiModelProperty(value = "agv任务请求返回时间")
+    private String responseTime;
+
+    /**
+     * agv任务请求返回状态码
+     */
+    @ApiModelProperty(value = "agv任务请求返回状态码")
+    private String responseCode;
+
     /**
      * agv任务号
      */
     @ApiModelProperty(value = "agv任务号")
-    private int agvTaskId;
+    private String taskCode;
 
 
 
@@ -101,7 +113,7 @@ public class AgvHikOrderInfoPageDTO implements Serializable {
      * 父agv任务点
      */
     @ApiModelProperty(value = "父agv任务点")
-    private int parentAgvTaskId;
+    private int parentTaskCode;
 
     /**
      *  agv重做动作号

+ 14 - 4
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderInfoSaveDTO.java

@@ -89,18 +89,28 @@ public class AgvHikOrderInfoSaveDTO implements Serializable {
 
 
     /**
-     * agv任务
+     * agv任务请求返回时间
      */
-    @ApiModelProperty(value = "agv任务")
-    private int agvTaskId;
+    @ApiModelProperty(value = "agv任务请求返回时间")
+    private String responseTime;
 
+    /**
+     * agv任务请求返回状态码
+     */
+    @ApiModelProperty(value = "agv任务请求返回状态码")
+    private String responseCode;
 
+    /**
+     * agv任务号
+     */
+    @ApiModelProperty(value = "agv任务号")
+    private String taskCode;
 
     /**
      * 父agv任务点
      */
     @ApiModelProperty(value = "父agv任务点")
-    private int parentAgvTaskId;
+    private int parentTaskCode;
 
     /**
      *  agv重做动作号

+ 13 - 4
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/dto/AgvHikOrderInfoUpdateDTO.java

@@ -93,20 +93,29 @@ public class AgvHikOrderInfoUpdateDTO implements Serializable {
     @ApiModelProperty(value = "排产任务结点号")
     private String taskNodeId;
 
+    /**
+     * agv任务请求返回时间
+     */
+    @ApiModelProperty(value = "agv任务请求返回时间")
+    private String responseTime;
+
+    /**
+     * agv任务请求返回状态码
+     */
+    @ApiModelProperty(value = "agv任务请求返回状态码")
+    private String responseCode;
 
     /**
      * agv任务号
      */
     @ApiModelProperty(value = "agv任务号")
-    private int agvTaskId;
-
-
+    private String taskCode;
 
     /**
      * 父agv任务点
      */
     @ApiModelProperty(value = "父agv任务点")
-    private int parentAgvTaskId;
+    private int parentTaskCode;
 
     /**
      *  agv重做动作号

+ 11 - 25
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/entity/AgvHikOrderDetailInfo.java

@@ -36,26 +36,12 @@ public class AgvHikOrderDetailInfo extends Entity<Long> {
     private Long id;
 
     /**
-     * id
+     * 下单请求编号
      */
     @ApiModelProperty(value = "下单请求编号")
     @TableField("req_code")
     private String reqCode;
 
-    /**
-     * 状态码
-     */
-    @ApiModelProperty(value = "下单返回状态码")
-    @TableField("request_code")
-    private String requestCode;
-
-    /**
-     * 状态信息
-     */
-    @ApiModelProperty(value = "下单返回状态信息")
-    @TableField("request_message")
-    private String requestMessage;
-
     /**
      *  任务单号
      */
@@ -64,9 +50,9 @@ public class AgvHikOrderDetailInfo extends Entity<Long> {
     private String taskCode;
 
     /**
-     * 请求返回时间
+     * 请求时间
      */
-    @ApiModelProperty(value = "请求返回时间")
+    @ApiModelProperty(value = "请求时间")
     @TableField("request_time")
     private String requestTime;
 
@@ -78,18 +64,18 @@ public class AgvHikOrderDetailInfo extends Entity<Long> {
     private String callbackTime;
 
     /**
-     * 回调状态码
+     * 告警信息
      */
-    @ApiModelProperty(value = "回调状态码")
-    @TableField("callback_code")
-    private String callbackCode;
+    @ApiModelProperty(value = "告警信息")
+    @TableField("alert_message")
+    private String alertMessage;
 
     /**
-     * 回调信息
+     * 告警开始时间
      */
-    @ApiModelProperty(value = "回调状态信息")
-    @TableField("callback_message")
-    private String callbackMessage;
+    @ApiModelProperty(value = "告警开始时间")
+    @TableField("alert_begin_time")
+    private String alertBeginTime;
 
     /**
      * 地码 X 坐标

+ 17 - 4
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/externalApi/entity/AgvHikOrderInfo.java

@@ -106,13 +106,26 @@ public class AgvHikOrderInfo extends Entity<Long> {
     @TableField("task_node_id")
     private String taskNodeId;
 
+    /**
+     * agv任务请求返回时间
+     */
+    @ApiModelProperty(value = "agv任务请求返回时间")
+    @TableField("response_time")
+    private String responseTime;
+
+    /**
+     * agv任务请求返回状态码
+     */
+    @ApiModelProperty(value = "agv任务请求返回状态码")
+    @TableField("response_code")
+    private String responseCode;
 
     /**
      * agv任务号
      */
     @ApiModelProperty(value = "agv任务号")
-    @TableField("agv_task_id")
-    private int agvTaskId;
+    @TableField("task_code")
+    private String taskCode;
 
 
 
@@ -120,8 +133,8 @@ public class AgvHikOrderInfo extends Entity<Long> {
      * 父agv任务点
      */
     @ApiModelProperty(value = "父agv任务点")
-    @TableField("parent_agv_task_id")
-    private int parentAgvTaskId;
+    @TableField("parent_task_code")
+    private int parentTaskCode;
 
     /**
      *  agv重做动作号