Commit 217929e8 authored by zhangyingbin's avatar zhangyingbin

新增 接受告知接口

parent 4678325d
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum NoticeStatusEnum {
已提交("已提交","0"),
已接收("已接收","1"),
已退回("已退回","2"),
已通过("已通过","3");
String name;
String statusId;
}
package com.yeejoin.amos.boot.module.ugp.api.Enum;
public enum noticeStatusEnum {
已提交("已提交","0"),
已接收("已接收","1"),
已退回("已退回","2");
String name;
String statusId;
noticeStatusEnum(String name, String statusId) {
this.name = name;
this.statusId = statusId;
}
}
package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.yeejoin.amos.boot.module.ugp.api.Enum.NoticeStatusEnum;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectInitiationServiceImpl;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
......@@ -38,6 +42,12 @@ public class InstallNoticeController extends BaseController {
@Autowired
InstallNoticeServiceImpl installNoticeServiceImpl;
@Autowired
ProjectInitiationServiceImpl projectInitiationServiceImpl;
@Autowired
ProjectServiceImpl projectServiceImpl;
/**
* 新增安装告知表
*
......@@ -196,4 +206,15 @@ public class InstallNoticeController extends BaseController {
model = installNoticeServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@PostMapping(value = "/acceptNotification")
@ApiOperation(httpMethod = "get", value = "接受告知", notes = "接受告知")
public ResponseModel<Boolean> acceptNotification(Long sequenceNbr){
InstallNotice installNotice = installNoticeServiceImpl.getById(sequenceNbr);
installNotice.setNoticeStatus(NoticeStatusEnum.已接收.getName());
Project project = projectServiceImpl.getById(installNotice.getProjectId());
projectInitiationServiceImpl.execute(project.getInstanceId(),installNotice,NoticeStatusEnum.已接收.getStatusId());
return ResponseHelper.buildResponse(installNoticeServiceImpl.updateById(installNotice));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment