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

盘点任务回复

parent 6e2e35b0
......@@ -40,6 +40,15 @@ public class HeliWMSController {
return ResponseEntity.ok(dto);
}
@PostMapping(value = "/callPod", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> callPod(
@RequestBody String json){
logger.debug("inboundResp: " + json);
this.wmsToWcsService.sendSingleTripToWcs(8,1,475,0,0);
MessageDTO dto = MessageDTO.success();
return ResponseEntity.ok(dto);
}
@PostMapping(value = "/icqaResp", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> icqaResp(
@RequestBody String json){
......
......@@ -128,8 +128,8 @@ public class InboundService {
baseBpo.addKV("AMOUNT",stored);//上架的数量
baseBpo.addKV("UNITLOAD_ID",uid);
baseBpo.addKV("RESERVED_AMOUNT",0);
baseBpo.addKV("CLIENT_ID",factory); //同一个factory
baseBpo.addKV("WAREHOUSE_ID",factory);//TODO
baseBpo.addKV("CLIENT_ID",CommonUtils.getClient(factory)); //同一个factory
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(factory));//TODO
this.jdbcRepository.insertBusinessObject(baseBpo);
//end of 新增记录
}else{
......@@ -193,8 +193,8 @@ public class InboundService {
record.put("TO_STOCKUNIT",stockUnitId);
record.put("TO_UNITLOAD",uid);
record.put("TO_STORAGELOCATION",containerId);
record.put("CLIENT_ID",factory);
record.put("WAREHOUSE_ID",factory);
record.put("CLIENT_ID",CommonUtils.getClient(factory));
record.put("WAREHOUSE_ID",CommonUtils.getClient(factory));
this.jdbcRepository.insertRecord("INV_STOCKUNITRECORD",record);
logger.debug("增加库存历史记录成功:"+record);
......
......@@ -125,13 +125,14 @@ public interface Sql_Table {
String SQL_QUERY_PODORDRTASK = "select WMS_INBOUND_PODORDER.* from WMS_INBOUND_PODORDER, WMS_INBOUND_ORDERPOSITION \n" +
" where WMS_INBOUND_PODORDER.ENTRYPOSITIONID = WMS_INBOUND_ORDERPOSITION.ID\n" +
" and WMS_INBOUND_PODORDER.STATE = 'Available' \n" +
" and (WMS_INBOUND_PODORDER.STATE = 'Available' OR WMS_INBOUND_PODORDER.STATE='Process') \n" +
" and WMS_INBOUND_ORDERPOSITION.STATE = 'Available' \n" +
" and WMS_INBOUND_PODORDER.POD_ID=? and WMS_INBOUND_PODORDER.POD_FACE=?\n" +
" ORDER BY WMS_INBOUND_PODORDER.CREATED_DATE DESC limit 1";
String SQL_QUERY_PODORDRTASK_ICQA = "select WMS_ICQA_PODORDER.* from WMS_ICQA_PODORDER, WMS_ICQA_ORDERPOSITION \n" +
" where WMS_ICQA_PODORDER.TASKPOSITIONID = WMS_ICQA_ORDERPOSITION.ID\n" +
" and (WMS_ICQA_PODORDER.STATE = 'Available' OR WMS_ICQA_PODORDER.STATE='Process') \n" +
" and WMS_ICQA_ORDERPOSITION.STATE='Available'" +
" and WMS_ICQA_PODORDER.POD_ID=? and WMS_ICQA_PODORDER.POD_FACE=?\n" +
" ORDER BY WMS_ICQA_PODORDER.CREATED_DATE DESC limit 1";
......@@ -163,7 +164,7 @@ public interface Sql_Table {
"FROM WMS_INBOUND_ORDER WHERE 1=1 ";
String SQL_INV_UNITLOADID =
"SELECT INV_UNITLOAD.ID FROM INV_UNITLOAD,MD_STORAGELOCATION WHERE MD_STORAGELOCATION.NAME=? " +
"AND MD_STORAGELOCATION.ID=INV_UNITLOAD.STORAGELOCATION_ID AND ENTITY_LOCK=0";
"AND MD_STORAGELOCATION.ID=INV_UNITLOAD.STORAGELOCATION_ID AND INV_UNITLOAD.ENTITY_LOCK=0";
String SQL_MD_ITEMDATA =
"SELECT ID FROM MD_ITEMDATA WHERE SKUID=?";
//String STATION_ID = "6db9c7c0-4f93-4fa1-82c0-fb6435af7aae";//NTYH01S1-S001-1
......
......@@ -145,7 +145,7 @@ public class WmsToWcsService{
public void releasePod(String workStationId,Integer podIndex) {
logger.info("工作站 = {} 释放pod = {} ",workStationId,podIndex);
//先查询该停止点是否有任务
Map podStation = this.getByWorkStationIdAndPodIndex(workStationId,podIndex);
Map podStation = this.getByWorkStationIdAndPodIndex(workStationId);
if(podStation == null){
logger.info("工作站 :{} 没有pod : {} ,无法释放。。",workStationId, podIndex);
......@@ -172,17 +172,14 @@ public class WmsToWcsService{
return this.jdbcRepository.queryOneBySql(Sql_Table.SQL_QUERYPODBYINDEX, sectionId, podIndex);
}
private Map getByWorkStationIdAndPodIndex(String workStationId, Integer podIndex) {
logger.debug("条件 workStationId :"+workStationId+" pod: "+podIndex);
private Map getByWorkStationIdAndPodIndex(String workStationId) {
logger.debug("条件 workStationId :"+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))){
return data;
}
return null;
}
......
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