Sfoglia il codice sorgente

教务处sop流程更新,加入扫描和扫描+阅卷

wangliang 1 anno fa
parent
commit
4f3a4ea554

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


+ 11 - 0
sop-business/src/main/java/com/qmth/sop/business/entity/TBSopInfoDetail.java

@@ -44,6 +44,9 @@ public class TBSopInfoDetail implements Serializable {
     @ApiModelProperty(value = "助理实施工程师id数组")
     @ApiModelProperty(value = "助理实施工程师id数组")
     private String assistantEngineerUserIds;
     private String assistantEngineerUserIds;
 
 
+    @ApiModelProperty(value = "之后是否由区域协调人替换实施工程师,true:是,false:不是")
+    private Boolean afterRegionToEnginess = false;
+
     public TBSopInfoDetail() {
     public TBSopInfoDetail() {
 
 
     }
     }
@@ -68,6 +71,14 @@ public class TBSopInfoDetail implements Serializable {
         this.assistantEngineerUserIds = assistantEngineerUserIds;
         this.assistantEngineerUserIds = assistantEngineerUserIds;
     }
     }
 
 
+    public Boolean getAfterRegionToEnginess() {
+        return afterRegionToEnginess;
+    }
+
+    public void setAfterRegionToEnginess(Boolean afterRegionToEnginess) {
+        this.afterRegionToEnginess = afterRegionToEnginess;
+    }
+
     public Long getLeadId() {
     public Long getLeadId() {
         return leadId;
         return leadId;
     }
     }

+ 57 - 7
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -97,6 +97,9 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
     @Resource
     @Resource
     TBSopPlanDateLogService tbSopPlanDateLogService;
     TBSopPlanDateLogService tbSopPlanDateLogService;
 
 
