Merge remote-tracking branch 'origin/master'

This commit is contained in:
2024-04-15 09:17:20 +08:00
44 changed files with 1008 additions and 1148 deletions

View File

@@ -801,7 +801,8 @@ public class IndoorManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
jo.put("task", task);
jo.put("walk_y", String.valueOf(this.walk_y));
jo.put("isOnline", this.getIsonline());
jo.put("error", this.getError());
jo.put("error", StrUtil.isNotEmpty(ErrorUtil.getDictDetail("nbjhj_error_type", String.valueOf(this.getError())))
?ErrorUtil.getDictDetail("nbjhj_error_type", String.valueOf(this.getError())):this.getError());
jo.put("isError", this.getIserror());
jo.put("message", this.getMessage());
jo.put("is_click", true);

View File

@@ -311,6 +311,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
mode = "单机";
} else if (this.getMode() == 2) {
mode = "联机";
} else if (this.getMode() == 3 && this.move2 == 1) {
mode = "等待人工吊卷";
} else if (this.getMode() == 3) {
mode = "运行中";
} else if (this.getMode() == 4) {
@@ -318,14 +320,14 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
}
if (this.getMove1() == 0 && this.getMove2() == 0) {
move1 = "无货";
move1 = "吊卷位";
move2 = "无货";
jo.put("hasGoods", false);
} else if (this.getMove1() == 1 || this.getMove2() == 1) {
if(this.getMove1() == 1){
move1 = "有货";
move1 = "下卷位";
}else if(this.getMove1() == 0){
move1 = "无货";
move2 = "吊卷位";
}
if(this.getMove2() == 1){
move2 = "有货";

View File

@@ -287,8 +287,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
param.put("product_area", paramService.findByCode("productArea").getValue());
acsToWmsService.sendDeviceStatus(param);
/*logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(this.device_code, "", "", "信号error" + last_error + "->" + error);*/
logServer.deviceItemValue(this.device_code, "error", String.valueOf(error));
logServer.deviceExecuteLog(this.device_code, "", "", "信号error" + last_error + "->" + error);
}
if (status != last_status) {
logServer.deviceItemValue(this.device_code, "status", String.valueOf(status));

View File

@@ -675,10 +675,10 @@ export default {
const obj = { name: '重量2', value: data[val] }
this.arr.push(obj)
} else if (val === 'move1') {
const obj = { name: '光电信号1', value: data[val] }
const obj = { name: '设备工位', value: data[val] }
this.arr.push(obj)
} else if (val === 'move2') {
const obj = { name: '光电信号2', value: data[val] }
const obj = { name: '设备有无货', value: data[val] }
this.arr.push(obj)
} else if (val === 'material1') {
const obj = { name: '物料1', value: this.dict.label.material[data[val]] }

View File

@@ -21,6 +21,7 @@ import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO;
import org.nl.acs.enums.AcsToLmsApplyTaskTypeEnum;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
@@ -226,18 +227,17 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
container_type = this.itemProtocol.getContainer_type();
error = this.itemProtocol.getError();
task = this.itemProtocol.getTask();
container_no = this.itemProtocol.getContainer_no();
material_barcode= this.itemProtocol.getMaterialBarcode();
to_command = this.itemProtocol.getTo_command();
to_target = this.itemProtocol.getTotarget();
to_task = this.itemProtocol.getTo_task();
to_container_no = this.itemProtocol.getContainer_direction();
to_container_type = this.itemProtocol.getContainer_no();
if (mode != last_mode) {
requireSucess = false;
if(mode == 2){
clearWrite();
}
}
@@ -271,7 +271,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
break;
case 2:
//申请任务
if (move == 1 && !requireSucess && task==0) {
if (move == 1 && !requireSucess) {
instruction_require();
}
break;
@@ -320,9 +320,14 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
public void writing(int command) {
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + org.nl.acs.device_driver.conveyor.standard_conveyor_control_with_scanner.ItemProtocol.item_to_command;
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
@@ -479,6 +484,9 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
String start_device_code = taskdto.getStart_device_code();
String route_plan_code = taskdto.getRoute_plan_code();
String next_device_code = "";
String interactionJson = taskdto.getInteraction_json();
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
String containerType = interactionJsonDTO.getContainerType();
/**
* 开始平均分配
*/
@@ -517,7 +525,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
next_point_code = next_device_code;
}
Instruction instdto = new Instruction();
packageData(instdto, route_plan_code, taskdto, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, priority);
packageData(instdto, route_plan_code, taskdto, taskid, taskcode, start_device_code, next_device_code, start_point_code, next_point_code, priority,containerType);
log.error("=================================,{}", instdto.getCreate_by());
try {
instructionService.create(instdto);
@@ -542,31 +550,33 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
private void writeData(String next_addr, List list, Instruction inst) {
List list1 = new ArrayList();
Map map = new HashMap();
map.put("code", "to_target");
map.put("value", next_addr);
list.add(map);
list1.add(map);
this.writing(list1);
List list2 = new ArrayList();
Map map1 = new HashMap();
map1.put("code", "to_task");
map1.put("value", inst.getInstruction_code());
list.add(map1);
Map map2 = new HashMap();
map2.put("code", "to_command");
map2.put("value", "1");
list.add(map2);
list2.add(map1);
this.writing(list2);
List list4 = new ArrayList();
Map map3 = new HashMap();
map3.put("code", "to_container_type");
map3.put("value", inst.getVehicle_type());
list.add(map3);
Map map4 = new HashMap();
map4.put("code", "to_container_no");
map4.put("value", "1");
list.add(map4);
this.writing(list);
list4.add(map3);
this.writing(list4);
List list3 = new ArrayList();
Map map2 = new HashMap();
map2.put("code", "to_command");
map2.put("value", "1");
list3.add(map2);
this.writing(list3);
}
private static void packageData(Instruction instdto, String route_plan_code, TaskDto taskdto, String taskid, String taskcode, String start_device_code, String next_device_code, String start_point_code, String next_point_code, String priority) {
private static void packageData(Instruction instdto, String route_plan_code, TaskDto taskdto, String taskid, String taskcode, String start_device_code, String next_device_code, String start_point_code, String next_point_code, String priority,String containerType) {
instdto.setInstruction_id(IdUtil.simpleUUID());
instdto.setRoute_plan_code(route_plan_code);
instdto.setRemark(taskdto.getRemark());
@@ -584,6 +594,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
instdto.setPriority(priority);
instdto.setInstruction_status("0");
instdto.setExecute_device_code(start_point_code);
instdto.setVehicle_type(containerType);
}
public void writeData(String next_addr, Instruction instdto, Map map) {
@@ -607,6 +618,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
try {
this.checkcontrol(itemMap);
} catch (Exception e) {
@@ -632,6 +648,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
//itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + param);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public synchronized boolean finish_instruction() throws Exception {
@@ -663,32 +684,19 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
jo.put("mode", mode);
jo.put("message", LangProcess.msg(message));
jo.put("error", this.getError());
String move = "无货";
if(this.move == 1){
move = "有货";
}
jo.put("move", move);
jo.put("task", task);
jo.put("type", container_type);
jo.put("is_click", true);
jo.put("isOnline", this.getIsonline());
jo.put("requireSucess", requireSucess);
return jo;
}
// /**
// * 获取任务信息
// */
// public JSONObject getLedMessage(Instruction instdto) {
// JSONObject json = new JSONObject();
// json.put("task_code", instdto.getTask_code());
// json.put("inst_code", instdto.getInstruction_code());
// json.put("start_device_code", instdto.getStart_device_code());
// json.put("next_device_code", instdto.getNext_device_code());
// json.put("material_type", instdto.getMaterial());
// json.put("quantity", instdto.getQuantity());
// json.put("vehicle_code", instdto.getVehicle_code());
// json.put("instruction_status", instdto.getInstruction_status());
// json.put("entry_time", instdto.getCreate_time());
// String acsIp = paramService.findByCode(AcsConfig.ACSIP).getValue();
// json.put("ip", acsIp);
// return json;
// }
/**
* 更新指令状态
@@ -762,4 +770,30 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
return true;
}
public void clearWrite() {
List list = new ArrayList();
Map map = new HashMap();
map.put("code", "to_target");
map.put("value", "0");
list.add(map);
Map map2 = new HashMap();
map2.put("code", "to_task");
map2.put("value", "0");
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "0");
list.add(map3);
Map map4 = new HashMap();
map4.put("code", "to_container_type");
map4.put("value", "0");
list.add(map4);
this.writing(list);
message = null;
vehicle_code = null;
}
}

View File

@@ -45,15 +45,6 @@ public class ItemProtocol {
* 任务号
*/
public static String item_task = "task";
/**
* 出数字托盘号
*/
public static String item_container_no = "container_no";
/**
* 子卷条码
*/
public static String item_material_barcode = "material_barcode";
/**
* 下发命令
@@ -63,10 +54,6 @@ public class ItemProtocol {
* 下发托盘类型
*/
public static String item_to_container_type = "to_container_type";
/**
* 下发接纯数字托盘号
*/
public static String item_to_container_no = "to_container_no";
/**
* 下发任务号
*/
@@ -76,11 +63,6 @@ public class ItemProtocol {
*/
public static String item_to_target = "to_target";
/**
* 托盘条码
*/
public static String item_barcode = "barcode";
@@ -90,9 +72,6 @@ public class ItemProtocol {
this.driver = driver;
}
public String getMaterialBarcode() {
return this.getOpcStringValue(item_material_barcode);
}
public int getHeartbeat() {
return this.getOpcIntegerValue(item_heartbeat);
}
@@ -117,9 +96,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_action);
}
public int getContainer_no() {
return this.getOpcIntegerValue(item_container_no);
}
public int getError() {
return this.getOpcIntegerValue(item_error);
@@ -133,9 +109,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_to_task);
}
public String getBarcode() {
return this.getOpcStringValue(item_barcode);
}
@@ -151,9 +124,6 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_to_container_type);
}
public int getTo_container_no() {
return this.getOpcIntegerValue(item_to_container_no);
}
Boolean isonline;
@@ -198,12 +168,9 @@ public class ItemProtocol {
list.add(new ItemDto(item_move, "光电信号", "DB101.B3"));
list.add(new ItemDto(item_container_direction, "托盘方向", "DB101.B4"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB101.B5"));
list.add(new ItemDto(item_container_no, "纯数字托盘号", "DB101.D7"));
list.add(new ItemDto(item_action, "动作类型", "DB101.B6"));
list.add(new ItemDto(item_error, "报警", "DB101.B58"));
list.add(new ItemDto(item_task, "任务号", "DB101.D68"));
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));
list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50"));
return list;
}
@@ -212,7 +179,6 @@ public class ItemProtocol {
list.add(new ItemDto(item_to_target, "下发仓位号", "DB102.W2"));
list.add(new ItemDto(item_to_command, "下发命令", "DB102.W4"));
list.add(new ItemDto(item_to_task, "下发任务号", "DB102.D1"));
list.add(new ItemDto(item_to_container_no, "下发接纯数字托盘号", "DB102.D3"));
list.add(new ItemDto(item_to_container_type, "下发托盘类型", "DB102.B5"));
return list;
}

View File

@@ -121,7 +121,7 @@ public class ItemProtocol {
/**
*木箱宽度
*/
public static String item_to_weight = "to_weight";
public static String item_to_weight = "to_width";
/**
*木箱高度
*/

View File

@@ -23,6 +23,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.device_driver.led.led_screen.LedScreenDeviceDriver;
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO;
import org.nl.acs.enums.StorageTypeEnum;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.history.ErrorUtil;
@@ -144,9 +145,9 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
String hand_material_barcode = null;
//数量
int qty = 0;
int last_qty = 0;
//高度
int height = 0;
int last_height = 0;
//托盘方向
int carrier_direction = 0;
@@ -219,7 +220,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
to_container_type = this.itemProtocol.getTo_container_type();
container_type = this.itemProtocol.getContainer_type();
carrier_direction = this.itemProtocol.getCarrier_direction();
qty = this.itemProtocol.getQty();
height = this.itemProtocol.getHeight();
weight = this.itemProtocol.getWeight();
barcode = this.itemProtocol.getBarcode();
material_barcode = this.itemProtocol.getMaterialBarcode();
@@ -306,7 +307,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
if (mode != 2) {
remark = "universal_remark2";
}
if (move != 0) {
if (move != 1) {
remark = "universal_remark3";
}
if (task != 0) {
@@ -338,7 +339,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
last_hj_task = hj_task;
last_container_type = container_type;
last_carrier_direction = carrier_direction;
last_qty = qty;
last_height = height;
last_weight = weight;
last_barcode = barcode;
}
@@ -475,6 +476,9 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
String vehiclecode = taskdto.getVehicle_code();
String priority = taskdto.getPriority();
Instruction instdto = new Instruction();
String interactionJson = taskdto.getInteraction_json();
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
String containerType = interactionJsonDTO.getContainerType();
if (TaskTypeEnum.AGV_Task.getIndex().equals(taskdto.getTask_type())){
String route_plan_code = taskdto.getRoute_plan_code();
@@ -489,17 +493,18 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
Integer start = 0;
String start_device_code = pathlist.get(start);
String next_device_code = pathlist.get(start+1);
//判断有无出入库任务是相同路线
TaskDto dto = taskserver.findByCodeAndExcute(taskdto.getNext_device_code(), taskdto.getStart_device_code());
if (ObjectUtil.isNotEmpty(dto)){
requireSucess = false;
return false;
}
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,start_device_code,next_device_code);
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,start_device_code,next_device_code,containerType);
}else {
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,taskdto.getStart_device_code(),taskdto.getNext_device_code());
packageInstrcutData(instdto, taskdto, taskid, taskcode, vehiclecode, priority,taskdto.getStart_device_code(),taskdto.getNext_device_code(),containerType);
}
try {
instructionService.create(instdto);
@@ -525,9 +530,14 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
map2.put("value", instdto.getInstruction_code());
list.add(map2);
Map map3 = new HashMap();
map3.put("code", "to_container_type");
map3.put("value", instdto.getVehicle_type());
list.add(map3);
Map map4 = new HashMap();
map3.put("code", "to_command");
map3.put("value", "1");
list.add(map3);
list.add(map4);
this.writing(list);
led_message = getLedMessage(instdto);
List<String> deviceCodes = this.getExtraDeviceCodes("link_device_code");
@@ -601,7 +611,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
return json;
}
private void packageInstrcutData(Instruction instdto, TaskDto taskdto, String taskid, String taskcode, String vehiclecode, String priority,String startCode, String endCode) {
private void packageInstrcutData(Instruction instdto, TaskDto taskdto, String taskid, String taskcode, String vehiclecode, String priority,String startCode, String endCode,String containerType) {
instdto.setInstruction_id(IdUtil.simpleUUID());
instdto.setRoute_plan_code(taskdto.getRoute_plan_code());
instdto.setRemark(taskdto.getRemark());
@@ -621,6 +631,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
instdto.setInstruction_status("0");
instdto.setExecute_device_code(device_code);
instdto.setInstruction_type(taskdto.getTask_type());
instdto.setVehicle_type(containerType);
}

View File

@@ -32,9 +32,9 @@ public class ItemProtocol {
*/
public static String item_error = "error";
/**
* 数量
* 高度
*/
public static String item_qty = "qty";
public static String item_height = "height";
/**
* 任务号
*/
@@ -112,8 +112,8 @@ public class ItemProtocol {
return this.getOpcIntegerValue(item_task);
}
public int getQty(){
return this.getOpcIntegerValue(item_qty);
public int getHeight(){
return this.getOpcIntegerValue(item_height);
}
public int getCarrier_direction(){
@@ -189,7 +189,7 @@ public class ItemProtocol {
list.add(new ItemDto(item_task, "任务号", "DB1.D6"));
list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B7"));
list.add(new ItemDto(item_carrier_direction, "托盘方向", "DB1.B8"));
list.add(new ItemDto(item_qty, "数量", "DB1.B9"));
list.add(new ItemDto(item_height, "高度", "DB1.B9"));
list.add(new ItemDto(item_weight, "重量", "DB1.B10"));
list.add(new ItemDto(item_barcode, "托盘条码", "DB602.STRING1.50"));
list.add(new ItemDto(item_material_barcode, "子卷条码", "DB601.STRING1.50"));

View File

@@ -213,7 +213,7 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
List toInstructions;
//行架机械手申请任务
if (mode == 2 && move == 0 && task == 0 && !requireSucess) {
if (mode == 2 && move == 0 && !requireSucess) {
boolean res = applyTask();
if (res) {
notCreateInstMessage = "";
@@ -407,10 +407,10 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
ManipulatorCacheDeviceDriver manipulatorCacheDeviceDriver;
if (startDevice.getDeviceDriver() instanceof ManipulatorCacheDeviceDriver) {
manipulatorCacheDeviceDriver = (ManipulatorCacheDeviceDriver) startDevice.getDeviceDriver();
if (manipulatorCacheDeviceDriver.getMode() != 2 && manipulatorCacheDeviceDriver.getAction() !=1) {
notCreateInstMessage = "universal_notCreateInstMessage3";
return false;
}
// if (manipulatorCacheDeviceDriver.getMode() != 2) {
// notCreateInstMessage = "universal_notCreateInstMessage3";
// return false;
// }
}
String taskid = taskDto.getTask_id();

View File

@@ -11,7 +11,7 @@ public class InteractionJsonDTO {
private String maxNo;
/**
*木箱最大数量
*木箱放入数量
*/
private String boxNo;
@@ -31,4 +31,9 @@ public class InteractionJsonDTO {
*子卷长度
*/
private String len;
/**
* 托盘类型
*/
private String containerType;
}

View File

@@ -233,8 +233,8 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
}
//放货完成
if (action == 4 && move == 0) {
//任务完成
if (action == 5 && move == 0) {
if (inst != null) {
try {
logServer.deviceExecuteLog(this.device_code, "", "", "放货完成");
@@ -351,7 +351,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
notCreateInstMessage = "universal_notCreateInstMessage1";
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
}
//存在托盘才可以申请任务
/*//存在托盘才可以申请任务
BeltConveyorDeviceDriver beltConveyorDeviceDriver;
if (nextDevice.getDeviceDriver() instanceof BeltConveyorDeviceDriver) {
beltConveyorDeviceDriver = (BeltConveyorDeviceDriver) nextDevice.getDeviceDriver();
@@ -359,7 +359,7 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
notCreateInstMessage = "universal_notCreateInstMessage2";
return false;
}
}
}*/
String taskid = taskDto.getTask_id();
@@ -451,6 +451,12 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
map9.put("value", interactionJsonDTO.getLayer());
list.add(map9);
}
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getContainerType())) {
Map<String, Object> map10 = new HashMap<>();
map10.put("code", "to_type");
map10.put("value", interactionJsonDTO.getContainerType());
list.add(map10);
}
}
this.writing(list);
}

View File

@@ -28,4 +28,9 @@ public class InteractionJsonDTO {
*/
private String layer;
/**
* 托盘类型
*/
private String containerType;
}

View File

@@ -37,6 +37,8 @@ import org.nl.acs.task.service.TaskService;
import org.nl.acs.task.service.dto.TaskDto;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
@@ -69,6 +71,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -288,6 +292,11 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -532,7 +532,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
requireSucess = true;
break;
}
if (ObjectUtil.isNotNull(list)) {
if (list.size() != 0) {
this.writing(list);
}

View File

@@ -567,7 +567,7 @@ public class BlankManipulatorDeviceDriver extends AbstractOpcDeviceDriver implem
}
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content(LangProcess.msg("universal_message10") + itemMap)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -298,6 +298,11 @@ public class BlankingButtonDriver extends AbstractOpcDeviceDriver implements Dev
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -236,6 +236,11 @@ public class GreenFoilMachineButtonDriver extends AbstractOpcDeviceDriver implem
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -20,6 +20,8 @@ import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService;
import org.nl.config.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
@@ -52,6 +54,8 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private Date instruction_require_time = new Date();
private Date instruction_finished_time = new Date();
@@ -129,6 +133,11 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
/**
@@ -158,6 +167,11 @@ public class HongXiangStationDeviceDriver extends AbstractOpcDeviceDriver implem
itemMap.put(to_param, value);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -27,6 +27,8 @@ import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -58,6 +60,8 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private String error_type = "hx_error_type";
@@ -243,6 +247,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public String getToParam() {
@@ -265,6 +274,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -299,6 +313,11 @@ public class HongXiangConveyorDeviceDriver extends AbstractOpcDeviceDriver imple
e.printStackTrace();
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -24,6 +24,8 @@ import org.nl.acs.route.service.impl.RouteLineServiceImpl;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
@@ -51,6 +53,8 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//心跳
public int heartbeat = 0;
@@ -128,6 +132,11 @@ public class InflatableShaftLibraryDeviceDriver extends AbstractOpcDeviceDriver
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号设备号:" + deviceCode + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -9,6 +9,8 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.config.SpringContextHolder;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
@@ -26,7 +28,8 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
@Autowired
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
String container;
String container_type_desc;
String last_container_type_desc;
@@ -103,6 +106,11 @@ public class LampThreecolorDeviceDriver extends AbstractOpcDeviceDriver implemen
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -776,6 +776,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -1157,6 +1162,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public void writing(List list) {

View File

@@ -520,6 +520,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
}
}
logServer.deviceExecuteLog(deviceCode, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
this.control(itemMap);
}
@@ -534,6 +539,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -623,6 +633,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
itemMap.put(to_param, value);
// itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(deviceCode)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}

View File

@@ -37,6 +37,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -65,7 +67,8 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
int lastMode = 0;
@@ -551,6 +554,11 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -36,6 +36,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -63,6 +65,8 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExtraService deviceExtraService = SpringContextHolder.getBean(DeviceExtraServiceImpl.class);
@Autowired
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -499,6 +503,11 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -31,6 +31,8 @@ import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.openscada.opc.lib.da.Server;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,6 +60,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//分切行架机械手是否禁用 0否 1是
private int is_disable = 0;
@@ -551,6 +555,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public boolean exe_business() {
@@ -590,6 +599,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
@@ -615,6 +629,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
}
}
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
this.control(itemMap);
}
@@ -804,6 +823,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.checkcontrol(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
}

View File

@@ -24,6 +24,8 @@ import org.nl.acs.route.service.RouteLineService;
import org.nl.acs.task.service.TaskService;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.nl.system.service.param.ISysParamService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -55,6 +57,8 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
AgvService agvService = SpringContextHolder.getBean(AgvService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
//工作模式
int mode = 0;
@@ -191,6 +195,11 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}
@@ -272,5 +281,10 @@ public class SubRollConveyorSiteDeviceDriver extends AbstractOpcDeviceDriver imp
itemMap.put(to_param, value);
// itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

View File

@@ -21,6 +21,8 @@ import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
import org.nl.config.SpringContextHolder;
import org.nl.config.language.LangProcess;
import org.nl.config.lucene.service.LuceneExecuteLogService;
import org.nl.config.lucene.service.dto.LuceneLogDto;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.*;
@@ -40,6 +42,8 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class);
@Autowired
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean(LuceneExecuteLogService.class);
private String error_type = "hx_error_type";
@@ -268,6 +272,11 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
itemMap.put(to_param, Integer.parseInt(value));
this.control(itemMap);
logServer.deviceExecuteLog(device_code, "", "", "下发电气信号设备号:" + device_code + ",下发电气:" + to_param + ",下发电气值:" + value);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
public String getToParam() {
@@ -290,6 +299,11 @@ public class WasteFoilWeighingStationDriver extends AbstractOpcDeviceDriver impl
if (ObjectUtil.isNotEmpty(itemMap)) {
this.control(itemMap);
logServer.deviceExecuteLog(this.getDevice().getDevice_code(), "", "", "下发多个电气信号:" + itemMap);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("下发多个电气信号" + itemMap)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -252,8 +252,6 @@ import deviceCrud from '@/api/acs/device/device'
import { getDeviceByCodes } from '@/api/acs/device/deviceStageMonitor'
import '@logicflow/core/dist/style/index.css'
import '@logicflow/extension/lib/style/index.css'
import paramCrud from '@/api/system/param'
import { LogicFlow } from '@logicflow/core'
import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
import i18n from '@/i18n'
@@ -520,6 +518,9 @@ export default {
} else if (val === 'last_inst_message') {
const obj = { name: i18n.t('monitor.click.last_instruction_message'), value: data[val] }
this.arr.push(obj)
} else if (val === 'container_type') {
const obj = { name: '托盘类型', value: data[val] }
this.arr.push(obj)
} else if (val === 'barcode') {
const obj = { name: i18n.t('monitor.click.barcode'), value: data[val] }
this.arr.push(obj)

View File

@@ -146,13 +146,6 @@ public interface CheckOutBillService {
*/
void setPoint(JSONObject whereJson);
/**
* 设置一个站点
*
* @param whereJson /
*/
void oneSetPoint(JSONObject whereJson);
/**
* 设置一个站点
*

View File

@@ -24,7 +24,9 @@ import org.nl.wms.basedata.st.service.StorattrService;
import org.nl.wms.basedata.st.service.StructattrService;
import org.nl.wms.basedata.st.service.dto.StorattrDto;
import org.nl.wms.basedata.st.service.dto.StructattrDto;
import org.nl.wms.basedata.st.service.impl.StructattrServiceImpl;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
import org.nl.wms.sch.manage.AbstractAcsTask;
import org.nl.wms.sch.manage.TaskStatusEnum;
import org.nl.wms.sch.service.PointService;
@@ -41,6 +43,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* PC端出入库新增
@@ -64,6 +67,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
private final RedissonClient redissonClient;
private JSONObject struct_jo = null;
@Override
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
@@ -551,6 +555,18 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
//判断是否为主存区,主存区调用自动分配,虚拟区调用普通查询
if (StrUtil.isNotEmpty(need_sect) && !"00".equals(need_sect_jo.getString("sect_type_attr"))) {
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("sect_id = '" + need_sect + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
// 如果为空则扩容
if (ObjectUtil.isEmpty(struct_jo)) {
JSONObject jsonParam = new JSONObject();
jsonParam.put("sect_id", whereJson.get("sect_id"));
jsonParam.put("stor_id", whereJson.get("stor_id"));
jsonParam.put("num", 50);
StructattrServiceImpl bean = SpringContextHolder.getBean(StructattrServiceImpl.class);
bean.oneCreate(jsonParam);
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("sect_id = '" + need_sect + "' AND lock_type = '1' AND is_delete = '0' AND IFNULL( storagevehicle_code, '' ) = ''").uniqueResult(0);
}
} else {
jo_form.put("sect_id", whereJson.get("sect_id"));
struct_jo = this.autoDis(jo_form);
@@ -1359,8 +1375,6 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
* */
JSONObject struct_jo = new JSONObject();
String box_no = whereJson.getString("box_no");
String sect_id = whereJson.getString("sect_id");
@@ -1728,7 +1742,9 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
}
if (ObjectUtil.isEmpty(struct_jo)) {
throw new BadRequestException("未查询到可用的仓位!");
// 主存区类型更改成中转区类型:找一排主存区的更改中转区、把一排中转区的更改成主存区(只允许调用一次)
updateStructSect(col_num);
autoDisMove(whereJson);
}
return struct_jo;
}
@@ -2115,4 +2131,107 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
map.put("bill_status", "99");
dtl_wql.update(map, "iostorinv_id = '" + mst_row.get("iostorinv_id") + "'");
}
private void updateStructSect(String layer_num) {
WQLObject attr = WQLObject.getWQLObject("st_ivt_structattr");
WQLObject point = WQLObject.getWQLObject("sch_base_point");
/*
* 1.将主存区的一排更改为中转区
* 2.将中转区的一排更改为主存区
*/
String block_num = "";
String row_num = "";
// 1.找主存区数量小的一排转为中转区
// 根据块、排进行分组,优先空排 -> 有货数量少的
List<JSONObject> attrListAllEmp = WQL.getWO("ST_UPDATESTRUCTSECT_01").addParam("flag", "1")
.addParam("layer_num", layer_num).process().getResultJSONArray(0)
.toJavaList(JSONObject.class);
if (ObjectUtil.isEmpty(attrListAllEmp)) {
// 如果为空则查找有空位的排
List<JSONObject> attrListEmp = WQL.getWO("ST_UPDATESTRUCTSECT_01").addParam("flag", "2")
.addParam("layer_num", layer_num).process().getResultJSONArray(0)
.toJavaList(JSONObject.class);
if (ObjectUtil.isEmpty(attrListEmp)) {
throw new BadRequestException("自动扩容失败,主存区没有空位可扩容!");
}
// 判断是这排是否被锁住
String block_num_in = attrListEmp.stream()
.map(row -> row.getString("block_num"))
.collect(Collectors.joining("','"));
String row_num_in = attrListEmp.stream()
.map(row -> row.getString("row_num"))
.collect(Collectors.joining("','"));
List<JSONObject> rowList = attr.query("block_num in ('" + block_num_in + "') AND row_num in ('" + row_num_in + "') and layer_num = '" + layer_num + "' and sect_code = 'ZC01'")
.getResultJSONArray(0).toJavaList(JSONObject.class);
for (int i = 0; i < attrListEmp.size(); i++) {
JSONObject json = attrListEmp.get(i);
List<JSONObject> collect = rowList.stream()
.filter(row -> row.getString("block_num").equals(json.getString("block_num")) &&
row.getString("row_num").equals(json.getString("row_num"))
)
.collect(Collectors.toList());
// 判断是否全部都为未锁定
boolean isLock = collect.stream()
.allMatch(row -> row.getString("lock_type").equals("1"));
if (!isLock) {
continue;
}
block_num = json.getString("block_num");
row_num = json.getString("row_num");
break;
}
} else {
JSONObject json = attrListAllEmp.get(0);
block_num = json.getString("block_num");
row_num = json.getString("row_num");
}
// 2.将中转区的一排更改为主存区
// 查询中转区满的一排
List<JSONObject> attrListAllNoEmp = WQL.getWO("ST_UPDATESTRUCTSECT_01").addParam("flag", "3")
.addParam("layer_num", layer_num).process().getResultJSONArray(0)
.toJavaList(JSONObject.class);
if (ObjectUtil.isNotEmpty(attrListAllNoEmp)) {
// 更新仓位为主存区
JSONObject jsonParam2 = new JSONObject();
jsonParam2.put("sect_id", RegionTypeEnum.ZC01.getId());
jsonParam2.put("sect_code", "ZC01");
jsonParam2.put("sect_name", RegionTypeEnum.ZC01.getName());
JSONObject json = attrListAllNoEmp.get(0);
// 更新仓位
attr.update(jsonParam2,"sect_code = 'ZZ01' AND block_num = '"+json.getString("block_num")+"' AND row_num = '"+json.getString("row_num")+"' AND layer_num = '"+layer_num+"'");
// 更新点位
jsonParam2.put("region_id", RegionTypeEnum.ZC01.getId());
jsonParam2.put("region_code", "ZC01");
jsonParam2.put("region_name", RegionTypeEnum.ZC01.getName());
point.update(jsonParam2,"region_code = 'ZZ01' AND block_num = '"+json.getString("block_num")+"' AND row_num = '"+json.getString("row_num")+"' AND layer_num = '"+layer_num+"'");
}
// 更新仓位为中转区
JSONObject jsonParam = new JSONObject();
jsonParam.put("sect_id", RegionTypeEnum.ZZ01.getId());
jsonParam.put("sect_code", "ZZ01");
jsonParam.put("sect_name", RegionTypeEnum.ZZ01.getName());
attr.update(jsonParam,"sect_code = 'ZC01' AND block_num = '"+block_num+"' AND row_num = '"+row_num+"' AND layer_num = '"+layer_num+"'");
// 更新点位
jsonParam.put("region_id", RegionTypeEnum.ZZ01.getId());
jsonParam.put("region_code", "ZZ01");
jsonParam.put("region_name", RegionTypeEnum.ZZ01.getName());
point.update(jsonParam,"region_code = 'ZC01' AND block_num = '"+block_num+"' AND row_num = '"+row_num+"' AND layer_num = '"+layer_num+"'");
}
}

View File

@@ -0,0 +1,214 @@
[交易说明]
交易名: 更新仓位属性查询
所属模块:
功能简述:
版权所有:
表引用:
版本经历:
[数据库]
--指定数据库为空采用默认值默认为db.properties中列出的第一个库
[IO定义]
#################################################
## 表字段对应输入参数
#################################################
输入.flag TYPEAS s_string
输入.layer_num TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
[临时变量]
--所有中间过程变量均可在此处定义
[业务过程]
##########################################
# 1、输入输出检查 #
##########################################
##########################################
# 2、主过程前处理 #
##########################################
##########################################
# 3、业务主过程 #
##########################################
IF 输入.flag = "1"
QUERY
SELECT
*
FROM
(
SELECT
sa.block_num,
sa.row_num,
COUNT( sa.struct_code ) AS struct_num
FROM
st_ivt_structattr sa
WHERE
sa.is_delete = '0'
AND sa.is_used = '1'
AND sa.sect_code = 'ZC01'
OPTION 输入.layer_num <> ""
sa.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa.block_num,
sa.row_num
) a
WHERE
EXISTS (
SELECT
*
FROM
(
SELECT
block_num,
row_num,
COUNT( sa2.struct_code ) AS struct_num
FROM
st_ivt_structattr sa2
WHERE
sa2.lock_type = '1'
AND sa2.is_used = '1'
AND sa2.is_delete = '0'
AND sa2.sect_code = 'ZC01'
AND IFNULL( sa2.storagevehicle_code, '' ) = ''
OPTION 输入.layer_num <> ""
sa2.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa2.block_num,
sa2.row_num
) b
WHERE
b.block_num = a.block_num
AND b.row_num = a.row_num
AND a.struct_num = b.struct_num
) ORDER BY struct_num DESC
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "2"
QUERY
SELECT
*
FROM
(
SELECT
sa.block_num,
sa.row_num,
COUNT( sa.struct_code ) AS struct_num
FROM
st_ivt_structattr sa
WHERE
sa.is_delete = '0'
AND sa.is_used = '1'
AND sa.lock_type = '1'
AND sa.sect_code = 'ZC01'
OPTION 输入.layer_num <> ""
sa.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa.block_num,
sa.row_num
) a
WHERE
EXISTS (
SELECT
*
FROM
(
SELECT
block_num,
row_num,
COUNT( sa2.struct_code ) AS struct_num
FROM
st_ivt_structattr sa2
WHERE
sa2.lock_type = '1'
AND sa2.is_used = '1'
AND sa2.is_delete = '0'
AND sa2.sect_code = 'ZC01'
AND IFNULL( sa2.storagevehicle_code, '' ) = ''
OPTION 输入.layer_num <> ""
sa2.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa2.block_num,
sa2.row_num
) b
WHERE
b.block_num = a.block_num
AND b.row_num = a.row_num
) ORDER BY struct_num DESC
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "3"
QUERY
SELECT
*
FROM
(
SELECT
sa.block_num,
sa.row_num,
COUNT( sa.struct_code ) AS struct_num
FROM
st_ivt_structattr sa
WHERE
sa.is_delete = '0'
AND sa.is_used = '1'
AND sa.lock_type = '1'
AND sa.sect_code = 'ZZ01'
OPTION 输入.layer_num <> ""
sa.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa.block_num,
sa.row_num
) a
WHERE
EXISTS (
SELECT
*
FROM
(
SELECT
block_num,
row_num,
COUNT( sa2.struct_code ) AS struct_num
FROM
st_ivt_structattr sa2
WHERE
sa2.lock_type = '1'
AND sa2.is_used = '1'
AND sa2.is_delete = '0'
AND sa2.sect_code = 'ZZ01'
AND IFNULL( sa2.storagevehicle_code, '' ) <> ''
OPTION 输入.layer_num <> ""
sa2.layer_num = 输入.layer_num
ENDOPTION
GROUP BY
sa2.block_num,
sa2.row_num
) b
WHERE
b.block_num = a.block_num
AND b.row_num = a.row_num
AND a.struct_num = b.struct_num
) ORDER BY struct_num DESC
ENDSELECT
ENDQUERY
ENDIF

View File

@@ -150,14 +150,6 @@ public class CheckOutBillController {
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/oneSetPoint")
@Log("设置一个站点")
public ResponseEntity<Object> oneSetPoint(@RequestBody JSONObject whereJson) {
checkOutBillService.oneSetPoint(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/oneSetPoint2")
@Log("设置一个站点")

View File

@@ -2454,643 +2454,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void oneSetPoint(JSONObject whereJson) {
//出库分配表
WQLObject wo_dis = WQLObject.getWQLObject("ST_IVT_IOStorInvDis");
//点位表
WQLObject wo_Point = WQLObject.getWQLObject("SCH_BASE_Point");
//任务表
WQLObject wo_Task = WQLObject.getWQLObject("SCH_BASE_Task");
//出库主表
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
//仓位表
WQLObject attrTab = WQLObject.getWQLObject("ST_IVT_StructAttr");
String struct_id = whereJson.getString("struct_id");
String point_code = whereJson.getString("point_code"); // 终点
String iostorinv_id = whereJson.getString("iostorinv_id");
//查询主表信息
JSONObject jo_mst = wo_mst.query("iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jo_mst)) {
throw new BadRequestException("未查到相关出库单");
}
JSONObject jsonPoint2 = wo_Point.query("lock_type='1' and (vehicle_code='' or vehicle_code IS NULL) and point_code='" + point_code + "'").uniqueResult(0);
//如果终点站点被锁定或者有载具号,则不允许设置点位
if (ObjectUtil.isEmpty(jsonPoint2)) {
throw new BadRequestException("该站点被锁定或者有载具号,不允许设置!");
}
// 查询未生成和生成未下发的分配记录
JSONObject dis = WQL.getWO("QST_IVT_CHECKOUTBILL")
.addParam("flag", "5")
.addParam("iostorinvdtl_id", whereJson.getString("iostorinvdtl_id"))
.addParam("struct_id", struct_id)
.addParam("iostorinv_id", iostorinv_id)
.addParam("bill_status", "01")
.addParam("is_issued", "0")
.process()
.uniqueResult(0);
if (ObjectUtil.isEmpty(dis)) {
throw new BadRequestException("分配明细不存在或已执行、完成、!");
}
String task_status = dis.getString("task_status");
String task_id = dis.getString("task_id");
if (StrUtil.isNotEmpty(task_status) && "05,06,07".contains(task_status)) {
throw new BadRequestException("该任务已执行,不可重新设置站点!");
}
if (ObjectUtil.isNotEmpty(task_id)) {
//若任务不为空,则为变更出库目的站点
JSONObject task = wo_Task.query("task_id='" + task_id + "'").uniqueResult(0);
//更新任务
task.put("point_code2", jsonPoint2.getString("point_code"));
wo_Task.update(task);
} else {
/*
* 生成任务:
* 1.判断此条分配明细的 ‘仓位’在此主表下的分配明细是否有相同的 ‘仓位’
* a.如果有:有则合并只生成一条任务
* b.没有:则正常生成
* 2.判断此货位是否被挡住
* a.挡住:判断哪边的货位比较少 生成移库单
* b.没挡住:正常生成
*/
JSONObject jsonPoint1 = wo_Point.query("source_id = '" + dis.getString("struct_id") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonPoint1)) {
throw new BadRequestException("起点点位不存在");
}
// 创建任务
JSONObject param = new JSONObject();
param.put("task_type", "010503");
param.put("vehicle_code", dis.getString("box_no"));
param.put("task_name", "task_name");
param.put("point_code1", jsonPoint1.getString("point_code"));
param.put("point_code2", jsonPoint2.getString("point_code"));
param.put("material_id", dis.getString("material_id"));
param.put("task_group_id", ""); // 任务组
param.put("sort_seq", ""); // 任务组顺序号
String create_task_id = outTask.createTask(param);
// 更新分配状态、任务标识、出库点位
JSONObject jsonTask = wo_Task.query("task_id = '" + create_task_id + "'").uniqueResult(0);
JSONObject jsonUpdateMap = new JSONObject();
jsonUpdateMap.put("work_status", "01");
jsonUpdateMap.put("task_id", jsonTask.getLong("task_id"));
jsonUpdateMap.put("point_id", jsonPoint2.getLong("point_id"));
wo_dis.update(jsonUpdateMap, "iostorinvdis_id = '" + dis.getString("iostorinvdis_id") + "'");
// 1.判断此条分配明细的 ‘仓位’在此主表下的分配明细是否有相同的 ‘仓位’
JSONArray disArr = wo_dis.query("struct_id = '" + dis.getString("struct_id") +
"' and iostorinv_id = '" + dis.getString("iostorinv_id") +
"' and iostorinvdis_id <> '" + dis.getString("iostorinvdis_id") +
"' and work_status = '00'").getResultJSONArray(0);
// 依次更新相同仓位的分配明细状态、任务标识、出库点位
for (int i = 0; i < disArr.size(); i++) {
JSONObject jsonObject = disArr.getJSONObject(i);
jsonObject.put("work_status", "01");
jsonObject.put("task_id", jsonTask.getLong("task_id"));
jsonObject.put("point_id", jsonPoint2.getLong("point_id"));
wo_dis.update(jsonObject);
}
// 2.判断此货位是否被挡住
JSONObject jsonAttr = attrTab.query("struct_id = '" + dis.getString("struct_id") + "'").uniqueResult(0);
// 判断此仓位是‘双通’还是’单通‘
if (StrUtil.equals(jsonAttr.getString("placement_type"), "01")) {
JSONObject map = new JSONObject();
map.put("flag", "2");
map.put("struct_code", jsonAttr.getString("struct_code"));
map.put("sect_id", jsonAttr.getString("sect_id"));
// 判断左边是否被挡住
JSONObject jsonIsBlockL = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().uniqueResult(0);
boolean left_verify = true;
if (ObjectUtil.isEmpty(jsonIsBlockL)) {
left_verify = false;
/* String out_order_seq = NumberUtil.add(jsonAttr.getString("out_order_seq"), "1").toString();
JSONObject json = attrTab.query("sect_id = '" + map.getString("sect_id")
+ "' and out_order_seq = '" + out_order_seq
+ "' and block_num = '" + jsonAttr.getString("block_num")
+ "' and row_num = '" + jsonAttr.getString("row_num") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)) {
jsonAttr.put("placement_type","02");
}*/
jsonAttr.put("placement_type", "02");
} else {
// 调用验证方法进行校验
String out_order_seq = NumberUtil.add(jsonIsBlockL.getString("out_order_seq"), "1").toString();
JSONObject jsonParam = attrTab.query("sect_id = '" + map.getString("sect_id")
+ "' and out_order_seq = '" + out_order_seq
+ "' and block_num = '" + jsonIsBlockL.getString("block_num")
+ "' and row_num = '" + jsonIsBlockL.getString("row_num") + "'").uniqueResult(0);
jsonParam.put("iostorinv_id", dis.getString("iostorinv_id"));
jsonParam.put("option", "2");
left_verify = this.is_trueOrFalse(jsonParam);
if (!left_verify) {
jsonParam.put("option", "3");
boolean left_verify2 = this.is_trueOrFalse(jsonParam);
if (left_verify2) {
jsonAttr.put("placement_type", "02");
}
} else {
jsonParam.put("option", "4");
boolean left_verify2 = this.is_trueOrFalse(jsonParam);
if (left_verify2) {
jsonAttr.put("placement_type", "02");
}
}
}
// 判断右边是否被挡住
map.put("flag", "1");
JSONObject jsonIsBlockR = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().uniqueResult(0);
boolean right_verify = true;
if (ObjectUtil.isEmpty(jsonIsBlockR)) {
right_verify = false;
/* String out_order_seq = NumberUtil.sub(jsonAttr.getString("out_order_seq"), "1").toString();
JSONObject json = attrTab.query("sect_id = '" + map.getString("sect_id")
+ "' and out_order_seq = '" + out_order_seq
+ "' and block_num = '" + jsonAttr.getString("block_num")
+ "' and row_num = '" + jsonAttr.getString("row_num") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)) {
jsonAttr.put("placement_type","03");
}*/
jsonAttr.put("placement_type", "03");
} else {
// 调用验证方法进行校验
String out_order_seq = NumberUtil.sub(jsonIsBlockR.getString("out_order_seq"), "1").toString();
JSONObject jsonParam = attrTab.query("sect_id = '" + map.getString("sect_id")
+ "' and out_order_seq = '" + out_order_seq
+ "' and block_num = '" + jsonIsBlockR.getString("block_num")
+ "' and row_num = '" + jsonIsBlockR.getString("row_num") + "'").uniqueResult(0);
jsonParam.put("iostorinv_id", dis.getString("iostorinv_id"));
jsonParam.put("option", "2");
right_verify = this.is_trueOrFalse(jsonParam);
if (!right_verify) {
jsonParam.put("option", "3");
boolean right_verify2 = this.is_trueOrFalse(jsonParam);
if (right_verify2) {
jsonAttr.put("placement_type", "03");
}
} else {
jsonParam.put("option", "4");
boolean right_verify2 = this.is_trueOrFalse(jsonParam);
if (right_verify2) {
jsonAttr.put("placement_type", "03");
}
}
}
if (left_verify && right_verify) {
// 都被挡住判断哪边被挡住的货位少
map.put("flag", "3");
map.put("out_order_seq", jsonAttr.getString("out_order_seq"));
JSONArray jsonIsBlockAll = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
int blockLeft = 0; // 左边个数
int blockRigth = 0; // 右边个数
for (int i = 0; i < jsonIsBlockAll.size(); i++) {
JSONObject json = jsonIsBlockAll.getJSONObject(i);
if (i == 0) {
blockRigth = json.getIntValue("num");
}
if (i == 1) {
blockRigth = json.getIntValue("num");
}
}
// 更新第一个任务 任务组、任务顺序号
jsonTask.put("task_group_id", IdUtil.getSnowflake(1, 1).nextId());
jsonTask.put("sort_seq", 1);
wo_Task.update(jsonTask);
JSONArray jsonAllBlockPoint = new JSONArray();
if (blockLeft > blockRigth) {
// 从右边生成移库单
map.put("flag", "4");
map.put("block_num", jsonAttr.getString("block_num"));
map.put("row_num", jsonAttr.getString("row_num"));
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
} else {
// 从左边生成移库单
map.put("flag", "5");
map.put("block_num", jsonAttr.getString("block_num"));
map.put("row_num", jsonAttr.getString("row_num"));
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
}
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
JSONArray table = new JSONArray(); // 明细参数
mapParam.put("bill_status", "10");
mapParam.put("bill_type", "21");
mapParam.put("buss_type", "21");
mapParam.put("biz_date", DateUtil.today());
mapParam.put("stor_code", "CP01");
mapParam.put("stor_id", "1582991156504039424");
mapParam.put("stor_name", "成品仓库");
mapParam.put("is_task", "1");
// 查询移入货位
JSONObject moveParam = new JSONObject();
moveParam.put("box_no", json.getString("storagevehicle_code"));
moveParam.put("sect_id", RegionTypeEnum.ZZ01.getId());
JSONObject jsonMove = rawAssistIStorService.autoDis(moveParam);
// 查询移出货位的库存物料
JSONObject jsonMoveIvt = WQL.getWO("ST_OUTIVT03")
.addParam("flag", "6")
.addParam("struct_id", json.getString("struct_id"))
.process().uniqueResult(0);
// 移库单明细
JSONObject jsonMoveDtl = new JSONObject();
jsonMoveDtl.put("is_task", "2");
jsonMoveDtl.put("turnout_sect_id", json.getLongValue("sect_id"));
jsonMoveDtl.put("turnout_sect_code", json.getString("sect_code"));
jsonMoveDtl.put("turnout_sect_name", json.getString("sect_name"));
jsonMoveDtl.put("turnout_struct_id", json.getLongValue("struct_id"));
jsonMoveDtl.put("turnout_struct_code", json.getString("struct_code"));
jsonMoveDtl.put("turnout_struct_name", json.getString("struct_name"));
jsonMoveDtl.put("material_id", jsonMoveIvt.getLongValue("material_id"));
jsonMoveDtl.put("pcsn", jsonMoveIvt.getString("pcsn"));
jsonMoveDtl.put("quality_scode", "01");
jsonMoveDtl.put("qty_unit_id", jsonMoveIvt.getLongValue("qty_unit_id"));
jsonMoveDtl.put("qty_unit_name", jsonMoveIvt.getString("unit_name"));
jsonMoveDtl.put("qty", jsonMoveIvt.getDoubleValue("canuse_qty"));
jsonMoveDtl.put("storagevehicle_code", json.getString("storagevehicle_code"));
jsonMoveDtl.put("turnin_sect_id", jsonMove.getLongValue("sect_id"));
jsonMoveDtl.put("turnin_sect_code", jsonMove.getString("sect_code"));
jsonMoveDtl.put("turnin_sect_name", jsonMove.getString("sect_name"));
jsonMoveDtl.put("turnin_struct_id", jsonMove.getLongValue("struct_id"));
jsonMoveDtl.put("turnin_struct_code", jsonMove.getString("struct_code"));
jsonMoveDtl.put("turnin_struct_name", jsonMove.getString("struct_name"));
jsonMoveDtl.put("source_billdtl_id", dis.getLongValue("iostorinvdis_id"));
// 生成任务
JSONObject param2 = new JSONObject();
param2.put("task_type", "010503");
param2.put("vehicle_code", json.getString("storagevehicle_code"));
param2.put("task_name", "task_name");
param2.put("point_code1", json.getString("point_code"));
param2.put("point_code2", jsonMove.getString("struct_code"));
param2.put("task_group_id", jsonTask.getLongValue("task_group_id")); // 任务组
param2.put("sort_seq", jsonTask.getIntValue("sort_seq") + i + 1); // 任务组顺序号
String move_task_id = outTask.createTask(param2);
// 回显移库明细任务id
jsonMoveDtl.put("task_id", move_task_id);
table.add(jsonMoveDtl);
// 更新任务处理类
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
jsonTaskMove.put("task_type", "010505");
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
wo_Task.update(jsonTaskMove);
mapParam.put("tableData", table);
// 调用移库单新增方法
if (ObjectUtil.isNotEmpty(jsonAllBlockPoint)) {
handMoveStorService.insertDtl2(mapParam);
}
}
} else {
if (StrUtil.equals(jsonAttr.getString("placement_type"), "01")) {
throw new BadRequestException("任务生成失败,请重新选择");
}
map.put("struct_code", jsonAttr.getString("struct_code"));
map.put("sect_id", jsonAttr.getString("sect_id"));
map.put("out_order_seq", jsonAttr.getString("out_order_seq"));
map.put("block_num", jsonAttr.getString("block_num"));
map.put("row_num", jsonAttr.getString("row_num"));
JSONArray jsonAllBlockPoint = new JSONArray();
if (StrUtil.equals(jsonAttr.getString("placement_type"), "02")) {
// 02-左通
map.put("flag", "2");
// 判断左边是否被挡住
JSONObject jsonIsBlockL2 = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().uniqueResult(0);
// 如果被挡住则进行校验
boolean verify = true;
if (ObjectUtil.isEmpty(jsonIsBlockL2)) {
verify = false;
} else {
// 调用验证方法进行校验
String out_order_seq = NumberUtil.add(jsonIsBlockL2.getString("out_order_seq"), "1").toString();
JSONObject jsonParam = attrTab.query("sect_id = '" + map.getString("sect_id")
+ "' and out_order_seq = '" + out_order_seq
+ "' and block_num = '" + map.getString("block_num")
+ "' and row_num = '" + map.getString("row_num") + "'").uniqueResult(0);
jsonParam.put("iostorinv_id", dis.getString("iostorinv_id"));
jsonParam.put("option", "1");
verify = this.is_trueOrFalse(jsonParam);
}
if (verify) {
// 更新第一个任务 任务组、任务顺序号
jsonTask.put("task_group_id", IdUtil.getSnowflake(1, 1).nextId());
jsonTask.put("sort_seq", 1);
wo_Task.update(jsonTask);
// 从左边生成移库单
map.put("flag", "5");
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
}
}
if (StrUtil.equals(jsonAttr.getString("placement_type"), "03")) {
// 03-右通
map.put("flag", "1");
// 判断右边是否被挡住
JSONObject jsonIsBlockR2 = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().uniqueResult(0);
// 如果被挡住则进行校验
boolean verify = true;
if (ObjectUtil.isEmpty(jsonIsBlockR2)) {
verify = false;
} else {
// 调用验证方法进行校验
String out_order_seq = NumberUtil.sub(jsonIsBlockR2.getString("out_order_seq"), "1").toString();
JSONObject jsonParam = attrTab.query("sect_id = '" + map.getString("sect_id")
+ "' and out_order_seq = '" + out_order_seq
+ "' and block_num = '" + map.getString("block_num")
+ "' and row_num = '" + map.getString("row_num") + "'").uniqueResult(0);
jsonParam.put("iostorinv_id", dis.getString("iostorinv_id"));
jsonParam.put("option", "1");
verify = this.is_trueOrFalse(jsonParam);
}
if (verify) {
// 更新第一个任务 任务组、任务顺序号
jsonTask.put("task_group_id", IdUtil.getSnowflake(1, 1).nextId());
jsonTask.put("sort_seq", 1);
wo_Task.update(jsonTask);
// 从右边生成移库单
map.put("flag", "4");
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
}
}
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
JSONArray table = new JSONArray(); // 明细参数
mapParam.put("bill_status", "10");
mapParam.put("bill_type", "21");
mapParam.put("buss_type", "21");
mapParam.put("biz_date", DateUtil.today());
mapParam.put("stor_code", "CP01");
mapParam.put("stor_id", "1582991156504039424");
mapParam.put("stor_name", "成品仓库");
mapParam.put("is_task", "1");
// 查询移入货位
JSONObject moveParam = new JSONObject();
moveParam.put("box_no", json.getString("storagevehicle_code"));
moveParam.put("sect_id", RegionTypeEnum.ZZ01.getId());
JSONObject jsonMove = rawAssistIStorService.autoDis(moveParam);
// 查询移出货位的库存物料
JSONObject jsonMoveIvt = WQL.getWO("ST_OUTIVT03")
.addParam("flag", "6")
.addParam("struct_id", json.getString("struct_id"))
.process().uniqueResult(0);
// 移库单明细
JSONObject jsonMoveDtl = new JSONObject();
jsonMoveDtl.put("is_task", "2");
jsonMoveDtl.put("turnout_sect_id", json.getLongValue("sect_id"));
jsonMoveDtl.put("turnout_sect_code", json.getString("sect_code"));
jsonMoveDtl.put("turnout_sect_name", json.getString("sect_name"));
jsonMoveDtl.put("turnout_struct_id", json.getLongValue("struct_id"));
jsonMoveDtl.put("turnout_struct_code", json.getString("struct_code"));
jsonMoveDtl.put("turnout_struct_name", json.getString("struct_name"));
jsonMoveDtl.put("material_id", jsonMoveIvt.getLongValue("material_id"));
jsonMoveDtl.put("pcsn", jsonMoveIvt.getString("pcsn"));
jsonMoveDtl.put("quality_scode", "01");
jsonMoveDtl.put("qty_unit_id", jsonMoveIvt.getLongValue("qty_unit_id"));
jsonMoveDtl.put("qty_unit_name", jsonMoveIvt.getString("unit_name"));
jsonMoveDtl.put("qty", jsonMoveIvt.getDoubleValue("canuse_qty"));
jsonMoveDtl.put("storagevehicle_code", json.getString("storagevehicle_code"));
jsonMoveDtl.put("turnin_sect_id", jsonMove.getLongValue("sect_id"));
jsonMoveDtl.put("turnin_sect_code", jsonMove.getString("sect_code"));
jsonMoveDtl.put("turnin_sect_name", jsonMove.getString("sect_name"));
jsonMoveDtl.put("turnin_struct_id", jsonMove.getLongValue("struct_id"));
jsonMoveDtl.put("turnin_struct_code", jsonMove.getString("struct_code"));
jsonMoveDtl.put("turnin_struct_name", jsonMove.getString("struct_name"));
jsonMoveDtl.put("source_billdtl_id", dis.getLongValue("iostorinvdis_id"));
// 生成任务
JSONObject param2 = new JSONObject();
param2.put("task_type", "010503");
param2.put("vehicle_code", json.getString("storagevehicle_code"));
param2.put("task_name", "task_name");
param2.put("point_code1", json.getString("point_code"));
param2.put("point_code2", jsonMove.getString("struct_code"));
param2.put("task_group_id", jsonTask.getLongValue("task_group_id")); // 任务组
param2.put("sort_seq", jsonTask.getIntValue("sort_seq") + i + 1); // 任务组顺序号
String move_task_id = outTask.createTask(param2);
// 回显移库明细任务id
jsonMoveDtl.put("task_id", move_task_id);
table.add(jsonMoveDtl);
// 更新任务处理类
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
jsonTaskMove.put("task_type", "010505");
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
wo_Task.update(jsonTaskMove);
mapParam.put("tableData", table);
// 调用移库单新增方法
if (ObjectUtil.isNotEmpty(jsonAllBlockPoint)) {
handMoveStorService.insertDtl2(mapParam);
}
}
}
} else {
JSONObject map = new JSONObject();
map.put("struct_code", jsonAttr.getString("struct_code"));
map.put("sect_id", jsonAttr.getString("sect_id"));
map.put("out_order_seq", jsonAttr.getString("out_order_seq"));
map.put("block_num", jsonAttr.getString("block_num"));
map.put("row_num", jsonAttr.getString("row_num"));
JSONArray jsonAllBlockPoint = new JSONArray();
if (StrUtil.equals(jsonAttr.getString("placement_type"), "02")) {
// 02-左通
map.put("flag", "2");
// 判断左边是否被挡住
JSONObject jsonIsBlockL = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().uniqueResult(0);
// 如果被挡住则进行校验
boolean verify = true;
if (ObjectUtil.isEmpty(jsonIsBlockL)) {
verify = false;
} else {
// 调用验证方法进行校验
String out_order_seq = NumberUtil.add(jsonIsBlockL.getString("out_order_seq"), "1").toString();
JSONObject jsonParam = attrTab.query("sect_id = '" + map.getString("sect_id")
+ "' and out_order_seq = '" + out_order_seq
+ "' and block_num = '" + map.getString("block_num")
+ "' and row_num = '" + map.getString("row_num") + "'").uniqueResult(0);
jsonParam.put("iostorinv_id", dis.getString("iostorinv_id"));
jsonParam.put("option", "1");
verify = this.is_trueOrFalse(jsonParam);
}
if (verify) {
// 更新第一个任务 任务组、任务顺序号
jsonTask.put("task_group_id", IdUtil.getSnowflake(1, 1).nextId());
jsonTask.put("sort_seq", 1);
wo_Task.update(jsonTask);
// 从左边生成移库单
map.put("flag", "5");
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
}
}
if (StrUtil.equals(jsonAttr.getString("placement_type"), "03")) {
// 03-右通
map.put("flag", "1");
// 判断左边是否被挡住
JSONObject jsonIsBlockR = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().uniqueResult(0);
// 如果被挡住则进行校验
boolean verify = true;
if (ObjectUtil.isEmpty(jsonIsBlockR)) {
verify = false;
} else {
// 调用验证方法进行校验
String out_order_seq = NumberUtil.sub(jsonIsBlockR.getString("out_order_seq"), "1").toString();
JSONObject jsonParam = attrTab.query("sect_id = '" + map.getString("sect_id")
+ "' and out_order_seq = '" + out_order_seq
+ "' and block_num = '" + map.getString("block_num")
+ "' and row_num = '" + map.getString("row_num") + "'").uniqueResult(0);
jsonParam.put("iostorinv_id", dis.getString("iostorinv_id"));
jsonParam.put("option", "1");
verify = this.is_trueOrFalse(jsonParam);
}
if (verify) {
// 更新第一个任务 任务组、任务顺序号
jsonTask.put("task_group_id", IdUtil.getSnowflake(1, 1).nextId());
jsonTask.put("sort_seq", 1);
wo_Task.update(jsonTask);
// 从右边生成移库单
map.put("flag", "4");
jsonAllBlockPoint = WQL.getWO("ST_OUTIVT03").addParamMap(map).process().getResultJSONArray(0);
}
}
for (int i = 0; i < jsonAllBlockPoint.size(); i++) {
JSONObject json = jsonAllBlockPoint.getJSONObject(i);
JSONObject mapParam = new JSONObject();// 生成移库单传入参数
JSONArray table = new JSONArray(); // 明细参数
mapParam.put("bill_status", "10");
mapParam.put("bill_type", "21");
mapParam.put("buss_type", "21");
mapParam.put("biz_date", DateUtil.today());
mapParam.put("stor_code", "CP01");
mapParam.put("stor_id", "1582991156504039424");
mapParam.put("stor_name", "成品仓库");
mapParam.put("is_task", "1");
// 查询移入货位
JSONObject moveParam = new JSONObject();
moveParam.put("box_no", json.getString("storagevehicle_code"));
moveParam.put("sect_id", RegionTypeEnum.ZZ01.getId());
JSONObject jsonMove = rawAssistIStorService.autoDis(moveParam);
// 查询移出货位的库存物料
JSONObject jsonMoveIvt = WQL.getWO("ST_OUTIVT03")
.addParam("flag", "6")
.addParam("struct_id", json.getString("struct_id"))
.process().uniqueResult(0);
// 移库单明细
JSONObject jsonMoveDtl = new JSONObject();
jsonMoveDtl.put("is_task", "2");
jsonMoveDtl.put("turnout_sect_id", json.getLongValue("sect_id"));
jsonMoveDtl.put("turnout_sect_code", json.getString("sect_code"));
jsonMoveDtl.put("turnout_sect_name", json.getString("sect_name"));
jsonMoveDtl.put("turnout_struct_id", json.getLongValue("struct_id"));
jsonMoveDtl.put("turnout_struct_code", json.getString("struct_code"));
jsonMoveDtl.put("turnout_struct_name", json.getString("struct_name"));
jsonMoveDtl.put("material_id", jsonMoveIvt.getLongValue("material_id"));
jsonMoveDtl.put("pcsn", jsonMoveIvt.getString("pcsn"));
jsonMoveDtl.put("quality_scode", "01");
jsonMoveDtl.put("qty_unit_id", jsonMoveIvt.getLongValue("qty_unit_id"));
jsonMoveDtl.put("qty_unit_name", jsonMoveIvt.getString("unit_name"));
jsonMoveDtl.put("qty", jsonMoveIvt.getDoubleValue("canuse_qty"));
jsonMoveDtl.put("storagevehicle_code", json.getString("storagevehicle_code"));
jsonMoveDtl.put("turnin_sect_id", jsonMove.getLongValue("sect_id"));
jsonMoveDtl.put("turnin_sect_code", jsonMove.getString("sect_code"));
jsonMoveDtl.put("turnin_sect_name", jsonMove.getString("sect_name"));
jsonMoveDtl.put("turnin_struct_id", jsonMove.getLongValue("struct_id"));
jsonMoveDtl.put("turnin_struct_code", jsonMove.getString("struct_code"));
jsonMoveDtl.put("turnin_struct_name", jsonMove.getString("struct_name"));
jsonMoveDtl.put("source_billdtl_id", dis.getLongValue("iostorinvdis_id"));
// 生成任务
JSONObject param2 = new JSONObject();
param2.put("task_type", "010503");
param2.put("vehicle_code", json.getString("storagevehicle_code"));
param2.put("task_name", "task_name");
param2.put("point_code1", json.getString("point_code"));
param2.put("point_code2", jsonMove.getString("struct_code"));
param2.put("task_group_id", jsonTask.getLongValue("task_group_id")); // 任务组
param2.put("sort_seq", jsonTask.getIntValue("sort_seq") + i + 1); // 任务组顺序号
String move_task_id = outTask.createTask(param2);
// 回显移库明细任务id
jsonMoveDtl.put("task_id", move_task_id);
table.add(jsonMoveDtl);
// 更新任务处理类
JSONObject jsonTaskMove = wo_Task.query("task_id = '" + move_task_id + "'").uniqueResult(0);
jsonTaskMove.put("task_type", "010505");
jsonTaskMove.put("handle_class", HandMoveStorAcsTask.class.getName());
wo_Task.update(jsonTaskMove);
mapParam.put("tableData", table);
// 调用移库单新增方法
if (ObjectUtil.isNotEmpty(jsonAllBlockPoint)) {
handMoveStorService.insertDtl2(mapParam);
}
}
}
// 下发
outTask.immediateNotifyAcs(null);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void allSetPoint(JSONObject whereJson) {
@@ -3308,7 +2671,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
for (int k = 0; k < numArr.size(); k++) {
JSONObject json = numArr.getJSONObject(k);
error += json.getString("struct_code") + ",";
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
}
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
@@ -3342,7 +2705,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
for (int k = 0; k < numArr.size(); k++) {
JSONObject json = numArr.getJSONObject(k);
error += json.getString("struct_code") + ",";
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
}
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
@@ -3376,7 +2739,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
for (int k = 0; k < numArr.size(); k++) {
JSONObject json = numArr.getJSONObject(k);
error += json.getString("struct_code") + ",";
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
}
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
@@ -3668,6 +3031,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
@Override
@Transactional(rollbackFor = Exception.class)
public void oneSetPoint2(JSONObject whereJson) {
TranUtil.openTransaction((req, allTransactionConsumer) -> {
allTransactionConsumer.accept("begin");
//出库分配表
WQLObject wo_dis = WQLObject.getWQLObject("ST_IVT_IOStorInvDis");
//点位表
@@ -3766,7 +3131,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
for (int k = 0; k < numArr.size(); k++) {
JSONObject json = numArr.getJSONObject(k);
error += json.getString("struct_code") + ",";
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
}
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
@@ -3798,7 +3163,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
for (int k = 0; k < numArr.size(); k++) {
JSONObject json = numArr.getJSONObject(k);
error += json.getString("struct_code") + ",";
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
}
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
@@ -3830,7 +3195,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
for (int k = 0; k < numArr.size(); k++) {
JSONObject json = numArr.getJSONObject(k);
error += json.getString("struct_code") + ",";
error += json.getString("struct_code") + ", 锁定单据号:"+json.getString("inv_code");
}
throw new BadRequestException("仓位:" + error + "被锁定且未下发任务,无法生成任务!");
@@ -3944,7 +3309,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
moveParam.put("jsonAllBlockPoint", moveArr);
moveParam.put("iostorinvdis_id", jsonObject.getString("iostorinvdis_id"));
moveParam.put("task_group_id", task_group_id);
this.createMove(moveParam, null);
this.createMove(moveParam, allTransactionConsumer);
}
// 判断是否是异常出库口
@@ -3971,7 +3336,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
}
point_id = wo_Point.query("point_code = '" + point_code + "'").uniqueResult(0).getString("point_id");
}
allTransactionConsumer.accept(jsonObject.getString("struct_code"));
// 创建任务
JSONObject param = new JSONObject();
param.put("task_type", "010503");
@@ -4041,6 +3406,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
// 查询此任务组最后一个生成的任务
JSONObject jsonTaskLast = wo_Task.query("task_group_id = '" + task_group_id + "' order by sort_seq DESC").uniqueResult(0);
// 创建任务并添加到任务组
allTransactionConsumer.accept(jsonNext.getString("struct_code"));
JSONObject param2 = new JSONObject();
param2.put("task_type", "010503");
param2.put("vehicle_code", jsonNext.getString("box_no"));
@@ -4053,6 +3419,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
String create_task_id2 = outTask.createTask(param2);
outTask.immediateNotifyAcs(null);
// 更新分配状态、任务标识、出库点位
JSONObject jsonTask2 = wo_Task.query("task_id = '" + create_task_id2 + "'").uniqueResult(0);
JSONObject jsonUpdateMap2 = new JSONObject();
@@ -4093,6 +3461,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
task_group_id = IdUtil.getSnowflake(1, 1).nextId();
} else {
}
return null;
}, new JSONArray());
}
@Transactional(rollbackFor = Exception.class)

View File

@@ -601,29 +601,6 @@ export default {
})
}
},
oneSetPoint() {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.point_code) {
this.crud.notify('站点已设置!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.work_status !== '00') {
this.crud.notify('任务已生成!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.iostorinvdis_id !== null) {
this.currentDis.point_code = this.form2.point_code
checkoutbill.oneSetPoint(this.currentDis).then(res => {
this.queryTableDdis(this.currentDis.iostorinvdtl_id)
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)
}).catch(() => {
this.currentDis.point_code = ''
})
}
},
oneSetPoint2() {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)