no message
							parent
							
								
									8150e2e6f0
								
							
						
					
					
						commit
						fe566acead
					
				| 
						 | 
				
			
			@ -478,12 +478,17 @@ public class ASNDetail extends Entity {
 | 
			
		|||
	}
 | 
			
		||||
	
 | 
			
		||||
	public ReceivedRecord newreceiving(Location location, ItemKey itemKey,ReceivedDoc receivedDoc, Date receiveDate, Worker worker) {
 | 
			
		||||
		this.receivedQuantity += this.getExpectedQuantity();
 | 
			
		||||
		this.receivedQuantity += this.getExpectedQuantity()-this.getReceivedQuantity();
 | 
			
		||||
		this.receivedWeight+=this.getWeight();
 | 
			
		||||
		if (this.getExpectedQtyOfMasterUnit() != this.getReceivedQuantity()) {
 | 
			
		||||
			this.setStatusDes("收货中");
 | 
			
		||||
		}else{
 | 
			
		||||
		if (this.getExpectedQuantity()==this.getReceivedQuantity()) {
 | 
			
		||||
			this.setStatusDes("已收货");
 | 
			
		||||
		}else{
 | 
			
		||||
			this.setStatusDes("收货中");
 | 
			
		||||
		}
 | 
			
		||||
		if(this.getReceivedQuantity()>0){
 | 
			
		||||
			this.setBeInput(true);
 | 
			
		||||
		}else{
 | 
			
		||||
			this.setBeInput(false);
 | 
			
		||||
		}
 | 
			
		||||
		ReceivedRecord recRecord = EntityFactory.getEntity(ReceivedRecord.class);
 | 
			
		||||
		recRecord.setAsn(this.asn);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -183,9 +183,17 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA
 | 
			
		|||
					if(colour!=null&&colour.length()>0){
 | 
			
		||||
						colour="/"+colour;
 | 
			
		||||
					}
 | 
			
		||||
					double qty=0;
 | 
			
		||||
					String invQty_hql = "from Inventory inv "
 | 
			
		||||
					+ " where inv.itemKeyInventory.itemKey.lotInfo.propC9='"+d.getLotInfo().getPropC9()+"' "
 | 
			
		||||
					+ " and inv.itemKeyInventory.itemKey.lotInfo.propC3='"+d.getLotInfo().getPropC3()+"' ";
 | 
			
		||||
					List<Inventory> invList = commonDao.findByQuery(invQty_hql);
 | 
			
		||||
					for(Inventory inv:invList){
 | 
			
		||||
						qty+=inv.getQuantity();
 | 
			
		||||
					}
 | 
			
		||||
					obj.put("detail_id", d.getId());
 | 
			
		||||
					obj.put("propC9", d.getLotInfo().getPropC9());// 条码
 | 
			
		||||
					obj.put("order_qty", (int) d.getReceivedQuantity());// 收数量
 | 
			
		||||
					obj.put("order_qty", (int)qty);// 收数量
 | 
			
		||||
					obj.put("propLC2", d.getLotInfo().getPropLC2()+colour);// 供应商
 | 
			
		||||
					status = "1";
 | 
			
		||||
					data = obj.toString();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,10 +26,8 @@ import org.apache.http.client.methods.HttpPost;
 | 
			
		|||
import org.apache.http.entity.StringEntity;
 | 
			
		||||
import org.apache.http.impl.client.DefaultHttpClient;
 | 
			
		||||
import org.apache.http.util.EntityUtils;
 | 
			
		||||
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
import java.util.function.Function;
 | 
			
		||||
 | 
			
		||||
import com.dev.swms.server.interfaces.ItemJobLauncher;
 | 
			
		||||
import com.dev.swms.server.model.base.BillType;
 | 
			
		||||
import com.dev.swms.server.model.base.BoxLabel;
 | 
			
		||||
| 
						 | 
				
			
			@ -748,14 +746,13 @@ public class DefaultASNManager extends DefaultBaseManager implements ASNManager
 | 
			
		|||
			Worker w=this.commonDao.get(Worker.class, rd.getWorker().getId());
 | 
			
		||||
			
 | 
			
		||||
			inventoryManager.receivingAdjust(rd.getLocation().getId(), rd.getItemKey(), quantity, w==null?UserHolder.getUser().getName():w.getName());
 | 
			
		||||
			if(rd.getReceivedQuantity()==quantity){
 | 
			
		||||
			rd.setReceivedQuantity(rd.getReceivedQuantity()-quantity);
 | 
			
		||||
			commonDao.store(rd);
 | 
			
		||||
			if(rd.getReceivedQuantity()==0){
 | 
			
		||||
				commonDao.delete(rd);
 | 
			
		||||
				ad.setDeliveryDate(null);
 | 
			
		||||
				ad.setBeInput(false);
 | 
			
		||||
				commonDao.store(ad);
 | 
			
		||||
			}else{
 | 
			
		||||
				rd.setReceivedQuantity(rd.getReceivedQuantity()-quantity);
 | 
			
		||||
				commonDao.store(rd);
 | 
			
		||||
			}
 | 
			
		||||
			//采购订单退回回传
 | 
			
		||||
			String ldbz=getPropertiesParm("ldxt.bz");
 | 
			
		||||
| 
						 | 
				
			
			@ -2347,5 +2344,4 @@ public class DefaultASNManager extends DefaultBaseManager implements ASNManager
 | 
			
		|||
		// TODO Auto-generated method stub
 | 
			
		||||
		
 | 
			
		||||
	}
 | 
			
		||||
		
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -389,7 +389,7 @@ public class ASNReceiveServlet extends HttpServlet {
 | 
			
		|||
	    asnManager.receiveBackBarPL(asnDetail.getId(), orderQty);
 | 
			
		||||
	    
 | 
			
		||||
	    JSONObject obj = new JSONObject();
 | 
			
		||||
	    obj.put("order_qty", (int) asnDetail.getExpectedQuantity());
 | 
			
		||||
	    obj.put("order_qty", (int) orderQty);
 | 
			
		||||
 | 
			
		||||
	    return returnResponse("1", "撤销收货成功" + new Date(), obj.toString());
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
		Reference in New Issue