fix 组盘
This commit is contained in:
@@ -220,12 +220,12 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
//检测站点smart200
|
||||
if (device.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
|
||||
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) device.getDeviceDriver();
|
||||
log.info("flag:"+standardInspectSiteSmartDeviceDriver.getFlag());
|
||||
log.info("time:"+standardInspectSiteSmartDeviceDriver.getTime());
|
||||
log.info("Product_code:"+standardInspectSiteSmartDeviceDriver.getProduct_code());
|
||||
log.info("Product_specifications:"+standardInspectSiteSmartDeviceDriver.getProduct_specifications());
|
||||
log.info("Weight:"+standardInspectSiteSmartDeviceDriver.getWeight());
|
||||
if("1".equals(standardInspectSiteSmartDeviceDriver.getFlag())) {
|
||||
log.info("flag:" + standardInspectSiteSmartDeviceDriver.getFlag());
|
||||
log.info("time:" + standardInspectSiteSmartDeviceDriver.getTime());
|
||||
log.info("Product_code:" + standardInspectSiteSmartDeviceDriver.getProduct_code());
|
||||
log.info("Product_specifications:" + standardInspectSiteSmartDeviceDriver.getProduct_specifications());
|
||||
log.info("Weight:" + standardInspectSiteSmartDeviceDriver.getWeight());
|
||||
if (1 == standardInspectSiteSmartDeviceDriver.getFlag()) {
|
||||
inst.setExecute_status("1");
|
||||
instructionService.update(inst);
|
||||
data = AgvService.sendAgvOneModeInst(phase, index, 0);
|
||||
|
||||
@@ -413,15 +413,33 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
} else if (StrUtil.equals(type, "9")) {
|
||||
//todo
|
||||
String device_code=whereJson.getString("device_code");
|
||||
JSONObject param = new JSONObject();
|
||||
JSONObject jsonIvt = ivtTab.query("struct_code = '" + device_code + "'").uniqueResult(0);
|
||||
jsonIvt.put("weight",whereJson.getString("weight"));
|
||||
jsonIvt.put("product_code",whereJson.getString("product_code"));
|
||||
jsonIvt.put("batch_code",whereJson.getString("batch_code"));
|
||||
jsonIvt.put("product_specifications",whereJson.getString("product_specifications"));
|
||||
jsonIvt.put("time",whereJson.getString("time"));
|
||||
ivtTab.update(jsonIvt);
|
||||
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);
|
||||
if (ObjectUtil.isNotEmpty(jsonIvt)) {
|
||||
jsonIvt.put("quality_scode", "00");
|
||||
jsonIvt.put("weight", whereJson.getString("weight"));
|
||||
jsonIvt.put("product_code", whereJson.getString("product_code"));
|
||||
jsonIvt.put("batch_code", whereJson.getString("batch_code"));
|
||||
jsonIvt.put("product_specifications", whereJson.getString("product_specifications"));
|
||||
jsonIvt.put("time", whereJson.getString("time"));
|
||||
ivtTab.update(jsonIvt);
|
||||
} else {
|
||||
jsonIvt = new JSONObject();
|
||||
jsonIvt.put("stockrecord_id", IdUtil.getSnowflake(1L, 1L).nextId());
|
||||
jsonIvt.put("struct_id", point.getString("point_id"));
|
||||
jsonIvt.put("struct_code", point.getString("point_code"));
|
||||
jsonIvt.put("struct_name", point.getString("point_name"));
|
||||
jsonIvt.put("region_id", point.getString("region_id"));
|
||||
jsonIvt.put("quality_scode", "00");
|
||||
jsonIvt.put("weight", whereJson.getString("weight"));
|
||||
jsonIvt.put("product_code", whereJson.getString("product_code"));
|
||||
jsonIvt.put("batch_code", whereJson.getString("batch_code"));
|
||||
jsonIvt.put("product_specifications", whereJson.getString("product_specifications"));
|
||||
jsonIvt.put("time", whereJson.getString("time"));
|
||||
ivtTab.insert(jsonIvt);
|
||||
}
|
||||
|
||||
resuft.put("status", "200");
|
||||
resuft.put("message", "");
|
||||
}
|
||||
|
||||
@@ -76,36 +76,8 @@ public class SendMaterialTask extends AbstractAcsTask {
|
||||
jsonTask.put("taskfinish_mode", taskObj.getString("taskfinish_mode"));
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
jsonTask.put("remark", "任务执行完成");
|
||||
///审核单据 增加库存 改变出入库表的状态
|
||||
// WQLObject mstTab = WQLObject.getWQLObject("ST_IVT_regionIO");
|
||||
// JSONObject mstObj = mstTab.query("task_id='" + task_id + "' and is_delete='0'").uniqueResult(0);
|
||||
//审核 加库存可和用数量
|
||||
// StoreIvtServiceImpl ivtService = new StoreIvtServiceImpl();
|
||||
// mstObj.put("bill_status", "50");
|
||||
// mstObj.put("confirm_optid", SecurityUtils.getCurrentUserId());
|
||||
// mstObj.put("confirm_optname", SecurityUtils.getNickName());
|
||||
// mstObj.put("confirm_time", DateUtil.now());
|
||||
// mstTab.update(mstObj);
|
||||
|
||||
// String iostorinv_id = mstObj.getString("iostorinv_id");
|
||||
// String bill_code = mstObj.getString("bill_code");
|
||||
// String bill_type_scode = mstObj.getString("bill_type");
|
||||
String next_point_code = jsonTask.getString("next_point_code");
|
||||
String start_point_code = jsonTask.getString("start_point_code");
|
||||
// JSONObject param = new JSONObject();
|
||||
// param.put("material_id", mstObj.getString("material_id"));
|
||||
// param.put("bill_code", bill_code);
|
||||
// param.put("bill_type_scode", bill_type_scode);
|
||||
// param.put("bill_id", iostorinv_id);
|
||||
// param.put("qty_unit_id", mstObj.getString("qty_unit_id"));
|
||||
// param.put("pcsn", mstObj.getString("pcsn"));
|
||||
// param.put("change_qty", mstObj.getString("qty"));
|
||||
// param.put("vehicle_code", mstObj.getString("vehicle_code"));
|
||||
// param.put("region_id", mstObj.getString("start_region_id"));
|
||||
// param.put("is_full", mstObj.getString("is_full"));
|
||||
// param.put("stewing_time", mstObj.getString("stewing_time"));
|
||||
// param.put("producetask_id", mstObj.getString("producetask_id"));
|
||||
// param.put("io_type", mstObj.getString("io_type"));
|
||||
|
||||
PointServiceImpl pointService = SpringContextHolder.getBean(PointServiceImpl.class);
|
||||
PointDto nextPointDto = pointService.findByCode(next_point_code);
|
||||
@@ -117,13 +89,9 @@ public class SendMaterialTask extends AbstractAcsTask {
|
||||
throw new BadRequestException("未找到可用点位:" + start_point_code);
|
||||
}
|
||||
|
||||
// 如果起点是仓位(待检区),则需要删除库存
|
||||
if (StrUtil.equals(startPointDto.getPoint_type(), "01")) {
|
||||
WQLObject.getWQLObject("st_ivt_structivt").delete("struct_id = " + startPointDto.getPoint_id());
|
||||
}
|
||||
|
||||
// 如果终点为仓位(待检区),则需要添加库存
|
||||
if (StrUtil.equals(nextPointDto.getPoint_type(), "01")) {
|
||||
JSONObject ivt = WQLObject.getWQLObject("st_ivt_structivt").query("struct_id = " + startPointDto.getPoint_id()).uniqueResult(0);
|
||||
JSONObject struct = new JSONObject();
|
||||
struct.put("stockrecord_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
struct.put("struct_id", nextPointDto.getPoint_id());
|
||||
@@ -131,10 +99,20 @@ public class SendMaterialTask extends AbstractAcsTask {
|
||||
struct.put("struct_name", nextPointDto.getPoint_name());
|
||||
struct.put("region_id", startPointDto.getRegion_id());
|
||||
struct.put("quality_scode", "00");// 待检品
|
||||
struct.put("weight", ivt.getString("weight"));
|
||||
struct.put("product_code", ivt.getString("product_code"));
|
||||
struct.put("batch_code", ivt.getString("batch_code"));
|
||||
struct.put("product_specifications", ivt.getString("product_specifications"));
|
||||
struct.put("time", ivt.getString("time"));
|
||||
struct.put("instorage_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("st_ivt_structivt").insert(struct);
|
||||
}
|
||||
|
||||
// 如果起点是仓位(待检区),则需要删除库存
|
||||
if (StrUtil.equals(startPointDto.getPoint_type(), "01")) {
|
||||
WQLObject.getWQLObject("st_ivt_structivt").delete("struct_id = " + startPointDto.getPoint_id());
|
||||
}
|
||||
|
||||
// param.put("struct_id", nextPointDto.getPoint_id());
|
||||
// ivtService.addIvtFlow(param, IvtChangeTypeEnum.ADD_IVT_AND_CAN_USE);
|
||||
// 将起点的点位状态写给终点
|
||||
|
||||
Reference in New Issue
Block a user