diff --git a/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceManager.java b/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceManager.java index e2acbd8..bb7450f 100644 --- a/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceManager.java +++ b/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceManager.java @@ -1587,7 +1587,7 @@ public class DefaultInterfaceManager extends DefaultBaseManager implements Inter int shsl=Integer.parseInt(sl.trim()); obj.put("qty",shsl); obj.put("put_xs", getPutXs(tph,d.getId(),it.getCode())); - List pfs=this.commonDao.findByQuery("from Pinfan pf where pf.item.id="+d.getItem().getId()+" and pf.bonded='"+tax+"'"); + List pfs=this.commonDao.findByQuery("from Pinfan pf where pf.item.id="+d.getItem().getId()+" and pf.bonded='"+tax+"' and pf.zone.code like '%CKD%'"); if(pfs.size()<=0){ throw new BusinessException("请维护品番关联"); }else{ diff --git a/src/main/java/com/dev/swms/server/service/receiving/pojo/DefaultASNManager.java b/src/main/java/com/dev/swms/server/service/receiving/pojo/DefaultASNManager.java index 11557df..21812a4 100644 --- a/src/main/java/com/dev/swms/server/service/receiving/pojo/DefaultASNManager.java +++ b/src/main/java/com/dev/swms/server/service/receiving/pojo/DefaultASNManager.java @@ -2453,6 +2453,9 @@ public class DefaultASNManager extends DefaultBaseManager implements ASNManager Long id=Long.parseLong(sheet.getCell(0,i).getContents().trim()); Inventory inv=this.commonDao.get(Inventory.class, id); if(inv!=null){ + //清0日志 + InventoryLog log=pickKamsManager.addInventoryLog(InventoryLogType.COUNT_ADJUST, -1, inv.getZone(), inv.getLocation(), null, inv.getItemKey(), + inv.getQuantity(), null, UserHolder.getUser().getName(), inv.getId(), "调整数量"+inv.getQuantity()+"盘点归0", null, null, inv.getZzkw()); Double tzQty=Double.parseDouble(sheet.getCell(8,i).getContents().trim()); String tzbz=sheet.getCell(9,i).getContents().trim(); double srcQty=inv.getQtyOfMasterPack(); @@ -2461,22 +2464,22 @@ public class DefaultASNManager extends DefaultBaseManager implements ASNManager this.commonDao.store(inv); String des=(int)srcQty+"变为"+tzQty; int incOrDec=1; - double fasl=srcQty-tzQty;; - if(fasl==0){ - System.out.println(i+1+"行没有调整"); - continue; - } - if(fasl>0){ - incOrDec=-1; - } - InventoryLog log=pickKamsManager.addInventoryLog(InventoryLogType.INVENTORY_ADJUST, incOrDec, inv.getZone(), inv.getLocation(), null, inv.getItemKey(), - Math.abs(fasl), null, UserHolder.getUser().getName(), inv.getId(), des, null, null, inv.getZzkw()); - log.setOperDes(tzbz); - this.commonDao.store(log); +// double fasl=srcQty-tzQty;; +// if(fasl==0){ +// System.out.println(i+1+"行没有调整"); +// continue; +// } +// if(fasl>0){ +// incOrDec=-1; +// } + InventoryLog log2=pickKamsManager.addInventoryLog(InventoryLogType.COUNT_ADJUST, 1, inv.getZone(), inv.getLocation(), null, inv.getItemKey(), + inv.getQuantity(), null, UserHolder.getUser().getName(), inv.getId(), "盘点初始值"+inv.getQuantity(), null, null, inv.getZzkw()); + log2.setOperDes(tzbz); + this.commonDao.store(log2); System.out.println(i+1+"行调整完成"); }else{ System.out.println(i+1+"行没找到"); - + } } } catch (BiffException e) { diff --git a/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultPickKamsManager.java b/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultPickKamsManager.java index de2ca9e..07b28d3 100644 --- a/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultPickKamsManager.java +++ b/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultPickKamsManager.java @@ -1131,7 +1131,13 @@ public class DefaultPickKamsManager extends DefaultBaseManager implements PickKa this.commonDao.store(r); } PickTicketDetail ptd=t.getPickTicketDetail(); - Inventory inv=findInventory(t.getItemKey(), zone, xb_loc, pt.getCode(), SysCode.XB1, ptd.getZzkw()); + ItemKey key =t.getItemKey(); + //重新生成itemKey,不带批次 + if(t.getItemKey().getItem().isBeWeight()){//发动机重新获得批次 + key = this.itemManager.getItemKey(new ItemKey("", + key.getItem(), key.getPinfan()), Boolean.TRUE,null); + } + Inventory inv=findInventory(key, zone, xb_loc, pt.getCode(), SysCode.XB1, ptd.getZzkw()); double xb_qty=l.getShipQuantity(); t_xb_qty+=xb_qty; double srcQty1=0; @@ -1597,39 +1603,42 @@ public class DefaultPickKamsManager extends DefaultBaseManager implements PickKa hql+=" and i.itemKey.pinfan.bonded='"+b.getBonded()+"' "; hql+=" and i.itemKey.pinfan.zone.id!=77 "; } + if(b.getItem().isBeWeight()){//发动机去除批次 + hql+=" and i.itemKey.lotInfo.propC3 is null"; + } hql+=" and i.location.id="+xb_loc.getId()+" order by i.itemKey.lotInfo.propC3"; // hql+=" order by i.id "; List invs=commonDao.findByQuery(hql); double srcQty1=0; if(invs.size()>0) { double qty=Double.parseDouble(b.getSingle())*sp.getOrderQuantity(); - //如果为发动机,则按照批次耗用 - if(b.getItem().isBeWeight()){ - int i=0; - for(Inventory inv:invs){ - if(qty<=0){ - break; - } - i++; - if(iqty||i==invs.size()){ - hyQty=qty; - qty-=hyQty; - }else{ - hyQty=inv.getQtyOfMasterPack(); - qty-=hyQty; - } - inv.setQtyOfMasterPack(inv.getQtyOfMasterPack()-hyQty); - inv.setQuantity(inv.getQtyOfMasterPack()); - commonDao.store(inv); - this.addInventoryLog(InventoryLogType.PROCESS_DOWN, -1, b.getZone(), inv.getLocation(), sp.getBigItem().getCode(), inv.getItemKey(), - hyQty, null, UserHolder.getUser().getName(), null, (int)srcQty1+"变为"+(int)inv.getQtyOfMasterPack()+"hy"+sp.getId(), null, null, b.getZzkw()); - } - }else{ +// //如果为发动机,则按照批次耗用 +// if(b.getItem().isBeWeight()){ +// int i=0; +// for(Inventory inv:invs){ +// if(qty<=0){ +// break; +// } +// i++; +// if(iqty||i==invs.size()){ +// hyQty=qty; +// qty-=hyQty; +// }else{ +// hyQty=inv.getQtyOfMasterPack(); +// qty-=hyQty; +// } +// inv.setQtyOfMasterPack(inv.getQtyOfMasterPack()-hyQty); +// inv.setQuantity(inv.getQtyOfMasterPack()); +// commonDao.store(inv); +// this.addInventoryLog(InventoryLogType.PROCESS_DOWN, -1, b.getZone(), inv.getLocation(), sp.getBigItem().getCode(), inv.getItemKey(), +// hyQty, null, UserHolder.getUser().getName(), null, (int)srcQty1+"变为"+(int)inv.getQtyOfMasterPack()+"hy"+sp.getId(), null, null, b.getZzkw()); +// } +// }else{ Inventory inv=invs.get(0); srcQty1=inv.getQtyOfMasterPack(); @@ -1638,7 +1647,7 @@ public class DefaultPickKamsManager extends DefaultBaseManager implements PickKa commonDao.store(inv); this.addInventoryLog(InventoryLogType.PROCESS_DOWN, -1, b.getZone(), inv.getLocation(), sp.getBigItem().getCode(), inv.getItemKey(), qty, null, UserHolder.getUser().getName(), null, (int)srcQty1+"变为"+(int)inv.getQtyOfMasterPack()+"hy"+sp.getId(), null, null, b.getZzkw()); - } +// } }else { //生成库存记录 Inventory inv=EntityFactory.getEntity(Inventory.class); diff --git a/src/webapp/WEB-INF/classes/config/origen/circulation/maintainProductionPlanPage.xml b/src/webapp/WEB-INF/classes/config/origen/circulation/maintainProductionPlanPage.xml index 156db45..c1b2e51 100644 --- a/src/webapp/WEB-INF/classes/config/origen/circulation/maintainProductionPlanPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/circulation/maintainProductionPlanPage.xml @@ -18,7 +18,9 @@ where 1=1 and commonCode.codeType='工位' order by commonCode.id]]> - + + + @@ -65,8 +67,8 @@ /~procedure: and pp.procedure like {procedure} ~/ /~p.numberNo: and pp.numberNo like {p.numberNo} ~/ /~ p.bomList.id: and pp.bomList.id = {p.bomList.id} ~/ - /~pickTicket.orderDate.begin: AND pp.OfflineDate >= {pickTicket.orderDate.begin} ~/ - /~pickTicket.orderDate.end: AND pp.OfflineDate <= {pickTicket.orderDate.end} ~/ + /~pp.OfflineDate.begin: AND DATE(pp.OfflineDate) >= {pp.OfflineDate.begin} ~/ + /~pp.OfflineDate.end: AND DATE(pp.OfflineDate) <= {pp.OfflineDate.end} ~/ order by pp.strExtend4 desc,pp.longExtend1 desc,pp.id ]]> diff --git a/src/webapp/WEB-INF/classes/config/origen/inventory/moveInventoryPage.xml b/src/webapp/WEB-INF/classes/config/origen/inventory/moveInventoryPage.xml index 5bbf1c2..a2496d7 100644 --- a/src/webapp/WEB-INF/classes/config/origen/inventory/moveInventoryPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/inventory/moveInventoryPage.xml @@ -20,7 +20,7 @@ AND (location.outLock = '' or location.outLock is null) AND location.warehouse = #{SESSION_WAREHOUSE} AND location.code <> ${inventory.location.code} - AND location.type in ('STORAGE','TRANSIT','BAD','SHIP')]]> + AND (location.type in ('STORAGE','TRANSIT','BAD','SHIP') OR location.code='JBTXB' )]]>