@@ -30,7 +30,8 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; | |||
"com.ningdatech.pmapi.ding.controller", | |||
"com.ningdatech.pmapi.filemanage.controller", | |||
"com.ningdatech.pmapi.performance.controller", | |||
"com.ningdatech.pmapi.irs.controller" | |||
"com.ningdatech.pmapi.irs.controller", | |||
"com.ningdatech.pmapi.safety.controller" | |||
}) | |||
public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | |||
@@ -37,7 +37,6 @@ public class AnnualPlanController { | |||
@GetMapping("/list") | |||
@ApiOperation("年度计划库列表") | |||
@WebLog("年度计划库列表") | |||
public PageVo<AnnualPlanListItemVO> annualPlanLibList(ProjectListReq req) { | |||
return annualPlanLibManage.annulPlanLibList(req); | |||
} | |||
@@ -9,6 +9,7 @@ import com.ningdatech.pmapi.projectdeclared.model.entity.Contract; | |||
import com.ningdatech.pmapi.projectdeclared.model.vo.ContractVO; | |||
import com.ningdatech.pmapi.projectdeclared.model.vo.PreInsAcceptancePersonVO; | |||
import com.ningdatech.pmapi.projectdeclared.model.vo.PurchaseVO; | |||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | |||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; | |||
import com.ningdatech.pmapi.todocenter.model.vo.ProcessProgressDetailVo; | |||
import io.swagger.annotations.ApiModel; | |||
@@ -418,4 +419,22 @@ public class ProjectDetailVO { | |||
this.dynamicForm = JSON.parseObject(dynamicFormStr, Map.class); | |||
} | |||
} | |||
@ApiModelProperty("项目阶段中文") | |||
private String stageName; | |||
public String getStageName(){ | |||
if(Objects.nonNull(this.stage)){ | |||
return ProjectStatusEnum.getDesc(this.stage); | |||
} | |||
return StringUtils.EMPTY; | |||
} | |||
@ApiModelProperty("项目状态中文") | |||
private String statusName; | |||
public String getStatusName(){ | |||
if(Objects.nonNull(this.status)){ | |||
return ProjectStatusEnum.getDesc(this.status); | |||
} | |||
return StringUtils.EMPTY; | |||
} | |||
} |
@@ -0,0 +1,54 @@ | |||
package com.ningdatech.pmapi.safety.controller; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||
import com.ningdatech.pmapi.safety.manage.SafetyRiskManage; | |||
import com.ningdatech.pmapi.safety.model.vo.ProjectMonitorVO; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import lombok.RequiredArgsConstructor; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PathVariable; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* @Classname SafetyRiskController | |||
* @Description | |||
* @Date 2023/8/2 9:15 | |||
* @Author PoffyZhang | |||
*/ | |||
@RestController | |||
@RequiredArgsConstructor | |||
@Api(tags = "安全风险监测") | |||
@RequestMapping("/api/v1/safety-risk") | |||
public class SafetyRiskController { | |||
private final SafetyRiskManage safetyRiskManage; | |||
@GetMapping("/person-monitor/list") | |||
@ApiOperation("安全人员监控列表") | |||
public PageVo<ProjectMonitorVO> personMonitorList(ProjectListReq req) { | |||
return safetyRiskManage.personMonitorList(req); | |||
} | |||
@GetMapping("/person-monitor/detail/{projectCode}") | |||
@ApiOperation("安全人员监控详情") | |||
public ProjectMonitorVO personMonitorDetail(@PathVariable String projectCode) { | |||
return safetyRiskManage.personMonitorDetail(projectCode); | |||
} | |||
@GetMapping("/operation-monitor/list") | |||
@ApiOperation("安全运行监控列表") | |||
public PageVo<ProjectMonitorVO> operationnMonitorList(ProjectListReq req) { | |||
return safetyRiskManage.operationnMonitorList(req); | |||
} | |||
@GetMapping("/operation-monitor/search/{projectCode}") | |||
@ApiOperation("安全运行监控-查询监测(对接外部平台)") | |||
public JSONObject operationnMonitorList(@PathVariable String projectCode) { | |||
return safetyRiskManage.operationnMonitorSearch(projectCode); | |||
} | |||
} |
@@ -0,0 +1,34 @@ | |||
package com.ningdatech.pmapi.safety.manage; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.ningdatech.basic.model.PageVo; | |||
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; | |||
import com.ningdatech.pmapi.safety.model.vo.ProjectMonitorVO; | |||
import org.springframework.stereotype.Component; | |||
/** | |||
* @Classname SafetyRiskManage | |||
* @Description | |||
* @Date 2023/8/2 9:17 | |||
* @Author PoffyZhang | |||
*/ | |||
@Component | |||
public class SafetyRiskManage { | |||
public PageVo<ProjectMonitorVO> personMonitorList(ProjectListReq req) { | |||
return null; | |||
} | |||
public ProjectMonitorVO personMonitorDetail(String projectCode) { | |||
return null; | |||
} | |||
public PageVo<ProjectMonitorVO> operationnMonitorList(ProjectListReq req) { | |||
return null; | |||
} | |||
public JSONObject operationnMonitorSearch(String projectCode) { | |||
return null; | |||
} | |||
} |
@@ -0,0 +1,75 @@ | |||
package com.ningdatech.pmapi.safety.model.vo; | |||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | |||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.util.Objects; | |||
import java.util.Optional; | |||
/** | |||
* @Classname ProjectMonitorVO | |||
* @Description | |||
* @Date 2023/8/2 9:19 | |||
* @Author PoffyZhang | |||
*/ | |||
@Data | |||
@ApiModel(value = "ProjectMonitorVO", description = "项目监控VO") | |||
public class ProjectMonitorVO { | |||
@ApiModelProperty("项目ID") | |||
private Long id; | |||
@ApiModelProperty("项目名称") | |||
private String projectName; | |||
@ApiModelProperty("申报单位code") | |||
private String buildOrgCode; | |||
@ApiModelProperty("申报单位名") | |||
private String buildOrgName; | |||
@ApiModelProperty("项目年度") | |||
private Integer projectYear; | |||
@ApiModelProperty("项目类型") | |||
private Integer projectType; | |||
@ApiModelProperty("项目类型名") | |||
private String projectTypeName; | |||
public String getProjectTypeName() { | |||
if (Objects.nonNull(this.projectType)) { | |||
Optional.ofNullable(ProjectTypeEnum.getDesc(this.projectType)) | |||
.ifPresent(desc -> this.projectTypeName = desc); | |||
} | |||
return this.projectTypeName; | |||
} | |||
@ApiModelProperty("项目阶段") | |||
private Integer stage; | |||
@ApiModelProperty("项目状态") | |||
private Integer status; | |||
@ApiModelProperty("项目阶段中文") | |||
private String stageName; | |||
public String getStageName(){ | |||
if(Objects.nonNull(this.stage)){ | |||
return ProjectStatusEnum.getDesc(this.stage); | |||
} | |||
return StringUtils.EMPTY; | |||
} | |||
@ApiModelProperty("项目状态中文") | |||
private String statusName; | |||
public String getStatusName(){ | |||
if(Objects.nonNull(this.status)){ | |||
return ProjectStatusEnum.getDesc(this.status); | |||
} | |||
return StringUtils.EMPTY; | |||
} | |||
} |