Przeglądaj źródła

2023-11-14 实验室服务和用户基础服务移除化学品依赖和考试依赖。

chaiyunlong 2 lat temu
rodzic
commit
e4a9d14f88
15 zmienionych plików z 8 dodań i 819 usunięć
  1. 0 10
      zd-modules/zd-modules-laboratory/pom.xml
  2. 0 3
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabNegativeListRecordsController.java
  3. 1 30
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabViolationController.java
  4. 0 23
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/onemachine/service/OneMachineService.java
  5. 0 24
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabApprovalServiceImpl.java
  6. 0 287
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabBlacklistServiceImpl.java
  7. 0 8
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabHardwareServiceImpl.java
  8. 0 9
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabMessageContentServiceImpl.java
  9. 1 18
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabNegativeListRecordsServiceImpl.java
  10. 1 19
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSecurityApplyServiceImpl.java
  11. 0 57
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSubjectAccessRecordServiceImpl.java
  12. 0 33
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSubjectManagerService.java
  13. 4 288
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabViolationServiceImpl.java
  14. 0 4
      zd-modules/zd-modules-system/pom.xml
  15. 1 6
      zd-modules/zd-modules-system/src/main/java/com/zd/system/controller/SysUserController.java

+ 0 - 10
zd-modules/zd-modules-laboratory/pom.xml

@@ -103,16 +103,6 @@
         </dependency>
 
         <dependency>
-            <groupId>com.zd.chemical</groupId>
-            <artifactId>zd-chemical-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.zd.exam</groupId>
-            <artifactId>zd-exam-api</artifactId>
-        </dependency>
-
-        <dependency>
             <groupId>com.zd.algorithm</groupId>
             <artifactId>zd-algorithm-api</artifactId>
         </dependency>

+ 0 - 3
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabNegativeListRecordsController.java

@@ -5,7 +5,6 @@ import com.zd.common.core.annotation.PreAuthorize;
 import com.zd.common.core.log.BusinessType;
 import com.zd.common.core.security.TokenService;
 import com.zd.common.core.web.controller.BaseController;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.domain.LabBlacklist;
 import com.zd.laboratory.domain.LabNegativeListRecords;
 import com.zd.laboratory.domain.LabNegativelistHistory;
@@ -55,8 +54,6 @@ public class LabNegativeListRecordsController extends BaseController
     @Autowired
     private ILabNegativelistHistoryService negativelistHistoryService;
 
