|  | @@ -3635,7 +3635,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |                      return AjaxResult.error("库存明细第" + i + "行库存为空");
 | 
	
		
			
				|  |  |                  } else { // 非空修改库存总账
 | 
	
		
			
				|  |  |                      //校验计费日期是等于库存总帐计费日,如果不相等则报错
 | 
	
		
			
				|  |  | -                    checkWhgenleg(tWarehouseBills, tWhgenle);
 | 
	
		
			
				|  |  | +                    checkWhgenleg(wbItem, tWhgenle);
 | 
	
		
			
				|  |  |                      //  库存 <  出库件数
 | 
	
		
			
				|  |  |                      if (tWhgenle.getfQtyblc() < wbItem.getfQty()) {
 | 
	
		
			
				|  |  |                          TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 | 
	
	
		
			
				|  | @@ -3658,7 +3658,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |                      return AjaxResult.error("库存明细第" + i + "行库存为空");
 | 
	
		
			
				|  |  |                  } else { // 非空修改库存总账
 | 
	
		
			
				|  |  |                      //校验计费日期是等于库存总帐计费日,如果不相等则报错
 | 
	
		
			
				|  |  | -                    checkWhgenleg(tWarehouseBills, tWhgenle);
 | 
	
		
			
				|  |  | +                    checkWhgenleg(wbItem, tWhgenle);
 | 
	
		
			
				|  |  |                      if (tWhgenle.getfQtyblc() < wbItem.getfQty()) {  //  1、  库存 <  调拨件数  提示库存不足
 | 
	
		
			
				|  |  |                          TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 | 
	
		
			
				|  |  |                          return AjaxResult.error("库存明细第" + i + "行库存不足");
 | 
	
	
		
			
				|  | @@ -3688,7 +3688,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |                      return AjaxResult.error("库存明细第" + i + "行库存为空");
 | 
	
		
			
				|  |  |                  } else { // 非空修改库存总账
 | 
	
		
			
				|  |  |                      //校验计费日期是等于库存总帐计费日,如果不相等则报错
 | 
	
		
			
				|  |  | -                    checkWhgenleg(tWarehouseBills, tWhgenle);
 | 
	
		
			
				|  |  | +                    checkWhgenleg(wbItem, tWhgenle);
 | 
	
		
			
				|  |  |                      if (tWhgenle.getfQtyblc() < wbItem.getfQty()) {  //  1、  库存 <  调拨件数  提示库存不足
 | 
	
		
			
				|  |  |                          TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 | 
	
		
			
				|  |  |                          return AjaxResult.error("库存明细第" + i + "行库存不足");
 | 
	
	
		
			
				|  | @@ -3807,7 +3807,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |       * @param wbItem
 | 
	
		
			
				|  |  |       * @param tWhgenle
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    private void checkWhgenleg(TWarehouseBills wbItem, TWhgenleg tWhgenle) {
 | 
	
		
			
				|  |  | +    private void checkWhgenleg(TWarehousebillsitems wbItem, TWhgenleg tWhgenle) {
 | 
	
		
			
				|  |  |          // 如果仓储费计费日期超出 库存总帐的计费日期不相等则报异常
 | 
	
		
			
				|  |  |          if (wbItem.getfChargedate().before(tWhgenle.getfChargedate())) {
 | 
	
		
			
				|  |  |              throw new WarehouseException("仓储费计费日期与库存总帐计费日期不相符");
 | 
	
	
		
			
				|  | @@ -4051,7 +4051,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              map.put("feeId", feeCalculationResultVO.getFeeId());
 | 
	
		
			
				|  |  |              map.put("itemFeeId", feeCalculationResultVO.getFeeId());
 | 
	
		
			
				|  |  | -            sumAmt = sumAmt.add(feeCalculationResultVO.getAmt()).setScale(2, RoundingMode.HALF_UP);
 | 
	
		
			
				|  |  | +            sumAmt = sumAmt.add(feeCalculationResultVO.getAmt());
 | 
	
		
			
				|  |  |              TWarehousebillsfees fees = new TWarehousebillsfees();
 | 
	
		
			
				|  |  |              fees.setfFeeid(feeCalculationResultVO.getFeeId());
 | 
	
		
			
				|  |  |              fees.setfDc("D");
 | 
	
	
		
			
				|  | @@ -4060,12 +4060,12 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |              fees.setfMblno(mblno);
 | 
	
		
			
				|  |  |              fees.setRemark(feeCalculationResultVO.getRemark());
 | 
	
		
			
				|  |  |              fees.setfFeeunitid(2L);
 | 
	
		
			
				|  |  | -            fees.setfAmount(sumAmt);
 | 
	
		
			
				|  |  | +            fees.setfAmount(feeCalculationResultVO.getAmt());
 | 
	
		
			
				|  |  |              fees.setfBillstatus(2L);
 | 
	
		
			
				|  |  |              fees.setfCurrency("RMB");
 | 
	
		
			
				|  |  |              fees.setfBsdate(fBsdate);
 | 
	
		
			
				|  |  |              fees.setfBillingQty(feeCalculationResultVO.getQty());
 | 
	
		
			
				|  |  | -            fees.setfUnitprice(sumAmt);
 | 
	
		
			
				|  |  | +            fees.setfUnitprice(feeCalculationResultVO.getAmt());
 | 
	
		
			
				|  |  |              fees.setfBilltype(fBilltype);
 | 
	
		
			
				|  |  |              fees.setCreateTime(new Date());
 | 
	
		
			
				|  |  |              fees.setfBillingDays(fBillingDays);
 | 
	
	
		
			
				|  | @@ -4972,14 +4972,14 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |                      .map(TWarehousebillsfees::getSrcId).collect(toList());
 | 
	
		
			
				|  |  |              // 判断库存总账是否存在二次计算
 | 
	
		
			
				|  |  |              if (!generalLedgerIds.isEmpty() && tWhgenlegMapper.queryChangedByFchargedate(generalLedgerIds, chargedate) > 0) {
 | 
	
		
			
				|  |  | -                throw new WarehouseException("审批撤销失败,库存总账存在二级计算");
 | 
	
		
			
				|  |  | +                throw new WarehouseException("审批撤销失败,库存总账存在二次计算");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              // 过滤货转库信息id集合查询是否存在变更的
 | 
	
		
			
				|  |  |              List<Long> forwardingIds = feesList.stream().filter(li -> Objects.nonNull(li.getSrcId()) && Objects.equals(WarehouseTypeEnum.HQZY.getType(), li.getfBilltype()))
 | 
	
		
			
				|  |  |                      .map(TWarehousebillsfees::getSrcId).collect(toList());
 | 
	
		
			
				|  |  |              // 判断货转是否存在二次计算
 | 
	
		
			
				|  |  |              if (!forwardingIds.isEmpty() && tWarehousebillsitemsMapper.queryChangedByFchargedate(forwardingIds, chargedate) > 0) {
 | 
	
		
			
				|  |  | -                throw new WarehouseException("审批撤销失败,货转明细存在二级计算");
 | 
	
		
			
				|  |  | +                throw new WarehouseException("审批撤销失败,货转明细存在二次计算");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              for (TWarehousebillsfees wareItem : feesList) {
 | 
	
		
			
				|  |  |                  if (StringUtils.isNull(wareItem.getSrcId())) {
 | 
	
	
		
			
				|  | @@ -6953,10 +6953,10 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |              infoVO.setStltypeName(dictLabel);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          // 贸易方式
 | 
	
		
			
				|  |  | -        if (StringUtils.isNotNull(infoVO.getfNewTrademodeid())) {
 | 
	
		
			
				|  |  | +        if (StringUtils.isNotNull(infoVO.getfTrademodeid())) {
 | 
	
		
			
				|  |  |              String type = "data_trademodes";
 | 
	
		
			
				|  |  |              // 转换贸易方式
 | 
	
		
			
				|  |  | -            String dictLabel = DictUtils.getDictLabel(type, infoVO.getfNewTrademodeid().toString());
 | 
	
		
			
				|  |  | +            String dictLabel = DictUtils.getDictLabel(type, infoVO.getfTrademodeid().toString());
 | 
	
		
			
				|  |  |              if (StringUtils.isNotEmpty(dictLabel)) {
 | 
	
		
			
				|  |  |                  infoVO.setNewTrademodeName(dictLabel);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -6999,6 +6999,15 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
	
		
			
				|  |  |                  infoVO.setBusinessTypeName(dictLabel);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        // 贸易方式
 | 
	
		
			
				|  |  | +        if (StringUtils.isNotNull(infoVO.getfTrademodeid())) {
 | 
	
		
			
				|  |  | +            String type = "data_trademodes";
 | 
	
		
			
				|  |  | +            // 转换贸易方式
 | 
	
		
			
				|  |  | +            String dictLabel = DictUtils.getDictLabel(type, infoVO.getfTrademodeid().toString());
 | 
	
		
			
				|  |  | +            if (StringUtils.isNotEmpty(dictLabel)) {
 | 
	
		
			
				|  |  | +                infoVO.setNewTrademodeName(dictLabel);
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          // 仓库id集合
 | 
	
		
			
				|  |  |          List<Long> warehouseIds = new ArrayList<>();
 | 
	
		
			
				|  |  |          if (StringUtils.isNotNull(infoVO.getfInwarehouseid())) {
 |