Ver Fonte

对接修改

车车 há 3 meses atrás
pai
commit
405a2b6ef8

+ 1 - 0
ktg-framework/src/main/java/com/ktg/framework/config/SecurityConfig.java

@@ -105,6 +105,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/iscs/key/selectIsKeyByNfcWithoutAuth").permitAll()
                 .antMatchers("/iscs/hardware/material-api/selectMaterialsByRfidList").permitAll()
                 .antMatchers("/iscs/hardware/material-api/selectCabinetMaterials").permitAll()
+                .antMatchers("/iscs/hardware-api/updateSwitchList").anonymous()
                 .antMatchers(
                         HttpMethod.GET,
                         "/",

+ 1 - 1
ktg-iscs/src/main/java/com/ktg/iscs/controller/HardwareApiController.java

@@ -116,7 +116,7 @@ public class HardwareApiController extends BaseController
     }
 
     @ApiOperation("批量更新隔离点开关状态")
-    @Log(title = "批量更新隔离点开关状态", businessType = BusinessType.UPDATE)
+    // @Log(title = "批量更新隔离点开关状态", businessType = BusinessType.UPDATE)
     @PostMapping("/updateSwitchList")
     public CommonResult<Boolean> updateSwitchList(@RequestBody @Parameter(name = "dto", description = "修改数据类,放到body") UpdateSwitchParam dto)
     {

+ 29 - 13
ktg-iscs/src/main/java/com/ktg/iscs/domain/vo/ticketPoints/IsJobTicketPointsVO.java

@@ -20,31 +20,40 @@ import java.util.Date;
  */
 @EqualsAndHashCode(callSuper = true)
 @Data
-public class IsJobTicketPointsVO extends BaseBean
-{
+public class IsJobTicketPointsVO extends BaseBean {
     private static final long serialVersionUID = 1L;
 
-    /** 记录ID */
+    /**
+     * 记录ID
+     */
     @TableId(type = IdType.AUTO)
     @ApiModelProperty(value = "记录ID")
     private Long recordId;
 
-    /** 作业票ID */
+    /**
+     * 作业票ID
+     */
     @ApiModelProperty(value = "作业票ID")
     @Excel(name = "作业票ID")
     private Long ticketId;
 
-    /** 所属车间ID */
+    /**
+     * 所属车间ID
+     */
     @ApiModelProperty(value = "所属车间ID")
     @Excel(name = "所属车间ID")
     private Long workshopId;
 
-    /** 所属区域ID */
+    /**
+     * 所属区域ID
+     */
     @ApiModelProperty(value = "所属区域ID")
     @Excel(name = "所属区域ID")
     private Long workareaId;
 
-    /** 隔离点ID */
+    /**
+     * 隔离点ID
+     */
     @ApiModelProperty(value = "隔离点ID")
     @Excel(name = "隔离点ID")
     private Long pointId;
@@ -60,12 +69,16 @@ public class IsJobTicketPointsVO extends BaseBean
     @ApiModelProperty(value = "隔离点Name")
     private String pointName;
 
-    /** 隔离点状态 */
+    /**
+     * 隔离点状态
+     */
     @ApiModelProperty(value = "隔离点状态(0-未上锁 1-已上锁 2-已解锁)")
     @Excel(name = "隔离点状态")
     private String pointStatus;
 
-    /** 删除标志(0代表存在 2代表删除) */
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
     @ApiModelProperty(value = "删除标志(0代表存在 2代表删除)")
     private String delFlag;
 
@@ -84,11 +97,11 @@ public class IsJobTicketPointsVO extends BaseBean
     @ApiModelProperty(value = "解锁钥匙ID")
     private Long unlockedByKeyId;
 
-    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
     @Schema(description = "上锁时间")
     private Date lockTime;
 
-    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
     @Schema(description = "解锁时间")
     private Date unlockTime;
 
@@ -98,14 +111,17 @@ public class IsJobTicketPointsVO extends BaseBean
     @ApiModelProperty(value = "锁具Name")
     private String locksetName;
 
+    // @ApiModelProperty(value = "作用")
+    // private String remark;
+
     @ApiModelProperty(value = "作用")
-    private String remark;
+    private String effect;
 
     @ApiModelProperty(value = "开关状态")
     private String switchStatus;
 
     @ApiModelProperty(value = "开关状态最近更新时间")
-    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
     private Date switchLastUpdateTime;
 
 }

+ 11 - 5
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/HardwareApiServiceImpl.java

@@ -1179,15 +1179,20 @@ public class HardwareApiServiceImpl implements HardwareApiService {
         Long userId = SecurityUtils.getUserId();
         // 获取当前登陆人未完成的作业
         List<IsJobTicketUser> myJobs = iIsJobTicketUserService.getMyJob(userId);
+        System.out.println("myJobs=" + myJobs.toString());
         if (myJobs.isEmpty()) {
             return false;
         }
         // 如果有,检查一下这个人是否是需要去上锁
-        List<IsJobTicketStep> steps = iIsJobTicketStepService.list(Wrappers.<IsJobTicketStep>lambdaQuery()
-                .eq(IsJobTicketStep::getStepIndex, "5")
-                .eq(IsJobTicketStep::getStepStatus, "0"));
-        if (!steps.isEmpty()) {
-            return true;
+        for (IsJobTicketUser myJob : myJobs) {
+            List<IsJobTicketStep> steps = iIsJobTicketStepService.list(Wrappers.<IsJobTicketStep>lambdaQuery()
+                    .eq(IsJobTicketStep::getTicketId, myJob.getTicketId())
+                    .eq(IsJobTicketStep::getStepIndex, "5")
+                    .eq(IsJobTicketStep::getStepStatus, "0"));
+            System.out.println("steps=" + steps.toString());
+            if (!steps.isEmpty()) {
+                return true;
+            }
         }
         // 检查是否有需要解锁的,如果共锁人都已经解锁,但是点位存在没解锁
         for (IsJobTicketUser myJob : myJobs) {
@@ -1198,6 +1203,7 @@ public class HardwareApiServiceImpl implements HardwareApiService {
             List<IsJobTicketPoints> list1 = iIsJobTicketPointsService.list(Wrappers.<IsJobTicketPoints>lambdaQuery()
                     .eq(IsJobTicketPoints::getTicketId, myJob.getTicketId())
                     .eq(IsJobTicketPoints::getPointStatus, "1"));
+            System.out.println("list=" + list.toString() + "----------list1=" + list1.toString());
             if (list.isEmpty() && !list1.isEmpty()) {
                 return true;
             }

+ 2 - 1
ktg-iscs/src/main/resources/mapper/IsJobTicketPointsMapper.xml

@@ -125,7 +125,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             r.rfid as point_nfc,
             i.point_serial_number,
             l.lock_name,
-            l.lock_nfc
+            l.lock_nfc,
+            i.remark as effect
         FROM
             is_job_ticket_points j
                 LEFT JOIN is_isolation_point i ON j.point_id = i.point_id