wangliang 1 рік тому
батько
коміт
a06d7ff5bb

+ 8 - 0
sop-api/src/main/java/com/qmth/sop/server/api/TBDingApplyController.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.sop.business.bean.result.DingApplyDoneResult;
 import com.qmth.sop.business.bean.result.DingApplyUnDoneResult;
+import com.qmth.sop.business.bean.result.TBDingApplyViewResult;
 import com.qmth.sop.business.entity.TBDingApply;
 import com.qmth.sop.business.service.TBDingApplyService;
 import com.qmth.sop.common.contant.SystemConstant;
@@ -100,4 +101,11 @@ public class TBDingApplyController {
                                    @ApiParam(value = "审核用户id") @RequestParam(required = false) Long userId) throws InterruptedException {
         return ResultUtil.ok(tbDingApplyService.flowBatchApprove(taskIds, dingExceptionApprove, userId));
     }
+
+    @ApiOperation(value = "考勤异常详情接口")
+    @RequestMapping(value = "/view", method = RequestMethod.POST)
+    @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = TBDingApplyViewResult.class)})
+    public Result view(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
+        return ResultUtil.ok();
+    }
 }

+ 1 - 2
sop-api/src/main/java/com/qmth/sop/server/api/TBSopInfoController.java

@@ -54,7 +54,7 @@ public class TBSopInfoController {
     @RequestMapping(value = "/metadata/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = FormWidgetMetadataResult.class)})
     public Result metadataList(@ApiParam(value = "sop流程类型", required = true) @RequestParam TFCustomTypeEnum type,
-                       @ApiParam(value = "sop流程版本") @RequestParam(required = false) Integer version) {
+                               @ApiParam(value = "sop流程版本") @RequestParam(required = false) Integer version) {
         return ResultUtil.ok(tdFormWidgetMetadataService.selectAll(type, Objects.isNull(version) ? 1 : version));
     }
 
@@ -136,7 +136,6 @@ public class TBSopInfoController {
     @RequestMapping(value = "/user/list", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = SysUser.class)})
     public Result userList(@ApiParam(value = "sopId", required = true) @RequestParam Long sop_info_id) {
-
         return ResultUtil.ok(tbSopInfoService.userList(sop_info_id));
     }
 }

+ 11 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/DingApplyDoneResult.java

@@ -56,6 +56,17 @@ public class DingApplyDoneResult extends WorkTaskResult implements Serializable
     @ApiModelProperty(value = "供应商编码")
     String supplierCode;
 
+    @ApiModelProperty(value = "sop单号")
+    String sopNo;
+
+    public String getSopNo() {
+        return sopNo;
+    }
+
+    public void setSopNo(String sopNo) {
+        this.sopNo = sopNo;
+    }
+
     public Long getApproveTime() {
         return approveTime;
     }

+ 11 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/DingApplyUnDoneResult.java

@@ -50,6 +50,17 @@ public class DingApplyUnDoneResult extends WorkTaskResult implements Serializabl
     @ApiModelProperty(value = "是否是自己审核")
     boolean myself;
 
+    @ApiModelProperty(value = "sop单号")
+    String sopNo;
+
+    public String getSopNo() {
+        return sopNo;
+    }
+
+    public void setSopNo(String sopNo) {
+        this.sopNo = sopNo;
+    }
+
     public boolean isMyself() {
         return myself;
     }

+ 23 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/SopInfoResult.java

