no message
							parent
							
								
									0546bdfb17
								
							
						
					
					
						commit
						495cbc4744
					
				| 
						 | 
					@ -4060,16 +4060,30 @@ public class DefaultCustomsOrderManager extends DefaultBaseManager implements Cu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
	public void totalFee(List<Long> ids) {
 | 
						public void totalFee(List<Long> ids) {
 | 
				
			||||||
		DecimalFormat   df   =new DecimalFormat("#0.00");  
 | 
							StringBuffer mBuffer1 = new StringBuffer();
 | 
				
			||||||
		double feeMenoy=0;
 | 
					
 | 
				
			||||||
		double actualMoney=0;
 | 
						    // 使用 BigDecimal 初始化金额变量
 | 
				
			||||||
 | 
						   
 | 
				
			||||||
 | 
						 	BigDecimal feeMenoys = BigDecimal.ZERO; // 应收
 | 
				
			||||||
 | 
						    BigDecimal actualMoneys = BigDecimal.ZERO; // 实收
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
		for(Long id:ids){
 | 
							for(Long id:ids){
 | 
				
			||||||
			Fee fee=commonDao.load(Fee.class, id);
 | 
								Fee fee=commonDao.load(Fee.class, id);
 | 
				
			||||||
			feeMenoy+=fee.getFeeMenoy();
 | 
								 BigDecimal feeMenoy = new BigDecimal(fee.getFeeMenoy()).setScale(2, RoundingMode.HALF_UP);
 | 
				
			||||||
			actualMoney+=fee.getActualMoney();
 | 
								 feeMenoys = feeMenoys.add(feeMenoy);
 | 
				
			||||||
 | 
								 BigDecimal actualMoney = new BigDecimal(fee.getFeeMenoy()).setScale(2, RoundingMode.HALF_UP);
 | 
				
			||||||
 | 
								 actualMoneys = actualMoneys.add(actualMoney);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		double wsMoney=feeMenoy-actualMoney;
 | 
						
 | 
				
			||||||
		throw new BusinessException("合计:"+"应付金额:"+df.format(feeMenoy)+" ; "+"  实付金额:"+df.format(actualMoney)+" ; "+"  未付金额:"+df.format(wsMoney));
 | 
							
 | 
				
			||||||
 | 
							 // 格式化金额为保留两位小数
 | 
				
			||||||
 | 
						    String msg = mBuffer1
 | 
				
			||||||
 | 
						            .append("合计:"+"应付金额:").append(feeMenoys).append(" ; ")
 | 
				
			||||||
 | 
						            .append("实付金额:").append(actualMoneys).append(" ; ")
 | 
				
			||||||
 | 
						            .append("未付金额:").append(feeMenoys.subtract(actualMoneys)).append(" ; ").toString();
 | 
				
			||||||
 | 
						            throw new BusinessException(msg);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Override
 | 
						@Override
 | 
				
			||||||
| 
						 | 
					@ -4125,7 +4139,6 @@ public class DefaultCustomsOrderManager extends DefaultBaseManager implements Cu
 | 
				
			||||||
		    BigDecimal issuingMoneys = BigDecimal.ZERO; // 开票金额
 | 
							    BigDecimal issuingMoneys = BigDecimal.ZERO; // 开票金额
 | 
				
			||||||
		    BigDecimal noTaxMoneys = BigDecimal.ZERO; // 未税金额
 | 
							    BigDecimal noTaxMoneys = BigDecimal.ZERO; // 未税金额
 | 
				
			||||||
		    BigDecimal taxAmounts = BigDecimal.ZERO; // 税额
 | 
							    BigDecimal taxAmounts = BigDecimal.ZERO; // 税额
 | 
				
			||||||
 | 
					 | 
				
			||||||
		    for (Long id : ids) {
 | 
							    for (Long id : ids) {
 | 
				
			||||||
		        BillFee bf = commonDao.load(BillFee.class, id);
 | 
							        BillFee bf = commonDao.load(BillFee.class, id);
 | 
				
			||||||
		        
 | 
							        
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -552,7 +552,7 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
 | 
				
			||||||
		//logManager.bolShipResponse(bol);
 | 
							//logManager.bolShipResponse(bol);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	
 | 
						@SuppressWarnings("unchecked")
 | 
				
			||||||
	private void pickShip2(PickTicket pt) {
 | 
						private void pickShip2(PickTicket pt) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		List<TaskLog> taskLogs = commonDao.findByQuery("FROM TaskLog log WHERE log.movedQuantity>log.shipQuantity and log.task.pickTicketDetail.pickTicket.id = " + pt.getId());
 | 
							List<TaskLog> taskLogs = commonDao.findByQuery("FROM TaskLog log WHERE log.movedQuantity>log.shipQuantity and log.task.pickTicketDetail.pickTicket.id = " + pt.getId());
 | 
				
			||||||
| 
						 | 
					@ -562,9 +562,7 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
 | 
				
			||||||
			PickTicketDetail detail = log.getTask().getPickTicketDetail();
 | 
								PickTicketDetail detail = log.getTask().getPickTicketDetail();
 | 
				
			||||||
			 //扣减发货单及其明细BOL数量、包箱数量,增加发货单及其明细的发运数量
 | 
								 //扣减发货单及其明细BOL数量、包箱数量,增加发货单及其明细的发运数量
 | 
				
			||||||
			detail.ship(shipQuantity*log.getPackageUnit().getConvertFigure());
 | 
								detail.ship(shipQuantity*log.getPackageUnit().getConvertFigure());
 | 
				
			||||||
			detail.setStorageDate(log.getStorageDate());
 | 
								//扣减库存
 | 
				
			||||||
			commonDao.store(detail);
 | 
					 | 
				
			||||||
			
 | 
					 | 
				
			||||||
			inventoryManager.ship(pt.getDock().getId(),
 | 
								inventoryManager.ship(pt.getDock().getId(),
 | 
				
			||||||
					log.getItemKey(),
 | 
										log.getItemKey(),
 | 
				
			||||||
					shipQuantity,
 | 
										shipQuantity,
 | 
				
			||||||
| 
						 | 
					@ -578,7 +576,6 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
 | 
				
			||||||
					pt.getBillType());
 | 
										pt.getBillType());
 | 
				
			||||||
			detail.setStorageDate(log.getStorageDate());
 | 
								detail.setStorageDate(log.getStorageDate());
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
			
 | 
					 | 
				
			||||||
			Location destLocation=this.load(Location.class, 10720L);//10720
 | 
								Location destLocation=this.load(Location.class, 10720L);//10720
 | 
				
			||||||
			Warehouse warehouse=this.load(Warehouse.class, 1000L);//非保仓库
 | 
								Warehouse warehouse=this.load(Warehouse.class, 1000L);//非保仓库
 | 
				
			||||||
			//非保中转库位;目标库位
 | 
								//非保中转库位;目标库位
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue