清单导出缺少数据 应该只在国家地区清单出现!已修复
This commit is contained in:
+33
-4
@@ -11,6 +11,7 @@ import com.adc.da.slrs.sarLawsAttrDetailedList.service.ISarLawsAttrDetailedListS
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -118,7 +119,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
**/
|
||||
@ApiOperation(value = "导出标准信息")
|
||||
@GetMapping("/ExportLawsById")
|
||||
public void ExportLawsById(HttpServletResponse response, StandExcelVo standExcelVo){
|
||||
public void ExportLawsById(HttpServletResponse response, StandExcelVo standExcelVo,@RequestParam(required = false,defaultValue = "0")String type){
|
||||
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
@@ -140,6 +141,34 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
}else {
|
||||
data=sarLawsAttrDetailedListDao.selectLawsByIdE(standExcelVo.getIds());
|
||||
}
|
||||
if ("1".equals(type)){
|
||||
List<String> lawsIds=new ArrayList<>();
|
||||
SarFindDto sarFindDto=new SarFindDto();
|
||||
sarFindDto.setId(standExcelVo.getId());
|
||||
data.forEach(lawsDto -> {lawsIds.add(lawsDto.getId());});
|
||||
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds,sarFindDto);
|
||||
for (LawsDto lawsDto:data){
|
||||
if (StringUtils.isNoneEmpty(lawsDto.getApplyArctic())){
|
||||
lawsDto.setApplyArctic(lawsDto.getApplyArctic());
|
||||
}
|
||||
QueryWrapper<SarLawsAttrDetailedList> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("stand_id",lawsDto.getId())
|
||||
.eq("detailed_list_id",sarFindDto.getId());
|
||||
List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists = sarLawsAttrDetailedListDao.selectList(queryWrapper);
|
||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getSsrq()) && "null" != sarLawsAttrDetailedLists.get(0).getSsrq()) {
|
||||
lawsDto.setSSRQ(sarLawsAttrDetailedLists.get(0).getSsrq());
|
||||
}
|
||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getXcxssrq()) && "null" != sarLawsAttrDetailedLists.get(0).getXcxssrq()) {
|
||||
lawsDto.setXCXSSRQGJ(sarLawsAttrDetailedLists.get(0).getXcxssrq());
|
||||
}
|
||||
if (StringUtils.isNoneEmpty(sarLawsAttrDetailedLists.get(0).getZccssrq()) && "null" != sarLawsAttrDetailedLists.get(0).getZccssrq()) {
|
||||
lawsDto.setZCCSSRQGJ(sarLawsAttrDetailedLists.get(0).getZccssrq());
|
||||
}
|
||||
if ("INLAND".equals(lawsDto.getStandType())) lawsDto.setStandType("INLAND_STAND");
|
||||
if ("FOREIGN".equals(lawsDto.getStandType())) lawsDto.setStandType("FOREIGN_STAND");
|
||||
|
||||
}
|
||||
}
|
||||
//适用车型
|
||||
Map<String,Object> map= iDicTypeEOService.getDicTypeListCode();
|
||||
List<Map<String, String>> typeApplicable = (List<Map<String, String>>)map.get("ENERGYTYPES");
|
||||
@@ -227,13 +256,13 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
|
||||
List<Map<String, String>> sycpx = (List<Map<String, String>>)map.get("SYCPXCLASS");
|
||||
for (LawsDto list1:data){
|
||||
if (list1.getSSRQ()!=null){
|
||||
list1.setSSRQ(list1.getSSRQ().substring(0,10));
|
||||
list1.setSSRQ(list1.getSSRQ());
|
||||
}
|
||||
if (list1.getZCCSSRQGJ()!=null){
|
||||
list1.setZCCSSRQGJ(list1.getZCCSSRQGJ().substring(0,10));
|
||||
list1.setZCCSSRQGJ(list1.getZCCSSRQGJ());
|
||||
}
|
||||
if (list1.getXCXSSRQGJ()!=null){
|
||||
list1.setXCXSSRQGJ(list1.getXCXSSRQGJ().substring(0,10));
|
||||
list1.setXCXSSRQGJ(list1.getXCXSSRQGJ());
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(list1.getSYCPX()) && list1.getSYCPX().contains(",")){
|
||||
|
||||
Reference in New Issue
Block a user