我的收藏列表查询添加ILawsCommonService
This commit is contained in:
+14
-4
@@ -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<LawsStandardC
|
||||
@Autowired
|
||||
private EnterpriseStandardService enterpriseStandardService; //企业标准
|
||||
|
||||
@Autowired
|
||||
private ILawsCommonService lawsCommonService;
|
||||
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
@@ -53,21 +58,26 @@ public class LawsStandardCollectionServiceImpl extends ServiceImpl<LawsStandardC
|
||||
QueryWrapper<LawsStandardCollection> queryWrapper = QueryGenerator.initQueryWrapper(lawsStandardCollection, req.getParameterMap());
|
||||
Page<LawsStandardCollection> page = new Page<>(pageNo, pageSize);
|
||||
Page<LawsStandardCollection> collectionPage = page(page, queryWrapper);
|
||||
// this.standardAssignment(collectionPage.getRecords());
|
||||
this.standardAssignment(collectionPage.getRecords());
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
public void standardAssignment(List<LawsStandardCollection> list){
|
||||
for (LawsStandardCollection collection : list) {
|
||||
String standardId = collection.getStandardId();
|
||||
String source = collection.getSource();
|
||||
if ("1".equals(source)){
|
||||
//查询国内标准数据,赋值给collection
|
||||
|
||||
Map<String, Object> 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<String, Object> 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
|
||||
|
||||
Reference in New Issue
Block a user