|
|
@ -2,7 +2,9 @@ package com.zdxt.app.controller; |
|
|
|
|
|
|
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import cn.hutool.core.util.IdUtil; |
|
|
import com.zdxt.auth.dto.DeptBean; |
|
|
import com.zdxt.auth.dto.DeptBean; |
|
|
|
|
|
import com.zdxt.auth.dto.DictDataBean; |
|
|
import com.zdxt.auth.dto.UserBean; |
|
|
import com.zdxt.auth.dto.UserBean; |
|
|
|
|
|
import com.zdxt.auth.feign.DictDataApi; |
|
|
import com.zdxt.auth.feign.UserApi; |
|
|
import com.zdxt.auth.feign.UserApi; |
|
|
import com.zdxt.code.domain.*; |
|
|
import com.zdxt.code.domain.*; |
|
|
import com.zdxt.code.service.*; |
|
|
import com.zdxt.code.service.*; |
|
|
@ -35,13 +37,13 @@ public class AppEnforcementRegistrationController extends BaseController |
|
|
{ |
|
|
{ |
|
|
private String prefix = "project/code/registration"; |
|
|
private String prefix = "project/code/registration"; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired private IEnforcementRegistrationService enforcementRegistrationService; |
|
|
private IEnforcementRegistrationService enforcementRegistrationService; |
|
|
|
|
|
@Autowired private ILinkageDictService iLinkageDictService; |
|
|
@Autowired private ILinkageDictService iLinkageDictService; |
|
|
@Autowired private IEnterpriseComplaintService enterpriseComplaintService; |
|
|
@Autowired private IEnterpriseComplaintService enterpriseComplaintService; |
|
|
@Autowired private IEnterpriseInformationService iEnterpriseInformationService; |
|
|
@Autowired private IEnterpriseInformationService iEnterpriseInformationService; |
|
|
@Autowired private IZqyjjdm137344Service iZqyjjdm137344Service; |
|
|
@Autowired private IZqyjjdm137344Service iZqyjjdm137344Service; |
|
|
@Autowired private UserApi userApi; |
|
|
@Autowired private UserApi userApi; |
|
|
|
|
|
@Autowired private DictDataApi dictDataApi; |
|
|
|
|
|
|
|
|
@RequiresPermissions("code:registration:view") |
|
|
@RequiresPermissions("code:registration:view") |
|
|
@GetMapping() |
|
|
@GetMapping() |
|
|
@ -337,7 +339,6 @@ public class AppEnforcementRegistrationController extends BaseController |
|
|
UserBean userBean = userApi.getUserByUserId(userId); |
|
|
UserBean userBean = userApi.getUserByUserId(userId); |
|
|
EnforcementRegistration registration = enforcementRegistrationService.getByDeptIdAndEnterpriseNumber(userBean.getDeptId(), enterpriseInformation.getEnterpriseNumber()); |
|
|
EnforcementRegistration registration = enforcementRegistrationService.getByDeptIdAndEnterpriseNumber(userBean.getDeptId(), enterpriseInformation.getEnterpriseNumber()); |
|
|
// 执法人员需要展示用户名+执法码
|
|
|
// 执法人员需要展示用户名+执法码
|
|
|
// List<UserBean> userBeans = userApi.getUserByUserIds(registration.getLawEnforcerIdTwo());
|
|
|
|
|
|
List<UserBean> userBeans = new ArrayList<>(); |
|
|
List<UserBean> userBeans = new ArrayList<>(); |
|
|
if (StringUtils.isNotEmpty(registration.getLawEnforcerIdTwo())) { |
|
|
if (StringUtils.isNotEmpty(registration.getLawEnforcerIdTwo())) { |
|
|
userBeans = userApi.getUserByUserIds(registration.getLawEnforcerIdTwo()); |
|
|
userBeans = userApi.getUserByUserIds(registration.getLawEnforcerIdTwo()); |
|
|
@ -351,12 +352,36 @@ public class AppEnforcementRegistrationController extends BaseController |
|
|
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1); |
|
|
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1); |
|
|
} |
|
|
} |
|
|
registration.setLawEnforcer2Show(tmpUserShow); |
|
|
registration.setLawEnforcer2Show(tmpUserShow); |
|
|
|
|
|
|
|
|
|
|
|
// 字典回显
|
|
|
|
|
|
DictDataBean dictParams = new DictDataBean(); |
|
|
|
|
|
// 执法领域
|
|
|
|
|
|
if (StringUtils.isNotEmpty(registration.getLawField())) { |
|
|
|
|
|
dictParams.setDictType("law_field"); |
|
|
|
|
|
List<DictDataBean> dicts = dictDataApi.getDictData(dictParams); |
|
|
|
|
|
for (DictDataBean d : dicts) { |
|
|
|
|
|
if (d.getDictValue().equals(registration.getLawField())) { |
|
|
|
|
|
registration.setLawFieldText(d.getDictLabel()); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 执法类别
|
|
|
|
|
|
if (StringUtils.isNotEmpty(registration.getCheckCategory())) { |
|
|
|
|
|
dictParams.setDictType("check_category"); |
|
|
|
|
|
List<DictDataBean> dicts = dictDataApi.getDictData(dictParams); |
|
|
|
|
|
for (DictDataBean d : dicts) { |
|
|
|
|
|
if (d.getDictValue().equals(registration.getCheckCategory())) { |
|
|
|
|
|
registration.setCheckCategoryText(d.getDictLabel()); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (null!=registration && StringUtils.isNotEmpty(registration.getId())) { |
|
|
if (null!=registration && StringUtils.isNotEmpty(registration.getId())) { |
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
LinkageDict tmp = iLinkageDictService.selectLinkageDictById(registration.getLawEnforcementItem()); |
|
|
LinkageDict tmp = iLinkageDictService.selectLinkageDictById(registration.getLawEnforcementItem()); |
|
|
params.put("lawEnforcementItemText", null != tmp ? tmp.getTitle() : ""); |
|
|
params.put("lawEnforcementItemText", null != tmp ? tmp.getTitle() : ""); |
|
|
// tmp = iLinkageDictService.selectLinkageDictById(registration.getLawEnforcementBasis());
|
|
|
|
|
|
// params.put("lawEnforcementBasisText", null != tmp ? tmp.getTitle() : "");
|
|
|
|
|
|
registration.setParams(params); |
|
|
registration.setParams(params); |
|
|
return ZDResponse.success("查询成功", registration); |
|
|
return ZDResponse.success("查询成功", registration); |
|
|
} |
|
|
} |
|
|
|