ZQN
2024-06-24 b003b843a47f87bc47f870274d5d012d5208f00b
project-enforce/src/main/java/com/project/enforce/service/impl/EnforceComplaintLogServiceImpl.java
@@ -140,25 +140,26 @@
        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){