Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -56,4 +56,7 @@ public interface AcsConfig {
|
|||||||
String MAXSENDTASKTIME = "maxSendTaskTime";
|
String MAXSENDTASKTIME = "maxSendTaskTime";
|
||||||
//指令下发立库
|
//指令下发立库
|
||||||
String INSTSENDLK = "instSendLk";
|
String INSTSENDLK = "instSendLk";
|
||||||
|
//是否允许下发
|
||||||
|
String ISALLOWTASK= "is_allow_task";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,6 +79,9 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
int task = 0;
|
int task = 0;
|
||||||
int last_task = 0;
|
int last_task = 0;
|
||||||
|
|
||||||
|
int heartbeat = 0;
|
||||||
|
int last_heartbeat = 0;
|
||||||
|
|
||||||
|
|
||||||
Boolean isonline = true;
|
Boolean isonline = true;
|
||||||
int hasGoods = 0;
|
int hasGoods = 0;
|
||||||
@@ -126,6 +129,10 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
walk_y = this.itemProtocol.getWalk_y();
|
walk_y = this.itemProtocol.getWalk_y();
|
||||||
error = this.itemProtocol.getError();
|
error = this.itemProtocol.getError();
|
||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
|
if(heartbeat != last_heartbeat){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "heartbeat:" + last_heartbeat + "->" + heartbeat);
|
||||||
|
}
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
if (mode == 2) {
|
if (mode == 2) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号复位前requireSuccess:" + requireSucess);
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号复位前requireSuccess:" + requireSucess);
|
||||||
@@ -171,17 +178,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
inst1.setInstruction_status("1");
|
inst1.setInstruction_status("1");
|
||||||
inst1.setExecute_device_code(this.device_code);
|
inst1.setExecute_device_code(this.device_code);
|
||||||
instructionService.update(inst1);
|
instructionService.update(inst1);
|
||||||
// TaskDto tas未反馈电气信号原因kDto = taskserver.findByCodeFromCache(inst1.getTask_code());
|
|
||||||
// if (ObjectUtil.isNotEmpty(taskDto)) {
|
|
||||||
// if (StrUtil.isNotEmpty(taskDto.getExt_task_id())) {
|
|
||||||
// JSONArray array = new JSONArray();
|
|
||||||
// JSONObject map = new JSONObject();
|
|
||||||
// map.put("task_id", taskDto.getExt_task_id());
|
|
||||||
// map.put("task_status", "1");
|
|
||||||
// array.add(map);
|
|
||||||
// acsToWmsService.feedbackTaskStatusToWms(array);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -428,7 +424,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
} catch (Exception var17) {
|
} catch (Exception var17) {
|
||||||
var17.printStackTrace();
|
var17.printStackTrace();
|
||||||
feedMessage = var17.getMessage();
|
feedMessage = var17.getMessage();
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "读取信号值时出现异常:" + var17.getMessage());
|
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage()+ ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!this.itemProtocol.getIsonline()) {
|
// if (!this.itemProtocol.getIsonline()) {
|
||||||
@@ -488,6 +485,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
last_walk_y = walk_y;
|
last_walk_y = walk_y;
|
||||||
last_error = error;
|
last_error = error;
|
||||||
last_task = task;
|
last_task = task;
|
||||||
|
last_heartbeat = heartbeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -592,6 +590,10 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
this.writing("to_target", next_addr);
|
this.writing("to_target", next_addr);
|
||||||
this.writing("to_task", instruction.getInstruction_code());
|
this.writing("to_task", instruction.getInstruction_code());
|
||||||
this.writing("to_command", "1");
|
this.writing("to_command", "1");
|
||||||
|
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver();
|
||||||
|
hongXiangConveyorDeviceDriver.writing("to_open_door","1");
|
||||||
|
}
|
||||||
if (nextdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
if (nextdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) nextdevice.getDeviceDriver();
|
||||||
hongXiangConveyorDeviceDriver.writing("to_open_door","1");
|
hongXiangConveyorDeviceDriver.writing("to_open_door","1");
|
||||||
|
|||||||
@@ -122,7 +122,8 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
String inst_message;
|
String inst_message;
|
||||||
String last_inst_message;
|
String last_inst_message;
|
||||||
|
int heartbeat = 0;
|
||||||
|
int last_heartbeat = 0;
|
||||||
//当前指令
|
//当前指令
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
@@ -149,6 +150,10 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
error = this.itemProtocol.getError();
|
error = this.itemProtocol.getError();
|
||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
to_command = this.itemProtocol.getTo_command();
|
to_command = this.itemProtocol.getTo_command();
|
||||||
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
|
if(heartbeat != last_heartbeat){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "heartbeat:" + last_heartbeat + "->" + heartbeat);
|
||||||
|
}
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
if (mode == 2) {
|
if (mode == 2) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
@@ -227,8 +232,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
|
|
||||||
} catch (Exception var17) {
|
} catch (Exception var17) {
|
||||||
var17.printStackTrace();
|
var17.printStackTrace();
|
||||||
inst_message = var17.getMessage();
|
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage()+ ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol) );
|
||||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "读取信号值时出现异常:" + var17.getMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if("true".equals(this.device.getExtraValue().get("ship_device_update"))){
|
if("true".equals(this.device.getExtraValue().get("ship_device_update"))){
|
||||||
@@ -313,6 +317,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
last_carrier_direction = carrier_direction;
|
last_carrier_direction = carrier_direction;
|
||||||
last_error = error;
|
last_error = error;
|
||||||
last_task = task;
|
last_task = task;
|
||||||
|
last_heartbeat = heartbeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void shipDeviceUpdate() {
|
private void shipDeviceUpdate() {
|
||||||
|
|||||||
@@ -88,7 +88,8 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
int last_task = 0;
|
int last_task = 0;
|
||||||
int agvphase = 0;
|
int agvphase = 0;
|
||||||
String task_code = null;
|
String task_code = null;
|
||||||
|
int heartbeat = 0;
|
||||||
|
int last_heartbeat = 0;
|
||||||
int phase = 0;
|
int phase = 0;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Boolean isonline = true;
|
Boolean isonline = true;
|
||||||
@@ -142,6 +143,10 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
carrier_direction = this.itemProtocol.getCarrier_direction();
|
carrier_direction = this.itemProtocol.getCarrier_direction();
|
||||||
error = this.itemProtocol.getError();
|
error = this.itemProtocol.getError();
|
||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
|
if(heartbeat != last_heartbeat){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "heartbeat:" + last_heartbeat + "->" + heartbeat);
|
||||||
|
}
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
if (mode == 2) {
|
if (mode == 2) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
@@ -262,6 +267,7 @@ public class SiemensConveyorCkkDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
last_carrier_direction = carrier_direction;
|
last_carrier_direction = carrier_direction;
|
||||||
last_error = error;
|
last_error = error;
|
||||||
last_task = task;
|
last_task = task;
|
||||||
|
last_heartbeat = heartbeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void shipDeviceUpdate() {
|
private void shipDeviceUpdate() {
|
||||||
|
|||||||
@@ -69,7 +69,8 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
@Autowired NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
@Autowired NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||||
// 当前指令
|
// 当前指令
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
int heartbeat = 0;
|
||||||
|
int last_heartbeat = 0;
|
||||||
// 工作模式
|
// 工作模式
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
@@ -139,6 +140,10 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
error = this.itemProtocol.getError();
|
error = this.itemProtocol.getError();
|
||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
weight = this.itemProtocol.getWeight();
|
weight = this.itemProtocol.getWeight();
|
||||||
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
|
if(heartbeat != last_heartbeat){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "heartbeat:" + last_heartbeat + "->" + heartbeat);
|
||||||
|
}
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
if (mode == 2) {
|
if (mode == 2) {
|
||||||
requireSucess = false;
|
requireSucess = false;
|
||||||
@@ -281,6 +286,8 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
|
|||||||
last_carrier_direction = carrier_direction;
|
last_carrier_direction = carrier_direction;
|
||||||
last_error = error;
|
last_error = error;
|
||||||
last_task = task;
|
last_task = task;
|
||||||
|
last_heartbeat = heartbeat;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean exe_error() {
|
public boolean exe_error() {
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ public class SiemensOneFloorAGVConveyorDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||||
//当前指令
|
//当前指令
|
||||||
Instruction inst = null;
|
Instruction inst = null;
|
||||||
|
int heartbeat = 0;
|
||||||
|
int last_heartbeat = 0;
|
||||||
//工作模式
|
//工作模式
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
int last_mode = 0;
|
int last_mode = 0;
|
||||||
|
|||||||
@@ -104,6 +104,9 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
|
|
||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
|
|
||||||
|
int heartbeat = 0;
|
||||||
|
int last_heartbeat = 0;
|
||||||
|
|
||||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
@@ -158,7 +161,10 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
task2 = this.itemProtocol.getTask2();
|
task2 = this.itemProtocol.getTask2();
|
||||||
to_command1 = this.itemProtocol.getTo_command1();
|
to_command1 = this.itemProtocol.getTo_command1();
|
||||||
to_command2 = this.itemProtocol.getTo_command2();
|
to_command2 = this.itemProtocol.getTo_command2();
|
||||||
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
|
if(heartbeat != last_heartbeat){
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "heartbeat:" + last_heartbeat + "->" + heartbeat);
|
||||||
|
}
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
if (mode == 2) {
|
if (mode == 2) {
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为:" + requireSucess);
|
logServer.deviceExecuteLog(device_code, "", "", "开始请求标记复位`此时请求标记值为:" + requireSucess);
|
||||||
@@ -626,12 +632,11 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
} catch (Exception var17) {
|
feedMessage = e.getMessage();
|
||||||
var17.printStackTrace();
|
System.out.println("11111111:"+e.getMessage());
|
||||||
feedMessage = var17.getMessage();
|
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + e.getMessage()+ ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol) );
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == 0) {
|
if (mode == 0) {
|
||||||
@@ -724,6 +729,7 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
last_type = type;
|
last_type = type;
|
||||||
last_task1 = task1;
|
last_task1 = task1;
|
||||||
last_task2 = task2;
|
last_task2 = task2;
|
||||||
|
last_heartbeat = heartbeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
//关联设备异常申请任务
|
//关联设备异常申请任务
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ public class ItemProtocol {
|
|||||||
return this.getOpcStringValue(item_barcode);
|
return this.getOpcStringValue(item_barcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTotTask() {
|
||||||
|
return this.getOpcIntegerValue(item_to_task);
|
||||||
|
}
|
||||||
|
|
||||||
Boolean isonline;
|
Boolean isonline;
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
int action = 0;
|
int action = 0;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int task = 0;
|
int task = 0;
|
||||||
|
int to_task = 0;
|
||||||
String plcbarcode = null;
|
String plcbarcode = null;
|
||||||
String last_plcbarcode = null;
|
String last_plcbarcode = null;
|
||||||
int plcbarcode_length = 0;
|
int plcbarcode_length = 0;
|
||||||
@@ -193,7 +194,7 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
task = this.itemProtocol.getTask();
|
task = this.itemProtocol.getTask();
|
||||||
plcbarcode = this.itemProtocol.getplcBarCode();
|
plcbarcode = this.itemProtocol.getplcBarCode();
|
||||||
plcbarcode_length = this.itemProtocol.getBarCode_length();
|
plcbarcode_length = this.itemProtocol.getBarCode_length();
|
||||||
|
to_task = this.itemProtocol.getTotTask();
|
||||||
if (mode != last_mode) {
|
if (mode != last_mode) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode +"复位请求标记");
|
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + "->" + mode +"复位请求标记");
|
||||||
if(mode == 2){
|
if(mode == 2){
|
||||||
@@ -549,10 +550,44 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
//需要判断指令中的指令 再次请求不能生成
|
//需要判断指令中的指令 再次请求不能生成
|
||||||
if (!ObjectUtils.isEmpty(instructionService.findByTaskcodeAndStatus(taskdto.getTask_code(),"1"))) {
|
if (!ObjectUtils.isEmpty(instructionService.findByTaskcodeAndStatus(taskdto.getTask_code(),"1"))) {
|
||||||
{
|
{
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请任务时该载具号" + container_code
|
Instruction instdto = instructionService.findByTaskcodeAndStatus(taskdto.getTask_code(),"1");
|
||||||
+ "已存在对应任务");
|
if(to_task != Integer.parseInt(instdto.getInstruction_code())){
|
||||||
requireSucess = true;
|
List list = new ArrayList();
|
||||||
applySucess = true;
|
Map map = new HashMap();
|
||||||
|
if (StrUtil.isNotEmpty(taskdto.getTo_z())) {
|
||||||
|
if (StrUtil.equals(taskdto.getTo_z(), "01")) {
|
||||||
|
map.put("code", "to_target");
|
||||||
|
map.put("value", "102");
|
||||||
|
} else if (StrUtil.equals(taskdto.getTo_z(), "02")) {
|
||||||
|
map.put("code", "to_target");
|
||||||
|
map.put("value", "201");
|
||||||
|
} else if (StrUtil.equals(taskdto.getTo_z(), "03")) {
|
||||||
|
map.put("code", "to_target");
|
||||||
|
map.put("value", "301");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
list.add(map);
|
||||||
|
Map map2 = new HashMap();
|
||||||
|
map2.put("code", "to_task");
|
||||||
|
map2.put("value", instdto.getInstruction_code());
|
||||||
|
list.add(map2);
|
||||||
|
Map map3 = new HashMap();
|
||||||
|
map3.put("code", "to_command");
|
||||||
|
map3.put("value", "1");
|
||||||
|
list.add(map3);
|
||||||
|
this.writing(list);
|
||||||
|
message = "下发电气任务号成功";
|
||||||
|
requireSucess = true;
|
||||||
|
applySucess = true;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请任务时该载具号" + container_code
|
||||||
|
+ "已存在对应任务");
|
||||||
|
requireSucess = true;
|
||||||
|
applySucess = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -472,7 +472,15 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
log.info("crateTask-----输入参数{}", param);
|
log.info("crateTask-----输入参数{}", param);
|
||||||
JSONArray datas = JSONArray.parseArray(param);
|
JSONArray datas = JSONArray.parseArray(param);
|
||||||
CreateTaskResponse response = new CreateTaskResponse();
|
CreateTaskResponse response = new CreateTaskResponse();
|
||||||
|
ParamService paramService = SpringContextHolder.getBean(ParamService.class);
|
||||||
|
String cancelTaskCheck = paramService.findByCode(AcsConfig.ISALLOWTASK).getValue();
|
||||||
JSONArray errArr = new JSONArray();
|
JSONArray errArr = new JSONArray();
|
||||||
|
if(StrUtil.equals(cancelTaskCheck,"0")){
|
||||||
|
response.setStatus(400);
|
||||||
|
response.setMessage("ACS系统需要更新,请稍等");
|
||||||
|
response.setErrArr(datas);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
for (int i = 0; i < datas.size(); i++) {
|
for (int i = 0; i < datas.size(); i++) {
|
||||||
String data = datas.get(i).toString();
|
String data = datas.get(i).toString();
|
||||||
CreateTaskRequest request = JsonUtl.format(data, CreateTaskRequest.class);
|
CreateTaskRequest request = JsonUtl.format(data, CreateTaskRequest.class);
|
||||||
|
|||||||
@@ -189,9 +189,12 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
|||||||
JSONObject ins = new JSONObject();
|
JSONObject ins = new JSONObject();
|
||||||
ins.put("task_id", jo.get("instruction_id"));
|
ins.put("task_id", jo.get("instruction_id"));
|
||||||
ins.put("task_code", jo.get("instruction_code"));
|
ins.put("task_code", jo.get("instruction_code"));
|
||||||
|
ins.put("task_type", jo.get("instruction_type"));
|
||||||
ins.put("task_status", jo.get("instruction_status"));
|
ins.put("task_status", jo.get("instruction_status"));
|
||||||
ins.put("start_point_code", jo.get("start_point_code"));
|
ins.put("start_point_code", jo.get("start_point_code"));
|
||||||
|
ins.put("start_point_code2", jo.get("start_point_code2"));
|
||||||
ins.put("next_point_code", jo.get("next_point_code"));
|
ins.put("next_point_code", jo.get("next_point_code"));
|
||||||
|
ins.put("next_point_code2", jo.get("next_point_code2"));
|
||||||
ins.put("matarial", jo.get("matarial"));
|
ins.put("matarial", jo.get("matarial"));
|
||||||
ins.put("remark", jo.get("remark"));
|
ins.put("remark", jo.get("remark"));
|
||||||
ins.put("create_by", jo.get("create_by"));
|
ins.put("create_by", jo.get("create_by"));
|
||||||
|
|||||||
@@ -81,6 +81,10 @@
|
|||||||
inst.start_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
inst.start_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||||
OR
|
OR
|
||||||
inst.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
inst.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||||
|
OR
|
||||||
|
inst.start_point_code2 LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||||
|
OR
|
||||||
|
inst.next_point_code2 LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||||
)
|
)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.instruction_type <> ""
|
OPTION 输入.instruction_type <> ""
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
|||||||
itemStatus = group.read(true, (Item[]) itemsMap.values().toArray(new Item[0]));
|
itemStatus = group.read(true, (Item[]) itemsMap.values().toArray(new Item[0]));
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
System.out.println("数据同步异常:"+ this.getOpcServer().getOpc_code());
|
System.out.println("数据同步异常:"+ this.getOpcServer().getOpc_code());
|
||||||
|
log.trace("数据同步异常:{}", this.getOpcServer().getOpc_code());
|
||||||
//e.printStackTrace();
|
//e.printStackTrace();
|
||||||
}
|
}
|
||||||
long end = System.currentTimeMillis();
|
long end = System.currentTimeMillis();
|
||||||
@@ -130,7 +131,7 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
|||||||
System.out.println("线程:"+tag + " 读取耗时:"+ duration);
|
System.out.println("线程:"+tag + " 读取耗时:"+ duration);
|
||||||
if (duration > 1000L) {
|
if (duration > 1000L) {
|
||||||
if (!time_out) {
|
if (!time_out) {
|
||||||
log.warn("{} 读取超时 : {}", tag, duration);
|
log.warn(" {} 读取超时 : {}", tag, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
time_out = true;
|
time_out = true;
|
||||||
@@ -138,7 +139,11 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
|||||||
time_out = false;
|
time_out = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(ObjectUtil.isEmpty(itemStatus)) continue label97;
|
if(ObjectUtil.isEmpty(itemStatus)) {
|
||||||
|
System.out.println( tag + " :itemStatus is null");
|
||||||
|
log.warn(" {} 读取异常 : {} itemStatus is null", tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Set<Item> items = itemStatus.keySet();
|
Set<Item> items = itemStatus.keySet();
|
||||||
Iterator var18 = items.iterator();
|
Iterator var18 = items.iterator();
|
||||||
@@ -167,12 +172,13 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
|||||||
value = OpcUtl.getValue(item, itemState);
|
value = OpcUtl.getValue(item, itemState);
|
||||||
his = accessor_value.getValue(item.getId());
|
his = accessor_value.getValue(item.getId());
|
||||||
if (!ObjectUtl.isEquals(itemState.getQuality(), QualityTypeValue.OPC_QUALITY_GOOD) && his != null) {
|
if (!ObjectUtl.isEquals(itemState.getQuality(), QualityTypeValue.OPC_QUALITY_GOOD) && his != null) {
|
||||||
log.warn("opc 值不健康 item: {}, 状态: {}", item.getId(), itemState.getQuality());
|
log.warn("opc 值不健康 item: {}, 状态: {},当前读取值:{}, 系统内存值{} ", item.getId(), itemState.getQuality(), value, his);
|
||||||
}
|
}
|
||||||
} while (ObjectUtil.equal(value, his));//如果两次的值相等,不走下面的代码
|
} while (ObjectUtil.equal(value, his));//如果两次的值相等,不走下面的代码
|
||||||
|
|
||||||
OpcItemDto itemDto = this.getItem(item.getId());
|
OpcItemDto itemDto = this.getItem(item.getId());
|
||||||
if (itemDto.getNeed_log() != null && itemDto.getNeed_log()) {
|
//默认记录日志
|
||||||
|
if (true) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
//设备的ITEM项
|
//设备的ITEM项
|
||||||
List<String> relate_items = itemDto.getRelate_items();
|
List<String> relate_items = itemDto.getRelate_items();
|
||||||
@@ -184,7 +190,7 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
|||||||
sb.append("key:" + relate + "value:" + obj + ";");
|
sb.append("key:" + relate + "value:" + obj + ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("信号{}变更从{}->{};信号快照:{}", new Object[]{item.getId(), his, value, sb});
|
log.warn("信号{}变更从{}->{};信号快照:{}", new Object[]{item.getId(), his, value, sb});
|
||||||
|
|
||||||
}
|
}
|
||||||
// accessor_value.setValueWithPersistence(item.getId(),accessor_value.getValue(item.getId()));
|
// accessor_value.setValueWithPersistence(item.getId(),accessor_value.getValue(item.getId()));
|
||||||
@@ -199,6 +205,7 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
|||||||
try {
|
try {
|
||||||
this.server.disconnect();
|
this.server.disconnect();
|
||||||
} catch (Exception var25) {
|
} catch (Exception var25) {
|
||||||
|
log.warn("{} : server disconnect", var25);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,6 +220,7 @@ public class DeviceOpcProtocolRunable implements Runnable {
|
|||||||
Thread.sleep((long) (OpcConfig.synchronized_exception_wait_second * 1000));
|
Thread.sleep((long) (OpcConfig.synchronized_exception_wait_second * 1000));
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
log.warn("OPC 读取线程读取异常{} :", e);
|
||||||
// Thread.currentThread().interrupt();不会真正停止线程
|
// Thread.currentThread().interrupt();不会真正停止线程
|
||||||
}
|
}
|
||||||
++this.error_num;
|
++this.error_num;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ public class OpcConfig {
|
|||||||
public static Boolean auto_start_opc = Boolean.valueOf(true);
|
public static Boolean auto_start_opc = Boolean.valueOf(true);
|
||||||
public static String udw_opc_value_key = "opc_value";
|
public static String udw_opc_value_key = "opc_value";
|
||||||
public static Integer synchronized_millisecond = Integer.valueOf(100);
|
public static Integer synchronized_millisecond = Integer.valueOf(100);
|
||||||
public static Integer synchronized_exception_wait_second = Integer.valueOf(10);
|
public static Integer synchronized_exception_wait_second = Integer.valueOf(3);
|
||||||
public static Integer retry_times = Integer.valueOf(3);
|
public static Integer retry_times = Integer.valueOf(3);
|
||||||
public static String sync_issue_type_code = "device_opc_sync";
|
public static String sync_issue_type_code = "device_opc_sync";
|
||||||
public static String opc_server_default_group = "group";
|
public static String opc_server_default_group = "group";
|
||||||
|
|||||||
@@ -1179,6 +1179,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
instdto.setAgv_inst_type("2");
|
instdto.setAgv_inst_type("2");
|
||||||
} else if (StrUtil.equals(task_type, "2")) {
|
} else if (StrUtil.equals(task_type, "2")) {
|
||||||
instdto.setAgv_inst_type("3");
|
instdto.setAgv_inst_type("3");
|
||||||
|
} else if (StrUtil.equals(task_type, "8")) {
|
||||||
|
instdto.setAgv_inst_type("2");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
instdto.setAgv_inst_type("4");
|
instdto.setAgv_inst_type("4");
|
||||||
|
|||||||
@@ -105,6 +105,10 @@ IF 输入.flag = "2"
|
|||||||
task.start_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
task.start_point_code LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||||
OR
|
OR
|
||||||
task.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%')
|
task.next_point_code LIKE CONCAT ( '%', 输入.point_code, '%')
|
||||||
|
OR
|
||||||
|
task.start_point_code2 LIKE CONCAT ( '%', 输入.point_code, '%' )
|
||||||
|
OR
|
||||||
|
task.next_point_code2 LIKE CONCAT ( '%', 输入.point_code, '%')
|
||||||
)
|
)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
OPTION 输入.create_time <> ""
|
OPTION 输入.create_time <> ""
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ spring:
|
|||||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lzhl_one_wcs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
# password: ${DB_PWD:P@ssw0rd}
|
# password: ${DB_PWD:P@ssw0rd}
|
||||||
# password: ${DB_PWD:Root.123456}
|
# password: ${DB_PWD:Root.123456}
|
||||||
password: ${DB_PWD:123456}
|
password: ${DB_PWD:password}
|
||||||
|
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<include resource="log/WmsToAcs.xml"/>
|
<include resource="log/WmsToAcs.xml"/>
|
||||||
<include resource="log/OpcUtil.xml"/>
|
<include resource="log/OpcUtil.xml"/>
|
||||||
<include resource="log/TwoNDCSocketConnectionAutoRun.xml"/>
|
<include resource="log/TwoNDCSocketConnectionAutoRun.xml"/>
|
||||||
<include resource="log/TwoNdcOneDeviceDriver.xml"/>
|
<include resource="log/AgvNdcTwoDeviceDriver.xml"/>
|
||||||
<include resource="log/TwoNDC2SocketConnectionAutoRun.xml"/>
|
<include resource="log/TwoNDC2SocketConnectionAutoRun.xml"/>
|
||||||
|
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
|
|
||||||
<!--生产环境:打印控制台和输出到文件-->
|
<!--生产环境:打印控制台和输出到文件-->
|
||||||
<springProfile name="prod">
|
<springProfile name="prod">
|
||||||
<root level="debug">
|
<root level="info">
|
||||||
<appender-ref ref="ERROR"/>
|
<appender-ref ref="ERROR"/>
|
||||||
<appender-ref ref="lokiAppender" />
|
<appender-ref ref="lokiAppender" />
|
||||||
<appender-ref ref="asyncFileAppender"/>
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
|
|||||||
@@ -99,16 +99,20 @@
|
|||||||
<el-table-column prop="instruction_code" label="指令编号" />
|
<el-table-column prop="instruction_code" label="指令编号" />
|
||||||
<el-table-column prop="task_code" label="任务号" />
|
<el-table-column prop="task_code" label="任务号" />
|
||||||
<el-table-column prop="vehicle_code" label="载具号" />
|
<el-table-column prop="vehicle_code" label="载具号" />
|
||||||
|
<el-table-column prop="instruction_type" label="指令类型" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.task_type[scope.row.instruction_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="instruction_status" label="指令状态">
|
<el-table-column prop="instruction_status" label="指令状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.instruction_status=='0' ">就绪</span>
|
{{ dict.label.task_status[scope.row.instruction_status] }}
|
||||||
<span v-if="scope.row.instruction_status=='1' ">执行中</span>
|
|
||||||
<span v-if="scope.row.instruction_status=='2' ">完成</span>
|
|
||||||
<span v-if="scope.row.instruction_status=='3' ">取消</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="start_point_code" label="起点" />
|
<el-table-column prop="start_point_code" label="起点" />
|
||||||
<el-table-column prop="next_point_code" label="终点" />
|
<el-table-column prop="next_point_code" label="终点" />
|
||||||
|
<el-table-column prop="start_point_code2" label="起点2" />
|
||||||
|
<el-table-column prop="next_point_code2" label="终点2" />
|
||||||
<el-table-column prop="matarial" label="物料" />
|
<el-table-column prop="matarial" label="物料" />
|
||||||
<el-table-column prop="quantity" label="数量" />
|
<el-table-column prop="quantity" label="数量" />
|
||||||
<el-table-column prop="remark" label="描述" />
|
<el-table-column prop="remark" label="描述" />
|
||||||
@@ -167,7 +171,7 @@ const defaultForm = {
|
|||||||
update_time: null
|
update_time: null
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
dicts: ['task_status'],
|
dicts: ['task_status', 'task_type'],
|
||||||
name: 'Instruction',
|
name: 'Instruction',
|
||||||
components: { pagination, crudOperation, Search },
|
components: { pagination, crudOperation, Search },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
|||||||
@@ -232,17 +232,21 @@
|
|||||||
<el-table-column v-if="false" prop="task_id" label="任务标识" />
|
<el-table-column v-if="false" prop="task_id" label="任务标识" />
|
||||||
<el-table-column prop="task_code" label="任务号" />
|
<el-table-column prop="task_code" label="任务号" />
|
||||||
<el-table-column prop="vehicle_code" label="载具号" />
|
<el-table-column prop="vehicle_code" label="载具号" />
|
||||||
|
<el-table-column prop="task_type" label="任务类型" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.task_type[scope.row.task_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="task_status" label="任务状态">
|
<el-table-column prop="task_status" label="任务状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.task_status=='0' ">就绪</span>
|
{{ dict.label.task_status[scope.row.task_status] }}
|
||||||
<span v-if="scope.row.task_status=='1' ">执行中</span>
|
|
||||||
<span v-if="scope.row.task_status=='2' ">完成</span>
|
|
||||||
<span v-if="scope.row.task_status=='3' ">取消</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="priority" label="任务优先级" />
|
<el-table-column prop="priority" label="任务优先级" />
|
||||||
<el-table-column prop="start_point_code" label="起点" />
|
<el-table-column prop="start_point_code" label="起点" />
|
||||||
<el-table-column prop="next_point_code" label="终点" />
|
<el-table-column prop="next_point_code" label="终点" />
|
||||||
|
<el-table-column prop="start_point_code2" label="起点2" />
|
||||||
|
<el-table-column prop="start_point_code2" label="终点2" />
|
||||||
<el-table-column prop="matarial" label="物料" />
|
<el-table-column prop="matarial" label="物料" />
|
||||||
<el-table-column prop="quantity" label="数量" />
|
<el-table-column prop="quantity" label="数量" />
|
||||||
<el-table-column prop="remark" label="备注" />
|
<el-table-column prop="remark" label="备注" />
|
||||||
@@ -288,7 +292,7 @@ const defaultForm = {
|
|||||||
export default {
|
export default {
|
||||||
name: 'Task',
|
name: 'Task',
|
||||||
components: { pagination, crudOperation, Search },
|
components: { pagination, crudOperation, Search },
|
||||||
dicts: ['task_status'],
|
dicts: ['task_status', 'task_type'],
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
|
|||||||
@@ -89,11 +89,14 @@
|
|||||||
<el-table-column v-if="false" prop="task_id" label="任务标识" />
|
<el-table-column v-if="false" prop="task_id" label="任务标识" />
|
||||||
<el-table-column prop="task_code" label="任务号(指令编号)" />
|
<el-table-column prop="task_code" label="任务号(指令编号)" />
|
||||||
<el-table-column prop="vehicle_code" label="载具号" />
|
<el-table-column prop="vehicle_code" label="载具号" />
|
||||||
|
<el-table-column prop="task_type" label="任务类型" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ dict.label.task_type[scope.row.task_type] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="task_status" label="状态">
|
<el-table-column prop="task_status" label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.task_status=='0' ">就绪</span>
|
{{ dict.label.task_status[scope.row.task_status] }}
|
||||||
<span v-if="scope.row.task_status=='1' ">执行中</span>
|
|
||||||
<span v-if="scope.row.task_status=='2' ">完成</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="priority" label="任务优先级" />
|
<el-table-column prop="priority" label="任务优先级" />
|
||||||
@@ -138,7 +141,7 @@ const defaultForm = {
|
|||||||
export default {
|
export default {
|
||||||
name: 'Task',
|
name: 'Task',
|
||||||
components: { pagination, crudOperation, Search },
|
components: { pagination, crudOperation, Search },
|
||||||
dicts: ['task_status'],
|
dicts: ['task_status', 'task_type'],
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '任务', url: 'api/task/getAll', idField: 'task_id', sort: 'task_id,desc', crudMethod: { ...crudTask }, optShow: {
|
return CRUD({ title: '任务', url: 'api/task/getAll', idField: 'task_id', sort: 'task_id,desc', crudMethod: { ...crudTask }, optShow: {
|
||||||
|
|||||||
@@ -153,7 +153,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogFormVisible1 = false">取 消</el-button>
|
<el-button @click="dialogFormVisible1 = false">取 消</el-button>
|
||||||
<el-button type=this"primary" @click="saveBarcode">确 定</el-button>
|
<el-button type="primary" @click="saveBarcode">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4099,9 +4099,15 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
//更新改切子卷为该子卷的分切计划
|
//更新改切子卷为该子卷的分切计划
|
||||||
JSONObject source_dtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl").query("iostorinv_id = '" + iostorinv_id + "' AND IFNULL(source_billdtl_id,'') <> ''").uniqueResult(0);
|
JSONObject source_dtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl").query("iostorinv_id = '" + iostorinv_id + "' AND IFNULL(source_billdtl_id,'') <> ''").uniqueResult(0);
|
||||||
|
|
||||||
HashMap<String, String> map = new HashMap<>();
|
JSONObject jsonPlan = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("package_box_sn = '" + source_dtl.getString("box_no") + "'").uniqueResult(0);
|
||||||
map.put("is_parent_ok", "1");
|
|
||||||
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map, "restruct_container_name = '" + source_dtl.getString("pcsn") + "'");
|
if (ObjectUtil.isEmpty(jsonPlan)) throw new BadRequestException("未找到对应改制计划");
|
||||||
|
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("is_parent_ok","1");
|
||||||
|
|
||||||
|
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(map,"package_box_sn = '"+source_dtl.getString("box_no")+"'");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user