新增流程

This commit is contained in:
wenc000 2020-03-30 23:35:56 +08:00
parent 3b8f2a70a6
commit 68f1a72fb9
7 changed files with 258 additions and 214 deletions

View File

@ -18,14 +18,14 @@ public class SelfCheckReportCompleteListener implements TaskListener {
@Override @Override
public void notify(DelegateTask delegateTask) { public void notify(DelegateTask delegateTask) {
if (delegateTask.getVariable("reReportor") == null) { if (delegateTask.getVariable("reReporter") == null) {
return; return;
} }
String reReportor = delegateTask.getVariable("reReportor").toString(); String reReporter = delegateTask.getVariable("reReporter").toString();
if (StringUtils.isBlank(reReportor)) { if (StringUtils.isBlank(reReporter)) {
return; return;
} }
delegateTask.setAssignee(reReportor); delegateTask.setAssignee(reReporter);
} }
} }

View File

@ -10,10 +10,13 @@ import com.cm.common.utils.UUIDUtil;
import com.cm.inspection.dao.check.ICheckDao; import com.cm.inspection.dao.check.ICheckDao;
import com.cm.inspection.enums.HiddenDangerCheckResultEnum; import com.cm.inspection.enums.HiddenDangerCheckResultEnum;
import com.cm.inspection.pojo.dtos.check.CheckDTO; 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.check.CheckVO;
import com.cm.inspection.pojo.vos.hiddendangerreport.HiddenDangerReportVO; import com.cm.inspection.pojo.vos.hiddendangerreport.HiddenDangerReportVO;
import com.cm.inspection.service.BaseService; import com.cm.inspection.service.BaseService;
import com.cm.inspection.service.check.ICheckService; 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.hiddendangerreport.IHiddenDangerReportService;
import com.cm.inspection.service.process.IProcessService; import com.cm.inspection.service.process.IProcessService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
@ -42,6 +45,8 @@ public class CheckServiceImpl extends BaseService implements ICheckService {
private IHiddenDangerReportService hiddenDangerReportService; private IHiddenDangerReportService hiddenDangerReportService;
@Autowired @Autowired
private IProcessService processService; private IProcessService processService;
@Autowired
private IGridPersonnelService gridPersonnelService;
@Override @Override
public SuccessResult saveCheck(CheckVO checkVO) throws Exception { public SuccessResult saveCheck(CheckVO checkVO) throws Exception {
@ -82,6 +87,7 @@ public class CheckServiceImpl extends BaseService implements ICheckService {
params.clear(); params.clear();
params.put("reporter", userId); params.put("reporter", userId);
processService.startProcess(IProcessService.CHECK_SELF_PROCESS, businessKey, params); processService.startProcess(IProcessService.CHECK_SELF_PROCESS, businessKey, params);
Task task = processService.getTaskByAssigneeAndBusinessKey(userId, businessKey); Task task = processService.getTaskByAssigneeAndBusinessKey(userId, businessKey);
params.clear(); params.clear();
params.put("isCoordination", isCoordination); params.put("isCoordination", isCoordination);
@ -99,8 +105,10 @@ public class CheckServiceImpl extends BaseService implements ICheckService {
params.put("isAllPass", isAllPass); params.put("isAllPass", isAllPass);
if (isAllPass == 0) { if (isAllPass == 0) {
LOG.debug("检查项没有完全通过,需要复查"); LOG.debug("检查项没有完全通过,需要复查");
params.put("reReportor", userId); params.put("reReporter", userId);
} }
} else {
List<GridPersonnelDTO> gridPersonnelDTOs = gridPersonnelService.listGridPersonnelByUserId(userId);
} }
processService.saveTaskCompleteByTaskId(task.getId(), params); processService.saveTaskCompleteByTaskId(task.getId(), params);
} }

View File

@ -108,4 +108,12 @@ public interface IGridPersonnelService {
*/ */
SuccessResultList<List<GridPersonnelDTO>> listPageGridPersonnel(ListPage page) throws SearchException; SuccessResultList<List<GridPersonnelDTO>> listPageGridPersonnel(ListPage page) throws SearchException;
/**
* 通过UserId
*
* @param userId
* @return
* @throws SearchException
*/
List<GridPersonnelDTO> listGridPersonnelByUserId(String userId) throws SearchException;
} }

