|  | @@ -492,8 +492,27 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          //费用支出
 |  |          //费用支出
 | 
											
												
													
														|  |          List<SyCostAllocationCostpay> syCostAllocationCostpays = syCostAllocationCostpayMapper.queryByCostPay(plannum);
 |  |          List<SyCostAllocationCostpay> syCostAllocationCostpays = syCostAllocationCostpayMapper.queryByCostPay(plannum);
 | 
											
												
													
														|  | 
 |  | +        //查询销售订单总数量(用来计算占比),有一个销售订单关联多个委外订单的情况,使用占比算金额
 | 
											
												
													
														|  | 
 |  | +        SyCostAllocation entity = syCostAllocationMapper.querySalerIauantity(syCostAllocation.getGarmentContractno());
 | 
											
												
													
														|  | 
 |  | +        //计算占比
 | 
											
												
													
														|  | 
 |  | +        BigDecimal zhanBi = syCostAllocation.getPlanQuantity().divide(entity.getSalerIquantity(),2);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          for (int i=0;i<syCostAllocationCostpays.size();i++) {
 |  |          for (int i=0;i<syCostAllocationCostpays.size();i++) {
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |              SyCostAllocationCostpay syCostAllocationCostpay = syCostAllocationCostpays.get(i);
 |  |              SyCostAllocationCostpay syCostAllocationCostpay = syCostAllocationCostpays.get(i);
 | 
											
												
													
														|  | 
 |  | +            //人民币税额算占比
 | 
											
												
													
														|  | 
 |  | +            if(oConvertUtils.isNotEmpty(syCostAllocationCostpay.getShuiemoney())){
 | 
											
												
													
														|  | 
 |  | +                syCostAllocationCostpay.setShuiemoney(syCostAllocationCostpay.getShuiemoney().multiply(zhanBi));
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            //人民币(不含税)算占比
 | 
											
												
													
														|  | 
 |  | +            if(oConvertUtils.isNotEmpty(syCostAllocationCostpay.getDisbursedLocalmoney())){
 | 
											
												
													
														|  | 
 |  | +                syCostAllocationCostpay.setDisbursedLocalmoney(syCostAllocationCostpay.getDisbursedLocalmoney().multiply(zhanBi));
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            //美元算占比
 | 
											
												
													
														|  | 
 |  | +            if(oConvertUtils.isNotEmpty(syCostAllocationCostpay.getDisbursedOriginalmoney())){
 | 
											
												
													
														|  | 
 |  | +                syCostAllocationCostpay.setDisbursedOriginalmoney(syCostAllocationCostpay.getDisbursedOriginalmoney().multiply(zhanBi));
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |              //费用支出单原币本币汇总 并 赋值给表头(运杂费)
 |  |              //费用支出单原币本币汇总 并 赋值给表头(运杂费)
 | 
											
												
													
														|  |              if(syCostAllocation.getUsdExpense()==null){
 |  |              if(syCostAllocation.getUsdExpense()==null){
 | 
											
												
													
														|  |                  syCostAllocation.setUsdExpense(syCostAllocationCostpay.getDisbursedOriginalmoney());
 |  |                  syCostAllocation.setUsdExpense(syCostAllocationCostpay.getDisbursedOriginalmoney());
 |