diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java index be229f3..4a8f0a3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java @@ -64,14 +64,15 @@ public class EmployeeBatchGetTask { @Transactional(rollbackFor = Exception.class) // @Scheduled(cron = "0 0 1 * * ?") public void batchGetEmployeeTask() { - // 获取所有的组织列表用户获取组织下的 用户信息 - List dingOrganizationList = iDingOrganizationService.list(); + // 获取所有的组织列表用户获取组织下的 用户信息(暂时 只查 单位的类型) + List dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class) + .eq(DingOrganization::getTypeCode,"GOV_UNIT")); if (CollUtil.isNotEmpty(dingOrganizationList)) { + //记录任务 单位数 + Integer index = 0; for (DingOrganization dingOrganization : dingOrganizationList) { - if(!"GOV_UNIT".equals(dingOrganization.getTypeCode())){ - log.info("不是单位的 跳过 :{},{}",dingOrganization.getTypeCode(),dingOrganization.getOrganizationName()); - continue; - } + log.info("当前单位:{},下标数,{}",dingOrganization.getOrganizationName(),index); + index++; List allOrganizationEmployeePositionList = new ArrayList<>(); String organizationCode = dingOrganization.getOrganizationCode(); PageOrganizationEmployeePositionsQuery query = new PageOrganizationEmployeePositionsQuery(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/FinalAcceptanceController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/FinalAcceptanceController.java index 6eb4916..4942650 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/FinalAcceptanceController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/FinalAcceptanceController.java @@ -1,7 +1,10 @@ package com.ningdatech.pmapi.projectdeclared.controller; import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.common.util.ExcelDownUtil; import com.ningdatech.pmapi.projectdeclared.manage.FinalAcceptanceManage; +import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO; +import com.ningdatech.pmapi.projectdeclared.model.vo.FinalAcceptanceVO; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import io.swagger.annotations.Api; @@ -11,6 +14,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; + /** * @Classname FinalAcceptanceController @@ -32,4 +37,23 @@ public class FinalAcceptanceController { public PageVo projectlist(@ModelAttribute ProjectListReq req) { return finalAcceptanceManage.projectLibList(req); } + + @GetMapping("/export") + @ApiOperation("待终验申报的项目导出") + public void exportList(ProjectListReq req, HttpServletResponse response){ + ExcelDownUtil.downXls(response,req,finalAcceptanceManage::exportList); + } + + @ApiOperation(value = "待终验申报的项目列表", notes = "待终验申报的项目列表") + @GetMapping("/detail/{projectId}") + public FinalAcceptanceVO detailByProjectId(@PathVariable Long projectId) { + return finalAcceptanceManage.detailByProjectId(projectId); + } + + @ApiOperation(value = "终验申报", notes = "终验申报") + @PostMapping("/start-process") + public String startTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) { + String instanceId = finalAcceptanceManage.startProcess(dto); + return "终验申报 【" + instanceId + "】 成功"; + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java index bf271ee..1fefd7d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java @@ -18,10 +18,12 @@ import com.ningdatech.pmapi.common.util.ExcelDownUtil; import com.ningdatech.pmapi.common.util.ExcelExportStyle; import com.ningdatech.pmapi.projectdeclared.model.dto.ContractSaveDTO; import com.ningdatech.pmapi.projectdeclared.model.dto.DeclaredProjectExportDTO; +import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO; import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; import com.ningdatech.pmapi.projectdeclared.model.entity.PaymentPlan; import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; +import com.ningdatech.pmapi.projectdeclared.model.vo.FinalAcceptanceVO; import com.ningdatech.pmapi.projectdeclared.model.vo.PaymentPlanVO; import com.ningdatech.pmapi.projectdeclared.service.IContractService; import com.ningdatech.pmapi.projectdeclared.service.IPaymentPlanService; @@ -302,4 +304,28 @@ public class FinalAcceptanceManage { return "填写成功"; } + + public FinalAcceptanceVO detailByProjectId(Long projectId) { + FinalAcceptanceVO vo = new FinalAcceptanceVO(); + + Project project = projectService.getById(projectId); + vo.setProjectId(projectId); + if(Objects.nonNull(project)){ + vo.setFinalAcceptanceMaterials(project.getFinalAcceptanceMaterials()); + // TODO IRS接口获取 应用信息 + vo.setApps(Collections.emptyList()); + } + + return vo; + } + + /** + * 开启流程 + * @param dto + * @return + */ + public String startProcess(DefaultDeclaredDTO dto) { + + return null; + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/FinalAcceptanceVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/FinalAcceptanceVO.java new file mode 100644 index 0000000..6fa5ebd --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/FinalAcceptanceVO.java @@ -0,0 +1,33 @@ +package com.ningdatech.pmapi.projectdeclared.model.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @Classname FinalAcceptanceVO + * @Description 终验 + * @Date 2023/5/29 10:00 + * @Author PoffyZhang + */ +@ApiModel(value = "终验", description = "终验") +@Data +@AllArgsConstructor +@NoArgsConstructor +public class FinalAcceptanceVO { + + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("关联应用信息") + private List apps; + + @ApiModelProperty("终验材料") + private String finalAcceptanceMaterials; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java index 3811a99..e5c1ff2 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java @@ -291,6 +291,9 @@ public class ProjectDTO implements Serializable { @ApiModelProperty("项目申报书") private String projectApplicationForm; + @ApiModelProperty("终验材料") + private String finalAcceptanceMaterials; + private Map dynamicForm; }