xuxiaofei лет назад: 2
Родитель
Сommit
a9357b1acd

+ 1 - 1
zd-modules/zd-algorithm/src/main/java/com/zd/alg/fire/utils/FireLaborUtil.java

@@ -139,7 +139,7 @@ public class FireLaborUtil {
         if(addressBit>=10){
             return String.valueOf(addressBit);
         }
-        return String.format("%0"+2+"x", Integer.valueOf(addressBit));
+        return String.format("%0"+2+"x", addressBit);
     }
 
     /**

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSubjectAccessRecordServiceImpl.java

@@ -278,7 +278,7 @@ public class LabSubjectAccessRecordServiceImpl implements ILabSubjectAccessRecor
                                         Map<String, Object> pointsConfig = (Map<String, Object>) data.getData();
                                         //获取积分详情列表
                                         List<Map<String, Object>> pointsConfigDetail = (List<Map<String, Object>>) pointsConfig.get("configDetailList");
-                                        ElPassConfigdetailVO result = blacklistService.getIntegralMatchingRules(pointsConfigDetail,Integer.valueOf(creditScore));
+                                        ElPassConfigdetailVO result = blacklistService.getIntegralMatchingRules(pointsConfigDetail,creditScore);
 
                                         ViolationNewVo vo = new ViolationNewVo();
                                         vo.setUserId(a.getJoinUserId());

+ 3 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSubjectManagerService.java

@@ -141,6 +141,7 @@ public class LabSubjectManagerService {
             }
         } catch (InterruptedException e) {
             logger.error("异步处理硬件异常!",e);
+            Thread.currentThread().interrupt();
         }
     }
 
@@ -160,8 +161,8 @@ public class LabSubjectManagerService {
             return ResultData.fail("不存在控制类型!");
         }
         if (labHardware == null || labHardware.getRelayCode() == null) {
-            logger.error("硬件不存在或未关联继电器!id:{},名称:{}", labHardware.getId(), labHardware.getName());
-            return ResultData.fail(StrUtil.format("硬件不存在或未关联继电器!id:{},名称:{}", labHardware.getId(), labHardware.getName()));
+            logger.error("硬件不存在或未关联继电器!id:{},名称:{}");
+            return ResultData.fail(StrUtil.format("硬件不存在或未关联继电器!id:{},名称:{}"));
         }
         if (labHardware.getBit() == null) {
             logger.error("硬件不存在或未关联继电器!id:{},名称:{}", labHardware.getId(), labHardware.getName());

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabTimedExhaustServiceImpl.java

@@ -246,7 +246,7 @@ public class LabTimedExhaustServiceImpl implements ILabTimedExhaustService {
                 }
                 //自定义执行
                 Integer[] weekDays = { 7, 1, 2, 3, 4, 5, 6 };
-                if(map.get(weekDays[w].intValue()) !=null && weekDays[w].intValue()==map.get(weekDays[w].intValue()).intValue()){
+                if(map.get(weekDays[w]) !=null && weekDays[w].intValue()==map.get(weekDays[w].intValue())){
                     return true;
                 }
             }

+ 4 - 4
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabViolationServiceImpl.java

@@ -485,7 +485,7 @@ public class LabViolationServiceImpl implements ILabViolationService {
             if (vo.getReason().equals("-1")) {
                 score = creditScore - Integer.parseInt(vo.getDeductionVal() + "");
                 history.setReason(vo.getViolationReasons());
-                history.setDeductionVal(Long.valueOf(vo.getDeductionVal()));
+                history.setDeductionVal(vo.getDeductionVal());
             } else {
                 score = creditScore - Integer.parseInt(scoreSite.getViolationVal());
                 history.setReason(scoreSite.getViolationName());
@@ -548,7 +548,7 @@ public class LabViolationServiceImpl implements ILabViolationService {
                 labViolation.setCreditScore(labViolation.getCreditScore());
                 labViolation.setViolationNum(labViolation.getViolationNum() + 1);
                 if (labViolation != null) {
-                    labViolation.setNegativeListNum(Long.valueOf(labViolation.getNegativeListNum()) + 1);
+                    labViolation.setNegativeListNum(labViolation.getNegativeListNum()+ 1);
                 }
                 labViolation.setSubjectId(vo.getLaboratoryId());
                 labViolation.setDeptName(vo.getDeptName());
@@ -620,7 +620,7 @@ public class LabViolationServiceImpl implements ILabViolationService {
                 nhistory.setCreditScore(Long.valueOf(score));
                 if (vo.getReason().equals("-1")) {
                     nhistory.setReason(vo.getViolationReasons());
-                    nhistory.setDeductionVal(Long.valueOf(vo.getDeductionVal()));
+                    nhistory.setDeductionVal(vo.getDeductionVal());
                 } else {
                     nhistory.setReason(scoreSite.getViolationName());
                     nhistory.setDeductionVal(Long.valueOf(scoreSite.getViolationVal()));
@@ -662,7 +662,7 @@ public class LabViolationServiceImpl implements ILabViolationService {
                 nhistory.setCreditScore(Long.valueOf(score));
                 if (vo.getReason().equals("-1")) {
                     nhistory.setReason(vo.getViolationReasons());
-                    nhistory.setDeductionVal(Long.valueOf(vo.getDeductionVal()));
+                    nhistory.setDeductionVal(vo.getDeductionVal());
                 } else {
                     nhistory.setReason(scoreSite.getViolationName());
                     nhistory.setDeductionVal(Long.valueOf(scoreSite.getViolationVal()));

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/SubQueryManager.java

@@ -173,7 +173,7 @@ public class SubQueryManager {
                 LabSubClassVO labSubClassVO = new LabSubClassVO();
                 if(a.getLevel()!=null)
                 {
-                    labSubClassVO.setDangerLevel(Long.valueOf(a.getLevel()));
+                    labSubClassVO.setDangerLevel(a.getLevel());
                 }
                 subDiyVO.setSubClassVO(labSubClassVO);
             }

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/socket/util/SocketUtils.java

@@ -11,7 +11,7 @@ import java.text.SimpleDateFormat;
  */
 public class SocketUtils {
 
-    public static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+    public SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
     public static byte[] str2byte(String str) {
         str = str.replaceAll(" ", "");

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/utils/FireLaborUtil.java

@@ -141,7 +141,7 @@ public class FireLaborUtil {
         if(addressBit>=10){
             return String.valueOf(addressBit);
         }
-        return String.format("%0"+2+"x", Integer.valueOf(addressBit));
+        return String.format("%0"+2+"x", addressBit);
     }
 
     /**

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/utils/HexUtils.java

@@ -152,7 +152,7 @@ public class HexUtils {
             bytes[i] = (byte) (~temp);
         }
         String bths =  bytesToHexString(bytes);
-        return bths.toUpperCase();
+        return bths==null?"": bths.toUpperCase();
     }
 
     /**

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/utils/RelayUtils.java

@@ -44,7 +44,7 @@ public class RelayUtils {
             log.info("status:"+status+"bit:"+bit);
             LabRelayStatus labRelayStatus = new LabRelayStatus();
             labRelayStatus.setBit(bit);
-            if(status== RelayConstants.AT_OPEN){
+            if(status.equals(RelayConstants.AT_OPEN) ){
                 log.info("打开了");
                 labRelayStatus.setNum(relayCode);
                 labRelayStatus.setHardwareOperate(HardwareOperate.OPEN);

+ 3 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/utils/word/SignPicPolicy.java

@@ -112,13 +112,14 @@ public class SignPicPolicy extends AbstractRenderPolicy<SignPictureRenderData> {
                             + "</wp:anchor>";
 
             CTDrawing drawing = null;
+            CTAnchor anchor = null;
             try {
                 drawing = CTDrawing.Factory.parse(anchorXML);
+                anchor = drawing.getAnchorArray(0);
+                anchor.setGraphic(ctGraphicalObject);
             } catch (XmlException e) {
                 e.printStackTrace();
             }
-            CTAnchor anchor = drawing.getAnchorArray(0);
-            anchor.setGraphic(ctGraphicalObject);
             return anchor;
         }