Browse Source

Merge remote-tracking branch 'origin/master'

ljy121 1 year ago
parent
commit
faa1fc5f5e

+ 2 - 1
zjugis-business/src/main/java/com/zjugis/business/bean/request/ProjectRequest.java

@@ -4,6 +4,7 @@ import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
 import java.math.BigDecimal;
+import java.time.LocalDate;
 
 /**
  * @author ljy
@@ -65,7 +66,7 @@ public class ProjectRequest {
     /**
      * 验收时间
      */
-    private String yssj;
+    private LocalDate yssj;
     /**
      * 项目状态
      */

+ 21 - 12
zjugis-business/src/main/java/com/zjugis/business/flow/contractF/event/ContractFEvent.java

@@ -1,7 +1,11 @@
 package com.zjugis.business.flow.contractF.event;
 
+import com.zjugis.business.bean.entity.Contract;
+import com.zjugis.business.bean.entity.Project;
 import com.zjugis.business.flow.contractF.entity.ContractFDO;
 import com.zjugis.business.flow.contractF.service.ContractFService;
+import com.zjugis.business.service.ContractService;
+import com.zjugis.business.service.ProjectService;
 import com.zjugis.framework.common.util.date.LocalDateTimeUtils;
 import com.zjugis.framework.workflow.exception.BusinessException;
 import com.zjugis.framework.workflow.model.BaseController;
@@ -34,7 +38,8 @@ import static com.zjugis.business.constants.FlowStatusConstants.*;
 public class ContractFEvent extends BaseController {
 
 
-
+    @Resource
+    private ProjectService projectService;
     @Resource
     private ContractFService contractFService;
 
@@ -183,23 +188,27 @@ public class ContractFEvent extends BaseController {
 
 
     /**
-     * 转到部门经理
+     * 转到项目经理和销售人员
      */
-    @PostMapping("/to-dept-manager")
+    @PostMapping("/to-project-manager-sale")
     public String toDeptManager(String flowInstanceId) {
         try {
             if (StringUtils.isNotBlank(flowInstanceId)) {
                 ContractFDO entity = contractFService.findByInstanceId(flowInstanceId);
                 List<Map<String, String>> userMaps = new ArrayList<>();
-//                if (StringUtils.isNotBlank(entity.getDeptId())) {
-//                    CommonResult<DeptRespDTO> result = deptApi.getDept(entity.getDeptId());
-//                    DeptRespDTO dept = result.getCheckedData();
-//                    if (dept != null && StringUtils.isNotBlank(dept.getLeaderUserId())) {
-//                        HashMap<String, String> map = new HashMap<>();
-//                        map.put("id", dept.getLeaderUserId());
-//                        userMaps.add(map);
-//                    }
-//                }
+                if (StringUtils.isNotBlank(entity.getContractId())) {
+                    Project project = projectService.selectById(entity.getContractId());
+                    if(StringUtils.isNotBlank(project.getXmjlId())) {
+                        HashMap<String,String> map = new HashMap<>();
+                        map.put("id",project.getXmjlId());
+                        userMaps.add(map);
+                    }
+                    if(StringUtils.isNotBlank(project.getXsryId())) {
+                        HashMap<String,String> map = new HashMap<>();
+                        map.put("id",project.getXsryId());
+                        userMaps.add(map);
+                    }
+                }
                 return ok(userMaps);
             } else {
                 throw new BusinessException("找不到流程id");

+ 1 - 1
zjugis-business/src/main/java/com/zjugis/business/flow/projectStatus/event/ProjectStatusEvent.java

@@ -112,7 +112,7 @@ public class ProjectStatusEvent extends BaseController {
                 ProjectResponse projectResponse=projectService.selectWithChildren(entity.getProjectId());
                 List<ProjectResponse> children =projectResponse.getChildren();
                 if("ys".equals(entity.getType())){
-                    project.setYssj(entity.getAcceptTime()!=null?entity.getAcceptTime().toString():null);
+                    project.setYssj(entity.getAcceptTime());
                     project.setYsdyxx(entity.getAcceptState());
                     project.setXmzt(4);
                 }else if("jx".equals(entity.getType())){