소스 검색

异味代码处理

linft 2 년 전
부모
커밋
fe1c41022d

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

@@ -153,7 +153,6 @@ public class LabBuildingServiceImpl implements ILabBuildingService {
     public List<Map<String, Object>> floorByHazrdList(LabBuildingVO build) {
         LabBuilding labBuilding = new LabBuilding();
         labBuilding.setDeptId(build.getDeptId());
-//        labBuilding.setParentId(build.getId());
         List<LabBuilding> oldFloorList = labBuildingMapper.selectLabBuildingList(labBuilding);
         if (oldFloorList.size() > 0) {
             Long[] ids = new Long[oldFloorList.size()];

+ 0 - 57
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabCheckMachineMsgServiceImpl.java

@@ -136,11 +136,6 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
                     // 1.短信通知
                     if (StringUtils.isNotBlank(checkConfigInfo.getCheckSmsMsg())) {
                         // 查询负责人手机号
-//                    ResultData<SysUser> user = remoteUserService.getUserInfoByUserId(userId, SecurityConstants.INNER);
-//                    if (user.getCode() == 200 && user.getData() != null && StringUtils.isNotBlank(user.getData().getPhonenumber())) {
-//                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, new String[]{user.getData().getPhonenumber()}, SendTypes.SMS+"", checkConfigInfo.getCheckSmsMsg());
-                        // 修改为 提交输入的手机号
-
                         if (StringUtils.isNotBlank(checkRecord.getFzrLxfs())) {
                             AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, new String[]{checkRecord.getFzrLxfs()}, SendTypes.SMS + "", checkConfigInfo.getCheckSmsMsg());
                             MessageBody messageBody = new MessageBody();
@@ -231,8 +226,6 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
         LabCheckConfig checkConfigInfo = labCheckConfigService.getCheckConfigInfo();
         if (checkConfigInfo != null) {
             boolean senMsg = false;
-            //String count="您有新的整改报告需要审批,请注意查看";//发送的内容
-
             LabCheckRecord checkRecord = labCheckRecordService.selectLabCheckRecordById(checkRecordId);
 
             if (checkRecord != null) {
@@ -245,17 +238,6 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
                     // 1.短信通知
                     if (StringUtils.isNotBlank(checkConfigInfo.getCheckSmsMsg())) {
                         // 查询负责人手机号
-//                    ResultData<SysUser> user = remoteUserService.getUserInfoByUserId(userId, SecurityConstants.INNER);
-//                    if (user.getCode() == 200 && user.getData() != null && StringUtils.isNotBlank(user.getData().getPhonenumber())) {
-//                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, new String[]{user.getData().getPhonenumber()}, SendTypes.SMS+"", checkConfigInfo.getCheckSmsMsg());
-                        // 修改为 提交输入的手机号
-
-                   /* if (StringUtils.isNotBlank(checkRecord.getFzrLxfs())) {
-                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, new String[]{checkRecord.getFzrLxfs()}, SendTypes.SMS+"", checkConfigInfo.getCheckSmsMsg());
-                        MessageBody messageBody = new MessageBody();
-                        messageBody.setData(alarmEntrty);
-                        commonSend.send("alarm/"+checkRecordId,messageBody, SendMode.DISTINCT);
-                    }*/
                     }
                     // 2.一体机通知
                     if (StringUtils.isNotBlank(checkConfigInfo.getCheckAioMsg())) {
@@ -274,22 +256,11 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
                         labMessageContent.setSendRange(3);
                         labMessageContent.setMessClass(1);
                         labMessageContent.setContent(checkConfigInfo.getCheckAppMsg());
-                        //labMessageContent.setContent(count);
                         labMessageContent.setUserIds(userId + "");
 
                     }
                 } else if (type == 2) {
                     // 1.短信通知
-                /*if(StringUtils.isNotBlank(checkConfigInfo.getRectifySmsMsg())){
-                    // 查询负责人手机号
-                    ResultData<SysUser> user = remoteUserService.getUserInfoByUserId(userId, SecurityConstants.INNER);
-                    if (user.getCode() == 200 && user.getData() != null && StringUtils.isNotBlank(user.getData().getPhonenumber())) {
-                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, new String[]{user.getData().getPhonenumber()}, SendTypes.SMS+"", checkConfigInfo.getRectifySmsMsg());
-                        MessageBody messageBody = new MessageBody();
-                        messageBody.setData(alarmEntrty);
-                        commonSend.send("alarm/"+checkRecordId,messageBody, SendMode.DISTINCT);
-                    }
-                }*/
                     // 2.一体机通知
                     if (StringUtils.isNotBlank(checkConfigInfo.getRectifyAioMsg())) {
                         labCheckMachineMsg = new LabCheckMachineMsg();
@@ -372,27 +343,12 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
             LabMessageContent labMessageContent = null;
             if (type == 1) {
                 // 1.短信通知
-                if (StringUtils.isNotBlank(checkConfigInfo.getCheckSmsMsg())) {
-                    // 查询负责人手机号
-//                    ResultData<SysUser> user = remoteUserService.getUserInfoByUserId(userId, SecurityConstants.INNER);
-//                    if (user.getCode() == 200 && user.getData() != null && StringUtils.isNotBlank(user.getData().getPhonenumber())) {
-//                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, new String[]{user.getData().getPhonenumber()}, SendTypes.SMS+"", checkConfigInfo.getCheckSmsMsg());
-                    // 修改为 提交输入的手机号
-
-                   /* if (StringUtils.isNotBlank(checkRecord.getFzrLxfs())) {
-                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, new String[]{checkRecord.getFzrLxfs()}, SendTypes.SMS+"", checkConfigInfo.getCheckSmsMsg());
-                        MessageBody messageBody = new MessageBody();
-                        messageBody.setData(alarmEntrty);
-                        commonSend.send("alarm/"+checkRecordId,messageBody, SendMode.DISTINCT);
-                    }*/
-                }
                 // 2.一体机通知
                 if (StringUtils.isNotBlank(checkConfigInfo.getCheckAioMsg()) && status == 1) {
                     labCheckMachineMsg = new LabCheckMachineMsg();
                     labCheckMachineMsg.setCheckRecordId(checkRecordId);
                     labCheckMachineMsg.setType(type);
                     labCheckMachineMsg.setCheckMsg(checkConfigInfo.getCheckAioMsg());
-                    //labCheckMachineMsg.setCheckMsg(count!=null?count:checkConfigInfo.getCheckAioMsg());
                     SaveUtil.setCommonAttr(labCheckMachineMsg);
 
                     senMsg = true;
@@ -403,30 +359,18 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
                     labMessageContent.setSendMode(2);
                     labMessageContent.setSendRange(3);
                     labMessageContent.setMessClass(1);
-                    //labMessageContent.setContent(checkConfigInfo.getCheckAppMsg());
                     labMessageContent.setContent(count != null ? count : checkConfigInfo.getCheckAppMsg());
                     labMessageContent.setUserIds(userId + "");
 
                 }
             } else if (type == 2) {
                 // 1.短信通知
-                /*if(StringUtils.isNotBlank(checkConfigInfo.getRectifySmsMsg())){
-                    // 查询负责人手机号
-                    ResultData<SysUser> user = remoteUserService.getUserInfoByUserId(userId, SecurityConstants.INNER);
-                    if (user.getCode() == 200 && user.getData() != null && StringUtils.isNotBlank(user.getData().getPhonenumber())) {
-                        AlarmEntrty alarmEntrty = new AlarmEntrty(Routes.NoticePush, new String[]{user.getData().getPhonenumber()}, SendTypes.SMS+"", checkConfigInfo.getRectifySmsMsg());
-                        MessageBody messageBody = new MessageBody();
-                        messageBody.setData(alarmEntrty);
-                        commonSend.send("alarm/"+checkRecordId,messageBody, SendMode.DISTINCT);
-                    }
-                }*/
                 // 2.一体机通知
                 if (StringUtils.isNotBlank(checkConfigInfo.getRectifyAioMsg()) && status == 1) {
                     labCheckMachineMsg = new LabCheckMachineMsg();
                     labCheckMachineMsg.setCheckRecordId(checkRecordId);
                     labCheckMachineMsg.setType(type);
                     labCheckMachineMsg.setCheckMsg(checkConfigInfo.getRectifyAioMsg());
-                    //labCheckMachineMsg.setCheckMsg(count!=null?count:checkConfigInfo.getRectifyAioMsg());
                     SaveUtil.setCommonAttr(labCheckMachineMsg);
 
                     senMsg = true;
@@ -437,7 +381,6 @@ public class LabCheckMachineMsgServiceImpl implements ILabCheckMachineMsgService
                     labMessageContent.setSendMode(2);
                     labMessageContent.setSendRange(3);
                     labMessageContent.setMessClass(1);
-                    //labMessageContent.setContent(checkConfigInfo.getCheckAppMsg());
                     labMessageContent.setContent(count != null ? count : checkConfigInfo.getRectifyAppMsg());
                     labMessageContent.setUserIds(userId + "");
                 }