现场调度修改
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.api.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
@@ -24,6 +25,8 @@ import com.ruoyi.job.domain.MydoJob;
|
||||
import com.ruoyi.job.service.IMydoJobService;
|
||||
import com.ruoyi.queue.agv.domain.AgvQueue;
|
||||
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||
import com.ruoyi.queue.ddj.domain.DdjDeviceExecutionQueue;
|
||||
import com.ruoyi.queue.ddj.service.impl.DdjDeviceExecutionQueueServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -51,7 +54,8 @@ public class ApiServiceImpl implements IApiService {
|
||||
private IAgvQueueService agvQueueService;
|
||||
@Autowired
|
||||
private IMydoJobService mydoJobService;
|
||||
|
||||
@Autowired
|
||||
private DdjDeviceExecutionQueueServiceImpl ddjDeviceExecutionQueueServiceImpl;
|
||||
|
||||
|
||||
/**
|
||||
@@ -197,11 +201,29 @@ public class ApiServiceImpl implements IApiService {
|
||||
}
|
||||
if("1".equals(mydoJob.getStatus())){
|
||||
mydoJob.setStatus("5");
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
mydoJobService.insertHistory(mydoJob.getJobId());
|
||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||
return AjaxResult.success();
|
||||
}else{
|
||||
return AjaxResult.error("任务已开始");
|
||||
DdjDeviceExecutionQueue param = new DdjDeviceExecutionQueue();
|
||||
param.setRwh(Convert.toLong(mydoJob.getTaskNo()));
|
||||
List<DdjDeviceExecutionQueue> ddjDeviceExecutionQueues = ddjDeviceExecutionQueueServiceImpl.selectDdjDeviceExecutionQueueList(param);
|
||||
if (CollUtil.isNotEmpty(ddjDeviceExecutionQueues)){
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueues.get(0);
|
||||
if (ddjDeviceExecutionQueue.getDdjxf().equals("1")){
|
||||
return AjaxResult.error("任务已开始");
|
||||
}else {
|
||||
ddjDeviceExecutionQueueServiceImpl.deleteDdjDeviceExecutionQueueByUuid(ddjDeviceExecutionQueue.getUuid());
|
||||
mydoJob.setStatus("5");
|
||||
mydoJobService.updateMydoJob(mydoJob);
|
||||
mydoJobService.insertHistory(mydoJob.getJobId());
|
||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}else {
|
||||
return AjaxResult.error("未找到堆垛机队列 任务号:"+mydoJob.getTaskNo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,4 +84,6 @@ public interface MydoJobMapper
|
||||
MydoJob selectRunningMydoJobByExitList(@Param("exitList") List<String> exitList);
|
||||
|
||||
List<MydoJobScreen> selectJobListByWarehouseIdAndType(MydoJob inParam);
|
||||
|
||||
List<MydoJob> selectOutMydoJobList(MydoJob outJobParam);
|
||||
}
|
||||
|
||||
@@ -85,4 +85,5 @@ public interface IMydoJobService
|
||||
|
||||
Map<String,List<MydoJobScreen>> selectJobListByWarehouseIdAndType(String warehouseId, String exitType);
|
||||
|
||||
List<MydoJob> selectOutMydoJobList(MydoJob outJobParam);
|
||||
}
|
||||
|
||||
@@ -219,4 +219,9 @@ public class MydoJobServiceImpl implements IMydoJobService
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MydoJob> selectOutMydoJobList(MydoJob outJobParam) {
|
||||
return mydoJobMapper.selectOutMydoJobList(outJobParam);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -103,6 +103,9 @@ public class DdjDeviceExecutionQueue extends BaseEntity
|
||||
/** $column.columnComment */
|
||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private String spare3;
|
||||
private String spare4;
|
||||
private String spare5;
|
||||
private String spare6;
|
||||
|
||||
private List<Integer> rwlxList;
|
||||
|
||||
|
||||
@@ -169,10 +169,18 @@ public class ScheduleThread {
|
||||
if (plcDdj2ReadCustomThread!=null){
|
||||
plcDdj2ReadCustomThread.getThread().start();
|
||||
|
||||
}
|
||||
if (plcDdj3ReadCustomThread!=null){
|
||||
plcDdj3ReadCustomThread.getThread().start();
|
||||
|
||||
}
|
||||
if (plcDdj4ReadCustomThread!=null){
|
||||
plcDdj4ReadCustomThread.getThread().start();
|
||||
|
||||
}
|
||||
if (plcDdj5ReadCustomThread!=null){
|
||||
plcDdj5ReadCustomThread.getThread().start();
|
||||
|
||||
}
|
||||
/*plcDdj2ReadCustomThread.getThread().start();
|
||||
plcDdj3ReadCustomThread.getThread().start();
|
||||
@@ -194,10 +202,18 @@ public class ScheduleThread {
|
||||
if (ddj2CustomThread!=null){
|
||||
ddj2CustomThread.thread.start();
|
||||
|
||||
}
|
||||
if (ddj3CustomThread!=null){
|
||||
ddj3CustomThread.thread.start();
|
||||
|
||||
}
|
||||
if (ddj4CustomThread!=null){
|
||||
ddj4CustomThread.thread.start();
|
||||
|
||||
}
|
||||
if (ddj5CustomThread!=null){
|
||||
ddj5CustomThread.thread.start();
|
||||
|
||||
}
|
||||
/*ddj2CustomThread.thread.start();
|
||||
ddj3CustomThread.thread.start();
|
||||
|
||||
@@ -58,7 +58,7 @@ public class Tools implements Serializable {
|
||||
for (int j = 0; j < 4; j++) {
|
||||
int s = j + i * 4;
|
||||
ints1[s] = son[j];
|
||||
System.out.println(Arrays.toString(ints1));
|
||||
//System.out.println(Arrays.toString(ints1));
|
||||
}
|
||||
}
|
||||
int a = 0;
|
||||
|
||||
@@ -30,6 +30,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.ruoyi.common.TaskStatusCode.*;
|
||||
import static com.ruoyi.common.TaskType.*;
|
||||
@@ -134,86 +135,99 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
* 创建出库队列
|
||||
*/
|
||||
private void generateOutBoundQueue(MsgDdj ddj) {
|
||||
List<MydoJob> outJobList = mydoJobService.selectMydoJobList(getOutJobParam());
|
||||
List<MydoJob> outJobList = mydoJobService.selectOutMydoJobList(getOutJobParam());
|
||||
if (CollUtil.isNotEmpty(outJobList)) {
|
||||
MydoJob outJob = outJobList.get(0);
|
||||
String exitId = outJob.getExitId();
|
||||
outJobList = outJobList.stream().filter(x -> Convert.toInt(x.getInOrOut()) >= 20).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(outJobList)){
|
||||
Map<String, List<MydoJob>> exitJobMap = outJobList.stream().collect(Collectors.groupingBy(MydoJob::getExitId));
|
||||
for (String exit : exitJobMap.keySet()) {
|
||||
List<MydoJob> mydoJobs = exitJobMap.get(exit);
|
||||
if (CollUtil.isNotEmpty(mydoJobs)){
|
||||
for (MydoJob outJob : mydoJobs) {
|
||||
String exitId = outJob.getExitId();
|
||||
|
||||
String outSsj = "";
|
||||
switch (exitId) {
|
||||
case "1":
|
||||
List<DeviceSsj> outSsj1 = getDeviceSsjs("outSsj1");
|
||||
if (outSsj1.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getHczt() == 0 && ddj.getSbzt() == 0)) {
|
||||
outSsj = outSsj1.get(0).getDeviceCode();
|
||||
if (StrUtil.isNotEmpty(outSsj)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
List<DeviceSsj> outSsj2 = getDeviceSsjs("outSsj2");
|
||||
if (outSsj2.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getHczt() == 0 && ddj.getSbzt() == 0)) {
|
||||
outSsj = outSsj2.get(0).getDeviceCode();
|
||||
if (StrUtil.isNotEmpty(outSsj)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "2":
|
||||
List<DeviceSsj> outSsj3 = getDeviceSsjs("outSsj3");
|
||||
if (outSsj3.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getYxxf() == 1 && ddj.getHczt() == 0 && ddj.getSbzt() == 0)) {
|
||||
outSsj = outSsj3.get(0).getDeviceCode();
|
||||
if (StrUtil.isNotEmpty(outSsj)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
List<DeviceSsj> outSsj4 = getDeviceSsjs("outSsj4");
|
||||
if (outSsj4.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 && ddj.getYxxf() == 1 && ddj.getHczt() == 0 && ddj.getSbzt() == 0)) {
|
||||
outSsj = outSsj4.get(0).getDeviceCode();
|
||||
if (StrUtil.isNotEmpty(outSsj)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
log.error("出库任务出口错误");
|
||||
}
|
||||
String outSsj = "";
|
||||
switch (exitId) {
|
||||
case "1":
|
||||
List<DeviceSsj> outSsj1 = getDeviceSsjs("outSsj1");
|
||||
if (outSsj1.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 )) {
|
||||
outSsj = outSsj1.get(0).getDeviceCode();
|
||||
if (StrUtil.isNotEmpty(outSsj)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
List<DeviceSsj> outSsj2 = getDeviceSsjs("outSsj2");
|
||||
if (outSsj2.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 )) {
|
||||
outSsj = outSsj2.get(0).getDeviceCode();
|
||||
if (StrUtil.isNotEmpty(outSsj)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "2":
|
||||
List<DeviceSsj> outSsj3 = getDeviceSsjs("outSsj3");
|
||||
if (outSsj3.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0 )) {
|
||||
outSsj = outSsj3.get(0).getDeviceCode();
|
||||
if (StrUtil.isNotEmpty(outSsj)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
List<DeviceSsj> outSsj4 = getDeviceSsjs("outSsj4");
|
||||
if (outSsj4.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getTaskNo() == 0)) {
|
||||
outSsj = outSsj4.get(0).getDeviceCode();
|
||||
if (StrUtil.isNotEmpty(outSsj)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
log.error("出库任务出口错误");
|
||||
}
|
||||
|
||||
if ("0".equals(outJob.getExecutionPhase()) && StrUtil.isNotEmpty(outSsj)) {
|
||||
int ssjJobCount = ddjDeviceExecutionQueueService.selectOutJobCount(getOtherOutDdjQueue(outSsj));
|
||||
if ("0".equals(outJob.getExecutionPhase()) && StrUtil.isNotEmpty(outSsj)) {
|
||||
int ssjJobCount = ddjDeviceExecutionQueueService.selectOutJobCount(getOtherOutDdjQueue(outSsj));
|
||||
|
||||
if (ssjJobCount == 0) {
|
||||
DdjDeviceExecutionQueue ddjQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Convert.toLong(outJob.getTaskNo()), ddj.getId());
|
||||
//查询这个站点是否存在任务
|
||||
if (ObjUtil.isNull(ddjQueue)) {
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
|
||||
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
|
||||
ddjDeviceExecutionQueue.setRwh(Convert.toLong(outJob.getTaskNo()));
|
||||
ddjDeviceExecutionQueue.setDevName(ddj.getName());
|
||||
ddjDeviceExecutionQueue.setDevId(ddj.getId());
|
||||
ddjDeviceExecutionQueue.setRwzt(0);
|
||||
if (ssjJobCount == 0) {
|
||||
DdjDeviceExecutionQueue ddjQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Convert.toLong(outJob.getTaskNo()), ddj.getId());
|
||||
//查询这个站点是否存在任务
|
||||
if (ObjUtil.isNull(ddjQueue)) {
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
|
||||
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
|
||||
ddjDeviceExecutionQueue.setRwh(Convert.toLong(outJob.getTaskNo()));
|
||||
ddjDeviceExecutionQueue.setDevName(ddj.getName());
|
||||
ddjDeviceExecutionQueue.setDevId(ddj.getId());
|
||||
ddjDeviceExecutionQueue.setRwzt(0);
|
||||
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(outJob.getCargoSpaceId());
|
||||
ddjDeviceExecutionQueue.setYph(basCargoSpace.getThePlatoon());
|
||||
ddjDeviceExecutionQueue.setYlh(basCargoSpace.getTheColumn());
|
||||
ddjDeviceExecutionQueue.setYch(basCargoSpace.getTheFloor());
|
||||
List<Integer> integers = roadwayMap.get(outSsj);
|
||||
ddjDeviceExecutionQueue.setMbph(integers.get(0));
|
||||
ddjDeviceExecutionQueue.setMblh(integers.get(1));
|
||||
ddjDeviceExecutionQueue.setMbch(integers.get(2));
|
||||
ddjDeviceExecutionQueue.setDdjxf("0");
|
||||
ddjDeviceExecutionQueue.setMlfs(5);
|
||||
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
|
||||
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_3);
|
||||
ddjDeviceExecutionQueue.setSpare2(outSsj);
|
||||
ddjDeviceExecutionQueue.setSpare4(outJob.getTrayCode());
|
||||
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||
outJob.setStatus("3");
|
||||
outJob.setStartTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
outJob.setExecutionPhase(TASK_EP_DDJ);
|
||||
mydoJobService.updateMydoJob(outJob);
|
||||
} else {
|
||||
log.info("任务已存在 rwh{}", outJob.getTaskNo());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(outJob.getCargoSpaceId());
|
||||
ddjDeviceExecutionQueue.setYph(basCargoSpace.getThePlatoon());
|
||||
ddjDeviceExecutionQueue.setYlh(basCargoSpace.getTheColumn());
|
||||
ddjDeviceExecutionQueue.setYch(basCargoSpace.getTheFloor());
|
||||
List<Integer> integers = roadwayMap.get(outSsj);
|
||||
ddjDeviceExecutionQueue.setMbph(integers.get(0));
|
||||
ddjDeviceExecutionQueue.setMblh(integers.get(1));
|
||||
ddjDeviceExecutionQueue.setMbch(integers.get(2));
|
||||
ddjDeviceExecutionQueue.setDdjxf("0");
|
||||
ddjDeviceExecutionQueue.setMlfs(5);
|
||||
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
|
||||
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_3);
|
||||
ddjDeviceExecutionQueue.setSpare2(outSsj);
|
||||
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||
outJob.setStatus("3");
|
||||
outJob.setStartTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
outJob.setExecutionPhase(TASK_EP_DDJ);
|
||||
mydoJobService.updateMydoJob(outJob);
|
||||
} else {
|
||||
log.info("任务已存在 rwh{}", outJob.getTaskNo());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +249,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
* 创建入库放货队列
|
||||
*/
|
||||
private void generateInBoundLoadQueue(MsgDdj ddj) {
|
||||
if (ddj.getCzfs() == 5 && ddj.getSbzt() == 0 && ddj.getHczt() == 1 && ddj.getYxxf() == 1 && ddj.getHeight() > 0) {
|
||||
if (ddj.getCzfs() == 5 && ddj.getHczt() == 1 && ddj.getYxxf() == 1 && ddj.getHeight() > 0) {
|
||||
String trayCode = ddj.getTrayCode();
|
||||
//允许下发 联机 有货待机
|
||||
if (trayCode != null && StrUtil.isNotEmpty(trayCode.trim())) {
|
||||
@@ -243,6 +257,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
createRollbackQueue(ddj, 1);
|
||||
|
||||
} else if (!"00000000".equals(trayCode) && !"000000".equals(trayCode)) {
|
||||
log.info("258- 扫码成功 trayCode:{}",trayCode);
|
||||
trayCode = trayCode.substring(trayCode.length() - 4);
|
||||
MydoJob param = new MydoJob();
|
||||
param.setTrayCode(trayCode);
|
||||
@@ -268,7 +283,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
} else {
|
||||
log.error(result.get("msg").toString());
|
||||
if ("没有空货位".equals(result.get("msg").toString())) {
|
||||
createRollbackQueue(ddj, 3);
|
||||
createRollbackQueue(ddj, 3);
|
||||
} else if ("无入库任务".equals(result.get("msg").toString())) {
|
||||
createRollbackQueue(ddj, 2);
|
||||
} else if ("该托盘已有库存".equals(result.get("msg").toString())) {
|
||||
@@ -306,7 +321,9 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
ddjDeviceExecutionQueue.setMlfs(5);
|
||||
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
|
||||
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_2);
|
||||
ddjDeviceExecutionQueue.setSpare4(trayCode);
|
||||
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||
log.info("324- 任务生成成功 trayCode:{}",trayCode);
|
||||
|
||||
inJob.setStatus("3");
|
||||
inJob.setStartTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
||||
@@ -329,6 +346,8 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
private void createRollbackQueue(MsgDdj ddj, int type) {
|
||||
DdjDeviceExecutionQueue pickQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(ddj.getRwh(), ddj.getId());
|
||||
if (pickQueue != null) {
|
||||
String trayCode = ddj.getTrayCode();
|
||||
trayCode = trayCode.substring(trayCode.length() - 4);
|
||||
Integer mbph = pickQueue.getYph();
|
||||
Integer mblh = pickQueue.getYlh();
|
||||
Integer mbch = pickQueue.getYch();
|
||||
@@ -378,6 +397,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
|
||||
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_4);
|
||||
ddjDeviceExecutionQueue.setSpare2(road);
|
||||
ddjDeviceExecutionQueue.setSpare4(trayCode);
|
||||
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
|
||||
}
|
||||
}
|
||||
@@ -398,6 +418,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
int taskNo = ssj.getTaskNo();
|
||||
int rkqq = ssj.getRkqq();
|
||||
if (taskNo > 0 && rkqq == 1) {
|
||||
//log.info("取货任务 任务号{}",taskNo);
|
||||
//todo 连接称重 并保存数据
|
||||
String czDeviceIpPort = czRoadwayMap.get(ssj.getDeviceCode());
|
||||
String[] split = czDeviceIpPort.split(":");
|
||||
@@ -405,6 +426,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
Double aDouble = Convert.toDouble(weight);
|
||||
DdjDeviceExecutionQueue ddjQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Convert.toLong(taskNo), ddj.getId());
|
||||
if (ObjUtil.isNull(ddjQueue)) {
|
||||
log.info("取货任务 任务号:{} 重量:{}",taskNo,aDouble);
|
||||
if (aDouble > 0 && aDouble < 1500) {
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
|
||||
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
|
||||
@@ -457,12 +479,12 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
堆垛机线程进来后第一件事先进行堆垛机正执行任务的账务处理
|
||||
以防存在漏处理,没处理的情况发生
|
||||
*/
|
||||
if (ddj.getCzfs() == 5 && ddj.getSbzt() == 0 && ddj.getJdbz() == 5) {
|
||||
if (ddj.getCzfs() == 5 && ddj.getJdbz() == 5) {
|
||||
Long rwh = ddj.getRwh();
|
||||
Integer hczt = ddj.getHczt();
|
||||
//完成作业
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(rwh, ddj.getId());
|
||||
if (ObjUtil.isNotNull(ddjDeviceExecutionQueue)) {
|
||||
if (ObjUtil.isNotNull(ddjDeviceExecutionQueue) && ddjDeviceExecutionQueue.getDdjxf().equals("1")) {
|
||||
if (ddjDeviceExecutionQueue.getRwlx() == 2 || ddjDeviceExecutionQueue.getRwlx() == 3) {
|
||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(rwh);
|
||||
if (ObjUtil.isNotNull(mydoJob)) {
|
||||
@@ -606,7 +628,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
|
||||
log.error("托盘堆垛机下发任务失败!!!!!!!");
|
||||
}
|
||||
}
|
||||
} else if (ddj.getSbzt() == 0 && ddj.getHczt() == 1) {
|
||||
} else if ((ddj.getSbzt() == 0 || ddj.getSbzt()==1047) && ddj.getHczt() == 1) {
|
||||
//有货待机 只查询入库放货队列和 无任务 未扫码回滚 队列
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueueParam = new DdjDeviceExecutionQueue();
|
||||
ddjDeviceExecutionQueueParam.setDdjxf("0");
|
||||
|
||||
@@ -26,43 +26,59 @@ public class Ddj3Thread extends BaseDdjThread {
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
/*super.init();
|
||||
super.init();
|
||||
ddjCodeList = new HashMap<>();
|
||||
ssjList = new HashMap<>();
|
||||
ArrayList<MsgDdj> ddjCodes = new ArrayList<>();
|
||||
ddjCodes.add(PlcDdjRead.deviceDdjMap.get("ddj3"));
|
||||
ArrayList<String> ddjCodes = new ArrayList<>();
|
||||
ddjCodes.add("ddj3");
|
||||
ddjCodeList.put("ddj", ddjCodes);
|
||||
ArrayList<DeviceSsj> roadSsjList = new ArrayList<>();
|
||||
roadSsjList.add(PlcSsjRead.deviceSsjMap.get("L2005"));
|
||||
roadSsjList.add(PlcSsjRead.deviceSsjMap.get("L2006"));
|
||||
roadSsjList.add(PlcSsjRead.deviceSsjMap.get("L2011"));
|
||||
roadSsjList.add(PlcSsjRead.deviceSsjMap.get("L2012"));
|
||||
ArrayList<String> roadSsjList = new ArrayList<>();
|
||||
roadSsjList.add("L2005");
|
||||
roadSsjList.add("L2006");
|
||||
roadSsjList.add("L2011");
|
||||
roadSsjList.add("L2012");
|
||||
ssjList.put("roadSsjList", roadSsjList);
|
||||
ArrayList<DeviceSsj> outSsj1 = new ArrayList<>();
|
||||
outSsj1.add(PlcSsjRead.deviceSsjMap.get("L2005"));
|
||||
ArrayList<String> outSsj1 = new ArrayList<>();
|
||||
outSsj1.add("L2005");
|
||||
ssjList.put("outSsj1", outSsj1);
|
||||
ArrayList<DeviceSsj> outSsj2 = new ArrayList<>();
|
||||
outSsj2.add(PlcSsjRead.deviceSsjMap.get("L2006"));
|
||||
ArrayList<String> outSsj2 = new ArrayList<>();
|
||||
outSsj2.add("L2006");
|
||||
ssjList.put("outSsj2", outSsj2);
|
||||
ArrayList<DeviceSsj> outSsj3 = new ArrayList<>();
|
||||
outSsj3.add(PlcSsjRead.deviceSsjMap.get("L2011"));
|
||||
ArrayList<String> outSsj3 = new ArrayList<>();
|
||||
outSsj3.add("L2011");
|
||||
ssjList.put("outSsj3", outSsj3);
|
||||
ArrayList<DeviceSsj> outSsj4 = new ArrayList<>();
|
||||
outSsj4.add(PlcSsjRead.deviceSsjMap.get("L2012"));
|
||||
ArrayList<String> outSsj4 = new ArrayList<>();
|
||||
outSsj4.add("L2012");
|
||||
ssjList.put("outSsj4", outSsj4);
|
||||
|
||||
//初始化巷道口 排 列 层
|
||||
roadwayMap.put("L2005", Arrays.asList(5, 1, 1));
|
||||
roadwayMap.put("L2006", Arrays.asList(6, 1, 1));
|
||||
roadwayMap.put("L2011", Arrays.asList(5, 22, 1));
|
||||
roadwayMap.put("L2012", Arrays.asList(6, 22, 1));
|
||||
|
||||
roadwayMap.put("L2005", Arrays.asList(1, 0, 1));
|
||||
roadwayMap.put("L2006", Arrays.asList(2, 0, 1));
|
||||
roadwayMap.put("L2011", Arrays.asList(1, 20, 1));
|
||||
roadwayMap.put("L2012", Arrays.asList(2, 20, 1));
|
||||
roadwayRollback.put("L2005", 88);
|
||||
roadwayRollback.put("L2006", 89);
|
||||
roadwayRollback.put("L2011", 90);
|
||||
roadwayRollback.put("L2012", 91);
|
||||
//初始化称重设备连接ip port
|
||||
czRoadwayMap.put("L2005", "172.19.50.79:4001");
|
||||
czRoadwayMap.put("L2006", "172.19.50.80:4001");
|
||||
czRoadwayMap.put("L2011", "172.19.50.81:4001");
|
||||
czRoadwayMap.put("L2012","172.19.50.82:4001");
|
||||
|
||||
/*czOverMap.put("L2003", "DB502.12");
|
||||
czOverMap.put("L2004", "DB502.26");
|
||||
czOverMap.put("L2009", "DB502.96");
|
||||
czOverMap.put("L2010", "DB502.110");*/
|
||||
|
||||
outJobMap.put("L2005", "DB502.66");
|
||||
outJobMap.put("L2006", "DB502.80");
|
||||
outJobMap.put("L2011", "DB502.150");
|
||||
outJobMap.put("L2012", "DB502.164");
|
||||
|
||||
|
||||
log.info("Ddj3Thread init");
|
||||
|
||||
log.info("Ddj3Thread init");*/
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.bas.fault.domain.BasFaultRecord;
|
||||
import com.ruoyi.bas.fault.service.IBasFaultRecordService;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
@@ -11,6 +12,8 @@ import com.ruoyi.device.ddj.domain.MsgDdj;
|
||||
import com.ruoyi.device.ddj.service.IMsgDdjService;
|
||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||
import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
||||
import com.ruoyi.queue.ddj.domain.DdjDeviceExecutionQueue;
|
||||
import com.ruoyi.queue.ddj.service.IDdjDeviceExecutionQueueService;
|
||||
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
|
||||
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -29,12 +32,14 @@ public class MonitoringThread implements Runnable {
|
||||
private IDeviceSsjService deviceSsjService;
|
||||
private IMsgDdjService msgDdjService;
|
||||
private IBasFaultRecordService basFaultRecordService;
|
||||
private IDdjDeviceExecutionQueueService ddjDeviceExecutionQueueService;
|
||||
|
||||
|
||||
public void init() {
|
||||
deviceSsjService = SpringUtils.getBean(IDeviceSsjService.class);
|
||||
msgDdjService = SpringUtils.getBean(IMsgDdjService.class);
|
||||
basFaultRecordService = SpringUtils.getBean(IBasFaultRecordService.class);
|
||||
ddjDeviceExecutionQueueService = SpringUtils.getBean(IDdjDeviceExecutionQueueService.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +51,8 @@ public class MonitoringThread implements Runnable {
|
||||
DeviceSsj deviceSsj = PlcSsjRead.deviceSsjMap.get(ssjCode);
|
||||
deviceSsjService.updateDeviceSsj(deviceSsj);
|
||||
|
||||
if (deviceSsj.getException() >= 101 && deviceSsj.getException() <= 106) {
|
||||
//输送机外形异常 101-前超长 102-后超长 103-左超宽 104-右超宽 105-超高 106-超重
|
||||
if (deviceSsj.getException() >= 101 && deviceSsj.getException() <= 106 && deviceSsj.getTaskNo()>0) {
|
||||
BasFaultRecord param = new BasFaultRecord();
|
||||
param.setTaskNo(Convert.toStr(deviceSsj.getTaskNo()));
|
||||
param.setDeviceId(Convert.toStr(deviceSsj.getDeviceCode()));
|
||||
@@ -60,24 +66,15 @@ public class MonitoringThread implements Runnable {
|
||||
record.setDeviceType("ssj");
|
||||
record.setTaskNo(Convert.toStr(deviceSsj.getTaskNo()));
|
||||
record.setStartTime(DateUtil.formatDateTime(new Date()));
|
||||
record.setFault(Convert.toStr(deviceSsj.getException()));
|
||||
record.setFault(getSsjZt(deviceSsj.getException()));
|
||||
record.setJobId("0");
|
||||
basFaultRecordService.insertBasFaultRecord(record);
|
||||
}
|
||||
} else if (deviceSsj.getException() == 0) {
|
||||
//查询记录 更新故障结束时间
|
||||
BasFaultRecord param = new BasFaultRecord();
|
||||
param.setTaskNo(Convert.toStr(deviceSsj.getTaskNo()));
|
||||
param.setDeviceId(Convert.toStr(deviceSsj.getDeviceCode()));
|
||||
param.setJobId("0");
|
||||
List<BasFaultRecord> basFaultRecords = basFaultRecordService.selectBasFaultRecordList(param);
|
||||
if (CollUtil.isNotEmpty(basFaultRecords)) {
|
||||
BasFaultRecord record = basFaultRecords.get(0);
|
||||
record.setJobId("1");
|
||||
record.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||
basFaultRecordService.updateBasFaultRecord(record);
|
||||
}
|
||||
} else if (deviceSsj.getTaskNo() == 0) {
|
||||
}
|
||||
|
||||
|
||||
//人工处理 恢复异常
|
||||
if (deviceSsj.getException() == 0 && deviceSsj.getTaskNo() >= 200) {
|
||||
//查询记录 更新故障结束时间
|
||||
BasFaultRecord param = new BasFaultRecord();
|
||||
param.setDeviceId(Convert.toStr(deviceSsj.getDeviceCode()));
|
||||
@@ -91,28 +88,25 @@ public class MonitoringThread implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
/* if (deviceSsj.getException()==101){
|
||||
//前超长
|
||||
//取走托盘 恢复异常
|
||||
if (deviceSsj.getTaskNo() == 0 && deviceSsj.getKx() == 1) {
|
||||
//查询记录 更新故障结束时间
|
||||
BasFaultRecord param = new BasFaultRecord();
|
||||
param.setDeviceId(Convert.toStr(deviceSsj.getDeviceCode()));
|
||||
param.setJobId("0");
|
||||
List<BasFaultRecord> basFaultRecords = basFaultRecordService.selectBasFaultRecordList(param);
|
||||
if (CollUtil.isNotEmpty(basFaultRecords)) {
|
||||
BasFaultRecord record = basFaultRecords.get(0);
|
||||
record.setJobId("1");
|
||||
record.setFinishTime(DateUtil.formatDateTime(new Date()));
|
||||
basFaultRecordService.updateBasFaultRecord(record);
|
||||
}
|
||||
}
|
||||
if (deviceSsj.getException()==102){
|
||||
//后超长
|
||||
}
|
||||
if (deviceSsj.getException()==103){
|
||||
//左超宽
|
||||
}
|
||||
if (deviceSsj.getException()==104){
|
||||
//右超宽
|
||||
}
|
||||
if (deviceSsj.getException()==105){
|
||||
//超高
|
||||
}
|
||||
if (deviceSsj.getException()==106){
|
||||
//称重异常
|
||||
}*/
|
||||
}
|
||||
for (String ddjCode : PlcDdjRead.deviceDdjMap.keySet()) {
|
||||
MsgDdj msgDdj = PlcDdjRead.deviceDdjMap.get(ddjCode);
|
||||
msgDdjService.updateMsgDdj(msgDdj);
|
||||
//记录异常
|
||||
if (msgDdj.getSbzt() > 1000) {
|
||||
//查询记录,添加故障开始时间
|
||||
BasFaultRecord param = new BasFaultRecord();
|
||||
@@ -128,15 +122,16 @@ public class MonitoringThread implements Runnable {
|
||||
record.setDeviceType("ddj");
|
||||
record.setTaskNo(Convert.toStr(msgDdj.getRwh()));
|
||||
record.setStartTime(DateUtil.formatDateTime(new Date()));
|
||||
record.setFault(Convert.toStr(msgDdj.getSbzt()));
|
||||
record.setFault(getDdjZt(msgDdj.getSbzt(), null));
|
||||
record.setJobId("0");
|
||||
basFaultRecordService.insertBasFaultRecord(record);
|
||||
}
|
||||
}
|
||||
//恢复异常
|
||||
if (msgDdj.getSbzt() < 1000 && msgDdj.getCzfs()==5){
|
||||
//查询记录 更新故障结束时间
|
||||
BasFaultRecord param = new BasFaultRecord();
|
||||
param.setTaskNo(Convert.toStr(msgDdj.getRwh()));
|
||||
//param.setTaskNo(Convert.toStr(msgDdj.getRwh()));
|
||||
param.setDeviceId(Convert.toStr(msgDdj.getId()));
|
||||
param.setJobId("0");
|
||||
List<BasFaultRecord> basFaultRecords = basFaultRecordService.selectBasFaultRecordList(param);
|
||||
@@ -147,8 +142,78 @@ public class MonitoringThread implements Runnable {
|
||||
basFaultRecordService.updateBasFaultRecord(record);
|
||||
}
|
||||
}
|
||||
/*
|
||||
private String getZt(int value) {
|
||||
if (msgDdj.getRwh() >= 50 && msgDdj.getRwh() < 200) {
|
||||
//扫码失败+0 无任务+100 无货位+20 已存在当前托盘+40
|
||||
long taskNo = msgDdj.getRwh();
|
||||
/*
|
||||
"L2001", 80 "L2002", 81 "L2007", 82 "L2008", 83 "L2003", 84 "L2004", 85
|
||||
"L2009", 86 "L2010", 87 "L2005", 88 "L2006", 89 "L2011", 90 "L2012", 91
|
||||
"L1001", 92 "L1002", 93 "L1003", 94 "L1004", 95 "L1005", 96 "L1006", 97
|
||||
*/
|
||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(taskNo, msgDdj.getId());
|
||||
if (ObjUtil.isNotNull(ddjDeviceExecutionQueue)) {
|
||||
String trayCode = ddjDeviceExecutionQueue.getSpare4();
|
||||
BasFaultRecord param = new BasFaultRecord();
|
||||
param.setTaskNo(Convert.toStr(msgDdj.getRwh()));
|
||||
param.setDeviceId(Convert.toStr(ddjDeviceExecutionQueue.getSpare2()));
|
||||
param.setJobId("0");
|
||||
List<BasFaultRecord> basFaultRecords = basFaultRecordService.selectBasFaultRecordList(param);
|
||||
if (CollUtil.isEmpty(basFaultRecords)) {
|
||||
BasFaultRecord record = new BasFaultRecord();
|
||||
record.setId(IdUtil.simpleUUID());
|
||||
record.setDeviceId(param.getDeviceName());
|
||||
record.setDeviceName(param.getDeviceName());
|
||||
record.setDeviceType("ssj");
|
||||
record.setTaskNo(Convert.toStr(taskNo));
|
||||
record.setStartTime(DateUtil.formatDateTime(new Date()));
|
||||
if (taskNo >= 80 && taskNo <= 97) {
|
||||
//扫码失败
|
||||
record.setFault(getDdjZt(107, trayCode));
|
||||
} else if (taskNo >= 100 && taskNo < 120) {
|
||||
//无货位
|
||||
record.setFault(getDdjZt(108, trayCode));
|
||||
} else if (taskNo >= 120 && taskNo < 140) {
|
||||
//已存在当前托盘
|
||||
record.setFault(getDdjZt(109, trayCode));
|
||||
} else {
|
||||
//无任务
|
||||
record.setFault(getDdjZt(110, trayCode));
|
||||
}
|
||||
record.setJobId("0");
|
||||
basFaultRecordService.insertBasFaultRecord(record);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Thread.sleep(1500);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String getSsjZt(int value) {
|
||||
if (value == 101) {
|
||||
return "前超长";
|
||||
} else if (value == 102) {
|
||||
return "后超长";
|
||||
} else if (value == 103) {
|
||||
return "左超宽";
|
||||
} else if (value == 104) {
|
||||
return "右超宽";
|
||||
} else if (value == 105) {
|
||||
return "超高";
|
||||
} else if (value == 106) {
|
||||
return "超重";
|
||||
} else {
|
||||
return "未知";
|
||||
}
|
||||
}
|
||||
|
||||
private String getDdjZt(int value, String trayCode) {
|
||||
|
||||
if (value == 0) {
|
||||
return "待机";
|
||||
@@ -222,20 +287,18 @@ public class MonitoringThread implements Runnable {
|
||||
return "安全门打开";
|
||||
} else if (value == 9999) {
|
||||
return "设备未联机";
|
||||
}else{
|
||||
} else if (value == 107) {
|
||||
return "扫码失败";
|
||||
} else if (value == 108) {
|
||||
return "无空闲货位";
|
||||
} else if (value == 109) {
|
||||
return "库存已存在该托盘[" + trayCode + "]";
|
||||
} else if (value == 110) {
|
||||
return "无入库任务[" + trayCode + "]";
|
||||
} else {
|
||||
return "未知";
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
Thread.sleep(1500);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class CheckWeight {
|
||||
Socket socket = new Socket(ip, por);
|
||||
InputStream is = socket.getInputStream();
|
||||
) {
|
||||
Thread.sleep(300);
|
||||
Thread.sleep(100);
|
||||
byte[] bytes = new byte[10];
|
||||
int read = is.read(bytes);
|
||||
if (read!=-1){
|
||||
|
||||
@@ -34,7 +34,7 @@ server:
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.ruoyi: debug
|
||||
com.ruoyi: info
|
||||
org.springframework: warn
|
||||
|
||||
# 用户配置
|
||||
|
||||
@@ -242,4 +242,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
</select>
|
||||
<select id="selectOutMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
|
||||
<include refid="selectMydoJobVo"/>
|
||||
where
|
||||
in_or_out >= 20
|
||||
and status = #{status}
|
||||
and roadway_id = #{roadwayId}
|
||||
and warehouse_id = #{warehouseId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -25,10 +25,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
<result property="spare4" column="spare4" />
|
||||
<result property="spare5" column="spare5" />
|
||||
<result property="spare6" column="spare6" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDdjDeviceExecutionQueueVo">
|
||||
select uuid, rwh, dev_name, dev_id, rwzt, yph, ylh, ych, mbph, mblh, mbch, ddjxf, rwlx, scsj, xfsj, jssj, mlfs, spare1, spare2, spare3 from ddj_device_execution_queue
|
||||
select uuid, rwh, dev_name, dev_id, rwzt, yph, ylh, ych, mbph, mblh, mbch, ddjxf, rwlx, scsj, xfsj, jssj, mlfs, spare1, spare2, spare3,spare4, spare5, spare6 from ddj_device_execution_queue
|
||||
</sql>
|
||||
|
||||
<select id="selectDdjDeviceExecutionQueueList" parameterType="DdjDeviceExecutionQueue" resultMap="DdjDeviceExecutionQueueResult">
|
||||
@@ -53,6 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
|
||||
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
|
||||
<if test="rwlxList != null and rwlxList.size() >0">
|
||||
and rwlx in
|
||||
<foreach item="item" collection="rwlxList" separator="," open="(" close=")">
|
||||
@@ -108,6 +114,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
<if test="spare4 != null">spare4,</if>
|
||||
<if test="spare5 != null">spare5,</if>
|
||||
<if test="spare6 != null">spare6,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="uuid != null">#{uuid},</if>
|
||||
@@ -130,6 +139,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
<if test="spare4 != null">#{spare4},</if>
|
||||
<if test="spare5 != null">#{spare5},</if>
|
||||
<if test="spare6 != null">#{spare6},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -155,6 +167,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
<if test="spare4 != null">spare4 = #{spare4},</if>
|
||||
<if test="spare5 != null">spare5 = #{spare5},</if>
|
||||
<if test="spare6 != null">spare6 = #{spare6},</if>
|
||||
</trim>
|
||||
where uuid = #{uuid}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user