| | |
| | | public Object putWasteInfo(@RequestBody HazardousWaste hazardousWaste){ |
| | | try { |
| | | if (StringUtils.isBlank(hazardousWaste.getDepartment()) || StringUtils.isBlank(hazardousWaste.getApplyPerson()) |
| | | || StringUtils.isBlank(hazardousWaste.getProject()) || StringUtils.isBlank(hazardousWaste.getUnit()) |
| | | || StringUtils.isBlank(hazardousWaste.getCreator())){ |
| | | return ResponseModel.getErrInstance("部门、单位、课题组、确认者、创建者、不能为空"); |
| | | || StringUtils.isBlank(hazardousWaste.getProject()) || StringUtils.isBlank(hazardousWaste.getCreator())){ |
| | | return ResponseModel.getErrInstance("部门、课题组、确认者、创建者、不能为空"); |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | hazardousWaste.setTid(sdf.format(new Date())); |
| | | hazardousWaste.setCreateTime(new Date()); |
| | | hazardousWaste.setStatus("待确认"); |
| | | HazardousWasteUser sysUser = sysUserService.getUserByAccount(hazardousWaste.getApplyPerson()); |
| | | hazardousWaste.setUnit( sysUser.getCompany()); |
| | | if (hazardousWaste.getAcid()== null){ |
| | | hazardousWaste.setAcid(new BigDecimal(0)); |
| | | } |