Browse Source

fix组盘信息未同步及点位数据未移动

master
psh 1 year ago
parent
commit
918dd2175d
  1. 8
      acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java
  2. BIN
      lms/hd/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/stivt.xls
  3. 39
      lms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

8
acs/hd/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

@ -266,6 +266,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
//如果是混料区则上送LMS当前点位的字段,同步到st_ivt_structivt仓位库存表
JSONObject jsonObject = new JSONObject();
jsonObject.put("device_code", device_code);
jsonObject.put("point_code", device_code);
jsonObject.put("weight", standardInspectSiteSmartDeviceDriver.getWeight());
jsonObject.put("product_code", standardInspectSiteSmartDeviceDriver.getProduct_code());
jsonObject.put("batch_code", standardInspectSiteSmartDeviceDriver.getBatch_code());
@ -398,6 +399,13 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
//(无车id及状态)
else if (phase == 0x0A) {
if (!ObjectUtil.isEmpty(inst)) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("point_code", inst.getStart_device_code());
jsonObject.put("device_code", inst.getStart_device_code());
jsonObject.put("start_code", inst.getStart_device_code());
jsonObject.put("next_code", inst.getNext_device_code());
jsonObject.put("type", "10");
acsToWmsService.lnshApplyTaskToWms(jsonObject);
inst.setInstruction_status("2");
instructionService.finish(inst);
}

BIN
lms/hd/nladmin-system/src/main/java/org/nl/wms/basedata/st/wql/stivt.xls

Binary file not shown.

39
lms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -154,6 +154,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
WQLObject regionTab = WQLObject.getWQLObject("ST_IVT_regionIO"); // 区域出入库表
WQLObject veQtyTab = WQLObject.getWQLObject("PDM_BI_vehicleQty"); // 托盘对应数量表
WQLObject ivtTab = WQLObject.getWQLObject("st_ivt_structivt"); // 仓位库存表
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位基础表
/*
@ -412,7 +413,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
throw new BadRequestException(jsonObject.getString("message"));
}
} else if (StrUtil.equals(type, "9")) {
//todo
String device_code = whereJson.getString("device_code");
JSONObject point = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + device_code + "'").uniqueResult(0);
JSONObject jsonIvt = ivtTab.query("struct_id = " + point.getString("point_id")).uniqueResult(0);
@ -440,6 +440,43 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
ivtTab.insert(jsonIvt);
}
resuft.put("status", "200");
resuft.put("message", "");
} else if (StrUtil.equals(type, "10")) {
String start_code = whereJson.getString("start_code");
String next_code = whereJson.getString("next_code");
JSONObject start_point = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + start_code + "'").uniqueResult(0);
JSONObject next_point = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + next_code + "'").uniqueResult(0);
JSONObject start_jsonIvt = ivtTab.query("struct_id = " + start_point.getString("point_id")).uniqueResult(0);
JSONObject next_jsonIvt = ivtTab.query("struct_id = " + next_point.getString("point_id")).uniqueResult(0);
start_point.put("point_status","00");
pointTab.update(start_point);
if(next_code.startsWith("DJ")||next_code.startsWith("BHG")||next_code.startsWith("TL")){
next_point.put("point_status", "02");
}else {
next_point.put("point_status", "01");
}
pointTab.update(next_point);
if(next_code.startsWith("DJ")||next_code.startsWith("BHG")||next_code.startsWith("TL")) {
next_jsonIvt.put("weight", start_jsonIvt.getString("weight"));
next_jsonIvt.put("product_code", start_jsonIvt.getString("product_code"));
next_jsonIvt.put("batch_code", start_jsonIvt.getString("batch_code"));
next_jsonIvt.put("product_specifications", start_jsonIvt.getString("product_specifications"));
next_jsonIvt.put("time", start_jsonIvt.getString("time"));
}else{
next_jsonIvt.put("weight","");
next_jsonIvt.put("product_code","");
next_jsonIvt.put("batch_code","");
next_jsonIvt.put("product_specifications","");
next_jsonIvt.put("time","");
}
ivtTab.update(next_jsonIvt);
start_jsonIvt.put("weight","");
start_jsonIvt.put("product_code","");
start_jsonIvt.put("batch_code","");
start_jsonIvt.put("product_specifications","");
start_jsonIvt.put("time","");
ivtTab.update(start_jsonIvt);
resuft.put("status", "200");
resuft.put("message", "");
}

Loading…
Cancel
Save