Browse Source

客户成本中心合计发货金额有误,已调整

v1.0
15989082884@163.com 2 years ago
parent
commit
7606344375
  1. 10
      src/main/java/com/qs/serve/modules/bir/service/impl/BirCenterRateServiceImpl.java

10
src/main/java/com/qs/serve/modules/bir/service/impl/BirCenterRateServiceImpl.java

@ -222,7 +222,7 @@ public class BirCenterRateServiceImpl implements BirCenterRateService {
//创建客户的费率 //创建客户的费率
if(StringUtils.hasText(supplierCode)){ if(StringUtils.hasText(supplierCode)){
try { try {
this.buildCustomerCenterTargetData(centerType, centerId, costCenter, supplierCode, dispatchSumVos); this.buildCustomerCenterTargetData(centerType, centerId, costCenter, supplierCode);
} catch (Exception e) { } catch (Exception e) {
log.error("[{}]创建客户成本中心的费率出现异常:{}",supplierCode,e.getMessage()); log.error("[{}]创建客户成本中心的费率出现异常:{}",supplierCode,e.getMessage());
} }
@ -241,9 +241,8 @@ public class BirCenterRateServiceImpl implements BirCenterRateService {
* @param centerId * @param centerId
* @param costCenter * @param costCenter
* @param supplierCode * @param supplierCode
* @param dispatchSumVos
*/ */
private void buildCustomerCenterTargetData(String centerType, String centerId, TbsCostSubItem.CostCenterTranStr costCenter,String supplierCode, List<ErpDispatchSumVo> dispatchSumVos) { private void buildCustomerCenterTargetData(String centerType, String centerId, TbsCostSubItem.CostCenterTranStr costCenter,String supplierCode) {
LocalDate nowTime = LocalDate.now(); LocalDate nowTime = LocalDate.now();
int curYear = nowTime.getYear(); int curYear = nowTime.getYear();
int curMonth = nowTime.getMonthValue(); int curMonth = nowTime.getMonthValue();
@ -262,6 +261,11 @@ public class BirCenterRateServiceImpl implements BirCenterRateService {
List<BirActivityCenterGoodsMonthVo> centerGoodsMonthVoList = birActivityCenterGoodsMapper.listMonthCusCenterVo(queryCusCenterRate); List<BirActivityCenterGoodsMonthVo> centerGoodsMonthVoList = birActivityCenterGoodsMapper.listMonthCusCenterVo(queryCusCenterRate);
BigDecimal totalCostQty = BigDecimal.ZERO; BigDecimal totalCostQty = BigDecimal.ZERO;
BigDecimal totalDispatchQty = BigDecimal.ZERO; BigDecimal totalDispatchQty = BigDecimal.ZERO;
List<String> supplierCodeList = new ArrayList<>();
supplierCodeList.add(supplierCode);
List<ErpDispatchSumVo> dispatchSumVos = dispatchDataMapper.querySumCost(startMonth,endMonth,supplierCodeList);
for (int monthNumber : currQ) { for (int monthNumber : currQ) {
String tmp = monthNumber>9?monthNumber+"":"0"+monthNumber; String tmp = monthNumber>9?monthNumber+"":"0"+monthNumber;
int currYearMonth = Integer.parseInt(curYear+tmp); int currYearMonth = Integer.parseInt(curYear+tmp);

Loading…
Cancel
Save