测试过程问题修改
This commit is contained in:
@@ -355,6 +355,7 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
mydoJob.setRoadwayId(receiveOutJob.getRoadwayId());
|
mydoJob.setRoadwayId(receiveOutJob.getRoadwayId());
|
||||||
mydoJob.setCreateTime(DateUtils.getNowDate());
|
mydoJob.setCreateTime(DateUtils.getNowDate());
|
||||||
mydoJob.setExecutionPhase("0");
|
mydoJob.setExecutionPhase("0");
|
||||||
|
mydoJob.setTheFloor(receiveOutJob.getRoadwayId());
|
||||||
int i = mydoJobService.insertMydoJob(mydoJob);
|
int i = mydoJobService.insertMydoJob(mydoJob);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|||||||
@@ -83,4 +83,6 @@ public interface MydoJobMapper
|
|||||||
MydoJob selectRunningMydoJobByExitList(@Param("exitList") List<String> exitList);
|
MydoJob selectRunningMydoJobByExitList(@Param("exitList") List<String> exitList);
|
||||||
|
|
||||||
void selectMydoJobOutside(HashMap<String, Object> map);
|
void selectMydoJobOutside(HashMap<String, Object> map);
|
||||||
|
|
||||||
|
List<MydoJob> selectOutJobList(@Param("theFloor") String floor);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,4 +87,5 @@ public interface IMydoJobService
|
|||||||
void selectMydoJobOutside(HashMap<String,Object> map);
|
void selectMydoJobOutside(HashMap<String,Object> map);
|
||||||
|
|
||||||
|
|
||||||
|
List<MydoJob> selectOutJobList(String floor);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,4 +183,9 @@ public class MydoJobServiceImpl implements IMydoJobService
|
|||||||
public void selectMydoJobOutside(HashMap<String,Object> map) {
|
public void selectMydoJobOutside(HashMap<String,Object> map) {
|
||||||
mydoJobMapper.selectMydoJobOutside(map);
|
mydoJobMapper.selectMydoJobOutside(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MydoJob> selectOutJobList(String floor) {
|
||||||
|
return mydoJobMapper.selectOutJobList(floor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.ruoyi.schedule;
|
|||||||
import HslCommunication.Core.Types.OperateResultExOne;
|
import HslCommunication.Core.Types.OperateResultExOne;
|
||||||
import com.ruoyi.common.domain.CustomThread;
|
import com.ruoyi.common.domain.CustomThread;
|
||||||
import com.ruoyi.common.domain.PlcConnectInfo;
|
import com.ruoyi.common.domain.PlcConnectInfo;
|
||||||
|
import com.ruoyi.device.cdz.domain.DeviceCdz;
|
||||||
|
import com.ruoyi.device.cdz.service.IDeviceCdzService;
|
||||||
import com.ruoyi.device.ddj.domain.MsgDdj;
|
import com.ruoyi.device.ddj.domain.MsgDdj;
|
||||||
import com.ruoyi.device.ddj.service.IMsgDdjService;
|
import com.ruoyi.device.ddj.service.IMsgDdjService;
|
||||||
import com.ruoyi.device.srgv.domain.DeviceSrgv;
|
import com.ruoyi.device.srgv.domain.DeviceSrgv;
|
||||||
@@ -11,6 +13,7 @@ import com.ruoyi.device.ssj.domain.DeviceSsj;
|
|||||||
import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
||||||
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
||||||
import com.ruoyi.device.tsj.service.impl.DeviceTsjServiceImpl;
|
import com.ruoyi.device.tsj.service.impl.DeviceTsjServiceImpl;
|
||||||
|
import com.ruoyi.schedule.plcRead.cdz.PlcCdzRead;
|
||||||
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
|
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
|
||||||
import com.ruoyi.schedule.plcRead.srgv.PlcSrgvRead;
|
import com.ruoyi.schedule.plcRead.srgv.PlcSrgvRead;
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
@@ -35,6 +38,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
public class ScheduleThread {
|
public class ScheduleThread {
|
||||||
|
|
||||||
public CustomThread<PlcSsjRead> plcSsjReadCustomThread;
|
public CustomThread<PlcSsjRead> plcSsjReadCustomThread;
|
||||||
|
public CustomThread<PlcCdzRead> plcCdzjReadCustomThread;
|
||||||
public CustomThread<PlcTsjRead> plcTsjReadCustomThread;
|
public CustomThread<PlcTsjRead> plcTsjReadCustomThread;
|
||||||
public CustomThread<PlcSrgvRead> plcSrgvReadCustomThread1;
|
public CustomThread<PlcSrgvRead> plcSrgvReadCustomThread1;
|
||||||
public CustomThread<PlcSrgvRead> plcSrgvReadCustomThread2;
|
public CustomThread<PlcSrgvRead> plcSrgvReadCustomThread2;
|
||||||
@@ -56,6 +60,9 @@ public class ScheduleThread {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDeviceSrgvService deviceSrgvService;
|
private IDeviceSrgvService deviceSrgvService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IDeviceCdzService deviceCdzService;
|
||||||
|
|
||||||
private boolean isRun = false;
|
private boolean isRun = false;
|
||||||
private boolean isRun2 = false;
|
private boolean isRun2 = false;
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -91,26 +98,36 @@ public class ScheduleThread {
|
|||||||
//提升机线程
|
//提升机线程
|
||||||
TsjThread tsjThread=new TsjThread();
|
TsjThread tsjThread=new TsjThread();
|
||||||
tsjThreadCustomThread=new CustomThread<>(new Thread(tsjThread),tsjThread);
|
tsjThreadCustomThread=new CustomThread<>(new Thread(tsjThread),tsjThread);
|
||||||
// //充电线程
|
//充电线程
|
||||||
// CdzThread cdzThread = new CdzThread();
|
CdzThread cdzThread = new CdzThread();
|
||||||
// cdzThreadCustomThread=new CustomThread<>(new Thread(cdzThread),cdzThread);
|
cdzThreadCustomThread=new CustomThread<>(new Thread(cdzThread),cdzThread);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* plc读取初始化
|
* plc读取初始化
|
||||||
*/
|
*/
|
||||||
private void plcReadInit() {
|
private void plcReadInit() {
|
||||||
|
//plc输送机读取线程
|
||||||
ConcurrentHashMap<String, DeviceSsj> ssjList = new ConcurrentHashMap<>();
|
ConcurrentHashMap<String, DeviceSsj> ssjList = new ConcurrentHashMap<>();
|
||||||
//获取要取的输送机
|
//获取要取的输送机
|
||||||
List<DeviceSsj> deviceSsjs = deviceSsjService.selectDeviceSsjList(new DeviceSsj());
|
List<DeviceSsj> deviceSsjs = deviceSsjService.selectDeviceSsjList(new DeviceSsj());
|
||||||
for (DeviceSsj deviceSsj : deviceSsjs) {
|
for (DeviceSsj deviceSsj : deviceSsjs) {
|
||||||
ssjList.put(deviceSsj.getDeviceCode(), deviceSsj);
|
ssjList.put(deviceSsj.getDeviceCode(), deviceSsj);
|
||||||
}
|
}
|
||||||
//plc输送机读取线程
|
PlcSsjRead plcSsjRead = new PlcSsjRead(ssjList, new PlcConnectInfo("127.0.0.1", 1502));
|
||||||
PlcSsjRead plcSsjRead = new PlcSsjRead(ssjList, new PlcConnectInfo("172.16.100.9", 1502));
|
|
||||||
Thread plcSsjReadThread = new Thread(plcSsjRead);
|
Thread plcSsjReadThread = new Thread(plcSsjRead);
|
||||||
plcSsjReadCustomThread = new CustomThread<PlcSsjRead>(plcSsjReadThread, plcSsjRead);
|
plcSsjReadCustomThread = new CustomThread<PlcSsjRead>(plcSsjReadThread, plcSsjRead);
|
||||||
|
|
||||||
|
//plc充电桩读取线程
|
||||||
|
ConcurrentHashMap<String, DeviceCdz> cdzList = new ConcurrentHashMap<>();
|
||||||
|
List<DeviceCdz> deviceCdzList =deviceCdzService.selectDeviceCdzList(new DeviceCdz());
|
||||||
|
for (DeviceCdz deviceCdz : deviceCdzList) {
|
||||||
|
cdzList.put(String.valueOf(deviceCdz.getId()),deviceCdz);
|
||||||
|
}
|
||||||
|
PlcCdzRead plcCdzRead = new PlcCdzRead(cdzList, new PlcConnectInfo("127.0.0.1", 1502));
|
||||||
|
Thread plcCdzReadThread = new Thread(plcCdzRead);
|
||||||
|
plcCdzjReadCustomThread = new CustomThread<PlcCdzRead>(plcCdzReadThread, plcCdzRead);
|
||||||
|
|
||||||
|
|
||||||
ConcurrentHashMap<String, DeviceTsj> tsjList = new ConcurrentHashMap<>();
|
ConcurrentHashMap<String, DeviceTsj> tsjList = new ConcurrentHashMap<>();
|
||||||
//获取要取的提升机
|
//获取要取的提升机
|
||||||
List<DeviceTsj> tsjLists = deviceTsjServiceImpl.selectDeviceTsjList(new DeviceTsj());
|
List<DeviceTsj> tsjLists = deviceTsjServiceImpl.selectDeviceTsjList(new DeviceTsj());
|
||||||
@@ -118,7 +135,7 @@ public class ScheduleThread {
|
|||||||
tsjList.put(t.getName(), t);
|
tsjList.put(t.getName(), t);
|
||||||
}
|
}
|
||||||
//plc提升机读取线程
|
//plc提升机读取线程
|
||||||
PlcTsjRead plcTsjRead = new PlcTsjRead(tsjList, new PlcConnectInfo("172.16.100.9", 1502));
|
PlcTsjRead plcTsjRead = new PlcTsjRead(tsjList, new PlcConnectInfo("127.0.0.1", 1502));
|
||||||
Thread plcTsjReadThread = new Thread(plcTsjRead);
|
Thread plcTsjReadThread = new Thread(plcTsjRead);
|
||||||
plcTsjReadCustomThread = new CustomThread<PlcTsjRead>(plcTsjReadThread, plcTsjRead);
|
plcTsjReadCustomThread = new CustomThread<PlcTsjRead>(plcTsjReadThread, plcTsjRead);
|
||||||
|
|
||||||
@@ -154,6 +171,8 @@ public class ScheduleThread {
|
|||||||
// plcSrgvReadCustomThread2.getThread().start();
|
// plcSrgvReadCustomThread2.getThread().start();
|
||||||
plcTsjReadCustomThread.getThread().start();
|
plcTsjReadCustomThread.getThread().start();
|
||||||
monitoringCustomThread.getThread().start();
|
monitoringCustomThread.getThread().start();
|
||||||
|
//充电桩读取线程
|
||||||
|
// plcCdzjReadCustomThread.getThread().start();
|
||||||
isRun = true;
|
isRun = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +183,7 @@ public class ScheduleThread {
|
|||||||
ssjThreadCustomThread.thread.start();
|
ssjThreadCustomThread.thread.start();
|
||||||
tsjThreadCustomThread.thread.start();
|
tsjThreadCustomThread.thread.start();
|
||||||
sRgvThreadCustomThread.thread.start();
|
sRgvThreadCustomThread.thread.start();
|
||||||
//cdzThreadCustomThread.thread.start();
|
// cdzThreadCustomThread.thread.start();
|
||||||
isRun2 = true;
|
isRun2 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,28 @@ package com.ruoyi.schedule.plcRead.cdz;
|
|||||||
|
|
||||||
import HslCommunication.BasicFramework.SoftBasic;
|
import HslCommunication.BasicFramework.SoftBasic;
|
||||||
import HslCommunication.Core.Net.IReadWriteNet;
|
import HslCommunication.Core.Net.IReadWriteNet;
|
||||||
|
import HslCommunication.Core.Transfer.IByteTransform;
|
||||||
import HslCommunication.Core.Types.OperateResult;
|
import HslCommunication.Core.Types.OperateResult;
|
||||||
import HslCommunication.Core.Types.OperateResultExOne;
|
import HslCommunication.Core.Types.OperateResultExOne;
|
||||||
|
import HslCommunication.ModBus.ModbusTcpNet;
|
||||||
import HslCommunication.Profinet.Siemens.SiemensPLCS;
|
import HslCommunication.Profinet.Siemens.SiemensPLCS;
|
||||||
import HslCommunication.Profinet.Siemens.SiemensS7Net;
|
import HslCommunication.Profinet.Siemens.SiemensS7Net;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import com.ruoyi.common.domain.HslRead;
|
import com.ruoyi.common.domain.HslRead;
|
||||||
import com.ruoyi.common.domain.PlcConnectInfo;
|
import com.ruoyi.common.domain.PlcConnectInfo;
|
||||||
|
import com.ruoyi.common.domain.SendData2;
|
||||||
import com.ruoyi.device.cdz.domain.DeviceCdz;
|
import com.ruoyi.device.cdz.domain.DeviceCdz;
|
||||||
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
import com.ruoyi.device.tsj.domain.DeviceTsj;
|
||||||
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
import com.ruoyi.schedule.plcRead.util.ParseUtil;
|
import com.ruoyi.schedule.plcRead.util.ParseUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class PlcCdzRead implements Runnable {
|
public class PlcCdzRead implements Runnable {
|
||||||
@@ -26,20 +35,31 @@ public class PlcCdzRead implements Runnable {
|
|||||||
public static IReadWriteNet readWriteNet = null;
|
public static IReadWriteNet readWriteNet = null;
|
||||||
private final String ip;
|
private final String ip;
|
||||||
private final int port;
|
private final int port;
|
||||||
|
private DeviceCdz cdzDevice;
|
||||||
private boolean success = false;
|
private boolean success = false;
|
||||||
|
private static ModbusTcpNet modbusTcpNet;
|
||||||
|
private IByteTransform byteTransform = null;
|
||||||
|
|
||||||
public PlcCdzRead(ConcurrentHashMap<String, DeviceCdz> deviceCdzMap, PlcConnectInfo plcConnectInfo) {
|
public PlcCdzRead(ConcurrentHashMap<String, DeviceCdz> deviceCdzMap, PlcConnectInfo plcConnectInfo) {
|
||||||
PlcCdzRead.deviceCdzMap = deviceCdzMap;
|
PlcCdzRead.deviceCdzMap = deviceCdzMap;
|
||||||
|
cdzDevice=deviceCdzMap.get("1");
|
||||||
this.ip = plcConnectInfo.getIp();
|
this.ip = plcConnectInfo.getIp();
|
||||||
this.port = plcConnectInfo.getPort();
|
this.port = plcConnectInfo.getPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int WriteToCdz(String address, byte[] data) {
|
|
||||||
int a = 0;
|
public static boolean Write(String address, int[] value) {
|
||||||
if (readWriteNet != null) {
|
|
||||||
a = HslRead.WriteResultRender(readWriteNet.Write(address, data), address);
|
OperateResult write = modbusTcpNet.Write(address, value);
|
||||||
}
|
return write.IsSuccess;
|
||||||
return a;
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean Write(String address, short[] value) {
|
||||||
|
|
||||||
|
OperateResult write = modbusTcpNet.Write(address, value);
|
||||||
|
return write.IsSuccess;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -47,11 +67,10 @@ public class PlcCdzRead implements Runnable {
|
|||||||
while (isRun) {
|
while (isRun) {
|
||||||
try {
|
try {
|
||||||
if (IsConnect()) {
|
if (IsConnect()) {
|
||||||
for (String cdzCode : deviceCdzMap.keySet()) {
|
if (cdzDevice!=null){
|
||||||
DeviceCdz deviceCdz = deviceCdzMap.get(cdzCode);
|
plcRead(cdzDevice);
|
||||||
plcRead(deviceCdz);
|
|
||||||
}
|
}
|
||||||
Thread.sleep(1000);
|
Thread.sleep(1500);
|
||||||
} else {
|
} else {
|
||||||
reConnect();
|
reConnect();
|
||||||
}
|
}
|
||||||
@@ -67,28 +86,27 @@ public class PlcCdzRead implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void plcRead(DeviceCdz deviceCdz) {
|
private void plcRead(DeviceCdz deviceCdz) {
|
||||||
OperateResultExOne<byte[]> read2 = readWriteNet.Read(deviceCdz.getPlcDbReadAddress(), Short.parseShort("20"));
|
OperateResultExOne<byte[]> read1 = modbusTcpNet.Read("1136", (short) 2);//1110 操作模式
|
||||||
String ddsx1 = "0";
|
if (read1.IsSuccess) {
|
||||||
if (read2.IsSuccess) {
|
cdzDevice.setModel(Convert.toInt(byteTransform.TransInt16(read1.Content, 0)));
|
||||||
ddsx1 = SoftBasic.ByteToHexString(read2.Content);
|
cdzDevice.setStatus(Convert.toInt(byteTransform.TransInt16(read1.Content, 2)));
|
||||||
deviceCdz.setStatus(ParseUtil.optInt(0, ddsx1));
|
log.info("=====读取到充电桩充电模式:{}======", Convert.toInt(byteTransform.TransInt16(read1.Content, 0)));
|
||||||
deviceCdz.setModel(ParseUtil.optInt(2, ddsx1));
|
log.info("=====读取到充电桩充电状态:{}======", Convert.toInt(byteTransform.TransInt16(read1.Content, 0)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConnectServer() {
|
void ConnectServer() {
|
||||||
siemensS7Net = new SiemensS7Net(SiemensPLCS.S1500);
|
modbusTcpNet = new ModbusTcpNet();
|
||||||
try {
|
try {
|
||||||
siemensS7Net.setIpAddress(this.ip);
|
modbusTcpNet.setIpAddress(this.ip);
|
||||||
siemensS7Net.setPort(this.port);
|
modbusTcpNet.setPort(this.port);
|
||||||
siemensS7Net.setRack((byte) 0);
|
modbusTcpNet.setStation((byte) 1);
|
||||||
siemensS7Net.setSlot((byte) 1);
|
this.byteTransform = modbusTcpNet.getByteTransform();
|
||||||
|
OperateResult connect = modbusTcpNet.ConnectServer();
|
||||||
OperateResult connect = siemensS7Net.ConnectServer();
|
|
||||||
if (connect.IsSuccess) {
|
if (connect.IsSuccess) {
|
||||||
setIsConnect(true);
|
setIsConnect(true);
|
||||||
readWriteNet = siemensS7Net;
|
readWriteNet = modbusTcpNet;
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.info("********IP:" + this.ip + " port:" + this.port + "连接失败 " + ex.getMessage());
|
log.info("********IP:" + this.ip + " port:" + this.port + "连接失败 " + ex.getMessage());
|
||||||
@@ -122,5 +140,43 @@ public class PlcCdzRead implements Runnable {
|
|||||||
setIsConnect(false);
|
setIsConnect(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static int writeToCdz(String czms) {
|
||||||
|
List<SendData2> sendDataList = new ArrayList<>();
|
||||||
|
sendDataList.add(new SendData2("1139", czms, 1));
|
||||||
|
int b = 1;
|
||||||
|
for (SendData2 sendData : sendDataList) {
|
||||||
|
String address = sendData.getAddress();
|
||||||
|
String data = sendData.getData();
|
||||||
|
String[] split = data.split(",");
|
||||||
|
int type = sendData.getType();
|
||||||
|
if (type == 2) {
|
||||||
|
int[] intData = Arrays.stream(split)
|
||||||
|
.map(String::trim)
|
||||||
|
.mapToInt(Integer::parseInt)
|
||||||
|
.toArray();
|
||||||
|
boolean write = PlcCdzRead.Write(address, intData);
|
||||||
|
if (!write) {
|
||||||
|
b = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if (type == 1) {
|
||||||
|
short[] shortData = new short[split.length];
|
||||||
|
for (int i = 0; i < split.length; i++) {
|
||||||
|
try {
|
||||||
|
shortData[i] = Short.parseShort(split[i].trim());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
shortData[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean write = PlcCdzRead.Write(address, shortData);
|
||||||
|
if (!write) {
|
||||||
|
b = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String collect = sendDataList.stream().map(li -> "{" + li.getAddress() + ":" + li.getData() + "}").collect(Collectors.joining(","));
|
||||||
|
log.info("充电桩下发完成,下发值:{},,结果:{}", collect, b);
|
||||||
|
return b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public class CdzThread implements Runnable {
|
|||||||
private IDeviceCdzService deviceCdzService;
|
private IDeviceCdzService deviceCdzService;
|
||||||
private IDeviceSrgvService deviceSrgvService;
|
private IDeviceSrgvService deviceSrgvService;
|
||||||
private IWcsSrgvQueueService wcsSrgvQueueService;
|
private IWcsSrgvQueueService wcsSrgvQueueService;
|
||||||
|
int taskNo =400001; //充电任务号
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
chargingJobService = SpringUtils.getBean(ISrgvChargingJobService.class);
|
chargingJobService = SpringUtils.getBean(ISrgvChargingJobService.class);
|
||||||
@@ -98,27 +99,23 @@ public class CdzThread implements Runnable {
|
|||||||
|
|
||||||
//充电任务下发
|
//充电任务下发
|
||||||
SrgvChargingJob srgvChargingJobParam = new SrgvChargingJob();
|
SrgvChargingJob srgvChargingJobParam = new SrgvChargingJob();
|
||||||
srgvChargingJobParam.setChargingStatus("0");
|
srgvChargingJobParam.setChargingStatus("1");
|
||||||
srgvChargingJobParam.setJobType("1");
|
srgvChargingJobParam.setJobType("1");
|
||||||
srgvChargingJobParam.setJobStatus("3");
|
srgvChargingJobParam.setJobStatus("4");
|
||||||
List<SrgvChargingJob> srgvChargingJobs = chargingJobService.selectSrgvChargingJobList(srgvChargingJobParam);
|
List<SrgvChargingJob> srgvChargingJobs = chargingJobService.selectSrgvChargingJobList(srgvChargingJobParam);
|
||||||
if (CollUtil.isNotEmpty(srgvChargingJobs)) {
|
if (CollUtil.isNotEmpty(srgvChargingJobs)) {
|
||||||
|
|
||||||
for (SrgvChargingJob srgvChargingJob : srgvChargingJobs) {
|
for (SrgvChargingJob srgvChargingJob : srgvChargingJobs) {
|
||||||
if ("0".equals(srgvChargingJob.getChargingStatus())) {
|
if ("1".equals(srgvChargingJob.getChargingStatus())) {
|
||||||
int i = PlcCdzRead.WriteToCdz("", null);
|
int i = PlcCdzRead.writeToCdz("1");
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
srgvChargingJob.setChargingStatus("2");
|
srgvChargingJob.setChargingStatus("2");
|
||||||
srgvChargingJob.setChargingDate(DateUtil.formatDateTime(DateUtil.date()));
|
srgvChargingJob.setChargingDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||||
chargingJobService.updateSrgvChargingJob(srgvChargingJob);
|
chargingJobService.updateSrgvChargingJob(srgvChargingJob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//生成断电任务 有任务且电量大于50
|
//生成断电任务 有任务且电量大于50
|
||||||
WcsSrgvQueue wcsSrgvQueueParam = new WcsSrgvQueue();
|
WcsSrgvQueue wcsSrgvQueueParam = new WcsSrgvQueue();
|
||||||
wcsSrgvQueueParam.setIssued("0");
|
wcsSrgvQueueParam.setIssued("0");
|
||||||
@@ -159,7 +156,7 @@ public class CdzThread implements Runnable {
|
|||||||
|
|
||||||
for (SrgvChargingJob srgvChargingJob : srgvChargingJobs) {
|
for (SrgvChargingJob srgvChargingJob : srgvChargingJobs) {
|
||||||
if ("0".equals(srgvChargingJob.getChargingStatus())) {
|
if ("0".equals(srgvChargingJob.getChargingStatus())) {
|
||||||
int i = PlcCdzRead.WriteToCdz("", null);
|
int i = PlcCdzRead.writeToCdz("2");
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
srgvChargingJob.setChargingStatus("1");
|
srgvChargingJob.setChargingStatus("1");
|
||||||
srgvChargingJob.setChargingDate(DateUtil.formatDateTime(DateUtil.date()));
|
srgvChargingJob.setChargingDate(DateUtil.formatDateTime(DateUtil.date()));
|
||||||
@@ -211,16 +208,21 @@ public class CdzThread implements Runnable {
|
|||||||
srgvChargingJobParam.setChargingId(cdz.getId().toString());
|
srgvChargingJobParam.setChargingId(cdz.getId().toString());
|
||||||
List<SrgvChargingJob> wcsChargingJobs = chargingJobService.selectSrgvChargingJobList(srgvChargingJobParam);
|
List<SrgvChargingJob> wcsChargingJobs = chargingJobService.selectSrgvChargingJobList(srgvChargingJobParam);
|
||||||
if (CollUtil.isEmpty(wcsChargingJobs)) {
|
if (CollUtil.isEmpty(wcsChargingJobs)) {
|
||||||
|
if (taskNo==450000){
|
||||||
|
taskNo=4000001;
|
||||||
|
}
|
||||||
SrgvChargingJob scj = new SrgvChargingJob();
|
SrgvChargingJob scj = new SrgvChargingJob();
|
||||||
scj.setGuid(IdUtil.fastSimpleUUID());
|
scj.setGuid(IdUtil.fastSimpleUUID());
|
||||||
scj.setChargingSite(cdz.getSiteId());
|
scj.setChargingSite(cdz.getSiteId());
|
||||||
scj.setJobStatus("1");
|
scj.setJobStatus("1");
|
||||||
scj.setChargingStatus("0");
|
scj.setChargingStatus("1");
|
||||||
scj.setStartDate(DateUtil.now());
|
scj.setStartDate(DateUtil.now());
|
||||||
scj.setJobType("1");//到充电桩
|
scj.setJobType("1");//到充电桩
|
||||||
|
scj.setTaskNo(String.valueOf(taskNo));
|
||||||
scj.setAgvId(deviceSrgv.getDeviceId().toString());
|
scj.setAgvId(deviceSrgv.getDeviceId().toString());
|
||||||
scj.setChargingId(deviceSrgv.getDeviceId().toString());
|
scj.setChargingId(deviceSrgv.getDeviceId().toString());
|
||||||
chargingJobService.insertSrgvChargingJob(scj);
|
chargingJobService.insertSrgvChargingJob(scj);
|
||||||
|
taskNo++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,10 +242,8 @@ public class CdzThread implements Runnable {
|
|||||||
List<SrgvChargingJob> srgvChargingJobs = chargingJobService.selectSrgvChargingJobList(srgvChargingJobParam);
|
List<SrgvChargingJob> srgvChargingJobs = chargingJobService.selectSrgvChargingJobList(srgvChargingJobParam);
|
||||||
if (CollUtil.isNotEmpty(srgvChargingJobs)) {
|
if (CollUtil.isNotEmpty(srgvChargingJobs)) {
|
||||||
SrgvChargingJob scj = srgvChargingJobs.get(0);
|
SrgvChargingJob scj = srgvChargingJobs.get(0);
|
||||||
|
|
||||||
//插入历史
|
//插入历史
|
||||||
chargingJobService.insertHistory(scj.getGuid());
|
chargingJobService.insertHistory(scj.getGuid());
|
||||||
|
|
||||||
scj.setChargingSite(cdz.getSiteId());
|
scj.setChargingSite(cdz.getSiteId());
|
||||||
scj.setJobStatus("1");
|
scj.setJobStatus("1");
|
||||||
scj.setChargingStatus("0");
|
scj.setChargingStatus("0");
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
package com.ruoyi.schedule.scheduleTask.monit;
|
package com.ruoyi.schedule.scheduleTask.monit;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
|
import com.ruoyi.device.cdz.domain.DeviceCdz;
|
||||||
|
import com.ruoyi.device.cdz.service.IDeviceCdzService;
|
||||||
|
import com.ruoyi.device.cdz.service.impl.DeviceCdzServiceImpl;
|
||||||
import com.ruoyi.device.ddj.service.IMsgDdjService;
|
import com.ruoyi.device.ddj.service.IMsgDdjService;
|
||||||
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
|
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
|
||||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||||
import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
||||||
import com.ruoyi.device.tsj.service.IDeviceTsjService;
|
import com.ruoyi.device.tsj.service.IDeviceTsjService;
|
||||||
import com.ruoyi.device.tsj.service.impl.DeviceTsjServiceImpl;
|
import com.ruoyi.device.tsj.service.impl.DeviceTsjServiceImpl;
|
||||||
|
import com.ruoyi.schedule.plcRead.cdz.PlcCdzRead;
|
||||||
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
|
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
|
||||||
import com.ruoyi.schedule.plcRead.srgv.PlcSrgvRead;
|
import com.ruoyi.schedule.plcRead.srgv.PlcSrgvRead;
|
||||||
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||||
@@ -21,11 +25,13 @@ public class MonitoringThread implements Runnable {
|
|||||||
private IDeviceSsjService deviceSsjService;
|
private IDeviceSsjService deviceSsjService;
|
||||||
private IDeviceSrgvService deviceSrgvService;
|
private IDeviceSrgvService deviceSrgvService;
|
||||||
private DeviceTsjServiceImpl deviceTsjService;
|
private DeviceTsjServiceImpl deviceTsjService;
|
||||||
|
private DeviceCdzServiceImpl deviceCdzService;
|
||||||
|
|
||||||
public void init() {
|
public void init() {
|
||||||
deviceSsjService = SpringUtils.getBean(IDeviceSsjService.class);
|
deviceSsjService = SpringUtils.getBean(IDeviceSsjService.class);
|
||||||
deviceSrgvService = SpringUtils.getBean(IDeviceSrgvService.class);
|
deviceSrgvService = SpringUtils.getBean(IDeviceSrgvService.class);
|
||||||
deviceTsjService = SpringUtils.getBean(DeviceTsjServiceImpl.class);
|
deviceTsjService = SpringUtils.getBean(DeviceTsjServiceImpl.class);
|
||||||
|
deviceCdzService =SpringUtils.getBean(DeviceCdzServiceImpl.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -38,6 +44,11 @@ public class MonitoringThread implements Runnable {
|
|||||||
deviceSsjService.updateDeviceSsj(deviceSsj);
|
deviceSsjService.updateDeviceSsj(deviceSsj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (String cdzName : PlcCdzRead.deviceCdzMap.keySet()) {
|
||||||
|
DeviceCdz deviceCdz = PlcCdzRead.deviceCdzMap.get(cdzName);
|
||||||
|
deviceCdzService.updateDeviceCdz(deviceCdz);
|
||||||
|
}
|
||||||
|
|
||||||
for (String sRgv : PlcSrgvRead.deviceSrgvMap.keySet()) {
|
for (String sRgv : PlcSrgvRead.deviceSrgvMap.keySet()) {
|
||||||
deviceSrgvService.updateDeviceSrgv(PlcSrgvRead.deviceSrgvMap.get(sRgv));
|
deviceSrgvService.updateDeviceSrgv(PlcSrgvRead.deviceSrgvMap.get(sRgv));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.ruoyi.bas.srgvmap.service.RoadCacheService;
|
|||||||
import com.ruoyi.common.domain.SendData2;
|
import com.ruoyi.common.domain.SendData2;
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
import com.ruoyi.device.cdz.domain.DeviceCdz;
|
import com.ruoyi.device.cdz.domain.DeviceCdz;
|
||||||
|
import com.ruoyi.device.cdz.service.IDeviceCdzService;
|
||||||
import com.ruoyi.device.srgv.domain.DeviceSrgv;
|
import com.ruoyi.device.srgv.domain.DeviceSrgv;
|
||||||
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
|
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
|
||||||
import com.ruoyi.device.srgv.service.impl.DeviceSrgvServiceImpl;
|
import com.ruoyi.device.srgv.service.impl.DeviceSrgvServiceImpl;
|
||||||
@@ -65,6 +66,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
|
|
||||||
|
|
||||||
public IDeviceSrgvService deviceSrgvService;
|
public IDeviceSrgvService deviceSrgvService;
|
||||||
|
public IDeviceCdzService deviceCdzService;
|
||||||
|
|
||||||
public JobCallBackServiceImpl jobCallBackService;
|
public JobCallBackServiceImpl jobCallBackService;
|
||||||
|
|
||||||
@@ -84,7 +86,8 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
wcsSrgvMapService = SpringUtils.getBean(IWcsSrgvMapService.class);
|
wcsSrgvMapService = SpringUtils.getBean(IWcsSrgvMapService.class);
|
||||||
roadCacheService = SpringUtils.getBean(RoadCacheService.class);
|
roadCacheService = SpringUtils.getBean(RoadCacheService.class);
|
||||||
deviceSrgvService = SpringUtils.getBean(DeviceSrgvServiceImpl.class);
|
deviceSrgvService = SpringUtils.getBean(DeviceSrgvServiceImpl.class);
|
||||||
jobCallBackService=SpringUtils.getBean(JobCallBackServiceImpl.class);
|
jobCallBackService = SpringUtils.getBean(JobCallBackServiceImpl.class);
|
||||||
|
deviceCdzService = SpringUtils.getBean(IDeviceCdzService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -92,11 +95,8 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
|
|
||||||
init();
|
init();
|
||||||
while (isRun) {
|
while (isRun) {
|
||||||
|
try {
|
||||||
|
for (String code : sRgvCodeList.get("srgv")) {
|
||||||
for (String code : sRgvCodeList.get("srgv")) {
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (PlcSrgvRead.deviceSrgvMap.containsKey(code)) {
|
if (PlcSrgvRead.deviceSrgvMap.containsKey(code)) {
|
||||||
if (ObjUtil.isNotNull(PlcSrgvRead.deviceSrgvMap.get(code))) {
|
if (ObjUtil.isNotNull(PlcSrgvRead.deviceSrgvMap.get(code))) {
|
||||||
|
|
||||||
@@ -114,18 +114,15 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
log.error("小车设备为空");
|
log.error("小车设备为空");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (RuntimeException e) {
|
|
||||||
log.error(e.getMessage(), e);
|
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("********小车调度异常***************");
|
||||||
}
|
} finally {
|
||||||
|
try {
|
||||||
|
Thread.sleep(1500);
|
||||||
try {
|
} catch (InterruptedException e) {
|
||||||
Thread.sleep(1500);
|
throw new RuntimeException(e);
|
||||||
} catch (InterruptedException e) {
|
}
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,7 +144,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
DeviceCdz deviceCdz = PlcCdzRead.deviceCdzMap.get(chargingId);
|
DeviceCdz deviceCdz = PlcCdzRead.deviceCdzMap.get(chargingId);
|
||||||
if (ObjUtil.isNotNull(deviceCdz)) {
|
if (ObjUtil.isNotNull(deviceCdz)) {
|
||||||
//下发断电任务
|
//下发断电任务
|
||||||
int i = PlcCdzRead.WriteToCdz("", null);
|
int i = PlcCdzRead.writeToCdz("2");
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
srgvChargingJobMapper.insertHistory(srgvChargingJob.getGuid());
|
srgvChargingJobMapper.insertHistory(srgvChargingJob.getGuid());
|
||||||
srgvChargingJobMapper.deleteSrgvChargingJobByGuid(srgvChargingJob.getGuid());
|
srgvChargingJobMapper.deleteSrgvChargingJobByGuid(srgvChargingJob.getGuid());
|
||||||
@@ -173,7 +170,6 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
SrgvChargingJob srgvChargingJob = srgvChargingJobs.get(0);
|
SrgvChargingJob srgvChargingJob = srgvChargingJobs.get(0);
|
||||||
if ("1".equals(srgvChargingJob.getChargingStatus())) {
|
if ("1".equals(srgvChargingJob.getChargingStatus())) {
|
||||||
//初始状态
|
//初始状态
|
||||||
|
|
||||||
//判断小车和充电桩是否在同一层
|
//判断小车和充电桩是否在同一层
|
||||||
String agvId = srgvChargingJob.getAgvId();
|
String agvId = srgvChargingJob.getAgvId();
|
||||||
String chargingId = srgvChargingJob.getChargingId();
|
String chargingId = srgvChargingJob.getChargingId();
|
||||||
@@ -187,7 +183,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
List<WcsSrgvQueue> wcsSrgvQueues = wcsSagvQueueMapper.selectWcsSrgvQueueList(wcsSrgvQueueParam);
|
List<WcsSrgvQueue> wcsSrgvQueues = wcsSagvQueueMapper.selectWcsSrgvQueueList(wcsSrgvQueueParam);
|
||||||
if (CollUtil.isEmpty(wcsSrgvQueues)) {
|
if (CollUtil.isEmpty(wcsSrgvQueues)) {
|
||||||
//生成队列
|
//生成队列
|
||||||
createSrgvChargingQueue(deviceSrgv, chargingSite, "3");
|
createSrgvChargingQueue(deviceSrgv, chargingSite, "3", srgvChargingJob.getTaskNo());
|
||||||
srgvChargingJob.setJobStatus("3");
|
srgvChargingJob.setJobStatus("3");
|
||||||
srgvChargingJobMapper.updateSrgvChargingJob(srgvChargingJob);
|
srgvChargingJobMapper.updateSrgvChargingJob(srgvChargingJob);
|
||||||
}
|
}
|
||||||
@@ -198,7 +194,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
String chargingSite = srgvChargingJob.getChargingSite();//充电桩站点
|
String chargingSite = srgvChargingJob.getChargingSite();//充电桩站点
|
||||||
List<WcsSrgvQueue> wcsSrgvQueues = wcsSagvQueueMapper.selectWcsSrgvQueueList(wcsSrgvQueueParam);
|
List<WcsSrgvQueue> wcsSrgvQueues = wcsSagvQueueMapper.selectWcsSrgvQueueList(wcsSrgvQueueParam);
|
||||||
if (CollUtil.isEmpty(wcsSrgvQueues)) {
|
if (CollUtil.isEmpty(wcsSrgvQueues)) {
|
||||||
createSrgvChargingQueue(deviceSrgv, chargingSite, "8");
|
createSrgvChargingQueue(deviceSrgv, chargingSite, "8", srgvChargingJob.getTaskNo());
|
||||||
srgvChargingJob.setJobStatus("2");
|
srgvChargingJob.setJobStatus("2");
|
||||||
srgvChargingJobMapper.updateSrgvChargingJob(srgvChargingJob);
|
srgvChargingJobMapper.updateSrgvChargingJob(srgvChargingJob);
|
||||||
}
|
}
|
||||||
@@ -209,10 +205,10 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createSrgvChargingQueue(DeviceSrgv deviceSrgv, String chargingSite, String type) {
|
private void createSrgvChargingQueue(DeviceSrgv deviceSrgv, String chargingSite, String type, String taskNo) {
|
||||||
WcsSrgvQueue wcsSrgvQueue = new WcsSrgvQueue();
|
WcsSrgvQueue wcsSrgvQueue = new WcsSrgvQueue();
|
||||||
wcsSrgvQueue.setGuid(UUID.randomUUID().toString());
|
wcsSrgvQueue.setGuid(UUID.randomUUID().toString());
|
||||||
wcsSrgvQueue.setTaskNo("");
|
wcsSrgvQueue.setTaskNo(taskNo);
|
||||||
wcsSrgvQueue.setTaskType("3");
|
wcsSrgvQueue.setTaskType("3");
|
||||||
wcsSrgvQueue.setPriority(Long.parseLong("2"));
|
wcsSrgvQueue.setPriority(Long.parseLong("2"));
|
||||||
wcsSrgvQueue.setCargo("0");
|
wcsSrgvQueue.setCargo("0");
|
||||||
@@ -231,6 +227,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
wcsSrgvQueue.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
wcsSrgvQueue.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
|
||||||
wcsSrgvQueue.setAgvId(deviceSrgv.getDeviceId().toString());
|
wcsSrgvQueue.setAgvId(deviceSrgv.getDeviceId().toString());
|
||||||
wcsSrgvQueue.setDefault02("3");
|
wcsSrgvQueue.setDefault02("3");
|
||||||
|
wcsSrgvQueue.setDefault03(wcsSrgvQueue.getStartSite());
|
||||||
wcsSrgvQueue.setDefault07(Convert.toStr(wcsSrgvMap.getZ()));
|
wcsSrgvQueue.setDefault07(Convert.toStr(wcsSrgvMap.getZ()));
|
||||||
wcsSagvQueueMapper.insertWcsSrgvQueue(wcsSrgvQueue);
|
wcsSagvQueueMapper.insertWcsSrgvQueue(wcsSrgvQueue);
|
||||||
}
|
}
|
||||||
@@ -263,20 +260,20 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
//如果没有当前层作业,就找最近层换层作业,生成队列
|
//如果没有当前层作业,就找最近层换层作业,生成队列
|
||||||
MydoJob mydoJob1 = new MydoJob();
|
MydoJob mydoJob1 = new MydoJob();
|
||||||
mydoJob1.setTheFloor(deviceSrgv.getCurrFloor().toString());
|
mydoJob1.setTheFloor(deviceSrgv.getCurrFloor().toString());
|
||||||
mydoJob1.setInOut("1");
|
mydoJob1.setInOrOut("1");//货物入库
|
||||||
mydoJob1.setStatus("3");
|
mydoJob1.setStatus("3");
|
||||||
// todo 定提升机到达阶段
|
// todo 定提升机到达阶段
|
||||||
mydoJob1.setExecutionPhase("3");
|
mydoJob1.setExecutionPhase("3");
|
||||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(mydoJob1);
|
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(mydoJob1);
|
||||||
|
if (mydoJobs.isEmpty()) {
|
||||||
|
mydoJob1.setInOrOut("3");//空托盘入库
|
||||||
|
mydoJobs = mydoJobService.selectMydoJobList(mydoJob1);
|
||||||
|
}
|
||||||
if (!mydoJobs.isEmpty()) {
|
if (!mydoJobs.isEmpty()) {
|
||||||
//生成了从小车现在位置到提升机接货的队列
|
//生成了从小车现在位置到提升机接货的队列
|
||||||
createCarQueue(mydoJobs.get(0), deviceSrgv, "4", "0");
|
createCarQueue(mydoJobs.get(0), deviceSrgv, "4", "0");
|
||||||
} else {
|
} else {
|
||||||
MydoJob mydoJob = new MydoJob();
|
List<MydoJob> mydoJobs1 = mydoJobService.selectOutJobList(deviceSrgv.getCurrFloor().toString());
|
||||||
mydoJob.setInOut("2");
|
|
||||||
mydoJob.setStatus("1");
|
|
||||||
mydoJob.setTheFloor(deviceSrgv.getCurrFloor().toString());
|
|
||||||
List<MydoJob> mydoJobs1 = mydoJobService.selectMydoJobList(mydoJob);
|
|
||||||
//当前层出库作业
|
//当前层出库作业
|
||||||
if (!mydoJobs1.isEmpty()) {
|
if (!mydoJobs1.isEmpty()) {
|
||||||
//找最外层作业存储过程
|
//找最外层作业存储过程
|
||||||
@@ -294,7 +291,8 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
} else {
|
} else {
|
||||||
createCarQueue(mydoJob2, deviceSrgv, "4", "1");
|
createCarQueue(mydoJob2, deviceSrgv, "4", "1");
|
||||||
}
|
}
|
||||||
|
mydoJob2.setStatus("3");
|
||||||
|
mydoJobService.updateMydoJob(mydoJob2);
|
||||||
} else {
|
} else {
|
||||||
//别的层的出库作业和入库作业
|
//别的层的出库作业和入库作业
|
||||||
MydoJob job = null;
|
MydoJob job = null;
|
||||||
@@ -353,6 +351,8 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
// todo 通知wms入库完成 完成队列 完成作业
|
// todo 通知wms入库完成 完成队列 完成作业
|
||||||
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
||||||
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
||||||
|
mydoJob.setStatus("4");
|
||||||
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
mydoJobService.insertHistory(mydoJob.getJobId());
|
mydoJobService.insertHistory(mydoJob.getJobId());
|
||||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||||
} else if (deviceSrgv.getCurrSite().equals(wcsSrgvQueue.getDefault03()) && "2".equals(wcsSrgvQueue.getTaskType())) {
|
} else if (deviceSrgv.getCurrSite().equals(wcsSrgvQueue.getDefault03()) && "2".equals(wcsSrgvQueue.getTaskType())) {
|
||||||
@@ -367,11 +367,12 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
if (Convert.toInt(mydoJob.getInOrOut()) < 20) {
|
if (Convert.toInt(mydoJob.getInOrOut()) < 20) {
|
||||||
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
||||||
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
||||||
|
|
||||||
createCarQueue(mydoJob, deviceSrgv, "1", "0");
|
createCarQueue(mydoJob, deviceSrgv, "1", "0");
|
||||||
} else {
|
} else {
|
||||||
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
||||||
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
||||||
|
mydoJob.setStatus("3");//作业修改为正执行
|
||||||
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
createCarQueue(mydoJob, deviceSrgv, "2", "0");
|
createCarQueue(mydoJob, deviceSrgv, "2", "0");
|
||||||
}
|
}
|
||||||
} else if (deviceSrgv.getCurrSite().equals(wcsSrgvQueue.getDefault03()) && "8".equals(wcsSrgvQueue.getTaskType())) {
|
} else if (deviceSrgv.getCurrSite().equals(wcsSrgvQueue.getDefault03()) && "8".equals(wcsSrgvQueue.getTaskType())) {
|
||||||
@@ -384,18 +385,20 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
SrgvChargingJob srgvChargingJob = new SrgvChargingJob();
|
SrgvChargingJob srgvChargingJob = new SrgvChargingJob();
|
||||||
srgvChargingJob.setAgvId(String.valueOf(wcsSrgvQueue.getAgvId()));
|
srgvChargingJob.setAgvId(String.valueOf(wcsSrgvQueue.getAgvId()));
|
||||||
srgvChargingJob.setTaskNo(wcsSrgvQueue.getTaskNo());
|
srgvChargingJob.setTaskNo(wcsSrgvQueue.getTaskNo());
|
||||||
srgvChargingJob.setJobStatus("2");
|
srgvChargingJob.setJobStatus("3");
|
||||||
srgvChargingJob.setJobType("1");
|
srgvChargingJob.setJobType("1");
|
||||||
List<SrgvChargingJob> srgvChargingJobs = srgvChargingJobMapper.selectSrgvChargingJobList(srgvChargingJob);
|
List<SrgvChargingJob> srgvChargingJobs = srgvChargingJobMapper.selectSrgvChargingJobList(srgvChargingJob);
|
||||||
if (!srgvChargingJobs.isEmpty()) {
|
if (!srgvChargingJobs.isEmpty()) {
|
||||||
SrgvChargingJob srgvChargingJob1 = srgvChargingJobs.get(0);
|
SrgvChargingJob srgvChargingJob1 = srgvChargingJobs.get(0);
|
||||||
if (deviceSrgv.getCurrSite().equals(wcsSrgvQueue.getDefault03()) && "4".equals(wcsSrgvQueue.getTaskType())) {
|
if (deviceSrgv.getCurrSite().equals(wcsSrgvQueue.getEndSite()) && "3".equals(wcsSrgvQueue.getTaskType())) {
|
||||||
//查询换层任务
|
|
||||||
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
||||||
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
||||||
//修改充电任务
|
srgvChargingJob1.setJobStatus("4");
|
||||||
srgvChargingJob1.setJobStatus("1");
|
|
||||||
srgvChargingJobMapper.updateSrgvChargingJob(srgvChargingJob1);
|
srgvChargingJobMapper.updateSrgvChargingJob(srgvChargingJob1);
|
||||||
|
DeviceCdz deviceCdz = new DeviceCdz();
|
||||||
|
DeviceCdz deviceCdz1 = deviceCdzService.selectDeviceCdzById(1L);
|
||||||
|
deviceCdz1.setSpare1(String.valueOf(deviceSrgv.getDeviceId()));
|
||||||
|
deviceCdzService.updateDeviceCdz(deviceCdz1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -422,7 +425,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
if (Integer.parseInt(mydoJob1.getInOrOut()) < 20 && "4".equals(taskType)) {
|
if (Integer.parseInt(mydoJob1.getInOrOut()) < 20 && "4".equals(taskType)) {
|
||||||
wcsSrgvQueue.setStartSite(deviceSrgv.getCurrSite());
|
wcsSrgvQueue.setStartSite(deviceSrgv.getCurrSite());
|
||||||
wcsSrgvQueue.setEndSite("tsj");
|
wcsSrgvQueue.setEndSite("tsj");
|
||||||
//入库的点到点直接进入提升机 不选停靠点
|
//入库的点到点直接进入提升机 不选停靠点 default03 是0305
|
||||||
wcsSrgvMap1.setTheRow(3);
|
wcsSrgvMap1.setTheRow(3);
|
||||||
wcsSrgvMap1.setTheColumn(5);
|
wcsSrgvMap1.setTheColumn(5);
|
||||||
wcsSrgvMap1.setTheLayer(Convert.toInt(mydoJob1.getTheFloor()));
|
wcsSrgvMap1.setTheLayer(Convert.toInt(mydoJob1.getTheFloor()));
|
||||||
@@ -444,10 +447,15 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
wcsSrgvQueue.setStartSite(deviceSrgv.getCurrSite());
|
wcsSrgvQueue.setStartSite(deviceSrgv.getCurrSite());
|
||||||
WcsSrgvMap wcsSrgvMap = new WcsSrgvMap();
|
WcsSrgvMap wcsSrgvMap = new WcsSrgvMap();
|
||||||
wcsSrgvMap.setCargoSpaceId(mydoJob1.getCargoSpaceId());
|
wcsSrgvMap.setCargoSpaceId(mydoJob1.getCargoSpaceId());
|
||||||
|
|
||||||
List<WcsSrgvMap> wcsSrgvMaps = wcsSrgvMapService.selectWcsSrgvMapList(wcsSrgvMap);
|
List<WcsSrgvMap> wcsSrgvMaps = wcsSrgvMapService.selectWcsSrgvMapList(wcsSrgvMap);
|
||||||
wcsSrgvQueue.setEndSite(wcsSrgvMaps.get(0).getSiteId());
|
wcsSrgvQueue.setEndSite(wcsSrgvMaps.get(0).getSiteId());
|
||||||
//每一层的停靠点
|
//每一层的停靠点
|
||||||
wcsSrgvQueue.setDefault03(wcsSrgvMaps1.get(0).getSiteId());
|
if (wcsSrgvQueue.getEndSite().equals("tsj")) {
|
||||||
|
wcsSrgvQueue.setDefault03(wcsSrgvMaps1.get(0).getSiteId());
|
||||||
|
} else {
|
||||||
|
wcsSrgvQueue.setDefault03(wcsSrgvQueue.getEndSite());
|
||||||
|
}
|
||||||
} else if (Integer.parseInt(mydoJob1.getInOrOut()) >= 20 && "2".equals(taskType)) {
|
} else if (Integer.parseInt(mydoJob1.getInOrOut()) >= 20 && "2".equals(taskType)) {
|
||||||
wcsSrgvQueue.setStartSite(deviceSrgv.getCurrSite());
|
wcsSrgvQueue.setStartSite(deviceSrgv.getCurrSite());
|
||||||
wcsSrgvQueue.setEndSite("tsj");
|
wcsSrgvQueue.setEndSite("tsj");
|
||||||
@@ -487,8 +495,8 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
) {
|
) {
|
||||||
//处理tsj站点 换层去提升机前 入库去提升机里 出库去提升机里
|
//处理tsj站点 换层去提升机前 入库去提升机里 出库去提升机里
|
||||||
|
|
||||||
String startSite = getSite(wcsSrgvQueue.getStartSite(),wcsSrgvQueue.getTheFloor(),wcsSrgvQueue.getTaskType());
|
String startSite = getSite(wcsSrgvQueue.getStartSite(), wcsSrgvQueue.getTheFloor(), wcsSrgvQueue.getTaskType());
|
||||||
String endSite = getSite(wcsSrgvQueue.getEndSite(),wcsSrgvQueue.getTheFloor(),wcsSrgvQueue.getTaskType());
|
String endSite = getSite(wcsSrgvQueue.getEndSite(), wcsSrgvQueue.getTheFloor(), wcsSrgvQueue.getTaskType());
|
||||||
String currSite = deviceSrgv.getCurrSite();
|
String currSite = deviceSrgv.getCurrSite();
|
||||||
//判断是否可以下发任务
|
//判断是否可以下发任务
|
||||||
if ("0".equals(wcsSrgvQueue.getIssued()) && deviceSrgv.getStatus() == 1) {
|
if ("0".equals(wcsSrgvQueue.getIssued()) && deviceSrgv.getStatus() == 1) {
|
||||||
@@ -739,10 +747,14 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
//换层作业
|
//换层作业
|
||||||
sendFlag = sendPointToPointTask(deviceSrgv, wcsSrgvQueue, currSite, endSite);
|
sendFlag = sendPointToPointTask(deviceSrgv, wcsSrgvQueue, currSite, endSite);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
sendFlag = sendPointToPointTask(deviceSrgv, wcsSrgvQueue, currSite, endSite);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sendFlag) {
|
if (sendFlag) {
|
||||||
//处理监控信息
|
//处理监控信息
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -929,7 +941,7 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
wcsSagvQueueMapper.insertHistory(wcsSrgvQueue.getTaskNo());
|
||||||
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
wcsSagvQueueMapper.deleteWcsSrgvQueueByGuid(wcsSrgvQueue.getGuid());
|
||||||
|
|
||||||
} else {
|
} else if ("3".equals(taskType) && cargoPlaceSite.equals(currSite)) {
|
||||||
//充电之类的,不知道用不用
|
//充电之类的,不知道用不用
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -955,7 +967,13 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
if (CollUtil.isNotEmpty(wcsSrgvQueues)) {
|
if (CollUtil.isNotEmpty(wcsSrgvQueues)) {
|
||||||
WcsSrgvQueue wcsSrgvQueue = wcsSrgvQueues.get(0);
|
WcsSrgvQueue wcsSrgvQueue = wcsSrgvQueues.get(0);
|
||||||
|
|
||||||
String startSite = wcsSrgvQueue.getDefault03();
|
String startSite = null;
|
||||||
|
//打补丁 出库任务的default03 是040501 提升机前
|
||||||
|
if (wcsSrgvQueue.getTaskType().equals("2")) {
|
||||||
|
startSite = wcsSrgvQueue.getStartSite();
|
||||||
|
}else {
|
||||||
|
startSite = wcsSrgvQueue.getDefault03();
|
||||||
|
}
|
||||||
|
|
||||||
if (!startSite.equals(currSite)) {
|
if (!startSite.equals(currSite)) {
|
||||||
wcsSrgvQueue.setIssued("1");
|
wcsSrgvQueue.setIssued("1");
|
||||||
@@ -966,34 +984,35 @@ public class BaseSRgvThread implements Runnable, SRgvThreadInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public String getSite(String sitId,String floor,String type){
|
|
||||||
if (type.equals("8")){
|
public String getSite(String sitId, String floor, String type) {
|
||||||
if (sitId.equals("tsj")){
|
if (type.equals("8")) {
|
||||||
switch (floor){
|
if (sitId.equals("tsj")) {
|
||||||
|
switch (floor) {
|
||||||
case "1":
|
case "1":
|
||||||
sitId="040501";
|
sitId = "040501";
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
sitId="040502";
|
sitId = "040502";
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
sitId="040503";
|
sitId = "040503";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
if (sitId.equals("tsj")){
|
if (sitId.equals("tsj")) {
|
||||||
switch (floor){
|
switch (floor) {
|
||||||
case "1":
|
case "1":
|
||||||
sitId="030501";
|
sitId = "030501";
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
sitId="030502";
|
sitId = "030502";
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
sitId="030503";
|
sitId = "030503";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ public class SsjThread implements Runnable {
|
|||||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(deviceSsj.getTaskNo()));
|
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(deviceSsj.getTaskNo()));
|
||||||
if (mydoJob != null) {
|
if (mydoJob != null) {
|
||||||
log.info("设备:{} 位置:{} 任务号:{} 出库到位", "输送线", deviceSsj.getDeviceCode(), mydoJob.getTaskNo());
|
log.info("设备:{} 位置:{} 任务号:{} 出库到位", "输送线", deviceSsj.getDeviceCode(), mydoJob.getTaskNo());
|
||||||
|
mydoJob.setStatus("4");
|
||||||
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
mydoJobService.insertHistory(mydoJob.getJobId());
|
mydoJobService.insertHistory(mydoJob.getJobId());
|
||||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||||
JobCallBack jobCallBack = new JobCallBack();
|
JobCallBack jobCallBack = new JobCallBack();
|
||||||
|
|||||||
@@ -260,4 +260,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{v_job_ids,jdbcType=VARCHAR,mode=OUT}
|
#{v_job_ids,jdbcType=VARCHAR,mode=OUT}
|
||||||
)}
|
)}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectOutJobList" resultMap="MydoJobResult">
|
||||||
|
<include refid="selectMydoJobVo"/>
|
||||||
|
where status=1 and in_or_out >20 and the_floor =#{theFloor}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -14,10 +14,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="jobType" column="job_type" />
|
<result property="jobType" column="job_type" />
|
||||||
<result property="agvId" column="agv_id" />
|
<result property="agvId" column="agv_id" />
|
||||||
<result property="chargingId" column="charging_id" />
|
<result property="chargingId" column="charging_id" />
|
||||||
|
<result property="taskNo" column="task_no" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSrgvChargingJobVo">
|
<sql id="selectSrgvChargingJobVo">
|
||||||
select guid, charging_site, job_status, charging_status, start_date, charging_date, job_type, agv_id, charging_id from srgv_charging_job
|
select guid, charging_site, job_status, charging_status, start_date, charging_date, job_type, agv_id, charging_id,task_no from srgv_charging_job
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSrgvChargingJobList" parameterType="SrgvChargingJob" resultMap="SrgvChargingJobResult">
|
<select id="selectSrgvChargingJobList" parameterType="SrgvChargingJob" resultMap="SrgvChargingJobResult">
|
||||||
@@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="jobType != null and jobType != ''"> and job_type = #{jobType}</if>
|
<if test="jobType != null and jobType != ''"> and job_type = #{jobType}</if>
|
||||||
<if test="agvId != null and agvId != ''"> and agv_id = #{agvId}</if>
|
<if test="agvId != null and agvId != ''"> and agv_id = #{agvId}</if>
|
||||||
<if test="chargingId != null and chargingId != ''"> and charging_id = #{chargingId}</if>
|
<if test="chargingId != null and chargingId != ''"> and charging_id = #{chargingId}</if>
|
||||||
|
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -51,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="jobType != null">job_type,</if>
|
<if test="jobType != null">job_type,</if>
|
||||||
<if test="agvId != null">agv_id,</if>
|
<if test="agvId != null">agv_id,</if>
|
||||||
<if test="chargingId != null">charging_id,</if>
|
<if test="chargingId != null">charging_id,</if>
|
||||||
|
<if test="taskNo != null">task_no,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="guid != null">#{guid},</if>
|
<if test="guid != null">#{guid},</if>
|
||||||
@@ -62,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="jobType != null">#{jobType},</if>
|
<if test="jobType != null">#{jobType},</if>
|
||||||
<if test="agvId != null">#{agvId},</if>
|
<if test="agvId != null">#{agvId},</if>
|
||||||
<if test="chargingId != null">#{chargingId},</if>
|
<if test="chargingId != null">#{chargingId},</if>
|
||||||
|
<if test="taskNo != null">#{taskNo},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertHistory">
|
<insert id="insertHistory">
|
||||||
@@ -80,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="jobType != null">job_type = #{jobType},</if>
|
<if test="jobType != null">job_type = #{jobType},</if>
|
||||||
<if test="agvId != null">agv_id = #{agvId},</if>
|
<if test="agvId != null">agv_id = #{agvId},</if>
|
||||||
<if test="chargingId != null">charging_id = #{chargingId},</if>
|
<if test="chargingId != null">charging_id = #{chargingId},</if>
|
||||||
|
<if test="taskNo != null">task_no = #{taskNo},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where guid = #{guid}
|
where guid = #{guid}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Reference in New Issue
Block a user