修改市场法规清单编号

This commit is contained in:
梁琦涛
2024-07-30 11:32:53 +08:00
parent 8c7ae1b84b
commit c35f614715
@@ -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.getCountry()));
manifest.setManifestNo(this.generateManifestNo(manifest.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());
@@ -205,9 +205,9 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
* @param country
* @return
*/
private String generateManifestNo(String country) {
private String generateManifestNo(String manifestNoSub) {
// 生成清单编号
String s = "BZFG-" + country + "-";
String s = "BZFG-" + manifestNoSub + "-";
String manifestNo = marketStandardMapper.getOneByManifestNo(s);
if(StringUtils.isBlank(manifestNo)){
return s + "01";
@@ -250,7 +250,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
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.getCountry()));
manifest.setManifestNo(generateManifestNo(manifest.getManifestNo()));
}
Map<String, List<DictModel>> map = sysBaseAPI.translateManyDict("market_state",manifest.getCountry());
List<DictModel> listDict = map.get("market_state");