diff --git a/laws-modules/src/main/java/com/jero/modules/personal/service/ILawsStandardCollectionService.java b/laws-modules/src/main/java/com/jero/modules/personal/service/ILawsStandardCollectionService.java index 2972d1e6..aaea857d 100644 --- a/laws-modules/src/main/java/com/jero/modules/personal/service/ILawsStandardCollectionService.java +++ b/laws-modules/src/main/java/com/jero/modules/personal/service/ILawsStandardCollectionService.java @@ -35,4 +35,10 @@ public interface ILawsStandardCollectionService extends IService byIdAndModule = lawsCommonService.getByIdAndModule(standardId, source); - collection.setNewModelImplementationDate((Date) byIdAndModule.get("new_model_implementation_date")); - collection.setOnTheProductionDate((Date) byIdAndModule.get("on_the_production_date")); - collection.setReleaseDate((Date) byIdAndModule.get("release_date")); + LawsDomesticStandard standard = lawsDomesticStandardService.queryById(standardId); + if (standard != null){ + collection.setNewModelImplementationDate(standard.getNewModelImplementationDate()); + collection.setOnTheProductionDate(standard.getOnTheProductionDate()); + collection.setReleaseDate(standard.getReleaseDate()); + } } if ("2".equals(source)){ //查询海外标准数据,赋值给collection - Map byIdAndModule = lawsCommonService.getByIdAndModule(standardId, source); - collection.setNewModelImplementationDate((Date) byIdAndModule.get("new_model_implementation_date")); - collection.setOnTheProductionDate((Date) byIdAndModule.get("on_the_production_date")); - collection.setReleaseDate((Date) byIdAndModule.get("release_date")); + LawsOverseasStandard standard = lawsOverseasStandardService.queryById(standardId); + if (standard != null){ + collection.setNewModelImplementationDate(standard.getNewModelImplementationDate()); + collection.setOnTheProductionDate(standard.getOnTheProductionDate()); + collection.setReleaseDate(standard.getReleaseDate()); + } } if ("3".equals(source)){ //查询企业标准数据,赋值给collection EnterpriseStandard standard = enterpriseStandardService.getById(standardId); - collection.setReleaseDate(standard.getReleaseDate()); + if (standard != null){ + collection.setReleaseDate(standard.getReleaseDate()); + } } } } @@ -119,4 +121,14 @@ public class LawsStandardCollectionServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(LawsStandardCollection::getStandardId, id); + remove(wrapper); + } }