ソースを参照

sop人员修改

wangliang 9 ヶ月 前
コミット
abce91def1

BIN
sop-api/src/main/resources/cloudMarkSopFlow.zip


BIN
sop-api/src/main/resources/officeSopFlow.zip


+ 24 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -404,6 +404,13 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                         JSONObject jsonObject = new JSONObject();
                         jsonObject.put(SystemConstant.VALUE, tbCrmDetail.getMarkPaperEndTime());
                         f.setValue(jsonObject.toJSONString());
+                    } else if (Objects.nonNull(tbCrmDetail) && f.getFormId()
+                            .contains(ProcessLimitedEnum.REGION_MANAGER_ID.getKey())) {
+                        if (Objects.nonNull(crmProjectResult.getRegionManagerId())) {
+                            JSONObject jsonObject = new JSONObject();
+                            jsonObject.put(SystemConstant.VALUE, crmProjectResult.getRegionManagerId().toString());
+                            f.setValue(jsonObject.toJSONString());
+                        }
                     } else if (Objects.nonNull(tbCrmDetail) && f.getFormId()
                             .contains(ProcessLimitedEnum.ENGINEER_USERS_ID.getKey())) {
                         if (!CollectionUtils.isEmpty(crmProjectResult.getEngineerList())) {
@@ -414,6 +421,22 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                             jsonObject.put(SystemConstant.VALUE, list);
                             f.setValue(jsonObject.toJSONString());
                         }
+                    } else if (Objects.nonNull(tbCrmDetail) && f.getFormId()
+                            .contains(ProcessLimitedEnum.PROJECT_MANAGER_ID.getKey())) {
+                        if (!CollectionUtils.isEmpty(crmProjectResult.getProjectManagerList())) {
+                            JSONObject jsonObject = new JSONObject();
+                            jsonObject.put(SystemConstant.VALUE,
+                                    crmProjectResult.getProjectManagerList().get(0).getUserId().toString());
+                            f.setValue(jsonObject.toJSONString());
+                        }
+                    } else if (Objects.nonNull(tbCrmDetail) && f.getFormId()
+                            .contains(ProcessLimitedEnum.REGION_COORDINATOR_ID.getKey())) {
+                        if (!CollectionUtils.isEmpty(crmProjectResult.getRegionCoordinatorList())) {
+                            JSONObject jsonObject = new JSONObject();
+                            jsonObject.put(SystemConstant.VALUE,
+                                    crmProjectResult.getRegionCoordinatorList().get(0).getUserId().toString());
+                            f.setValue(jsonObject.toJSONString());
+                        }
                     }
                 }
             } else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
@@ -1678,7 +1701,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                                 Arrays.asList(crmProjectResult.getRegionCoordinatorList().get(0).getUserId()), "[系统]"));
                     }
                 }
