PoffyZhang 1 год назад
Родитель
Сommit
5b40675262
5 измененных файлов: 93 добавлений и 6 удалений
  1. +7
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java
  2. +24
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/FinalAcceptanceController.java
  3. +26
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/FinalAcceptanceManage.java
  4. +33
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/FinalAcceptanceVO.java
  5. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java

+ 7
- 6
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<DingOrganization> dingOrganizationList = iDingOrganizationService.list();
// 获取所有的组织列表用户获取组织下的 用户信息(暂时 只查 单位的类型)
List<DingOrganization> 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<OrganizationEmployeePosition> allOrganizationEmployeePositionList = new ArrayList<>();
String organizationCode = dingOrganization.getOrganizationCode();
PageOrganizationEmployeePositionsQuery query = new PageOrganizationEmployeePositionsQuery();


+ 24
- 0
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<ProjectLibListItemVO> 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 + "】 成功";
}
}

+ 26
- 0
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;
}
}

+ 33
- 0
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<Object> apps;

@ApiModelProperty("终验材料")
private String finalAcceptanceMaterials;

}

+ 3
- 0
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<String,Object> dynamicForm;

}

Загрузка…
Отмена
Сохранить