wangliang před 9 měsíci
rodič
revize
a33b2f884d

+ 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;

+ 40 - 0
sop-api/install/mysql/upgrade/1.1.2.sql

@@ -0,0 +1,40 @@
+USE sop_db;
+
+-- 2024-09-18
+UPDATE sys_privilege
+SET name='数据驾驶舱', url='dataCockpit', `type`='MENU', parent_id=NULL, `sequence`=11, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1
+WHERE id=1100;
+UPDATE sys_privilege
+SET name='智能客服', url='aiCustomerManage', `type`='MENU', parent_id=NULL, `sequence`=12, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1
+WHERE id=2053;
+UPDATE sys_privilege
+SET name='流程检查统计', url='FlowCheck', `type`='MENU', parent_id=1100, `sequence`=3, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1
+WHERE id=1101;
+UPDATE sys_privilege
+SET name='服务单元分析', url='serviceAnalyse', `type`='MENU', parent_id=1100, `sequence`=1, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1
+WHERE id=1102;
+UPDATE sys_privilege
+SET name='SOP预警监控', url='sopAnalyse', `type`='MENU', parent_id=1100, `sequence`=4, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1
+WHERE id=1103;
+UPDATE sys_privilege
+SET name='项目进度分析', url='sopSchedule', `type`='MENU', parent_id=1100, `sequence`=2, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1
+WHERE id=1104;
+UPDATE sys_privilege
+SET name='资源保障分析', url='deviceMonitor', `type`='MENU', parent_id=1100, `sequence`=5, property=NULL, related='1107,1108,1109,1110', enable=1, default_auth=0, front_display=1
+WHERE id=1105;
+UPDATE sys_privilege
+SET name='质量监控分析', url='qualityAnalyse', `type`='MENU', parent_id=1100, `sequence`=6, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1
+WHERE id=1106;
+
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1107, '设备商供货数量分布接口', '/api/admin/resource/security/device_supplier_count/report', 'URL', 1105, 1, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1108, '人力数量分布接口', '/api/admin/resource/security/human_supplier_count/report', 'URL', 1105, 1, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1109, '大区考勤异常数统计接口', '/api/admin/resource/security/area_ding_exception_count/report', 'URL', 1105, 1, 'AUTH', NULL, 1, 1, 1);
+INSERT INTO sys_privilege
+(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
+VALUES(1110, '人力供应商考勤异常数统计', '/api/admin/resource/security/human_ding_exception_count/report', 'URL', 1105, 1, 'AUTH', NULL, 1, 1, 1);

+ 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 - 0
sop-business/src/main/resources/db/log/wangliang_update_log.sql

@@ -351,6 +351,15 @@ 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;
 
+-- 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;
+
+-- 1.1.2
 -- 2024-09-18
 UPDATE sys_privilege
 SET name='数据驾驶舱', url='dataCockpit', `type`='MENU', parent_id=NULL, `sequence`=11, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1