Selaa lähdekoodia

Merge branch 'dev_1.1.1' into dev_1.1.2
merge

wangliang 9 kuukautta sitten
vanhempi
commit
8d000bb0af

BIN
sop-api/src/main/resources/static/crm_custom_receiver.xlsx


+ 5 - 0
sop-business/src/main/java/com/qmth/sop/business/activiti/service/impl/ActivitiServiceImpl.java

@@ -339,6 +339,11 @@ public class ActivitiServiceImpl implements ActivitiService {
                             currFlowTaskResult.getSetup(), Long.parseLong(processFlowId), Long.parseLong(task.getId()),
                             tfCustomFlowEntity.getId(),
                             StringUtils.join(approveUserIds, SystemConstant.LIST_JOIN_SPLIT));
+                    if (Objects.nonNull(flowApproveParam.getApproveRemark()) && Objects.equals(
+                            flowApproveParam.getApproveRemark(), SystemConstant.SYSTEM_AUTO_APPROVE)
+                            && !approveUserIds.contains(sysUser.getId().toString())) {
+                        tfFlowLog.setApproveId(Long.parseLong(approveUserIds.get(0)));
+                    }
                     if (flowApproveParam.getApprove() == FlowApprovePassEnum.PASS
                             || flowApproveParam.getApprove() == FlowApprovePassEnum.DRAFT
                             || flowApproveParam.getApprove() == FlowApprovePassEnum.START) {

+ 2 - 2
sop-business/src/main/java/com/qmth/sop/business/service/impl/ProjectMonitorServiceImpl.java

@@ -42,7 +42,7 @@ public class ProjectMonitorServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSo
     TBUserArchivesService tbUserArchivesService;
 
     @Resource
-    private BasicAttachmentService basicAttachmentService;
+    BasicAttachmentService basicAttachmentService;
 
     @Override
     public IPage<ProjectMonitorResult> pageProjectMonitor(Page<ProjectMonitorResult> page, Long serviceUnitId, Long customerId, CrmProcessEnum process) {
@@ -72,7 +72,7 @@ public class ProjectMonitorServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSo
 
     @Override
     public ProjectMonitorCardResult getUserCard(Long userId) {
-        TBUserArchives userArchives = tbUserArchivesService.getById(userId);
+        TBUserArchives userArchives = tbUserArchivesService.findByUserId(userId);
         if (Objects.isNull(userArchives)) {
             throw ExceptionResultEnum.ERROR.exception("人员不存在");
         }

+ 3 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBCrmServiceImpl.java

@@ -950,7 +950,9 @@ public class TBCrmServiceImpl extends ServiceImpl<TBCrmMapper, TBCrm> implements
                 customDtoList.addAll(crmCustomList);
             } else if (crmCustomList.size() > 1) {
                 CrmCustomImportDto dto = new CrmCustomImportDto();
-                dto.setCrmNo(crmCustomList.get(0).getCrmNo());
+                CrmCustomImportDto customImportDto = crmCustomList.get(0);
+                dto.setCrmNo(customImportDto.getCrmNo());
+                dto.setCustomName(customImportDto.getCustomName());
                 customDtoList.add(dto);
             }
         }

+ 8 - 4
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingApplyServiceImpl.java

@@ -310,15 +310,20 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
     @Transactional
     public Boolean updateDingExceptionTime(TBDingApply tbDingApply, DingExceptionApproveEnum dingExceptionApprove) {
         if (dingExceptionApprove == DingExceptionApproveEnum.PASS) {
-            TBDing tbDing = null;
+            String sopNo = tbDingApply.getSopNo();
+            TBDing tbDing;
             if (Objects.isNull(tbDingApply.getDingId())) {
                 String date = DateUtil.format(new Date(tbDingApply.getApplyTime()),
                         SystemConstant.DEFAULT_DATE_YMD_S_QUERY_PATTERN);
                 String[] strs = date.split("-");
                 QueryWrapper<TBDing> tbDingQueryWrapper = new QueryWrapper<>();
-                tbDingQueryWrapper.lambda().eq(TBDing::getSopNo, tbDingApply.getSopNo())
-                        .eq(TBDing::getSignYear, strs[0]).eq(TBDing::getSignDate, strs[1])
+                tbDingQueryWrapper.lambda().eq(TBDing::getSignYear, strs[0]).eq(TBDing::getSignDate, strs[1])
                         .eq(TBDing::getUserId, tbDingApply.getCreateId());
+                if (SystemConstant.strNotNull(sopNo)) {
+                    tbDingQueryWrapper.lambda().eq(TBDing::getSopNo, sopNo);
+                } else {
+                    tbDingQueryWrapper.lambda().isNull(TBDing::getSopNo);
+                }
                 if (tbDingApply.getType() == InOutTypeEnum.IN) {
                     tbDingQueryWrapper.lambda().isNull(TBDing::getSignInTime);
                 } else {
@@ -353,7 +358,6 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
                 if (CollectionUtils.isEmpty(sysRoleList)) {
                     throw ExceptionResultEnum.ERROR.exception("用户角色不存在");
                 }
-                String sopNo = tbDingApply.getSopNo();
                 if (SystemConstant.strNotNull(sopNo)) {
                     TFCustomFlowEntity tfCustomFlowEntity = tfCustomFlowEntityService.findByCode(sopNo);
 

+ 2 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingServiceImpl.java

@@ -425,6 +425,7 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
         history.setFacePhotoPath(facePhotoPath);
         history.setMatchScore(score);
         history.setCreateId(userId);
+        history.setId(SystemConstant.getDbUuid());
         tbDingHistoryService.save(history);
 
         if (faceOpen && !facePass) {
@@ -451,6 +452,7 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
             tbDing.setSignDate(signDate);
             tbDing.setSignYear(signYear);
             tbDing.setDateType(dateType);
+            tbDing.insertInfo(userId);
             switch (signType) {
             case IN: // 签到打卡
                 tbDing.setSignInTime(signTime);

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

@@ -567,6 +567,17 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         tbSopInfoService.updateFlowInfo(sopAllocationParam.getAllocationParams(), tfCustomFlow, tfCustomFlowEntity,
                 tfFlowApprove, tbCrmDetail);
         tbUserArchivesAllocationService.editCrmAllocation(new UserArchivesAllocationParam(sopAllocationParam));
+//        FlowResult flowResult = JSONObject.parseObject(tfCustomFlow.getFlowProcessVar(), FlowResult.class);
+//        FlowResult flowResultEntity = JSONObject.parseObject(tfCustomFlowEntity.getFlowProcessVar(), FlowResult.class);
+//        LinkedHashMap<String, FlowTaskResult> setupMap = flowResult.getSetupMap();
+//        LinkedHashMap<String, FlowTaskResult> setupEntityMap = flowResultEntity.getSetupMap();
+//        FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, tfFlowApprove.getSetup());
+//        FlowTaskResult currFlowTaskResult = GsonUtil.fromJson(
+//                GsonUtil.toJson(setupMap.get(flowTaskResult.getTaskKey())), FlowTaskResult.class);
+//        setupEntityMap.put(flowTaskResult.getTaskKey(), currFlowTaskResult);
+//        flowResultEntity.setSetupMap(setupEntityMap);
+//        tfCustomFlowEntity.setFlowProcessVar(JacksonUtil.parseJson(flowResultEntity));
+//        tfCustomFlowEntityService.updateById(tfCustomFlowEntity);
         tbSopInfoService.sopProxySystemApprove(tfCustomFlowEntity.getFlowId(), tfCustomFlowEntity.getCode());
         return true;
     }

+ 1 - 1
sop-business/src/main/resources/mapper/TBUserArchivesAllocationMapper.xml

@@ -270,7 +270,7 @@
     </select>
     <select id="listUserArchivesAllocation" resultType="com.qmth.sop.business.bean.dto.UserArchivesAllocationDto" parameterType="java.lang.Long">
         SELECT
-            tbua.id userId,
+            tbuaa.user_id userId,
             tbuaa.sop_role_type sopRoleType,
             tbua.NAME userName,
             mobile_number mobileNumber,