| | |
| | | import com.gkhy.labRiskManage.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.labRiskManage.domain.riskReport.model.dto.AssessPlanUpdateDTO; |
| | | import com.gkhy.labRiskManage.domain.riskReport.model.dto.FactorQueryDTO; |
| | | import com.gkhy.labRiskManage.domain.riskReport.service.RiskAssessPlanService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private RiskAccessAppService riskAccessAppService; |
| | | |
| | | @Autowired |
| | | private RiskAssessPlanService riskAssessPlanService;; |
| | | |
| | | /** |
| | | * 风险评估计划 - 插入 |
| | |
| | | result.setTotal(queryResult.getTotal()); |
| | | result.setCount(queryResult.getTotal().intValue()); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/update/appoint") |
| | | public Result appoint(@RequestBody AppointUserReBO appointUserReBO){ |
| | | |
| | | Result result = new Result(); |
| | | result.setCode(ResultCode.OK); |
| | | result.setMsg("已经重新指定专家"); |
| | | |
| | | AssessPlanUpdateDTO assessPlanUpdateDTO = riskAccessAppService.appoint(getCurrentUserId(), appointUserReBO); |
| | | if (ObjectUtils.isEmpty(assessPlanUpdateDTO)){ |
| | | result.setCode(ResultCode.NOT_OK); |
| | | result.setMsg("重新指定专家失败"); |
| | | return result; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | |
| | | /** |
| | | * 风险评估计划 - 重新指定专家 |
| | | */ |
| | | @PostMapping("/update/appoint") |
| | | public Result appoint(@RequestBody AppointUserReBO appointUserReBO){ |
| | | @PostMapping("/update/appointNew") |
| | | public Result appointNew(@RequestBody AppointUserTypeReBO appointUserReBO){ |
| | | |
| | | Result result = new Result(); |
| | | result.setCode(ResultCode.OK); |
| | | result.setMsg("已经重新指定专家"); |
| | | |
| | | AssessPlanUpdateDTO assessPlanUpdateDTO = riskAccessAppService.appoint(getCurrentUserId(), appointUserReBO); |
| | | if (ObjectUtils.isEmpty(assessPlanUpdateDTO)){ |
| | | int i = riskAssessPlanService.appointNew(getCurrentUserId(), appointUserReBO); |
| | | if (i < 1){ |
| | | result.setCode(ResultCode.NOT_OK); |
| | | result.setMsg("重新指定专家失败"); |
| | | return result; |
| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 风险辨识与评价 - 查询 |
| | | */ |