+    @Resource
+    TBUserArchivesService tbUserArchivesService;
+
     /**
     /**
      * 查询动态sop表名是否存在
      * 查询动态sop表名是否存在
      *
      *
@@ -333,6 +336,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         if (flowApproveParam.getApprove() != FlowApprovePassEnum.DRAFT) {
         if (flowApproveParam.getApprove() != FlowApprovePassEnum.DRAFT) {
             map.put(SystemConstant.CRM_INFO, crmProjectResult);
             map.put(SystemConstant.CRM_INFO, crmProjectResult);
             map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
             map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
+            map.put(SystemConstant.SOURCE, "sopApprove");
             tbSopInfoService.saveJobRemind(map);
             tbSopInfoService.saveJobRemind(map);
         }
         }
         TFFlowApprove tfFlowApprove = (TFFlowApprove) map.get(SystemConstant.FLOW_APPROVE);
         TFFlowApprove tfFlowApprove = (TFFlowApprove) map.get(SystemConstant.FLOW_APPROVE);
@@ -623,7 +627,11 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                     approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getLeadId()), String.valueOf(tbSopInfoDetail.getEngineerUserId()));
                     approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getLeadId()), String.valueOf(tbSopInfoDetail.getEngineerUserId()));
                 }
                 }
             } else {
             } else {
-                approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getEngineerUserId()));
+                if (flowTaskResult.getSetup().intValue() >= 8 && tbSopInfoDetail.getAfterRegionToEnginess()) {
+                    approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getRegionUserId()));
+                } else {
+                    approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getEngineerUserId()));
+                }
             }
             }
         } else if (type == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop流程待审核人
         } else if (type == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop流程待审核人
             if (flowTaskResult.getSetup().intValue() == 1) {
             if (flowTaskResult.getSetup().intValue() == 1) {
@@ -748,6 +756,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         if (approve != FlowApprovePassEnum.DRAFT) {
         if (approve != FlowApprovePassEnum.DRAFT) {
             map.put(SystemConstant.CRM_INFO, crmProjectResult);
             map.put(SystemConstant.CRM_INFO, crmProjectResult);
             map.put(SystemConstant.SOP_ID, null);
             map.put(SystemConstant.SOP_ID, null);
+            map.put(SystemConstant.SOURCE, "sopApplyOrPublish");
             tbSopInfoService.saveJobRemind(map);
             tbSopInfoService.saveJobRemind(map);
         }
         }
 
 
@@ -817,18 +826,58 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
                     FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
                     FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
                     processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SCAN_END_TIME.getKey());
                     processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SCAN_END_TIME.getKey());
                     execField = ProcessLimitedEnum.SCAN_END_TIME.getKey();
                     execField = ProcessLimitedEnum.SCAN_END_TIME.getKey();
-                } else if (tfFlowApprove.getSetup().intValue() == 8) {//评卷准备
+                } else if (tfFlowApprove.getSetup().intValue() == 8) {//设备入库登记
+                    FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
+                    String source = (String) map.get(SystemConstant.SOURCE);
+                    //审批过程中,如果外包服务范围为"仅扫描",则释放实施工程师资源,后续有区域协调人兼任
+                    if (Objects.nonNull(source) && Objects.equals(source, "sopApprove")) {
+                        List<FlowFormWidgetResult> formProperty = flowTaskResult.getFormProperty();
+                        Long engineerUserId = null;
+                        for (FlowFormWidgetResult f : formProperty) {
+                            if (f.getFormId().contains(SystemConstant.THIRD_SERVICE_REGION_CB) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {
+                                JSONObject jsonObject = JSONObject.parseObject(f.getValue());
+                                String value = jsonObject.getString(SystemConstant.VALUE);
+                                if (Objects.nonNull(value) && Objects.nonNull(sopId) && value.equals("SCAN")) {
+                                    TBSopInfoDetail tbSopInfoDetail = tbSopInfoDetailService.getOne(new QueryWrapper<TBSopInfoDetail>().lambda().eq(TBSopInfoDetail::getSopInfoId, sopId));
+                                    engineerUserId = tbSopInfoDetail.getEngineerUserId();
+                                    tbSopInfoDetail.setAfterRegionToEnginess(true);
+                                    tbSopInfoDetailService.updateById(tbSopInfoDetail);
+                                    break;
+                                }
+                            }
+                        }
+                        if (Objects.nonNull(engineerUserId)) {
+                            List<Map<String, Object>> sopPassageMap = this.findSopPassage(null);
+                            if (!CollectionUtils.isEmpty(sopPassageMap)) {
+                                for (Map m : sopPassageMap) {
+                                    String engineerUserStr = Objects.nonNull(m) && Objects.nonNull(m.get("engineerUserIds")) ? m.get("engineerUserIds").toString() : null;
+                                    if (Objects.nonNull(engineerUserStr)) {
+                                        String[] strs = engineerUserStr.split(",");
+                                        Set<String> set = new HashSet<>(Arrays.asList(strs));
+                                        if (!set.contains(engineerUserId)) {
+                                            TBUserArchives tbUserArchives = tbUserArchivesService.findByUserId(engineerUserId);
+                                            if (Objects.nonNull(tbUserArchives)) {
+                                                tbUserArchives.setStatus(UserArchivesStatusEnum.FREE);
+                                                tbUserArchives.updateInfo(sysUser.getId());
+                                                tbUserArchivesService.updateById(tbUserArchives);
+                                            }
+                                        }
+                                        break;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey());
+                    execField = ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey();
+                } else if (tfFlowApprove.getSetup().intValue() == 9) {//评卷准备
                     FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
                     FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
                     processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.MARK_START_TIME.getKey());
                     processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.MARK_START_TIME.getKey());
                     execField = ProcessLimitedEnum.MARK_START_TIME.getKey();
                     execField = ProcessLimitedEnum.MARK_START_TIME.getKey();
-                } else if (tfFlowApprove.getSetup().intValue() == 9) {//评卷收尾
+                } else if (tfFlowApprove.getSetup().intValue() == 10) {//评卷收尾
                     FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
                     FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
                     processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.MARK_END_TIME.getKey());
                     processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.MARK_END_TIME.getKey());
                     execField = ProcessLimitedEnum.MARK_END_TIME.getKey();
                     execField = ProcessLimitedEnum.MARK_END_TIME.getKey();
-                } else if (tfFlowApprove.getSetup().intValue() == 10) {//设备入库登记
-                    FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
-                    processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey());
-                    execField = ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey();
                 }
                 }
             } else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop
             } else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop
                 if (tfFlowApprove.getSetup().intValue() == 2) {//项目关键信息
                 if (tfFlowApprove.getSetup().intValue() == 2) {//项目关键信息
@@ -1040,6 +1089,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
             map.put(SystemConstant.FLOW_APPROVE_LOG, tfFlowLog);
             map.put(SystemConstant.FLOW_APPROVE_LOG, tfFlowLog);
             map.put(SystemConstant.CRM_INFO, crmProjectResult);
             map.put(SystemConstant.CRM_INFO, crmProjectResult);
             map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
             map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
+            map.put(SystemConstant.SOURCE, "save");
             tbSopInfoService.saveJobRemind(map);
             tbSopInfoService.saveJobRemind(map);
 
 
             FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
             FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);

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

@@ -2232,4 +2232,38 @@ update t_b_sop_info t set t.product_id = 2
 where t.product_id = 1;
 where t.product_id = 1;
 
 
 update t_b_crm t set t.product_id = 2
 update t_b_crm t set t.product_id = 2
-where t.product_id = 1;
+where t.product_id = 1;
+
+--2023.12.01update
+ALTER TABLE t_b_sop_info_detail ADD after_region_to_enginess TINYINT DEFAULT 0 NULL COMMENT '之后是否由区域协调人替换实施工程师,true:是,false:不是';
+
+UPDATE t_d_form_widget
+SET code='FORM_GROUP_TITLE', `type`='FORM', form_id='mark_model_title', form_name='mark_model_title', title='评卷模式确认', input_type='STRING', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=9, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=78;
+UPDATE t_d_form_widget
+SET code='RADIO', `type`='FORM', form_id='mark_model_radio', form_name='mark_model_radio', 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=12, sub_title=NULL, `options`='[{"value":"TRAIL","label":"轨迹模式"},{"value":"NORMAL","label":"普通模式"}]', flow_type='OFFICE_SOP_FLOW', form_setup=9, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=79;
+UPDATE t_d_form_widget
+SET code='FORM_GROUP_TITLE', `type`='FORM', form_id='mark_params_title', form_name='mark_params_title', title='评卷参数核对', input_type='STRING', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=9, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=80;
+UPDATE t_d_form_widget
+SET code='CHECKBOX', `type`='FORM', form_id='mark_params_cb', form_name='mark_params_cb', 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=12, sub_title=NULL, `options`='[{"value":"1","label":"1、核查每个科目的满分是否正确(大部分科目都是100分)"},{"value":"2","label":"2、核对客观题标答以及分数是否录入正确、多选题判分规则(漏选是否得分、任选得分)"},{"value":"3","label":"检查所有科目结构和分组是否全部导入。(评卷管理>评卷进度查看分组状态)"}]', flow_type='OFFICE_SOP_FLOW', form_setup=9, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=81;
+UPDATE t_d_form_widget
+SET code='FORM_GROUP_TITLE', `type`='FORM', form_id='mark_submit_title', form_name='mark_submit_title', title='成绩提交核查', input_type='STRING', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=10, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=82;
+UPDATE t_d_form_widget
+SET code='CHECKBOX', `type`='FORM', form_id='mark_submit_cb', form_name='mark_submit_cb', 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=12, sub_title=NULL, `options`='[{"value":"1","label":"1、是否已核对不缺考、客观题为0分的情况"},{"value":"2","label":"2、是否已核对主观题为0、客观题有分的情况"},{"value":"3","label":"3、是否检查客观题小题得分率低于20%的情况"},{"value":"4","label":"4、核对导出成绩表数据条数是否与考生表数量一致,不能带有“未导出全量数据”字样;请填写导出成绩数量以及完成时间"},{"value":"5","label":"5、核对导出图片工具是否正常运行"}]', flow_type='OFFICE_SOP_FLOW', form_setup=10, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=83;
+UPDATE t_d_form_widget
+SET code='FILE', `type`='FORM', form_id='upload_success_photos', form_name='upload_success_photos', title='上传验收报告(纸质)拍照', input_type='ARRAY', required=0, readable=0, writable=1, visable=1, `scale`=NULL, `length`=5, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=10, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=84;
+UPDATE t_d_form_widget
+SET code='ONLY_TITLE', `type`='FORM', form_id='device_in_out_label', form_name='device_in_out_label', title='设备入库', input_type='STRING', required=0, readable=1, writable=0, 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=8, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=85;
+UPDATE t_d_form_widget
+SET code='DATE', `type`='FORM', form_id='device_in_time', form_name='device_in_time', title='设备入库时间', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format='yyyy-MM-dd', span=6, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=8, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=86;
+UPDATE t_d_form_widget
+SET code='DEVICE_IN_TABLE', `type`='FORM', form_id='device_in_table', form_name='device_in_table', 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=12, sub_title=NULL, `options`=NULL, flow_type='OFFICE_SOP_FLOW', form_setup=8, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
+WHERE id=87;

+ 41 - 21
sop-business/src/main/resources/mapper/TBSopInfoMapper.xml

@@ -185,7 +185,7 @@
             <if test="userId != null and userId != ''">
             <if test="userId != null and userId != ''">
                 <choose>
                 <choose>
                     <when test="roleType != null and roleType != '' and roleType == 'EFFECT_ENGINEER'">
                     <when test="roleType != null and roleType != '' and roleType == 'EFFECT_ENGINEER'">
-                        and (tbsid.engineer_user_id is not null and tbsid.engineer_user_id = #{userId})
+                        and (tbsid.engineer_user_id is not null and tbsid.engineer_user_id = #{userId} and tbsid.after_region_to_enginess = 0)
                     </when>
                     </when>
                     <otherwise>
                     <otherwise>
                         and (tbsid.assistant_engineer_user_ids is not null and FIND_IN_SET(#{userId},tbsid.assistant_engineer_user_ids))
                         and (tbsid.assistant_engineer_user_ids is not null and FIND_IN_SET(#{userId},tbsid.assistant_engineer_user_ids))
@@ -220,7 +220,7 @@
             <if test="userId != null and userId != ''">
             <if test="userId != null and userId != ''">
                 <choose>
                 <choose>
                     <when test="roleType != null and roleType != '' and roleType == 'EFFECT_ENGINEER'">
                     <when test="roleType != null and roleType != '' and roleType == 'EFFECT_ENGINEER'">
-                        and (tbsid.engineer_user_id is not null and tbsid.engineer_user_id = #{userId})
+                        and (tbsid.engineer_user_id is not null and tbsid.engineer_user_id = #{userId} and tbsid.after_region_to_enginess = 0)
                     </when>
                     </when>
                     <otherwise>
                     <otherwise>
                         and (tbsid.assistant_engineer_user_ids is not null and FIND_IN_SET(#{userId},tbsid.assistant_engineer_user_ids))
                         and (tbsid.assistant_engineer_user_ids is not null and FIND_IN_SET(#{userId},tbsid.assistant_engineer_user_ids))
@@ -247,28 +247,48 @@
 
 
     <select id="findSopPassage" resultType="java.util.Map">
     <select id="findSopPassage" resultType="java.util.Map">
         select
         select
+        group_concat(distinct t.regionUserIds) as regionUserIds,
+        group_concat(distinct t.engineerUserIds) as engineerUserIds,
+        group_concat(distinct t.assistantEngineerUserIds) as assistantEngineerUserIds
+        from
+        (select
             group_concat(distinct tbsid.region_user_id) as regionUserIds,
             group_concat(distinct tbsid.region_user_id) as regionUserIds,
             group_concat(distinct tbsid.engineer_user_id) as engineerUserIds,
             group_concat(distinct tbsid.engineer_user_id) as engineerUserIds,
             group_concat(distinct tbsid.assistant_engineer_user_ids) as assistantEngineerUserIds
             group_concat(distinct tbsid.assistant_engineer_user_ids) as assistantEngineerUserIds
-        from
-            t_b_sop_info_detail tbsid
+        from t_b_sop_info_detail tbsid
+        where
+        exists(
+        select tbsi.id from t_b_sop_info tbsi
+        left join t_f_custom_flow_entity tfcfe on tfcfe.code = tbsi.sop_no
+        left join t_f_flow_approve tffa on tffa.flow_id = tfcfe.flow_id
+        <where> 1 = 1
+        <if test="serviceId != null and serviceId != ''">
+            and tbsi.service_id = #{serviceId}
+        </if>
+            and tbsi.status = 'START'
+            and tffa.status not in('FINISH', 'END')
+            and tbsid.sop_info_id = tbsi.id
+            and tbsid.after_region_to_enginess = 0
+        </where>)
+        union all
+        select
+            group_concat(distinct tbsid.region_user_id) as regionUserIds,
+            null as engineerUserIds,
+            group_concat(distinct tbsid.assistant_engineer_user_ids) as assistantEngineerUserIds
+        from t_b_sop_info_detail tbsid
         where
         where
-            exists(
-                    select
-                        tbsi.id
-                    from
-                        t_b_sop_info tbsi
-                            left join t_f_custom_flow_entity tfcfe on
-                            tfcfe.code = tbsi.sop_no
-                            left join t_f_flow_approve tffa on
-                            tffa.flow_id = tfcfe.flow_id
-                    <where>
-                        <if test="serviceId != null and serviceId != ''">
-                            and tbsi.service_id = #{serviceId}
-                        </if>
-                      and tbsi.status = 'START'
-                      and tffa.status not in('FINISH', 'END')
-                      and tbsid.sop_info_id = tbsi.id)
-                    </where>
+        exists(
+        select tbsi.id from t_b_sop_info tbsi
+        left join t_f_custom_flow_entity tfcfe on tfcfe.code = tbsi.sop_no
+        left join t_f_flow_approve tffa on tffa.flow_id = tfcfe.flow_id
+        <where> 1 = 1
+        <if test="serviceId != null and serviceId != ''">
+            and tbsi.service_id = #{serviceId}
+        </if>
+            and tbsi.status = 'START'
+            and tffa.status not in('FINISH', 'END')
+            and tbsid.sop_info_id = tbsi.id
+            and tbsid.after_region_to_enginess = 1
+        </where>)) t
     </select>
     </select>
 </mapper>
 </mapper>

+ 2 - 0
sop-common/src/main/java/com/qmth/sop/common/contant/SystemConstant.java

@@ -139,6 +139,7 @@ public class SystemConstant {
     public static final String APPROVE_RADIO_REGION = "approve_radio_region";
     public static final String APPROVE_RADIO_REGION = "approve_radio_region";
     public static final String APPROVE_REMARK_REGION = "approve_remark_region";
     public static final String APPROVE_REMARK_REGION = "approve_remark_region";
     public static final String SIGN_REGION = "sign_region";
     public static final String SIGN_REGION = "sign_region";
+    public static final String THIRD_SERVICE_REGION_CB = "third_service_region_cb";
 
 
     public static final String DEVICE_OUT_TIME = "device_out_time";//设备出库时间
     public static final String DEVICE_OUT_TIME = "device_out_time";//设备出库时间
     public static final String DEVICE_OUT_TABLE = "device_out_table";//设备出库
     public static final String DEVICE_OUT_TABLE = "device_out_table";//设备出库
@@ -332,6 +333,7 @@ public class SystemConstant {
     public static final String FLOW_SYS_USER = "sysUser";
     public static final String FLOW_SYS_USER = "sysUser";
     public static final String CRM_INFO = "crmInfo";
     public static final String CRM_INFO = "crmInfo";
     public static final String SOP_ID = "sopId";
     public static final String SOP_ID = "sopId";
+    public static final String SOURCE = "source";
 
 
     /**
     /**
      * 锁
      * 锁

+ 2 - 0
sop-common/src/main/java/com/qmth/sop/common/enums/RoleTypeEnum.java

@@ -32,6 +32,8 @@ public enum RoleTypeEnum {
 
 
     THIRD_PMO("乙方总负责人", "系统角色"),
     THIRD_PMO("乙方总负责人", "系统角色"),
 
 
+    DEVICE_DELIVERY("设备发货员", "系统角色"),
+
     DEFINED("自定义", "自定义角色");
     DEFINED("自定义", "自定义角色");
 
 
     RoleTypeEnum(String desc, String title) {
     RoleTypeEnum(String desc, String title) {