From bd265f2440e1dd9bd757c15b5cc3b5b36556df07 Mon Sep 17 00:00:00 2001 From: caozhen <18736171426@139.com> Date: Thu, 14 Sep 2023 11:54:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=A0=87=E5=87=86=E6=94=B6?= =?UTF-8?q?=E8=97=8F=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ILawsStandardCollectionService.java | 6 +++ .../LawsStandardCollectionServiceImpl.java | 40 ++++++++++++------- 2 files changed, 32 insertions(+), 14 deletions(-) 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); + } }