diff --git a/src/main/java/com/cm/inspection/listener/process/SelfCheckReportCompleteListener.java b/src/main/java/com/cm/inspection/listener/process/SelfCheckReportCompleteListener.java index ede1421..044ca1e 100644 --- a/src/main/java/com/cm/inspection/listener/process/SelfCheckReportCompleteListener.java +++ b/src/main/java/com/cm/inspection/listener/process/SelfCheckReportCompleteListener.java @@ -18,14 +18,14 @@ public class SelfCheckReportCompleteListener implements TaskListener { @Override public void notify(DelegateTask delegateTask) { - if (delegateTask.getVariable("reReportor") == null) { + if (delegateTask.getVariable("reReporter") == null) { return; } - String reReportor = delegateTask.getVariable("reReportor").toString(); - if (StringUtils.isBlank(reReportor)) { + String reReporter = delegateTask.getVariable("reReporter").toString(); + if (StringUtils.isBlank(reReporter)) { return; } - delegateTask.setAssignee(reReportor); + delegateTask.setAssignee(reReporter); } } diff --git a/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java b/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java index 95145e0..1d30536 100644 --- a/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/check/impl/CheckServiceImpl.java @@ -10,10 +10,13 @@ import com.cm.common.utils.UUIDUtil; import com.cm.inspection.dao.check.ICheckDao; import com.cm.inspection.enums.HiddenDangerCheckResultEnum; import com.cm.inspection.pojo.dtos.check.CheckDTO; +import com.cm.inspection.pojo.dtos.gridpersonnel.GridPersonnelDTO; import com.cm.inspection.pojo.vos.check.CheckVO; import com.cm.inspection.pojo.vos.hiddendangerreport.HiddenDangerReportVO; import com.cm.inspection.service.BaseService; import com.cm.inspection.service.check.ICheckService; +import com.cm.inspection.service.enterpriseofgridoperator.IEnterpriseOfGridOperatorService; +import com.cm.inspection.service.gridpersonnel.IGridPersonnelService; import com.cm.inspection.service.hiddendangerreport.IHiddenDangerReportService; import com.cm.inspection.service.process.IProcessService; import com.github.pagehelper.PageHelper; @@ -42,6 +45,8 @@ public class CheckServiceImpl extends BaseService implements ICheckService { private IHiddenDangerReportService hiddenDangerReportService; @Autowired private IProcessService processService; + @Autowired + private IGridPersonnelService gridPersonnelService; @Override public SuccessResult saveCheck(CheckVO checkVO) throws Exception { @@ -82,6 +87,7 @@ public class CheckServiceImpl extends BaseService implements ICheckService { params.clear(); params.put("reporter", userId); processService.startProcess(IProcessService.CHECK_SELF_PROCESS, businessKey, params); + Task task = processService.getTaskByAssigneeAndBusinessKey(userId, businessKey); params.clear(); params.put("isCoordination", isCoordination); @@ -99,8 +105,10 @@ public class CheckServiceImpl extends BaseService implements ICheckService { params.put("isAllPass", isAllPass); if (isAllPass == 0) { LOG.debug("检查项没有完全通过,需要复查"); - params.put("reReportor", userId); + params.put("reReporter", userId); } + } else { + List gridPersonnelDTOs = gridPersonnelService.listGridPersonnelByUserId(userId); } processService.saveTaskCompleteByTaskId(task.getId(), params); } diff --git a/src/main/java/com/cm/inspection/service/gridpersonnel/IGridPersonnelService.java b/src/main/java/com/cm/inspection/service/gridpersonnel/IGridPersonnelService.java index 3cbe8af..05dbfdb 100644 --- a/src/main/java/com/cm/inspection/service/gridpersonnel/IGridPersonnelService.java +++ b/src/main/java/com/cm/inspection/service/gridpersonnel/IGridPersonnelService.java @@ -108,4 +108,12 @@ public interface IGridPersonnelService { */ SuccessResultList> listPageGridPersonnel(ListPage page) throws SearchException; + /** + * 通过UserId + * + * @param userId + * @return + * @throws SearchException + */ + List listGridPersonnelByUserId(String userId) throws SearchException; } diff --git a/src/main/java/com/cm/inspection/service/gridpersonnel/impl/GridPersonnelServiceImpl.java b/src/main/java/com/cm/inspection/service/gridpersonnel/impl/GridPersonnelServiceImpl.java index bef94b1..3b2ba2e 100644 --- a/src/main/java/com/cm/inspection/service/gridpersonnel/impl/GridPersonnelServiceImpl.java +++ b/src/main/java/com/cm/inspection/service/gridpersonnel/impl/GridPersonnelServiceImpl.java @@ -142,4 +142,9 @@ public class GridPersonnelServiceImpl extends BaseService implements IGridPerson return new SuccessResultList<>(gridPersonnelDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); } + @Override + public List listGridPersonnelByUserId(String userId) throws SearchException { + return null; + } + } diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 1306341..f13e68c 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -1,6 +1,6 @@ server: port: 7006 - url: http://192.168.0.113:7006/inspection + url: http://192.168.0.106:7006/inspection title: 隐患上报系统 servlet: context-path: /inspection @@ -78,11 +78,11 @@ file: # 安全 security: oauth2: - oauth-server: http://192.168.0.113:7001/usercenter + oauth-server: http://192.168.0.106:7001/usercenter oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url} client: - client-id: 89e9c099c0a24e7f90d3cdc0447a86b3 - client-secret: VlQ1WE53RDZ6QVJLaHd2b1dGMUdEdGFjYTRhVHUyOHNpQzZoVzE3V1NDOG1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== + client-id: 32ec344a5fd04fd9911586df5d1dc36b + client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== user-authorization-uri: ${security.oauth2.oauth-server}/oauth/authorize access-token-uri: ${security.oauth2.oauth-server}/oauth/token grant-type: authorization_code @@ -105,6 +105,10 @@ access-control: - /default.html - /assets/** - /route/file/downloadfile/** + - /route/api/uploadfile + - /route/api/uploadimage + - /route/api/uploadvideo + - /route/api/uploadaudio save-paths: - /**/save*/** - /**/add*/** diff --git a/src/main/resources/bpmn/check-self.bpmn b/src/main/resources/bpmn/check-self.bpmn index 690ce1b..55ca8e5 100644 --- a/src/main/resources/bpmn/check-self.bpmn +++ b/src/main/resources/bpmn/check-self.bpmn @@ -1,184 +1,176 @@ - - - - - - - - - - - - - - - ${isAllPass==1} - - - - ${isCoordination==0} - - - - - ${isSuccessfulTreatment==0} - - - ${isSuccessfulTreatment==1} - - - - ${isCoordination==1} - - - ${isAllPass==0} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/static/route/check/save-check.html b/src/main/resources/static/route/check/save-check.html index e27ae92..19de391 100644 --- a/src/main/resources/static/route/check/save-check.html +++ b/src/main/resources/static/route/check/save-check.html @@ -22,8 +22,8 @@
- -
+ +
-
-
- -
+
-
-
- -
+
-
-
- -
+
-
-
- -
+