浏览代码

fix:bugfix

caozixuan 1 年之前
父节点
当前提交
cd069b3143

+ 20 - 36
sop-api/src/main/java/com/qmth/sop/server/api/SysDingGroupController.java

@@ -12,7 +12,6 @@ import com.qmth.sop.business.service.SysDingObjService;
 import com.qmth.sop.common.annotation.OperationLog;
 import com.qmth.sop.common.contant.SystemConstant;
 import com.qmth.sop.common.enums.LogTypeEnum;
-import com.qmth.sop.common.enums.MessageTypeEnum;
 import com.qmth.sop.common.enums.ServiceStatusEnum;
 import com.qmth.sop.common.util.Result;
 import com.qmth.sop.common.util.ResultUtil;
@@ -40,39 +39,37 @@ import java.util.Objects;
 @RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + SystemConstant.PREFIX_URL_DING_GROUP)
 public class SysDingGroupController {
 
-
     @Resource
     SysDingGroupService sysDingGroupService;
 
     @Resource
     SysDingObjService sysDingObjService;
 
-
     @ApiOperation(value = "考勤组表查询接口")
     @RequestMapping(value = "/query", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "考勤组表列表信息", response = SysDingGroupResult.class)})
-    public Result query(
-            @ApiParam(value = "服务单元id", required = false) @RequestParam(required = false) Long serviceId,
+    @ApiResponses({ @ApiResponse(code = 200, message = "考勤组表列表信息", response = SysDingGroupResult.class) })
+    public Result query(@ApiParam(value = "服务单元id") @RequestParam(required = false) Long serviceId,
             @ApiParam(value = "服务状态") @RequestParam(required = false) ServiceStatusEnum status,
-            @ApiParam(value = "适用供应商", required = false) @RequestParam(required = false) Long[] supplierIds,
-            @ApiParam(value = "适用考勤对象", required = false) @RequestParam(required = false) Long[] dingRoleIds,
-            @ApiParam(value = "审核角色", required = false) @RequestParam(required = false) Long[] approveRoleIds,
-            @ApiParam(value = "是否开启人脸", required = false) @RequestParam(required = false) Boolean faceOpen,
+            @ApiParam(value = "适用供应商") @RequestParam(required = false) Long[] supplierIds,
+            @ApiParam(value = "适用考勤对象") @RequestParam(required = false) Long[] dingRoleIds,
+            @ApiParam(value = "审核角色") @RequestParam(required = false) Long[] approveRoleIds,
+            @ApiParam(value = "是否开启人脸") @RequestParam(required = false) Boolean faceOpen,
             @ApiParam(value = "创建起始时间") @RequestParam(required = false) Long createStartTime,
             @ApiParam(value = "创建截止时间") @RequestParam(required = false) Long createEndTime,
             @ApiParam(value = "分页页码", required = true) @RequestParam @Min(SystemConstant.PAGE_NUMBER_MIN) Integer pageNumber,
             @ApiParam(value = "分页数", required = true) @RequestParam @Min(SystemConstant.PAGE_SIZE_MIN) @Max(SystemConstant.PAGE_SIZE_MAX) Integer pageSize) {
-        IPage<SysDingGroupResult> resultIPage = sysDingGroupService.query(new Page<>(pageNumber, pageSize), serviceId,status,supplierIds,dingRoleIds,approveRoleIds,faceOpen,createStartTime,createEndTime);
+        IPage<SysDingGroupResult> resultIPage = sysDingGroupService.query(new Page<>(pageNumber, pageSize), serviceId,
+                status, supplierIds, dingRoleIds, approveRoleIds, faceOpen, createStartTime, createEndTime);
 
         return ResultUtil.ok(resultIPage);
     }
 
-
     @ApiOperation(value = "新增考勤组表接口")
     @RequestMapping(value = "/add", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "新增考勤组表信息", response = Object.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "新增考勤组表信息", response = Object.class) })
     @OperationLog(logType = LogTypeEnum.ADD)