View File

@ -142,4 +142,9 @@ public class GridPersonnelServiceImpl extends BaseService implements IGridPerson
return new SuccessResultList<>(gridPersonnelDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); return new SuccessResultList<>(gridPersonnelDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
} }
@Override
public List<GridPersonnelDTO> listGridPersonnelByUserId(String userId) throws SearchException {
return null;
}
} }

View File

@ -1,6 +1,6 @@
server: server:
port: 7006 port: 7006
url: http://192.168.0.113:7006/inspection url: http://192.168.0.106:7006/inspection
title: 隐患上报系统 title: 隐患上报系统
servlet: servlet:
context-path: /inspection context-path: /inspection
@ -78,11 +78,11 @@ file:
# 安全 # 安全
security: security:
oauth2: 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} oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
client: client:
client-id: 89e9c099c0a24e7f90d3cdc0447a86b3 client-id: 32ec344a5fd04fd9911586df5d1dc36b
client-secret: VlQ1WE53RDZ6QVJLaHd2b1dGMUdEdGFjYTRhVHUyOHNpQzZoVzE3V1NDOG1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
user-authorization-uri: ${security.oauth2.oauth-server}/oauth/authorize user-authorization-uri: ${security.oauth2.oauth-server}/oauth/authorize
access-token-uri: ${security.oauth2.oauth-server}/oauth/token access-token-uri: ${security.oauth2.oauth-server}/oauth/token
grant-type: authorization_code grant-type: authorization_code
@ -105,6 +105,10 @@ access-control:
- /default.html - /default.html
- /assets/** - /assets/**
- /route/file/downloadfile/** - /route/file/downloadfile/**
- /route/api/uploadfile
- /route/api/uploadimage
- /route/api/uploadvideo
- /route/api/uploadaudio
save-paths: save-paths:
- /**/save*/** - /**/save*/**
- /**/add*/** - /**/add*/**

View File

@ -1,184 +1,176 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1585124459573" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema">
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" <process id="checkSelfProcess" isClosed="false" isExecutable="true" processType="None">
xmlns:activiti="http://activiti.org/bpmn" <startEvent id="_2" name="StartEvent"/>
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" <userTask activiti:assignee="${reporter}" activiti:exclusive="true" id="_3" name="reportCase">
xmlns:tns="http://www.activiti.org/test" <extensionElements>
xmlns:xsd="http://www.w3.org/2001/XMLSchema" <activiti:taskListener class="com.cm.inspection.listener.process.SelfCheckReportCompleteListener" event="delete"/>
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" </extensionElements>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" </userTask>
expressionLanguage="http://www.w3.org/1999/XPath" <exclusiveGateway gatewayDirection="Unspecified" id="_4" name="isAllPass"/>
id="m1585124459573" <exclusiveGateway gatewayDirection="Unspecified" id="_5" name="isCoordination"/>
name="" <userTask activiti:assignee="${reReporter}" activiti:exclusive="true" id="_7" name="ReExamination"/>
targetNamespace="http://www.activiti.org/test" <sequenceFlow id="_8" sourceRef="_2" targetRef="_3"/>
typeLanguage="http://www.w3.org/2001/XMLSchema"> <endEvent id="_14" name="EndEvent"/>
<process xmlns="" id="checkSelfProcess" isClosed="false" isExecutable="true" <sequenceFlow id="_15" sourceRef="_4" targetRef="_14">
processType="None"> <conditionExpression xsi:type="tFormalExpression">
<startEvent id="_2" name="StartEvent"/> <![CDATA[${isAllPass==1}]]>
<userTask activiti:assignee="${reporter}" activiti:exclusive="true" id="_3" </conditionExpression>
name="reportCase"> </sequenceFlow>
<extensionElements> <userTask activiti:exclusive="true" id="_16" name="superiorProcessing"/>
<activiti:taskListener class="com.cm.inspection.listener.process.SelfCheckReportCompleteListener" <sequenceFlow id="_17" sourceRef="_5" targetRef="_16">
event="delete"/> <conditionExpression xsi:type="tFormalExpression">
</extensionElements> <![CDATA[${isCoordination==0}]]>
</userTask> </conditionExpression>
<exclusiveGateway gatewayDirection="Unspecified" id="_4" name="isAllPass"/> </sequenceFlow>
<exclusiveGateway gatewayDirection="Unspecified" id="_5" name="isCoordination"/> <exclusiveGateway gatewayDirection="Unspecified" id="_19" name="isSuccessfulTreatment"/>
<userTask activiti:assignee="${reporter}" activiti:exclusive="true" id="_7" <sequenceFlow id="_20" sourceRef="_16" targetRef="_19"/>
name="ReExamination"/> <sequenceFlow id="_21" sourceRef="_19" targetRef="_16">
<sequenceFlow id="_8" sourceRef="_2" targetRef="_3"/> <conditionExpression xsi:type="tFormalExpression">
<endEvent id="_14" name="EndEvent"/> <![CDATA[${isSuccessfulTreatment==0}]]>
<sequenceFlow id="_15" sourceRef="_4" targetRef="_14"> </conditionExpression>
<conditionExpression xsi:type="tFormalExpression">${isAllPass==1}</conditionExpression> </sequenceFlow>
</sequenceFlow> <sequenceFlow id="_22" sourceRef="_19" targetRef="_14">
<userTask activiti:assignee="${leader}" activiti:exclusive="true" id="_16" <conditionExpression xsi:type="tFormalExpression">
name="superiorProcessing"/> <![CDATA[${isSuccessfulTreatment==1}]]>
<sequenceFlow id="_17" sourceRef="_5" targetRef="_16"> </conditionExpression>
<conditionExpression xsi:type="tFormalExpression">${isCoordination==0}</conditionExpression> </sequenceFlow>
</sequenceFlow> <sequenceFlow id="_23" sourceRef="_3" targetRef="_5"/>
<exclusiveGateway gatewayDirection="Unspecified" id="_19" name="isSuccessfulTreatment"/> <sequenceFlow id="_24" sourceRef="_5" targetRef="_4">
<sequenceFlow id="_20" sourceRef="_16" targetRef="_19"/> <conditionExpression xsi:type="tFormalExpression">
<sequenceFlow id="_21" sourceRef="_19" targetRef="_16"> <![CDATA[${isCoordination==1}]]>
<conditionExpression xsi:type="tFormalExpression">${isSuccessfulTreatment==0}</conditionExpression> </conditionExpression>
</sequenceFlow> </sequenceFlow>
<sequenceFlow id="_22" sourceRef="_19" targetRef="_14"> <sequenceFlow id="_25" sourceRef="_4" targetRef="_7">
<conditionExpression xsi:type="tFormalExpression">${isSuccessfulTreatment==1}</conditionExpression> <conditionExpression xsi:type="tFormalExpression">
</sequenceFlow> <![CDATA[${isAllPass==0}]]>
<sequenceFlow id="_23" sourceRef="_3" targetRef="_5"/> </conditionExpression>
<sequenceFlow id="_24" sourceRef="_5" targetRef="_4"> </sequenceFlow>
<conditionExpression xsi:type="tFormalExpression">${isCoordination==1}</conditionExpression> <sequenceFlow id="_26" sourceRef="_7" targetRef="_5"/>
</sequenceFlow> </process>
<sequenceFlow id="_25" sourceRef="_4" targetRef="_7"> <bpmndi:BPMNDiagram documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram">
<conditionExpression xsi:type="tFormalExpression">${isAllPass==0}</conditionExpression> <bpmndi:BPMNPlane bpmnElement="checkSelfProcess">
</sequenceFlow> <bpmndi:BPMNShape bpmnElement="_2" id="Shape-_2">
<sequenceFlow id="_26" sourceRef="_7" targetRef="_5"/> <omgdc:Bounds height="32.0" width="32.0" x="420.0" y="5.0"/>
</process> <bpmndi:BPMNLabel>
<bpmndi:BPMNDiagram xmlns="" <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" </bpmndi:BPMNLabel>
id="Diagram-_1" </bpmndi:BPMNShape>
name="New Diagram"> <bpmndi:BPMNShape bpmnElement="_3" id="Shape-_3">
<bpmndi:BPMNPlane bpmnElement="checkSelfProcess"> <omgdc:Bounds height="55.0" width="105.0" x="385.0" y="70.0"/>
<bpmndi:BPMNShape bpmnElement="_2" id="Shape-_2"> <bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="420.0" y="5.0"/> <omgdc:Bounds height="55.0" width="105.0" x="0.0" y="0.0"/>
<bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNShape>
</bpmndi:BPMNLabel> <bpmndi:BPMNShape bpmnElement="_4" id="Shape-_4" isMarkerVisible="false">
</bpmndi:BPMNShape> <omgdc:Bounds height="32.0" width="32.0" x="420.0" y="245.0"/>
<bpmndi:BPMNShape bpmnElement="_3" id="Shape-_3"> <bpmndi:BPMNLabel>
<omgdc:Bounds height="55.0" width="105.0" x="385.0" y="70.0"/> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
<bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
<omgdc:Bounds height="55.0" width="105.0" x="0.0" y="0.0"/> </bpmndi:BPMNShape>
</bpmndi:BPMNLabel> <bpmndi:BPMNShape bpmnElement="_5" id="Shape-_5" isMarkerVisible="false">
</bpmndi:BPMNShape> <omgdc:Bounds height="32.0" width="32.0" x="420.0" y="145.0"/>
<bpmndi:BPMNShape bpmnElement="_4" id="Shape-_4" isMarkerVisible="false"> <bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="420.0" y="245.0"/> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
<bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNShape>
</bpmndi:BPMNLabel> <bpmndi:BPMNShape bpmnElement="_7" id="Shape-_7">
</bpmndi:BPMNShape> <omgdc:Bounds height="55.0" width="130.0" x="380.0" y="360.0"/>
<bpmndi:BPMNShape bpmnElement="_5" id="Shape-_5" isMarkerVisible="false"> <bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="420.0" y="145.0"/> <omgdc:Bounds height="55.0" width="130.0" x="0.0" y="0.0"/>
<bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNShape>
</bpmndi:BPMNLabel> <bpmndi:BPMNShape bpmnElement="_14" id="Shape-_14">
</bpmndi:BPMNShape> <omgdc:Bounds height="32.0" width="32.0" x="580.0" y="455.0"/>
<bpmndi:BPMNShape bpmnElement="_7" id="Shape-_7"> <bpmndi:BPMNLabel>
<omgdc:Bounds height="55.0" width="130.0" x="380.0" y="360.0"/> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
<bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
<omgdc:Bounds height="55.0" width="130.0" x="0.0" y="0.0"/> </bpmndi:BPMNShape>
</bpmndi:BPMNLabel> <bpmndi:BPMNShape bpmnElement="_16" id="Shape-_16">
</bpmndi:BPMNShape> <omgdc:Bounds height="55.0" width="170.0" x="655.0" y="150.0"/>
<bpmndi:BPMNShape bpmnElement="_14" id="Shape-_14"> <bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="580.0" y="455.0"/> <omgdc:Bounds height="55.0" width="170.0" x="0.0" y="0.0"/>
<bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNShape>
</bpmndi:BPMNLabel> <bpmndi:BPMNShape bpmnElement="_19" id="Shape-_19" isMarkerVisible="false">
</bpmndi:BPMNShape> <omgdc:Bounds height="32.0" width="32.0" x="730.0" y="240.0"/>
<bpmndi:BPMNShape bpmnElement="_16" id="Shape-_16"> <bpmndi:BPMNLabel>
<omgdc:Bounds height="55.0" width="170.0" x="655.0" y="150.0"/> <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
<bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
<omgdc:Bounds height="55.0" width="170.0" x="0.0" y="0.0"/> </bpmndi:BPMNShape>
</bpmndi:BPMNLabel> <bpmndi:BPMNEdge bpmnElement="_24" id="BPMNEdge__24" sourceElement="_5" targetElement="_4">
</bpmndi:BPMNShape> <omgdi:waypoint x="436.0" y="177.0"/>
<bpmndi:BPMNShape bpmnElement="_19" id="Shape-_19" isMarkerVisible="false"> <omgdi:waypoint x="436.0" y="245.0"/>
<omgdc:Bounds height="32.0" width="32.0" x="730.0" y="240.0"/> <bpmndi:BPMNLabel>
<bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel>
</bpmndi:BPMNLabel> </bpmndi:BPMNEdge>
</bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="_23" id="BPMNEdge__23" sourceElement="_3" targetElement="_5">
<bpmndi:BPMNEdge bpmnElement="_24" id="BPMNEdge__24" sourceElement="_5" targetElement="_4"> <omgdi:waypoint x="436.0" y="125.0"/>
<omgdi:waypoint x="436.0" y="177.0"/> <omgdi:waypoint x="436.0" y="145.0"/>
<omgdi:waypoint x="436.0" y="245.0"/> <bpmndi:BPMNLabel>
<bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel>
</bpmndi:BPMNLabel> </bpmndi:BPMNEdge>
</bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_15" id="BPMNEdge__15" sourceElement="_4" targetElement="_14">
<bpmndi:BPMNEdge bpmnElement="_23" id="BPMNEdge__23" sourceElement="_3" targetElement="_5"> <omgdi:waypoint x="452.0" y="261.0"/>
<omgdi:waypoint x="436.0" y="125.0"/> <omgdi:waypoint x="530.0" y="310.0"/>
<omgdi:waypoint x="436.0" y="145.0"/> <omgdi:waypoint x="580.0" y="471.0"/>
<bpmndi:BPMNLabel> <bpmndi:BPMNLabel>
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_15" id="BPMNEdge__15" sourceElement="_4" targetElement="_14"> <bpmndi:BPMNEdge bpmnElement="_26" id="BPMNEdge__26" sourceElement="_7" targetElement="_5">
<omgdi:waypoint x="452.0" y="261.0"/> <omgdi:waypoint x="380.0" y="387.5"/>
<omgdi:waypoint x="530.0" y="310.0"/> <omgdi:waypoint x="340.0" y="270.0"/>
<omgdi:waypoint x="580.0" y="471.0"/> <omgdi:waypoint x="420.0" y="161.0"/>
<bpmndi:BPMNLabel> <bpmndi:BPMNLabel>
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_26" id="BPMNEdge__26" sourceElement="_7" targetElement="_5"> <bpmndi:BPMNEdge bpmnElement="_25" id="BPMNEdge__25" sourceElement="_4" targetElement="_7">
<omgdi:waypoint x="380.0" y="387.5"/> <omgdi:waypoint x="436.0" y="277.0"/>
<omgdi:waypoint x="340.0" y="270.0"/> <omgdi:waypoint x="436.0" y="360.0"/>
<omgdi:waypoint x="420.0" y="161.0"/> <bpmndi:BPMNLabel>
<bpmndi:BPMNLabel> <omgdc:Bounds height="2.0" width="0.0" x="0.0" y="-1.0"/>
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel>
</bpmndi:BPMNLabel> </bpmndi:BPMNEdge>
</bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_17" id="BPMNEdge__17" sourceElement="_5" targetElement="_16">
<bpmndi:BPMNEdge bpmnElement="_25" id="BPMNEdge__25" sourceElement="_4" targetElement="_7"> <omgdi:waypoint x="452.0" y="161.0"/>
<omgdi:waypoint x="436.0" y="277.0"/> <omgdi:waypoint x="655.0" y="177.5"/>
<omgdi:waypoint x="436.0" y="360.0"/> <bpmndi:BPMNLabel>
<bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
<omgdc:Bounds height="2.0" width="0.0" x="0.0" y="-1.0"/> </bpmndi:BPMNLabel>
</bpmndi:BPMNLabel> </bpmndi:BPMNEdge>
</bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_8" id="BPMNEdge__8" sourceElement="_2" targetElement="_3">
<bpmndi:BPMNEdge bpmnElement="_17" id="BPMNEdge__17" sourceElement="_5" targetElement="_16"> <omgdi:waypoint x="436.0" y="37.0"/>
<omgdi:waypoint x="452.0" y="161.0"/> <omgdi:waypoint x="436.0" y="70.0"/>
<omgdi:waypoint x="655.0" y="177.5"/> <bpmndi:BPMNLabel>
<bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel>
</bpmndi:BPMNLabel> </bpmndi:BPMNEdge>
</bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_20" id="BPMNEdge__20" sourceElement="_16" targetElement="_19">
<bpmndi:BPMNEdge bpmnElement="_8" id="BPMNEdge__8" sourceElement="_2" targetElement="_3"> <omgdi:waypoint x="746.0" y="205.0"/>
<omgdi:waypoint x="436.0" y="37.0"/> <omgdi:waypoint x="746.0" y="240.0"/>
<omgdi:waypoint x="436.0" y="70.0"/> <bpmndi:BPMNLabel>
<bpmndi:BPMNLabel> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel>
</bpmndi:BPMNLabel> </bpmndi:BPMNEdge>
</bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_22" id="BPMNEdge__22" sourceElement="_19" targetElement="_14">
<bpmndi:BPMNEdge bpmnElement="_20" id="BPMNEdge__20" sourceElement="_16" targetElement="_19"> <omgdi:waypoint x="730.0" y="256.0"/>
<omgdi:waypoint x="746.0" y="205.0"/> <omgdi:waypoint x="612.0" y="471.0"/>
<omgdi:waypoint x="746.0" y="240.0"/> <bpmndi:BPMNLabel>
<bpmndi:BPMNLabel> <omgdc:Bounds height="2.0" width="0.0" x="0.0" y="-1.0"/>
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> </bpmndi:BPMNLabel>
</bpmndi:BPMNLabel> </bpmndi:BPMNEdge>
</bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="_21" id="BPMNEdge__21" sourceElement="_19" targetElement="_16">
<bpmndi:BPMNEdge bpmnElement="_22" id="BPMNEdge__22" sourceElement="_19" targetElement="_14"> <omgdi:waypoint x="762.0" y="256.0"/>
<omgdi:waypoint x="730.0" y="256.0"/> <omgdi:waypoint x="865.0" y="205.0"/>
<omgdi:waypoint x="612.0" y="471.0"/> <omgdi:waypoint x="825.0" y="205.0"/>
<bpmndi:BPMNLabel> <bpmndi:BPMNLabel>
<omgdc:Bounds height="2.0" width="0.0" x="0.0" y="-1.0"/> <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel> </bpmndi:BPMNLabel>
</bpmndi:BPMNEdge> </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_21" id="BPMNEdge__21" sourceElement="_19" targetElement="_16"> </bpmndi:BPMNPlane>
<omgdi:waypoint x="762.0" y="256.0"/> </bpmndi:BPMNDiagram>
<omgdi:waypoint x="865.0" y="205.0"/> </definitions>
<omgdi:waypoint x="825.0" y="205.0"/>
<bpmndi:BPMNLabel>
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>

View File

@ -22,8 +22,8 @@
<div class="layui-card-body" style="padding: 15px;"> <div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm"> <form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">1级区域</label> <label class="layui-form-label">区域</label>
<div class="layui-input-block layui-form" id="area1SelectTemplateBox" lay-filter="area1SelectTemplateBox"></div> <div class="layui-inline layui-form" id="area1SelectTemplateBox" lay-filter="area1SelectTemplateBox"></div>
<script id="area1SelectTemplate" type="text/html"> <script id="area1SelectTemplate" type="text/html">
<select id="area1" name="area1" lay-filter="area1"> <select id="area1" name="area1" lay-filter="area1">
<option value="">请选择1级区域</option> <option value="">请选择1级区域</option>
@ -32,10 +32,7 @@
{{# } }} {{# } }}
</select> </select>
</script> </script>
</div> <div class="layui-inline layui-form" id="area2SelectTemplateBox" lay-filter="area2SelectTemplateBox"></div>
<div class="layui-form-item">
<label class="layui-form-label">2级区域</label>
<div class="layui-input-block layui-form" id="area2SelectTemplateBox" lay-filter="area2SelectTemplateBox"></div>
<script id="area2SelectTemplate" type="text/html"> <script id="area2SelectTemplate" type="text/html">
<select id="area2" name="area2" lay-filter="area2"> <select id="area2" name="area2" lay-filter="area2">
<option value="">请选择2级区域</option> <option value="">请选择2级区域</option>
@ -44,10 +41,7 @@
{{# } }} {{# } }}
</select> </select>
</script> </script>
</div> <div class="layui-inline layui-form" id="area3SelectTemplateBox" lay-filter="area3SelectTemplateBox"></div>
<div class="layui-form-item">
<label class="layui-form-label">3级区域</label>
<div class="layui-input-block layui-form" id="area3SelectTemplateBox" lay-filter="area3SelectTemplateBox"></div>
<script id="area3SelectTemplate" type="text/html"> <script id="area3SelectTemplate" type="text/html">
<select id="area3" name="area3" lay-filter="area3"> <select id="area3" name="area3" lay-filter="area3">
<option value="">请选择3级区域</option> <option value="">请选择3级区域</option>
@ -56,10 +50,7 @@
{{# } }} {{# } }}
</select> </select>
</script> </script>
</div> <div class="layui-inline layui-form" id="area4SelectTemplateBox" lay-filter="area4SelectTemplateBox"></div>
<div class="layui-form-item">
<label class="layui-form-label">4级区域</label>
<div class="layui-input-block layui-form" id="area4SelectTemplateBox" lay-filter="area4SelectTemplateBox"></div>
<script id="area4SelectTemplate" type="text/html"> <script id="area4SelectTemplate" type="text/html">
<select id="area4" name="area4" lay-filter="area4"> <select id="area4" name="area4" lay-filter="area4">
<option value="">请选择4级区域</option> <option value="">请选择4级区域</option>
@ -68,10 +59,7 @@
{{# } }} {{# } }}
</select> </select>
</script> </script>
</div> <div class="layui-inline layui-form" id="area5SelectTemplateBox" lay-filter="area5SelectTemplateBox"></div>
<div class="layui-form-item">
<label class="layui-form-label">5级区域</label>
<div class="layui-input-block layui-form" id="area5SelectTemplateBox" lay-filter="area5SelectTemplateBox"></div>
<script id="area5SelectTemplate" type="text/html"> <script id="area5SelectTemplate" type="text/html">
<select id="area5" name="area5"> <select id="area5" name="area5">
<option value="">请选择5级区域</option> <option value="">请选择5级区域</option>
@ -106,7 +94,6 @@
</div> </div>
</div> </div>
<div class="layui-form-item layui-form-text"> <div class="layui-form-item layui-form-text">
<label class="layui-form-label">检查项</label>
<div class="layui-input-block" id="checkItemTemplateBox"></div> <div class="layui-input-block" id="checkItemTemplateBox"></div>
<script id="checkItemTemplate" type="text/html"> <script id="checkItemTemplate" type="text/html">
<table class="layui-table"> <table class="layui-table">
@ -376,6 +363,7 @@
// 提交表单 // 提交表单
form.on('submit(submitForm)', function(formData) { form.on('submit(submitForm)', function(formData) {
var field = formData.field; var field = formData.field;
// 获取隐患项列表
var hdFieldArray = []; var hdFieldArray = [];
for(var i in field) { for(var i in field) {
if(i.indexOf('hd_') > -1) { if(i.indexOf('hd_') > -1) {
@ -386,9 +374,48 @@
delete field[i]; delete field[i];
} }
} }
console.log(hdFieldArray); // 筛选隐藏项
console.log(field); var hiddenDangerReports = [];
return; var temp;
for(var i = 0, item; item = hdFieldArray[i]; i++) {
var hiddenDangerReportArray = item.k.split('_');
var checkItemId = hiddenDangerReportArray[2];
var removeItemCount = 0;
var hiddenDangerReport = {
checkItemId: checkItemId
};
for(var j = 0, checkItem; checkItem = hdFieldArray[j]; j++) {
var checkItemKey = checkItem.k;
if(checkItemKey.indexOf(checkItemId) > -1) {
if(checkItemKey.indexOf('checkResult') > -1) {
hiddenDangerReport.checkResult = checkItem.v;
hdFieldArray.splice(j, 1);
j--;
removeItemCount++;
} else if(checkItemKey.indexOf('immediatelyChangeType') > -1) {
hiddenDangerReport.immediatelyChangeType = checkItem.v;
hdFieldArray.splice(j, 1);
j--;
removeItemCount++;
} else if(checkItemKey.indexOf('rectificationDays') > -1) {
hiddenDangerReport.rectificationDays = checkItem.v;
hdFieldArray.splice(j, 1);
j--;
removeItemCount++;
} else if(checkItemKey.indexOf('scenePhotos') > -1) {
hiddenDangerReport.scenePhotos = checkItem.v;
hdFieldArray.splice(j, 1);
j--;
removeItemCount++;
}
}
}
hiddenDangerReports.push(hiddenDangerReport);
if(removeItemCount > 0) {
i--;
}
}
field.hiddenDangerReports = hiddenDangerReports;
top.dialog.confirm(top.dataMessage.commit, function(index) { top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index); top.dialog.close(index);
var loadLayerIndex; var loadLayerIndex;