From 1bfada2afa3e83c1017dc0f5b61f08d10a627b98 Mon Sep 17 00:00:00 2001 From: caozhen <18736171426@139.com> Date: Mon, 11 Sep 2023 13:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E6=94=B6=E8=97=8F=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=B7=BB=E5=8A=A0ILawsCommonService?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LawsStandardCollectionServiceImpl.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/personal/service/impl/LawsStandardCollectionServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/personal/service/impl/LawsStandardCollectionServiceImpl.java index 3ce455ea..479013dc 100644 --- a/laws-modules/src/main/java/com/jero/modules/personal/service/impl/LawsStandardCollectionServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/personal/service/impl/LawsStandardCollectionServiceImpl.java @@ -2,6 +2,7 @@ package com.jero.modules.personal.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.jero.common.system.vo.LoginUser; +import com.jero.modules.laws.common.service.ILawsCommonService; import com.jero.modules.laws.enterprise.entity.EnterpriseStandard; import com.jero.modules.laws.enterprise.service.EnterpriseStandardService; import com.jero.modules.personal.entity.LawsStandardCollection; @@ -15,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional; import com.jero.common.exception.JeroBootException; import java.util.Date; import java.util.List; +import java.util.Map; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.common.system.query.QueryGenerator; @@ -40,6 +42,9 @@ public class LawsStandardCollectionServiceImpl extends ServiceImpl queryWrapper = QueryGenerator.initQueryWrapper(lawsStandardCollection, req.getParameterMap()); Page page = new Page<>(pageNo, pageSize); Page collectionPage = page(page, queryWrapper); -// this.standardAssignment(collectionPage.getRecords()); + this.standardAssignment(collectionPage.getRecords()); return page(page, queryWrapper); } - public void standardAssignment(List list){ for (LawsStandardCollection collection : list) { String standardId = collection.getStandardId(); String source = collection.getSource(); if ("1".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")); } 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")); } if ("3".equals(source)){ //查询企业标准数据,赋值给collection