Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -199,7 +199,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
boolean auto_div = false;
|
||||
if (ObjectUtil.isEmpty(vehicle_code)) throw new BadRequestException("ACS申请任务失败!载具不能为空");
|
||||
//通过该木箱码查询对应的分配明细
|
||||
JSONArray dis_rows = WQLObject.getWQLObject("st_ivt_iostorinvdis").query("work_status = '00' AND box_no = '" + vehicle_code + "'").getResultJSONArray(0);
|
||||
JSONArray dis_rows = WQLObject.getWQLObject("st_ivt_iostorinvdis").query("work_status = '00' AND box_no = '" + vehicle_code + "' AND IFNULL(task_id,'') = ''").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(dis_rows)) {
|
||||
throw new BadRequestException("未查询到木箱:" + vehicle_code + "相关入库分配明细记录!");
|
||||
}
|
||||
|
||||
@@ -171,6 +171,18 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
throw new BadRequestException("未查询到可用的空点位!");
|
||||
}
|
||||
|
||||
/*//如果为左边点位判断右边是否存在未完成的任务,如果有则提示不能下发
|
||||
//判断输送出来的任务起点是否靠近分切机,如果靠近分切机且远离分切机的点位上存在载具且不存在任务进行载具横移
|
||||
char dtl_type = empty_point.getString("point_code").charAt(empty_point.getString("point_code").length() - 1);
|
||||
if (Integer.valueOf(String.valueOf(dtl_type)) % 2 != 0) {
|
||||
JSONObject right_point = WQLObject.getWQLObject("st_ivt_deliverypointivt").query("point_location = '"+empty_point.getString("point_location")+"' AND product_area = '"+empty_point.getString("product_area")+"' AND sort_seq = '"+empty_point.getString("sort_seq")+"' order by point_code desc").uniqueResult(0);
|
||||
//判断是否存在任务
|
||||
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("point_code1 = '"+right_point.getString("point_code")+"' OR point_code2 = '"+right_point.getString("point_code")+"' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(task_jo)){
|
||||
throw new BadRequestException("当前一截输送线存在未完成的任务,请稍等几分钟后进行下发!");
|
||||
}
|
||||
}*/
|
||||
|
||||
//下发输送线任务
|
||||
JSONObject form = new JSONObject();
|
||||
JSONObject ss_jo = WQLObject.getWQLObject("sch_base_point").query("product_area = '" + plan_jo.getString("product_area") + "' AND point_type = '6'").uniqueResult(0);
|
||||
@@ -220,7 +232,8 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
}
|
||||
|
||||
//根据起点判断区域查询对应的输送线空点位
|
||||
JSONObject point_jo = WQL.getWO("PDA_02").addParam("flag", "4").addParam("product_area", vehicle_area.getString("product_area")).addParam("point_location", vehicle_area.getString("point_location")).process().uniqueResult(0);
|
||||
JSONObject point_jo = WQL.getWO("PDA_02").addParam("flag", "4").addParam("product_area", vehicle_area.getString("product_area"))
|
||||
.addParam("point_location", vehicle_area.getString("point_location")).process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_jo)) {
|
||||
throw new BadRequestException("对应输送线不存在可用的空位!");
|
||||
}
|
||||
|
||||
@@ -135,15 +135,10 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
String iostorinv_id = "";
|
||||
|
||||
//查询该木箱是否存在未完成的入库单
|
||||
JSONObject box_mst_jo = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl").query("box_no = '" + box_no + "' AND bill_status <'99'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(box_mst_jo)){
|
||||
JSONObject box_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv").query("iostorinv_id = '"+box_mst_jo.getString("iostorinv_id")+"' AND is_delete = '0' AND bill_status < '99'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(box_mst)){
|
||||
iostorinv_id = box_mst_jo.getString("iostorinv_id");
|
||||
}else {
|
||||
iostorinv_id = rawAssistIStorService.insertDtl(mst_jo);
|
||||
}
|
||||
}else {
|
||||
JSONObject box_mst_jo = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "26").addParam("box_no", box_no).process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(box_mst_jo)) {
|
||||
iostorinv_id = box_mst_jo.getString("iostorinv_id");
|
||||
} else {
|
||||
iostorinv_id = rawAssistIStorService.insertDtl(mst_jo);
|
||||
}
|
||||
|
||||
@@ -154,20 +149,20 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
String box_length = sub_jo.getString("box_length");
|
||||
String box_width = sub_jo.getString("box_width");
|
||||
String box_high = sub_jo.getString("box_high");
|
||||
if (StrUtil.isEmpty(box_length) || StrUtil.isEmpty(box_width) || StrUtil.isEmpty(box_high)){
|
||||
if (StrUtil.isEmpty(box_length) || StrUtil.isEmpty(box_width) || StrUtil.isEmpty(box_high)) {
|
||||
throw new BadRequestException("该木箱没有长宽高信息,无法入库,请到子卷包装关系中维护!");
|
||||
}
|
||||
JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '"+point_code+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_jo)){
|
||||
JSONObject point_jo = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_jo)) {
|
||||
throw new BadRequestException("未查询到对应的点位!");
|
||||
}else {
|
||||
if (point_jo.getString("is_used").equals("0")){
|
||||
} else {
|
||||
if (point_jo.getString("is_used").equals("0")) {
|
||||
throw new BadRequestException("该点位已经被禁用!");
|
||||
}
|
||||
if (point_jo.getString("is_delete").equals("1")){
|
||||
if (point_jo.getString("is_delete").equals("1")) {
|
||||
throw new BadRequestException("该点位已经被删除!");
|
||||
}
|
||||
if (!point_jo.getString("region_code").equals("NBJ01")){
|
||||
if (!point_jo.getString("region_code").equals("NBJ01")) {
|
||||
throw new BadRequestException("请扫描内包间入库点位!");
|
||||
}
|
||||
}
|
||||
@@ -186,7 +181,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
|
||||
String task_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
//直接分配虚拟区货位,并确认
|
||||
JSONObject struct = WQL.getWO("PDA_ST_01").addParam("flag", "3").addParam("stor_id",stor.getString("stor_id")).process().uniqueResult(0);
|
||||
JSONObject struct = WQL.getWO("PDA_ST_01").addParam("flag", "3").addParam("stor_id", stor.getString("stor_id")).process().uniqueResult(0);
|
||||
|
||||
HashMap<String, String> dis_map = new HashMap();
|
||||
dis_map.put("sect_id", struct.getString("sect_id"));
|
||||
@@ -199,7 +194,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
dis_map.put("task_id", task_id);
|
||||
|
||||
//更新该木箱明细对应的分配
|
||||
WQLObject.getWQLObject("ST_IVT_IOStorInvDis").update(dis_map, "iostorinv_id = '" + iostorinv_id + "' AND box_no = '"+box_no+"'");
|
||||
WQLObject.getWQLObject("ST_IVT_IOStorInvDis").update(dis_map, "iostorinv_id = '" + iostorinv_id + "' AND box_no = '" + box_no + "'");
|
||||
|
||||
//修改库存
|
||||
//直接取出入库分配表的库存
|
||||
|
||||
@@ -697,6 +697,7 @@
|
||||
AND work_status < '99'
|
||||
AND mst.is_delete = '0'
|
||||
AND mst.bill_status < '99'
|
||||
AND IFNULL(struct_code,'') <> ''
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -911,10 +912,24 @@
|
||||
)
|
||||
|
||||
ORDER BY po.out_order_seq
|
||||
|
||||
ENDSELECT
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "26"
|
||||
QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
st_ivt_iostorinvdtl dtl
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
WHERE
|
||||
box_no = 输入.box_no
|
||||
AND dtl.bill_status < '99'
|
||||
AND mst.is_delete = '0'
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class HandMoveStorAcsTask extends AbstractAcsTask {
|
||||
if(task==null){
|
||||
throw new BadRequestException("查询不到操作的任务记录!");
|
||||
}
|
||||
if(TaskStatusEnum.EXECUTING.equals(status)){
|
||||
if(TaskStatusEnum.EXECUTING.getCode().equals(status)){
|
||||
map.put("work_status","02");
|
||||
wo_dtl.update(map,"task_id='"+task_id+"'");
|
||||
map.put("task_status","03");
|
||||
@@ -94,7 +94,7 @@ public class HandMoveStorAcsTask extends AbstractAcsTask {
|
||||
map.put("update_optname",nickName);
|
||||
map.put("update_time",now);
|
||||
wo_Task.update(map,"task_id='"+task_id+"'");
|
||||
}else if(TaskStatusEnum.FINISHED.equals(status)){
|
||||
}else if(TaskStatusEnum.FINISHED.getCode().equals(status)){
|
||||
HandMoveStorServiceImpl handMoveStorServiceImpl = SpringContextHolder.getBean(HandMoveStorServiceImpl.class);
|
||||
handMoveStorServiceImpl.finishTask(task);
|
||||
}else if("0".equals(status)){
|
||||
|
||||
@@ -258,11 +258,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
// rows.clear();
|
||||
// 遍历
|
||||
for (String box_no : boxSet) {
|
||||
JSONArray jsonArr = WQL.getWO("QST_IVT_CHECKOUTBILL").addParam("flag", "7").addParam("box_no", box_no).process().getResultJSONArray(0);
|
||||
for (int i = 0; i < jsonArr.size(); i++) {
|
||||
JSONObject jsonObject = jsonArr.getJSONObject(i);
|
||||
rows.add(jsonObject);
|
||||
}
|
||||
JSONObject jsonObject = WQL.getWO("QST_IVT_CHECKOUTBILL").addParam("flag", "7").addParam("box_no", box_no).process().uniqueResult(0);
|
||||
rows.add(jsonObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,10 +342,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
String pcsn = row.getString("pcsn");
|
||||
String box_no = row.getString("box_no");
|
||||
//查询该箱子所在货位
|
||||
JSONObject struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '"+box_no+"'").uniqueResult(0);
|
||||
String struct_code = struct_jo.getString("struct_code");
|
||||
JSONObject struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + box_no + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) {
|
||||
JSONObject json = ivtTab.query("pcsn = '" + pcsn + "' AND struct_code = '"+struct_code+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(struct_jo)) {
|
||||
throw new BadRequestException("未查询到该批次所在货位!");
|
||||
}
|
||||
String struct_code = struct_jo.getString("struct_code");
|
||||
JSONObject json = ivtTab.query("pcsn = '" + pcsn + "' AND struct_code = '" + struct_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(json)) continue;
|
||||
|
||||
JSONObject jsonMap = new JSONObject();
|
||||
@@ -481,8 +481,15 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
|
||||
// 判断此明细子卷是否存在,存在则将此木箱下的子卷全部生成明细
|
||||
String pcsn = row.getString("pcsn");
|
||||
String box_no = row.getString("box_no");
|
||||
//查询该箱子所在货位
|
||||
JSONObject struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + box_no + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) {
|
||||
JSONObject json = ivtTab.query("pcsn = '" + pcsn + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(struct_jo)) {
|
||||
throw new BadRequestException("未查询到该批次所在货位!");
|
||||
}
|
||||
String struct_code = struct_jo.getString("struct_code");
|
||||
JSONObject json = ivtTab.query("pcsn = '" + pcsn + "' AND struct_code = '" + struct_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(json)) continue;
|
||||
|
||||
JSONObject jsonMap = new JSONObject();
|
||||
@@ -699,8 +706,15 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
|
||||
// 判断此明细子卷是否存在,存在则将此木箱下的子卷全部生成明细
|
||||
String pcsn = row.getString("pcsn");
|
||||
String box_no = row.getString("box_no");
|
||||
//查询该箱子所在货位
|
||||
JSONObject struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + box_no + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) {
|
||||
JSONObject json = ivtTab.query("pcsn = '" + pcsn + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(struct_jo)) {
|
||||
throw new BadRequestException("未查询到该批次所在货位!");
|
||||
}
|
||||
String struct_code = struct_jo.getString("struct_code");
|
||||
JSONObject json = ivtTab.query("pcsn = '" + pcsn + "' AND struct_code = '" + struct_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(json)) continue;
|
||||
|
||||
JSONObject jsonMap = new JSONObject();
|
||||
@@ -2847,7 +2861,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (ObjectUtil.isEmpty(jsonTaskLast1)) {
|
||||
jsonTask.put("sort_seq", 1);
|
||||
} else {
|
||||
jsonTask.put("sort_seq", jsonTaskLast1.getIntValue("sort_seq")+1);
|
||||
jsonTask.put("sort_seq", jsonTaskLast1.getIntValue("sort_seq") + 1);
|
||||
}
|
||||
wo_Task.update(jsonTask);
|
||||
|
||||
@@ -3251,7 +3265,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (ObjectUtil.isEmpty(jsonTaskLast1)) {
|
||||
jsonTask.put("sort_seq", 1);
|
||||
} else {
|
||||
jsonTask.put("sort_seq", jsonTaskLast1.getIntValue("sort_seq")+1);
|
||||
jsonTask.put("sort_seq", jsonTaskLast1.getIntValue("sort_seq") + 1);
|
||||
}
|
||||
wo_Task.update(jsonTask);
|
||||
|
||||
@@ -3395,7 +3409,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
param2.put("point_code1", json.getString("struct_code"));
|
||||
param2.put("point_code2", jsonMove.getString("struct_code"));
|
||||
param2.put("task_group_id", whereJson.getLongValue("task_group_id")); // 任务组
|
||||
param2.put("sort_seq", i+1); // 任务组顺序号
|
||||
param2.put("sort_seq", i + 1); // 任务组顺序号
|
||||
String move_task_id = outTask.createTask(param2);
|
||||
|
||||
// 回显移库明细任务id
|
||||
@@ -3911,7 +3925,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
//查询对应明细
|
||||
JSONObject dtl_jo = WQLObject.getWQLObject("st_ivt_iostorinvdtl").query("iostorinvdtl_id = '" + dis.getString("iostorinvdtl_id") + "'").uniqueResult(0);
|
||||
// 更新子卷包装关系表 状态 - 3
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + dis.getString("pcsn") + "' and package_box_sn = '"+dis.getString("box_no")+"' and status = '2'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + dis.getString("pcsn") + "' and package_box_sn = '" + dis.getString("box_no") + "' and status = '2'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonSub)) throw new BadRequestException("此子卷不存在或不为入库状态:" + dis.getString("pcsn"));
|
||||
// 如果是拆分入库则将包装关系改为生成状态
|
||||
if (jo_mst.getString("bill_type").equals("1005") || (jo_mst.getString("bill_type").equals("1009") && StrUtil.isEmpty(dtl_jo.getString("source_bill_code")))) {
|
||||
|
||||
@@ -127,23 +127,23 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
|
||||
// 拆分入库:回传mes
|
||||
if (StrUtil.equals(bill_type, "0005")) {
|
||||
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
|
||||
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
JSONObject json = disArr.getJSONObject(j);
|
||||
param.put("PackageBoxSN", json.getString("box_no"));
|
||||
|
||||
JSONObject jsonParamDtl = new JSONObject();
|
||||
jsonParamDtl.put("ContainerName", json.getString("pcsn"));
|
||||
|
||||
details.add(jsonParamDtl);
|
||||
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
|
||||
for (int k = 0; k < container_jo.size(); k++) {
|
||||
JSONObject dis_jo = container_jo.getJSONObject(k);
|
||||
JSONObject jsonParamDtl = new JSONObject();
|
||||
jsonParamDtl.put("ContainerName", dis_jo.getString("pcsn"));
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsPackage(param);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsPackage(param);
|
||||
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());
|
||||
@@ -153,23 +153,23 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
|
||||
// 拆分出库:回传mes
|
||||
if (StrUtil.equals(bill_type, "1005")) {
|
||||
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
|
||||
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
JSONObject json = disArr.getJSONObject(j);
|
||||
param.put("PackageBoxSN", json.getString("box_no"));
|
||||
|
||||
JSONObject jsonParamDtl = new JSONObject();
|
||||
jsonParamDtl.put("ContainerName", json.getString("pcsn"));
|
||||
|
||||
details.add(jsonParamDtl);
|
||||
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
|
||||
for (int k = 0; k < container_jo.size(); k++) {
|
||||
JSONObject dis_jo = container_jo.getJSONObject(k);
|
||||
JSONObject jsonParamDtl = new JSONObject();
|
||||
jsonParamDtl.put("ContainerName", dis_jo.getString("pcsn"));
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());
|
||||
@@ -340,7 +340,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
@@ -413,7 +413,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
@@ -439,7 +439,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("回传sap失败:"+e.getMessage());
|
||||
throw new BadRequestException("回传sap失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -482,7 +482,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
@@ -549,7 +549,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", lgort); // 库存地点:库区外部标识
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json.getString("pcsn") + "' AND package_box_sn = '"+json.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||
String sale_order_name = jsonSub.getString("sale_order_name");
|
||||
|
||||
@@ -619,7 +619,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
@@ -645,7 +645,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("回传sap失败:"+e.getMessage());
|
||||
throw new BadRequestException("回传sap失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -753,7 +753,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
@@ -787,23 +787,23 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
|
||||
// 拆分入库:回传mes
|
||||
if (StrUtil.equals(bill_type, "0005")) {
|
||||
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
|
||||
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
JSONObject json = disArr.getJSONObject(j);
|
||||
param.put("PackageBoxSN", json.getString("box_no"));
|
||||
|
||||
JSONObject jsonParamDtl = new JSONObject();
|
||||
jsonParamDtl.put("ContainerName", json.getString("pcsn"));
|
||||
|
||||
details.add(jsonParamDtl);
|
||||
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
|
||||
for (int k = 0; k < container_jo.size(); k++) {
|
||||
JSONObject dis_jo = container_jo.getJSONObject(k);
|
||||
JSONObject jsonParamDtl = new JSONObject();
|
||||
jsonParamDtl.put("ContainerName", dis_jo.getString("pcsn"));
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsPackage(param);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsPackage(param);
|
||||
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());
|
||||
@@ -851,7 +851,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
@@ -877,7 +877,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("回传sap失败:"+e.getMessage());
|
||||
throw new BadRequestException("回传sap失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -885,23 +885,23 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
|
||||
// 拆分出库:回传mes
|
||||
if (StrUtil.equals(bill_type, "1005")) {
|
||||
JSONArray disArr = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
|
||||
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag","2").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
JSONObject json = disArr.getJSONObject(j);
|
||||
param.put("PackageBoxSN", json.getString("box_no"));
|
||||
|
||||
JSONObject jsonParamDtl = new JSONObject();
|
||||
jsonParamDtl.put("ContainerName", json.getString("pcsn"));
|
||||
|
||||
details.add(jsonParamDtl);
|
||||
JSONArray container_jo = wo_dis.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "' AND box_no = '"+json.getString("box_no")+"'").getResultJSONArray(0);
|
||||
for (int k = 0; k < container_jo.size(); k++) {
|
||||
JSONObject dis_jo = container_jo.getJSONObject(k);
|
||||
JSONObject jsonParamDtl = new JSONObject();
|
||||
jsonParamDtl.put("ContainerName", dis_jo.getString("pcsn"));
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());
|
||||
@@ -946,7 +946,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", lgort); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||
}
|
||||
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "' AND package_box_sn = '"+json2.getString("box_no")+"'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSub)) {
|
||||
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||
}
|
||||
@@ -1169,7 +1169,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("回传sap失败:"+e.getMessage());
|
||||
throw new BadRequestException("回传sap失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user