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