Commit cb71725c authored by suhuiguang's avatar suhuiguang

1.调整安装告知打印时,资质信息只显示安改维类型的

2.安改维企业信息维护时,删除充装单位-1231 制造单位-1236 设计单位-1235 安装改造维修单位-1234,再插入资质,原有只删除1234的,导致非1234资质无法删除
parent 24097fa3
...@@ -113,24 +113,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -113,24 +113,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private static final String CONSTRUCTION_TYPE_NAME = "安装"; private static final String CONSTRUCTION_TYPE_NAME = "安装";
// 西安行政区划code
private static final String XIAN = "610100";
// 咸阳行政区划code
private static final String XIAN_YANG = "610400";
@Value("classpath:/json/urlInfo.json")
public Resource bizTypeInfo;
@Autowired
EquipmentCategoryMapper equipmentCategoryMapper;
@Autowired @Autowired
JgInstallationNoticeEqMapper jgInstallationNoticeEqMapper; JgInstallationNoticeEqMapper jgInstallationNoticeEqMapper;
@Autowired @Autowired
JgInstallationNoticeEqServiceImpl jgInstallationNoticeEqService; JgInstallationNoticeEqServiceImpl jgInstallationNoticeEqService;
@Autowired @Autowired
JgUseRegistrationMapper jgUseRegistrationMapper;
@Autowired
IdxBizJgUseInfoServiceImpl idxBizJgUseInfoService;
@Autowired
IdxBizJgRegisterInfoServiceImpl idxBizJgRegisterInfoService; IdxBizJgRegisterInfoServiceImpl idxBizJgRegisterInfoService;
@Autowired @Autowired
IdxBizJgRegisterInfoMapper tzsJgRegistrationInfoMapper; IdxBizJgRegisterInfoMapper tzsJgRegistrationInfoMapper;
...@@ -143,8 +130,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -143,8 +130,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Autowired @Autowired
SupervisoryCodeInfoMapper supervisoryCodeInfoMapper; SupervisoryCodeInfoMapper supervisoryCodeInfoMapper;
@Autowired @Autowired
SuperviseInfoMapper superviseInfoMapper;
@Autowired
IIdxBizJgConstructionInfoService constructionInfoService; IIdxBizJgConstructionInfoService constructionInfoService;
@Autowired @Autowired
IIdxBizJgUseInfoService useInfoService; IIdxBizJgUseInfoService useInfoService;
...@@ -153,12 +138,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -153,12 +138,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Value(value = "${tzs.domain:http://sxtzsb.sxsei.com}") @Value(value = "${tzs.domain:http://sxtzsb.sxsei.com}")
String TZSDOMAIN; String TZSDOMAIN;
@Autowired @Autowired
AmosRequestContext amosRequestContext;
@Autowired
CodeUtil codeUtil; CodeUtil codeUtil;
@Autowired @Autowired
CommonServiceImpl commonServiceImpl;
@Autowired
JgCertificateChangeRecordServiceImpl certificateChangeRecordService; JgCertificateChangeRecordServiceImpl certificateChangeRecordService;
@Autowired @Autowired
JgCertificateChangeRecordEqServiceImpl certificateChangeRecordEqService; JgCertificateChangeRecordEqServiceImpl certificateChangeRecordEqService;
...@@ -203,6 +184,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -203,6 +184,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
EventPublisher eventPublisher; EventPublisher eventPublisher;
/** /**
* 安装改造维修单位吱资质类型:1234
*/
@Value("${company.type.notice:1234}")
private String companyType;
/**
* 根据sequenceNbr查询 * 根据sequenceNbr查询
* *
* @param sequenceNbr 主键 * @param sequenceNbr 主键
...@@ -610,7 +597,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -610,7 +597,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
ArrayList<Map<String, Object>> maps = new ArrayList<>(); ArrayList<Map<String, Object>> maps = new ArrayList<>();
equList.forEach(equ -> { equList.forEach(equ -> {
List<Map<String, Object>> informationList = jgInstallationNoticeMapper.queryEquipInformation(equ.getSequenceNbr()); List<Map<String, Object>> informationList = jgInstallationNoticeMapper.queryEquipInformation(equ.getSequenceNbr());
if (Objects.isNull(jgInstallationNotice) || CollectionUtils.isEmpty(informationList)) { if (CollectionUtils.isEmpty(informationList)) {
throw new IllegalArgumentException("安装告知单不存在"); throw new IllegalArgumentException("安装告知单不存在");
} }
Map<String, Object> placeholders = fullFillTemplateObj(informationList, BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getName().substring(0, 2)); Map<String, Object> placeholders = fullFillTemplateObj(informationList, BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getName().substring(0, 2));
...@@ -633,8 +620,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -633,8 +620,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
String useCode = String.valueOf(informObj.get("installUnitCreditCode")); String useCode = String.valueOf(informObj.get("installUnitCreditCode"));
LambdaQueryWrapper<TzBaseUnitLicence> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TzBaseUnitLicence> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(TzBaseUnitLicence::getUnitCode, useCode); wrapper.eq(TzBaseUnitLicence::getUnitCode, useCode);
wrapper.eq(TzBaseUnitLicence::getCertTypeCode, companyType);
wrapper.orderByDesc(TzBaseUnitLicence::getExpiryDate); wrapper.orderByDesc(TzBaseUnitLicence::getExpiryDate);
wrapper.orderByDesc(TzBaseUnitLicence::getRecDate); wrapper.orderByDesc(TzBaseUnitLicence::getRecDate);
// 去重显示3个
wrapper.groupBy(TzBaseUnitLicence::getCertNo,TzBaseUnitLicence::getExpiryDate);
wrapper.select(TzBaseUnitLicence::getCertNo,TzBaseUnitLicence::getExpiryDate);
wrapper.last(" LIMIT 3"); wrapper.last(" LIMIT 3");
List<TzBaseUnitLicence> list = baseUnitLicenceMapper.selectList(wrapper); List<TzBaseUnitLicence> list = baseUnitLicenceMapper.selectList(wrapper);
......
...@@ -127,15 +127,16 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -127,15 +127,16 @@ public class TzBaseEnterpriseInfoServiceImpl
* 公司类型下的资质类型map:key为登录人的公司类型、value为包含的资质枚举 * 公司类型下的资质类型map:key为登录人的公司类型、value为包含的资质枚举
*/ */
private static final Map<String ,String> COMPANY_TYPE_CERT_TYPE_MAP = new HashMap<>(); private static final Map<String ,String> COMPANY_TYPE_CERT_TYPE_MAP = new HashMap<>();
// 数据来源cb_data_dictionary type='UNIT_TYPE_NEW' /*
数据来源cb_data_dictionary type='UNIT_TYPE_NEW',目前登录身份分为3个如下
*/
static { static {
// 使用单位资质
COMPANY_TYPE_CERT_TYPE_MAP.put("使用单位", "1232"); COMPANY_TYPE_CERT_TYPE_MAP.put("使用单位", "1232");
COMPANY_TYPE_CERT_TYPE_MAP.put("充装单位", "1231"); // 检验检测机构资质:细分为1233-1、1233-2
// 注意检验检测机构资质细分为1233-1、1233-2
COMPANY_TYPE_CERT_TYPE_MAP.put("检验检测机构", "1233"); COMPANY_TYPE_CERT_TYPE_MAP.put("检验检测机构", "1233");
COMPANY_TYPE_CERT_TYPE_MAP.put("制造单位", "1236"); // 安装改造维修单位身份资质:充装单位-1231 制造单位-1236 设计单位-1235 安装改造维修单位-1234
COMPANY_TYPE_CERT_TYPE_MAP.put("设计单位", "1235"); COMPANY_TYPE_CERT_TYPE_MAP.put("安装改造维修单位", "1231,1234,1235,1236");
COMPANY_TYPE_CERT_TYPE_MAP.put("安装改造维修单位", "1234");
} }
/** /**
...@@ -733,9 +734,15 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -733,9 +734,15 @@ public class TzBaseEnterpriseInfoServiceImpl
private void removeLicenceDataBeforeSave(ReginParams reginParams, TzBaseEnterpriseInfo tzBaseEnterpriseInfo) { private void removeLicenceDataBeforeSave(ReginParams reginParams, TzBaseEnterpriseInfo tzBaseEnterpriseInfo) {
String companyType = reginParams.getCompany().getCompanyType(); String companyType = reginParams.getCompany().getCompanyType();
baseUnitLicenceService.remove(new LambdaQueryWrapper<BaseUnitLicence>() LambdaQueryWrapper<BaseUnitLicence> wrapper = new LambdaQueryWrapper<>();
.likeRight(BaseUnitLicence::getCertTypeCode, COMPANY_TYPE_CERT_TYPE_MAP.get(companyType)) wrapper.eq(BaseUnitLicence::getUnitCode,tzBaseEnterpriseInfo.getUseCode());
.eq(BaseUnitLicence::getUnitCode,tzBaseEnterpriseInfo.getUseCode())); wrapper.and(w-> {
String[] certTypeCodeArray = COMPANY_TYPE_CERT_TYPE_MAP.get(companyType).split(",");
for(String certTypeCode: certTypeCodeArray){
w.or().likeRight(BaseUnitLicence::getCertTypeCode, certTypeCode);
}
});
baseUnitLicenceService.remove(wrapper);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment