rev 修改
This commit is contained in:
@@ -915,13 +915,15 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
JSONObject updatejson = (JSONObject) JSONObject.toJSON(obj);
|
||||
runpointwo.update(updatejson, "device_code = '" + device_code + "'");
|
||||
}
|
||||
}
|
||||
else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
} else if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||
standardInspectSiteDeviceDriver.setMaterial(material_type);
|
||||
standardInspectSiteDeviceDriver.setBatch(batch);
|
||||
device.setMaterial_type(material_type);
|
||||
device.setBatch(batch);
|
||||
} else if (device.getDeviceDriver() instanceof StandardCoveyorControlWithScannerDeviceDriver) {
|
||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver = (StandardCoveyorControlWithScannerDeviceDriver) device.getDeviceDriver();
|
||||
standardCoveyorControlWithScannerDeviceDriver.setDeviceStatus(form);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -645,12 +645,20 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("message", this.getMessage());
|
||||
jo.put("task", this.getTask());
|
||||
jo.put("requireSucess", requireSucess == true ? "1" : "0");
|
||||
jo.put("barcode", this.getBarcode());
|
||||
jo.put("is_click", true);
|
||||
jo.put("driver_type", "standard_conveyor_control_with_scanner");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeviceStatus(JSONObject data) {
|
||||
|
||||
String requireSucess = data.getString("requireSucess");
|
||||
if (requireSucess.equals("1")){
|
||||
this.requireSucess = true;
|
||||
} else if (requireSucess.equals("0")){
|
||||
this.requireSucess = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.route.service.dto.RouteLineDto;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -151,6 +152,7 @@ public class AutoCreateInst {
|
||||
}
|
||||
|
||||
Instruction instdto = new Instruction();
|
||||
//instdto.setInstruction_code(CodeUtil.getNewCode("INSTRUCT_NO"));
|
||||
instdto.setInstruction_type(acsTask.getTask_type());
|
||||
instdto.setInstruction_id(IdUtil.simpleUUID());
|
||||
instdto.setRoute_plan_code(route_plan_code);
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.nl.modules.quartz.service.QuartzJobService;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.quartz.DisallowConcurrentExecution;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.PersistJobDataAfterExecution;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.quartz.QuartzJobBean;
|
||||
|
||||
@@ -43,6 +44,7 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
@SuppressWarnings({"unchecked", "all"})
|
||||
@Slf4j
|
||||
@DisallowConcurrentExecution
|
||||
@PersistJobDataAfterExecution
|
||||
public class ExecutionJob extends QuartzJobBean {
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,8 @@ import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -98,6 +100,7 @@ public class GenCodeServiceImpl implements GenCodeService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public String codeDemo(Map form) {
|
||||
String code = (String) form.get("code");
|
||||
String id = this.queryIdByCode(code);
|
||||
|
||||
@@ -2,18 +2,20 @@ package org.nl.modules.system.util;
|
||||
|
||||
import org.nl.modules.system.service.GenCodeService;
|
||||
import org.nl.modules.system.service.impl.GenCodeServiceImpl;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class CodeUtil {
|
||||
|
||||
public static synchronized String getNewCode(String ruleCode){
|
||||
GenCodeService service=new GenCodeServiceImpl();
|
||||
public static String getNewCode(String ruleCode){
|
||||
synchronized (ruleCode.intern()){
|
||||
String flag = "1";
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("flag",flag);
|
||||
map.put("code",ruleCode);
|
||||
return service.codeDemo(map);
|
||||
return SpringContextHolder.getBean(GenCodeService.class).codeDemo(map);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
this.timmer = setTimeout(() => {
|
||||
sessionStorage.clear()
|
||||
this.logout()
|
||||
}, 1000 * 60 * 15) // 15分钟 https://blog.csdn.net/qq_42345108/article/details/103496456
|
||||
}, 100000 * 60 * 15) // 15分钟 https://blog.csdn.net/qq_42345108/article/details/103496456
|
||||
},
|
||||
logout() {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
|
||||
@@ -79,18 +79,18 @@
|
||||
<el-form-item label="设备编号" prop="device_code" label-width="120px">
|
||||
<el-input v-model="form.device_code" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="缺料请求成功" prop="requireSucess" label-width="120px">
|
||||
<el-form-item label="请求标记" prop="requireSucess" label-width="120px">
|
||||
<el-radio-group v-model="form.requireSucess">
|
||||
<el-radio-button :label="0">否</el-radio-button>
|
||||
<el-radio-button :label="1">是</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="空想请求成功" prop="fullrequireSucess" label-width="120px">
|
||||
<el-radio-group v-model="form.fullrequireSucess">
|
||||
<el-radio-button :label="0">否</el-radio-button>
|
||||
<el-radio-button :label="1">是</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="空箱请求成功" prop="fullrequireSucess" label-width="120px">-->
|
||||
<!-- <el-radio-group v-model="form.fullrequireSucess">-->
|
||||
<!-- <el-radio-button :label="0">否</el-radio-button>-->
|
||||
<!-- <el-radio-button :label="1">是</el-radio-button>-->
|
||||
<!-- </el-radio-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible4 = false">取 消</el-button>
|
||||
@@ -210,7 +210,7 @@ export default {
|
||||
nodeMenu: false
|
||||
})
|
||||
lf.on('node:click', (data, e) => { // 鼠标点击节点
|
||||
console.log("data: ", data)
|
||||
console.log('data: ', data)
|
||||
// 展开显示设备信息
|
||||
if (data.data.type !== 'pro-rect' && data.data.type !== 'pro-circle' && data.data.type !== 'triangle' && data.data.type !== 'rect-radius') {
|
||||
if (data.data.properties.device) {
|
||||
@@ -276,7 +276,7 @@ export default {
|
||||
} else {
|
||||
if (clickObj.data.driver_type === 'standard_ordinary_site') {
|
||||
this.dialogFormVisible3 = true
|
||||
} else if (clickObj.data.driver_type === 'hailiang_packer_station') {
|
||||
} else if (clickObj.data.driver_type === 'standard_conveyor_control_with_scanner') {
|
||||
this.dialogFormVisible4 = true
|
||||
} else if (clickObj.data.driver_type === 'hailiang_xj_plc_test') {
|
||||
this.$refs.child1.setForm(clickObj)
|
||||
|
||||
Reference in New Issue
Block a user