-    public Result add(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestBody(required = true) SysDingGroupResult sysDingGroup, BindingResult bindingResult) throws InterruptedException {
+    public Result add(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestBody SysDingGroupResult sysDingGroup,
+            BindingResult bindingResult) throws InterruptedException {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
         }
@@ -80,12 +77,12 @@ public class SysDingGroupController {
         return ResultUtil.ok();
     }
 
-
     @ApiOperation(value = "修改考勤组表接口")
     @RequestMapping(value = "/update", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "修改考勤组表信息", response = Object.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "修改考勤组表信息", response = Object.class) })
     @OperationLog(logType = LogTypeEnum.UPDATE)
-    public Result update(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestBody(required = true) SysDingGroupResult sysDingGroup, BindingResult bindingResult) throws InterruptedException {
+    public Result update(@Valid @ApiParam(value = "考勤组表信息", required = true) @RequestBody SysDingGroupResult sysDingGroup,
+            BindingResult bindingResult) throws InterruptedException {
         if (bindingResult.hasErrors()) {
             return ResultUtil.error(bindingResult.getAllErrors().get(0).getDefaultMessage());
         }
@@ -93,43 +90,30 @@ public class SysDingGroupController {
         return ResultUtil.ok();
     }
 
-
     @ApiOperation(value = "删除考勤组表接口")
     @RequestMapping(value = "/delete", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "删除考勤组表信息", response = Object.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "删除考勤组表信息", response = Object.class) })
     @OperationLog(logType = LogTypeEnum.DELETE)
-    public Result delete(@ApiParam(value = "考勤组表信息", required = true) @RequestParam(required = true) long id) {
+    public Result delete(@ApiParam(value = "考勤组表信息", required = true) @RequestParam long id) {
         sysDingGroupService.delete(id);
         return ResultUtil.ok();
     }
 
-    /*列表
-
-     */
-
     @ApiOperation(value = "考勤组表列表接口")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "考勤组表列表", response = SysDingGroup.class, responseContainer = "List")})
-    public Result list(@ApiParam(value = "查询条件", required = false) @RequestParam(required = false) Boolean enable) {
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "考勤组表列表", response = SysDingGroup.class, responseContainer = "List") })
+    public Result list(@ApiParam(value = "查询条件") @RequestParam(required = false) Boolean enable) {
         return ResultUtil.ok(sysDingGroupService.list(new QueryWrapper<SysDingGroup>().lambda().eq(Objects.nonNull(enable), SysDingGroup::getEnable, enable)));
     }
 
-    /**
-     * 获取单个
-     *
-     * @param id
-     * @return
-     */
-
     @ApiOperation(value = "获取单个考勤组表信息")
     @RequestMapping(value = "/get", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "考勤组表信息", response = SysDingGroupResult.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "考勤组表信息", response = SysDingGroupResult.class) })
     public Result get(@ApiParam(value = "id", required = true) @RequestParam(value = "id") long id) {
         SysDingGroup sysDingGroup = sysDingGroupService.getById(id);
         SysDingGroupResult sysDingGroupResult = JSON.toJavaObject((JSON) JSON.toJSON(sysDingGroup), SysDingGroupResult.class);
         sysDingGroupResult.setDingObjs(sysDingObjService.getList(id));
         return ResultUtil.ok(sysDingGroupResult);
     }
-
-
 }

+ 10 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/TBDingAttendanceResult.java

