iam数据同步修改

This commit is contained in:
梁琦涛
2024-08-05 16:56:17 +08:00
parent 7b09f0bff8
commit 4fb523c5eb
9 changed files with 190 additions and 100 deletions
@@ -180,7 +180,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
LawsMarketStandard manifest = marketStandardDetailVO.getManifest();
manifest.setManifestStatus(MarketStandardConstants.MANIFEST_STATUS_NOT_PUBLISH);
// 设置清单编号
manifest.setManifestNo(this.generateManifestNo(manifest.getManifestNo()));
manifest.setManifestNo(this.generateManifestNo(manifest.getManifestNo(),null));
Map<String, List<DictModel>> map = sysBaseAPI.translateManyDict("market_state",manifest.getCountry());
List<DictModel> listDict = map.get("market_state");
List<String> country = listDict.stream().map(DictModel::getText).collect(Collectors.toList());
@@ -205,7 +205,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
* @param manifestNoSub
* @return
*/
private String generateManifestNo(String manifestNoSub) {
private String generateManifestNo(String manifestNoSub,String oldManifestNoSub) {
// 生成清单编号
String s = "BZFG-" + manifestNoSub + "-";
String manifestNo = marketStandardMapper.getOneByManifestNo(s);
@@ -247,11 +247,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
update.eq(LawsMarketStandard::getId,manifest.getId());
update(update);
}else{
List<String> listCountry = Arrays.stream(manifest.getCountry().split(",")).sorted().collect(Collectors.toList());
List<String> listOldCountry = Arrays.stream(lawsMarketStandardOld.getCountry().split(",")).sorted().collect(Collectors.toList());;
if(!Objects.equals(listCountry,listOldCountry)){
manifest.setManifestNo(generateManifestNo(manifest.getManifestNo()));
}
manifest.setManifestNo(generateManifestNo(manifest.getManifestNo(),lawsMarketStandardOld.getManifestNo()));
Map<String, List<DictModel>> map = sysBaseAPI.translateManyDict("market_state",manifest.getCountry());
List<DictModel> listDict = map.get("market_state");
List<String> country = listDict.stream().map(DictModel::getText).collect(Collectors.toList());