wangliang 9 月之前
父节点
当前提交
d868b6b993

+ 9 - 1
sop-api/install/mysql/upgrade/1.1.1.sql

@@ -789,4 +789,12 @@ SET code='TEXT', `type`='TABLE', form_id='school_job', form_name='school_job', t
 WHERE id=115;
 UPDATE t_d_form_widget
 SET code='TEXT', `type`='TABLE', form_id='school_tel', form_name='school_tel', title='项目联系人表格_电话输入框', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=28
-WHERE id=116;
+WHERE id=116;
+
+-- 2024-09-20
+UPDATE sys_privilege
+SET name='人员配置', url='Allocation', `type`='LINK', parent_id=41, `sequence`=1, property='AUTH', related='3088,2061', enable=1, default_auth=0, front_display=1
+WHERE id=3089;
+UPDATE sys_privilege
+SET name='人员配置', url='Allocation', `type`='LINK', parent_id=42, `sequence`=1, property='AUTH', related='3088,2061', enable=1, default_auth=0, front_display=1
+WHERE id=3090;

+ 25 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -117,6 +117,9 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
     @Resource
     TBDingSubmitService tbDingSubmitService;
 
+    @Resource
+    TBDeviceDeliveryService tbDeviceDeliveryService;
+
     /**
      * 查询动态sop表名是否存在
      *
@@ -852,6 +855,28 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                 }
                 flowTaskResult.setFormProperty(flowFormWidgetResultList);
                 flowApproveParam.setFormProperties(JacksonUtil.parseJson(flowTaskResult));
+            } else if (flowTaskResult.getSetup().intValue() == 10
+                    && flowApproveParam.getApprove() == FlowApprovePassEnum.PASS) {
+                //设备签收登记列表查询
+                List<DeviceSignResult> deviceSignResultList = tbDeviceDeliveryService.signList(
+                        tfCustomFlowEntity.getCrmNo());
+                if (!CollectionUtils.isEmpty(deviceSignResultList)) {
+                    List<DeviceSignResult> tempList = deviceSignResultList.stream()
+                            .filter(s -> s.getStatus() == DeviceDeliveryStatusEnum.USING).collect(Collectors.toList());
+                    if (!CollectionUtils.isEmpty(tempList)) {
+                        throw ExceptionResultEnum.ERROR.exception("有设备在使用中,请处理后再提交!");
+                    }
+                }
+                //设备去处登记列表查询
+                List<DevicePlaceResult> devicePlaceResultList = tbDeviceDeliveryService.placeList(
+                        tfCustomFlowEntity.getCrmNo());
+                if (!CollectionUtils.isEmpty(devicePlaceResultList)) {
+                    List<DevicePlaceResult> tempList = devicePlaceResultList.stream()
+                            .filter(s -> s.getStatus() == DeviceDeliveryStatusEnum.USING).collect(Collectors.toList());
+                    if (!CollectionUtils.isEmpty(tempList)) {
+                        throw ExceptionResultEnum.ERROR.exception("有设备在使用中,请处理后再提交!");
+                    }
+                }
             }
         }
 

+ 9 - 1
sop-business/src/main/resources/db/log/wangliang_update_log.sql

@@ -349,4 +349,12 @@ SET code='TEXT', `type`='TABLE', form_id='school_job', form_name='school_job', t
 WHERE id=115;
 UPDATE t_d_form_widget
 SET code='TEXT', `type`='TABLE', form_id='school_tel', form_name='school_tel', title='项目联系人表格_电话输入框', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=28
-WHERE id=116;
+WHERE id=116;
+
+-- 2024-09-20
+UPDATE sys_privilege
+SET name='人员配置', url='Allocation', `type`='LINK', parent_id=41, `sequence`=1, property='AUTH', related='3088,2061', enable=1, default_auth=0, front_display=1
+WHERE id=3089;
+UPDATE sys_privilege
+SET name='人员配置', url='Allocation', `type`='LINK', parent_id=42, `sequence`=1, property='AUTH', related='3088,2061', enable=1, default_auth=0, front_display=1
+WHERE id=3090;