@@ -47,6 +47,8 @@ public class TBDingAttendanceResult implements Serializable {
     @ApiModelProperty(value = "姓名")
     @ExcelProperty(value = "姓名")
     private String userName;
+    @ApiModelProperty(value = "项目角色Str")
+    private String sopRoleType;
     @ApiModelProperty(value = "项目角色")
     @ExcelProperty(value = "项目角色")
     private String roleName;
@@ -145,6 +147,14 @@ public class TBDingAttendanceResult implements Serializable {
         this.userName = userName;
     }
 
+    public String getSopRoleType() {
+        return sopRoleType;
+    }
+
+    public void setSopRoleType(String sopRoleType) {
+        this.sopRoleType = sopRoleType;
+    }
+
     public String getRoleName() {
         return roleName;
     }

+ 39 - 23
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingServiceImpl.java

@@ -1,6 +1,7 @@
 package com.qmth.sop.business.service.impl;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -73,9 +74,6 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
     @Resource
     private TBDingApplyService tbDingApplyService;
 
-    @Resource
-    private TFFlowLogService tfFlowLogService;
-
     @Resource
     private TBSopInfoService tbSopInfoService;
 
@@ -88,6 +86,9 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
     @Resource
     private TBDingStatisticService tbDingStatisticService;
 
+    @Resource
+    private TBCrmDetailService tbCrmDetailService;
+
     @Override
     public DingElementResult findDingElements(String sopNo, Long userId) {
 
@@ -299,7 +300,11 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
         }
 
         Long signTime = dingSaveParam.getSignTime();
-        SopPlanTimeResult sopPlan = tbSopInfoService.querySopPlanTime(sopNo);
+        TBCrmDetail tbCrmDetail = tbCrmDetailService.findBySopNo(sopNo);
+        Long scanStartTime = tbCrmDetail.getScanStartTime();
+        Long scanEndTime = tbCrmDetail.getScanEndTime();
+        Long markPaperStartTime = tbCrmDetail.getMarkPaperStartTime();
+        Long markPaperEndTime = tbCrmDetail.getMarkPaperEndTime();
 
         DingDateTypeEnum dateType = sysDingDateService.getDingDateType(DateDisposeUtils.timestampToLocalDate(signTime));
 
@@ -357,8 +362,7 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
         List<TBDing> todayDingList = this.list(
                 new QueryWrapper<TBDing>().lambda().eq(TBDing::getUserId, userId).eq(TBDing::getSignYear, signYear).eq(TBDing::getSignDate, signDate));
         // 该用户在其他sop的当天打卡记录
-        List<TBDing> otherSopDingList = todayDingList.stream().filter(e -> !e.getSopNo().equals(sopNo)).collect(
-                Collectors.toList());
+        List<TBDing> otherSopDingList = todayDingList.stream().filter(e -> !e.getSopNo().equals(sopNo)).collect(Collectors.toList());
         if (CollectionUtils.isNotEmpty(otherSopDingList)) {
             List<TBDing> unFinishDingList = otherSopDingList.stream()
                     .filter(e -> !SystemConstant.longNotNull(e.getSignInTime()) || !SystemConstant.longNotNull(e.getSignOutTime())).collect(Collectors.toList());
@@ -369,7 +373,6 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
             }
         }
 
-
         // 新增打卡历史记录
         TBDingHistory history = new TBDingHistory();
         history.setSopNo(sopNo);
@@ -390,7 +393,6 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
             throw ExceptionResultEnum.ERROR.exception("人脸识别不通过!");
         }
 
-
         List<TBDing> tbDingList = todayDingList.stream().filter(e -> e.getSopNo().equals(sopNo)).collect(Collectors.toList());
         if (CollectionUtils.isEmpty(tbDingList)) {
             // 没有这天的打卡记录 - 新增打卡记录
@@ -449,8 +451,10 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
             Long signOutTime = tbDing.getSignOutTime();
             if (signInTime != null && signInTime > 0 && signOutTime != null && signOutTime > 0) {
                 // 打卡异常 (两个打卡时间均不在时间点 -> 异常)
-                boolean signInException = !(sopPlan.getBeginTime() <= signInTime && signInTime <= sopPlan.getEndTime());
-                boolean signOutException = !(sopPlan.getBeginTime() <= signOutTime && signOutTime <= sopPlan.getEndTime());
+                boolean signInException = !((scanStartTime <= signInTime && signInTime <= scanEndTime) || (
+                        markPaperStartTime <= signInTime && signInTime <= markPaperEndTime));
+                boolean signOutException = !((scanStartTime <= signOutTime && signOutTime <= scanEndTime) || (
+                        markPaperStartTime <= signOutTime && signOutTime <= markPaperEndTime));
                 tbDing.setDingException(signInException && signOutException);
             }
             this.updateById(tbDing);
@@ -520,8 +524,18 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
             }
             supplierId = userSupplierId;
         }
