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

盘点任务回复

parent 23db72e4
......@@ -22,6 +22,28 @@ public class CommonUtils {
private final static Logger logger = LoggerFactory.getLogger(CommonUtils.class);
public static Map section = new HashMap();
public static Map warehouse = new HashMap();
public static Map client = new HashMap();
static
{
section.put("1001-1","37cfb73b-d19c-4035-8348-d8a093a83046");
section.put("37cfb73b-d19c-4035-8348-d8a093a83046","1001-1");
warehouse.put("1001","c9a0eb27-cb87-416b-a926-6d1e2a30096b");
warehouse.put("c9a0eb27-cb87-416b-a926-6d1e2a30096b","1001");
client.put("1001","2ad455d6-acdb-43ab-ba48-ba1fe108b776");
client.put("2ad455d6-acdb-43ab-ba48-ba1fe108b776","1001");
}
public static String getSection(String key){
return (String) section.get(key);
}
public static String getClient(String key){
return (String) client.get(key);
}
public static String getWarehouse(String key){
return (String) warehouse.get(key);
}
public static String face2WorkStation(int podFace, int wsFace){
//现在工作站的朝向相当于POD的面
......
......@@ -44,7 +44,9 @@ public class ICQAController {
int stored = CommonUtils.parseInteger("counted",data);
String skuId = CommonUtils.parseString("skuId",data);
String factory = CommonUtils.parseString("factory",data);
factory = CommonUtils.getWarehouse(factory);
String section = CommonUtils.parseString("section",data);
section = CommonUtils.getSection(section);
String entryId = CommonUtils.parseString("taskId",data);
//货架的货位 P0000008AA01
String containerId = CommonUtils.parseString("containerId",data);
......
......@@ -36,7 +36,9 @@ public class InboundController {
int stored = CommonUtils.parseInteger("stored",data);
String skuId = CommonUtils.parseString("skuId",data);
String factory = CommonUtils.parseString("factory",data);
factory = CommonUtils.getWarehouse(factory);//转换
String section = CommonUtils.parseString("section",data);
section = CommonUtils.getSection(section);//转换
String entryId = CommonUtils.parseString("entryId",data);
String podOrderId = CommonUtils.parseString("podOrderId",data);
//货架的货位 P0000008AA01
......@@ -55,9 +57,15 @@ public class InboundController {
Map reqData = JsonUtils.json2Map(json);
String entryId = CommonUtils.parseString("entryId",reqData);
String warehouseId = CommonUtils.parseString("factory",reqData);
warehouseId = CommonUtils.getWarehouse(warehouseId);
String sectionId = CommonUtils.parseString("section",reqData);
sectionId = CommonUtils.getWarehouse(sectionId);
List<Map> data = this.inboundService.searchInbound(entryId,warehouseId,sectionId);
for (int i = 0; i < data.size(); i++) {
Map map = data.get(i);
map.put("SECTION_ID",CommonUtils.getSection(CommonUtils.parseString("SECTION_ID",map)));
map.put("WAREHOUSE_ID",CommonUtils.getSection(CommonUtils.parseString("WAREHOUSE_ID",map)));
}
return ResponseEntity.ok(JsonUtils.list2Json(data));
}
......
......@@ -5,6 +5,7 @@ import com.mushiny.heli.xnr.dto.InboundOrderDTO;
import com.mushiny.heli.xnr.dto.ItemDTO;
import com.mushiny.heli.xnr.dto.MessageDTO;
import com.mushiny.heli.xnr.dto.OutboundOrderDTO;
import com.mushiny.heli.xnr.service.WMSRespService;
import com.mushiny.heli.xnr.service.WMSService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -28,6 +29,9 @@ public class WMSController {
@Autowired
private WMSService wmsService;
@Autowired
private WMSRespService wmsRespService;
@PostMapping(value = "/syncItem", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> syncItem(
@RequestBody String json){
......@@ -106,4 +110,18 @@ public class WMSController {
return ResponseEntity.ok(dto);
}
@PostMapping(value = "/sendStorage", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<MessageDTO> sendStorage(
@RequestBody String json) {
MessageDTO dto = MessageDTO.success();
try {
this.wmsRespService.storageResp();
} catch (Exception e) {
dto.setMESSAGE(e.getMessage());
dto.setCODE(1);
}
return ResponseEntity.ok(dto);
}
}
......@@ -54,67 +54,73 @@ public class MqListener {
@RabbitListener(queues = "POD_STATION_HELI")
@Transactional
public void pod2Station3(Message message){
byte[] body = message.getBody();
String jsonData = new String(body);
Map data = JsonUtils.json2Map(jsonData);
logger.info("monitor_pod_to_workstation3:" + data);
int stopCellId = CommonUtils.parseInteger("stopCellId",data);
String sectionId = this.getSectionIdBySid(CommonUtils.parseInteger("sectionId",data));
String workstationId = this.getWorkstationIdByStopPoint(stopCellId,sectionId);
int podIndex = CommonUtils.parseInteger("podId",data);
String podId = this.getPodIdByIndex(sectionId, podIndex);
try {
byte[] body = message.getBody();
String jsonData = new String(body);
Map data = JsonUtils.json2Map(jsonData);
logger.info("monitor_pod_to_workstation3:" + data);
int stopCellId = CommonUtils.parseInteger("stopCellId",data);
String sectionId = this.getSectionIdBySid(CommonUtils.parseInteger("sectionId",data));
String workstationId = this.getWorkstationIdByStopPoint(stopCellId,sectionId);
int podIndex = CommonUtils.parseInteger("podId",data);
String podId = this.getPodIdByIndex(sectionId, podIndex);
/*Integer sectionId;
Integer stopCellId; //停止点
Integer direction;//工作站相对停止点方向
String podId;
Integer podDirection;
String taskId;*/
List<Map> rows = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_POD_STATION,stopCellId,workstationId);
List<Map> rows = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_POD_STATION,workstationId);
/* `STATION_ID` varchar(255) NOT NULL,
`POD_INDEX` int(11) NOT NULL,
`TOWARD` varchar(255) DEFAULT NULL COMMENT 'ABCD',
`PLACEMARK` int(11) DEFAULT NULL COMMENT '*/
Integer podDirection = CommonUtils.parseInteger("podDirection",data);
int toward = 0;
switch (podDirection){
case 1 : toward = 90; break;
case 2 : toward = 180; break;
case 3 : toward = 270; break;
}
if(rows.isEmpty()){
Map record = new HashMap();
//record.putAll(data);
//替换掉 便于查询
record.put("PLACEMARK",CommonUtils.parseInteger("stopCellId",data));
record.put("SECTION_ID",sectionId);
record.put("STATION_ID",workstationId);
record.put("POD_INDEX",podIndex);
record.put("POD_ID",podId);
record.put("TOWARD",toward);
record.put("TRIP_TASK",CommonUtils.parseInteger("taskId",data));
CommonUtils.genUselessInfo(record);
this.jdbcRepository.insertRecord(Sql_Table.TABLE_WMS_POD_STATION,record);
logger.debug("新增记录成功");
}else{
Map newValue = new HashMap();
newValue.put("PLACEMARK",CommonUtils.parseInteger("stopCellId",data));
newValue.put("SECTION_ID",sectionId);
newValue.put("STATION_ID",workstationId);
newValue.put("POD_ID",podId);
newValue.put("POD_INDEX",CommonUtils.parseInteger("podId",data));
newValue.put("TOWARD",toward);
newValue.put("TRIP_TASK",CommonUtils.parseInteger("taskId",data));
CommonUtils.modifyUselessInfo(newValue);
Map con = new HashMap();
con.put("STATION_ID",workstationId);
con.put("SECTION_ID",sectionId);
int ret = this.jdbcRepository.updateRecords(Sql_Table.TABLE_WMS_POD_STATION, newValue, con);
logger.debug("更新记录:"+data+" 结果为:"+ret);
Integer podDirection = CommonUtils.parseInteger("podDirection",data);
int toward = 0;
switch (podDirection){
case 1 : toward = 90; break;
case 2 : toward = 180; break;
case 3 : toward = 270; break;
}
if(rows.isEmpty()){
Map record = new HashMap();
//record.putAll(data);
//替换掉 便于查询
record.put("PLACEMARK",CommonUtils.parseInteger("stopCellId",data));
record.put("SECTION_ID",sectionId);
record.put("STATION_ID",workstationId);
record.put("POD_INDEX",podIndex);
record.put("POD_ID",podId);
record.put("TOWARD",toward);
record.put("WAREHOUSE_ID",CommonUtils.getWarehouse(Sql_Table.FACTORY));
record.put("TRIP_TASKID",CommonUtils.parseString("taskId",data));
CommonUtils.genUselessInfo(record);
this.jdbcRepository.insertRecord(Sql_Table.TABLE_WMS_POD_STATION,record);
logger.debug("新增记录成功");
}else{
Map newValue = new HashMap();
newValue.put("PLACEMARK",CommonUtils.parseInteger("stopCellId",data));
newValue.put("SECTION_ID",sectionId);
newValue.put("STATION_ID",workstationId);
newValue.put("POD_ID",podId);
newValue.put("POD_INDEX",CommonUtils.parseInteger("podId",data));
newValue.put("TOWARD",toward);
newValue.put("TRIP_TASK",CommonUtils.parseInteger("taskId",data));
CommonUtils.modifyUselessInfo(newValue);
Map con = new HashMap();
con.put("STATION_ID",workstationId);
con.put("SECTION_ID",sectionId);
int ret = this.jdbcRepository.updateRecords(Sql_Table.TABLE_WMS_POD_STATION, newValue, con);
logger.debug("更新记录:"+data+" 结果为:"+ret);
}
} catch (Exception e) {
logger.error("保存消息出错!", e);
}
}
......
......@@ -229,6 +229,11 @@ public class ICQAService {
stringBuilder.append(" ORDER BY CREATED_DATE DESC");
List<Map> rows = this.jdbcRepository.queryBySql(stringBuilder.toString(), params);
for (int i = 0; i < rows.size(); i++) {
Map map = rows.get(i);
map.put("SECTION_ID",CommonUtils.getSection(CommonUtils.parseString("SECTION_ID",map)));
map.put("WAREHOUSE_ID",CommonUtils.getSection(CommonUtils.parseString("WAREHOUSE_ID",map)));
}
data.put("tasks", rows);
return data;
......@@ -384,6 +389,11 @@ public class ICQAService {
String taskId = CommonUtils.parseString("taskId", data);
Map ret = new HashMap();
List<Map> taskInfo = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERY_ALLICQAPOSITIONS, taskId);
for (int i = 0; i < taskInfo.size(); i++) {
Map map = taskInfo.get(i);
map.put("SECTION_ID",CommonUtils.getSection(CommonUtils.parseString("SECTION_ID",map)));
map.put("WAREHOUSE_ID",CommonUtils.getSection(CommonUtils.parseString("WAREHOUSE_ID",map)));
}
ret.put("taskId", taskId);
ret.put("content", taskInfo);
return ret;
......@@ -461,19 +471,20 @@ public class ICQAService {
public Map searchSkus(Map data) {
String skuId = CommonUtils.parseString("skuId",data);//等同于ItemNo
List<Map> items;
String factory = CommonUtils.parseString("FACTORY",data);
factory = CommonUtils.getWarehouse(factory);
String client = CommonUtils.parseString("FACTORY",data);
client = CommonUtils.getClient(factory);
if (CommonUtils.isEmpty(skuId)) {
//所有的SKU
items = this.jdbcRepository.queryBySql(Sql_Table.SQL_FINDALLITEM
, CommonUtils.parseString("FACTORY",data)
,CommonUtils.parseString("FACTORY",data));
, client,factory);
} else {
//所有的SKU
//模糊查询
skuId = "%"+skuId+"%";
items = this.jdbcRepository.queryBySql(Sql_Table.SQL_FINDALLITEM_BYSKUID
, CommonUtils.parseString("FACTORY",data)
,CommonUtils.parseString("FACTORY",data),
skuId);
, client,factory, skuId);
}
data.put("content",items);
return data;
......
......@@ -61,6 +61,10 @@ public class InboundService {
sql.append(Sql_Table.SQL_SEARCHINBOUNDINFO);
params.add(entryId);
List<Map> data = this.jdbcRepository.queryBySql(sql.toString(),params);
for (int i = 0; i < data.size(); i++) {
Map map = data.get(i);
map.put("STORED",CommonUtils.parseInteger("ITEM_STORED",map));
}
return data;
}
......@@ -484,7 +488,25 @@ public class InboundService {
private StorageLocation newStorageLocation() {
List<Map> list = this.jdbcRepository.queryBySql(Sql_Table.SQL_NEWSTORAGELOCATION);
if(list.isEmpty()){
return null;
//如果没有这个INV_UNITLOAD 就从MD_STORAGELOCATION创建一个
list = this.jdbcRepository.queryBySql(Sql_Table.SQL_QUERYEMPTYSTORAGELOCATION);
Map data = list.get(0);
//创建这条记录
BaseBpo baseBpo = new BaseBpo();
baseBpo.setTable(Sql_Table.TABLE_INV_UNITLOAD);
baseBpo.setIdName("ID");
String id = CommonUtils.genUUID();
baseBpo.setId(id);
//新建
baseBpo.addKV("ID",id);
baseBpo.addKV("LABEL",CommonUtils.genUUID());
baseBpo.addKV("LOCATION_INDEX",1);
baseBpo.addKV("CARRIER",Boolean.FALSE);
baseBpo.addKV("STORAGELOCATION_ID", CommonUtils.parseString("ID",data));
baseBpo.addKV("CLIENT_ID",CommonUtils.getClient(Sql_Table.CLIENT_ID));
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(Sql_Table.FACTORY));
this.jdbcRepository.insertBusinessObject(baseBpo);
}
Map row = list.get(0);
StorageLocation storageLocation = new StorageLocation();
......
package com.mushiny.heli.xnr.service;
import java.util.HashMap;
import java.util.Map;
/**
* Created by Lisi on 2019-11-27
*/
......@@ -22,7 +25,9 @@ public interface Sql_Table {
"AND INV_UNITLOAD.STORAGELOCATION_ID = MD_STORAGELOCATION.ID\n" +
"AND MD_ITEMDATA.CLIENT_ID = ? \n" +
"AND MD_ITEMDATA.WAREHOUSE_ID = ?\n" +
"GROUP BY MD_ITEMDATA.ITEM_NO,MD_ITEMDATA.NAME";
"GROUP BY MD_ITEMDATA.ITEM_NO,MD_ITEMDATA.NAME,MD_ITEMDATA.`NAME`, \n" +
"PNAME,MD_STORAGELOCATION.`SECTION_ID`, " +
"MD_ITEMDATA.`CLIENT_ID`, MD_ITEMDATA.`WAREHOUSE_ID`";
String SQL_FINDALLITEM_RESP = "SELECT SUM(AMOUNT) AS AMOUNT,MD_ITEMDATA.`ITEM_NO` AS SKUID,\n" +
"MD_STORAGELOCATION.`SECTION_ID` AS SECTION,\n" +
......@@ -150,7 +155,7 @@ public interface Sql_Table {
String SQL_SEARCHINBOUND_FACTORY = " AND WAREHOUSE_ID=? ";
String SQL_SEARCHINBOUND_SECTION = " AND SECTION_ID=? ";
String SQL_SEARCHINBOUNDINFO =
"SELECT SKUID,AMOUNT,IFNULL(ITEM_STORED,0) AS STORED,STATE FROM WMS_INBOUND_ORDERPOSITION WHERE ENTRYID = ?";
"SELECT SKUID,AMOUNT,IFNULL(ITEM_STORED,0) AS ITEM_STORED,STATE FROM WMS_INBOUND_ORDERPOSITION WHERE ENTRYID = ?";
String SQL_SEARCHINBOUND_ENTRYID = " AND ENTRYID like ? ";
String SQL_SEARCHINBOUND =
"SELECT ENTRYID,STATE,DATE_FORMAT(CREATED_DATE,'%Y-%m-%d %H:%i:%s') as CREATED_DATE" +
......@@ -158,10 +163,10 @@ 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 MD_STORAGELOCATION.ID=INV_UNITLOAD.STORAGELOCATION_ID AND 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
//String STATION_ID = "6db9c7c0-4f93-4fa1-82c0-fb6435af7aae";//NTYH01S1-S001-1
String STOW_OPERATOR_ID = "stowPod_user";//NTYH01S1-S001-1
String ICQA_OPERATOR_ID = "icqaPod_user";//NTYH01S1-S001-1
String STATION_NAME_STOWPOD = "STOWPOD_STATION";//NTYH01S1-S001-1
......@@ -189,7 +194,9 @@ public interface Sql_Table {
"AND MD_ITEMDATA.CLIENT_ID=? \n" +
"AND MD_ITEMDATA.WAREHOUSE_ID=?\n" +
"AND MD_ITEMDATA.ITEM_NO LIKE ?\n" +
"GROUP BY MD_ITEMDATA.`ITEM_NO`,MD_ITEMDATA.`NAME`";
"GROUP BY MD_ITEMDATA.ITEM_NO,MD_ITEMDATA.NAME,MD_ITEMDATA.`NAME`, \n" +
"PNAME,MD_STORAGELOCATION.`SECTION_ID`, " +
"MD_ITEMDATA.`CLIENT_ID`, MD_ITEMDATA.`WAREHOUSE_ID`";
String WMS_ICQA_PODORDER = "WMS_ICQA_PODORDER";
String SQL_QUERY_ALLICQAPOSITIONS = "SELECT * FROM WMS_ICQA_ORDERPOSITION WHERE TASKID=?";
String SQL_QUERY_ICQAORDERPOSITION = "SELECT * FROM WMS_ICQA_ORDERPOSITION WHERE TASKID=? AND SKUID=?";
......@@ -237,4 +244,13 @@ public interface Sql_Table {
"AND WMS_INBOUND_ORDERPOSITION.ENTRYID=WMS_INBOUND_ORDER.ENTRYID)";
String STOWPOD = "StowPod";
String ICQAPOD = "IcqaPod";
String SQL_QUERYEMPTYSTORAGELOCATION = "SELECT MD_STORAGELOCATION.* FROM MD_STORAGELOCATION\n" +
"WHERE MD_STORAGELOCATION.ID NOT IN \n" +
"(SELECT STORAGELOCATION_ID FROM INV_UNITLOAD WHERE ENTITY_LOCK=0)\n" +
"LIMIT 1";
String TABLE_INV_UNITLOAD = "INV_UNITLOAD";
String CLIENT_ID = "1001";
String FACTORY = "1001";
String SECTION = "1001-1";
}
......@@ -310,8 +310,8 @@ public class WMSRespService {
return new ArrayList<>(temp.values());
}
@Scheduled(fixedDelay = 5000*1000L)
@Transactional
/*@Scheduled(fixedDelay = 5000*1000L)
@Transactional*/
public void storageResp(){
List<Map> rows = this.jdbcRepository
.queryBySql(Sql_Table.SQL_FINDALLITEM_RESP);
......
......@@ -44,10 +44,10 @@ public class WMSService {
baseBpo.addKV("AMOUNT",inboundOrderPosition.getAMOUNT());
baseBpo.addKV("SKUID",inboundOrderPosition.getSKUID());
baseBpo.addKV("ID",CommonUtils.genUUID());
baseBpo.addKV("WAREHOUSE_ID",inboundOrderDTO.getFACTORY());
baseBpo.addKV("SECTION_ID",inboundOrderDTO.getSECTION());
baseBpo.addKV("STATE", Sql_Table.AVAILABLE);
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(inboundOrderDTO.getFACTORY()));
baseBpo.addKV("SECTION_ID",CommonUtils.getSection(inboundOrderDTO.getSECTION()));
baseBpo.addKV("STATE", Sql_Table.AVAILABLE);
//baseBpo.addKV("STATE", Sql_Table.AVAILABLE);
//增加了订单上架的序号 按入库单序号来
this.jdbcRepository.insertBusinessObject(baseBpo);
}
......@@ -57,8 +57,8 @@ public class WMSService {
baseBpo.setTable(Sql_Table.WMS_INBOUND_ORDER);
baseBpo.setIdName("ENTRYID");
baseBpo.addKV("TIMES",inboundOrderDTO.getTIMES());
baseBpo.addKV("WAREHOUSE_ID",inboundOrderDTO.getFACTORY());
baseBpo.addKV("SECTION_ID",inboundOrderDTO.getSECTION());
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(inboundOrderDTO.getFACTORY()));
baseBpo.addKV("SECTION_ID",CommonUtils.getSection(inboundOrderDTO.getSECTION()));
baseBpo.addKV("ENTRYID",inboundOrderDTO.getENTRYID());
this.jdbcRepository.insertBusinessObject(baseBpo);
}
......@@ -85,8 +85,8 @@ public class WMSService {
cs.addKV("ACTIVATED", Boolean.FALSE);
cs.addKV("SELECTED", Boolean.FALSE);
cs.addKV("COMPLETED", Boolean.FALSE);
cs.addKV("WAREHOUSE_ID", outboundOrderDTO.getFACTORY());
cs.addKV("CLIENT_ID", outboundOrderDTO.getFACTORY());
cs.addKV("WAREHOUSE_ID", CommonUtils.getWarehouse(outboundOrderDTO.getFACTORY()));
cs.addKV("CLIENT_ID", CommonUtils.getClient(outboundOrderDTO.getFACTORY()));
cs.addKV("TYPE", "Customer");
//新增一条记录
this.jdbcRepository.insertBusinessObject(cs);
......@@ -115,8 +115,8 @@ public class WMSService {
csp.addKV("SHIPMENT_ID",csid);
csp.addKV("POSITION_NO",i+1);
csp.addKV("ORDER_INDEX",i+1);
csp.addKV("CLIENT_ID",outboundOrderDTO.getFACTORY());
csp.addKV("WAREHOUSE_ID",outboundOrderDTO.getFACTORY());
csp.addKV("WAREHOUSE_ID", CommonUtils.getWarehouse(outboundOrderDTO.getFACTORY()));
csp.addKV("CLIENT_ID", CommonUtils.getClient(outboundOrderDTO.getFACTORY()));
this.jdbcRepository.insertBusinessObject(csp);
BaseBpo baseBpo = new BaseBpo();
......@@ -128,8 +128,8 @@ public class WMSService {
baseBpo.addKV("SKUID",outboundOrderPosition.getSKUID());
baseBpo.addKV("SHIPMENTID",outboundOrderPosition.getSHIPMENTID());
baseBpo.addKV("SHIPMENTPOSITION_ID", cspId);
baseBpo.addKV("WAREHOUSE_ID",outboundOrderDTO.getFACTORY());
baseBpo.addKV("SECTION_ID",outboundOrderDTO.getSECTION());
baseBpo.addKV("WAREHOUSE_ID", CommonUtils.getWarehouse(outboundOrderDTO.getFACTORY()));
baseBpo.addKV("CLIENT_ID", CommonUtils.getClient(outboundOrderDTO.getFACTORY()));
this.jdbcRepository.insertBusinessObject(baseBpo);
}
......@@ -137,8 +137,8 @@ public class WMSService {
baseBpo.setTable(Sql_Table.WMS_OUTBOUND_ORDER);
baseBpo.setIdName("ORDERID");
baseBpo.addKV("TIMES",outboundOrderDTO.getTIMES());
baseBpo.addKV("WAREHOUSE_ID",outboundOrderDTO.getFACTORY());
baseBpo.addKV("SECTION_ID",outboundOrderDTO.getSECTION());
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(outboundOrderDTO.getFACTORY()));
baseBpo.addKV("SECTION_ID",CommonUtils.getSection(outboundOrderDTO.getSECTION()));
baseBpo.addKV("ORDERID",outboundOrderDTO.getORDERID());
this.jdbcRepository.insertBusinessObject(baseBpo);
}
......@@ -163,7 +163,7 @@ public class WMSService {
`VERSION` int(11) NOT NULL,*/
@Value("${xnr.stationId}")
public static String stationId = "6db9c7c0-4f93-4fa1-82c0-fb6435af7aae";
public static String stationId = "3ba41fe1-6b95-4849-8e50-31995ade08b0";
/*保存到商品信息表*/
@Value("${xnr.item_group}")
......@@ -186,7 +186,8 @@ public class WMSService {
baseBpo.addKV("MULTIPLE_PART",Boolean.FALSE).addKV("MULTIPLE_PART_AMOUNT",0).addKV("MEASURED",Boolean.TRUE);
baseBpo.addKV("PREFER_OWNBOX",Boolean.FALSE).addKV("PREFER_BAG",Boolean.FALSE).addKV("USE_BUBBLEFILM",Boolean.FALSE);
baseBpo.addKV("ITEMGROUP_ID",ITEM_GROUP).addKV("HANDLINGUNIT_ID",HANDLING_UNIT_ID).addKV("VERSION",itemDTO.getSTATUS());
baseBpo.addKV("CLIENT_ID",itemDTO.getFACTORY()).addKV("WAREHOUSE_ID",itemDTO.getFACTORY());
baseBpo.addKV("CLIENT_ID",CommonUtils.getClient(itemDTO.getFACTORY()))
.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(itemDTO.getFACTORY()));
baseBpo.addKV("SAFETY_STOCK",0);
//增加工厂和仓库 一个工厂多个仓库 一个工厂我们认为是CLIENT_ID户主 一个WAREHOUSE_ID是一个仓库
BaseBpo baseBpo2 = new BaseBpo();
......@@ -204,7 +205,8 @@ public class WMSService {
baseBpo.addKV("MULTIPLE_PART",Boolean.FALSE).addKV("MULTIPLE_PART_AMOUNT",0).addKV("MEASURED",Boolean.TRUE);
baseBpo.addKV("PREFER_OWNBOX",Boolean.FALSE).addKV("PREFER_BAG",Boolean.FALSE).addKV("USE_BUBBLEFILM",Boolean.FALSE);
baseBpo.addKV("ITEMGROUP_ID",ITEM_GROUP).addKV("HANDLINGUNIT_ID",HANDLING_UNIT_ID).addKV("VERSION",itemDTO.getSTATUS());
baseBpo.addKV("CLIENT_ID",itemDTO.getFACTORY()).addKV("WAREHOUSE_ID",itemDTO.getFACTORY());
baseBpo.addKV("CLIENT_ID",CommonUtils.getClient(itemDTO.getFACTORY()))
.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(itemDTO.getFACTORY()));
baseBpo.setIdName("ID");
baseBpo.setTable(Sql_Table.TABLE_MD_ITEMDATA);
baseBpo.setId(itemDTO.getSKUID());
......@@ -222,8 +224,8 @@ public class WMSService {
order.addKV("TASKID", orderId);
//order.addKV("CREATED_DATE",new Date(System.currentTimeMillis()));
//order.addKV("FACTORY",CommonUtils.parseString("FACTORY",data));
order.addKV("WAREHOUSE_ID",CommonUtils.parseString("FACTORY",data));
order.addKV("SECTION_ID",CommonUtils.parseString("SECTION",data));
order.addKV("SECTION_ID",CommonUtils.getClient(CommonUtils.parseString("SECTION",data)))
.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(CommonUtils.parseString("FACTORY",data)));
order.addKV("STATE",Sql_Table.AVAILABLE);
order.addKV("NEED_RESP", 0);
CommonUtils.genUselessInfo(order.getKv());
......@@ -251,8 +253,8 @@ public class WMSService {
//增加几条字段
//baseBpo.addKV("STATE",Sql_Table.NEW);
baseBpo.addKV("AMOUNT", 0);//创建时当前库存都是0
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.parseString("FACTORY",data));
baseBpo.addKV("SECTION_ID",CommonUtils.parseString("SECTION",data));
baseBpo.addKV("SECTION_ID",CommonUtils.getClient(CommonUtils.parseString("SECTION",data)))
.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(CommonUtils.parseString("FACTORY",data)));
baseBpo.addKV("STATE",Sql_Table.AVAILABLE);
this.jdbcRepository.insertBusinessObject(baseBpo);
}
......@@ -295,8 +297,8 @@ public class WMSService {
//增加几条字段
baseBpo.addKV("STATE",Sql_Table.AVAILABLE);
baseBpo.addKV("AMOUNT", 0);//创建时当前库存都是0
baseBpo.addKV("WAREHOUSE_ID",CommonUtils.parseString("FACTORY",data));
baseBpo.addKV("SECTION_ID",CommonUtils.parseString("SECTION",data));
baseBpo.addKV("SECTION_ID",CommonUtils.getClient(CommonUtils.parseString("SECTION",data)))
.addKV("WAREHOUSE_ID",CommonUtils.getWarehouse(CommonUtils.parseString("FACTORY",data)));
this.jdbcRepository.insertBusinessObject(baseBpo);
}
......
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