Commit c0e0fbb0 authored by tank.li@mushiny.com's avatar tank.li@mushiny.com

释放工作站货架,要找任务号 再发送给wcs

parent 57b06d39
...@@ -75,6 +75,7 @@ public class MqListener { ...@@ -75,6 +75,7 @@ public class MqListener {
`TOWARD` varchar(255) DEFAULT NULL COMMENT 'ABCD', `TOWARD` varchar(255) DEFAULT NULL COMMENT 'ABCD',
`PLACEMARK` int(11) DEFAULT NULL COMMENT '*/ `PLACEMARK` int(11) DEFAULT NULL COMMENT '*/
Integer podDirection = CommonUtils.parseInteger("podDirection",data); Integer podDirection = CommonUtils.parseInteger("podDirection",data);
int toward = 0; int toward = 0;
switch (podDirection){ switch (podDirection){
...@@ -92,6 +93,7 @@ public class MqListener { ...@@ -92,6 +93,7 @@ public class MqListener {
record.put("POD_INDEX",podIndex); record.put("POD_INDEX",podIndex);
record.put("POD_ID",podId); record.put("POD_ID",podId);
record.put("TOWARD",toward); record.put("TOWARD",toward);
record.put("TRIP_TASK",CommonUtils.parseInteger("taskId",data));
CommonUtils.genUselessInfo(record); CommonUtils.genUselessInfo(record);
this.jdbcRepository.insertRecord(Sql_Table.TABLE_WMS_POD_STATION,record); this.jdbcRepository.insertRecord(Sql_Table.TABLE_WMS_POD_STATION,record);
logger.debug("新增记录成功"); logger.debug("新增记录成功");
...@@ -104,6 +106,7 @@ public class MqListener { ...@@ -104,6 +106,7 @@ public class MqListener {
newValue.put("POD_ID",podId); newValue.put("POD_ID",podId);
newValue.put("POD_INDEX",CommonUtils.parseInteger("podId",data)); newValue.put("POD_INDEX",CommonUtils.parseInteger("podId",data));
newValue.put("TOWARD",toward); newValue.put("TOWARD",toward);
newValue.put("TRIP_TASK",CommonUtils.parseInteger("taskId",data));
CommonUtils.modifyUselessInfo(newValue); CommonUtils.modifyUselessInfo(newValue);
Map con = new HashMap(); Map con = new HashMap();
......
...@@ -156,7 +156,7 @@ public class InboundService { ...@@ -156,7 +156,7 @@ public class InboundService {
//结束货架任务信息 PodOrder //结束货架任务信息 PodOrder
this.updateInboundPodOrder(Sql_Table.FINISH, podOrderId); this.updateInboundPodOrder(Sql_Table.FINISH, podOrderId);
//增加入库流水记录 //增加入库流水记录
this.add2InboundHistory(stored,entryId,pId,skuId,containerId,uid,id); this.add2InboundHistory(stored,entryId,pId,skuId,containerId,uid,id,factory);
return messageDTO; return messageDTO;
} }
...@@ -174,7 +174,7 @@ public class InboundService { ...@@ -174,7 +174,7 @@ public class InboundService {
} }
private void add2InboundHistory(Integer amount, String entryId, String pId, private void add2InboundHistory(Integer amount, String entryId, String pId,
String skuId, String containerId, String uid,String stockUnitId) { String skuId, String containerId, String uid, String stockUnitId, String factory) {
//TODO //TODO
Map record = new HashMap(); Map record = new HashMap();
record.put("ID",CommonUtils.genUUID()); record.put("ID",CommonUtils.genUUID());
...@@ -189,8 +189,8 @@ public class InboundService { ...@@ -189,8 +189,8 @@ public class InboundService {
record.put("TO_STOCKUNIT",stockUnitId); record.put("TO_STOCKUNIT",stockUnitId);
record.put("TO_UNITLOAD",uid); record.put("TO_UNITLOAD",uid);
record.put("TO_STORAGELOCATION",containerId); record.put("TO_STORAGELOCATION",containerId);
record.put("CLIENT_ID","Inventory"); record.put("CLIENT_ID",factory);
record.put("WAREHOUSE_ID","Inventory"); record.put("WAREHOUSE_ID",factory);
this.jdbcRepository.insertRecord("INV_STOCKUNITRECORD",record); this.jdbcRepository.insertRecord("INV_STOCKUNITRECORD",record);
logger.debug("增加库存历史记录成功:"+record); logger.debug("增加库存历史记录成功:"+record);
......
...@@ -101,7 +101,7 @@ public interface Sql_Table { ...@@ -101,7 +101,7 @@ public interface Sql_Table {
" WMS_POD_STATION.SECTION_ID, \n" + " WMS_POD_STATION.SECTION_ID, \n" +
" WMS_POD_STATION.PLACEMARK FROM WMS_POD_STATION, MD_WORKSTATION \n" + " WMS_POD_STATION.PLACEMARK FROM WMS_POD_STATION, MD_WORKSTATION \n" +
" WHERE WMS_POD_STATION.PLACEMARK = MD_WORKSTATION.STOPPOINT \n" + " WHERE WMS_POD_STATION.PLACEMARK = MD_WORKSTATION.STOPPOINT \n" +
" AND MD_WORKSTATION.ID = ?"; " AND MD_WORKSTATION.ID = ? limit 1";
String SQL_QUERY_PODORDRTASK = "select WMS_INBOUND_PODORDER.* from WMS_INBOUND_PODORDER, WMS_INBOUND_ORDERPOSITION \n" + String SQL_QUERY_PODORDRTASK = "select WMS_INBOUND_PODORDER.* from WMS_INBOUND_PODORDER, WMS_INBOUND_ORDERPOSITION \n" +
......
...@@ -163,6 +163,9 @@ public class WmsToWcsService{ ...@@ -163,6 +163,9 @@ public class WmsToWcsService{
private Map getByWorkStationIdAndPodIndex(String workStationId, Integer podIndex) { private Map getByWorkStationIdAndPodIndex(String workStationId, Integer podIndex) {
logger.debug("条件 workStationId :"+workStationId+" pod: "+podIndex); logger.debug("条件 workStationId :"+workStationId+" pod: "+podIndex);
Map data = this.jdbcRepository.queryOneBySql(Sql_Table.SQL_QUERY_CURRENTPOD, workStationId); Map data = this.jdbcRepository.queryOneBySql(Sql_Table.SQL_QUERY_CURRENTPOD, workStationId);
if(data == null){
return null;
}
if(Objects.equals(podIndex, CommonUtils.parseInteger("POD_INDEX",data))){ if(Objects.equals(podIndex, CommonUtils.parseInteger("POD_INDEX",data))){
return data; return data;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment