|
|
@ -5,12 +5,16 @@ import java.util.List; |
|
|
import cn.hutool.core.convert.Convert; |
|
|
import cn.hutool.core.convert.Convert; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
|
import com.zdxt.auth.dto.UserBean; |
|
|
|
|
|
import com.zdxt.auth.feign.UserApi; |
|
|
|
|
|
import com.zdxt.auth.feign.ZdxtFileCommonApi; |
|
|
import com.zdxt.code.domain.EnforcementRegistration; |
|
|
import com.zdxt.code.domain.EnforcementRegistration; |
|
|
import com.zdxt.code.domain.EnterpriseEvaluate; |
|
|
import com.zdxt.code.domain.EnterpriseEvaluate; |
|
|
import com.zdxt.code.mapper.EnforcementRegistrationMapper; |
|
|
import com.zdxt.code.mapper.EnforcementRegistrationMapper; |
|
|
import com.zdxt.code.mapper.EnterpriseEvaluateMapper; |
|
|
import com.zdxt.code.mapper.EnterpriseEvaluateMapper; |
|
|
import com.zdxt.code.service.IEnterpriseEvaluateService; |
|
|
import com.zdxt.code.service.IEnterpriseEvaluateService; |
|
|
import com.zdxt.common.util.DateUtils; |
|
|
import com.zdxt.common.util.DateUtils; |
|
|
|
|
|
import com.zdxt.common.zdxtFile.ZdxtFileCommon; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
@ -30,6 +34,12 @@ public class EnterpriseEvaluateServiceImpl implements IEnterpriseEvaluateService |
|
|
@Autowired |
|
|
@Autowired |
|
|
private EnforcementRegistrationMapper enforcementRegistrationMapper; |
|
|
private EnforcementRegistrationMapper enforcementRegistrationMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private UserApi userApi; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private ZdxtFileCommonApi zdxtFileCommonApi; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 查询企业端-执法评价 |
|
|
* 查询企业端-执法评价 |
|
|
* |
|
|
* |
|
|
@ -69,6 +79,8 @@ public class EnterpriseEvaluateServiceImpl implements IEnterpriseEvaluateService |
|
|
@Override |
|
|
@Override |
|
|
public int insertEnterpriseEvaluate(EnterpriseEvaluate enterpriseEvaluate) |
|
|
public int insertEnterpriseEvaluate(EnterpriseEvaluate enterpriseEvaluate) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
UserBean user = userApi.getUserByUserId(enterpriseEvaluate.getUserId()); |
|
|
enterpriseEvaluate.setCreateTime(DateUtils.getNowDate()); |
|
|
enterpriseEvaluate.setCreateTime(DateUtils.getNowDate()); |
|
|
enterpriseEvaluate.setId(IdUtil.simpleUUID()); |
|
|
enterpriseEvaluate.setId(IdUtil.simpleUUID()); |
|
|
|
|
|
|
|
|
@ -81,6 +93,22 @@ public class EnterpriseEvaluateServiceImpl implements IEnterpriseEvaluateService |
|
|
enterpriseEvaluate.setEnterpriseNumber(enforcementRegistration.getEnterpriseNumber()); |
|
|
enterpriseEvaluate.setEnterpriseNumber(enforcementRegistration.getEnterpriseNumber()); |
|
|
} |
|
|
} |
|
|
int i = enterpriseEvaluateMapper.insertEnterpriseEvaluate(enterpriseEvaluate); |
|
|
int i = enterpriseEvaluateMapper.insertEnterpriseEvaluate(enterpriseEvaluate); |
|
|
|
|
|
|
|
|
|
|
|
if(i > 0 && enterpriseEvaluate.getFileList().size() > 0){ |
|
|
|
|
|
enterpriseEvaluate.getFileList().forEach(res ->{ |
|
|
|
|
|
ZdxtFileCommon zdxtFileCommon = new ZdxtFileCommon(); |
|
|
|
|
|
zdxtFileCommon.setBusinessId(enterpriseEvaluate.getId()); |
|
|
|
|
|
zdxtFileCommon.setGuid(IdUtil.simpleUUID()); |
|
|
|
|
|
//文件后缀
|
|
|
|
|
|
zdxtFileCommon.setFileSuffix("JPG"); |
|
|
|
|
|
zdxtFileCommon.setUploadPath(res); |
|
|
|
|
|
zdxtFileCommon.setUploadPersonId(null==user.getUserId()?"":user.getUserId().toString()); |
|
|
|
|
|
zdxtFileCommon.setUploadPersonName(null==user.getUserName()?"":user.getUserName()); |
|
|
|
|
|
zdxtFileCommonApi.addZdxtFileCommon(zdxtFileCommon); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(i > 0){ |
|
|
if(i > 0){ |
|
|
//变更执法登记是否评价状态
|
|
|
//变更执法登记是否评价状态
|
|
|
EnforcementRegistration enforcementRegistration1 = new EnforcementRegistration(); |
|
|
EnforcementRegistration enforcementRegistration1 = new EnforcementRegistration(); |
|
|
|