Commit 64369b69 authored by chenzhao's avatar chenzhao

资料下载补充发货单模版 统计首页问题修复

parent 51134736
...@@ -108,6 +108,10 @@ public class CommonServiceImpl { ...@@ -108,6 +108,10 @@ public class CommonServiceImpl {
@Autowired @Autowired
HygfWorkOrderStationAuditingMapper workOrderStationAuditingMapper; HygfWorkOrderStationAuditingMapper workOrderStationAuditingMapper;
@Autowired @Autowired
HouseholdContractMapper householdContractMapper;
@Autowired
PowerStationEngineeringInfoMapper powerStationEngineeringInfoMapper;
@Autowired
BasicGridAuditingMapper basicGridAuditingMapper; BasicGridAuditingMapper basicGridAuditingMapper;
@Autowired @Autowired
ConstructionRecordsMapper constructionRecordsMapper; ConstructionRecordsMapper constructionRecordsMapper;
...@@ -994,11 +998,23 @@ public class CommonServiceImpl { ...@@ -994,11 +998,23 @@ public class CommonServiceImpl {
private void fillSheetFH(Sheet sheet, PreparationMoney preparationMoney){ private void fillSheetFH(Sheet sheet, PreparationMoney preparationMoney){
if (Objects.isNull(preparationMoney)){
return;
}
LambdaQueryWrapper<DocumentStation> q = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DocumentStation> q = new LambdaQueryWrapper<>();
q.eq(DocumentStation::getPreparationMoneyId, preparationMoney.getSequenceNbr()); q.eq(DocumentStation::getPreparationMoneyId, preparationMoney.getSequenceNbr());
List<DocumentStation> lih = documentStationMapper.selectList(q); List<DocumentStation> lih = documentStationMapper.selectList(q);
if(lih != null && lih.size() > 0) {
lih.forEach(e -> {
if(e.getPeasantHouseholdNo() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
e.setRealScale(powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo(e.getPeasantHouseholdNo()));
}
});
}
List<Long> ids = new ArrayList<>(); List<Long> ids = new ArrayList<>();
for (DocumentStation documentStation : lih) { for (DocumentStation documentStation : lih) {
...@@ -1098,7 +1114,7 @@ public class CommonServiceImpl { ...@@ -1098,7 +1114,7 @@ public class CommonServiceImpl {
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != designInformation.getCable()){ if (null != preparationMoney.getHygfReplenishments()){
List<Map<String, Object>> maps = convertList(preparationMoney.getHygfReplenishments()); List<Map<String, Object>> maps = convertList(preparationMoney.getHygfReplenishments());
int headerRow = startRowNum +1 ; // 表头所在的行 int headerRow = startRowNum +1 ; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行 int headerOneRow = startRowNum; // 表头所在的行
...@@ -1114,6 +1130,22 @@ public class CommonServiceImpl { ...@@ -1114,6 +1130,22 @@ public class CommonServiceImpl {
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps); documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
} }
if (null != lih){
List<Map<String, Object>> maps = convertList(lih);
int headerRow = startRowNum +1 ; // 表头所在的行
int headerOneRow = startRowNum; // 表头所在的行
int dataStartRow = startRowNum+2; // 数据开始的行
startRowNum= dataStartRow +2+maps.size();
// 假设表头内容如下:
String headerOne = "电站列表";
String[] headersNames = {"农户编号", "业主姓名","经销商","项目地址","电站安装规模(kW)","电站实际规模(kW)"};
String[] headers = {"peasantHouseholdNo", "ownersName","developerName","projectAddressName","scale","realScale"};
documentSpecialProcessing(sheet,headerRow,headerOneRow,dataStartRow,headersNames,headers,headerOne,maps);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment