Commit 84aa64e4 authored by 王果's avatar 王果

21125 监管业务已纳管设备列表无法查询到一码通修改数据后的设备

parent b20cc188
......@@ -110,19 +110,19 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
JSONObject jsonObject = new JSONObject(map);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPage(jsonObject));
}
/**
* 查询设备注册列表
*
* @param map
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/pageHistory")
@ApiOperation(httpMethod = "GET", value = "设备注册信息分页查询", notes = "设备注册信息分页查询")
public ResponseModel<Page<JSONObject>> queryForPageHistory(@RequestParam Map<String, Object> map) {
JSONObject jsonObject = new JSONObject(map);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPageHistory(jsonObject));
}
// /**
// * 查询设备注册列表
// *
// * @param map
// * @return
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/pageHistory")
// @ApiOperation(httpMethod = "GET", value = "设备注册信息分页查询", notes = "设备注册信息分页查询")
// public ResponseModel<Page<JSONObject>> queryForPageHistory(@RequestParam Map<String, Object> map) {
// JSONObject jsonObject = new JSONObject(map);
// return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPageHistory(jsonObject));
// }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/category/list")
@ApiOperation(httpMethod = "GET", value = "查询不同单位类型可新增的设备种类列表", notes = "查询不同单位类型可新增的设备种类列表")
......
......@@ -28,7 +28,6 @@ import com.yeejoin.amos.boot.module.jg.api.dto.EquipmentInfoDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecord;
import com.yeejoin.amos.boot.module.jg.api.entity.JgCertificateChangeRecordEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.api.entity.JgVehicleInformation;
import com.yeejoin.amos.boot.module.jg.api.enums.*;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper;
......@@ -43,7 +42,10 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.*;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.*;
import com.yeejoin.amos.boot.module.ymt.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
......@@ -76,6 +78,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.IOException;
import java.lang.reflect.Field;
import java.sql.Timestamp;
......@@ -86,6 +89,7 @@ import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.toJSONString;
import static com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum.SPECIAL_CYLINDER;
import static com.yeejoin.amos.boot.module.jg.api.enums.VehicleApanageEnum.XIAN_YANG;
......@@ -539,9 +543,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
@Override
public List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios,String dataSource) {
public List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList, String businessScenarios, String dataSource) {
// 历史设备录入 直接取所有的设备种类(equList)下的所有设备类别
if ("his".equals(dataSource)){
if ("his".equals(dataSource)) {
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList);
}
......@@ -552,7 +556,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
String dictCode = String.format("%s_%s", dictCodePrefix, equipAddDictCodeSuffix);
List<DictionarieValueModel> result = FeignUtil.remoteCall(() -> Systemctl.dictionarieClient.dictValues(dictCode));
if (CompanyTypeEnum.CONSTRUCTION.getName().equals(companyType) || ValidationUtil.isEmpty(businessScenarios)){
if (CompanyTypeEnum.CONSTRUCTION.getName().equals(companyType) || ValidationUtil.isEmpty(businessScenarios)) {
return result;
}
// 初始化collect列表
......@@ -1262,7 +1266,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return new Page<>();
}
Integer pageNumber = ObjectUtils.isEmpty(map.getInteger("number")) ? 1 : map.getInteger("number");
Integer size = ObjectUtils.isEmpty(map.getInteger("size")) ? 20 : map.getInteger("size");
Page<JSONObject> result = new Page<>(pageNumber, size);
......@@ -1315,8 +1318,18 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// DATA_SOURCE 为“jg”开头的数据(从监管新加或复制的设备)
// 20240314 提出的监管业务不要让企业用户选到之前一码通认领或补录的设备,让从监管业务中去新增
BoolQueryBuilder dBuilder = QueryBuilders.boolQuery();
dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg"));
// dBuilder.mustNot(QueryBuilders.prefixQuery("DATA_SOURCE","jg_his"));
if (map.containsKey("DATA_SOURCE") && !ObjectUtils.isEmpty(map.get("DATA_SOURCE"))) {
if ("jg_his".equals(map.get("DATA_SOURCE"))) {//只查历史,前缀jg_his
dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his"));
} else if (!"jg_his".equals(map.getString("DATA_SOURCE"))) {//只查新增,前缀为jg且前缀不为jg_his
dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg"));
dBuilder.mustNot(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his"));
}
} else {
//查所有,前缀jg
dBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg"));
}
boolMust.must(dBuilder);
String queryType = map.getString("QUERY_TYPE");
......@@ -1339,14 +1352,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
syBuilder.mustNot(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"));
boolMust.must(syBuilder);
this.setRepeatUsedCheckFilterParam(boolMust, companyCode, "useRegister");
} else if(ValidationUtil.equals(queryType, "FINISH_SY")){
} else if (ValidationUtil.equals(queryType, "FINISH_SY")) {
// 注意:上面条件是过滤出【未做过】某个业务的设备,下面部分是过滤出【做过】某个业务的设备
// 查询 已经做过【使用登记】 的设备 【(EQU_STATUS != 空 ) && (USE_ORG_CODE(使用登记证编号) != 空)】
BoolQueryBuilder syBuilder = QueryBuilders.boolQuery();
syBuilder.must(QueryBuilders.existsQuery("EQU_STATE"))
.must(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"));
boolMust.must(syBuilder);
} else if(ValidationUtil.equals(queryType, "GZ_GZ") || ValidationUtil.equals(queryType, "GZ_WX") || ValidationUtil.equals(queryType, "GZ_YZ")){
} else if (ValidationUtil.equals(queryType, "GZ_GZ") || ValidationUtil.equals(queryType, "GZ_WX") || ValidationUtil.equals(queryType, "GZ_YZ")) {
BoolQueryBuilder syBuilder = QueryBuilders.boolQuery();
syBuilder.must(QueryBuilders.existsQuery("EQU_STATE"));
syBuilder.must(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"));
......@@ -1682,14 +1695,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
syBuilder.mustNot(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"));
boolMust.must(syBuilder);
this.setRepeatUsedCheckFilterParam(boolMust, companyCode, "useRegister");
} else if(ValidationUtil.equals(queryType, "FINISH_SY")){
} else if (ValidationUtil.equals(queryType, "FINISH_SY")) {
// 注意:上面条件是过滤出【未做过】某个业务的设备,下面部分是过滤出【做过】某个业务的设备
// 查询 已经做过【使用登记】 的设备 【(EQU_STATUS != 空 ) && (USE_ORG_CODE(使用登记证编号) != 空)】
BoolQueryBuilder syBuilder = QueryBuilders.boolQuery();
syBuilder.must(QueryBuilders.existsQuery("EQU_STATE"))
.must(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"));
boolMust.must(syBuilder);
} else if(ValidationUtil.equals(queryType, "GZ_GZ") || ValidationUtil.equals(queryType, "GZ_WX") || ValidationUtil.equals(queryType, "GZ_YZ")){
} else if (ValidationUtil.equals(queryType, "GZ_GZ") || ValidationUtil.equals(queryType, "GZ_WX") || ValidationUtil.equals(queryType, "GZ_YZ")) {
BoolQueryBuilder syBuilder = QueryBuilders.boolQuery();
syBuilder.must(QueryBuilders.existsQuery("EQU_STATE"));
syBuilder.must(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"));
......@@ -2395,6 +2408,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
});
return result;
}
@Override
public Page<JSONObject> queryEquipCanUsedByVesselPageHistory(JSONObject jsonObject) {
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
......@@ -2426,7 +2440,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.doRead();
return pressureVesselListener.getResult();
} catch (Exception e) {
String err = (e.getCause() instanceof BadRequest) ? "模版数据填写有误:" + e.getCause().getMessage() : "导入时出现异常:请联系管理员!" ;
String err = (e.getCause() instanceof BadRequest) ? "模版数据填写有误:" + e.getCause().getMessage() : "导入时出现异常:请联系管理员!";
throw new BadRequest(err);
}
}
......@@ -2434,7 +2448,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Override
public Object importPressureData(MultipartFile multipartFile) throws Exception {
List<EquipInfoCylinderExcelDto> aircraftList = new ArrayList<>();
resultError.clear();useInnerCodeList.clear();
resultError.clear();
useInnerCodeList.clear();
equCodeList.clear();
factoryNumList.clear();
try {
......@@ -2443,13 +2458,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
@Override
public void invoke(EquipInfoCylinderExcelDto data, AnalysisContext context) {
EquipInfoCylinderExcelDto fireExperts = new EquipInfoCylinderExcelDto();
BeanUtils.copyProperties(data,fireExperts);
BeanUtils.copyProperties(data, fireExperts);
resultError.add(checkExcelData(data, context).toString());
aircraftList.add(fireExperts);
useInnerCodeList.add(data.getUseInnerCode());
equCodeList.add(data.getEquCode());
factoryNumList.add("0".equals(data.getWhetherVehicleCylinder()) ? data.getFactoryNum() : null);
}
// 全部读取完成就调用该方法
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
......@@ -2503,37 +2519,37 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
LinkedHashMap attachmentUpload = (LinkedHashMap) checkAndCast(paramMap.get(ATTACHMENT_UPLOAD));
EquipmentInfoDto equipInfoDto = this.createEquipmentInfoDto(equipmentInfoForm, jgVehicleInformationMapper);
// 登记证记录表主键
Long changeRecordId= sequence.nextId();
List<EquipInfoCylinderExcelDto> equipInfoCylinderExcelDtoList =JSON.parseArray(JSON.toJSONString(attachmentUpload.get(EQU_LISTS)), EquipInfoCylinderExcelDto.class);
equipInfoCylinderExcelDtoList.forEach(data->{
if ("his".equals(equipInfoDto.getDataSource())&& "1".equals(data.getWhetherVehicleCylinder())) {
Long changeRecordId = sequence.nextId();
List<EquipInfoCylinderExcelDto> equipInfoCylinderExcelDtoList = JSON.parseArray(JSON.toJSONString(attachmentUpload.get(EQU_LISTS)), EquipInfoCylinderExcelDto.class);
equipInfoCylinderExcelDtoList.forEach(data -> {
if ("his".equals(equipInfoDto.getDataSource()) && "1".equals(data.getWhetherVehicleCylinder())) {
throw new BadRequest("车用气瓶历史设备不能批量导入!");
}
String record = UUID.randomUUID().toString();
List<Map<String, Object>> fileDataList = (List<Map<String, Object>>)(data.getFileData());
String productPhoto = getUrlByKey(fileDataList,"PRODUCT_PHOTO");
String otherAccessoriesReg = getUrlByKey(fileDataList,"OTHER_ACCESSORIES_REG");
String designDoc = getUrlByKey(fileDataList,"DESIGN_DOC");
String designStandard = getUrlByKey(fileDataList,"DESIGN_STANDARD");
String otherAccessoriesDes = getUrlByKey(fileDataList,"OTHER_ACCESSORIES_DES");
String productQualityYieldProve = getUrlByKey(fileDataList,"PRODUCT_QUALITY_YIELD_PROVE");
String factoryStandard = getUrlByKey(fileDataList,"FACTORY_STANDARD");
String insUseMaintainExplain = getUrlByKey(fileDataList,"INS_USE_MAINTAIN_EXPLAIN");
String otherAccessoriesFact = getUrlByKey(fileDataList,"OTHER_ACCESSORIES_FACT");
String factSupervisionInspectionReport = getUrlByKey(fileDataList,"FACT_SUPERVISION_INSPECTION_REPORT");
List<Map<String, Object>> fileDataList = (List<Map<String, Object>>) (data.getFileData());
String productPhoto = getUrlByKey(fileDataList, "PRODUCT_PHOTO");
String otherAccessoriesReg = getUrlByKey(fileDataList, "OTHER_ACCESSORIES_REG");
String designDoc = getUrlByKey(fileDataList, "DESIGN_DOC");
String designStandard = getUrlByKey(fileDataList, "DESIGN_STANDARD");
String otherAccessoriesDes = getUrlByKey(fileDataList, "OTHER_ACCESSORIES_DES");
String productQualityYieldProve = getUrlByKey(fileDataList, "PRODUCT_QUALITY_YIELD_PROVE");
String factoryStandard = getUrlByKey(fileDataList, "FACTORY_STANDARD");
String insUseMaintainExplain = getUrlByKey(fileDataList, "INS_USE_MAINTAIN_EXPLAIN");
String otherAccessoriesFact = getUrlByKey(fileDataList, "OTHER_ACCESSORIES_FACT");
String factSupervisionInspectionReport = getUrlByKey(fileDataList, "FACT_SUPERVISION_INSPECTION_REPORT");
//使用信息
IdxBizJgUseInfo useInfo = new IdxBizJgUseInfo();
BeanUtils.copyProperties(data, useInfo);
useInfo.setRecord(record);
useInfo.setRecDate(new Date());
useInfo.setDataSource("his".equals(equipInfoDto.getDataSource())? "jg_his" : "jg");//区分历史设备和新增设备
useInfo.setDataSource("his".equals(equipInfoDto.getDataSource()) ? "jg_his" : "jg");//区分历史设备和新增设备
useInfo.setEquState(null);
useInfo.setIsIntoManagement("his".equals(equipInfoDto.getDataSource()));//历史气瓶导入为已纳管设备
// 使用单位信息
if("个人主体".equals(company.getCompanyType())){
if ("个人主体".equals(company.getCompanyType())) {
useInfo.setUseUnitCreditCode(company.getCompanyCode().split("_")[1]);
useInfo.setUseUnitName(company.getCompanyName().split("_")[1]);
}else {
} else {
useInfo.setUseUnitCreditCode(company.getCompanyCode());
useInfo.setUseUnitName(company.getCompanyName());
}
......@@ -2544,7 +2560,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
BeanUtils.copyProperties(data, designInfo);
designInfo.setRecord(record);
designInfo.setRecDate(new Date());
if (data.getDesignDate() != null){
if (data.getDesignDate() != null) {
designInfo.setDesignDate(DateUtil.parse(data.getDesignDate(), "yyyy-MM-dd"));
}
designInfo.setDesignDoc(designDoc);
......@@ -2578,7 +2594,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
registerInfo.setProductPhoto(productPhoto);
registerInfo.setOtherAccessoriesReg(otherAccessoriesReg);
registerInfo.setUseOrgCode(equipInfoDto.getUseOrgCode());
if ("his".equals(equipInfoDto.getDataSource())){
if ("his".equals(equipInfoDto.getDataSource())) {
registerInfo.setEquCode(this.getEquCode(registerInfo, factoryInfo, equipInfoDto.getReceiveOrgCode()));
}
registerInfoList.add(registerInfo);
......@@ -2586,7 +2602,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
//检验检测
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = new IdxBizJgInspectionDetectionInfo();
BeanUtils.copyProperties(data, inspectionDetectionInfo);
inspectionDetectionInfo.setInspectOrgCode( data.getInspectOrgCode());
inspectionDetectionInfo.setInspectOrgCode(data.getInspectOrgCode());
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(new Date());
inspectionDetectionInfo.setInspectType("ZZJDJY");
......@@ -2605,7 +2621,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
BeanUtils.copyProperties(data, otherInfo);
otherInfo.setRecord(record);
otherInfo.setRecDate(new Date());
if ("his".equals(equipInfoDto.getDataSource())){
if ("his".equals(equipInfoDto.getDataSource())) {
otherInfo.setSupervisoryCode(this.getSupervisoryCode(equipInfoDto.getPossession(), registerInfo));
otherInfo.setClaimStatus("已认领");
}
......@@ -2627,7 +2643,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentDto.setUSE_INNER_CODE(useInfo.getUseInnerCode());
esEquipmentDto.setUSE_ORG_CODE(equipInfoDto.getUseOrgCode());
esEquipmentDto.setIS_INTO_MANAGEMENT("his".equals(equipInfoDto.getDataSource()));
if ("his".equals(equipInfoDto.getDataSource())){
if ("his".equals(equipInfoDto.getDataSource())) {
esEquipmentDto.setEQU_CODE(registerInfo.getEquCode());
}
esEquipmentDto.setEQU_CATEGORY_CODE(equipInfoDto.getEquCategoryCode());
......@@ -2638,15 +2654,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentDto.setEQU_DEFINE(equipInfoDto.getEquDefine());
// 使用单位信息
if("个人主体".equals(company.getCompanyType())){
if ("个人主体".equals(company.getCompanyType())) {
esEquipmentDto.setUSE_UNIT_CREDIT_CODE(company.getCompanyCode().split("_")[1]);
esEquipmentDto.setUSE_UNIT_NAME(company.getCompanyName().split("_")[1]);
}else {
} else {
esEquipmentDto.setUSE_UNIT_CREDIT_CODE(company.getCompanyCode());
esEquipmentDto.setUSE_UNIT_NAME(company.getCompanyName());
}
esEquipmentCategoryList.add(esEquipmentDto);
if ("his".equals(equipInfoDto.getDataSource())){
if ("his".equals(equipInfoDto.getDataSource())) {
// 生成tzs_jg_certificate_change_record_eq记录
JgCertificateChangeRecordEq changeRecordEq = new JgCertificateChangeRecordEq();
changeRecordEq.setChangeRecordId(String.valueOf(changeRecordId));//登记证记录主键
......@@ -2663,7 +2679,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Optional.of(paramsVesselList).filter(list -> !list.isEmpty()).ifPresent(idxBizJgTechParamsVesselService::saveBatch);
Optional.of(inspectionDetectionInfoList).filter(list -> !list.isEmpty()).ifPresent(idxBizJgInspectionDetectionInfoService::saveBatch);
Optional.of(esEquipmentCategoryList).filter(list -> !list.isEmpty()).ifPresent(esEquipmentCategory::saveAll);
if ("his".equals(equipInfoDto.getDataSource())){
if ("his".equals(equipInfoDto.getDataSource())) {
// 生成证书管理表记录
JgUseRegistrationManage registrationManage = this.saveRegistrationManage(equipInfoDto, company);
// 生成一条tzs_jg_certificate_change_record记录
......@@ -2685,7 +2701,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
dto.setEquDefine(jgVehicleInformationMapper.getEquCategoryNameByCode(equDefineCode));
dto.setDataSource((String) equipmentInfoForm.get("DATA_SOURCE"));
dto.setUseOrgCode((String) equipmentInfoForm.get("USE_ORG_CODE"));
if ("his".equals(equipmentInfoForm.get("DATA_SOURCE"))){
if ("his".equals(equipmentInfoForm.get("DATA_SOURCE"))) {
dto.setReceiveOrgCode(((String) equipmentInfoForm.get("RECEIVE_ORG_CODE")).split("_")[0]);
dto.setReceiveOrgName(((String) equipmentInfoForm.get("RECEIVE_ORG_CODE")).split("_")[1]);
}
......@@ -2742,18 +2758,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private String buildRecordContent(JgUseRegistrationManage registrationManage) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日");
return registrationManage.getRecUserName() + "批量上传了【"+BusinessTypeEnum.JG_HISTORY_USAGE_REGISTRATION.getName()+"】," +
return registrationManage.getRecUserName() + "批量上传了【" + BusinessTypeEnum.JG_HISTORY_USAGE_REGISTRATION.getName() + "】," +
"单号【" + registrationManage.getApplyNo() + "】,上传日期" + simpleDateFormat.format(registrationManage.getRecDate());
}
/**
* 生成使用登记证书唯一标识
* @param dto 包含有 设备种类 & 设备类别 & 设备品种 的map
* @param date 生成证日期 (不传取当前时间)
*
* @param dto 包含有 设备种类 & 设备类别 & 设备品种 的map
* @param date 生成证日期 (不传取当前时间)
* @param receiveCompanyCode 接收机构统一信用代码
* @return 使用登记证书唯一标识
*/
private String generateCertificateNo(EquipmentInfoDto dto,Date date,String receiveCompanyCode){
private String generateCertificateNo(EquipmentInfoDto dto, Date date, String receiveCompanyCode) {
String ym = "";
try {
ym = Optional.of(DateUtils.dateFormat(date, DateUtils.DATE_PATTERN_MM)).orElse(DateUtils.dateFormat(new Date(), DateUtils.DATE_PATTERN_MM));
......@@ -2766,7 +2783,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return responseModel.getResult();
}
private String getApplicationNo(){
private String getApplicationNo() {
ResponseModel<List<String>> listResponseModel = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.SYDJ.getCode(), 1);
if (!ObjectUtils.isEmpty(listResponseModel) && listResponseModel.getStatus() != HttpStatus.OK.value()) {
log.error("车用气瓶使用登记申请单单号获取失败!");
......@@ -2862,7 +2879,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
private void checkInspectOrg(String inspectOrgCode, StringBuilder result){
private void checkInspectOrg(String inspectOrgCode, StringBuilder result) {
List<Map<String, Object>> InspectOrgList = commonService.getAllInspectionInfo("inspection");
if (findUseCode(InspectOrgList, inspectOrgCode) == null) {
result.append("未查询到该检验机构;");
......@@ -2885,8 +2902,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
/**
* 生成设备代码
* @param registerInfo registerInfo
* @param factoryInfo factoryInfo
*
* @param registerInfo registerInfo
* @param factoryInfo factoryInfo
* @param receiveCompanyCode 接收机构
* @return 设备代码
*/
......
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