rev:出库口自动分配
This commit is contained in:
@@ -94,6 +94,9 @@ public enum IOSEnum {
|
|||||||
// 区域
|
// 区域
|
||||||
PRODUCT_AREA(MapOf.of("BLK", "BLK")),
|
PRODUCT_AREA(MapOf.of("BLK", "BLK")),
|
||||||
|
|
||||||
|
// 出库口点位
|
||||||
|
OUT_POINT(MapOf.of("出库口1", "CK2026","出库口2", "CK2027")),
|
||||||
|
|
||||||
//acs申请任务
|
//acs申请任务
|
||||||
ACSTOLMS_TYPE(MapOf.of("成品入库任务", "1","空盘入库","2","空盘出库","3","异常处理位","4","木箱入库","5","退货入库","6","贴标","1","捆扎","2")),
|
ACSTOLMS_TYPE(MapOf.of("成品入库任务", "1","空盘入库","2","空盘出库","3","异常处理位","4","木箱入库","5","退货入库","6","贴标","1","捆扎","2")),
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -1223,8 +1223,29 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
|||||||
String start_device_code = "";
|
String start_device_code = "";
|
||||||
// 是否自动下发
|
// 是否自动下发
|
||||||
String is_auto_issue = IOSEnum.IS_SEND.code("是");
|
String is_auto_issue = IOSEnum.IS_SEND.code("是");
|
||||||
|
// 终点
|
||||||
|
String end_device_code = "";
|
||||||
|
// 是否自动分配终点
|
||||||
|
boolean is_auto_div_point = false;
|
||||||
|
// 取绝对值
|
||||||
|
int abs = Math.abs(taskMangeList.size() / 2);
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(point_code)) {
|
||||||
|
end_device_code = point_code;
|
||||||
|
} else {
|
||||||
|
is_auto_div_point = true;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < taskMangeList.size(); i++) {
|
for (int i = 0; i < taskMangeList.size(); i++) {
|
||||||
|
// 确定终点
|
||||||
|
if (is_auto_div_point) {
|
||||||
|
if (abs > i) {
|
||||||
|
end_device_code = IOSEnum.OUT_POINT.code("出库口1");
|
||||||
|
} else {
|
||||||
|
end_device_code = IOSEnum.OUT_POINT.code("出库口2");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject json = taskMangeList.get(i);
|
JSONObject json = taskMangeList.get(i);
|
||||||
start_device_code = json.getString("struct_code");
|
start_device_code = json.getString("struct_code");
|
||||||
|
|
||||||
@@ -1271,7 +1292,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
|||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010711");
|
jsonTaskParam.put("task_type", "010711");
|
||||||
jsonTaskParam.put("point_code1", start_device_code);
|
jsonTaskParam.put("point_code1", start_device_code);
|
||||||
jsonTaskParam.put("point_code2", point_code);
|
jsonTaskParam.put("point_code2", end_device_code);
|
||||||
jsonTaskParam.put("vehicle_code", json.getString("storagevehicle_code"));
|
jsonTaskParam.put("vehicle_code", json.getString("storagevehicle_code"));
|
||||||
if (ObjectUtil.isNotEmpty(jsonExt)) {
|
if (ObjectUtil.isNotEmpty(jsonExt)) {
|
||||||
jsonTaskParam.put("vehicle_code2", jsonExt.getString("storagevehicle_code"));
|
jsonTaskParam.put("vehicle_code2", jsonExt.getString("storagevehicle_code"));
|
||||||
@@ -1299,7 +1320,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
|||||||
String task_id = twoOutTask.createTask(jsonTaskParam);
|
String task_id = twoOutTask.createTask(jsonTaskParam);
|
||||||
|
|
||||||
// 更新分配明细
|
// 更新分配明细
|
||||||
JSONObject jsonPoint = schBasePointService.query("point_code = '" + point_code + "'").uniqueResult(0);
|
JSONObject jsonPoint = schBasePointService.query("point_code = '" + end_device_code + "'").uniqueResult(0);
|
||||||
|
|
||||||
disDaoList.forEach(row -> {
|
disDaoList.forEach(row -> {
|
||||||
row.setWork_status(IOSEnum.WORK_STATUS.code("生成"));
|
row.setWork_status(IOSEnum.WORK_STATUS.code("生成"));
|
||||||
|
|||||||
@@ -636,9 +636,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
allSetPoint() {
|
allSetPoint() {
|
||||||
if (this.form2.point_code === '') {
|
if (this.mstrow.stor_id !== '1582991156504039455') {
|
||||||
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
|
if (this.form2.point_code === '') {
|
||||||
return
|
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.currentRow === '') {
|
if (this.currentRow === '') {
|
||||||
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
@@ -656,9 +658,11 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
allSetPointAllDtl() {
|
allSetPointAllDtl() {
|
||||||
if (this.form2.point_code === '') {
|
if (this.mstrow.stor_id !== '1582991156504039455') {
|
||||||
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
|
if (this.form2.point_code === '') {
|
||||||
return
|
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.loadingSetAllPoint = true
|
this.loadingSetAllPoint = true
|
||||||
const data = {
|
const data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user