-        return this.baseMapper.attendanceQuery(iPage, serviceId, userName, startTime, endTime, supplierId, custom, sopNo, Objects.nonNull(type) ? type.name() : null, Objects.nonNull(status) ? status.name() : null, dpr,
-                abnormal);
+        IPage<TBDingAttendanceResult> page = this.baseMapper.attendanceQuery(iPage, serviceId, userName, startTime,
+                endTime, supplierId, custom, sopNo, Objects.nonNull(type) ? type.name() : null,
+                Objects.nonNull(status) ? status.name() : null, dpr, abnormal);
+        page.getRecords().forEach(e -> {
+            String sopRoleType = e.getSopRoleType();
+            if (SystemConstant.strNotNull(sopRoleType)) {
+                List<SopRoleTypeEnum> sopRoleTypeEnumList = JSONArray.parseArray(sopRoleType, SopRoleTypeEnum.class);
+                e.setRoleName(
+                        sopRoleTypeEnumList.stream().map(SopRoleTypeEnum::getTitle).collect(Collectors.joining(",")));
+            }
+        });
+        return page;
     }
 
     @Override
@@ -563,13 +577,11 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
                 Long updateTime = tfFlowApprove.getUpdateTime();
                 Long currentTime = System.currentTimeMillis();
 
-                Long flowId = tfFlowApprove.getFlowId();
-                TFFlowLog tfFlowLog = tfFlowLogService.getOne(
-                        new QueryWrapper<TFFlowLog>().lambda().eq(TFFlowLog::getFlowId, flowId).eq(TFFlowLog::getApproveRemark, "通过").eq(TFFlowLog::getApproveSetup, 1).orderByDesc(TFFlowLog::getId).last("limit 1"));
-                if (Objects.isNull(tfFlowLog)) {
-                    throw ExceptionResultEnum.ERROR.exception("未找到流程提交记录");
+                TBCrmDetail tbCrmDetail = tbCrmDetailService.findBySopNo(sopNo);
+                if (Objects.isNull(tbCrmDetail)) {
+                    throw ExceptionResultEnum.ERROR.exception("未找到派单详情");
                 }
-                Long createTime = tfFlowLog.getCreateTime();
+                Long createTime = tbCrmDetail.getPublishTime();
 
                 if (FlowStatusEnum.FINISH.equals(flowStatusEnum)) {
                     dateList = DateDisposeUtils.getDaysBetween(createTime, updateTime, SystemConstant.DEFAULT_DATE_YMD_S_PATTERN);
@@ -598,8 +610,7 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
 
         if (CollectionUtils.isNotEmpty(dingGroupIds)) {
             List<SysDingObj> sysDingObjList = sysDingObjService.list(
-                    new QueryWrapper<SysDingObj>().lambda()
-                            .in(SysDingObj::getDingGroupId, dingGroupIds)
+                    new QueryWrapper<SysDingObj>().lambda().in(SysDingObj::getDingGroupId, dingGroupIds)
                             .eq(SysDingObj::getSopRoleType, SopRoleTypeEnum.ENGINEER)
                             .eq(SysDingObj::getType, DingObjTypeEnum.DING));
 
@@ -713,7 +724,11 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
     @Override
     public void resetDingExceptionBySopNo(String sopNo) {
         List<TBDing> tbDingList = this.list(new QueryWrapper<TBDing>().lambda().eq(TBDing::getSopNo, sopNo));
-        SopPlanTimeResult sopPlan = tbSopInfoService.querySopPlanTime(sopNo);
+        TBCrmDetail tbCrmDetail = tbCrmDetailService.findBySopNo(sopNo);
+        Long scanStartTime = tbCrmDetail.getScanStartTime();
+        Long scanEndTime = tbCrmDetail.getScanEndTime();
+        Long markPaperStartTime = tbCrmDetail.getMarkPaperStartTime();
+        Long markPaperEndTime = tbCrmDetail.getMarkPaperEndTime();
         // 打卡异常
         tbDingList.forEach(e -> {
             Long signInTime = e.getSignInTime();
@@ -721,10 +736,11 @@ public class TBDingServiceImpl extends ServiceImpl<TBDingMapper, TBDing> impleme
             boolean inDingException = false;
             boolean outDingException = false;
             if (signInTime != null && signInTime > 0) {
-                inDingException = !(sopPlan.getBeginTime() <= signInTime && signInTime <= sopPlan.getEndTime());
+                inDingException = !((scanStartTime <= signInTime && signInTime <= scanEndTime) || (markPaperStartTime <= signInTime && signInTime <= markPaperEndTime));
             }
             if (signOutTime != null && signOutTime > 0) {
-                outDingException = !(sopPlan.getBeginTime() <= signOutTime && signOutTime <= sopPlan.getEndTime());
+                outDingException = !((scanStartTime <= signOutTime && signOutTime <= scanEndTime) || (
+                        markPaperStartTime <= signOutTime && signOutTime <= markPaperEndTime));
             }
             boolean dingException = inDingException && outDingException;
             e.setDingException(dingException);

+ 9 - 4
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingSubmitServiceImpl.java

@@ -74,7 +74,8 @@ public class TBDingSubmitServiceImpl extends ServiceImpl<TBDingSubmitMapper, TBD
             String sopRoleTypeStr = e.getSopRoleTypeStr();
             if (SystemConstant.strNotNull(sopRoleTypeStr)) {
                 List<SopRoleTypeEnum> sopRoleTypeEnumList = JSONArray.parseArray(sopRoleTypeStr, SopRoleTypeEnum.class);
-                e.setRoleName(sopRoleTypeEnumList.stream().map(SopRoleTypeEnum::getTitle).collect(Collectors.joining(",")));
+                e.setRoleName(
+                        sopRoleTypeEnumList.stream().map(SopRoleTypeEnum::getTitle).collect(Collectors.joining(",")));
             }
         });
         return page;
@@ -205,7 +206,8 @@ public class TBDingSubmitServiceImpl extends ServiceImpl<TBDingSubmitMapper, TBD
             String sopRoleTypeStr = e.getSopRoleTypeStr();
             if (SystemConstant.strNotNull(sopRoleTypeStr)) {
                 List<SopRoleTypeEnum> sopRoleTypeEnumList = JSONArray.parseArray(sopRoleTypeStr, SopRoleTypeEnum.class);
-                dto.setRoleType(sopRoleTypeEnumList.stream().map(SopRoleTypeEnum::getTitle).collect(Collectors.joining(",")));
+                dto.setRoleType(
+                        sopRoleTypeEnumList.stream().map(SopRoleTypeEnum::getTitle).collect(Collectors.joining(",")));
             }
             dto.setSupplierName(e.getSupplierName());
             dto.setActualDays(e.getActualDays());
@@ -253,7 +255,8 @@ public class TBDingSubmitServiceImpl extends ServiceImpl<TBDingSubmitMapper, TBD
         String sopRoleTypeStr = dingSubmitResult.getSopRoleTypeStr();
         if (SystemConstant.strNotNull(sopRoleTypeStr)) {
             List<SopRoleTypeEnum> sopRoleTypeEnumList = JSONArray.parseArray(sopRoleTypeStr, SopRoleTypeEnum.class);
-            tbDingSubmit.setRoleName(sopRoleTypeEnumList.stream().map(SopRoleTypeEnum::getTitle).collect(Collectors.joining(",")));
+            tbDingSubmit.setRoleName(
+                    sopRoleTypeEnumList.stream().map(SopRoleTypeEnum::getTitle).collect(Collectors.joining(",")));
         }
         tbDingSubmit.setActualDays(dingSubmitResult.getActualDays());
         tbDingSubmit.setWeekdays(dingSubmitResult.getWeekdays());
@@ -284,7 +287,7 @@ public class TBDingSubmitServiceImpl extends ServiceImpl<TBDingSubmitMapper, TBD
                                 userArchivesName, exceptionCount));
             }
             Long submitId = dingSubmitResult.getSubmitId();
-            if (submitId != null && submitId > 0) {
+            if (SystemConstant.longNotNull(submitId)) {
                 tbDingSubmit.setId(submitId);
             }
             tbDingSubmit.setSubmitStatus(DingSubmitStatusEnum.ALREADY_SUBMIT);
@@ -299,6 +302,7 @@ public class TBDingSubmitServiceImpl extends ServiceImpl<TBDingSubmitMapper, TBD
                 throw ExceptionResultEnum.ERROR.exception(
                         String.format("服务单元为[%s],sop流水号为[%s],用户档案为[%s]的考勤数据异常", serviceUnitName, sopNo, userArchivesName));
             }
+            tbDingSubmit.setId(dingSubmitResult.getSubmitId());
             tbDingSubmit.setSubmitStatus(DingSubmitStatusEnum.APPLY_WITHDRAW);
             break;
         case CANCEL_WITHDRAW:
@@ -311,6 +315,7 @@ public class TBDingSubmitServiceImpl extends ServiceImpl<TBDingSubmitMapper, TBD
                 throw ExceptionResultEnum.ERROR.exception(
                         String.format("服务单元为[%s],sop流水号为[%s],用户档案为[%s]的考勤数据异常", serviceUnitName, sopNo, userArchivesName));
             }
