| | |
| | | if (StringUtils.isEmpty(entity.getExecuteDeptName()) && entity.getExecuteDeptName()!=null){ |
| | | entity.setExecuteDeptName(deptService.getDeptAllName(entity.getExecuteDeptId())); |
| | | } |
| | | if (entity.getCompanyId()==null |
| | | || StringUtils.isEmpty(entity.getCompanyName()) |
| | | || StringUtils.isEmpty(entity.getCompanyUser()) |
| | | || StringUtils.isEmpty(entity.getCompanyPhone()) |
| | | ){ |
| | | throw new BaseException("投诉企业不能为空!"); |
| | | } |
| | | if (entity.getExecuteDeptId() == null |
| | | || StringUtils.isEmpty(entity.getExecuteDeptName()) |
| | | ){ |
| | | throw new BaseException("投诉单位不能为空!"); |
| | | } |
| | | if (StringUtils.isEmpty(entity.getComplaintType())){ |
| | | throw new BaseException("请选择要投诉类型!"); |
| | | } |
| | | if (StringUtils.isEmpty(entity.getComplaintReason())){ |
| | | throw new BaseException("请填写投诉内容!"); |
| | | } |
| | | if (entity.getId()==null){ |
| | | if (entity.getCompanyId()==null |
| | | || StringUtils.isEmpty(entity.getCompanyName()) |
| | | || StringUtils.isEmpty(entity.getCompanyUser()) |
| | | || StringUtils.isEmpty(entity.getCompanyPhone()) |
| | | ){ |
| | | throw new BaseException("投诉企业不能为空!"); |
| | | } |
| | | if (entity.getExecuteDeptId() == null |
| | | || StringUtils.isEmpty(entity.getExecuteDeptName()) |
| | | ){ |
| | | throw new BaseException("投诉单位不能为空!"); |
| | | } |
| | | if (StringUtils.isEmpty(entity.getComplaintType())){ |
| | | throw new BaseException("请选择要投诉类型!"); |
| | | } |
| | | if (StringUtils.isEmpty(entity.getComplaintReason())){ |
| | | throw new BaseException("请填写投诉内容!"); |
| | | } |
| | | |
| | | if (entity.getOrderId()!=null){ //执法单投诉 |
| | | int count = this.count(lq().eq(EnforceComplaintLog::getOrderId, entity.getOrderId())); |
| | | if (count >0){ |