修改市场法规清单编号
This commit is contained in:
+4
-4
@@ -180,7 +180,7 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
|||||||
LawsMarketStandard manifest = marketStandardDetailVO.getManifest();
|
LawsMarketStandard manifest = marketStandardDetailVO.getManifest();
|
||||||
manifest.setManifestStatus(MarketStandardConstants.MANIFEST_STATUS_NOT_PUBLISH);
|
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());
|
Map<String, List<DictModel>> map = sysBaseAPI.translateManyDict("market_state",manifest.getCountry());
|
||||||
List<DictModel> listDict = map.get("market_state");
|
List<DictModel> listDict = map.get("market_state");
|
||||||
List<String> country = listDict.stream().map(DictModel::getText).collect(Collectors.toList());
|
List<String> country = listDict.stream().map(DictModel::getText).collect(Collectors.toList());
|
||||||
@@ -205,9 +205,9 @@ public class LawsMarketStandardServiceImpl extends ServiceImpl<LawsMarketStandar
|
|||||||
* @param country
|
* @param country
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String generateManifestNo(String country) {
|
private String generateManifestNo(String manifestNoSub) {
|
||||||
// 生成清单编号
|
// 生成清单编号
|
||||||
String s = "BZFG-" + country + "-";
|
String s = "BZFG-" + manifestNoSub + "-";
|
||||||
String manifestNo = marketStandardMapper.getOneByManifestNo(s);
|
String manifestNo = marketStandardMapper.getOneByManifestNo(s);
|
||||||
if(StringUtils.isBlank(manifestNo)){
|
if(StringUtils.isBlank(manifestNo)){
|
||||||
return s + "01";
|
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> listCountry = Arrays.stream(manifest.getCountry().split(",")).sorted().collect(Collectors.toList());
|
||||||
List<String> listOldCountry = Arrays.stream(lawsMarketStandardOld.getCountry().split(",")).sorted().collect(Collectors.toList());;
|
List<String> listOldCountry = Arrays.stream(lawsMarketStandardOld.getCountry().split(",")).sorted().collect(Collectors.toList());;
|
||||||
if(!Objects.equals(listCountry,listOldCountry)){
|
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());
|
Map<String, List<DictModel>> map = sysBaseAPI.translateManyDict("market_state",manifest.getCountry());
|
||||||
List<DictModel> listDict = map.get("market_state");
|
List<DictModel> listDict = map.get("market_state");
|
||||||
|
|||||||
Reference in New Issue
Block a user