Browse Source

通过表单id查询流程记录

lamphua 10 months ago
parent
commit
73e497b79e

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceApprovalController.java View File

168
         }
168
         }
169
         if (formDataJson.getDate("returnDate") != null) {
169
         if (formDataJson.getDate("returnDate") != null) {
170
             cmcDeviceApproval.setRemark(formDataJson.getString("remark"));
170
             cmcDeviceApproval.setRemark(formDataJson.getString("remark"));
171
-            if (formDataJson.getJSONArray("repairDevices").size() > 0) {
171
+            if (formDataJson.getDate("repairDevices") != null && formDataJson.getJSONArray("repairDevices").size() > 0) {
172
                 String deviceString = formDataJson.getString("repairDevices").substring(1, formDataJson.getString("repairDevices").length() - 1);
172
                 String deviceString = formDataJson.getString("repairDevices").substring(1, formDataJson.getString("repairDevices").length() - 1);
173
                 cmcDeviceApproval.setRepairDevices(deviceString);
173
                 cmcDeviceApproval.setRepairDevices(deviceString);
174
                 String[] devices = deviceString.split(",");
174
                 String[] devices = deviceString.split(",");
178
                     cmcDeviceService.updateCmcDevice(cmcDevice);
178
                     cmcDeviceService.updateCmcDevice(cmcDevice);
179
                 }
179
                 }
180
             }
180
             }
181
-            if (formDataJson.getJSONArray("returnDevices").size() > 0) {
181
+            if (formDataJson.getDate("returnDevices") != null && formDataJson.getJSONArray("returnDevices").size() > 0) {
182
                 String deviceString = formDataJson.getString("returnDevices").substring(1, formDataJson.getString("returnDevices").length() - 1);
182
                 String deviceString = formDataJson.getString("returnDevices").substring(1, formDataJson.getString("returnDevices").length() - 1);
183
                 cmcDeviceApproval.setReturnDevices(deviceString);
183
                 cmcDeviceApproval.setReturnDevices(deviceString);
184
                 String[] devices = deviceString.split(",");
184
                 String[] devices = deviceString.split(",");

+ 2
- 2
oa-back/ruoyi-flowable/src/main/java/com/ruoyi/flowable/service/impl/FlowTaskServiceImpl.java View File

1392
      * @return
1392
      * @return
1393
      */
1393
      */
1394
     @Override
1394
     @Override
1395
-    public AjaxResult flowXmlAndNodeByFormIdAndName(String formId, String name) {
1395
+    public AjaxResult flowXmlAndNodeByFormIdAndName(String formId, String id) {
1396
         try {
1396
         try {
1397
             List<FlowVarInst> flowVarInst = flowVarInstMapper.selectProcInstByVar(formId);
1397
             List<FlowVarInst> flowVarInst = flowVarInstMapper.selectProcInstByVar(formId);
1398
-            List<FlowProcDefDto> flowProcDefList = flowDeployMapper.selectDeployList(name);
1398
+            List<FlowProcDefDto> flowProcDefList = flowDeployMapper.selectDeployListById(id);
1399
             AjaxResult result = flowXmlAndNode(flowVarInst.get(0).getProcInstId(), flowProcDefList.get(0).getDeploymentId());
1399
             AjaxResult result = flowXmlAndNode(flowVarInst.get(0).getProcInstId(), flowProcDefList.get(0).getDeploymentId());
1400
             if (result.isSuccess()) {
1400
             if (result.isSuccess()) {
1401
                 result.put("procInsId", flowVarInst.get(0).getProcInstId());
1401
                 result.put("procInsId", flowVarInst.get(0).getProcInstId());

+ 1
- 1
oa-back/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java View File

49
 
49
 
50
     protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND;
50
     protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND;
51
 
51
 
52
-    private static final Long MILLIS_MINUTE_TEN = 20 * 60 * 1000L;
52
+    private static final Long MILLIS_MINUTE_TEN = 120 * 60 * 1000L;
53
 
53
 
54
     @Autowired
54
     @Autowired
55
     private RedisCache redisCache;
55
     private RedisCache redisCache;

+ 7
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FlowDeployMapper.java View File

19
      * @return
19
      * @return
20
      */
20
      */
21
     List<FlowProcDefDto> selectDeployList(String name);
21
     List<FlowProcDefDto> selectDeployList(String name);
22
+
23
+    /**
24
+     * 流程定义列表
25
+     * @param id
26
+     * @return
27
+     */
28
+    List<FlowProcDefDto> selectDeployListById(String id);
22
 }
29
 }

+ 22
- 0
oa-back/ruoyi-system/src/main/resources/mapper/flowable/FlowDeployMapper.xml View File

27
         order by rd.id_ asc
27
         order by rd.id_ asc
28
     </select>
28
     </select>
29
 
29
 
30
+    <select id="selectDeployListById" resultType="com.ruoyi.system.domain.FlowProcDefDto">
31
+
32
+        SELECT
33
+            rp.id_ as id,
34
+            rp.deployment_id_ as deploymentId,
35
+            rd.name_ as name,
36
+            rd.category_ as category,
37
+            rp.key_ as flowKey,
38
+            rp.version_ as version,
39
+            rp.suspension_state_ as suspensionState,
40
+            rd.deploy_time_  as deploymentTime
41
+        FROM
42
+            ACT_RE_PROCDEF rp
43
+                LEFT JOIN ACT_RE_DEPLOYMENT rd ON rp.deployment_id_ = rd.id_
44
+        <where>
45
+            <if test="id != null and id != ''">
46
+               and rd.id_ like concat('%', #{id}, '%')
47
+            </if>
48
+        </where>
49
+        order by rd.id_ asc
50
+    </select>
51
+
30
 
52
 
31
 </mapper>
53
 </mapper>

Loading…
Cancel
Save