Commit 7ad89fcb authored by tianbo's avatar tianbo

Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_register

parents 78342079 2110acdb
...@@ -71,7 +71,7 @@ public class DataDockTemplateVersionUtils { ...@@ -71,7 +71,7 @@ public class DataDockTemplateVersionUtils {
VERSION_MAP.put("新设备_压力容器设备_固定式", "V1.0.1"); VERSION_MAP.put("新设备_压力容器设备_固定式", "V1.0.1");
VERSION_MAP.put("新设备_压力容器设备_氧舱", "V1.0.1"); VERSION_MAP.put("新设备_压力容器设备_氧舱", "V1.0.1");
VERSION_MAP.put("新设备_游乐设施设备", "V1.0.0"); VERSION_MAP.put("新设备_游乐设施设备", "V1.0.0");
VERSION_MAP.put("压力容器设备", "V1.0.2"); VERSION_MAP.put("压力容器设备", "V1.0.3");
VERSION_MAP.put("长输管道设备", "V1.0.0"); VERSION_MAP.put("长输管道设备", "V1.0.0");
} }
......
...@@ -2527,16 +2527,17 @@ ...@@ -2527,16 +2527,17 @@
and (a.apply_status <![CDATA[ <> ]]> '6617') and (a.apply_status <![CDATA[ <> ]]> '6617')
) )
</select> </select>
<update id="updateTechParamDynamic"> <update id="updateTechParamDynamic">
update ${tableName} <if test="columns != null and columns.size() > 0">
<set> update
${tableName}
set
<foreach collection="columns" item="column" separator=","> <foreach collection="columns" item="column" separator=",">
<if test="column.columnValue != null and column.columnValue != ''">
${column.columnName} = #{column.columnValue} ${column.columnName} = #{column.columnValue}
</if>
</foreach> </foreach>
</set>
where record = #{record} where record = #{record}
</if>
</update> </update>
<select id="countBizNumAfterUseReg" resultType="java.lang.Long"> <select id="countBizNumAfterUseReg" resultType="java.lang.Long">
......
...@@ -596,7 +596,7 @@ ...@@ -596,7 +596,7 @@
</select> </select>
<select id="getListPageCount" resultType="long"> <select id="getListPageCount" resultType="long">
SELECT <![CDATA[/*+ set(query_dop 16)*/]]> COUNT(*) SELECT <![CDATA[/*+ set(query_dop 16)*/]]> COUNT(DISTINCT ur.sequence_nbr)
FROM tzs_jg_use_registration ur FROM tzs_jg_use_registration ur
<if test="dto.equList != null or dto.equCategory != null or dto.equDefine != null or <if test="dto.equList != null or dto.equCategory != null or dto.equDefine != null or
dto.equCode != null or dto.code96333 != null or dto.supervisoryCode != null"> dto.equCode != null or dto.code96333 != null or dto.supervisoryCode != null">
......
...@@ -361,4 +361,18 @@ public class DataHandlerController extends BaseController { ...@@ -361,4 +361,18 @@ public class DataHandlerController extends BaseController {
public ResponseModel<String> refreshXianData2ES(@RequestParam(value = "isUpdate", defaultValue = "false") boolean isUpdate) throws IOException { public ResponseModel<String> refreshXianData2ES(@RequestParam(value = "isUpdate", defaultValue = "false") boolean isUpdate) throws IOException {
return ResponseHelper.buildResponse(dataHandlerService.refreshXianData2ES(isUpdate)); return ResponseHelper.buildResponse(dataHandlerService.refreshXianData2ES(isUpdate));
} }
/**
* @return
* @apiNote 删除useInfo表中status等于待删除(手动修改为待删除)的设备
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "PUT", value = "删除useInfo表中status等于待删除(手动修改为待删除)的设备", notes = "删除useInfo表中status等于待删除(手动修改为待删除)的设备")
@PutMapping(value = "/equip/deleteEquipIsNotClaimed")
public ResponseModel<Integer> deleteEquip(@RequestParam(value = "useUnitCreditCode") String useUnitCreditCode,
@RequestParam(value = "equList") String equList,
@RequestParam(value = "dataSource", defaultValue = "jg_pl") String dataSource,
@RequestParam(value = "isDelete", defaultValue = "false") boolean isDelete) {
return ResponseHelper.buildResponse(dataHandlerService.deleteEquipIsNotClaimed(useUnitCreditCode, equList, dataSource, isDelete));
}
} }
\ No newline at end of file
...@@ -284,7 +284,7 @@ public class IdxBizJqEquipmentRegisterController extends BaseController { ...@@ -284,7 +284,7 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
**/ **/
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/importData") @PostMapping(value = "/importData")
@ApiOperation(httpMethod = "POST", value = "气瓶批量导入", notes = "气瓶批量导入") @ApiOperation(httpMethod = "POST", value = "气瓶批量导入校验", notes = "气瓶批量导入校验")
public ResponseModel<?> importPressureData(@RequestPart("file") MultipartFile multipartFile) throws Exception { public ResponseModel<?> importPressureData(@RequestPart("file") MultipartFile multipartFile) throws Exception {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.importPressureData(multipartFile)); return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.importPressureData(multipartFile));
} }
......
...@@ -31,7 +31,10 @@ public class NewProjectEditUpdateService { ...@@ -31,7 +31,10 @@ public class NewProjectEditUpdateService {
public void updateBizInfo(String projectContraptionId) { public void updateBizInfo(String projectContraptionId) {
IdxBizJgProjectContraption projectContraption = commonEquipDataProcessService.getIdxBizJgProjectContraptionServiceImpl().getOne(new LambdaQueryWrapper<IdxBizJgProjectContraption>().eq(BaseEntity::getSequenceNbr, projectContraptionId).select(BaseEntity::getSequenceNbr, IdxBizJgProjectContraption::getUseRegistrationCode)); IdxBizJgProjectContraption projectContraption = commonEquipDataProcessService.getIdxBizJgProjectContraptionServiceImpl().getOne(new LambdaQueryWrapper<IdxBizJgProjectContraption>().eq(BaseEntity::getSequenceNbr, projectContraptionId).select(BaseEntity::getSequenceNbr, IdxBizJgProjectContraption::getUseRegistrationCode));
// 按照装置id查询装置下管道,更新为已纳管状态写入使用登记证编号 // 按照装置id查询装置下管道,更新为已纳管状态写入使用登记证编号
List<IdxBizJgUseInfo> useInfos = useInfoService.list(new LambdaQueryWrapper<IdxBizJgUseInfo>().eq(IdxBizJgUseInfo::getProjectContraptionId, projectContraptionId).eq(IdxBizJgUseInfo::getIsIntoManagement, false).select(IdxBizJgUseInfo::getRecord, TzsBaseEntity::getSequenceNbr)); List<IdxBizJgUseInfo> useInfos = useInfoService.list(new LambdaQueryWrapper<IdxBizJgUseInfo>()
.eq(IdxBizJgUseInfo::getProjectContraptionId, projectContraptionId)
//.eq(IdxBizJgUseInfo::getIsIntoManagement, false)修改已纳管管道编辑使用登记证号,不更新bug
.select(IdxBizJgUseInfo::getRecord, TzsBaseEntity::getSequenceNbr));
useInfos.parallelStream().forEach(e -> { useInfos.parallelStream().forEach(e -> {
commonEquipDataProcessService.setNewPipelineUseState(e, projectContraption.getUseRegistrationCode()); commonEquipDataProcessService.setNewPipelineUseState(e, projectContraption.getUseRegistrationCode());
commonEquipDataProcessService.updateUseOrgCode2NewPipeline(e, projectContraption.getUseRegistrationCode()); commonEquipDataProcessService.updateUseOrgCode2NewPipeline(e, projectContraption.getUseRegistrationCode());
......
...@@ -1137,7 +1137,10 @@ public class CommonEquipDataProcessService { ...@@ -1137,7 +1137,10 @@ public class CommonEquipDataProcessService {
} }
public void updatePipeline2InUse(String projectContraptionId, String useRegistrationCode) { public void updatePipeline2InUse(String projectContraptionId, String useRegistrationCode) {
List<IdxBizJgUseInfo> useInfos = idxBizJgUseInfoService.list(new LambdaQueryWrapper<IdxBizJgUseInfo>().eq(IdxBizJgUseInfo::getProjectContraptionId, projectContraptionId).eq(IdxBizJgUseInfo::getIsIntoManagement, false).select(TzsBaseEntity::getSequenceNbr, IdxBizJgUseInfo::getRecord)); List<IdxBizJgUseInfo> useInfos = idxBizJgUseInfoService.list(new LambdaQueryWrapper<IdxBizJgUseInfo>()
.eq(IdxBizJgUseInfo::getProjectContraptionId, projectContraptionId)
.eq(IdxBizJgUseInfo::getIsIntoManagement, false)
.select(TzsBaseEntity::getSequenceNbr, IdxBizJgUseInfo::getRecord));
useInfos.parallelStream().forEach(e -> { useInfos.parallelStream().forEach(e -> {
this.setNewPipelineUseState(e, useRegistrationCode); this.setNewPipelineUseState(e, useRegistrationCode);
this.updateUseOrgCode2NewPipeline(e, useRegistrationCode); this.updateUseOrgCode2NewPipeline(e, useRegistrationCode);
......
...@@ -1722,8 +1722,8 @@ public class DataDockServiceImpl { ...@@ -1722,8 +1722,8 @@ public class DataDockServiceImpl {
//Optional.ofNullable(data.getWallThickness()).ifPresent(item -> checkPipeSpecifications(item, "公称壁厚请输入数字或者/分割的范围,如2/6;", rowError)); //Optional.ofNullable(data.getWallThickness()).ifPresent(item -> checkPipeSpecifications(item, "公称壁厚请输入数字或者/分割的范围,如2/6;", rowError));
//checkNotBlank(data.getNominalDiameter(), "公称直径不能为空;", rowError); //checkNotBlank(data.getNominalDiameter(), "公称直径不能为空;", rowError);
//Optional.ofNullable(data.getNominalDiameter()).ifPresent(item -> checkPipeSpecifications(item, "公称直径请输入数字或者/分割的范围,如2/6;", rowError)); //Optional.ofNullable(data.getNominalDiameter()).ifPresent(item -> checkPipeSpecifications(item, "公称直径请输入数字或者/分割的范围,如2/6;", rowError));
//checkNotBlank(data.getPipeLength(), "管道长度不能为空;", rowError); checkNotBlank(data.getPipeLength(), "管道长度不能为空;", rowError);
//Optional.ofNullable(data.getPipeLength()).ifPresent(item -> checkDateFormatNumber(item, "管道长度必须为数字", rowError)); Optional.ofNullable(data.getPipeLength()).ifPresent(item -> checkDateFormatNumber(item, "管道长度必须为数字", rowError));
//checkNotBlank(data.getPressure(), "设计-压力不能为空;", rowError); //checkNotBlank(data.getPressure(), "设计-压力不能为空;", rowError);
//checkNotBlank(data.getMedium(), "设计-介质不能为空;", rowError); //checkNotBlank(data.getMedium(), "设计-介质不能为空;", rowError);
//checkNotBlank(data.getTemperature(), "设计-温度不能为空;", rowError); //checkNotBlank(data.getTemperature(), "设计-温度不能为空;", rowError);
......
...@@ -2279,4 +2279,26 @@ public class DataHandlerServiceImpl { ...@@ -2279,4 +2279,26 @@ public class DataHandlerServiceImpl {
.filter(Objects::nonNull) .filter(Objects::nonNull)
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
public Integer deleteEquipIsNotClaimed(String useUnitCreditCode, String equList,
String dataSource, boolean isDelete) {
List<IdxBizJgRegisterInfo> jgRegisterInfoList = registerInfoMapper.selectDeleteEquipIsNotClaimed(useUnitCreditCode, equList, dataSource );
List<String> records = Optional.ofNullable(jgRegisterInfoList)
.orElse(Collections.emptyList())
.stream()
.filter(Objects::nonNull)
.map(IdxBizJgRegisterInfo::getRecord)
.filter(Objects::nonNull)
.collect(Collectors.toList());
if (!records.isEmpty() && isDelete) {
int batchSize = 1000;
for (int i = 0; i < records.size(); i += batchSize) {
int end = Math.min(i + batchSize, records.size());
List<String> batch = records.subList(i, end);
superviseInfoMapper.deleteDataAll(batch);
deleteFromEs(batch);
}
}
return records.size();
}
} }
...@@ -95,6 +95,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ ...@@ -95,6 +95,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
public static final String EQU_DEFINE = "equDefine"; public static final String EQU_DEFINE = "equDefine";
public static final String PROJECT_CONTRAPTION_NO = "projectContraptionNo"; public static final String PROJECT_CONTRAPTION_NO = "projectContraptionNo";
public static final String ORG_BRANCH_CODE = "orgBranchCode"; public static final String ORG_BRANCH_CODE = "orgBranchCode";
public static final String DATA_SOURCE = "dataSource";
public static final String DATA_QUALITY_SCORE = "dataQualityScore"; public static final String DATA_QUALITY_SCORE = "dataQualityScore";
public static final String DATA_QUALITY = "dataQuality"; public static final String DATA_QUALITY = "dataQuality";
...@@ -270,6 +271,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ ...@@ -270,6 +271,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
String projectContraptionNo = params.get(PROJECT_CONTRAPTION_NO); String projectContraptionNo = params.get(PROJECT_CONTRAPTION_NO);
//属地监管部门code //属地监管部门code
String orgBranchCode = params.get(ORG_BRANCH_CODE); String orgBranchCode = params.get(ORG_BRANCH_CODE);
String dataSource = params.get(DATA_SOURCE);
// 设备类别code // 设备类别code
String equCategory = params.get(EQU_CATEGORY); String equCategory = params.get(EQU_CATEGORY);
// 设备类品种code // 设备类品种code
...@@ -367,6 +369,17 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ ...@@ -367,6 +369,17 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
.eq(!ValidationUtil.isEmpty(orgBranchCode) && BaseController.COMPANY_TYPE_COMPANY.equals(companyLevel), IdxBizJgProjectContraption::getOrgCode, orgBranchCode) // 企业 等于匹配 .eq(!ValidationUtil.isEmpty(orgBranchCode) && BaseController.COMPANY_TYPE_COMPANY.equals(companyLevel), IdxBizJgProjectContraption::getOrgCode, orgBranchCode) // 企业 等于匹配
.likeRight(!ValidationUtil.isEmpty(orgBranchCode) && BaseController.COMPANY_TYPE_SUPERVISION.equals(companyLevel), IdxBizJgProjectContraption::getOrgCode, orgBranchCode) // 监管 右模糊匹配 .likeRight(!ValidationUtil.isEmpty(orgBranchCode) && BaseController.COMPANY_TYPE_SUPERVISION.equals(companyLevel), IdxBizJgProjectContraption::getOrgCode, orgBranchCode) // 监管 右模糊匹配
.like(!ValidationUtil.isEmpty(projectContraptionNo), IdxBizJgProjectContraption::getProjectContraptionNo, projectContraptionNo) .like(!ValidationUtil.isEmpty(projectContraptionNo), IdxBizJgProjectContraption::getProjectContraptionNo, projectContraptionNo)
.and(!ValidationUtil.isEmpty(dataSource), w -> {
if ("jg".equals(dataSource)) {
w.likeRight(IdxBizJgProjectContraption::getDataSource, "jg").notLike(IdxBizJgProjectContraption::getDataSource, "jg_his");
} else if ("jg_his".equals(dataSource)) {
w.likeRight(IdxBizJgProjectContraption::getDataSource, "jg_his").notLike(IdxBizJgProjectContraption::getDataSource, "jg_his_black");
} else if ("jg_his_black".equals(dataSource)) {
w.eq(IdxBizJgProjectContraption::getDataSource, "jg_his_black").or().likeRight(IdxBizJgProjectContraption::getDataSource, "jg_his_black_");
} else {
w.eq(IdxBizJgProjectContraption::getDataSource, dataSource);
}
})
.isNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.TRUE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode) .isNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.TRUE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode)
.isNotNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.FALSE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode) .isNotNull(!ValidationUtil.isEmpty(regCodeIsNull) && Boolean.FALSE.equals(Boolean.valueOf(regCodeIsNull)), IdxBizJgProjectContraption::getUseRegistrationCode)
.isNull(IdxBizJgProjectContraption::getProjectContraptionParentId) .isNull(IdxBizJgProjectContraption::getProjectContraptionParentId)
......
...@@ -25,7 +25,9 @@ import com.yeejoin.amos.boot.module.jg.api.enums.*; ...@@ -25,7 +25,9 @@ import com.yeejoin.amos.boot.module.jg.api.enums.*;
import com.yeejoin.amos.boot.module.jg.api.mapper.*; import com.yeejoin.amos.boot.module.jg.api.mapper.*;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationUnitService; import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationUnitService;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo; import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.biz.config.LocalBadRequest;
import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext; import com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext;
import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext;
import com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCurrentUser; import com.yeejoin.amos.boot.module.jg.biz.edit.permission.FillingEditPermForCurrentUser;
import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher; import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient; import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
...@@ -327,6 +329,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -327,6 +329,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
*/ */
@GlobalTransactional(rollbackFor = Exception.class) @GlobalTransactional(rollbackFor = Exception.class)
public JgChangeRegistrationUnitDto updateInstallationNotice(String submitType, JgChangeRegistrationUnitDto noticeDto, String op, ReginParams reginParams) { public JgChangeRegistrationUnitDto updateInstallationNotice(String submitType, JgChangeRegistrationUnitDto noticeDto, String op, ReginParams reginParams) {
try {
if (Objects.isNull(noticeDto) || StringUtils.isEmpty(submitType)) { if (Objects.isNull(noticeDto) || StringUtils.isEmpty(submitType)) {
throw new IllegalArgumentException("参数不能为空"); throw new IllegalArgumentException("参数不能为空");
} }
...@@ -496,6 +499,17 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -496,6 +499,17 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
} }
} }
return noticeDto; return noticeDto;
} catch (BadRequest | LocalBadRequest e) {
log.error(e.getMessage(), e);
this.rollBackForDelRedisData();
throw e;
} catch (Exception e) {
log.error(e.getMessage(), e);
this.rollBackForDelRedisData();
throw new BadRequest(e.getMessage());
} finally {
FlowingEquipRedisContext.clean();
}
} }
/** /**
...@@ -802,6 +816,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -802,6 +816,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
@Override @Override
@GlobalTransactional(rollbackFor = Exception.class) @GlobalTransactional(rollbackFor = Exception.class)
public List<JgChangeRegistrationUnitDto> saveNotice(String submitType, JSONObject map, ReginParams reginParams) { public List<JgChangeRegistrationUnitDto> saveNotice(String submitType, JSONObject map, ReginParams reginParams) {
try {
JgChangeRegistrationUnitDto model = BeanUtil.toBeanIgnoreError(map.get("changeRegisInfo"), JgChangeRegistrationUnitDto.class); JgChangeRegistrationUnitDto model = BeanUtil.toBeanIgnoreError(map.get("changeRegisInfo"), JgChangeRegistrationUnitDto.class);
Map<String, Object> tableData = (Map<String, Object>) map.get("changeRegisInfo"); Map<String, Object> tableData = (Map<String, Object>) map.get("changeRegisInfo");
String[] taskName = new String[]{"流程结束"}; String[] taskName = new String[]{"流程结束"};
...@@ -995,6 +1010,23 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -995,6 +1010,23 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
.eq(JgRegistrationHistory::getCurrentDocumentId, registrationUnit.getApplyNo())); .eq(JgRegistrationHistory::getCurrentDocumentId, registrationUnit.getApplyNo()));
registrationHistoryService.save(jgRegistrationHistory); registrationHistoryService.save(jgRegistrationHistory);
return Collections.singletonList(model); return Collections.singletonList(model);
} catch (BadRequest | LocalBadRequest e) {
log.error(e.getMessage(), e);
this.rollBackForDelRedisData();
throw e;
} catch (Exception e) {
log.error(e.getMessage(), e);
this.rollBackForDelRedisData();
throw new BadRequest(e.getMessage());
} finally {
FlowingEquipRedisContext.clean();
}
}
private void rollBackForDelRedisData() {
FlowingEquipRedisContext.getContext().forEach(e -> {
EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY).delDataForCheckWithKey(e.getData(), e.getRedisKey());
});
} }
public void setEquAddress(JgChangeRegistrationUnitDto model) { public void setEquAddress(JgChangeRegistrationUnitDto model) {
......
channals:
id:
name: zookeeper
auth: ADF248A492D2E89B943B3626DE32DB7E6619CD10B5BCA9502AC76AFA624104D4A5AAF320B865300FCF49E88D433564312E4B387931E4E14F5EE60A1CCCE3C9BF41C7500CE9E199DA134FD99355A628B1
host: 192.169.82.2
path: /688ca77ef14c054d94cb8e19/metadata/logic_db/rule
port: '2281'
scheme: digest
keys:
configSignature: 14666B5866B08058360FB75FF264B4143EBDFC8FCF9888C9CAAFD6B1EBADF02EA1CD85E696A0697D1760BDAD53CF29B668A47713B6C3EF106F736812A647955E
logMacKey: 4B2701E612E5A376E7B9980722105EF9BEE8F494F81E666A0AEC70BCA18FEF2C
sm2PrvKey: B79F0CB80D6C5D18CC254DA9817B86EEA662A3EFE0A3B3BDA5C1C155564FC6EDFC342D511AD50C9030DD7DB5A9D122AB
sm2PubKey: 046AE3DE41488D7BE1AA5A7C98ADB320B0ECD392DB295A30B5A1A0BB6320FBC9296775BF14319FFB0A6690060DC370EB33C983F43C37E50A196705D371CBA8D68E
userPIN: 3517382078297947681464213757066358386295150902737251965376941307
userPINCtx:
sdkconfig:
invokeMode: local
timeInterval: 6000
tracing:
host:
port:
scheme:
unionServer:
applicationID: 688ca77e4e31c23383e1ab3e
applicationKey: 3BA3D34E2192A53163B08236C17FD77543EE707C2C94559BE08E9B12D8B2B80264967D0AFAEBDE7A26D0E696A1619727
clientId: IcFjcOgrSkWoTxun
clientSecret: uOKWDyGd1KVjG9JTxF59WrOAuFz9EN0i
serverCloudCipherIp: 172.30.42.218
serverCloudCipherKeyPort: '5443'
...@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.TzsUserPermission; ...@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.TzsUserPermission;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo; import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum; import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum;
import com.yeejoin.amos.boot.module.tcm.biz.utils.RedisUtil;
import com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitInfo; import com.yeejoin.amos.boot.module.tcm.flc.api.entity.RegUnitInfo;
import com.yeejoin.amos.boot.module.tcm.flc.biz.service.impl.RegUnitInfoServiceImpl; import com.yeejoin.amos.boot.module.tcm.flc.biz.service.impl.RegUnitInfoServiceImpl;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
...@@ -40,11 +41,14 @@ public class HistoryDataDealServiceImpl { ...@@ -40,11 +41,14 @@ public class HistoryDataDealServiceImpl {
private RegUnitInfoServiceImpl regUnitInfoService; private RegUnitInfoServiceImpl regUnitInfoService;
public HistoryDataDealServiceImpl(TzsUserInfoServiceImpl userInfoService, TzsUserPermissionServiceImpl userPermissionService, TzBaseEnterpriseInfoServiceImpl baseEnterpriseInfoService, RegUnitInfoServiceImpl regUnitInfoService) { private RedisUtil redisUtil;
public HistoryDataDealServiceImpl(TzsUserInfoServiceImpl userInfoService, TzsUserPermissionServiceImpl userPermissionService, TzBaseEnterpriseInfoServiceImpl baseEnterpriseInfoService, RegUnitInfoServiceImpl regUnitInfoService, RedisUtil redisUtil) {
this.userInfoService = userInfoService; this.userInfoService = userInfoService;
this.userPermissionService = userPermissionService; this.userPermissionService = userPermissionService;
this.baseEnterpriseInfoService = baseEnterpriseInfoService; this.baseEnterpriseInfoService = baseEnterpriseInfoService;
this.regUnitInfoService = regUnitInfoService; this.regUnitInfoService = regUnitInfoService;
this.redisUtil = redisUtil;
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
...@@ -186,8 +190,8 @@ public class HistoryDataDealServiceImpl { ...@@ -186,8 +190,8 @@ public class HistoryDataDealServiceImpl {
try { try {
regUnitInfo.setAppId(regUnitInfoService.createAppId(user)); regUnitInfo.setAppId(regUnitInfoService.createAppId(user));
} catch (Exception e) { } catch (Exception e) {
log.error("为没有appId的企业生成appId异常", e); log.error("为没有appId的企业生成appId异常:{}", JSON.toJSONString(user));
throw new RuntimeException(e); redisUtil.set("createAppIdError-unit"+ "_" + System.currentTimeMillis(), JSON.toJSONString(user));
} }
} }
companyListWithOutAppId.stream().filter(company -> company.getUseUnitCode().equals(regUnitInfo.getUnitCode())).forEach(company -> company.setAppId(regUnitInfo.getAppId())); companyListWithOutAppId.stream().filter(company -> company.getUseUnitCode().equals(regUnitInfo.getUnitCode())).forEach(company -> company.setAppId(regUnitInfo.getAppId()));
...@@ -207,8 +211,8 @@ public class HistoryDataDealServiceImpl { ...@@ -207,8 +211,8 @@ public class HistoryDataDealServiceImpl {
try { try {
map.put("appId", regUnitInfoService.createAppId(user)); map.put("appId", regUnitInfoService.createAppId(user));
} catch (Exception e) { } catch (Exception e) {
log.error("为没有appId的企业生成appId异常", e); log.error("为没有appId的个人主体生成appId异常:{}", JSON.toJSONString(user));
throw new RuntimeException(e); redisUtil.set("createAppIdError-individual"+ "_" + System.currentTimeMillis(), JSON.toJSONString(user));
} }
}); });
} }
......
...@@ -78,4 +78,8 @@ public interface IdxBizJgRegisterInfoMapper extends CustomBaseMapper<IdxBizJgReg ...@@ -78,4 +78,8 @@ public interface IdxBizJgRegisterInfoMapper extends CustomBaseMapper<IdxBizJgReg
" AND (jri.car_number = CAST(#{carNumber} AS VARCHAR) OR CAST(#{carNumber} AS VARCHAR) IS NULL)\n" + " AND (jri.car_number = CAST(#{carNumber} AS VARCHAR) OR CAST(#{carNumber} AS VARCHAR) IS NULL)\n" +
" AND (jri.use_org_code <> CAST(#{useOrgCode} AS VARCHAR) OR CAST(#{useOrgCode} AS VARCHAR) IS NULL)") " AND (jri.use_org_code <> CAST(#{useOrgCode} AS VARCHAR) OR CAST(#{useOrgCode} AS VARCHAR) IS NULL)")
Integer checkCarNumberUniqueness(@Param("carNumber") String carNumber, @Param("useOrgCode") String useOrgCode); Integer checkCarNumberUniqueness(@Param("carNumber") String carNumber, @Param("useOrgCode") String useOrgCode);
List<IdxBizJgRegisterInfo> selectDeleteEquipIsNotClaimed(@Param("useUnitCreditCode") String useUnitCreditCode,
@Param("equList")String equList,
@Param("dataSource")String dataSource);
} }
...@@ -67,6 +67,16 @@ ...@@ -67,6 +67,16 @@
#{equCode} #{equCode}
</foreach> </foreach>
</update> </update>
<select id="selectDeleteEquipIsNotClaimed" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo">
SELECT jri.RECORD
FROM idx_biz_jg_register_info jri
JOIN idx_biz_jg_use_info jui ON jri.record = jui.record
WHERE jui.STATUS = '待删除'
AND jri.EQU_LIST = #{equList}
AND jui.DATA_SOURCE = #{dataSource}
AND jui.USE_UNIT_CREDIT_CODE = #{useUnitCreditCode}
</select>
</mapper> </mapper>
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