|
@@ -586,40 +586,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
}
|
|
|
|
|
|
|
|
|
- String sqlAccidentSheet =
|
|
|
- "SELECT ah.cPBVCode as accidentNum,VEN.cVenAbbName as accidentUndertaker,sum(A.iOriSum) as amount " +
|
|
|
- " from UFDATA_901_2021.dbo.PurBillVouchs a " +
|
|
|
- " left join UFDATA_901_2021.dbo.PurBillVouch ah on ah.pbvid=a.pbvid " +
|
|
|
- " left join UFDATA_901_2021.dbo.Inventory inv on inv.cInvCode=a.cInvCode " +
|
|
|
- " left join UFDATA_901_2021.dbo.Vendor ven on ven.cVenCode=ah.cvencode " +
|
|
|
- " where cPBVBillType='03' " +
|
|
|
- " and inv.cInvName='事故单' and ah.cDefine2 like CONCAT('"+plannum+"','%') " +
|
|
|
- " group by ah.cPBVCode,VEN.cVenAbbName,ah.cDefine2 " +
|
|
|
- " union all " +
|
|
|
- "SELECT ah.cPBVCode as accidentNum,VEN.cVenAbbName as accidentUndertaker,sum(A.iOriSum) as amount " +
|
|
|
- " from UFDATA_902_2021.dbo.PurBillVouchs a " +
|
|
|
- " left join UFDATA_902_2021.dbo.PurBillVouch ah on ah.pbvid=a.pbvid " +
|
|
|
- " left join UFDATA_902_2021.dbo.Inventory inv on inv.cInvCode=a.cInvCode " +
|
|
|
- " left join UFDATA_902_2021.dbo.Vendor ven on ven.cVenCode=ah.cvencode " +
|
|
|
- " where cPBVBillType='03' " +
|
|
|
- " and inv.cInvName='事故单' and ah.cDefine2 like CONCAT('"+plannum+"','%') " +
|
|
|
- " group by ah.cPBVCode,VEN.cVenAbbName,ah.cDefine2 " +
|
|
|
- " union all " +
|
|
|
- "SELECT ah.cPBVCode as accidentNum,VEN.cVenAbbName as accidentUndertaker,sum(A.iOriSum) as amount " +
|
|
|
- " from UFDATA_903_2021.dbo.PurBillVouchs a " +
|
|
|
- " left join UFDATA_903_2021.dbo.PurBillVouch ah on ah.pbvid=a.pbvid " +
|
|
|
- " left join UFDATA_903_2021.dbo.Inventory inv on inv.cInvCode=a.cInvCode " +
|
|
|
- " left join UFDATA_903_2021.dbo.Vendor ven on ven.cVenCode=ah.cvencode " +
|
|
|
- " where cPBVBillType='03' " +
|
|
|
- " and inv.cInvName='事故单' and ah.cDefine2 like CONCAT('"+plannum+"','%') " +
|
|
|
- " group by ah.cPBVCode,VEN.cVenAbbName,ah.cDefine2";
|
|
|
- List<Map<String, Object>> accidentSheetList = senYuDataSourceOne.queryForList(sqlAccidentSheet);
|
|
|
- List<JSONObject> accidentSheet = JsonChangeUtils.toJSONObject(accidentSheetList);
|
|
|
- List<SyCostAllocationAccident> syCostAllocationAccident = new ArrayList<>();
|
|
|
- for (int i=0;i<accidentSheet.size();i++) {
|
|
|
- SyCostAllocationAccident syCostAllocationCostpay = JSONObject.toJavaObject(accidentSheet.get(i), SyCostAllocationAccident.class);
|
|
|
- syCostAllocationAccident.add(syCostAllocationCostpay);
|
|
|
- }
|
|
|
+ List<SyCostAllocationAccident> syCostAllocationAccident = syCostAllocationAccidentMapper.queryByCostAccident(plannum);
|
|
|
syCostAllocation.setSyCostAllocationAccidentList(syCostAllocationAccident);
|
|
|
|
|
|
|