no message
							parent
							
								
									9703509acd
								
							
						
					
					
						commit
						c9a96ddf45
					
				| 
						 | 
				
			
			@ -15,6 +15,7 @@ import com.dev.swms.server.model.base.PackageUnit;
 | 
			
		|||
import com.dev.swms.server.model.base.Warehouse;
 | 
			
		||||
import com.dev.swms.server.model.count.CountRecord;
 | 
			
		||||
import com.dev.swms.server.model.inventory.Inventory;
 | 
			
		||||
import com.dev.swms.server.model.inventory.InventoryLog;
 | 
			
		||||
import com.dev.swms.server.model.inventory.ItemKeyInventory;
 | 
			
		||||
import com.dev.swms.server.model.inventory.ProcessDoc;
 | 
			
		||||
import com.dev.swms.server.model.inventory.ProductInventory;
 | 
			
		||||
| 
						 | 
				
			
			@ -300,4 +301,16 @@ public interface InventoryManager extends BaseManager{
 | 
			
		|||
	@Transactional
 | 
			
		||||
	void recordLog(String logType, int incOrDec,String relatedBill,BillType billType,Location location,String LP,ItemKey itemKey, 
 | 
			
		||||
			Date storageDate,String soi,double occurQuantity,PackageUnit unit,String status,Long referenceLog,String description);
 | 
			
		||||
	
 | 
			
		||||
	/**
 | 
			
		||||
	 * 库内移位提交
 | 
			
		||||
	 * @param ids
 | 
			
		||||
	 */
 | 
			
		||||
	@Transactional
 | 
			
		||||
	void moveTj(long inventoryId,String tjBz);
 | 
			
		||||
	
 | 
			
		||||
	@Transactional
 | 
			
		||||
	InventoryLog addInventoryLog(String logType, int incOrDec, String relatedBill, Location location, 
 | 
			
		||||
			String LP, ItemKey itemKey, Date storageDate, String soi, double occurQuantity, PackageUnit unit, 
 | 
			
		||||
			String status, Long referenceLog, String description, BillType billType) ;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,6 +75,7 @@ import com.dev.energy.server.exception.BusinessException;
 | 
			
		|||
import com.dev.energy.server.model.EntityFactory;
 | 
			
		||||
import com.dev.energy.server.service.pojo.DefaultBaseManager;
 | 
			
		||||
import com.dev.energy.server.util.LocalizedMessage;
 | 
			
		||||
import com.dev.energy.server.web.security.UserHolder;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @author  dev
 | 
			
		||||
| 
						 | 
				
			
			@ -129,7 +130,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven
 | 
			
		|||
	 * @param description 备注
 | 
			
		||||
	 * @param billType 相关单据类型
 | 
			
		||||
	 */
 | 
			
		||||
	private InventoryLog addInventoryLog(String logType, int incOrDec, String relatedBill, Location location, 
 | 
			
		||||
	public InventoryLog addInventoryLog(String logType, int incOrDec, String relatedBill, Location location, 
 | 
			
		||||
			String LP, ItemKey itemKey, Date storageDate, String soi, double occurQuantity, PackageUnit unit, 
 | 
			
		||||
			String status, Long referenceLog, String description, BillType billType) {
 | 
			
		||||
		InventoryLog log = new InventoryLog(logType, incOrDec, relatedBill, billType, location, LP, itemKey, 
 | 
			
		||||
| 
						 | 
				
			
			@ -500,6 +501,10 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven
 | 
			
		|||
			throw new BusinessException("location.lp.refused");
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		/*if(srcInv.getTjDate()==null){
 | 
			
		||||
			throw new BusinessException("库内移位未提交,不允许移位!");
 | 
			
		||||
		}*/
 | 
			
		||||
		
 | 
			
		||||
		//目标库位不混放,验证目标库位是否有库存
 | 
			
		||||
		if(!dstLoc.isMixItem()){
 | 
			
		||||
			String hql=" from Inventory inv where inv.location.id="+destLocationId+" and inv.quantity>0 ";
 | 
			
		||||
| 
						 | 
				
			
			@ -2613,5 +2618,14 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven
 | 
			
		|||
		commonDao.store(log);
 | 
			
		||||
		
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public void moveTj(long inventoryId,String tjBz) {
 | 
			
		||||
			/*Inventory inv=this.load(Inventory.class, inventoryId);
 | 
			
		||||
			inv.setTjr(UserHolder.getUser().getName());
 | 
			
		||||
			inv.setTjDate(new Date());
 | 
			
		||||
			inv.setTjBz(tjBz);
 | 
			
		||||
			commonDao.store(inv);*/
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -593,6 +593,11 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
 | 
			
		|||
			inv.setVolume(log.getVolume());
 | 
			
		||||
			inv.setItemKey(log.getItemKey());
 | 
			
		||||
			commonDao.store(inv);
 | 
			
		||||
			//添加库存日志
 | 
			
		||||
			inventoryManager.addInventoryLog(InventoryLogType.MOVE, 1, null, 
 | 
			
		||||
					inv.getLocation(),	(inv.getLP()==null?null:inv.getLP().getLP()), 
 | 
			
		||||
					inv.getItemKey(), inv.getStorageDate(), 
 | 
			
		||||
					inv.getSOI(), inv.getQuantity(), inv.getPackageUnit(), inv.getStatus(), null, null, null);
 | 
			
		||||
		}
 | 
			
		||||
		updatePreAllocate(pt.getId());
 | 
			
		||||
		updatePickTicketQuantity(pt.getId());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -66,7 +66,7 @@
 | 
			
		|||
 WHERE 1=1 
 | 
			
		||||
 and inventory.SOI={invoiceBox.customsOrder.code}
 | 
			
		||||
 and inventory.beTransfer is null
 | 
			
		||||
 and location.code='中转库位'
 | 
			
		||||
 and location.code='AQNZZDJQ'
 | 
			
		||||
 and inventory.qtyOfMasterPack > 0
 | 
			
		||||
 and inventory.warehouse=#{SESSION_WAREHOUSE}
 | 
			
		||||
 and (company.id in (select u.organization.id from UserOrganize u where u.user=#{SESSION_USERS})
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue