|
|
@ -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);
|
|
|
|
// 将起点的点位状态写给终点
|
|
|
|