现场调试修改 入库 出库 放货目标有货

This commit is contained in:
liuhanqing
2025-12-26 13:22:48 +08:00
parent 2eadf27295
commit 86673312ed
20 changed files with 289 additions and 340 deletions

View File

@@ -16,5 +16,6 @@ public class ReceiveJob {
private String inOrOut;
private String jobId;
private String roadwayId;
private String warehouseId;
}

View File

@@ -355,6 +355,7 @@ public class ApiServiceImpl implements IApiService {
mydoJob.setRoadwayId(receiveOutJob.getRoadwayId());
mydoJob.setCreateTime(DateUtils.getNowDate());
mydoJob.setExecutionPhase("0");
mydoJob.setWarehouseId(receiveOutJob.getWarehouseId());
int i = mydoJobService.insertMydoJob(mydoJob);
if (i > 0) {
return AjaxResult.success();

View File

@@ -1,5 +1,8 @@
package com.ruoyi.bas.cargospace.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -11,6 +14,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2025-09-23
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BasCargoSpace extends BaseEntity
{
private static final long serialVersionUID = 1L;
@@ -44,15 +50,15 @@ public class BasCargoSpace extends BaseEntity
/** 排(不允许为空) */
@Excel(name = "排", readConverterExp = "不=允许为空")
private Long thePlatoon;
private Integer thePlatoon;
/** 列(不允许为空) */
@Excel(name = "列", readConverterExp = "不=允许为空")
private Long theColumn;
private Integer theColumn;
/** 层(不允许为空) */
@Excel(name = "层", readConverterExp = "不=允许为空")
private Long theFloor;
private Integer theFloor;
/** 货位状态1空2满 3入库分配 4出库分配 5入库盘点 6出库盘点 */
@Excel(name = "货位状态1空2满 3入库分配 4出库分配 5入库盘点 6出库盘点")
@@ -96,229 +102,4 @@ Y锁、N开 */
@Excel(name = "wms货位id")
private String wmsCargoSpaceId;
public void setCargoSpaceId(String cargoSpaceId)
{
this.cargoSpaceId = cargoSpaceId;
}
public String getCargoSpaceId()
{
return cargoSpaceId;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setRoadwayId(String roadwayId)
{
this.roadwayId = roadwayId;
}
public String getRoadwayId()
{
return roadwayId;
}
public void setCargoAreaId(String cargoAreaId)
{
this.cargoAreaId = cargoAreaId;
}
public String getCargoAreaId()
{
return cargoAreaId;
}
public void setTheType(String theType)
{
this.theType = theType;
}
public String getTheType()
{
return theType;
}
public void setTheTypeName(String theTypeName)
{
this.theTypeName = theTypeName;
}
public String getTheTypeName()
{
return theTypeName;
}
public void setCargoSpaceName(String cargoSpaceName)
{
this.cargoSpaceName = cargoSpaceName;
}
public String getCargoSpaceName()
{
return cargoSpaceName;
}
public void setThePlatoon(Long thePlatoon)
{
this.thePlatoon = thePlatoon;
}
public Long getThePlatoon()
{
return thePlatoon;
}
public void setTheColumn(Long theColumn)
{
this.theColumn = theColumn;
}
public Long getTheColumn()
{
return theColumn;
}
public void setTheFloor(Long theFloor)
{
this.theFloor = theFloor;
}
public Long getTheFloor()
{
return theFloor;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setLocked(String locked)
{
this.locked = locked;
}
public String getLocked()
{
return locked;
}
public void setTrayCode(String trayCode)
{
this.trayCode = trayCode;
}
public String getTrayCode()
{
return trayCode;
}
public void setCargoHight(String cargoHight)
{
this.cargoHight = cargoHight;
}
public String getCargoHight()
{
return cargoHight;
}
public void setIssDouble(String issDouble)
{
this.issDouble = issDouble;
}
public String getIssDouble()
{
return issDouble;
}
public void setGroupCodingNo(String groupCodingNo)
{
this.groupCodingNo = groupCodingNo;
}
public String getGroupCodingNo()
{
return groupCodingNo;
}
public void setGroupCoding(String groupCoding)
{
this.groupCoding = groupCoding;
}
public String getGroupCoding()
{
return groupCoding;
}
public void setCargoSpaceLogo(String cargoSpaceLogo)
{
this.cargoSpaceLogo = cargoSpaceLogo;
}
public String getCargoSpaceLogo()
{
return cargoSpaceLogo;
}
public void setThisCargoArea(String thisCargoArea)
{
this.thisCargoArea = thisCargoArea;
}
public String getThisCargoArea()
{
return thisCargoArea;
}
public void setWmsCargoSpaceId(String wmsCargoSpaceId)
{
this.wmsCargoSpaceId = wmsCargoSpaceId;
}
public String getWmsCargoSpaceId()
{
return wmsCargoSpaceId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("cargoSpaceId", getCargoSpaceId())
.append("warehouseId", getWarehouseId())
.append("roadwayId", getRoadwayId())
.append("cargoAreaId", getCargoAreaId())
.append("theType", getTheType())
.append("theTypeName", getTheTypeName())
.append("cargoSpaceName", getCargoSpaceName())
.append("thePlatoon", getThePlatoon())
.append("theColumn", getTheColumn())
.append("theFloor", getTheFloor())
.append("status", getStatus())
.append("locked", getLocked())
.append("trayCode", getTrayCode())
.append("cargoHight", getCargoHight())
.append("issDouble", getIssDouble())
.append("groupCodingNo", getGroupCodingNo())
.append("groupCoding", getGroupCoding())
.append("cargoSpaceLogo", getCargoSpaceLogo())
.append("thisCargoArea", getThisCargoArea())
.append("wmsCargoSpaceId", getWmsCargoSpaceId())
.toString();
}
}

View File

@@ -24,6 +24,9 @@ public class Constant {
public static final int ROADWAY_ID_01 = 1;
public static final int ROADWAY_ID_02 = 2;
public static final int ROADWAY_ID_03 = 3;
public static final int ROADWAY_ID_04 = 4;
public static final int ROADWAY_ID_05 = 5;
public static final int ROADWAY_ID_06 = 6;
}

View File

@@ -11,5 +11,8 @@ public class TaskType {
public static final int DDJ_RWLX_2 = 2;
//出库
public static final int DDJ_RWLX_3 = 3;
//入库 未扫码或者无该任务回滚
public static final int DDJ_RWLX_4 = 4;
}

View File

@@ -92,15 +92,15 @@ public class MsgDdj extends BaseEntity
/** 备用字段1 */
@Excel(name = "备用字段1")
private Integer spare1;
private String spare1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private Integer spare2;
private String spare2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private Integer spare3;
private String spare3;
private String trayCode;

View File

@@ -9,7 +9,7 @@ import com.ruoyi.device.ssj.domain.DeviceSsj;
import com.ruoyi.device.ssj.service.IDeviceSsjService;
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
import com.ruoyi.schedule.scheduleTask.ddj.impl.Ddj1Thread;
import com.ruoyi.schedule.scheduleTask.ddj.impl.*;
import com.ruoyi.schedule.scheduleTask.monit.MonitoringThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,11 +34,11 @@ public class ScheduleThread {
public CustomThread<MonitoringThread> monitoringCustomThread;
public CustomThread<Ddj1Thread> ddj1CustomThread;
/*public CustomThread<Ddj2Thread> ddj2CustomThread;
public CustomThread<Ddj2Thread> ddj2CustomThread;
public CustomThread<Ddj3Thread> ddj3CustomThread;
public CustomThread<Ddj4Thread> ddj4CustomThread;
public CustomThread<Ddj5Thread> ddj5CustomThread;
public CustomThread<Ddj6Thread> ddj6CustomThread;*/
public CustomThread<Ddj6Thread> ddj6CustomThread;
@Autowired
private IDeviceSsjService deviceSsjService;
@Autowired
@@ -66,8 +66,8 @@ public class ScheduleThread {
private void scheduleInit() {
MonitoringThread monitoringThread = new MonitoringThread();
monitoringCustomThread = new CustomThread<MonitoringThread>(new Thread(monitoringThread), monitoringThread);
Ddj1Thread ddj1Thread = new Ddj1Thread();
ddj1CustomThread = new CustomThread<>(new Thread(ddj1Thread), ddj1Thread);
Ddj4Thread ddj4Thread = new Ddj4Thread(plcDdj4ReadCustomThread.runnable);
ddj4CustomThread = new CustomThread<>(new Thread(ddj4Thread), ddj4Thread);
/*Ddj2Thread ddj2Thread = new Ddj2Thread();
ddj2CustomThread = new CustomThread<>(new Thread(ddj2Thread), ddj2Thread);
Ddj3Thread ddj3Thread = new Ddj3Thread();
@@ -88,12 +88,13 @@ public class ScheduleThread {
//获取要去取的输送机
List<DeviceSsj> deviceSsjs = deviceSsjService.selectDeviceSsjList(new DeviceSsj());
for (DeviceSsj deviceSsj : deviceSsjs) {
deviceSsj.setTaskNo(0);
ssjList.put(deviceSsj.getDeviceCode(), deviceSsj);
}
String ipAddress = deviceSsjs.get(0).getIpAddress();
String[] split = ipAddress.split(":");
String ip = split[0];
int port = Convert.toInt(split[1]);
String ip = "192.168.56.80";
int port = 102;
//plc输送机读取线程
PlcSsjRead plcSsjRead = new PlcSsjRead(ssjList, new PlcConnectInfo(ip, port));
Thread plcSsjReadThread = new Thread(plcSsjRead);
@@ -104,6 +105,7 @@ public class ScheduleThread {
List<MsgDdj> msgDdjs = msgDdjService.selectMsgDdjList(new MsgDdj());
for (MsgDdj msgDdj : msgDdjs) {
msgDdj.setPlcDbReadAddress(msgDdj.getPlcDbReadAddress());
msgDdj.setTrayCode("00000000");
PlcDdjRead plcDdjRead = new PlcDdjRead(msgDdj, new PlcConnectInfo(msgDdj.getIp(), Convert.toInt(msgDdj.getPort())));
switch (msgDdj.getId()){
case 1:
@@ -141,12 +143,12 @@ public class ScheduleThread {
*/
public void startAllThread() {
plcSsjReadCustomThread.getThread().start();
plcDdj1ReadCustomThread.getThread().start();
plcDdj2ReadCustomThread.getThread().start();
plcDdj4ReadCustomThread.getThread().start();
/*plcDdj2ReadCustomThread.getThread().start();
plcDdj3ReadCustomThread.getThread().start();
plcDdj4ReadCustomThread.getThread().start();
plcDdj5ReadCustomThread.getThread().start();
plcDdj6ReadCustomThread.getThread().start();
plcDdj6ReadCustomThread.getThread().start();*/
isRun = true;
}
@@ -155,7 +157,7 @@ public class ScheduleThread {
*/
public void startAllThread2() {
monitoringCustomThread.thread.start();
ddj1CustomThread.thread.start();
ddj4CustomThread.thread.start();
/*ddj2CustomThread.thread.start();
ddj3CustomThread.thread.start();
ddj4CustomThread.thread.start();

View File

@@ -22,7 +22,7 @@ public class PlcDdjRead extends Thread {
public volatile boolean isRun = true;
public SiemensS7Net siemensS7Net = null;
public static IReadWriteNet readWriteNet = null;
public IReadWriteNet readWriteNet = null;
private final String ip;
private final int port;
private boolean success = false;
@@ -35,14 +35,6 @@ public class PlcDdjRead extends Thread {
this.port = plcConnectInfo.getPort();
}
public static int WriteToSSJ(String address, byte[] data) {
int a = 0;
if (readWriteNet != null) {
a = HslRead.WriteResultRender(readWriteNet.Write(address, data), address);
}
return a;
}
@Override
public void run() {
while (isRun) {
@@ -63,7 +55,7 @@ public class PlcDdjRead extends Thread {
}
private void readPlcDdj(MsgDdj msgDdj) {
OperateResultExOne<byte[]> read2 = readWriteNet.Read(msgDdj.getPlcDbReadAddress(), Convert.toShort("38"));
OperateResultExOne<byte[]> read2 = readWriteNet.Read(msgDdj.getPlcDbReadAddress(), Convert.toShort("40"));
String ddsx = "0";
if (read2.IsSuccess) {
ddsx = SoftBasic.ByteToHexString(read2.Content);
@@ -80,7 +72,10 @@ public class PlcDdjRead extends Thread {
msgDdj.setMbch(ParseUtil.optInt(22, ddsx));
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
msgDdj.setTrayCode(ParseUtil.optString(30,4,ddsx));
String trayCode = ParseUtil.optString(32, 8, ddsx);
if (! "11111111".equals(trayCode) && !"00000000".equals(trayCode)){
msgDdj.setTrayCode(trayCode);
}
}
}
@@ -130,11 +125,27 @@ public class PlcDdjRead extends Thread {
setIsConnect(false);
}
public static int WriteToDDJ(String address, byte[] data) {
public int WriteToDDJ(String address, byte[] data) {
int a = 0;
if (readWriteNet != null) {
a = HslRead.WriteResultRender(readWriteNet.Write(address, data), address);
}
return a;
}
public static void main(String[] args) {
SiemensS7Net siemensS7Net = new SiemensS7Net(SiemensPLCS.S1500);
try {
siemensS7Net.setIpAddress("192.168.56.51");
siemensS7Net.setPort(102);
siemensS7Net.setRack((byte) 0);
siemensS7Net.setSlot((byte) 1);
OperateResult connect = siemensS7Net.ConnectServer();
if (connect.IsSuccess) {
System.out.println("连接成功");
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}

View File

@@ -22,6 +22,7 @@ import com.ruoyi.queue.ddj.domain.DdjDeviceExecutionQueue;
import com.ruoyi.queue.ddj.service.IDdjDeviceExecutionQueueFinishService;
import com.ruoyi.queue.ddj.service.IDdjDeviceExecutionQueueService;
import com.ruoyi.schedule.plcRead.ddj.PlcDdjRead;
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
import com.ruoyi.schedule.plcRead.util.Tools;
import lombok.extern.slf4j.Slf4j;
@@ -42,13 +43,18 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
private IMydoJobService mydoJobService;
private IBasCargoSpaceService basCargoSpaceService;
public Map<String, List<Integer>> roadwayMap = new HashMap<>();
private PlcDdjRead plcDdjRead;
public BaseDdjThread(PlcDdjRead plcDdjRead) {
this.plcDdjRead = plcDdjRead;
}
public Map<String,Integer> roadwayRollback = new HashMap<>();
public boolean isRun = true;
@Override
public abstract HashMap<String, Object> getParamMap(String trayCode,Integer height);
public abstract HashMap<String, Object> getParamMap(String trayCode,Integer height,double weight);
@Override
@@ -72,7 +78,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
try {
if (ObjUtil.isNotNull(msgDdj)) {
MsgDdj currentMsgDdj = msgDdjService.selectMsgDdjById(Convert.toLong(msgDdj.getId()));
if (0 == currentMsgDdj.getSpare1()) {
if ("0".equals(currentMsgDdj.getSpare1())) {
generateInBoundPickQueue(msgDdj);
generateInBoundLoadQueue(msgDdj);
generateOutBoundQueue(msgDdj);
@@ -109,24 +115,24 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
switch (exitId) {
case "1":
List<DeviceSsj> outSsj1 = ssjList.get("outSsj1");
if (outSsj1.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getModel() == 2)) {
if (outSsj1.stream().allMatch(ssj -> ssj.getKx() == 1 )) {
outSsj = outSsj1.get(0).getDeviceCode();
break;
}
List<DeviceSsj> outSsj2 = ssjList.get("outSsj2");
if (outSsj2.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getModel() == 2)) {
if (outSsj2.stream().allMatch(ssj -> ssj.getKx() == 1)) {
outSsj = outSsj2.get(0).getDeviceCode();
break;
}
break;
case "2":
List<DeviceSsj> outSsj3 = ssjList.get("outSsj3");
if (outSsj3.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getModel() == 2)) {
if (outSsj3.stream().allMatch(ssj -> ssj.getKx() == 1 )) {
outSsj = outSsj3.get(0).getDeviceCode();
break;
}
List<DeviceSsj> outSsj4 = ssjList.get("outSsj4");
if (outSsj4.stream().allMatch(ssj -> ssj.getKx() == 1 && ssj.getModel() == 2)) {
if (outSsj4.stream().allMatch(ssj -> ssj.getKx() == 1 )) {
outSsj = outSsj4.get(0).getDeviceCode();
break;
}
@@ -140,6 +146,24 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
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);
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
outJob.setStatus("3");
outJob.setStartTime(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
@@ -161,7 +185,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
* 创建入库放货队列
*/
private void generateInBoundLoadQueue(MsgDdj ddj) {
if (ddj.getCzfs() == 5 && ddj.getSbzt() == 3 && ddj.getYxxf() == 1) {
if (ddj.getCzfs() == 5 && ddj.getSbzt() == 0 && ddj.getHczt()==1 && ddj.getYxxf() == 1) {
//允许下发 联机 有货待机
if (ddj.getTrayCode() != null && StrUtil.isNotEmpty(ddj.getTrayCode().trim())) {
MydoJob param = new MydoJob();
@@ -169,17 +193,24 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(param);
MydoJob inJob = null;
if (CollUtil.isEmpty(mydoJobs)) {
//请求wms获取任务 并生成队列
AjaxResult result = apiService.selectMydoJobByTrayCodeAndEntranceId(getParamMap(ddj.getTrayCode(),ddj.getHeight()));
if (result.isSuccess()) {
inJob = BeanUtil.toBean(result.get("data"), MydoJob.class);
inJob.setStatus(TASK_STATUS_CREATE);
inJob.setExecutionPhase(TASK_EP_ROADWAY_SSJ);
inJob.setRoadwayId(Convert.toStr(ddj.getId()));
mydoJobService.insertMydoJob(inJob);
} else {
log.error(result.get("msg").toString());
//获取高度spare2 和 重量spare3
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(ddj.getRwh(), ddj.getId());
if (ObjUtil.isNotNull(ddjDeviceExecutionQueue)){
//请求wms获取任务 并生成队列
AjaxResult result = apiService.selectMydoJobByTrayCodeAndEntranceId(getParamMap(ddj.getTrayCode(),Convert.toInt(ddjDeviceExecutionQueue.getSpare2()),Convert.toDouble(ddjDeviceExecutionQueue.getSpare3())));
if (result.isSuccess()) {
inJob = BeanUtil.toBean(result.get("data"), MydoJob.class);
inJob.setStatus(TASK_STATUS_CREATE);
inJob.setExecutionPhase(TASK_EP_ROADWAY_SSJ);
inJob.setRoadwayId(Convert.toStr(ddj.getId()));
inJob.setFaultFlag("0");
mydoJobService.insertMydoJob(inJob);
} else {
createRollbackQueue(ddj,2);
log.error(result.get("msg").toString());
}
}
} else {
inJob = mydoJobs.get(0);
}
@@ -189,6 +220,8 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
if (ObjUtil.isNull(ddjQueue)) {
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByWmsCargoSpaceId(inJob.getCargoSpaceId());
if (ObjUtil.isNotNull(basCargoSpace)) {
ddjTaskFinish(ddj.getRwh(), ddj.getId(),2);
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
ddjDeviceExecutionQueue.setRwh(Convert.toLong(inJob.getTaskNo()));
@@ -204,7 +237,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
ddjDeviceExecutionQueue.setDdjxf("0");
ddjDeviceExecutionQueue.setMlfs(5);
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_3);
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_2);
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
inJob.setStatus("3");
@@ -219,26 +252,42 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
}
}
} else {
Integer mbph = ddj.getMbph();
Integer mblh = ddj.getMblh();
Integer mbch = ddj.getMbch();
String road = "";
for (String roadway : roadwayMap.keySet()) {
List<Integer> integers = roadwayMap.get(roadway);
if (integers.get(0).equals(mbph) && integers.get(1).equals(mblh) && integers.get(2).equals(mbch)){
road = roadway;
break;
}
}
if (!roadwayRollback.containsKey(road)){
log.error("未找到回滚任务号 p:{} l:{} c:{}",mbph,mblh,mbch);
return;
}
createRollbackQueue(ddj,1);
}
}
}
private void createRollbackQueue(MsgDdj ddj,int type) {
DdjDeviceExecutionQueue pickQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(ddj.getRwh(), ddj.getId());
if (pickQueue != null){
Integer mbph = pickQueue.getYph();
Integer mblh = pickQueue.getYlh();
Integer mbch = pickQueue.getYch();
String road = "";
for (String roadway : roadwayMap.keySet()) {
List<Integer> integers = roadwayMap.get(roadway);
if (integers.get(0).equals(mbph) && integers.get(1).equals(mblh) && integers.get(2).equals(mbch)){
road = roadway;
break;
}
}
if (!roadwayRollback.containsKey(road)){
log.error("未找到回滚任务号 p:{} l:{} c:{}",mbph,mblh,mbch);
return;
}
DeviceSsj roadWay = PlcSsjRead.deviceSsjMap.get(road);
if (roadWay.getKx()==1){
long rwh = roadwayRollback.get(road);
log.info("扫码失败,放回原位 排:{} 列:{} 层:{} 任务号:{}", mbph, mblh, mbch, rwh);
DdjDeviceExecutionQueue ddjQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(rwh, ddj.getId());
if (ObjUtil.isNull(ddjQueue)) {
ddjTaskFinish(ddj.getRwh(), ddj.getId(),2);
if (type == 2){
rwh = rwh+100;
}
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
ddjDeviceExecutionQueue.setUuid(IdUtil.simpleUUID());
ddjDeviceExecutionQueue.setRwh(rwh);
@@ -254,23 +303,27 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
ddjDeviceExecutionQueue.setDdjxf("0");
ddjDeviceExecutionQueue.setMlfs(5);
ddjDeviceExecutionQueue.setScsj(DateUtil.formatDateTime(DateUtil.date()));
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_2);
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_4);
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
}
}
}else {
log.error("未找到回滚任务号 rwh{}",ddj.getRwh());
}
}
/**
* 创建入库取货队列
*/
private void generateInBoundPickQueue(MsgDdj ddj) {
List<DeviceSsj> roadSsjList = ssjList.get("roadSsjList");
for (DeviceSsj ssj : roadSsjList) {
if (ssj.getDw() == 1 && ssj.getTaskNo() > 0 && ssj.getHeight() > 0 && ssj.getRkqq()==1) {
//todo 连接称重 并保存数据
double weight = 0;
if (ssj.getTaskNo() > 0 && ssj.getHeight() > 0 && ssj.getRkqq() == 1) {
DdjDeviceExecutionQueue ddjQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(Convert.toLong(ssj.getTaskNo()), ddj.getId());
if (ObjUtil.isNull(ddjQueue)) {
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = new DdjDeviceExecutionQueue();
@@ -279,19 +332,20 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
ddjDeviceExecutionQueue.setDevName(ddj.getName());
ddjDeviceExecutionQueue.setDevId(ddj.getId());
ddjDeviceExecutionQueue.setRwzt(0);
ddjDeviceExecutionQueue.setYph(0);
ddjDeviceExecutionQueue.setYlh(0);
ddjDeviceExecutionQueue.setYch(0);
ddjDeviceExecutionQueue.setMbph(1);
ddjDeviceExecutionQueue.setMblh(1);
ddjDeviceExecutionQueue.setMbch(1);
List<Integer> integers = roadwayMap.get(ssj.getDeviceCode());
ddjDeviceExecutionQueue.setMbph(integers.get(0));
ddjDeviceExecutionQueue.setMblh(integers.get(1));
ddjDeviceExecutionQueue.setMbch(integers.get(2));
ddjDeviceExecutionQueue.setYph(integers.get(0));
ddjDeviceExecutionQueue.setYlh(integers.get(1));
ddjDeviceExecutionQueue.setYch(integers.get(2));
ddjDeviceExecutionQueue.setDdjxf("0");
ddjDeviceExecutionQueue.setRwlx(DDJ_RWLX_1);
ddjDeviceExecutionQueue.setScsj(DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
ddjDeviceExecutionQueue.setMlfs(3);
ddjDeviceExecutionQueue.setSpare1("0");
ddjDeviceExecutionQueue.setSpare2(Convert.toStr(ssj.getHeight()));
ddjDeviceExecutionQueue.setSpare3(Convert.toStr(weight));
ddjDeviceExecutionQueueService.insertDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
}
}
@@ -314,8 +368,11 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
if (ObjUtil.isNotNull(mydoJob)){
//回传完成信号
ddjTaskFinish(rwh, ddj.getId(),1);
ddj.setHeight(Convert.toInt(ddjDeviceExecutionQueue.getSpare2()));
}
}else if (ddjDeviceExecutionQueue.getRwlx()==1 && ddj.getHczt() == 1){
ddj.setHeight(Convert.toInt(ddjDeviceExecutionQueue.getSpare2()));
}else if (ddjDeviceExecutionQueue.getRwlx() == 4){
ddjTaskFinish(rwh, ddj.getId(),2);
}
}
}
@@ -360,10 +417,15 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
if ("0".equals(mydoJob.getFaultFlag()) && "1".equals(ddjDeviceExecutionQueue.getSpare1())) {
mydoJob.setStatus("1");
mydoJobService.updateMydoJob(mydoJob);
AjaxResult ajaxResult = apiService.reAssign(new JobParam(rwh.toString(), null, null));
AjaxResult ajaxResult = apiService.reAssign(new JobParam(mydoJob.getJobId(), ddj.getTrayCode(), ddjDeviceExecutionQueue.getRwh().toString()));
if (ajaxResult.isSuccess()) {
mydoJob = mydoJobService.selectMydoJobByTaskNo(rwh);
mydoJob.setFaultFlag("2");
mydoJobService.updateMydoJob(mydoJob);
BasCargoSpace basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByWmsCargoSpaceId(mydoJob.getCargoSpaceId());
ddjDeviceExecutionQueue.setMbph(basCargoSpace.getThePlatoon());
ddjDeviceExecutionQueue.setMblh(basCargoSpace.getTheColumn());
ddjDeviceExecutionQueue.setMbch(basCargoSpace.getTheFloor());
ddjDeviceExecutionQueue.setSpare1("0");
ddjDeviceExecutionQueueService.updateDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
}
@@ -401,7 +463,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(rwh, ddj.getId());
if (ObjUtil.isNotNull(ddjDeviceExecutionQueue)) {
//重新下发堆垛机任务
int i = issuedDDJTask(ddj.getId(), ddjDeviceExecutionQueue);
int i = issuedDDJTask(ddj, ddjDeviceExecutionQueue);
if (i == 1) {
//更新开始时间,修改ddjxf为已下发1
ddjDeviceExecutionQueue.setXfsj(DateUtil.formatDateTime(DateUtil.date()));
@@ -420,17 +482,18 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
if (ddj.getYxxf() == 1 && ddj.getCzfs() == 5) {
DdjDeviceExecutionQueue ddjDeviceExecutionRunningQueueParam = new DdjDeviceExecutionQueue();
ddjDeviceExecutionRunningQueueParam.setDdjxf("1");
List<DdjDeviceExecutionQueue> ddjDeviceExecutionQueues1 = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueList(ddjDeviceExecutionRunningQueueParam);
if (CollUtil.isNotEmpty(ddjDeviceExecutionQueues1)){
log.info("正在执行任务 {}", ddjDeviceExecutionQueues1.get(0).getRwh());
return;
}
if (ddj.getSbzt() == 0) {
if (ddj.getSbzt() == 0 && ddj.getHczt() == 0) {
//无货待机 只查询入库取货扫码或者出库队列
ArrayList<Integer> rwlxList = new ArrayList<>();
rwlxList.add(1);
rwlxList.add(3);
rwlxList.add(DDJ_RWLX_1);
rwlxList.add(DDJ_RWLX_3);
DdjDeviceExecutionQueue ddjDeviceExecutionQueueParam = new DdjDeviceExecutionQueue();
ddjDeviceExecutionQueueParam.setDdjxf("0");
ddjDeviceExecutionQueueParam.setDevId(ddj.getId());
@@ -438,7 +501,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
List<DdjDeviceExecutionQueue> ddjDeviceExecutionQueues = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueList(ddjDeviceExecutionQueueParam);
if (CollUtil.isNotEmpty(ddjDeviceExecutionQueues)) {
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueues.get(0);
int i = issuedDDJTask(ddj.getId(), ddjDeviceExecutionQueue);
int i = issuedDDJTask(ddj, ddjDeviceExecutionQueue);
if (i == 1) {
//更新开始时间,修改ddjxf为已下发1
ddjDeviceExecutionQueue.setXfsj(DateUtil.formatDateTime(DateUtil.date()));
@@ -449,16 +512,19 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
log.error("托盘堆垛机下发任务失败!!!!!!!");
}
}
} else if (ddj.getSbzt() == 3) {
//有货待机 只查询入库放货队列
} else if (ddj.getSbzt() == 0 && ddj.getHczt() == 1) {
//有货待机 只查询入库放货队列和 无任务 未扫码回滚 队列
DdjDeviceExecutionQueue ddjDeviceExecutionQueueParam = new DdjDeviceExecutionQueue();
ddjDeviceExecutionQueueParam.setDdjxf("0");
ddjDeviceExecutionQueueParam.setDevId(ddj.getId());
ddjDeviceExecutionQueueParam.setRwlx(2);
ArrayList<Integer> rwlxList = new ArrayList<>();
rwlxList.add(DDJ_RWLX_2);
rwlxList.add(DDJ_RWLX_4);
ddjDeviceExecutionQueueParam.setRwlxList(rwlxList);
List<DdjDeviceExecutionQueue> ddjDeviceExecutionQueues = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueList(ddjDeviceExecutionQueueParam);
if (CollUtil.isNotEmpty(ddjDeviceExecutionQueues)) {
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueues.get(0);
int i = issuedDDJTask(ddj.getId(), ddjDeviceExecutionQueue);
int i = issuedDDJTask(ddj, ddjDeviceExecutionQueue);
if (i == 1) {
//更新开始时间,修改ddjxf为已下发1
ddjDeviceExecutionQueue.setXfsj(DateUtil.formatDateTime(DateUtil.date()));
@@ -501,7 +567,7 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
*
* @param queue 堆垛机执行的队列
*/
private int issuedDDJTask(Integer devId, DdjDeviceExecutionQueue queue) {
private int issuedDDJTask(MsgDdj ddj, DdjDeviceExecutionQueue queue) {
int taskNo = Convert.toInt(queue.getRwh());
int yph = Convert.toInt(queue.getYph());
int ylh = Convert.toInt(queue.getYlh());
@@ -509,21 +575,11 @@ public abstract class BaseDdjThread implements Runnable, DdjThreadInterface {
int mbph = Convert.toInt(queue.getMbph());
int mblh = Convert.toInt(queue.getMblh());
int mbch = Convert.toInt(queue.getMbch());
int mlfs;
if (queue.getRwlx() == 1 || queue.getRwlx() == 3) {
mlfs = 5;
} else if (queue.getRwlx() == 2) {
mlfs = 4;
} else {
throw new RuntimeException("任务类型错误");
}
int mlfs = queue.getMlfs();
int xfwc = 1;
int jym = Tools.getJYM(taskNo, yph, ylh, ych, mbph, mblh, mbch, mlfs, xfwc);
int jym = Tools.getJYM(taskNo, yph, ylh, ych, mbph, mblh, mbch, mlfs);
byte[] sendData = Tools.sendDataToDevice(taskNo, null, yph, ylh, ych, mbph, mblh, mbch, mlfs, xfwc, jym);
if (devId == 1) {
return PlcDdjRead.WriteToDDJ("DB61.0", sendData);
} else {
return PlcDdjRead.WriteToDDJ("DB61.0", sendData);
}
return plcDdjRead.WriteToDDJ("DB61.0", sendData);
}
}

View File

@@ -11,7 +11,7 @@ public interface DdjThreadInterface {
* @param trayCode 托盘代码
* @return 参数映射
*/
HashMap<String, Object> getParamMap(String trayCode,Integer height);
HashMap<String, Object> getParamMap(String trayCode,Integer height,double weight);
/**
* 获取出库任务参数

View File

@@ -21,6 +21,10 @@ public class Ddj1Thread extends BaseDdjThread {
public volatile boolean isRun = true;
public Ddj1Thread(PlcDdjRead plcDdjRead) {
super(plcDdjRead);
}
@Override
public void init() {
@@ -50,8 +54,8 @@ public class Ddj1Thread extends BaseDdjThread {
ssjList.put("outSsj4", outSsj4);
//初始化巷道口 排 列 层
roadwayMap.put("L2001", Arrays.asList(1, 1, 1));
roadwayMap.put("L2002", Arrays.asList(2, 1, 1));
roadwayMap.put("L2001", Arrays.asList(1, 0, 1));
roadwayMap.put("L2002", Arrays.asList(2, 0, 1));
roadwayMap.put("L2007", Arrays.asList(1, 22, 1));
roadwayMap.put("L2008", Arrays.asList(2, 22, 1));
roadwayRollback.put("L2001", 80);
@@ -64,11 +68,13 @@ public class Ddj1Thread extends BaseDdjThread {
}
@Override
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
public HashMap<String, Object> getParamMap(String trayCode,Integer height,double weight) {
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("trayCode", trayCode);
paramMap.put("warehouseId",WAREHOUSE_01);
paramMap.put("roadwayId",ROADWAY_ID_01);
paramMap.put("height",height);
paramMap.put("weight",weight);
return paramMap;
}
@@ -77,6 +83,7 @@ public class Ddj1Thread extends BaseDdjThread {
MydoJob mydoJob = new MydoJob();
mydoJob.setWarehouseId(WAREHOUSE_01);
mydoJob.setRoadwayId(String.valueOf(ROADWAY_ID_01));
mydoJob.setStatus("1");
return mydoJob;
}

View File

@@ -18,6 +18,10 @@ import static com.ruoyi.common.Constant.*;
@Slf4j
public class Ddj2Thread extends BaseDdjThread {
public Ddj2Thread(PlcDdjRead plcDdjRead) {
super(plcDdjRead);
}
@Override
public void init() {
super.init();
@@ -60,11 +64,13 @@ public class Ddj2Thread extends BaseDdjThread {
}
@Override
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
public HashMap<String, Object> getParamMap(String trayCode,Integer height,double weight) {
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("trayCode", trayCode);
paramMap.put("warehouseId",WAREHOUSE_01);
paramMap.put("roadwayId",ROADWAY_ID_02);
paramMap.put("height",height);
paramMap.put("weight",weight);
return paramMap;
}
@@ -74,6 +80,8 @@ public class Ddj2Thread extends BaseDdjThread {
MydoJob mydoJob = new MydoJob();
mydoJob.setWarehouseId(WAREHOUSE_01);
mydoJob.setRoadwayId(String.valueOf(ROADWAY_ID_02));
mydoJob.setStatus("1");
return mydoJob;
}

View File

@@ -18,6 +18,10 @@ import static com.ruoyi.common.Constant.*;
@Slf4j
public class Ddj3Thread extends BaseDdjThread {
public Ddj3Thread(PlcDdjRead plcDdjRead) {
super(plcDdjRead);
}
@Override
public void init() {
super.init();
@@ -60,11 +64,13 @@ public class Ddj3Thread extends BaseDdjThread {
}
@Override
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
public HashMap<String, Object> getParamMap(String trayCode,Integer height,double weight) {
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("trayCode", trayCode);
paramMap.put("warehouseId",WAREHOUSE_01);
paramMap.put("roadwayId",ROADWAY_ID_03);
paramMap.put("height",height);
paramMap.put("weight",weight);
return paramMap;
}
@@ -74,6 +80,8 @@ public class Ddj3Thread extends BaseDdjThread {
MydoJob mydoJob = new MydoJob();
mydoJob.setWarehouseId(WAREHOUSE_01);
mydoJob.setRoadwayId(String.valueOf(ROADWAY_ID_03));
mydoJob.setStatus("1");
return mydoJob;
}

View File

@@ -18,6 +18,10 @@ import static com.ruoyi.common.Constant.*;
@Slf4j
public class Ddj4Thread extends BaseDdjThread {
public Ddj4Thread(PlcDdjRead plcDdjRead) {
super(plcDdjRead);
}
@Override
public void init() {
super.init();
@@ -38,8 +42,8 @@ public class Ddj4Thread extends BaseDdjThread {
ssjList.put("outSsj2", outSsj2);
//初始化巷道口 排 列 层
roadwayMap.put("L1001", Arrays.asList(1, 1, 1));
roadwayMap.put("L1002", Arrays.asList(2, 1, 1));
roadwayMap.put("L1001", Arrays.asList(1, 0, 1));
roadwayMap.put("L1002", Arrays.asList(2, 0, 1));
roadwayRollback.put("L1001", 92);
roadwayRollback.put("L1002", 93);
@@ -49,11 +53,13 @@ public class Ddj4Thread extends BaseDdjThread {
@Override
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
public HashMap<String, Object> getParamMap(String trayCode,Integer height,double weight) {
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("trayCode", trayCode);
paramMap.put("warehouseId",WAREHOUSE_02);
paramMap.put("roadwayId",ROADWAY_ID_01);
paramMap.put("roadwayId",ROADWAY_ID_04);
paramMap.put("height",height);
paramMap.put("weight",weight);
return paramMap;
}
@@ -61,7 +67,9 @@ public class Ddj4Thread extends BaseDdjThread {
public MydoJob getOutJobParam() {
MydoJob mydoJob = new MydoJob();
mydoJob.setWarehouseId(WAREHOUSE_02);
mydoJob.setRoadwayId(String.valueOf(ROADWAY_ID_01));
mydoJob.setRoadwayId(String.valueOf(ROADWAY_ID_04));
mydoJob.setStatus("1");
return mydoJob;
}

View File

@@ -18,6 +18,10 @@ import static com.ruoyi.common.Constant.*;
@Slf4j
public class Ddj5Thread extends BaseDdjThread {
public Ddj5Thread(PlcDdjRead plcDdjRead) {
super(plcDdjRead);
}
@Override
public void init() {
super.init();
@@ -47,11 +51,13 @@ public class Ddj5Thread extends BaseDdjThread {
}
@Override
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
public HashMap<String, Object> getParamMap(String trayCode,Integer height,double weight) {
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("trayCode", trayCode);
paramMap.put("warehouseId",WAREHOUSE_02);
paramMap.put("roadwayId",ROADWAY_ID_02);
paramMap.put("height",height);
paramMap.put("weight",weight);
return paramMap;
}
@@ -60,6 +66,8 @@ public class Ddj5Thread extends BaseDdjThread {
MydoJob mydoJob = new MydoJob();
mydoJob.setWarehouseId(WAREHOUSE_02);
mydoJob.setRoadwayId(String.valueOf(ROADWAY_ID_02));
mydoJob.setStatus("1");
return mydoJob;
}

View File

@@ -18,6 +18,10 @@ import static com.ruoyi.common.Constant.*;
@Slf4j
public class Ddj6Thread extends BaseDdjThread {
public Ddj6Thread(PlcDdjRead plcDdjRead) {
super(plcDdjRead);
}
@Override
public void init() {
super.init();
@@ -48,11 +52,14 @@ public class Ddj6Thread extends BaseDdjThread {
@Override
public HashMap<String, Object> getParamMap(String trayCode,Integer height) {
public HashMap<String, Object> getParamMap(String trayCode,Integer height,double weight) {
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("trayCode", trayCode);
paramMap.put("warehouseId",WAREHOUSE_02);
paramMap.put("roadwayId",ROADWAY_ID_03);
paramMap.put("height",height);
paramMap.put("weight",weight);
return paramMap;
}
@@ -61,6 +68,8 @@ public class Ddj6Thread extends BaseDdjThread {
MydoJob mydoJob = new MydoJob();
mydoJob.setWarehouseId(WAREHOUSE_02);
mydoJob.setRoadwayId(String.valueOf(ROADWAY_ID_03));
mydoJob.setStatus("1");
return mydoJob;
}

View File

@@ -0,0 +1,43 @@
package com.ruoyi.schedule.util;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Socket;
public class CheckWeight {
public String sendWeight(String ip, int por) {
String zhi = "e9";
try (
Socket socket = new Socket(ip, por);
InputStream is = socket.getInputStream();
InputStreamReader inputStreamReader = new InputStreamReader(is);
) {
Thread.sleep(1000);
char[] charArray = new char[8];
System.out.println("开始读取");
int readLength = inputStreamReader.read(charArray);
System.out.println("readLength:" + readLength);
if (readLength != -1) {
String newString = new String(charArray, 0, readLength);
newString = newString.replaceAll("\r|\n", "");
if (newString.length() == 8 && !newString.equals("=0000000")) {
newString = newString.substring(1, 8);
newString = newString.replaceAll("^(0+)", "");
zhi = newString;
}
}
} catch (Exception e) {
e.printStackTrace();
}
return zhi;
}
public static void main(String[] args) {
CheckWeight checkWeight = new CheckWeight();
System.out.println(checkWeight.sendWeight("192.168.56.101", 4001));
}
}

View File

@@ -6,7 +6,7 @@ spring:
druid:
#主数据信息
master:
url: jdbc:sqlserver://172.16.2.170:1433;databaseName=FT541-wcs;
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=FT541-wcs;
username: sa
password: Flrd0914.
# 从库数据源

View File

@@ -68,11 +68,11 @@ spring:
# redis 配置
redis:
# 地址
host: 172.16.2.170
host: 127.0.0.1
# 端口,默认为6379
port: 6379
# 数据库索引
database: 1
database: 2
# 密码
password: 123456
# 连接超时时间

View File

@@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="height != null">height = #{height},</if>
<if test="sbzt != null">status = #{sbzt},</if>
<if test="jxdw != null">jxdw = #{jxdw},</if>
<if test="spare1 != null">by = #{spare1},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
</trim>
where id = #{id}
</update>