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

拣货任务完善,出库单与系统绑定 完成后反馈

parent 6be2abb9
......@@ -121,7 +121,7 @@ public class ICQAService {
//TODO 根据工作站查找
String pods = this.systemPropertiesManager.getProperty("EN_ROUTE_MAX_PODS_BINCHENK", Sql_Table.WAREHOUSE);
List<Map> runningPods = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_RUNNINGPODS,
"ICQAPod", Sql_Table.AVAILABLE,Sql_Table.PROCESS);
"ICQAPod", Sql_Table.AVAILABLE,Sql_Table.PROCESS, Sql_Table.NEW);
Integer limit = Integer.parseInt(pods) - runningPods.size(); //TODO 按工作站区分
//先找这么多货架 然后加载所有任务
List<Map> podIds = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_ICQAPODS, "ICQAPod", Sql_Table.AVAILABLE);
......@@ -131,6 +131,10 @@ public class ICQAService {
String workStation = CommonUtils.parseString("WORKSTATION_ID",map);
List<Map> orderPosition = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_PODORDERS
,podId, Sql_Table.NEW); //New Available Finish 没有Process
if(orderPosition.isEmpty()){
logger.error("当前货架没有调度任务 podId:"+podId);
continue;
}
BaseBpo baseBpo = new BaseBpo();
baseBpo.setTable("RCS_TRIP");
String tripId = CommonUtils.genUUID();
......@@ -147,7 +151,7 @@ public class ICQAService {
for (int j = 0; j < orderPosition.size(); j++) {
//如果存在RCS_TRIPPOSITION就不要再创建
Map podOrder = orderPosition.get(j);
String needFace = CommonUtils.parseString("POD_FACE",map);
String needFace = CommonUtils.parseString("POD_FACE",podOrder);
//int sameFaceIndex = index.get(needFace);
String tripPositionID;
List<Map> tripPositions = this.inboundService.existTripPosition(workStation, podId, needFace,"ICQAPod");
......@@ -158,6 +162,7 @@ public class ICQAService {
baseBpo2.addKV("ID", tripPositionID);
baseBpo2.addKV("TRIP_ID", tripId);
baseBpo2.addKV("POD_USING_FACE", needFace);
baseBpo2.addKV("TIPPOSITION_STATE", Sql_Table.AVAILABLE);
baseBpo2.addKV("POSITION_NO", j + 1);
baseBpo2.addKV("WAREHOUSE_ID", CommonUtils.parseString("WAREHOUSE_ID", map));
baseBpo2.addKV("SECTION_ID", CommonUtils.parseString("SECTION_ID", map));
......
......@@ -297,7 +297,7 @@ public class InboundService {
//TODO 根据工作站查找
String pods = this.systemPropertiesManager.getProperty("StowPodStationMaxPod", Sql_Table.WAREHOUSE);
List<Map> runningPods = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_RUNNINGPODS,
"StowPod", Sql_Table.AVAILABLE,Sql_Table.PROCESS);
"StowPod", Sql_Table.AVAILABLE, Sql_Table.PROCESS, Sql_Table.NEW);
Integer limit = Integer.parseInt(pods) - runningPods.size(); //TODO 按工作站区分
//先找这么多货架 然后加载所有任务
List<Map> podIds = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_PODS, "StowPod", Sql_Table.AVAILABLE);
......@@ -307,6 +307,10 @@ public class InboundService {
String workStation = CommonUtils.parseString("WORKSTATION_ID",map);
List<Map> orderPosition = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_PODORDERS
,podId, Sql_Table.NEW); //New Available Finish 没有Process
if(orderPosition.isEmpty()){
logger.error("当前货架没有调度任务 podId:"+podId);
continue;
}
BaseBpo baseBpo = new BaseBpo();
baseBpo.setTable("RCS_TRIP");
String tripId = CommonUtils.genUUID();
......@@ -323,7 +327,7 @@ public class InboundService {
for (int j = 0; j < orderPosition.size(); j++) {
//如果存在RCS_TRIPPOSITION就不要再创建
Map podOrder = orderPosition.get(j);
String needFace = CommonUtils.parseString("POD_FACE",map);
String needFace = CommonUtils.parseString("POD_FACE",podOrder);
//int sameFaceIndex = index.get(needFace);
String tripPositionID;
List<Map> tripPositions = existTripPosition(workStation, podId, needFace,"StowPod");
......@@ -334,6 +338,7 @@ public class InboundService {
baseBpo2.addKV("ID", tripPositionID);
baseBpo2.addKV("TRIP_ID", tripId);
baseBpo2.addKV("POD_USING_FACE", needFace);
baseBpo2.addKV("TIPPOSITION_STATE", Sql_Table.AVAILABLE);
baseBpo2.addKV("POSITION_NO", j + 1);
baseBpo2.addKV("WAREHOUSE_ID", CommonUtils.parseString("WAREHOUSE_ID", map));
baseBpo2.addKV("SECTION_ID", CommonUtils.parseString("SECTION_ID", map));
......
......@@ -63,7 +63,8 @@ public interface Sql_Table {
" WHERE POD_ID NOT IN (SELECT POD_ID FROM RCS_TRIP WHERE TRIP_TYPE=? AND TRIP_STATE=?) " +
" LIMIT 10";
String SQL_QUERY_RUNNINGPODS = "SELECT DISTINCT POD_ID " +
"FROM RCS_TRIP WHERE TRIP_TYPE=? AND (TRIP_STATE=? OR TRIP_STATE=?)" +
"FROM RCS_TRIP WHERE TRIP_TYPE=? " +
"AND (TRIP_STATE=? OR TRIP_STATE=? OR TRIP_STATE=?)" +
" LIMIT 10";
String SQL_QUERY_PODORDERS = "SELECT * FROM WMS_INBOUND_PODORDER WHERE POD_ID=? AND STATE=? ";
String TABLE_MD_WORKSTATION = "MD_WORKSTATION";
......
......@@ -173,7 +173,7 @@ public class WMSRespService {
//如果明细都已结束 将主表更新为已完成,减少操作时的判断
List<Map> list = this.jdbcRepository
.queryBySql(Sql_Table.SQL_OUTBOUNDORDERPOSITION_BYSTATE, Sql_Table.FINISH);
.queryBySql(Sql_Table.SQL_OUTBOUNDORDERPOSITION_BYSTATE);
for (int i = 0; i < list.size(); i++) {
Map rows = list.get(i);
Map newValue = new HashMap();
......
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