@@ -43,6 +43,29 @@ public class SopInfoResult implements Serializable {
     @ApiModelProperty(value = "客户类型str")
     private String customTypeStr;
 
+    @ApiModelProperty(value = "服务单元id")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long serviceId;
+
+    @ApiModelProperty(value = "服务单元名称")
+    private String serviceName;
+
+    public Long getServiceId() {
+        return serviceId;
+    }
+
+    public void setServiceId(Long serviceId) {
+        this.serviceId = serviceId;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
     public ProductTypeEnum getCustomType() {
         return customType;
     }

+ 65 - 0
sop-business/src/main/java/com/qmth/sop/business/bean/result/TBDingApplyViewResult.java

@@ -0,0 +1,65 @@
+package com.qmth.sop.business.bean.result;
+
+import com.qmth.sop.business.entity.TBDingApply;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description: 考勤异常申请信息view result
+ * @Param:
+ * @return:
+ * @Author: wangliang
+ * @Date: 2023/2/17
+ */
+public class TBDingApplyViewResult implements Serializable {
+
+    @ApiModelProperty(value = "crm信息")
+    CrmProjectResult crmInfo;
+
+    @ApiModelProperty(value = "考勤异常申请信息")
+    TBDingApply tbDingApply;
+
+    @ApiModelProperty(value = "流程审批信息")
+    List<TFFlowViewLogResult> flowApproveHistoryList;
+
+    public TBDingApplyViewResult() {
+
+    }
+
+    public TBDingApplyViewResult(CrmProjectResult crmInfo, TBDingApply tbDingApply) {
+        this.crmInfo = crmInfo;
+        this.tbDingApply = tbDingApply;
+    }
+
+    public TBDingApplyViewResult(CrmProjectResult crmInfo, TBDingApply tbDingApply, List<TFFlowViewLogResult> flowApproveHistoryList) {
+        this.crmInfo = crmInfo;
+        this.tbDingApply = tbDingApply;
+        this.flowApproveHistoryList = flowApproveHistoryList;
+    }
+
+    public List<TFFlowViewLogResult> getFlowApproveHistoryList() {
+        return flowApproveHistoryList;
+    }
+
+    public void setFlowApproveHistoryList(List<TFFlowViewLogResult> flowApproveHistoryList) {
+        this.flowApproveHistoryList = flowApproveHistoryList;
+    }
+
+    public CrmProjectResult getCrmInfo() {
+        return crmInfo;
+    }
+
+    public void setCrmInfo(CrmProjectResult crmInfo) {
+        this.crmInfo = crmInfo;
+    }
+
+    public TBDingApply getTbDingApply() {
+        return tbDingApply;
+    }
+
+    public void setTbDingApply(TBDingApply tbDingApply) {
+        this.tbDingApply = tbDingApply;
+    }
+}

+ 9 - 0
sop-business/src/main/java/com/qmth/sop/business/service/TBDingApplyService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.qmth.sop.business.bean.result.DingApplyDoneResult;
 import com.qmth.sop.business.bean.result.DingApplyUnDoneResult;
+import com.qmth.sop.business.bean.result.TBDingApplyViewResult;
 import com.qmth.sop.business.entity.TBDingApply;
 import com.qmth.sop.common.enums.DingExceptionApproveEnum;
 
@@ -101,4 +102,12 @@ public interface TBDingApplyService extends IService<TBDingApply> {
      * @throws InterruptedException
      */
     public Boolean taskApprove(Long taskId, Long userId, DingExceptionApproveEnum dingExceptionApprove) throws InterruptedException;
+
+    /**
+     * 考勤异常申请详情接口
+     *
+     * @param id
+     * @return
+     */
+    TBDingApplyViewResult view(Long id);
 }

+ 12 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBDingApplyServiceImpl.java

@@ -9,6 +9,7 @@ import com.qmth.sop.business.bean.params.FlowApproveParam;
 import com.qmth.sop.business.bean.result.CrmProjectResult;
 import com.qmth.sop.business.bean.result.DingApplyDoneResult;
 import com.qmth.sop.business.bean.result.DingApplyUnDoneResult;
+import com.qmth.sop.business.bean.result.TBDingApplyViewResult;
 import com.qmth.sop.business.entity.*;
 import com.qmth.sop.business.mapper.TBDingApplyMapper;
 import com.qmth.sop.business.service.*;
@@ -319,4 +320,15 @@ public class TBDingApplyServiceImpl extends ServiceImpl<TBDingApplyMapper, TBDin
         TBDingApplyService tbDingApplyService = SpringContextHolder.getBean(TBDingApplyService.class);
         return tbDingApplyService.updateDingExceptionTime(tbDingApply, dingExceptionApprove);
     }
+
+    /**
+     * 考勤异常申请详情接口
+     *
+     * @param id
+     * @return
+     */
+    @Override
+    public TBDingApplyViewResult view(Long id) {
+        return null;
+    }
 }

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

@@ -1047,8 +1047,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
      */
     @Override
     public List<SopInfoResult> findFlowByServiceId(Long serviceId, Long userId) {
-        Optional.ofNullable(serviceId).orElseThrow(() -> ExceptionResultEnum.SERVICE_ID_NO_DATA.exception());
-        Optional.ofNullable(serviceId).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("用户id不能为空"));
+        Optional.ofNullable(userId).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("用户id不能为空"));
         List<SysRole> sysRoleList = sysUserRoleService.listRoleByUserId(userId);
         RoleTypeEnum roleTypeEnum = null;
         if (!CollectionUtils.isEmpty(sysRoleList)) {

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

@@ -38,6 +38,7 @@
                      tfcf.version,
                      tfcfe.obj_id as objId,
                      tfcfe.crm_no as crmNo,
+                     tbda.sop_no as sopNo,
                      tbc.name as crmName,
                      tbs.id as serviceId,
                      tbs.name as serviceName,
@@ -140,6 +141,7 @@
             tfcf.version,
             tfcfe.obj_id as objId,
             tfcfe.crm_no as crmNo,
+            tbda.sop_no as sopNo,
             tfcfe.flow_id as flowId,
             tbc.name as crmName,
             tbs.id as serviceId,

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

@@ -198,12 +198,15 @@
             tbc.name as crmName,
             sc.name as customName,
             sc.type as customType,
-            sc.id as customId
+            sc.id as customId,
+            tbsi.service_id as serviceId,
+            tbs.name as serviceName
         from
             t_b_sop_info tbsi
         left join t_b_sop_info_detail tbsid on tbsid.sop_info_id = tbsi.id
         left join t_b_crm tbc on tbc.crm_no = tbsi.crm_no
         left join sys_custom sc on sc.id = tbsi.custom_id
+        left join t_b_service tbs on tbs.id = tbsi.service_id
         <where>
             <if test="userId != null and userId != ''">
                 <choose>