| | |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.enums.TargetDutyResultCodes; |
| | | import com.gkhy.safePlatform.targetDuty.enums.TargetMngLevelEnum; |
| | | import com.gkhy.safePlatform.targetDuty.excepiton.TargetDutyException; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetCheckAndSubmitQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngImportExcel; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngQueryCriteria; |
| | |
| | | |
| | | return this.targetMngService.queryAll(pageQuery); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | |
| | | */ |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody TargetMng targetMng) { |
| | | |
| | | if (TargetMngLevelEnum.getByCode(targetMng.getLevel())==null){ |
| | | throw new TargetDutyException(TargetDutyResultCodes.TARGET_MNG_ENUM_LEVEL_NOT_EXIST); |
| | | } |
| | | |
| | | if( !StringUtils.hasText(targetMng.getqName()) || !StringUtils.hasText(targetMng.getIndexNum()) |
| | | || !StringUtils.hasText(targetMng.getYear()) || !StringUtils.hasText(targetMng.getValue()) |
| | |
| | | mng.setIndexNum("3"); |
| | | mng.setYear("2021"); |
| | | mng.setValue("312"); |
| | | mng.setLevel(1); |
| | | mng.setLevel((byte)1); |
| | | mng.setCompleteDate(new Timestamp(new java.util.Date().getTime())); |
| | | mng.setMemo("发发发"); |
| | | mng.setTargetType(0); |
| | |
| | | System.out.println(JSONObject.toJSONString(mng)); |
| | | |
| | | } |
| | | } |
| | | } |