-    @Autowired
-    private RemoteExamService remoteExamService;
 
     /**
      * 查询负面清单列表列表

+ 1 - 30
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabViolationController.java

@@ -9,13 +9,11 @@ import com.zd.common.core.utils.FileConfigUtils;
 import com.zd.common.core.utils.StringUtils;
 import com.zd.common.core.utils.UrlFormatUtils;
 import com.zd.common.core.web.controller.BaseController;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.domain.LabBlacklist;
 import com.zd.laboratory.domain.LabNegativelistHistory;
 import com.zd.laboratory.domain.LabViolation;
 import com.zd.laboratory.domain.vo.*;
 import com.zd.laboratory.service.*;
-import com.zd.model.domain.R;
 import com.zd.model.domain.ResultData;
 import com.zd.model.domain.per.PerFun;
 import com.zd.model.domain.per.PerPrefix;
@@ -44,27 +42,12 @@ public class LabViolationController extends BaseController {
     private ILabViolationService labViolationService;
 
     @Autowired
-    private ILabBlacklistService labBlacklistService;
-
-    @Autowired
     private TokenService tokenService;
 
     @Autowired
-    private ILabSemesterService labSemesterService;
-
-    @Autowired
-    private ILabNegativeListRecordsService labNegativeListRecordsService;
-
-    @Autowired
     private ILabNegativelistHistoryService labNegativelistHistoryService;
 
     @Autowired
-    private ILabBlacklistService blacklistService;
-
-    @Autowired
-    private RemoteExamService remoteExamService;
-
-    @Autowired
     private FileConfigUtils fileConfigUtils;
 
 
@@ -309,19 +292,7 @@ public class LabViolationController extends BaseController {
 
     @GetMapping("/getIntegralMatchingRules")
     public ResultData getIntegralMatchingRules(@RequestParam String creditScore){
-        Map<String,Object> markconfigMap = new HashMap<>();
-        R<Object> data = remoteExamService.getPointsConfig(markconfigMap);
-        if (data!=null) {
-            String code = data.getCode() + "";
-            if (code.equals("200")) {
-                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));
-               return ResultData.success(result);
-            }
-        }
-        return null;
+        return ResultData.success();
     }
 
 

+ 0 - 23
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/onemachine/service/OneMachineService.java

@@ -11,7 +11,6 @@ import com.zd.common.core.utils.Assert;
 import com.zd.common.core.utils.DateUtils;
 import com.zd.common.core.utils.IdUtils;
 import com.zd.common.core.utils.StringUtils;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.domain.*;
 import com.zd.laboratory.domain.dto.LabViolationDTO;
 import com.zd.laboratory.domain.vo.*;
@@ -84,8 +83,6 @@ public class OneMachineService implements ValidationSignInPerInfo {
     @Autowired
     LabHardwareStateMapper hardwareStateMapper;
     @Autowired
-    RemoteExamService remoteExamService;
-    @Autowired
     LabSubjectAccessRecordMapper labSubjectAccessRecordMapper;
     @Autowired
     private ILabSecurityApplyService iLabSecurityApplyService;
@@ -359,16 +356,6 @@ public class OneMachineService implements ValidationSignInPerInfo {
                     return ResultData.fail("当前用户已经签到成功,不能重复签到!");
                 }
 
-                //学生登陆时 给奖励分
-                if(UserConstants.USER_TYPE_STUDENT.equals(user.getType())){
-                    Map map = new HashMap();
-                    map.put("userId", user.getUserId());
-                    map.put("status", "0");
-                    r = remoteExamService.addLoginfo(map);
-                    if (r.getCode() != 200) {
-                        logger.info("打卡签到奖励分记录保存失败!");
-                    }
-                }
 
                 // 用户签到成功检测有无管控工作,有则发起通知
                 labGradeManageRecordService.sendManageMsgBySiginUser(user.getUserId(), Long.parseLong(s));
@@ -379,16 +366,6 @@ public class OneMachineService implements ValidationSignInPerInfo {
                 redisService.deleteObject(verifyKey);
                 subjectAccessRecordService.out(Long.parseLong(s), user.getUserId());
 
-                //学生登陆时 给奖励分
-                if(UserConstants.USER_TYPE_STUDENT.equals(user.getType())){
-                    Map map = new HashMap();
-                    map.put("userId", user.getUserId());
-                    map.put("status", "1");
-                    R r = remoteExamService.addLoginfo(map);
-                    if (r.getCode() != 200) {
-                        logger.info("打卡签出奖励分记录保存失败!");
-                    }
-                }
 
                 // 这里通过实验室id查询楼层id
                 LabBuildFloorLayout labBuildFloorLayout = new LabBuildFloorLayout();

+ 0 - 24
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabApprovalServiceImpl.java

@@ -4,7 +4,6 @@ import com.zd.common.core.annotation.DataScope;
 import com.zd.common.core.exception.ServiceException;
 import com.zd.common.core.security.TokenService;
 import com.zd.common.core.utils.DateUtils;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.domain.LabApproval;
 import com.zd.laboratory.domain.LabApprovalDetail;
 import com.zd.laboratory.domain.LabSecurityGroup;
@@ -39,8 +38,6 @@ public class LabApprovalServiceImpl implements ILabApprovalService {
     private LabApprovalDetailMapper labApprovalDetailMapper;
     @Autowired
     private TokenService tokenService;
-    @Autowired
-    private RemoteExamService remoteExamService;
 
     /**
      * 查询安全准入审批记录
@@ -181,27 +178,6 @@ public class LabApprovalServiceImpl implements ILabApprovalService {
         Date date = now.getTime();
         labApproval.setExpirationDate(date);
         int num = labApprovalMapper.updateLabApproval(labApproval);
-
-        LabApprovalAndDetailDTO labApprovalAndDetailDTO = labApprovalMapper.selectLabApprovalById(labApproval.getId());
-        if(labApprovalAndDetailDTO!=null){
-            //查询当前人员是否获取实验室安全证书
-            List<LabApprovalVO> cardList = labApprovalMapper.selectLabCardByUserid(labApprovalAndDetailDTO.getJoinUserId());
-            Integer gainSafeCert;
-            if(cardList.size()>0){
-                gainSafeCert = 1;
-            }else{
-                gainSafeCert = 0;
-            }
-            Map<String,Object> initMap = new HashMap<>();
-            initMap.put("joinUserId",labApprovalAndDetailDTO.getJoinUserId());
-            initMap.put("nickName",labApprovalAndDetailDTO.getNickName());
-            initMap.put("userName",labApprovalAndDetailDTO.getUserName());
-            initMap.put("gainSafeCert",gainSafeCert);
-            initMap.put("gainSubSafeCert",1);
-            initMap.put("reason","获取实验室安全准入资格");
-            remoteExamService.initCreditPoints(initMap);
-        }
-
         return num;
     }
 

+ 0 - 287
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabBlacklistServiceImpl.java

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
 import com.zd.common.core.annotation.DataScope;
 import com.zd.common.core.security.TokenService;
 import com.zd.common.core.utils.*;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.api.entity.LabMessageContent;
 import com.zd.laboratory.domain.LabBlackdetail;
 import com.zd.laboratory.domain.LabBlacklist;
@@ -39,8 +38,6 @@ public class LabBlacklistServiceImpl implements ILabBlacklistService {
     @Autowired
     private LabBlackdetailMapper labBlackdetailMapper;
     @Autowired
-    private RemoteExamService remoteExamService;
-    @Autowired
     private TokenService tokenService;
     @Autowired
     private LabMessageContentMapper labMessageContentMapper;
@@ -156,197 +153,11 @@ public class LabBlacklistServiceImpl implements ILabBlacklistService {
     @Transactional(rollbackFor = Exception.class)
     public int addBlacklist(LabBlacklistVO labBlacklistVO) {
         Map<String,Object> markconfigMap = new HashMap<>();
-        R<Object> data = remoteExamService.getPointsConfig(markconfigMap);
         int flag=0;
-        if (data!=null) {
-            String code = data.getCode()+"";
-            if(code.equals("200")){
-                Map<String,Object> pointsConfig = (Map <String, Object>) data.getData();
-                //获取积分详情列表
-                List<Map<String,Object>> pointsConfigDetail = (List <Map <String, Object>>) pointsConfig.get("configDetailList");
-                //查询userid,是不是之前已经有进入过黑名单记录,没有需要新增,有则查回来修改。
-                LabBlacklist userBlack = labBlacklistMapper.selectLabBlacklistByUserId(labBlacklistVO.getJoinUserId());
-                if(userBlack!=null){
-                    //修改黑名单用户列表信息
-                    LabBlacklist userBlackNew = new LabBlacklist();
-                    userBlackNew.setId(userBlack.getId());
-                    userBlackNew.setBlacklistStatus(1);
-                    userBlackNew.setJoinUserId(userBlack.getJoinUserId());
-                    userBlackNew.setReason(labBlacklistVO.getReason());
-                    userBlackNew.setCreditScore(labBlacklistVO.getCreditScore());
-
-                    if(!labBlacklistVO.getFlagAction()){
-                        if(tokenService.getLoginUser()!=null){
-                            userBlackNew.setUpdateBy(tokenService.getLoginUser().getNickName());
-                        }else{
-                            userBlackNew.setUpdateBy("系统");
-                        }
-                    }else{
-                        userBlackNew.setUpdateBy("系统");
-                    }
-
-                    userBlackNew.setUpdateTime(new Date());
-                    labBlacklistMapper.updateLabBlacklist(userBlackNew);
-                    //循环判断积分匹配规则
-                    ElPassConfigdetailVO passConfigdetailVO = getIntegralMatchingRules(pointsConfigDetail,Integer.parseInt(labBlacklistVO.getSurplusCreditScore()));
-                    //处理黑名单日志方法
-                    flag = handleBlackDetail(passConfigdetailVO,userBlackNew,labBlacklistVO.getSurplusCreditScore(),labBlacklistVO.getFlagAction());
-                    return flag;
-                }else{
-                    //插入黑名单列表
-                    LabBlacklist labBlacklistNew = new LabBlacklist();
-                    labBlacklistNew.setJoinUserId(labBlacklistVO.getJoinUserId());
-                    labBlacklistNew.setBlacklistStatus(1);
-                    labBlacklistNew.setReason(labBlacklistVO.getReason());
-
-                    if(!labBlacklistVO.getFlagAction()){
-                        if(tokenService.getLoginUser()!=null){
-                            labBlacklistNew.setCreateBy(tokenService.getLoginUser().getNickName());
-                        }else{
-                            labBlacklistNew.setCreateBy("系统");
-                        }
-                    }else{
-                        labBlacklistNew.setCreateBy("系统");
-                    }
-
-                    labBlacklistNew.setCreateTime(new Date());
-                    labBlacklistNew.setCreditScore(labBlacklistVO.getCreditScore());
-                    labBlacklistMapper.insertLabBlacklist(labBlacklistNew);
-
-                    //循环判断积分匹配规则
-                    ElPassConfigdetailVO passConfigdetailVO = getIntegralMatchingRules(pointsConfigDetail,Integer.parseInt(labBlacklistVO.getSurplusCreditScore()));
-                    //处理黑名单日志方法
-                    flag = handleBlackDetail(passConfigdetailVO,labBlacklistNew,labBlacklistVO.getSurplusCreditScore(),labBlacklistVO.getFlagAction());
-                    return flag;
-                }
-            }
-        }
 
         return flag;
     }
 
-    //处理黑名单日志方法
-    public int handleBlackDetail(ElPassConfigdetailVO passConfigdetailVO,LabBlacklist labBlacklistNew,String surplusCreditScore,Boolean flagAction){
-        if(passConfigdetailVO.getId()!=null){
-            LabBlackdetail blackdetail = new LabBlackdetail();
-            blackdetail.setBlackId(labBlacklistNew.getId());
-            blackdetail.setReason(labBlacklistNew.getReason());
-            if(blackdetail.getTreatmentMethod()==null){
-                blackdetail.setTreatmentMethod("");
-            }
-            //警告消息通知
-            if(passConfigdetailVO.getWarningStatus()==1){
-                //这里需要通知警告
-                LabMessageContent labMessageContent = new LabMessageContent();
-                labMessageContent.setSendRange(3);
-                labMessageContent.setMessClass(1);
-                labMessageContent.setContent("您由于多次违规,现已将你移入到黑名单,如需解除,需要根据黑名单规定,参加指定学习!!");
-                labMessageContent.setUserIds(labBlacklistNew.getJoinUserId()+"");
-                labMessageContent.setUserId(-2L);
-                labMessageContent.setCreateTime(new Date());
-                if(!flagAction) {
-                    if (tokenService.getLoginUser() != null) {
-                        labMessageContent.setCreateBy(tokenService.getLoginUser().getNickName());
-                    } else {
-                        labMessageContent.setCreateBy("系统");
-                    }
-                }else{
-                    labMessageContent.setCreateBy("系统");
-                }
-                labMessageContentMapper.insertLabMessageContent(labMessageContent);
-                blackdetail.setTreatmentMethod(blackdetail.getTreatmentMethod()+"警告,");
-            }
-            //约谈通知
-            if(passConfigdetailVO.getInterviewStatus()==1){
-                //这里需要约谈通知,具体需不需要保存字段,等周一讨论
-                LabMessageContent labMessageContent = new LabMessageContent();
-                labMessageContent.setSendRange(3);
-                labMessageContent.setMessClass(1);
-                labMessageContent.setContent("您由于违规,需要联系实验室老师进行沟通!!");
-                labMessageContent.setUserIds(labBlacklistNew.getJoinUserId()+"");
-                labMessageContent.setUserId(-2L);
-                labMessageContent.setCreateTime(new Date());
-                if(!flagAction) {
-                    if (tokenService.getLoginUser() != null) {
-                        labMessageContent.setCreateBy(tokenService.getLoginUser().getNickName());
-                    } else {
-                        labMessageContent.setCreateBy("系统");
-                    }
-                }else{
-                    labMessageContent.setCreateBy("系统");
-                }
-                labMessageContentMapper.insertLabMessageContent(labMessageContent);
-                blackdetail.setTreatmentMethod(blackdetail.getTreatmentMethod()+"约谈,");
-            }
-            //学习状态
-            if(passConfigdetailVO.getLearnStatus()==1){
-                blackdetail.setLearnStatus(0);
-                blackdetail.setTreatmentMethod(blackdetail.getTreatmentMethod()+"学习,");
-                //处理小时和分钟,计算成秒
-                blackdetail.setLearnTime(passConfigdetailVO.getLearnHour()*60*60+passConfigdetailVO.getLearnMinute()*60);
-            }
-            //考试状态
-            if(passConfigdetailVO.getTestStatus()==1){
-                blackdetail.setTestStatus(0);
-                blackdetail.setTreatmentMethod(blackdetail.getTreatmentMethod()+"考试,");
-            }
-            //做题状态
-            if(passConfigdetailVO.getPracticeStatus()==1){
-                blackdetail.setPracticeStatus(0);
-                blackdetail.setTreatmentMethod(blackdetail.getTreatmentMethod()+"做题,");
-                blackdetail.setNumberTopics(passConfigdetailVO.getNumberTopics());
-                blackdetail.setNumberAccuracy(passConfigdetailVO.getNumberAccuracy());
-            }
-            //处理多余的,号
-            if(blackdetail.getTreatmentMethod()!=null && !"".equals(blackdetail.getTreatmentMethod())){
-                blackdetail.setTreatmentMethod(blackdetail.getTreatmentMethod().substring(0,blackdetail.getTreatmentMethod().length()-1));
-            }
-            blackdetail.setOverStatus(0);
-            blackdetail.setHandleDay(getExpireDate(passConfigdetailVO.getHandleDay()));
-            blackdetail.setCreditScore(Long.parseLong(labBlacklistNew.getCreditScore()));
-            if(!flagAction) {
-                if(tokenService.getLoginUser()!=null){
-                    blackdetail.setCreateBy(tokenService.getLoginUser().getNickName());
-                }else{
-                    blackdetail.setCreateBy("系统");
-                }
-            }else{
-                blackdetail.setCreateBy("系统");
-            }
-
-            blackdetail.setCreateTime(new Date());
-            blackdetail.setSurplusCreditScore(surplusCreditScore);
-            return labBlackdetailMapper.insertLabBlackdetail(blackdetail);
-        }else{
-            LabBlackdetail blackdetail = new LabBlackdetail();
-            blackdetail.setBlackId(labBlacklistNew.getId());
-            blackdetail.setReason(labBlacklistNew.getReason());
-            if(!flagAction) {
-                if(tokenService.getLoginUser()!=null){
-                    blackdetail.setCreateBy(tokenService.getLoginUser().getNickName());
-                }else{
-                    blackdetail.setCreateBy("系统");
-                }
-            }else{
-                blackdetail.setCreateBy("系统");
-            }
-
-            blackdetail.setCreateTime(new Date());
-            blackdetail.setCreditScore(Long.parseLong(labBlacklistNew.getCreditScore()));
-            blackdetail.setSurplusCreditScore(surplusCreditScore);
-            return labBlackdetailMapper.insertLabBlackdetail(blackdetail);
-        }
-    }
-
-    public Date getExpireDate(Integer handleDay){
-        //计算到期时间
-        Date date=new   Date();//取时间
-        Calendar   calendar   =   new   GregorianCalendar();
-        calendar.setTime(date);
-        calendar.add(Calendar.DATE,handleDay);//把日期往后增加一天.整数往后推,负数往前移动
-        date=calendar.getTime();   //这个时间就是日期往后推一天的结果
-        return date;
-    }
 
 
     //匹配积分规则方法
@@ -455,55 +266,6 @@ public class LabBlacklistServiceImpl implements ILabBlacklistService {
     @Override
     public int removeBlacklist(LabBlacklist labBlacklist) {
         int flag = 500;
-        //给积分管理,写入对应的内容
-        LabBlacklist userBlack = labBlacklistMapper.selectLabBlacklistById(labBlacklist.getJoinUserId());
-        if(StringUtils.isNotNull(userBlack)){
-            Map<String,Object> recoveryMap = new HashMap<>();
-            recoveryMap.put("joinUserId",userBlack.getJoinUserId()+"");
-            recoveryMap.put("pointsType","1");
-            recoveryMap.put("reason","手动恢复黑名单"+labBlacklist.getReason());
-            R<Object> data = remoteExamService.recoveryPoints(recoveryMap);
-            if (data!=null) {
-                String code = data.getCode()+"";
-                if(code.equals("200")){
-                    LabBlacklist labBlacklistNew = new LabBlacklist();
-                    //修改黑名单状态
-                    labBlacklistNew.setJoinUserId(labBlacklist.getJoinUserId());
-                    labBlacklistNew.setUpdateTime(DateUtils.getNowDate());
-                    labBlacklistNew.setUpdateBy(SecurityUtils.getUsername());
-                    labBlacklistNew.setBlacklistStatus(0);
-                    flag = labBlacklistMapper.updateLabBlacklist(labBlacklistNew);
-                    //移除黑名单,需要变更详细表考试状态为已恢复。
-                    LabBlackdetailVO blackdetailVO = new LabBlackdetailVO();
-                    blackdetailVO.setBlackId(userBlack.getId());
-                    List<LabBlackdetailVO> labBlackdetailVOList = labBlackdetailMapper.selectLabBlackdetailList(blackdetailVO);
-                    int limit = 0;
-                    for(LabBlackdetailVO labBlackdetailVO:labBlackdetailVOList){
-                        if(limit==1){
-                            break;
-                        }
-                        if(labBlackdetailVO.getLearnStatus().equals(0)){
-                            labBlackdetailVO.setLearnStatus(2);
-                        }
-                        if(labBlackdetailVO.getTestStatus().equals(0)){
-                            labBlackdetailVO.setTestStatus(2);
-                        }
-                        if(labBlackdetailVO.getPracticeStatus().equals(0)){
-                            labBlackdetailVO.setPracticeStatus(2);
-                        }
-                        labBlackdetailVO.setUserId(null);
-                        labBlackdetailVO.setOverStatus(1);
-                        labBlackdetailMapper.updateLabBlackdetail(labBlackdetailVO);
-                        limit++;
-                    }
-                    //这里调用刘吉焕的移除负面清单方法
-                    iLabViolationService.resetUserStatus(labBlacklist.getJoinUserId(),labBlacklist.getReason());
-                }
-            }
-        }else{
-            //这里调用刘吉焕的移除负面清单方法
-            iLabViolationService.resetUserStatus(labBlacklist.getJoinUserId(),labBlacklist.getReason());
-        }
 
         return flag;
     }
@@ -519,55 +281,6 @@ public class LabBlacklistServiceImpl implements ILabBlacklistService {
     @Override
     public int removeBlacklistByPc(LabBlacklist labBlacklist) {
         int flag = 500;
-        //给积分管理,写入对应的内容
-        LabBlacklist userBlack = labBlacklistMapper.selectLabBlacklistById(labBlacklist.getJoinUserId());
-        if(StringUtils.isNotNull(userBlack)){
-            Map<String,Object> recoveryMap = new HashMap<>();
-            recoveryMap.put("joinUserId",userBlack.getJoinUserId()+"");
-            recoveryMap.put("pointsType","1");
-            recoveryMap.put("reason","手动恢复黑名单("+labBlacklist.getReason()+")");
-            R<Object> data = remoteExamService.recoveryPoints(recoveryMap);
-            if (data!=null) {
-                String code = data.getCode()+"";
-                if(code.equals("200")){
-                    LabBlacklist labBlacklistNew = new LabBlacklist();
-                    //修改黑名单状态
-                    labBlacklistNew.setJoinUserId(labBlacklist.getJoinUserId());
-                    labBlacklistNew.setUpdateTime(DateUtils.getNowDate());
-                    labBlacklistNew.setUpdateBy(SecurityUtils.getUsername());
-                    labBlacklistNew.setBlacklistStatus(0);
-                    flag = labBlacklistMapper.updateLabBlacklist(labBlacklistNew);
-                    //移除黑名单,需要变更详细表考试状态为已恢复。
-                    LabBlackdetailVO blackdetailVO = new LabBlackdetailVO();
-                    blackdetailVO.setBlackId(userBlack.getId());
-                    List<LabBlackdetailVO> labBlackdetailVOList = labBlackdetailMapper.selectLabBlackdetailList(blackdetailVO);
-                    int limit = 0;
-                    for(LabBlackdetailVO labBlackdetailVO:labBlackdetailVOList){
-                        if(limit==1){
-                            break;
-                        }
-                        if(labBlackdetailVO.getLearnStatus().equals(0)){
-                            labBlackdetailVO.setLearnStatus(2);
-                        }
-                        if(labBlackdetailVO.getTestStatus().equals(0)){
-                            labBlackdetailVO.setTestStatus(2);
-                        }
-                        if(labBlackdetailVO.getPracticeStatus().equals(0)){
-                            labBlackdetailVO.setPracticeStatus(2);
-                        }
-                        labBlackdetailVO.setUserId(null);
-                        labBlackdetailVO.setOverStatus(2);
-                        labBlackdetailMapper.updateLabBlackdetail(labBlackdetailVO);
-                        limit++;
-                    }
-                    //这里调用刘吉焕的移除负面清单方法
-                    iLabViolationService.resetUserRecovery(labBlacklist.getJoinUserId(),labBlacklist.getReason());
-                }
-            }
-        }else{
-            //这里调用刘吉焕的移除负面清单方法
-            iLabViolationService.resetUserRecovery(labBlacklist.getJoinUserId(),labBlacklist.getReason());
-        }
 
         return flag;
     }

+ 0 - 8
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabHardwareServiceImpl.java

@@ -1,7 +1,6 @@
 package com.zd.laboratory.service.impl;
 
 import cn.hutool.core.util.StrUtil;
-import com.zd.chemical.api.fegin.RemoteCabinetService;
 import com.zd.common.core.annotation.DataScope;
 import com.zd.common.core.exception.NoRollException;
 import com.zd.common.core.exception.ServiceException;
@@ -27,7 +26,6 @@ import com.zd.laboratory.mqtt.entiy.LabRelayStatus;
 import com.zd.laboratory.service.ILabHardwareService;
 import com.zd.laboratory.socket.service.SocketService;
 import com.zd.model.constant.CacheConstants;
-import com.zd.model.domain.ResultData;
 import com.zd.model.domain.per.PerPrefix;
 import com.zd.model.entity.SubQueryConfig;
 import com.zd.model.enums.HardwareOperate;
@@ -74,8 +72,6 @@ public class LabHardwareServiceImpl implements ILabHardwareService {
     @Autowired
     private ILabHardwareService iLabHardwareService;
 
-    @Autowired
-    private RemoteCabinetService remoteCabinetService;
 
     /**
      * 查询硬件
@@ -779,10 +775,6 @@ public class LabHardwareServiceImpl implements ILabHardwareService {
         List <LabHardwareVO> collect = Optional.ofNullable(list).orElseGet(Collections::emptyList).parallelStream().map(a -> {
             Map<String,Long> subMap = new HashMap<>();
             subMap.put("subId",a.getSubjectId());
-            ResultData<List <LinkedHashMap<String,String>>> cabinetList = remoteCabinetService.getCabinetList(subMap);
-            if(StringUtils.isNotNull(cabinetList.getData()) && cabinetList.getData().size()>0){
-                a.getCabinetList().addAll(cabinetList.getData());
-            }
             return a;
         }).sorted(Comparator.comparing(LabHardwareVO::getCreateTime).reversed()).collect(Collectors.toList());
         return collect;

+ 0 - 9
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabMessageContentServiceImpl.java

@@ -8,7 +8,6 @@ import com.zd.algorithm.api.alarm.entity.Routes;
 import com.zd.algorithm.api.alarm.entity.SendTypes;
 import com.zd.algorithm.api.alarm.feign.RemoteAlarmService;
 import com.zd.base.api.feign.RemoteMessageService;
-import com.zd.chemical.api.fegin.RemoteStockService;
 import com.zd.common.core.annotation.DataScope;
 import com.zd.common.core.utils.DateUtils;
 import com.zd.common.core.utils.SaveUtil;
@@ -26,10 +25,8 @@ import com.zd.laboratory.domain.vo.LabSubjectVO;
 import com.zd.laboratory.mapper.*;
 import com.zd.laboratory.mqtt.service.impl.CommonSend;
 import com.zd.laboratory.service.*;
-import com.zd.model.constant.HttpStatus;
 import com.zd.model.constant.MqttConstants;
 import com.zd.model.domain.DTO.UserPhoneInfo;
-import com.zd.model.domain.ResultData;
 import com.zd.model.domain.per.PerPrefix;
 import com.zd.model.entity.SysUser;
 import com.zd.model.enums.WarnUserAttrEnum;
@@ -95,9 +92,6 @@ public class LabMessageContentServiceImpl implements ILabMessageContentService {
     }
 
     @Autowired
-    RemoteStockService remoteStockService;
-
-    @Autowired
     private RemoteMessageService remoteMessageService;
 
     @Autowired
@@ -319,9 +313,6 @@ public class LabMessageContentServiceImpl implements ILabMessageContentService {
                 }
 
             }
-        } else if (phoneMode == 1) {
-            //走四医大发送短信服务接口
-            remoteStockService.sendSydSms(labRiskPlanLevel.getMessage(), 5, null, strings);
         }
 
     }

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

@@ -1,7 +1,6 @@
 package com.zd.laboratory.service.impl;
 
 import com.zd.common.core.annotation.DataScope;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.domain.LabNegativeListRecords;
 import com.zd.laboratory.domain.LabNegativelistHistory;
 import com.zd.laboratory.domain.vo.LabBlackdetailVO;
@@ -10,7 +9,6 @@ import com.zd.laboratory.mapper.LabNegativeListRecordsMapper;
 import com.zd.laboratory.mapper.LabNegativelistHistoryMapper;
 import com.zd.laboratory.service.ILabNegativeListRecordsService;
 import com.zd.laboratory.service.ILabViolationService;
-import com.zd.model.domain.R;
 import com.zd.model.domain.ResultData;
 import com.zd.model.domain.per.PerPrefix;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,9 +38,6 @@ public class LabNegativeListRecordsServiceImpl implements ILabNegativeListRecord
     private LabNegativelistHistoryMapper labNegativelistHistoryMapper;
 
     @Autowired
-    private RemoteExamService remoteExamService;
-
-    @Autowired
     private LabNegativelistHistoryMapper negativeHistoryMapper;
 
     @Autowired
@@ -84,12 +79,6 @@ public class LabNegativeListRecordsServiceImpl implements ILabNegativeListRecord
     {
         LabNegativeListRecords negativeListRecords = labNegativeListRecordsMapper.findByUserId(history.getUserId());
         if (negativeListRecords!=null){
-            Map map = new HashMap();
-            map.put("joinUserId",history.getUserId());
-            map.put("deductPoints",history.getCreditScore());
-            map.put("pointsType","2");
-            map.put("reason",history.getReason());
-            remoteExamService.deductionPoints(map);
             Integer val = (negativeListRecords.getCeditScore())-(history.getCreditScore().intValue());
             negativeListRecords.setCeditScore(val);
             negativeListRecords.setViolationNum(1L);
@@ -223,11 +212,7 @@ public class LabNegativeListRecordsServiceImpl implements ILabNegativeListRecord
         recoveryMap.put("pointsType","1");
         recoveryMap.put("reason",vo.getReason());
         //恢复积分
-        R<Object> data = remoteExamService.recoveryPoints(recoveryMap);
-        if (data.getCode()==200) {
-            return ResultData.success();
-        }
-        return ResultData.fail();
+        return ResultData.success();
 
     }
 
@@ -245,8 +230,6 @@ public class LabNegativeListRecordsServiceImpl implements ILabNegativeListRecord
         recoveryMap.put("pointsType","1");
         recoveryMap.put("reason",vo.getReason());
         //恢复积分
-        R<Object> data = remoteExamService.recoveryPoints(recoveryMap);
-        if (data.getCode()==200) return ResultData.success();
         return ResultData.success();
     }
 

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

@@ -9,7 +9,6 @@ import com.zd.common.core.security.TokenService;
 import com.zd.common.core.utils.DateUtils;
 import com.zd.common.core.utils.SecurityUtils;
 import com.zd.common.core.utils.StringUtils;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.api.entity.LabMessageUser;
 import com.zd.laboratory.domain.LabMessageDynamic;
 import com.zd.laboratory.domain.LabSecurityApply;
@@ -42,7 +41,6 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.net.URLEncoder;
 import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.zip.ZipEntry;
@@ -66,8 +64,6 @@ public class LabSecurityApplyServiceImpl implements ILabSecurityApplyService
     @Autowired
     private LabSecurityMaterialrelationMapper labSecurityMaterialrelationMapper;
 
-    @Autowired
-    private RemoteExamService remoteExamService;
 
     @Autowired
     private RemoteUserService remoteUserService;
@@ -173,21 +169,7 @@ public class LabSecurityApplyServiceImpl implements ILabSecurityApplyService
             labSecurityApply.setAuditId(sysUser.getUserId());
             labSecurityApply.setAuditTime(new Date());
 
-            //查询该条记录的详情
-            LabSecurityApplyVO applyVO= labSecurityApplyMapper.selectLabSecurityApplyById(labSecurityApply.getId());
-
-            if(UserConstants.USER_TYPE_STUDENT.equals(applyVO.getUserType())){
-                //为学生时初始化分值
-                List<Map<String, Object>> cerlist= labSecurityApplyMapper.selectUserCertList(applyVO.getUserId());
-                Map<String,Object> initMap = new HashMap<>();
-                initMap.put("joinUserId",applyVO.getUserId());
-                initMap.put("nickName",applyVO.getUserName());
-                initMap.put("userName",applyVO.getUserNumber());
-                initMap.put("gainSafeCert",cerlist.size()>0?1:0);
-                initMap.put("gainSubSafeCert",1);
-                initMap.put("reason","获取实验室安全准入资格");
-                remoteExamService.initCreditPoints(initMap);
-            }
+
         }
         labSecurityApply.setUpdateTime(DateUtils.getNowDate());
         labSecurityApply.setUpdateBy(SecurityUtils.getUsername());

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

@@ -5,7 +5,6 @@ import com.zd.common.core.exception.ServiceException;
 import com.zd.common.core.utils.DateUtils;
 import com.zd.common.core.utils.SecurityUtils;
 import com.zd.common.core.utils.StringUtils;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.domain.LabOnepc;
 import com.zd.laboratory.domain.LabSubjectAccessRecord;
 import com.zd.laboratory.domain.LabViolationScoreSite;
@@ -50,9 +49,6 @@ public class LabSubjectAccessRecordServiceImpl implements ILabSubjectAccessRecor
     private LabViolationScoreSiteMapper scoreSiteMapper;
 
     @Autowired
-    private RemoteExamService remoteExamService;
-
-    @Autowired
     private LabViolationServiceImpl labViolationServiceImpl;
 
     @Autowired
@@ -237,59 +233,6 @@ public class LabSubjectAccessRecordServiceImpl implements ILabSubjectAccessRecor
                             //校验规则
                             Map<String, Object> p = new HashMap<>();
                             p.put("userId", a.getJoinUserId());
-                            R<Object> r = remoteExamService.findByUserId(p);
-                            List<Map> list = (List<Map>) r.getData();
-                            if (list != null && list.size() > 0) {
-                                Integer creditScore = Integer.valueOf(list.get(0).get("creditScore").toString())-Integer.parseInt(allMapScore.get(a.getViolationName()));
-                                //这里查询积分规则详情数据
-                                Map<String,Object> markconfigMap = new HashMap<>();
-                                R<Object> data = remoteExamService.getPointsConfig(markconfigMap);
-                                int flag=0;
-                                if (data!=null) {
-                                    String code = data.getCode() + "";
-                                    if (code.equals("200")) {
-                                        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,creditScore);
-
-                                        ViolationNewVo vo = new ViolationNewVo();
-                                        vo.setUserId(a.getJoinUserId());
-                                        vo.setDeptId(a.getDeptId());
-                                        vo.setCreact_id(-2L);
-                                        vo.setReason("-1");
-                                        vo.setViolationReasons(a.getViolationName());
-                                        vo.setDeductionVal(Long.parseLong(allMapScore.get(a.getViolationName())));
-                                        vo.setCreditScore(Long.parseLong(allMapScore.get(a.getViolationName())));
-
-                                        vo.setLaboratoryId(a.getSubjectId());
-                                        vo.setLaboratoryName(a.getSubjectName());
-                                        vo.setUserName(a.getNickName());
-                                        if(StringUtils.isNotNull(result)){
-                                            vo.setWarningStatus(result.getWarningStatus());
-                                            vo.setInterviewStatus(result.getInterviewStatus());
-                                            vo.setTestStatus(result.getTestStatus());
-                                            vo.setLearnStatus(result.getLearnStatus());
-                                            vo.setPracticeStatus(result.getPracticeStatus());
-                                            vo.setHandleDay(result.getHandleDay());
-                                            vo.setTreatmentMessage(a.getViolationName());
-                                            vo.setLearnHour(result.getLearnHour());
-                                            vo.setLearnMinute(result.getLearnMinute());
-                                            if(StringUtils.isNotNull(result.getNumberTopics())){
-                                                vo.setNumberTopics(Integer.parseInt(result.getNumberTopics()+""));
-                                            }else{
-                                                vo.setNumberTopics(null);
-                                            }
-                                            if(StringUtils.isNotNull(result.getNumberAccuracy())){
-                                                vo.setNumberAccuracy(Integer.parseInt(result.getNumberAccuracy()+""));
-                                            }else{
-                                                vo.setNumberAccuracy(null);
-                                            }
-                                        }
-                                        labViolationServiceImpl.addViolationHistory(vo);
-                                    }
-                                }
-                            }
                         }catch (Exception e){
                             log.error("执行违规失败"+e);
                         }

+ 0 - 33
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSubjectManagerService.java

@@ -5,8 +5,6 @@ import cn.hutool.core.util.NumberUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.zd.chemical.api.fegin.RemoteChemicalAlarmService;
-import com.zd.chemical.api.fegin.RemoteChemicalService;
 import com.zd.common.core.exception.ServiceException;
 import com.zd.common.core.redis.RedisService;
 import com.zd.common.core.utils.Assert;
@@ -99,10 +97,6 @@ public class LabSubjectManagerService {
     @Autowired
     private LabRiskPlanMapper labRiskPlanMapper;
 
-    @Autowired
-    RemoteChemicalAlarmService remoteChemicalAlarmService;
-    @Autowired
-    private RemoteChemicalService remoteChemicalService;
 
     @Autowired
     private IXxpClassifyService classifyService;
@@ -299,15 +293,6 @@ public class LabSubjectManagerService {
             alarmMap.put("alarmMode","2");
             alarmMap.put("handlingStatus","1");
 
-            ResultData<List <LinkedHashMap<String,String>>> alarmList = remoteChemicalAlarmService.getList(alarmMap);
-            Optional.ofNullable(alarmList.getData()).orElseGet(Collections::emptyList).stream()
-                    .forEach(a->{
-                        Map <String,String> alarmUpMap = new HashMap<>();
-                        alarmUpMap.put("id",a.get("id"));
-                        alarmUpMap.put("handlingUserId",SecurityUtils.getUserId()+"");
-                        alarmUpMap.put("handlingContent","关闭智能声光报警");
-                        remoteChemicalAlarmService.updateStatus(alarmUpMap);
-                    });
         }
 
         if (labHardwareVO == null || labHardwareVO.getRelayCode() == null) {
@@ -607,24 +592,6 @@ public class LabSubjectManagerService {
 
 
         });
-        try {
-            // 实验室化学品临界量计算
-            ResultData r = remoteChemicalService.queryCriticaliBySubId(subIds);
-            if(r.getCode() == HttpStatus.SUCCESS){
-                List<Map<String, Object>> list = (List<Map<String, Object>>) r.getData();
-                list.forEach(map -> {
-                    for (LabSubjectVO s : labSubjects) {
-                        if (Objects.equals(s.getId(), Long.parseLong(map.get("subId") + ""))) {
-                            s.setRiskIndicator(map.get("criticali") + "");
-                            break;
-                        }
-                    }
-                });
-
-            }
-        }catch (Exception e){
-            logger.error("异常信息:",e);
-        }
         // 2.5 页面改变,接口加分页,并拆成两部分
         return labSubjects;
     }

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

@@ -4,8 +4,6 @@ import com.zd.common.core.annotation.DataScope;
 import com.zd.common.core.security.TokenService;
 import com.zd.common.core.utils.DateUtils;
 import com.zd.common.core.utils.DictUtils;
-import com.zd.common.core.utils.StringUtils;
-import com.zd.exam.api.feign.RemoteExamService;
 import com.zd.laboratory.api.entity.LabMessageContent;
 import com.zd.laboratory.domain.*;
 import com.zd.laboratory.domain.dto.LabBlacklistDTO;
@@ -15,7 +13,6 @@ import com.zd.laboratory.mapper.*;
 import com.zd.laboratory.service.ILabBlacklistService;
 import com.zd.laboratory.service.ILabViolationService;
 import com.zd.laboratory.service.ILabViolationSiteService;
-import com.zd.model.domain.R;
 import com.zd.model.domain.ResultData;
 import com.zd.model.domain.per.PerPrefix;
 import com.zd.system.api.entity.SysDictData;
@@ -49,9 +46,6 @@ public class LabViolationServiceImpl implements ILabViolationService {
     private ILabBlacklistService labBlacklistService;
 
     @Autowired
-    private RemoteExamService remoteExamService;
-
-    @Autowired
     private LabMessageContentMapper labMessageContentMapper;
 
     @Autowired
@@ -402,235 +396,7 @@ public class LabViolationServiceImpl implements ILabViolationService {
         //校验规则
         Map<String, Object> p = new HashMap<>();
         p.put("userId", vo.getUserId());
-        R<Object> r = remoteExamService.findByUserId(p);
-        List<Map> list = (List<Map>) r.getData();
-        Integer total = 0;
-        Integer creditScore = 0;
-        if (list != null && list.size() > 0) {
-            creditScore = Integer.valueOf(list.get(0).get("creditScore").toString());
-        }
-        if (r.getData() == null || ((List) r.getData()).size() < 1) {
-            return ResultData.fail("没有实验室安全准入资格");
-        }
-
-        LabViolationScoreSite scoreSite = scoreSiteMapper.selectLabViolationScoreSiteById(Long.valueOf(vo.getReason()));
-        Map map = new HashMap();
-        map.put("joinUserId", vo.getUserId());
-        if (vo.getReason().equals("-1")) {
-            map.put("deductPoints", vo.getDeductionVal());
-        } else {
-            map.put("deductPoints", scoreSite.getViolationVal());
-        }
-        map.put("pointsType", "1");
-        if(StringUtils.isNotNull(vo.getTreatmentMessage())){
-            map.put("reason", vo.getTreatmentMessage());
-        }else{
-            map.put("reason", "手动新增违规记录");
-        }
-
-        remoteExamService.deductionPoints(map);
-        LabViolation labViolation = labViolationMapper.selectByUserId(vo.getUserId());
-        LabNegativeListRecords records = negativeListRecordsMapper.findByUserId(vo.getUserId());
-
-        Map<String, Object> mapscore = (Map<String, Object>) scoreData().getData();
-        Integer hmdval = Integer.valueOf(mapscore.get("blackScore").toString());
-        if (labViolation != null) {
-
-            Integer score = 0;
-            LabNegativelistHistory history = CovertHistory(vo);
-            if (vo.getReason().equals("-1")) {
-                score = creditScore - Integer.parseInt(vo.getDeductionVal() + "");
-                history.setReason(vo.getViolationReasons());
-                history.setDeductionVal(vo.getDeductionVal());
-            } else {
-                score = creditScore - Integer.parseInt(scoreSite.getViolationVal());
-                history.setReason(scoreSite.getViolationName());
-                history.setDeductionVal(Long.valueOf(scoreSite.getViolationVal()));
-            }
-            history.setCreditScore(Long.valueOf(score));
-            if (records == null) {
-                LabNegativeListRecords records1 = new LabNegativeListRecords();
-                records1.setUserId(vo.getUserId());
-                records1.setJoinUserId(vo.getUserId());
-                records1.setStatus("2");
-                records1.setCeditScore(score);
-                records1.setBlackListNum("0");
-                records1.setIsNegative(1);
-                records1.setCreact_id(vo.getCreact_id());
-                records1.setCreateTime(new Date());
-                negativeListRecordsMapper.insertLabNegativeListRecords(records1);
-                history.setBlackId(records1.getId());
-            } else {
-                history.setBlackId(records.getId());
-            }
-
-            history.setCreateTime(new Date());
-            if (tokenService.getLoginUser() != null) {
-                history.setCreateBy(tokenService.getLoginUser().getNickName());
-            } else {
-                history.setCreateBy("系统");
-            }
-            negativelistHistoryMapper.insertLabNegativelistHistory(history);
-
-            //对比进入负面清单的次数如果达到直接进入黑名单
-            if (labViolation.getNegativeListNum() + 1 >= getCount()) {
-                labViolation.setStatus(3);
-                labViolation.setCreditScore(labViolation.getCreditScore());
-                labViolationMapper.updateLabViolation(labViolation);
-                comperAndExitsBlackList(vo.getUserId());
-                return ResultData.success(200, "达到负面清单设定次数,直接加入黑名单成功");
-            } else if (score <= hmdval) {//积分达到黑名单设定分值进入黑名单
-                labViolation.setCreditScore(labViolation.getCreditScore());
-                labViolation.setViolationNum(labViolation.getViolationNum() + 1);
-                if (records != null) {
-                    labViolation.setBlackListNum(Long.valueOf(records.getBlackListNum()) + 1);
-                }
-                labViolation.setSubjectId(vo.getLaboratoryId());
-                labViolation.setDeptName(vo.getDeptName());
-                labViolation.setDeptId(vo.getDeptId());
-                labViolation.setStatus(3);
-                labViolation.setIsNegative(0);
-                labViolation.setIsBlackList(1);
-                labViolation.setCreact_id(vo.getCreact_id());
-                labViolationMapper.updateLabViolation(labViolation);
-
-                Integer passMark = Integer.valueOf(mapscore.get("passMark").toString());
-                Integer newCreditScore = passMark - creditScore;
-                violationBlack(vo.getUserId(), String.valueOf(newCreditScore), creditScore + "");
-                return ResultData.success(200, "积分达到黑名单设定值,加入黑名单成功");
-            } else {
-                labViolation.setCreditScore(labViolation.getCreditScore());
-                labViolation.setViolationNum(labViolation.getViolationNum() + 1);
-                if (labViolation != null) {
-                    labViolation.setNegativeListNum(labViolation.getNegativeListNum()+ 1);
-                }
-                labViolation.setSubjectId(vo.getLaboratoryId());
-                labViolation.setDeptName(vo.getDeptName());
-                labViolation.setDeptId(vo.getDeptId());
-                labViolation.setStatus(2);
-                labViolation.setIsNegative(1);
-                labViolation.setCreact_id(vo.getCreact_id());
-                labViolationMapper.updateLabViolation(labViolation);
-                if (records != null) {
-                    records.setViolationNum(records.getViolationNum() + 1);
-                    Long num = Long.valueOf(records.getNegativeListNum()) + 1;
-                    records.setNegativeListNum(num + "");
-                    records.setDeptName(vo.getDeptName());
-                    records.setIsNegative(1);
-                    if (vo.getReason().equals("-1")) {
-                        records.setCeditScore(records.getCeditScore() - vo.getDeductionVal().intValue());
-                    } else {
-                        records.setCeditScore(records.getCeditScore() - Integer.parseInt(scoreSite.getViolationVal()));
-                    }
-
-                    records.setStatus("2");
-                    records.setCreact_id(vo.getCreact_id());
-                    negativeListRecordsMapper.updateLabNegativeListRecords(records);
-                }
-            }
-            return ResultData.success();
-        } else {
-            Integer score = 0;
-            if (vo.getReason().equals("-1")) {
-                score = creditScore - Integer.parseInt(vo.getDeductionVal() + "");
-            } else {
-                score = creditScore - Integer.parseInt(scoreSite.getViolationVal());
-            }
-            if (score <= hmdval) {//积分达到黑名单设定分值进入黑名单
-                Integer passMark = Integer.valueOf(mapscore.get("passMark").toString());
-                Integer newCreditScore = passMark - creditScore;
-                violationBlack(vo.getUserId(), String.valueOf(newCreditScore), creditScore + "");
-                //违规记录
-                labViolation = new LabViolation();
-                labViolation.setUserId(vo.getUserId());
-                labViolation.setJoinUserId(vo.getUserId());
-                labViolation.setStatus(3);
-                labViolation.setDeptName(vo.getDeptName());
-                labViolation.setCreditScore(score);
-                labViolation.setIsNegative(0);
-                labViolation.setIsBlackList(1);
-                labViolation.setNegativeListNum(0L);
-                labViolation.setBlackListNum(1L);
-                labViolation.setCreact_id(vo.getCreact_id());
-                labViolation.setCreateTime(new Date());
-                labViolationMapper.insertLabViolation(labViolation);
-                records = new LabNegativeListRecords();
-                records.setUserId(vo.getUserId());
-                records.setJoinUserId(vo.getUserId());
-                records.setStatus("2");
-                records.setCeditScore(score);
-                records.setNegativeListNum("0");
-                records.setBlackListNum("1");
-                records.setIsNegative(0);
-                records.setIsBlackList(1);
-                records.setCreact_id(vo.getCreact_id());
-                records.setCreateTime(new Date());
-                negativeListRecordsMapper.insertLabNegativeListRecords(records);
-                vo.setCreditScore(Long.valueOf(score));
-                LabNegativelistHistory nhistory = CovertHistory(vo);
-                nhistory.setBlackId(records.getId());
-                nhistory.setCreateTime(new Date());
-
-                nhistory.setCreditScore(Long.valueOf(score));
-                if (vo.getReason().equals("-1")) {
-                    nhistory.setReason(vo.getViolationReasons());
-                    nhistory.setDeductionVal(vo.getDeductionVal());
-                } else {
-                    nhistory.setReason(scoreSite.getViolationName());
-                    nhistory.setDeductionVal(Long.valueOf(scoreSite.getViolationVal()));
-                }
-                if (tokenService.getLoginUser() != null) {
-                    nhistory.setCreateBy(tokenService.getLoginUser().getNickName());
-                } else {
-                    nhistory.setCreateBy("系统");
-                }
-                negativelistHistoryMapper.insertLabNegativelistHistory(nhistory);
-            } else {
-                //违规记录
-                labViolation = new LabViolation();
-                labViolation.setUserId(vo.getUserId());
-                labViolation.setJoinUserId(vo.getUserId());
-                labViolation.setStatus(2);
-                labViolation.setDeptName(vo.getDeptName());
-                labViolation.setCreditScore(score);
-                labViolation.setIsNegative(1);
-                labViolation.setBlackListNum(0L);
-                labViolation.setCreact_id(vo.getCreact_id());
-                labViolation.setCreateTime(new Date());
-                labViolationMapper.insertLabViolation(labViolation);
-                records = new LabNegativeListRecords();
-                records.setUserId(vo.getUserId());
-                records.setJoinUserId(vo.getUserId());
-                records.setStatus("2");
-                records.setCeditScore(score);
-                records.setBlackListNum("0");
-                records.setIsNegative(1);
-                records.setCreact_id(vo.getCreact_id());
-                records.setCreateTime(new Date());
-                negativeListRecordsMapper.insertLabNegativeListRecords(records);
-                vo.setCreditScore(Long.valueOf(score));
-                LabNegativelistHistory nhistory = CovertHistory(vo);
-                nhistory.setBlackId(records.getId());
-                nhistory.setCreateTime(new Date());
-
-                nhistory.setCreditScore(Long.valueOf(score));
-                if (vo.getReason().equals("-1")) {
-                    nhistory.setReason(vo.getViolationReasons());
-                    nhistory.setDeductionVal(vo.getDeductionVal());
-                } else {
-                    nhistory.setReason(scoreSite.getViolationName());
-                    nhistory.setDeductionVal(Long.valueOf(scoreSite.getViolationVal()));
-                }
-                if (tokenService.getLoginUser() != null) {
-                    nhistory.setCreateBy(tokenService.getLoginUser().getNickName());
-                } else {
-                    nhistory.setCreateBy("系统");
-                }
-                negativelistHistoryMapper.insertLabNegativelistHistory(nhistory);
-            }
-            return ResultData.success();
-        }
-
+        return ResultData.success();
     }
 
 
@@ -837,7 +603,6 @@ public class LabViolationServiceImpl implements ILabViolationService {
         } else {
             recoveryMap.put("reason", "负面清单移除恢复信用分");
         }
-        remoteExamService.recoveryPoints(recoveryMap);
         return ResultData.success();
     }
 
@@ -877,8 +642,6 @@ public class LabViolationServiceImpl implements ILabViolationService {
             recoveryMap.put("reason", "负面清单移除恢复信用分");
         }
 
-        remoteExamService.recoveryPoints(recoveryMap);
-
         return ResultData.success();
     }
 
@@ -907,48 +670,10 @@ public class LabViolationServiceImpl implements ILabViolationService {
 
     //移入黑名单操作
     public void moveBlackList(LabViolation violation, String reason) {
-        Map<String, Object> markconfigMap = new HashMap<>();
-        R<Object> data = remoteExamService.getPointsConfig(markconfigMap);
-        if (data != null) {
-            String code = data.getCode() + "";
-            if (code.equals("200")) {
-                Map<String, Object> pointsConfig = (Map<String, Object>) data.getData();
-                Long deducPoints = violation.getCreditScore() - Long.parseLong(pointsConfig.get("blackScore") + "");
-                if (deducPoints > 0 && deducPointsFun(violation.getUserId(), deducPoints, reason)) {
-                    //这里移入黑名单
-                    LabBlacklistVO labBlacklistVO = new LabBlacklistVO();
-                    labBlacklistVO.setJoinUserId(violation.getUserId());
-                    labBlacklistVO.setCreditScore(deducPoints + "");
-                    labBlacklistVO.setSurplusCreditScore((violation.getCreditScore() - deducPoints) + "");
-                    labBlacklistVO.setReason("从负面清单移入到黑名单");
-                    labBlacklistService.addBlacklist(labBlacklistVO);
-                }
-            }
-        }
-    }
-
-
-    private boolean deducPointsFun(Long joinUserId, Long deductPoints, String reason) {
-        Map<String, Object> deducPointsMap = new HashMap<>();
-        deducPointsMap.put("joinUserId", joinUserId);
-        deducPointsMap.put("deductPoints", deductPoints);
-        deducPointsMap.put("pointsType", 1);
-        if (StringUtils.isNotNull(reason)) {
-            deducPointsMap.put("reason", "手动添加到黑名单(" + reason + ")");
-        } else {
-            deducPointsMap.put("reason", "手动添加到黑名单");
-        }
 
-        R<Object> data = remoteExamService.deductionPoints(deducPointsMap);
-        if (data != null) {
-            String code = data.getCode() + "";
-            if (code.equals("200")) {
-                return true;
-            }
-        }
-        return false;
     }
 
+
     @Override
     public ResultData userexist(Long userId) {
         LabBlacklistDTO labBlacklist = new LabBlacklistDTO();
@@ -1009,20 +734,11 @@ public class LabViolationServiceImpl implements ILabViolationService {
 
     @Override
     public Integer getScore() {
-        Map<String, Object> markconfig = new HashMap<>();
-        R<Object> r = remoteExamService.getPointsConfig(markconfig);
-        //获取设置积分进行扣减
-        Map<String, Object> result = (Map<String, Object>) r.getData();
-        return Integer.valueOf(result.get("passMark").toString());
+        return 1;
     }
 
     public ResultData scoreData() {
-        Map<String, Object> markconfig = new HashMap<>();
-        R<Object> r = remoteExamService.getPointsConfig(markconfig);
-        if (r.getCode() == 200) {
-            return ResultData.success((r.getData()));
-        }
-        return ResultData.fail("获取积分扣减接口失败");
+        return ResultData.success(1);
     }
 
 

+ 0 - 4
zd-modules/zd-modules-system/pom.xml

@@ -63,10 +63,6 @@
             <artifactId>zd-laboratory-api</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>com.zd.chemical</groupId>
-            <artifactId>zd-chemical-api</artifactId>
-        </dependency>
     </dependencies>
 
     <build>

+ 1 - 6
zd-modules/zd-modules-system/src/main/java/com/zd/system/controller/SysUserController.java

@@ -7,7 +7,6 @@ import com.zd.laboratory.api.feign.RemoteLaboratoryService;
 import com.zd.model.domain.ResultData;
 import com.zd.model.entity.SysFile;
 import com.zd.base.api.feign.RemoteFileService;
-import com.zd.chemical.api.fegin.RemoteStockService;
 import com.zd.common.core.annotation.InnerAuth;
 import com.zd.common.core.annotation.Log;
 import com.zd.common.core.annotation.PreAuthorize;
@@ -76,8 +75,6 @@ public class SysUserController extends BaseController {
     @Autowired
     private ISysPermissionService permissionService;
 
-    @Autowired
-    private ISysConfigService configService;
 
     @Autowired
     private RemoteSubQueryService subQueryService;
@@ -93,8 +90,6 @@ public class SysUserController extends BaseController {
     @Resource
     private RedisTemplate<String, String> redisTemplate;
 
-    @Resource
-    private RemoteStockService stockService;
     @Autowired
     private RemoteLaboratoryService remoteLaboratoryService;
 
@@ -804,7 +799,7 @@ public class SysUserController extends BaseController {
                 redisTemplate.opsForValue().set(countKey,i+"",60,TimeUnit.MINUTES);
             }
         }
-        return stockService.sendSydSms(code, 2, null, phone);
+        return R.ok();
     }
 
     /**