+            tbDingSubmit.setId(dingSubmitResult.getSubmitId());
             tbDingSubmit.setSubmitStatus(DingSubmitStatusEnum.ALREADY_SUBMIT);
         }
         this.saveOrUpdate(tbDingSubmit);

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

@@ -2,7 +2,7 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.qmth.sop.business.mapper.SysDingObjMapper">
     <select id="getList" resultType="com.qmth.sop.business.bean.result.SysDingGroupRoleResult">
-        select a.*,r.name role_name from sys_ding_obj a
+        select a.*,ifnull(r.name,'工程师') role_name from sys_ding_obj a
         left join sys_role r on r.id=a.role_id
         <where>
             <if test="id != null and id != ''">

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

@@ -34,7 +34,6 @@
             LEFT JOIN t_b_user_archives ua ON d.user_archives_id = ua.id
             LEFT JOIN t_b_user_archives_supplier us ON us.user_archives_id = ua.id
             LEFT JOIN t_b_service bs ON bs.id = d.service_id
-            LEFT JOIN sys_role r ON r.type = d.role_type
             LEFT JOIN t_b_crm crm ON crm.crm_no = d.crm_no
             LEFT JOIN sys_custom c ON c.id = crm.custom_id
             LEFT JOIN sys_user sub ON sub.id = d.submit_user_id
