From 413818c1cea9a46c2e7da6de72d50e5ffdb2541c Mon Sep 17 00:00:00 2001 From: userName Date: Sat, 9 Aug 2025 11:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/interfaces/ItemJobLauncher.java | 6 +- .../model/receiving/LibraryTaskType.java | 1 + .../swms/server/model/receiving/STATUS.java | 4 +- .../swms/server/service/base/ItemManager.java | 5 + .../base/pojo/DefaultAgvTaskManager.java | 34 +++-- .../service/base/pojo/DefaultItemManager.java | 15 +++ .../pojo/DefaultInterfaceReqManager.java | 26 +++- .../pojo/DefaultInterfaceRespManager.java | 31 ++++- .../pojo/DefaultQueryAppManager.java | 15 ++- .../service/inventory/InventoryManager.java | 2 +- .../pojo/DefaultInventoryManager.java | 70 ++++++---- .../allocate/DefaultAutoAllocator.java | 2 +- .../receiving/pojo/DefaultASNManager.java | 12 +- .../receiving/pojo/DefaultMoveDocManager.java | 80 ++--------- .../pojo/DefaultPickTicketManager.java | 126 +++++++++++++----- .../shipping/pojo/DefaultWaveDocManager.java | 5 +- .../server/web/servlet/ASNReceiveServlet.java | 6 +- .../server/web/servlet/InventoryServlet.java | 1 - .../origen/base/editPlanItemDetailPage.xml | 31 +++++ .../origen/base/maintainPlanItemPage.xml | 8 +- .../config/origen/base/maintainWorkerPage.xml | 3 + .../inventory/maintainInventoryLogPage.xml | 6 +- .../origen/inventory/maintainXuliehaoPage.xml | 4 +- .../origen/inventory/modifyXLinfoPage.xml | 5 +- .../shipping/maintainOtherPickTicketPage.xml | 73 ++++++++++ .../shipping/maintainPickTicketPage.xml | 11 +- .../origen/shipping/maintainQueryTaskPage.xml | 8 +- .../origen/shipping/maintainTaskPage.xml | 9 +- 28 files changed, 405 insertions(+), 194 deletions(-) create mode 100644 src/webapp/WEB-INF/classes/config/origen/base/editPlanItemDetailPage.xml create mode 100644 src/webapp/WEB-INF/classes/config/origen/shipping/maintainOtherPickTicketPage.xml diff --git a/src/main/java/com/dev/swms/server/interfaces/ItemJobLauncher.java b/src/main/java/com/dev/swms/server/interfaces/ItemJobLauncher.java index e2f888c..7701725 100644 --- a/src/main/java/com/dev/swms/server/interfaces/ItemJobLauncher.java +++ b/src/main/java/com/dev/swms/server/interfaces/ItemJobLauncher.java @@ -530,11 +530,11 @@ public class ItemJobLauncher implements ApplicationListener { } //发送失败的重新发送 public void resendAgvTask() { - synchronized("resendAgvTask") { +// synchronized("resendAgvTask") { agvTaskManager.resendAgvTask();//发送失败的任务 - agvTaskManager.urgentAgvTask(null);//加急 pickTicketManager.updateAGVTask();//重新生成agv任务 - } + agvTaskManager.urgentAgvTask(null);//加急 +// } } public void sapOutStatusOpen(){ //发料完成,并SAP状态为3. diff --git a/src/main/java/com/dev/swms/server/model/receiving/LibraryTaskType.java b/src/main/java/com/dev/swms/server/model/receiving/LibraryTaskType.java index 6f1e1ed..5afd0ad 100644 --- a/src/main/java/com/dev/swms/server/model/receiving/LibraryTaskType.java +++ b/src/main/java/com/dev/swms/server/model/receiving/LibraryTaskType.java @@ -27,6 +27,7 @@ public interface LibraryTaskType { public static String ddjb = "4"; /**任务执行*/ public static String rwzx = "1"; + /**低*/ public static String rkqi = "3"; /**搬运指令*/ diff --git a/src/main/java/com/dev/swms/server/model/receiving/STATUS.java b/src/main/java/com/dev/swms/server/model/receiving/STATUS.java index 79c7e53..51a97db 100644 --- a/src/main/java/com/dev/swms/server/model/receiving/STATUS.java +++ b/src/main/java/com/dev/swms/server/model/receiving/STATUS.java @@ -30,8 +30,8 @@ public interface STATUS { /** * 已完成 */ - public static String RECEIVED = "RECEIVED";//货架任务 - public static String LOAD_COMPLETED = "LOAD_COMPLETED";//料箱任务 + public static String RECEIVED = "RECEIVED";//货架完成 + public static String LOAD_COMPLETED = "LOAD_COMPLETED";//料箱任务完成 /** * 已取消 diff --git a/src/main/java/com/dev/swms/server/service/base/ItemManager.java b/src/main/java/com/dev/swms/server/service/base/ItemManager.java index e4b3b66..265f603 100644 --- a/src/main/java/com/dev/swms/server/service/base/ItemManager.java +++ b/src/main/java/com/dev/swms/server/service/base/ItemManager.java @@ -16,6 +16,7 @@ import com.dev.swms.server.model.base.Item; import com.dev.swms.server.model.base.ItemAttach; import com.dev.swms.server.model.base.ItemKey; import com.dev.swms.server.model.base.LotInfo; +import com.dev.swms.server.model.base.MaterialFactory; import com.dev.swms.server.model.base.NewLotInfo; import com.dev.swms.server.model.base.PackageUnit; import com.dev.swms.server.model.interfaceLog.InterfaceLog; @@ -201,4 +202,8 @@ public interface ItemManager extends BaseManager { void refreshQty(); @Transactional void addItemc(Long itemid,double c,double k,double g,double w,double b,Long zone_id); + + @Transactional + void storeMaterialFactory(MaterialFactory mf); + } diff --git a/src/main/java/com/dev/swms/server/service/base/pojo/DefaultAgvTaskManager.java b/src/main/java/com/dev/swms/server/service/base/pojo/DefaultAgvTaskManager.java index 76e037f..b8084a4 100644 --- a/src/main/java/com/dev/swms/server/service/base/pojo/DefaultAgvTaskManager.java +++ b/src/main/java/com/dev/swms/server/service/base/pojo/DefaultAgvTaskManager.java @@ -2245,11 +2245,15 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask if(list.size()>0) { continue; } + String opName="多查询"; + if(UserHolder.getUser()!=null) { + opName=UserHolder.getUser().getName(); + } if(jsa) { //料箱 ,工作站 ,面 , 1=下发, 优先级 , 业务类型 - callLocAndCallHJ(loc.getStock().getLP(), id,2l,1,1L,SlotType.callTaks,UserHolder.getUser().getName(),remarks); + callLocAndCallHJ(loc.getStock().getLP(), id,2l,1,1L,SlotType.callTaks,opName,remarks); }else { - callLocAndCallHJ(loc.getStock().getLP(), id,2l,1,0L,SlotType.callTaks,UserHolder.getUser().getName(),remarks); + callLocAndCallHJ(loc.getStock().getLP(), id,2l,1,0L,SlotType.callTaks,opName,remarks); } } } @@ -2282,11 +2286,24 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask Long lg=(new Date()).getTime(); logger.error("---OPEN--jiaji11111----"+lg); if(ids==null||ids.size()==0) { - String hql=" select t.agvTask.id from Task t where t.waveDoc.id is not null and t.waveDoc.longtiem>0 " - + " and DATEDIFF(MINUTE,t.dateBill1,GETDATE())>=(t.waveDoc.longtiem*60)" + String hql=" select t.agvTask.id from Task t where t.waveDoc.id >0 " + + " and t.waveDoc.longtiem>0 and t.agvTask.status='ATCALL' " + " and t.planQuantity>0 and t.movedQuantityMU=0 and t.agvTask.jobPriorityType=0 " - + " and t.agvTask.status='ATCALL' group by t.agvTask.id "; + + " and DATEDIFF(MINUTE,t.dateBill1,GETDATE())>=(t.waveDoc.longtiem*60)" + + " group by t.agvTask.id "; List list=commonDao.findByQuery(hql); +// String sql=" select agv.id from task t " + +// " left join WAVE_DOC wd on wd.id=t.WAVE_DOC_ID " + +// " left join agvtask agv on agv.id=t.agvTask_ID " + +// " where t.WAVE_DOC_ID >0 and wd.longtiem>0 " + +// " and t.PLAN_QUANTITY>0 " + +// " and t.MOVED_QUANTITY_MU=0 " + +// " and agv.jobPriorityType=0 " + +// " and DATEDIFF(MINUTE,t.dateBill1,GETDATE())>=(wd.longtiem*60) " + +// " and agv.status='ATCALL' " + +// " group by agv.id "; +// List list = jdbcManager.getListLong(sql.toString()); + if(list.size()>0) { // agvStockJobPriorityType(list); updateUrgentAgvTask(list); @@ -2336,9 +2353,10 @@ public class DefaultAgvTaskManager extends DefaultBaseManager implements AgvTask boolean flag=false; AgvTask agv=commonDao.load(AgvTask.class, id); if(agv.isBeIssue()&&agv.getStatus().equals(STATUS.ATCALL)) { - if(agv.getJobPriorityType()>0&&agv.getJobPriority()>200) { - logger.error(agv.getRobotJobId()+"tiaoguo"); - break; + if(agv.getJobPriorityType().intValue()==1&&agv.getJobPriority().intValue()>200) { + logger.error(agv.getRobotJobId()+"jiaji--------tiaoguo"); +// break; + continue; // agv.setJobPriorityType(1L); // agv.setJobPriority(1000L+agv.getJobPriority()); }else { diff --git a/src/main/java/com/dev/swms/server/service/base/pojo/DefaultItemManager.java b/src/main/java/com/dev/swms/server/service/base/pojo/DefaultItemManager.java index 0576d83..d83f683 100644 --- a/src/main/java/com/dev/swms/server/service/base/pojo/DefaultItemManager.java +++ b/src/main/java/com/dev/swms/server/service/base/pojo/DefaultItemManager.java @@ -1641,6 +1641,21 @@ public class DefaultItemManager extends DefaultBaseManager implements } + public void storeMaterialFactory(MaterialFactory mf) { + String hql =" from ItemKey ik where ik.lotInfo.propC9='"+mf.getPlanCode() + +"' and ik.item.id="+mf.getItem().getId(); + List iks=commonDao.findByQuery(hql); + if(iks.size()>0) { + for(ItemKey ik:iks) { + ik.setBeMarkWeight(mf.isBeMarkWeight()); + commonDao.store(ik); + } + } + commonDao.store(mf); + + wmsOperationHisManager.storeOperationHis(mf.getId(),mf.getPlanCode(), null,"", "序列号调整", "修改",null, + null,0, 0,0, 0,mf.isBeMarkWeight()+ "", "WMS"); + } } diff --git a/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceReqManager.java b/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceReqManager.java index ba3901c..a9a6fb7 100644 --- a/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceReqManager.java +++ b/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceReqManager.java @@ -518,7 +518,7 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In receivedRecord.getItemKey(), receivedRecord.getReceiveDate(), null, receivedRecord.getReceivedQuantity(), null, srcInv == null ? "" : srcInv.getStatus(), srcInv == null ? 0L : srcInv.getId(), null, asn.getBillType(), userId1, receivedRecord.getBarCode(), - null,asn.getSourceType()); + null,asn.getSourceType(),null); if(item!=null&&receivedRecord.getLocation()!=null) { Location location=commonDao.load(Location.class, receivedRecord.getLocation().getId()); item.setWarehouseArea(location.getZone()); @@ -835,6 +835,9 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In String becode=""; for (Long id : ids) { ReceivedRecord receivedRecord = commonDao.load(ReceivedRecord.class, id); + if(receivedRecord!=null&&receivedRecord.getReceivedQuantity()<=0) { + continue; + } ASNDetail asnDetail = commonDao.load(ASNDetail.class, receivedRecord.getAsnDetail().getId()); ASN asn = commonDao.load(ASN.class, receivedRecord.getAsn().getId()); becode=asn.getCode()+asnDetail.getStrBill7(); @@ -1058,8 +1061,11 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In jsonobj2.put("ZWERKSF", mdd.getStrBill9());// 发出工厂 jsonobj2.put("ZWERKST", mdd.getStrBill9());// 接收工厂 jsonobj2.put("MEINS", item.getUnit()); - jsonobj2.put("SBBST", task.getItemKey().getLotInfo().getPropC3() == null ? "" - : task.getItemKey().getLotInfo().getPropC3() + ""); + String PropC3=itemKey.getLotInfo().getPropC3() == null ? "" : itemKey.getLotInfo().getPropC3(); + if(PropC3!=null&&PropC3.equals("E")) { + PropC3=""; + } + jsonobj2.put("SBBST", PropC3); jsonobj2.put("ZSONUM", task.getItemKey().getLotInfo().getPropC5() == null ? "" : task.getItemKey().getLotInfo().getPropC5() + ""); } @@ -1081,8 +1087,11 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In jsonobj2.put("LGORT", itemKey.getLotInfo().getPropC2()); jsonobj2.put("LIFNR", itemKey.getLotInfo().getPropC5() == null ? "" : itemKey.getLotInfo().getPropC5()); jsonobj2.put("BWART", pickTicket.getSourceType()); - jsonobj2.put("SOBKZ", - itemKey.getLotInfo().getPropC3() == null ? "" : itemKey.getLotInfo().getPropC3()); + String PropC3=itemKey.getLotInfo().getPropC3() == null ? "" : itemKey.getLotInfo().getPropC3(); + if(PropC3!=null&&PropC3.equals("E")) { + PropC3=""; + } + jsonobj2.put("SOBKZ",PropC3); jsonobj2.put("MEINS", item.getUnit()); jsonobj2.put("TKFIQ", task.getMovedQuantityMU() + ""); if(itemKey.isBeMarkWeight()) { @@ -1160,8 +1169,11 @@ public class DefaultInterfaceReqManager extends DefaultBaseManager implements In jsonobj2.put("LGORT", task.getItemKey().getLotInfo().getPropC2() == null ? "" : task.getItemKey().getLotInfo().getPropC2() + ""); jsonobj2.put("MEINS", item.getUnit()); - jsonobj2.put("SBBST", task.getItemKey().getLotInfo().getPropC3() == null ? "" - : task.getItemKey().getLotInfo().getPropC3() + ""); + String PropC3=itemKey.getLotInfo().getPropC3() == null ? "" : itemKey.getLotInfo().getPropC3(); + if(PropC3!=null&&PropC3.equals("E")) { + PropC3=""; + } + jsonobj2.put("SBBST", PropC3); jsonobj2.put("ZSONUM", task.getItemKey().getLotInfo().getPropC5() == null ? "" : task.getItemKey().getLotInfo().getPropC5() + ""); if (pickTicket.getAllocatedQuantity() > pickTicket.getPickedQuantity()) { diff --git a/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceRespManager.java b/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceRespManager.java index 6b88c99..4e22ed3 100644 --- a/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceRespManager.java +++ b/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultInterfaceRespManager.java @@ -1981,6 +1981,7 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I } } } + asnDetail.setSourceId(sourceId); asnDetail.setLineNo(lineNo); asnDetail.setZxmx(zxmx); @@ -2159,7 +2160,15 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I // List items=this.commonDao.findByQuery("from Item it where it.code='"+itemCode+"' "); if(items.size()>0) { Item ietm=items.get(0); - if(ietm.isBeMarkWeight()) { + boolean benmar=ietm.isBeMarkWeight();//序列号管理 + String hqlitem=" from MaterialFactory p where p.item.id="+ietm.getId()+ + " and p.planCode='"+propC9.trim()+"' "; + List itempalns=commonDao.findByQuery(hqlitem); + if(itempalns.size()>0) { + MaterialFactory md=itempalns.get(0); + benmar=md.isBeMarkWeight(); + } + if(benmar) { if(strBill2==null||strBill2.length()==0) { errorcode="205"; hs="0"; @@ -2173,6 +2182,20 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I resultInfo.add(objectItem1); continue; } + } else { + if(strBill2!=null&&strBill2.length()>0) { + errorcode="205"; + hs="0"; + msg="失败"; + JSONObject objectItem1=new JSONObject(); + objectItem1.put("sourceId", sourceId); + objectItem1.put("lineNo", lineNo); + objectItem1.put("itemCode", itemCode); + objectItem1.put("errorcode", "205"); + objectItem1.put("errordescr", "不是序列号管理的物料,不需要给序列号"+strBill2); + resultInfo.add(objectItem1); + continue; + } } } @@ -3247,14 +3270,13 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I libraryTask.setRelatedBill3(TaskStatus); commonDao.store(libraryTask); - }else if (TaskStatus.equals(LibraryTaskType.ddwc)) { libraryTask.setStatus(STATUS.ATWORK);//输送线上 libraryTask.setRelatedBill3(TaskStatus); libraryTask.setArrivalDate(new Date()); commonDao.store(libraryTask); - + }else if (TaskStatus.equals(LibraryTaskType.rwwc)) { //LED显示信息,//完成 String str=""; @@ -3270,8 +3292,9 @@ public class DefaultInterfaceRespManager extends DefaultBaseManager implements I libraryTask.setMes(str); libraryTask.setRelatedBill3(TaskStatus); msg=libraryTask.getId()+""; - //任务完成 + //任务完成,更新状态 moveDocManager.finishLibraryTask(libraryTask.getId()); + interfaceReqManager.receiveLEDinfo(libraryTask); }else if (TaskStatus.equals(LibraryTaskType.ddjb)) { libraryTask.setStatus(STATUS.ATWORK);//输送线上 diff --git a/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultQueryAppManager.java b/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultQueryAppManager.java index 8874228..57a5436 100644 --- a/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultQueryAppManager.java +++ b/src/main/java/com/dev/swms/server/service/interfaceLog/pojo/DefaultQueryAppManager.java @@ -9189,7 +9189,11 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA commonDao.store(ptd); pt.setAllocatedQuantity(pt.getAllocatedQuantity()-quantity); if(pt.getAllocatedQuantity()<=pt.getPickedQuantity()) { + if(pt.getAllocatedQuantity()<=0) { + pt.setStatus(PickTicketStatus.CLOSE); + }else { pt.setStatus(PickTicketStatus.PICK_ALL); + } } commonDao.store(pt); //取消电子标签任务 @@ -9256,7 +9260,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA }else if(zone.getId()==1766) { if (srcLocation.getStock() != null) { // 判断该工作站是否还需要该托盘,需要则不改变任何 - + if(t.getLibraryTask()!=null) { List syts = this.commonDao .findByQuery("from Task t where t.agvStatus=2 and t.libraryTask.id="+t.getLibraryTask().getId()); if (syts.size() > 0) { @@ -9267,6 +9271,7 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA lt.setStatus(STATUS.RECEIVED); this.commonDao.store(lt); } + } } } if(inventory!=null){ @@ -9275,8 +9280,8 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA Location loc=commonDao.load(Location.class,inventory.getLocation().getId()); inventoryManager.addInventoryLog(InventoryLogType.COMPANY_TRANS_IN, 1, pt.getCode(), loc, null, ik, inventory.getStorageDate(), inventory.getSOI(), quantity, null, - inventory.getStatus(), inventory.getId(), "取消分配", bt, userId, inventory.getBarCode(), - loc,pt.getSourceType()); + inventory.getStatus(), inventory.getId(), "跳过任务", bt, userId, inventory.getBarCode(), + loc,pt.getSourceType(),ptd.getLocType()); } // shuaxinPick(pt);//刷新出库单 分配数量 //回传SAP @@ -9321,9 +9326,11 @@ public class DefaultQueryAppManager extends DefaultBaseManager implements QueryA if(tasks4.size()==0) { if(bt.getCode().equals("GPUTPTC")) { + //工单出库 interfaceReqManager.wmsSapCancelStatus(ptd.getSourceId() == null ? "" : ptd.getSourceId(), ptd.getStrBill1() == null ? "" : ptd.getStrBill1(), "0", billCode, "", 2); - List tasks3 = commonDao.findByQuery("select p.id from Task p where p.planQuantity>0 and p.pickTicketDetail.pickTicket.id=" + pt.getId()); + List tasks3 = commonDao.findByQuery("select p.id from Task p where p.planQuantity>0 and " + + "p.pickTicketDetail.pickTicket.id=" + pt.getId()+" and p.popular=0 "); if(tasks3.size()==0) { interfaceReqManager.wmsSapCancelStatus(ptd.getSourceId() == null ? "" : ptd.getSourceId(), ptd.getStrBill1() == null ? "" : ptd.getStrBill1(), "0", billCode, "", 3); diff --git a/src/main/java/com/dev/swms/server/service/inventory/InventoryManager.java b/src/main/java/com/dev/swms/server/service/inventory/InventoryManager.java index 3056579..e47d83f 100644 --- a/src/main/java/com/dev/swms/server/service/inventory/InventoryManager.java +++ b/src/main/java/com/dev/swms/server/service/inventory/InventoryManager.java @@ -364,7 +364,7 @@ public interface InventoryManager extends BaseManager{ 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,long userId, - String serial,Location srcLoc,String strbill1); + String serial,Location srcLoc,String strbill1,String strbill2); diff --git a/src/main/java/com/dev/swms/server/service/inventory/pojo/DefaultInventoryManager.java b/src/main/java/com/dev/swms/server/service/inventory/pojo/DefaultInventoryManager.java index 772f5cc..6314abb 100644 --- a/src/main/java/com/dev/swms/server/service/inventory/pojo/DefaultInventoryManager.java +++ b/src/main/java/com/dev/swms/server/service/inventory/pojo/DefaultInventoryManager.java @@ -190,7 +190,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven 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,long userId, - String serial,Location srcLoc,String strbill1) { + String serial,Location srcLoc,String strbill1,String strbill2) { InventoryLog log = EntityFactory.getEntity(InventoryLog.class); log.setLogType(logType); log.setIncOrDec(incOrDec); @@ -206,6 +206,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven log.setLP(LP); log.setStatus(status); log.setStrbill1(strbill1); + log.setStrbill2(strbill2); log.setReferenceLog(referenceLog); if(userId>0){ Worker w=this.load(Worker.class, userId); @@ -276,7 +277,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven //写库存日志 addInventoryLog(InventoryLogType.RECEIVING, 1, relatedBill, location, (stock==null?null:stock.getLP()), inventory.getItemKeyInventory().getItemKey(), receiveDate, relatedBill, quantity, packageUnit, - inventory.getStatus(), null, null, billType,0,inventory.getBarCode(),null,null); + inventory.getStatus(), null, null, billType,0,inventory.getBarCode(),null,null,null); } public void receiving(Location loc, ItemKey itemKey, double quantity, PackageUnit pu, Date receiveDate,String logType,String operator) { @@ -433,7 +434,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven storeItemKeyInventory(itemKeyInventory); addInventoryLog(InventoryLogType.RECEIVING_ADJUST, incOrDec, soi, location, (stock==null?null:stock.getLP()), inventory.getItemKeyInventory().getItemKey(), storageDate, - soi, quantity, packageUnit, inventory.getStatus(), null, null, billType,0,inventory.getBarCode(),null,null); + soi, quantity, packageUnit, inventory.getStatus(), null, null, billType,0,inventory.getBarCode(), + null,null,null); } public void receivingAdjust(Long locationId, ItemKey itemKey, double quantity,String soi,String operator) { @@ -503,7 +505,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven addInventoryLog(InventoryLogType.SHIPPING_ADJUST, incOrDec, relatedBill, location, (stock==null?null:stock.getLP()), inventory.getItemKeyInventory().getItemKey(), storageDate, soi, quantity*packageUnit.getConvertFigure(), packageUnit, - inventory.getStatus(), null, description, billType,0,inventory.getBarCode(),null,null); + inventory.getStatus(), null, description, billType,0,inventory.getBarCode(),null,null,null); } private Inventory adjustInventoryAdd(Location location, ItemKey itemKey, double quantity, @@ -548,7 +550,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven addInventoryLog(logType, incOrDec, relatedBill, inventory.getLocation(), (stock==null?null:stock.getLP()), inventory.getItemKey(), storageDate, soi, Math.abs(quantity), inventory.getPackageUnit(), - inventory.getStatus(), null, description, billType,0,inventory.getBarCode(),null,null); + inventory.getStatus(), null, description, billType,0,inventory.getBarCode(),null,null,null); } return inventory; } @@ -572,7 +574,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven if(inventory.getQueuedQuantity()==0) { List invs=commonDao.findByQuery(hql); this.addInventoryLog(InventoryLogType.MOVE, 1, inventory.getSOI(), l, "", inventory.getItemKey(), - inventory.getStorageDate(), inventory.getSOI(), packQty, null, inventory.getStatus(), inventory.getId(), "移库位", null,0,inventory.getBarCode(),null,null); + inventory.getStorageDate(), inventory.getSOI(), packQty, null, inventory.getStatus(), + inventory.getId(), "移库位", null,0,inventory.getBarCode(),null,null,null); if(invs.size()>0) { Inventory inv=invs.get(0); if(inv.getId()==inventoryId) { @@ -621,7 +624,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven if(inv.getQueuedQuantity()==0) { this.addInventoryLog(InventoryLogType.COUNT_ADJUST, -1, inv.getSOI(), inv.getLocation(), null, inv.getItemKey(), inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "删除库存", null,0, - inv.getBarCode(),null,null); + inv.getBarCode(),null,null,null); commonDao.delete(inv); loc.setStatus(WarehouseAreaStatus.FREE); commonDao.store(loc); @@ -650,7 +653,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven (inventory.getLP()==null?null:inventory.getLP().getLP()), inventory.getItemKey(), inventory.getStorageDate(), inventory.getSOI(), quantity, inventory.getPackageUnit(), inventory.getStatus(), inventory.getId(), - description, null,0,inventory.getBarCode(),null,null); + description, null,0,inventory.getBarCode(),null,null,null); } /* @@ -712,7 +715,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven destLocation, (srcInventory.getLP()==null?null:srcInventory.getLP().getLP()), ik, srcInventory.getStorageDate(), srcInventory.getSOI(), quantity, null, srcInventory.getStatus(), srcInventory.getId(), - "移位", billType,workerId,srcInventory.getBarCode(),srcLocation,null); + "移位", billType,workerId,srcInventory.getBarCode(),srcLocation,null,null); } @@ -981,7 +984,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven addInventoryLog(str, 1, "", deslocation, (srcInv.getLP()==null?null:srcInv.getLP().getLP()), itemKey, srcInv.getStorageDate(), - srcInv.getSOI(), quantity, null, srcInv.getStatus(), srcInv.getId(), "移位", null,workerId,srcInv.getBarCode(),srcInv.getLocation(),null); + srcInv.getSOI(), quantity, null, srcInv.getStatus(), srcInv.getId(), "移位", + null,workerId,srcInv.getBarCode(),srcInv.getLocation(),null,null); } @@ -1039,12 +1043,12 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven srcInventory.getLocation(), (srcInventory.getLP()==null?null:srcInventory.getLP().getLP()), srcInventory.getItemKeyInventory().getItemKey(), srcInventory.getStorageDate(), srcInventory.getSOI(), convertQtyMU, destPackageUnit, srcInventory.getStatus(), - null, null, null,0,srcInventory.getBarCode(),null,null); + null, null, null,0,srcInventory.getBarCode(),null,null,null); addInventoryLog(InventoryLogType.CONVERT_PACKAGEUNIT, 1, null, dstPackInventory.getLocation(), (dstPackInventory.getLP()==null?null:dstPackInventory.getLP().getLP()), dstPackInventory.getItemKeyInventory().getItemKey(), dstPackInventory.getStorageDate(), dstPackInventory.getSOI(), convertQtyMU, destPackageUnit, dstPackInventory.getStatus(), - null, null, null,0,dstPackInventory.getBarCode(),null,null); + null, null, null,0,dstPackInventory.getBarCode(),null,null,null); } /* @@ -1078,7 +1082,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven addInventoryLog(InventoryLogType.SHIPPING, -1, relatedBill, location, (stock==null?null:stock.getLP()), inventory.getItemKeyInventory().getItemKey(), storageDate, soi, - quantity*packageUnit.getConvertFigure(), packageUnit, inventory.getStatus(), null, null, billType,0,inventory.getBarCode(),null,null); + quantity*packageUnit.getConvertFigure(), packageUnit, inventory.getStatus(), + null, null, billType,0,inventory.getBarCode(),null,null,null); } /* @@ -1104,7 +1109,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven inventory.getLocation(), (inventory.getLP()==null?null:inventory.getLP().getLP()), inventory.getItemKeyInventory().getItemKey(), inventory.getStorageDate(), inventory.getSOI(), Math.abs(oldQuantity), inventory.getPackageUnit(), inventory.getStatus(), null, description, null, - 0,inventory.getBarCode(),null,null); + 0,inventory.getBarCode(),null,null,null); } } @@ -1396,7 +1401,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven srcInventory.getItemKeyInventory().getItemKey(), srcInventory.getStorageDate(), processDoc.getCode(), quantity*srcInventory.getPackageUnit().getConvertFigure(), srcInventory.getPackageUnit(), - srcInventory.getStatus(), null, null, processDoc.getBillType(),0,srcInventory.getBarCode(),null,null); + srcInventory.getStatus(), null, null, processDoc.getBillType(),0,srcInventory.getBarCode(), + null,null,null); } /* @@ -1427,7 +1433,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven addInventoryLog(InventoryLogType.PROCESS_UP, 1, processDoc.getCode(), location, (stock==null?null:stock.getLP()), inventory.getItemKeyInventory().getItemKey(), receiveDate, processDoc.getCode(), quantity*packageUnit.getConvertFigure(), packageUnit, - inventory.getStatus(), null, null, processDoc.getBillType(),0,inventory.getBarCode(),null,""); + inventory.getStatus(), null, null, processDoc.getBillType(),0,inventory.getBarCode(),null,"",null); } /* @@ -1489,12 +1495,12 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven iv.getLP(), iv.getStatus(), storageDate, iv.getSOI(), Boolean.FALSE); InventoryLog log1 = addInventoryLog(InventoryLogType.MODIFY_LOT, 1, null, iv.getLocation(), (iv.getLP()==null?null:iv.getLP().getLP()), dbItemKey, iv.getStorageDate(), iv.getSOI(), - newQty, iv.getPackageUnit(), iv.getStatus(), null, null, null,0,iv.getBarCode(),null,""); + newQty, iv.getPackageUnit(), iv.getStatus(), null, null, null,0,iv.getBarCode(),null,"",null); //扣减原批次库存 adjustInventoryUpdateWithNoLog(iv, oldQty); addInventoryLog(InventoryLogType.MODIFY_LOT, -1, null, iv.getLocation(), iv.getLP()==null?null:iv.getLP().getLP(), iv.getItemKeyInventory().getItemKey(), iv.getStorageDate(), - iv.getSOI(), newQty, iv.getPackageUnit(), iv.getStatus(), log1.getId(), null, null,0,iv.getBarCode(),null,null); + iv.getSOI(), newQty, iv.getPackageUnit(), iv.getStatus(), log1.getId(), null, null,0,iv.getBarCode(),null,null,null); } LocalizedMessage.addMessage("itemKey.already.modify", new String[] {dbItemKey.getLot()}); } @@ -2429,7 +2435,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven addInventoryLog(InventoryLogType.COMPANY_TRANS_IN, 1, null, inv1.getLocation(), (inv1.getLP()==null?null:inv1.getLP().getLP()), iki1.getItemKey(), inv1.getStorageDate(), inv1.getSOI(), transQuantity, inv1.getPackageUnit(), - inv1.getStatus(), null, Inventory.COMPANY_TRANS_IN, null,0,inv1.getBarCode(),null,null); + inv1.getStatus(), null, Inventory.COMPANY_TRANS_IN, null,0,inv1.getBarCode(),null,null,null); //转出货主的库存(删除库存记录、增加“货权转出”库存日志) ItemKeyInventory iki2 = inventory.getItemKeyInventory(); @@ -2437,7 +2443,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven addInventoryLog(InventoryLogType.COMPANY_TRANS_OUT, -1, null, inventory.getLocation(), (inventory.getLP()==null?null:inventory.getLP().getLP()), iki2.getItemKey(), inventory.getStorageDate(), inventory.getSOI(), transQuantity, inventory.getPackageUnit(), - inventory.getStatus(), null, Inventory.COMPANY_TRANS_OUT, null,0,inventory.getBarCode(),null,null); + inventory.getStatus(), null, Inventory.COMPANY_TRANS_OUT, null,0,inventory.getBarCode(),null,null,null); } private Item canTrans(Item itemA,Structure companyB){ @@ -2823,12 +2829,12 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven newInv.add(qty,0,0); InventoryLog log1 = addInventoryLog(InventoryLogType.MODIFY_STATUS, 1, null, inv.getLocation(), (inv.getLP()==null?null:inv.getLP().getLP()),inv.getItemKeyInventory().getItemKey(), inv.getStorageDate(), inv.getSOI(), - qty, inv.getPackageUnit(), inv.getStatus(), null,"调整为"+status, null,0,inv.getBarCode(),null,null); + qty, inv.getPackageUnit(), inv.getStatus(), null,"调整为"+status, null,0,inv.getBarCode(),null,null,null); } if(invs.size()>0){ InventoryLog log1 = addInventoryLog(InventoryLogType.MODIFY_STATUS, -1, null, inv.getLocation(), (inv.getLP()==null?null:inv.getLP().getLP()),inv.getItemKeyInventory().getItemKey(), inv.getStorageDate(), inv.getSOI(), - oldQty, inv.getPackageUnit(), inv.getStatus(), null,"调整为"+status, null ,0,inv.getBarCode(),null,null); + oldQty, inv.getPackageUnit(), inv.getStatus(), null,"调整为"+status, null ,0,inv.getBarCode(),null,null,null); if(oldQty<=0){ this.commonDao.delete(inv); }else{ @@ -2837,7 +2843,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven }else{ InventoryLog log1 = addInventoryLog(InventoryLogType.MODIFY_STATUS, 0, null, inv.getLocation(), (inv.getLP()==null?null:inv.getLP().getLP()),inv.getItemKeyInventory().getItemKey(), inv.getStorageDate(), inv.getSOI(), - qty, inv.getPackageUnit(), inv.getStatus(), null,"调整为"+status, null,0,inv.getBarCode(),null,null); + qty, inv.getPackageUnit(), inv.getStatus(), null,"调整为"+status, null,0,inv.getBarCode(),null,null,null); inv.setStatus(status); this.commonDao.store(inv); } @@ -3004,7 +3010,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven commonDao.store(item); //写入库存日志 this.addInventoryLog(InventoryLogType.SHIPPING_ADJUST, -1, inv.getSOI(), inv.getLocation(), null, inv.getItemKey(), - inv.getStorageDate(), inv.getSOI(), outQty, null, inv.getStatus(), inv.getId(), "其它出库", null,0,inv.getBarCode(),null,null); + inv.getStorageDate(), inv.getSOI(), outQty, null, inv.getStatus(), inv.getId(), "其它出库", null,0, + inv.getBarCode(),null,null,null); if(inv.getQuantity()==0){ Location loc=inv.getLocation(); commonDao.delete(inv); @@ -3054,7 +3061,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven commonDao.store(item); //写入库存日志 this.addInventoryLog(InventoryLogType.PROCESS_UP, 1, inv.getSOI(), inv.getLocation(), null, inv.getItemKey(), - inv.getStorageDate(), inv.getSOI(), inQty, null, inv.getStatus(), inv.getId(), "补货入库", null,0,inv.getBarCode(),null,null); + inv.getStorageDate(), inv.getSOI(), inQty, null, inv.getStatus(), inv.getId(), "补货入库", null,0, + inv.getBarCode(),null,null,null); InterfaceManager interfaceManager = (InterfaceManager)ac.getBean("interfaceManager"); List robotJobIds=new ArrayList(); String xmlInfo=interfaceManager.returnAGVJSON(robotJobIds, 1, inv.getLocation().getCode(), false, "RETURN_WAREHOUSE"); @@ -3111,7 +3119,7 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven Inventory inv=this.load(Inventory.class, inventoryId); this.addInventoryLog(InventoryLogType.INVENTORY_ADJUST, -1, inv.getSOI(), inv.getLocation(), null, inv.getItemKey(), inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "调整库存"+description, null,0, - inv.getBarCode(),null,null); + inv.getBarCode(),null,null,null); inv.setQueuedQuantity(packQty1);//占用数量 @@ -3154,7 +3162,9 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven inv.setItemKey(itemKey); commonDao.store(inv); addInventoryLog(InventoryLogType.INVENTORY_ADJUST, 1, "", inv.getLocation(), null, inv.getItemKey(), - inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "批次调整", null,0,inv.getBarCode(),null,null); + inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, + inv.getStatus(), inv.getId(), "批次调整", null,0,inv.getBarCode(), + null,null,null); }else { throw new BusinessException(propC1+" 格式错误"); } @@ -3180,7 +3190,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven inv.setDescription(des); commonDao.store(inv); addInventoryLog(InventoryLogType.FROZEN, 1, "", inv.getLocation(), null, inv.getItemKey(), - inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "冻结", null,0,inv.getBarCode(),null,null); + inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), + inv.getId(), "冻结", null,0,inv.getBarCode(),null,null,null); } } } @@ -3196,7 +3207,8 @@ public class DefaultInventoryManager extends DefaultBaseManager implements Inven inv.setDescription(null); commonDao.store(inv); addInventoryLog(InventoryLogType.FROZEN, 1, "", inv.getLocation(), null, inv.getItemKey(), - inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "解冻", null,0,inv.getBarCode(),null,null); + inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), + inv.getId(), "解冻", null,0,inv.getBarCode(),null,null,null); } } } diff --git a/src/main/java/com/dev/swms/server/service/picking/allocate/DefaultAutoAllocator.java b/src/main/java/com/dev/swms/server/service/picking/allocate/DefaultAutoAllocator.java index 302afd8..9df62af 100644 --- a/src/main/java/com/dev/swms/server/service/picking/allocate/DefaultAutoAllocator.java +++ b/src/main/java/com/dev/swms/server/service/picking/allocate/DefaultAutoAllocator.java @@ -3829,7 +3829,7 @@ public class DefaultAutoAllocator extends DefaultBaseManager implements AutoAllo inventoryManager.addInventoryLog(InventoryLogType.COMPANY_TRANS_IN, 1, pt.getCode(), loc, null, ik, inventory.getStorageDate(), inventory.getSOI(), quantity, null, inventory.getStatus(), inventory.getId(), "取消分配", bt, UserHolder.getUser().getId(), inventory.getBarCode(), - loc,pt.getSourceType()); + loc,pt.getSourceType(),ptd.getLocType()); } //回传SAP 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 2c893ab..998bb8d 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 @@ -197,7 +197,7 @@ public class DefaultASNManager extends DefaultBaseManager implements ASNManager if(asnDetail.getExpectedQuantity()f1){ throw new BusinessException("总数量不能大于订单数量"+asnDetail.getUnReceivedQuantity()); } + BillType bt=commonDao.load(BillType.class, asn.getBillType().getId()); Item item=this.load(Item.class, asnDetail.getItem().getId());//货品 WarehouseArea warehouseArea =commonDao.load(WarehouseArea.class, zone_id);//库区 @@ -2419,7 +2423,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) { } } } - if(item.isBeMarkWeight()) { + if(asnDetail.isBeMarkWeight()) { List invs=commonDao.findByQuery(" from Inventory inv where inv.barCode='"+asnDetail.getStrBill2()+"'" + " and inv.itemKey.item.id="+item.getId()+" and inv.quantity>0 " + " and inv.status in('已入库','待上架','已出库','冻结','整理中')"); @@ -4684,7 +4688,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) { inventoryManager.addInventoryLog(InventoryLogType.RECEIVING, 1, asn.getRelatedBill1(), loc, (inventory.getLP() == null ? null : inventory.getLP().getLP()), inventory.getItemKey(), inventory.getStorageDate(), inventory.getSOI(), receivedRecord.getReceivedQuantity(), null, inventory.getStatus(), inventory.getId(), "成品入库", asn.getBillType(),workerId, inventory.getBarCode(), - ad.getDock(),asn.getSourceType()); + ad.getDock(),asn.getSourceType(),null); asn.setPutawayQuantity(asn.getPutawayQuantity()+receivedRecord.getReceivedQuantity()); commonDao.store(asn); @@ -4736,7 +4740,7 @@ public void addASNDetail(Long id,ASNDetail asnDetail) { inventoryManager.addInventoryLog(InventoryLogType.PROCESS_DOWN, -1, asn.getRelatedBill1(), inventory.getLocation(), (inventory.getLP() == null ? null : inventory.getLP().getLP()), inventory.getItemKey(), inventory.getStorageDate(), inventory.getSOI(), inventory.getQuantity(), null, inventory.getStatus(), inventory.getId(), "取消整理", asn.getBillType(),0, inventory.getBarCode(), - ad.getDock(),asn.getSourceType()); + ad.getDock(),asn.getSourceType(),null); commonDao.delete(inventory); } }else{ diff --git a/src/main/java/com/dev/swms/server/service/receiving/pojo/DefaultMoveDocManager.java b/src/main/java/com/dev/swms/server/service/receiving/pojo/DefaultMoveDocManager.java index 42bbb08..1216c9f 100644 --- a/src/main/java/com/dev/swms/server/service/receiving/pojo/DefaultMoveDocManager.java +++ b/src/main/java/com/dev/swms/server/service/receiving/pojo/DefaultMoveDocManager.java @@ -1344,7 +1344,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc inventoryManager.addInventoryLog(str, 1, moveDocCode, deslocation, (srcInv.getLP() == null ? null : srcInv.getLP().getLP()), itemKey, srcInv.getStorageDate(), srcInv.getSOI(), toBeMovedQty, null, srcInv.getStatus(), srcInv.getId(), "移位", billType, userId, srcInv.getBarCode(), - srclocation,moveDoc.getWhCode()); + srclocation,moveDoc.getWhCode(),null); commonDao.delete(srcInv); } if (moveQuantity > 0) { @@ -2325,7 +2325,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc srcInv.getLocation(), (rd.getSrcLP() == null ? null : rd.getSrcLP().getLP()), rd.getItemKey(), rd.getReceiveDate(), null, rd.getReceivedQuantity(), null, srcInv == null ? "" : srcInv.getStatus(), srcInv == null ? 0L : srcInv.getId(), null, - asn.getBillType(), 0, rd.getBarCode(), rd.getLocation(),asn.getSourceType()); + asn.getBillType(), 0, rd.getBarCode(), rd.getLocation(),asn.getSourceType(),null); //上报SAP if(!asn.getCode().substring(0, 2).equals("RP") &&(asn.getSourceType()!=null&&!asn.getSourceType().equals("313")) @@ -2599,15 +2599,14 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc } px_sql += " ,substring(l.name,7,2) asc,substring(l.name,4,2) asc"; List ls =new ArrayList(); - //查询深浅都是空闲,对应的深位。 + String hql1=""; - //查询深浅都是空 + hql1=sql+ " and l.relevanceCode not in("+sql5+") "; ls = this.commonDao.findByQuery(hql1 + px_sql); - - if (ls.size() <= 15) { + if (ls.size() <= 20) { throw new BusinessException("无合适的存放位"); } else { return ls.get(0); @@ -2627,11 +2626,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc // 释放 LocationStorage l1 = queryLsFor7(t.getFromCellCode(), "");//起点 LocationStorage l2 = queryLsFor7(t.getToCellCode(), "");//终点 -// if(t.getStatus().equals(STATUS.ATCALL)){ -// if(t.getType().equals(LibraryTaskType.rkt)){ -// s.setEnabled(Boolean.TRUE); -// } -// } + //已完成 if (t.getStatus().equals(STATUS.RECEIVED)) { flag=false; @@ -2641,15 +2636,9 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc if (t.getStatus().equals(STATUS.ATPICK)) { //出库,再次发送变成已完成 if (t.getType().equals(LibraryTaskType.ck)) { - t.setStatus(STATUS.RECEIVED); + t.setStatus(STATUS.RECEIVED);//完成 t.setFinishDate(new Date()); this.commonDao.store(t); - /*List stocks = commonDao.findByQuery(" from Stock stock where stock.LP='"+t.getBarcode()+"'"); - if (stocks.size()>0) { - Stock stock=stocks.get(0); - stock.setLocationStorage(null); - this.commonDao.store(stock); - }*/ flag=false; } } @@ -2725,7 +2714,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc if (l2!=null) { l2.setStatus(WarehouseAreaStatus.OCCUPY); s.setAgvFlag(true);//是否AGV仓库 - s.setEnabled(false);//是否失效 +// s.setEnabled(false);//是否失效 s.setLocationStorage(l2); this.commonDao.store(l2); List lsq12 = this.commonDao @@ -2762,6 +2751,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc } } + if (t.getType().equals(LibraryTaskType.ck)||t.getType().equals(LibraryTaskType.ckt)) { if (l1!=null) { l1.setStatus(WarehouseAreaStatus.FREE); @@ -2796,6 +2786,7 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc s.setAgvFlag(true); } this.commonDao.store(s); + //跟新未下发出库任务的起点 List lists=commonDao.findByQuery(" from LibraryTask l where l.barcode='"+s.getLP()+"'" + " and l.status='NONCHECKED' and l.type in('3','2') "); @@ -2804,54 +2795,8 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc commonDao.store(tl); } - - /* - if (t.getRelationCode() == null) {/* - if (t.getType().equals(LibraryTaskType.ck)||t.getType().equals(LibraryTaskType.ckt)) { - // 释放点位状态,如果是深位,则锁定的浅位也需要释放状态 - releaseLsForCk(t); - t.setStatus(STATUS.ATPICK); - this.commonDao.store(t); - } - } else { - List ts = this.commonDao.findByQuery("from LibraryTask t where t.relationCode='" - + t.getRelationCode() + "' and t.status='OPEN'"); - if (ts.size() <= 0) { - List tss = this.commonDao.findByQuery("from LibraryTask t where t.relationCode='" - + t.getRelationCode() + "' order by seq asc"); - for (LibraryTask lt : tss) { - if (lt.getType().equals(LibraryTaskType.ck)||t.getType().equals(LibraryTaskType.ckt)) { - lt.setStatus(STATUS.ATPICK); - lt.setMes("已到站"); - this.commonDao.store(lt); - interfaceReqManager.receiveLEDinfo(lt); - } - - /* - if (lt.getType().equals(LibraryTaskType.yk)) { - // 1释放,2占用 - l1.setStatus(WarehouseAreaStatus.FREE); - this.commonDao.store(l1); - l2.setStatus(WarehouseAreaStatus.OCCUPY); - this.commonDao.store(l2); - } else if (lt.getType().equals(LibraryTaskType.ck)||t.getType().equals(LibraryTaskType.ckt)) { - lt.setStatus(STATUS.ATPICK); - this.commonDao.store(lt); - } - - } - - } else { - // 没全部释放的时候 - } - - }*/ } -// t.setStatus(STATUS.RECEIVED); -// t.setFinishDate(new Date()); -// this.commonDao.store(t); -// //下发托盘搬运任务 -// executeLibraryTask(s, null, TranType.yt_in,"1011-1"); + } public void sendLibraryTask() { @@ -4159,9 +4104,8 @@ public class DefaultMoveDocManager extends DefaultBaseManager implements MoveDoc // hql1=sql+" and l.relevanceCode in ( "+sql1+") and l.sqType=2 and l.relevanceCode not in("+sql5+")"; hql1=sql+" and l.relevanceCode not in("+sql5+")"; ls = this.commonDao.findByQuery(hql1 + px_sql); - - if (ls.size() <= 10) { + if (ls.size() <= 5) { throw new BusinessException("不存在合适的库位"); } else { return ls.get(0); diff --git a/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultPickTicketManager.java b/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultPickTicketManager.java index af80f71..3b65040 100644 --- a/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultPickTicketManager.java +++ b/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultPickTicketManager.java @@ -2408,7 +2408,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick // 写库存日志 inventoryManager.addInventoryLog(InventoryLogType.CONVERT_PACKAGEUNIT, 1, log.getSOI(), log.getDstLoc(), log.getDstLPCode(), ik, log.getStorageDate(), log.getSOI(), movedQuantity, null, - log.getInventoryStatus(), log.getId(), "出库退料", null, 0, inventory.getBarCode(), null,null); + log.getInventoryStatus(), log.getId(), "出库退料", null, 0, inventory.getBarCode(), + null,null,null); } else { throw new BusinessException("moveDoc.pickBackLoc.none"); } @@ -3729,7 +3730,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.MOVE, 1, inventory.getSOI(), loc, "", itemKey, inventory.getStorageDate(), inventory.getSOI(), picked_quantity, null, inventory.getStatus(), - inventory.getId(), "部分移库", null, 0, inventory.getBarCode(), null,null); + inventory.getId(), "部分移库", null, 0, inventory.getBarCode(), null,null,null); commonDao.store(itemKey); return mes; } @@ -4274,8 +4275,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, task.getBillCode(), dstLoc, dstLP==null?"":dstLP.getLP(), task.getItemKey(), srcInv.getStorageDate(), srcInv.getSOI(), pickedQuantity, null, srcInv.getStatus(), srcInv.getId(), "拣货", pt.getBillType(), workerId, srcInv.getBarCode(), - task.getSrcLoc(),pt.getSourceType()); - + task.getSrcLoc(),pt.getSourceType(),ptd.getLocType()); } else { Inventory newInventory = EntityFactory.getEntity(Inventory.class); @@ -4361,7 +4361,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, task.getBillCode(), dstLoc, dstLP==null?"":dstLP.getLP(), task.getItemKey(), task.getStorageDate(), task.getSOI(), pickedQuantity, null, newInventory.getStatus(), task.getId(), "拣货", - pt.getBillType(), workerId, task.getBarCode(), srcInv.getLocation(),pt.getSourceType()); + pt.getBillType(), workerId, task.getBarCode(), srcInv.getLocation(),pt.getSourceType(),ptd.getLocType()); } } // 刷新出库明细上的拣货数量 @@ -4772,7 +4772,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, pt.getCode(), inv.getLocation(), null, itemKey, inv.getStorageDate(), inv.getSOI(), tl.getShipQuantity(), null, inv.getStatus(), inv.getId(), "发运", null, userId, - inv.getBarCode(), null,null); + inv.getBarCode(), null,null,null); // 扣减库存 inv.setQuantity(inv.getQuantity() - tl.getShipQuantity()); inv.setVersion(inv.getVersion()); @@ -4872,7 +4872,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, pt.getCode(), inv.getLocation(), null, itemKey, inv.getStorageDate(), inv.getSOI(), tl.getShipQuantity(), null, inv.getStatus(), inv.getId(), "发运", null, userId, - inv.getBarCode(), null,null); + inv.getBarCode(), null,null,null); // 扣减库存 inv.setQuantity(inv.getQuantity() - tl.getShipQuantity()); inv.setVersion(inv.getVersion()); @@ -4948,7 +4948,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick // 写入库存日期 inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, pt.getCode(), inv.getLocation(), null, itemKey, inv.getStorageDate(), inv.getSOI(), tl.getShipQuantity(), null, - inv.getStatus(), inv.getId(), "发运", null, userId, inv.getBarCode(), null,null); + inv.getStatus(), inv.getId(), "发运", null, userId, inv.getBarCode(), null,null,null); // 扣减库存 inv.setQuantity(inv.getQuantity() - tl.getShipQuantity()); inv.setVersion(inv.getVersion()); @@ -7130,8 +7130,10 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick public void createSeedWallTask1(String lsCode) { synchronized ("a") { + //查询货架区、料箱区,未绑定分拨墙的数据 List list = commonDao.findByQuery("select t.billCode from " + " Task t where t.agvStatus=1 and " - + " t.planQuantity>t.movedQuantityMU " + " group by t.billCode" + " order by t.billCode "); + + " t.planQuantity>t.movedQuantityMU and t.srcLoc.zone.id in(1765,1763) " + + " group by t.billCode" + " order by t.billCode "); if (list.size() > 0) { StringBuffer sBuffer = new StringBuffer(); sBuffer.append("select ls.NAME,COUNT(*) from seed_wall sw \r\n" @@ -7936,7 +7938,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, pt.getCode(), dstLoc, null, srcInv.getItemKey(), srcInv.getStorageDate(), srcInv.getSOI(), task.getPlanQuantity(), null, srcInv.getStatus(), srcInv.getId(), "拣选", pt.getBillType(), workerId, srcInv.getBarCode(), - task.getSrcLoc(),pt.getSourceType()); + task.getSrcLoc(),pt.getSourceType(),ptd.getLocType()); } else { Inventory newInventory = EntityFactory.getEntity(Inventory.class); @@ -7974,7 +7976,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, pt.getCode(), dstLoc, null, newInventory.getItemKey(), newInventory.getStorageDate(), newInventory.getSOI(), task.getPlanQuantity(), null, newInventory.getStatus(), newInventory.getId(), "拣货", - pt.getBillType(), workerId, newInventory.getBarCode(), srcInv.getLocation(),pt.getSourceType()); + pt.getBillType(), workerId, newInventory.getBarCode(), srcInv.getLocation(), + pt.getSourceType(),ptd.getLocType()); } } @@ -8057,7 +8060,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, pt.getCode(), dstLoc, null, srcInv.getItemKey(), srcInv.getStorageDate(), srcInv.getSOI(), task.getPlanQuantity(), null, srcInv.getStatus(), srcInv.getId(), "拣选", pt.getBillType(), workerId, srcInv.getBarCode(), - task.getSrcLoc(),pt.getSourceType()); + task.getSrcLoc(),pt.getSourceType(),ptd.getLocType()); } else { Inventory newInventory = EntityFactory.getEntity(Inventory.class); @@ -8095,7 +8098,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, pt.getCode(), dstLoc, null, newInventory.getItemKey(), newInventory.getStorageDate(), newInventory.getSOI(), task.getPlanQuantity(), null, newInventory.getStatus(), newInventory.getId(), "拣货", - pt.getBillType(), workerId, newInventory.getBarCode(), srcInv.getLocation(),pt.getSourceType()); + pt.getBillType(), workerId, newInventory.getBarCode(), srcInv.getLocation(), + pt.getSourceType(),ptd.getLocType()); } } // 刷新出库明细上的拣货数量 @@ -8343,7 +8347,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.HAND_ORDER, 1, t.getBillCode(),loc , null, i.getItemKey(), i.getStorageDate(), i.getSOI(), i.getQuantity(), null, i.getStatus(), i.getId(), "交单", t.getPickTicketDetail().getPickTicket().getBillType(), w.getId(), i.getBarCode(), - t.getSrcLoc(),t.getPickTicketDetail().getPickTicket().getSourceType()); + t.getSrcLoc(),t.getPickTicketDetail().getPickTicket().getSourceType(), + t.getPickTicketDetail().getLocType()); commonDao.delete(i); } t.setInventoryStatus("交单完成"); @@ -8396,7 +8401,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick t.getDstLP()==null?null: t.getDstLP().getLP(), inv.getItemKey(), inv.getStorageDate(), inv.getSOI(), t.getPlanQuantity(), null, inv.getStatus(), inv.getId(), "交单", t.getPickTicketDetail().getPickTicket().getBillType(), - 0L, inv.getBarCode(),t.getDstLoc(),t.getPickTicketDetail().getPickTicket().getSourceType()); + 0L, inv.getBarCode(),t.getDstLoc(), + t.getPickTicketDetail().getPickTicket().getSourceType(),null); commonDao.delete(inv); } // t.setPopular(1); @@ -8505,16 +8511,17 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick for(Inventory inv:invs) { invqty1=inv.getQueuedQuantity();//占用数量 invqty2=inv.getQuantity();//库存数量 - + ItemKey itemkey1=inv.getItemKey(); if(invqty2<=t_qty) { inv.setQueuedQuantity(0); inv.setItemKey(itemkey); commonDao.store(inv); t_qty=t_qty-t_qty; inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, t.getBillCode(), t.getDstLoc(), null, - inv.getItemKey(), inv.getStorageDate(), inv.getSOI(), t.getPlanQuantity(), null, + itemkey1, inv.getStorageDate(), inv.getSOI(), t.getPlanQuantity(), null, inv.getStatus(), inv.getId(), "转库", t.getPickTicketDetail().getPickTicket().getBillType(), - 0L, inv.getBarCode(),t.getSrcLoc(),t.getPickTicketDetail().getPickTicket().getSourceType()); + 0L, inv.getBarCode(),t.getSrcLoc(), + t.getPickTicketDetail().getPickTicket().getSourceType(),t.getPickTicketDetail().getLocType()); }else { if(invqty2>t_qty) { @@ -8533,12 +8540,58 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick newInventory.setWarehouseArea(inv.getWarehouseArea()); newInventory.setBarCode(t.getBarCode()); newInventory.setStatuss(inv.getStatuss()); - String sql1 = " from Inventory inv where inv.itemKey.id=" + itemkey.getId() - + " and inv.location.id=" + inv.getLocation().getId(); - if (t.getBarCode() != null && t.getBarCode().length() > 0) { - sql += " and inv.barCode='" + t.getBarCode() + "'"; - } - List listinvs = commonDao.findByQuery(sql1); + + String hql = " from Inventory inv where inv.location.id=" + inv.getLocation().getId() + + " and inv.quantity>0 and inv.itemKey.item.id="+itemkey.getItem().getId(); + if(itemkey.getLotInfo().getPropC1()!=null&&itemkey.getLotInfo().getPropC1().length()>0) { + hql += " AND inv.itemKey.lotInfo.propC1='" + itemkey.getLotInfo().getPropC1() + "' "; + }else { + hql += " AND inv.itemKey.lotInfo.propC1 is null "; + } + if(itemkey.getLotInfo().getPropC2()!=null&&itemkey.getLotInfo().getPropC2().length()>0) { + hql += " AND inv.itemKey.lotInfo.propC2='" + itemkey.getLotInfo().getPropC2() + "' "; + }else { + hql += " AND inv.itemKey.lotInfo.propC2 is null "; + } + if(itemkey.getLotInfo().getPropC3()!=null&&itemkey.getLotInfo().getPropC3().length()>0) { + hql += " AND inv.itemKey.lotInfo.propC3='" + itemkey.getLotInfo().getPropC3() + "' "; + }else { + hql += " AND inv.itemKey.lotInfo.propC3 is null "; + } + if(itemkey.getLotInfo().getPropC5()!=null&&itemkey.getLotInfo().getPropC5().length()>0) { + hql += " AND inv.itemKey.lotInfo.propC5='" + itemkey.getLotInfo().getPropC5() + "' "; + }else { + hql += " AND inv.itemKey.lotInfo.propC5 is null "; + } + if(itemkey.getLotInfo().getPropC9()!=null&&itemkey.getLotInfo().getPropC9().length()>0) { + hql += " AND inv.itemKey.lotInfo.propC9='" + itemkey.getLotInfo().getPropC9() + "' "; + }else { + hql += " AND inv.itemKey.lotInfo.propC9 is null "; + } + if (t.getBarCode() != null && !t.getBarCode().equals("")) { + hql += " AND inv.barCode='" + t.getBarCode() + "' "; + } + if (inv.getStatuss() != null && !inv.getStatuss().equals("")) { + hql += " AND inv.statuss='" + inv.getStatuss() + "' "; + }else { + hql += " AND (inv.statuss='' or inv.statuss is null)"; + } + if(t.getItemKey().getLotInfo().getPropD2()!=null) { + SimpleDateFormat ymd = new SimpleDateFormat("yyyy-MM-dd"); + hql += " AND CONVERT(varchar(100), inv.itemKey.lotInfo.propD2, 23)='" +ymd.format(itemkey.getLotInfo().getPropD2()) + "' "; + }else { + hql += " AND inv.itemKey.lotInfo.propD2 is null "; + } + + List listinvs = commonDao.findByQuery(hql); + +// String sql1 = " from Inventory inv where inv.itemKey.id=" + itemkey.getId() +// + " and inv.location.id=" + inv.getLocation().getId(); +// +// if (t.getBarCode() != null && t.getBarCode().length() > 0) { +// sql += " and inv.barCode='" + t.getBarCode() + "'"; +// } +// List listinvs = commonDao.findByQuery(sql1); if (listinvs.size() > 0) { newInventory = listinvs.get(0); newInventory.setQuantity(newInventory.getQuantity() + t_qty); @@ -8564,7 +8617,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.SHIPPING, -1, t.getBillCode(), t.getDstLoc(), null, inv.getItemKey(), inv.getStorageDate(), inv.getSOI(), t.getPlanQuantity(), null, inv.getStatus(), inv.getId(), "转库", t.getPickTicketDetail().getPickTicket().getBillType(), - 0L, inv.getBarCode(),t.getSrcLoc(),t.getPickTicketDetail().getPickTicket().getSourceType()); + 0L, inv.getBarCode(),t.getSrcLoc(),t.getPickTicketDetail().getPickTicket().getSourceType(), + t.getPickTicketDetail().getLocType()); t_qty=0; } } @@ -8843,7 +8897,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.PROCESS_UP, 1, soi, loc, lp, t.getItemKey(), t.getStorageDate(), t.getSOI(), t.getQuantity(), null, t.getStatus(), t.getId(), "合单移动", - bt, workerId, t.getBarCode(), l,""); + bt, workerId, t.getBarCode(), l,"",null); } } @@ -8893,7 +8947,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick inventoryManager.addInventoryLog(InventoryLogType.PROCESS_UP, 1, soi, loc, null, t.getItemKey(), t.getStorageDate(), t.getSOI(), t.getQuantity(), null, t.getStatus(), t.getId(), "合单移动", - bt, workerId, t.getBarCode(), l,""); + bt, workerId, t.getBarCode(), l,"",null); } } @@ -9078,7 +9132,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick } commonDao.store(inv); inventoryManager.addInventoryLog(InventoryLogType.PROCESS_UP, 1, t.getBillCode(), dstLoc, lp, ik, - inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "合单",pt.getBillType() ,userId,inv.getBarCode(),srcLoc,pt.getSourceType()); + inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "合单", + pt.getBillType() ,userId,inv.getBarCode(),srcLoc,pt.getSourceType(),null); } } @@ -9309,7 +9364,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick for(Inventory inv:invs) { //库存日志 inventoryManager.addInventoryLog(InventoryLogType.HAND_ORDER, 1, inv.getSOI(), dstLoc, stockCode, inv.getItemKey(), - inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "交单", null,userId,inv.getBarCode(),inv.getLocation(),""); + inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "交单", null,userId,inv.getBarCode(), + inv.getLocation(),"",null); //删除库存拣货 inventoryManager.deleteInv(inv); } @@ -9363,7 +9419,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick for(Inventory inv:invs) { //库存日志 inventoryManager.addInventoryLog(InventoryLogType.HAND_ORDER, 1, inv.getSOI(), dstLoc, "", inv.getItemKey(), - inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "交单", null,userId,inv.getBarCode(),inv.getLocation(),""); + inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "交单", null,userId, + inv.getBarCode(),inv.getLocation(),"",null); //删除库存拣货 inventoryManager.deleteInv(inv); } @@ -9410,7 +9467,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick PickTicket pt=commonDao.load(PickTicket.class, id); List Tasks2=commonDao.findByQuery("select t.id from Task t where t.pickTicketDetail.pickTicket.id="+pt.getId()+" and t.planQuantity>0 "); List Taskss2=commonDao.findByQuery("select t.id from Task t where t.pickTicketDetail.pickTicket.id="+pt.getId()+" " - + "and t.inventoryStatus='交单完成' and t.planQuantity>0 and t.planQuantity<=t.movedQuantityMU "); + + " and t.dstLoc.zone.id=1787 and t.planQuantity>0 and t.planQuantity<=t.movedQuantityMU "); if(Tasks2.size()==Taskss2.size()){ pt.setStatus(PickTicketStatus.JIAODAN); commonDao.store(pt); @@ -9735,7 +9792,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick } inventoryManager.addInventoryLog(InventoryLogType.PROCESS_UP, 1, t.getBillCode(), mbloc, lp, ik, t.getStorageDate(), pt.getCode(), t.getPlanQuantity(), null, taskStatus, t.getId(), "合单",pt.getBillType() , - userId,t.getBarCode(),srcLoc,pt.getSourceType()); + userId,t.getBarCode(),srcLoc,pt.getSourceType(),null); } //是否交单 @@ -10224,7 +10281,8 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick for(Inventory inv:invs) { //库存日志 inventoryManager.addInventoryLog(InventoryLogType.HAND_ORDER, 1, inv.getSOI(), dstLoc, stockCode, inv.getItemKey(), - inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "交单", null,worker.getId(),inv.getBarCode(),inv.getLocation(),""); + inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "交单", null,worker.getId(), + inv.getBarCode(),inv.getLocation(),"",null); //删除库存拣货 inventoryManager.deleteInv(inv); } @@ -10316,7 +10374,7 @@ public class DefaultPickTicketManager extends DefaultBaseManager implements Pick t.getDstLP()==null?null: t.getDstLP().getLP(), inv.getItemKey(), inv.getStorageDate(), inv.getSOI(), t.getPlanQuantity(), null, inv.getStatus(), inv.getId(), "交单", t.getPickTicketDetail().getPickTicket().getBillType(), - 0L, inv.getBarCode(),t.getDstLoc(),t.getPickTicketDetail().getPickTicket().getSourceType()); + 0L, inv.getBarCode(),t.getDstLoc(),t.getPickTicketDetail().getPickTicket().getSourceType(),null); commonDao.delete(inv); } // t.setPopular(1); diff --git a/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultWaveDocManager.java b/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultWaveDocManager.java index fb42372..7789ffa 100644 --- a/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultWaveDocManager.java +++ b/src/main/java/com/dev/swms/server/service/shipping/pojo/DefaultWaveDocManager.java @@ -3722,7 +3722,8 @@ public class DefaultWaveDocManager extends DefaultBaseManager implements inventory=Inventorys.get(0); inventoryManager.addInventoryLog(InventoryLogType.PROCESS_UP, 1, t.getBillCode(), loc, null, task.getItemKey(), inventory.getStorageDate(), inventory.getSOI(), inventory.getQuantity(), null, inventory.getStatus(), inventory.getId(), - "交单",pt.getBillType() ,UserHolder.getUser().getId(),inventory.getBarCode(),task.getDstLoc(),pt.getSourceType()); + "交单",pt.getBillType() ,UserHolder.getUser().getId(),inventory.getBarCode(),task.getDstLoc(), + pt.getSourceType(),null); commonDao.delete(inventory); Location srcLoc=this.load(Location.class, t.getDstLoc().getId());//交单库位 // inventoryManager.manualMove(inventory.getId(), loc.getId(), false, task.getDstLP().getLP(), inventory.getQuantity(), 0L); @@ -3747,7 +3748,7 @@ public class DefaultWaveDocManager extends DefaultBaseManager implements inventory=Inventorys.get(0); inventoryManager.addInventoryLog(InventoryLogType.PROCESS_UP, 1, task.getBillCode(), loc, null, task.getItemKey(), inventory.getStorageDate(), inventory.getSOI(), inventory.getQuantity(), null, inventory.getStatus(), inventory.getId(), - "交单",pt.getBillType() ,UserHolder.getUser().getId(),inventory.getBarCode(),task.getDstLoc(),pt.getSourceType()); + "交单",pt.getBillType() ,UserHolder.getUser().getId(),inventory.getBarCode(),task.getDstLoc(),pt.getSourceType(),null); commonDao.delete(inventory); // inventoryManager.manualMove(inventory.getId(), loc.getId(), false, task.getDstLP().getLP(), inventory.getQuantity(), 0L); task.setDstLoc(loc); diff --git a/src/main/java/com/dev/swms/server/web/servlet/ASNReceiveServlet.java b/src/main/java/com/dev/swms/server/web/servlet/ASNReceiveServlet.java index 8f0eb9c..6ee92de 100644 --- a/src/main/java/com/dev/swms/server/web/servlet/ASNReceiveServlet.java +++ b/src/main/java/com/dev/swms/server/web/servlet/ASNReceiveServlet.java @@ -2495,7 +2495,7 @@ public class ASNReceiveServlet extends HttpServlet { } inventoryManager.addInventoryLog(InventoryLogType.PROCESS_UP, 1, t.getBillCode(), dstLoc, lp, ik, inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), inv.getId(), "合单移动", - pt.getBillType() ,userId,inv.getBarCode(),srcLoc,pt.getSourceType()); + pt.getBillType() ,userId,inv.getBarCode(),srcLoc,pt.getSourceType(),null); status="1"; msg="操作成功"; } @@ -3052,7 +3052,9 @@ public class ASNReceiveServlet extends HttpServlet { Location loc=commonDao.load(Location.class, tasks.getSrcLoc().getId()); InventoryManager inventoryManager = (InventoryManager) ac.getBean("inventoryManager"); inventoryManager.addInventoryLog(InventoryLogType.COMPANY_TRANS_OUT, 1, tasks.getBillCode(), loc, null, itemKey, - new Date(), null, tasks.getPlanQuantity(), null, tasks.getInventoryStatus(), tasks.getId(), content,pt.getBillType() ,workerId,tasks.getBarCode(),loc,pt.getSourceType()); + new Date(), null, tasks.getPlanQuantity(), null, tasks.getInventoryStatus(), + tasks.getId(), content,pt.getBillType() ,workerId,tasks.getBarCode(), + loc,pt.getSourceType(),ptd.getLocType()); status="1"; }else{ msg="taskId参数错误或为null"; diff --git a/src/main/java/com/dev/swms/server/web/servlet/InventoryServlet.java b/src/main/java/com/dev/swms/server/web/servlet/InventoryServlet.java index 4bd91bb..36de292 100644 --- a/src/main/java/com/dev/swms/server/web/servlet/InventoryServlet.java +++ b/src/main/java/com/dev/swms/server/web/servlet/InventoryServlet.java @@ -122,7 +122,6 @@ public class InventoryServlet extends HttpServlet{ resultObject.put("returnMsg","成功"); resultOutput=resultObject.toString(); } - } } }else{ diff --git a/src/webapp/WEB-INF/classes/config/origen/base/editPlanItemDetailPage.xml b/src/webapp/WEB-INF/classes/config/origen/base/editPlanItemDetailPage.xml new file mode 100644 index 0000000..82fc02f --- /dev/null +++ b/src/webapp/WEB-INF/classes/config/origen/base/editPlanItemDetailPage.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/webapp/WEB-INF/classes/config/origen/base/maintainPlanItemPage.xml b/src/webapp/WEB-INF/classes/config/origen/base/maintainPlanItemPage.xml index 5b010e8..0fa9554 100644 --- a/src/webapp/WEB-INF/classes/config/origen/base/maintainPlanItemPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/base/maintainPlanItemPage.xml @@ -158,11 +158,9 @@ - - - - - + + \ No newline at end of file diff --git a/src/webapp/WEB-INF/classes/config/origen/base/maintainWorkerPage.xml b/src/webapp/WEB-INF/classes/config/origen/base/maintainWorkerPage.xml index 80169db..18f5f0b 100644 --- a/src/webapp/WEB-INF/classes/config/origen/base/maintainWorkerPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/base/maintainWorkerPage.xml @@ -33,6 +33,7 @@ w.description, w.disabled, w.equipment, + w.user.name, w.describe from Worker w left join w.user user @@ -64,6 +65,8 @@ formatParam="disabled" /> + diff --git a/src/webapp/WEB-INF/classes/config/origen/inventory/maintainInventoryLogPage.xml b/src/webapp/WEB-INF/classes/config/origen/inventory/maintainInventoryLogPage.xml index 243478d..450a8c5 100644 --- a/src/webapp/WEB-INF/classes/config/origen/inventory/maintainInventoryLogPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/inventory/maintainInventoryLogPage.xml @@ -134,6 +134,7 @@ inventoryLog.srcLoc.zone.code, inventoryLog.endRegion, inventoryLog.strbill1, + inventoryLog.strbill2, inventoryLog.LP, inventoryLog.status FROM InventoryLog inventoryLog @@ -207,9 +208,10 @@ title="库区" visible="true" horizonAlign="center" /> - - + 0 and inventory.beSAPItem=true diff --git a/src/webapp/WEB-INF/classes/config/origen/inventory/modifyXLinfoPage.xml b/src/webapp/WEB-INF/classes/config/origen/inventory/modifyXLinfoPage.xml index 645c4dd..2c40070 100644 --- a/src/webapp/WEB-INF/classes/config/origen/inventory/modifyXLinfoPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/inventory/modifyXLinfoPage.xml @@ -15,7 +15,8 @@ - + + @@ -50,6 +51,8 @@ LEFT JOIN inventory.warehouseArea WHERE 1=1 and inventory.quantity!=0 + /~inventory.item.id: AND item.id = {inventory.item.id}~/ + /~inventory.location.id: AND loc.id = {inventory.location.id}~/ /~inventory.itemCode: AND item.code = {inventory.itemCode}~/ /~inventory.locCode: AND loc.code = {inventory.locCode}~/ /~inventory.propC1: AND inventory.itemKey.lotInfo.propC1 = {inventory.propC1}~/ diff --git a/src/webapp/WEB-INF/classes/config/origen/shipping/maintainOtherPickTicketPage.xml b/src/webapp/WEB-INF/classes/config/origen/shipping/maintainOtherPickTicketPage.xml new file mode 100644 index 0000000..1d16b4b --- /dev/null +++ b/src/webapp/WEB-INF/classes/config/origen/shipping/maintainOtherPickTicketPage.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/webapp/WEB-INF/classes/config/origen/shipping/maintainPickTicketPage.xml b/src/webapp/WEB-INF/classes/config/origen/shipping/maintainPickTicketPage.xml index f4dd24c..6a56fe5 100644 --- a/src/webapp/WEB-INF/classes/config/origen/shipping/maintainPickTicketPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/shipping/maintainPickTicketPage.xml @@ -46,6 +46,7 @@ pickTicket.orderDate, pickTicket.status, pickTicket.billType.name, + pickTicket.deliveryMode, pickTicket.packageQuantity, pickTicket.orderQuantity, pickTicket.allocatedQuantity, @@ -58,7 +59,7 @@ pickTicket.jiaodanDate, pickTicket.workerName1, pickTicket.workerName4, - pickTicket.deliveryMode, + pickTicket.shipmentMethod, pickTicket.sourceId, pickTicket.userName @@ -97,6 +98,8 @@ formatParam="PickTicketStatus" /> + - + + + diff --git a/src/webapp/WEB-INF/classes/config/origen/shipping/maintainQueryTaskPage.xml b/src/webapp/WEB-INF/classes/config/origen/shipping/maintainQueryTaskPage.xml index aa446bd..1d30e9b 100644 --- a/src/webapp/WEB-INF/classes/config/origen/shipping/maintainQueryTaskPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/shipping/maintainQueryTaskPage.xml @@ -187,9 +187,7 @@ agv.createTime as agv_createTime_2, agv.dateTime2, agv.dateTime3, - agv.jobPriorityType, - t.old_Gzz, - t.old_Zrw, + agv.agvStartSlotCode, z.name as z_name, pt.sourceType, bt.name as bt_name, @@ -330,9 +328,7 @@ left OUTER join WORKER w4 on w4.id=t.WORKER4_ID - - - + diff --git a/src/webapp/WEB-INF/classes/config/origen/shipping/maintainTaskPage.xml b/src/webapp/WEB-INF/classes/config/origen/shipping/maintainTaskPage.xml index 05c4d29..075d654 100644 --- a/src/webapp/WEB-INF/classes/config/origen/shipping/maintainTaskPage.xml +++ b/src/webapp/WEB-INF/classes/config/origen/shipping/maintainTaskPage.xml @@ -190,9 +190,7 @@ agv.createTime, agv.dateTime2, agv.dateTime3, - agv.jobPriorityType, - t.oldGzz, - t.oldZrw, + agv.agvStartSlotCode, szone.name, pickTicket.sourceType, billType.name, @@ -337,9 +335,8 @@ - - - + +