@@ -64,14 +64,15 @@ public class EmployeeBatchGetTask { | |||||
@Transactional(rollbackFor = Exception.class) | @Transactional(rollbackFor = Exception.class) | ||||
// @Scheduled(cron = "0 0 1 * * ?") | // @Scheduled(cron = "0 0 1 * * ?") | ||||
public void batchGetEmployeeTask() { | 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)) { | if (CollUtil.isNotEmpty(dingOrganizationList)) { | ||||
//记录任务 单位数 | |||||
Integer index = 0; | |||||
for (DingOrganization dingOrganization : dingOrganizationList) { | 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<>(); | List<OrganizationEmployeePosition> allOrganizationEmployeePositionList = new ArrayList<>(); | ||||
String organizationCode = dingOrganization.getOrganizationCode(); | String organizationCode = dingOrganization.getOrganizationCode(); | ||||
PageOrganizationEmployeePositionsQuery query = new PageOrganizationEmployeePositionsQuery(); | PageOrganizationEmployeePositionsQuery query = new PageOrganizationEmployeePositionsQuery(); | ||||
@@ -1,7 +1,10 @@ | |||||
package com.ningdatech.pmapi.projectdeclared.controller; | package com.ningdatech.pmapi.projectdeclared.controller; | ||||
import com.ningdatech.basic.model.PageVo; | 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.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.req.ProjectListReq; | ||||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | ||||
import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
@@ -11,6 +14,8 @@ import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||
import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
import javax.servlet.http.HttpServletResponse; | |||||
/** | /** | ||||
* @Classname FinalAcceptanceController | * @Classname FinalAcceptanceController | ||||
@@ -32,4 +37,23 @@ public class FinalAcceptanceController { | |||||
public PageVo<ProjectLibListItemVO> projectlist(@ModelAttribute ProjectListReq req) { | public PageVo<ProjectLibListItemVO> projectlist(@ModelAttribute ProjectListReq req) { | ||||
return finalAcceptanceManage.projectLibList(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 + "】 成功"; | |||||
} | |||||
} | } |
@@ -18,10 +18,12 @@ import com.ningdatech.pmapi.common.util.ExcelDownUtil; | |||||
import com.ningdatech.pmapi.common.util.ExcelExportStyle; | import com.ningdatech.pmapi.common.util.ExcelExportStyle; | ||||
import com.ningdatech.pmapi.projectdeclared.model.dto.ContractSaveDTO; | import com.ningdatech.pmapi.projectdeclared.model.dto.ContractSaveDTO; | ||||
import com.ningdatech.pmapi.projectdeclared.model.dto.DeclaredProjectExportDTO; | 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.Contract; | ||||
import com.ningdatech.pmapi.projectdeclared.model.entity.PaymentPlan; | import com.ningdatech.pmapi.projectdeclared.model.entity.PaymentPlan; | ||||
import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; | import com.ningdatech.pmapi.projectdeclared.model.entity.Purchase; | ||||
import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; | 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.model.vo.PaymentPlanVO; | ||||
import com.ningdatech.pmapi.projectdeclared.service.IContractService; | import com.ningdatech.pmapi.projectdeclared.service.IContractService; | ||||
import com.ningdatech.pmapi.projectdeclared.service.IPaymentPlanService; | import com.ningdatech.pmapi.projectdeclared.service.IPaymentPlanService; | ||||
@@ -302,4 +304,28 @@ public class FinalAcceptanceManage { | |||||
return "填写成功"; | 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; | |||||
} | |||||
} | } |
@@ -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; | |||||
} |
@@ -291,6 +291,9 @@ public class ProjectDTO implements Serializable { | |||||
@ApiModelProperty("项目申报书") | @ApiModelProperty("项目申报书") | ||||
private String projectApplicationForm; | private String projectApplicationForm; | ||||
@ApiModelProperty("终验材料") | |||||
private String finalAcceptanceMaterials; | |||||
private Map<String,Object> dynamicForm; | private Map<String,Object> dynamicForm; | ||||
} | } |