-            } else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
+            } else {
                 if (!CollectionUtils.isEmpty(projectManagerUserIds)) {
                     allocationParams.add(
                             new AllocationParam(SopRoleTypeEnum.PROJECT_MANAGER, projectManagerUserIds, "[系统]"));

+ 29 - 0
sop-business/src/main/resources/db/log/wangliang_update_log.sql

@@ -226,3 +226,32 @@ WHERE id=203;
 
 ALTER TABLE t_b_user_archives ADD project_experience MEDIUMTEXT NULL COMMENT '项目经验';
 ALTER TABLE t_b_user_archives CHANGE project_experience project_experience MEDIUMTEXT NULL COMMENT '项目经验' AFTER enable;
+
+UPDATE t_d_form_widget
+SET code='SINGLE_SELECT', `type`='FORM', form_id='region_manager_id', form_name='region_manager_id', title='大区经理', input_type='LONG', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid='/api/admin/user/archives/allocation/can_choose?crmDetailId=#{id}&sopRoleType=REGION_MANAGER', tips=NULL, format=NULL, span=4, 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=13
+WHERE id=191;
+UPDATE t_d_form_widget
+SET code='SINGLE_SELECT', `type`='FORM', form_id='region_coordinator_id', form_name='region_coordinator_id', title='区域协调人', input_type='LONG', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid='/api/admin/user/archives/allocation/can_choose?crmDetailId=#{id}&sopRoleType=REGION_COORDINATOR', tips=NULL, format=NULL, span=4, 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=14
+WHERE id=104;
+UPDATE t_d_form_widget
+SET code='SINGLE_SELECT', `type`='FORM', form_id='project_manager_id', form_name='project_manager_id', title='项目经理', input_type='LONG', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid='/api/admin/user/archives/allocation/can_choose?crmDetailId=#{id}&sopRoleType=PROJECT_MANAGER', tips=NULL, format=NULL, span=4, 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=15
+WHERE id=106;
+UPDATE t_d_form_widget
+SET code='MULTIPLE_SELECT', `type`='FORM', form_id='engineer_users_id', form_name='engineer_users_id', title='工程师', input_type='ARRAY', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid='/api/admin/user/archives/allocation/can_choose?crmDetailId=#{id}&sopRoleType=ENGINEER', tips=NULL, format=NULL, span=4, 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=16
+WHERE id=105;
+
+INSERT INTO t_d_form_widget
+(id, code, `type`, form_id, form_name, title, input_type, required, readable, writable, visable, `scale`, `length`, binding, data_grid, tips, format, span, sub_title, `options`, flow_type, form_setup, handle, form_group, role_type, create_id, create_time)
+VALUES(197, 'SINGLE_SELECT', 'FORM', 'region_manager_id', 'region_manager_id', '大区经理', 'LONG', 0, 1, 0, 1, NULL, NULL, NULL, '/api/admin/user/archives/allocation/can_choose?crmDetailId=#{id}&sopRoleType=REGION_MANAGER', NULL, NULL, 4, NULL, NULL, 'OFFICE_SOP_FLOW', 1, 0, NULL, NULL, 1, 11);
+INSERT INTO t_d_form_widget
+(id, code, `type`, form_id, form_name, title, input_type, required, readable, writable, visable, `scale`, `length`, binding, data_grid, tips, format, span, sub_title, `options`, flow_type, form_setup, handle, form_group, role_type, create_id, create_time)
+VALUES(198, 'SINGLE_SELECT', 'FORM', 'region_coordinator_id', 'region_coordinator_id', '区域协调人', 'LONG', 0, 1, 0, 1, NULL, NULL, NULL, '/api/admin/user/archives/allocation/can_choose?crmDetailId=#{id}&sopRoleType=REGION_COORDINATOR', NULL, NULL, 4, NULL, NULL, 'OFFICE_SOP_FLOW', 1, 0, NULL, NULL, 1, 12);
+INSERT INTO t_d_form_widget
+(id, code, `type`, form_id, form_name, title, input_type, required, readable, writable, visable, `scale`, `length`, binding, data_grid, tips, format, span, sub_title, `options`, flow_type, form_setup, handle, form_group, role_type, create_id, create_time)
+VALUES(199, 'SINGLE_SELECT', 'FORM', 'project_manager_id', 'project_manager_id', '项目经理', 'LONG', 0, 1, 0, 1, NULL, NULL, NULL, '/api/admin/user/archives/allocation/can_choose?crmDetailId=#{id}&sopRoleType=PROJECT_MANAGER', NULL, NULL, 4, NULL, NULL, 'OFFICE_SOP_FLOW', 1, 0, NULL, NULL, 1, 13);
+UPDATE t_d_form_widget
+SET code='MULTIPLE_SELECT', `type`='FORM', form_id='engineer_users_id', form_name='engineer_users_id', title='工程师', input_type='ARRAY', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid='/api/admin/user/archives/allocation/can_choose?crmDetailId=#{id}&sopRoleType=ENGINEER', tips=NULL, format=NULL, span=4, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=14
+WHERE id=28;
+UPDATE t_d_form_widget
+SET code='SIGN', `type`='FORM', form_id='sign_region', form_name='sign_region', 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=6, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=15
+WHERE id=29;