|
@@ -68,13 +68,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
|
|
|
|
private Map<String,Long> departments = new HashMap<>();
|
|
private Map<String,Long> departments = new HashMap<>();
|
|
|
|
|
|
- private Map<String,Long> realAmounts = new HashMap<>();
|
|
|
|
|
|
+// private Map<String,Long> realAmounts = new HashMap<>();
|
|
|
|
|
|
- private Map<String,Long> orderFundIds = new HashMap<>();
|
|
|
|
|
|
+// private Map<String,Long> orderFundIds = new HashMap<>();
|
|
|
|
|
|
- private Map<String,Long> productionFundIds = new HashMap<>();
|
|
|
|
-
|
|
|
|
- private Map<Long,Long> orderFundIdProdFundIds = new HashMap<>();
|
|
|
|
|
|
+// private Map<String,Long> productionFundIds = new HashMap<>();
|
|
|
|
+//
|
|
|
|
+// private Map<Long,Long> orderFundIdProdFundIds = new HashMap<>();
|
|
|
|
|
|
private static final Map<String,String> MAJOR_ORDER_COLUM = new HashMap<>();
|
|
private static final Map<String,String> MAJOR_ORDER_COLUM = new HashMap<>();
|
|
|
|
|
|
@@ -682,10 +682,8 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
}
|
|
}
|
|
|
|
|
|
private Long getProductionFundIdByOrderFundId(Long orderFundMbsId) {
|
|
private Long getProductionFundIdByOrderFundId(Long orderFundMbsId) {
|
|
- if (CollectionUtil.isEmpty(orderFundIdProdFundIds)) {
|
|
|
|
- orderFundIdProdFundIds = productionFundService.getProductionFundIdByOrderFundId().stream().collect(Collectors.toMap(ProductionFund::getOrderFundId,BaseEntity::getId));
|
|
|
|
- }
|
|
|
|
- return orderFundIdProdFundIds.get(orderFundMbsId);
|
|
|
|
|
|
+ Map<Long, Long> collect = productionFundService.getProductionFundIdByOrderFundId().stream().collect(Collectors.toMap(ProductionFund::getOrderFundId, BaseEntity::getId));
|
|
|
|
+ return collect.get(orderFundMbsId);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1103,11 +1101,10 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
}
|
|
}
|
|
|
|
|
|
private Long findRealAmountMbsId(String columValue) {
|
|
private Long findRealAmountMbsId(String columValue) {
|
|
- if (CollectionUtil.isEmpty(realAmounts)){
|
|
|
|
- realAmounts = dyoaRecordService.list(new LambdaQueryWrapper<DyoaRecord>().select(DyoaRecord::getMbsId, DyoaRecord::getDyoaId)
|
|
|
|
- .eq(DyoaRecord::getMbsType, REAL_AMOUNT.name())).stream().collect(Collectors.toMap(DyoaRecord::getDyoaId, DyoaRecord::getMbsId));
|
|
|
|
- }
|
|
|
|
- return realAmounts.get(columValue);
|
|
|
|
|
|
+
|
|
|
|
+ Map<String, Long> collect = dyoaRecordService.list(new LambdaQueryWrapper<DyoaRecord>().select(DyoaRecord::getMbsId, DyoaRecord::getDyoaId)
|
|
|
|
+ .eq(DyoaRecord::getMbsType, REAL_AMOUNT.name())).stream().collect(Collectors.toMap(DyoaRecord::getDyoaId, DyoaRecord::getMbsId));
|
|
|
|
+ return collect.get(columValue);
|
|
}
|
|
}
|
|
|
|
|
|
private String getProductionType(String value) {
|
|
private String getProductionType(String value) {
|
|
@@ -1230,17 +1227,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
}
|
|
}
|
|
|
|
|
|
private Long findOrderFundId(String columValue){
|
|
private Long findOrderFundId(String columValue){
|
|
- if (CollectionUtil.isEmpty(orderFundIds)){
|
|
|
|
- orderFundIds = dyoaRecordService.selectOrderFundIdByDyoaOrderId().stream().collect(Collectors.toMap(DyoaRecord::getDyoaId,DyoaRecord::getMbsId));
|
|
|
|
- }
|
|
|
|
- return orderFundIds.get(columValue);
|
|
|
|
|
|
+ Map<String, Long> collect = dyoaRecordService.selectOrderFundIdByDyoaOrderId().stream().collect(Collectors.toMap(DyoaRecord::getDyoaId, DyoaRecord::getMbsId));
|
|
|
|
+ return collect.get(columValue);
|
|
}
|
|
}
|
|
|
|
|
|
private Long findProductionFundId(String columValue) {
|
|
private Long findProductionFundId(String columValue) {
|
|
- if (CollectionUtil.isEmpty(productionFundIds)){
|
|
|
|
- productionFundIds = productionFundService.selectProductionFundIdByDyoaReportNo().stream().collect(Collectors.toMap(ProductionFund::getProductionNo,ProductionFund::getId));
|
|
|
|
- }
|
|
|
|
- return productionFundIds.get(columValue);
|
|
|
|
|
|
+ Map<String, Long> collect = productionFundService.selectProductionFundIdByDyoaReportNo().stream().collect(Collectors.toMap(ProductionFund::getProductionNo, ProductionFund::getId));
|
|
|
|
+ return collect.get(columValue);
|
|
}
|
|
}
|
|
|
|
|
|
// private Long getMbsWorkFlows(String flowCode){
|
|
// private Long getMbsWorkFlows(String flowCode){
|