PoffyZhang vor 1 Jahr
Ursprung
Commit
4155199d96
5 geänderte Dateien mit 24 neuen und 8 gelöschten Zeilen
  1. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/OperationController.java
  2. +16
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/OperationManage.java
  3. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PurchaseManage.java
  4. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  5. +1
    -1
      pmapi/src/test/java/com/ningdatech/pmapi/irs/IrsTest.java

+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/OperationController.java Datei anzeigen

@@ -32,9 +32,9 @@ public class OperationController {
return operationManage.detail(projectId);
}

@GetMapping("/push-operation")
@ApiOperation("推送实施信息")
@WebLog("推送实施信息")
@PostMapping("/push-operation")
@ApiOperation("填写实施计划")
@WebLog("填写实施计划")
public String pushOperation(@RequestBody OperationDTO operation) {
return operationManage.pushOperation(operation);
}


+ 16
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/OperationManage.java Datei anzeigen

@@ -4,10 +4,12 @@ import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectdeclared.model.dto.OperationDTO;
import com.ningdatech.pmapi.projectdeclared.model.entity.Operation;
import com.ningdatech.pmapi.projectdeclared.model.vo.OperationVO;
import com.ningdatech.pmapi.projectdeclared.service.IOperationService;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
@@ -34,6 +36,8 @@ public class OperationManage {

private final IProjectService projectService;

private final StateMachineUtils stateMachineUtils;

/**
* 获取实施详情
* @param projectId
@@ -45,7 +49,7 @@ public class OperationManage {
.throwMessage("项目不存在!");

Operation operation = operationService.getOne(Wrappers.lambdaQuery(Operation.class)
.eq(Operation::getProjectId, project.getProjectCode())
.eq(Operation::getProjectCode, project.getProjectCode())
.last(BizConst.LIMIT_1));

return BeanUtil.copyProperties(operation,OperationVO.class);
@@ -58,8 +62,13 @@ public class OperationManage {
VUtils.isTrue(Objects.isNull(project))
.throwMessage("项目不存在!");

//首先要判断 项目当前状态 是不是 待开工状态
VUtils.isTrue(!ProjectStatusEnum.OPERATION.getCode().equals(project.getStatus()) ||
!ProjectStatusEnum.PROJECT_APPROVED.getCode().equals(project.getStage()))
.throwMessage("提交失败 该项目不是 待开工或者已立项阶段");

Operation old = operationService.getOne(Wrappers.lambdaQuery(Operation.class)
.eq(Operation::getProjectId, project.getProjectCode())
.eq(Operation::getProjectCode, project.getProjectCode())
.last(BizConst.LIMIT_1));

Operation entity = BeanUtil.copyProperties(operation, Operation.class);
@@ -72,7 +81,11 @@ public class OperationManage {
entity.setProjectCode(project.getProjectCode());
entity.setUpdateOn(LocalDateTime.now());
entity.setUpdateBy(user.getUsername());
operationService.saveOrUpdate(entity);
if(operationService.saveOrUpdate(entity)){
stateMachineUtils.pass(project);
project.setUpdateOn(LocalDateTime.now());
projectService.updateById(project);
}

return entity.getProjectCode();
}


+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PurchaseManage.java Datei anzeigen

@@ -74,7 +74,8 @@ public class PurchaseManage {
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);
//待采购状态
query.eq(Project::getStatus, ProjectStatusEnum.TO_BE_PURCHASED.getCode());
query.in(Project::getStatus, Lists.newArrayList(ProjectStatusEnum.TO_BE_PURCHASED.getCode(),
ProjectStatusEnum.OPERATION.getCode()));
query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode());
query.eq(Project::getNewest, Boolean.TRUE);
query.orderByAsc(Project::getApprovalDate);


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Datei anzeigen

@@ -1709,6 +1709,8 @@ public class TodoCenterManage {

Map<Long, Project> projectsMap = projects.stream().collect(Collectors.toMap(Project::getId, v -> v));
Map<String, Project> projectInfoMap = projectInstList.stream()
.filter(p -> StringUtils.isNotBlank(p.getInstCode()) &&
!TodoCenterConstant.Declared.NULL_INST_CODE.equals(p.getInstCode()))
.collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId())));
// 关联项目信息
List<Project> projectList = list.stream()


+ 1
- 1
pmapi/src/test/java/com/ningdatech/pmapi/irs/IrsTest.java Datei anzeigen

@@ -45,7 +45,7 @@ public class IrsTest extends AppTests {
public void test1(){
String method = "GET";
String url = "https://bcdsg.zj.gov.cn:8443/restapi/prod/IC33000020230427000001/irs-res-bill/report/pdfUrl" +
"?appCode=A331123467587202307014177";
"?appCode=A331101453557202109017383";
String appScret = "BCDSGS_4ab4235d26a9a357170a39f3a13fd68c";
String appKey = "BCDSGA_d874c8e46b541eb4e8aac6510fd3351b";



Laden…
Abbrechen
Speichern