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

回复出库状态

parent a747d41b
......@@ -29,6 +29,7 @@ public class OutboundService {
Map obs = finishedObps.get(i);
Map newValue = new HashMap();
newValue.put("STATE",Sql_Table.FINISH);
newValue.put("PICKED",CommonUtils.parseInteger("AMOUNT_PICKED",obs));
CommonUtils.modifyUselessInfo(newValue);
Map con = new HashMap();
......@@ -36,5 +37,20 @@ public class OutboundService {
this.jdbcRepository.updateRecords(Sql_Table.TABLE_OUTBOUND_ORDERPOSITION, newValue, con);
}
//如果明细都已结束 将主表更新为已完成,减少操作时的判断
List<Map> list = this.jdbcRepository
.queryBySql(Sql_Table.SQL_OUTBOUNDORDERPOSITION_BYSTATE);
for (int i = 0; i < list.size(); i++) {
Map rows = list.get(i);
Map newValue = new HashMap();
newValue.put("STATE", Sql_Table.FINISH);
newValue.put("NEED_RESP", 1);
CommonUtils.modifyUselessInfo(newValue);
Map con = new HashMap();
con.put("ORDERID",CommonUtils.parseString("ORDERID",rows));
this.jdbcRepository.updateRecords(Sql_Table.WMS_OUTBOUND_ORDER,newValue,con);
}
}
}
......@@ -140,7 +140,7 @@ public interface Sql_Table {
String NEW = "New";
String TABLE_OB_CUSTOMERSHIPMENT = "OB_CUSTOMERSHIPMENT";
String TABLE_OB_CUSTOMERSHIPMENTPOSITION = "OB_CUSTOMERSHIPMENTPOSITION";
String SQL_QUERY_OBORDER = "SELECT WMS_OUTBOUND_ORDERPOSITION.* FROM WMS_OUTBOUND_ORDERPOSITION,OB_CUSTOMERSHIPMENTPOSITION \n" +
String SQL_QUERY_OBORDER = "SELECT WMS_OUTBOUND_ORDERPOSITION.*,OB_CUSTOMERSHIPMENTPOSITION.AMOUNT_PICKED FROM WMS_OUTBOUND_ORDERPOSITION,OB_CUSTOMERSHIPMENTPOSITION \n" +
"WHERE WMS_OUTBOUND_ORDERPOSITION.SHIPMENTPOSITION_ID=OB_CUSTOMERSHIPMENTPOSITION.ID \n" +
"AND WMS_OUTBOUND_ORDERPOSITION.STATE<>'Finish' AND OB_CUSTOMERSHIPMENTPOSITION.STATE >= 600 ";
String TABLE_OUTBOUND_ORDERPOSITION = "WMS_OUTBOUND_ORDERPOSITION";
......
......@@ -233,19 +233,6 @@ public class WMSRespService {
}
}
//如果明细都已结束 将主表更新为已完成,减少操作时的判断
List<Map> list = this.jdbcRepository
.queryBySql(Sql_Table.SQL_OUTBOUNDORDERPOSITION_BYSTATE);
for (int i = 0; i < list.size(); i++) {
Map rows = list.get(i);
Map newValue = new HashMap();
newValue.put("STATE", Sql_Table.FINISH);
CommonUtils.modifyUselessInfo(newValue);
Map con = new HashMap();
con.put("ENTRYID",CommonUtils.parseString("ENTRYID",rows));
this.jdbcRepository.updateRecords(Sql_Table.WMS_OUTBOUND_ORDER,newValue,con);
}
}
......@@ -254,17 +241,18 @@ public class WMSRespService {
for (int i = 0; i < data.size(); i++) {
Map map = data.get(i);
String entryId = (String) map.get("ENTRYID");
if(temp.get(entryId) == null){
String orderId = (String) map.get("ORDERID");
if(temp.get(orderId) == null){
OutboundOrderDTO outboundOrderDTO = new OutboundOrderDTO();
outboundOrderDTO.setORDERID(entryId);
outboundOrderDTO.setSECTION((String) map.get("SECTION"));
outboundOrderDTO.setFACTORY((String) map.get("FACTORY"));
outboundOrderDTO.setORDERID(orderId);
outboundOrderDTO.setSECTION(CommonUtils.getSection((String) map.get("SECTION_ID")));
//outboundOrderDTO.setFACTORY((String) map.get("FACTORY"));
outboundOrderDTO.setFACTORY(CommonUtils.getWarehouse((String) map.get("WAREHOUSE_ID")));
outboundOrderDTO.setTIMES(CommonUtils.parseInteger("TIMES",map));
outboundOrderDTO.setDATA(new ArrayList<>());
temp.put(entryId,outboundOrderDTO);
temp.put(orderId,outboundOrderDTO);
}
OutboundOrderDTO outboundOrderDTO = temp.get(entryId);
OutboundOrderDTO outboundOrderDTO = temp.get(orderId);
//每行一条明细记录
OutboundOrderPosition outboundOrderPosition = new OutboundOrderPosition();
outboundOrderPosition.setSHIPMENTID(CommonUtils.parseString("SHIPMENTID",map));
......
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