@@ -167,7 +166,7 @@
         ua.city,
         ua.name user_name,
         ua.`code` user_no,
-        r.`name` role_name,
+        d.sop_role_type as sopRoleType,
         s.NAME supplier,
         d.sign_date,
         d.type,
@@ -195,7 +194,6 @@
         LEFT JOIN t_b_user_archives ua ON ua.id = d.user_archives_id
         LEFT JOIN t_b_user_archives_supplier us ON us.user_archives_id = ua.id
         LEFT JOIN t_b_service bs ON bs.id = d.service_id
-        LEFT JOIN sys_role r ON r.type = d.role_type
         LEFT JOIN t_b_crm crm ON crm.crm_no = d.crm_no
         LEFT JOIN sys_custom c ON c.id = crm.custom_id
         LEFT JOIN sys_supplier s ON s.id = us.supplier_id

+ 2 - 0
sop-business/src/main/resources/mapper/TBDingSubmitMapper.xml

@@ -35,6 +35,7 @@
             sta.remain_count AS remainCount,
             sta.exception_count AS exceptionCount,
             IFNULL(tbds.submit_status, 'WILL_SUBMIT') AS submitStatus,
+            tbds.id AS submitId,
             tbds.submit_user_id AS submitUserId,
             su.real_name AS submitUserName,
             tbds.submit_time AS submitTime
@@ -135,6 +136,7 @@
             sta.remain_count AS remainCount,
             sta.exception_count AS exceptionCount,
             IFNULL(tbds.submit_status, 'WILL_SUBMIT') AS submitStatus,
+            tbds.id AS submitId,
             tbds.submit_user_id AS submitUserId,
             su.real_name AS submitUserName,
             tbds.submit_time AS submitTime