Commit 5179d8fe authored by 王晓倩's avatar 王晓倩

通讯3次、托盘、点位

parent 1504025b
...@@ -53,14 +53,14 @@ public class EquipmentDataCollection { ...@@ -53,14 +53,14 @@ public class EquipmentDataCollection {
log.error("设备列表查询结果为空"); log.error("设备列表查询结果为空");
throw new Exception("无设备信息!"); throw new Exception("无设备信息!");
} }
String sendMsg = "00010000000601040000000A";
String receiveMsg;
/* 1.老化柜、标定柜通讯 */
String sendMsg1 = "00010000000601040000000A";
String receiveMsg1 = null;
TEquipmentAlarmData alarmData = new TEquipmentAlarmData(); TEquipmentAlarmData alarmData = new TEquipmentAlarmData();
for(TEquipmentInfo info : equipmentInfos){ for(TEquipmentInfo info : equipmentInfos){
/* 1.老化柜、标定柜通讯 */ receiveMsg1 = agingCabinetCommunication(info, sendMsg1);
receiveMsg = agingCabinetCommunication(info, sendMsg); if(receiveMsg1 == null || receiveMsg1.length() != 58){
if(receiveMsg == null || receiveMsg.length() != 58){
// 记录异常数据 // 记录异常数据
alarmData.setfAlarmType("01"); // 01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位 alarmData.setfAlarmType("01"); // 01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位
alarmData.setfEquipmentCode(info.getfEquipmentCode()); alarmData.setfEquipmentCode(info.getfEquipmentCode());
...@@ -72,7 +72,7 @@ public class EquipmentDataCollection { ...@@ -72,7 +72,7 @@ public class EquipmentDataCollection {
} else { } else {
// 解析服务器返回信息 // 解析服务器返回信息
// 示例:00 01 00 00 00 17 01 04 14 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 示例:00 01 00 00 00 17 01 04 14 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
String flag = receiveMsg.substring(18, 58); String flag = receiveMsg1.substring(18, 58);
if("0000000000000000000000000000000000000000".equals(flag) && !"0".equals(info.getfStatus())){ if("0000000000000000000000000000000000000000".equals(flag) && !"0".equals(info.getfStatus())){
// 更新老化柜状态(“0”空闲,“1”运行,“2”故障) // 更新老化柜状态(“0”空闲,“1”运行,“2”故障)
info.setfStatus("0"); info.setfStatus("0");
...@@ -90,8 +90,8 @@ public class EquipmentDataCollection { ...@@ -90,8 +90,8 @@ public class EquipmentDataCollection {
String status; String status;
TStoreyInfo storeyInfo = new TStoreyInfo(); TStoreyInfo storeyInfo = new TStoreyInfo();
String storeyCode; String storeyCode;
for(startIndex = 18,endIndex = 22,code = 1; endIndex <= receiveMsg.length(); startIndex += 4,endIndex += 4,code++){ for(startIndex = 18,endIndex = 22,code = 1; endIndex <= receiveMsg1.length(); startIndex += 4,endIndex += 4,code++){
status = receiveMsg.substring(startIndex, endIndex); status = receiveMsg1.substring(startIndex, endIndex);
storeyCode = info.getfEquipmentCode() + "-" + code; storeyCode = info.getfEquipmentCode() + "-" + code;
storeyInfo = tStoreyInfoService.selectTStoreyInfoByCode(storeyCode); storeyInfo = tStoreyInfoService.selectTStoreyInfoByCode(storeyCode);
if(storeyInfo == null){ if(storeyInfo == null){
...@@ -107,22 +107,16 @@ public class EquipmentDataCollection { ...@@ -107,22 +107,16 @@ public class EquipmentDataCollection {
// 示例:000100000006 01 功能码05 寄存器地址0000 断电0000 // 示例:000100000006 01 功能码05 寄存器地址0000 断电0000
String addr = Integer.toHexString(code-1).length()<2?"0"+Integer.toHexString(code-1):Integer.toHexString(code-1); String addr = Integer.toHexString(code-1).length()<2?"0"+Integer.toHexString(code-1):Integer.toHexString(code-1);
String sendMsg2 = "000100000006010500" + addr + "0000"; String sendMsg2 = "000100000006010500" + addr + "0000";
String receiveMsg2 = null; String receiveMsg2 = storeyCommunication(storeyInfo, sendMsg2);
int num2 = 1;
// 若上电失败将再次通讯,最多通讯3次
while((!sendMsg2.equals(receiveMsg2) || receiveMsg2 == null) && num2 <= 3){
receiveMsg2 = storeyCommunication(storeyInfo, sendMsg2);
num2++;
}
if(sendMsg2.equals(receiveMsg2)){ if(sendMsg2.equals(receiveMsg2)){
// 更新老化层状态 // 更新老化层状态
storeyInfo.setfStatus("4"); //断电 storeyInfo.setfStatus("3"); //断电
tStoreyInfoService.updateTStoreyInfo(storeyInfo); tStoreyInfoService.updateTStoreyInfo(storeyInfo);
} else { } else {
// 记录异常数据 // 记录异常数据
alarmData.setfAlarmType("04"); //01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位 alarmData.setfAlarmType("04"); //01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位
alarmData.setfEquipmentCode(storeyInfo.getfStoreyCode()); alarmData.setfEquipmentCode(storeyInfo.getfStoreyCode());
alarmData.setfAlarmData("电失败"); alarmData.setfAlarmData("电失败");
tEquipmentAlarmDataService.insertTEquipmentAlarmData(alarmData); tEquipmentAlarmDataService.insertTEquipmentAlarmData(alarmData);
} }
} }
...@@ -151,12 +145,12 @@ public class EquipmentDataCollection { ...@@ -151,12 +145,12 @@ public class EquipmentDataCollection {
TStoreyInfo storeyInfo = tStoreyInfoService.selectTStoreyInfoById(id); TStoreyInfo storeyInfo = tStoreyInfoService.selectTStoreyInfoById(id);
if (storeyInfo == null) { if (storeyInfo == null) {
throw new Exception("无老化层信息!"); throw new Exception("无老化层信息,请检查老化层信息再上料!");
} }
// 获取老化柜信息 // 获取老化柜信息
TEquipmentInfo equipmentInfo = tEquipmentInfoService.selectTEquipmentInfoById(storeyInfo.getfEquipmentId()); TEquipmentInfo equipmentInfo = tEquipmentInfoService.selectTEquipmentInfoById(storeyInfo.getfEquipmentId());
if (equipmentInfo == null) { if (equipmentInfo == null) {
throw new Exception("无老化柜信息!"); throw new Exception("无老化柜信息,请检查老化柜信息再上料!");
} }
TEquipmentAlarmData alarmData = new TEquipmentAlarmData(); TEquipmentAlarmData alarmData = new TEquipmentAlarmData();
...@@ -172,7 +166,7 @@ public class EquipmentDataCollection { ...@@ -172,7 +166,7 @@ public class EquipmentDataCollection {
alarmData.setfEquipmentCode(equipmentInfo.getfEquipmentCode()); alarmData.setfEquipmentCode(equipmentInfo.getfEquipmentCode());
alarmData.setfAlarmData("老化柜通讯失败"); alarmData.setfAlarmData("老化柜通讯失败");
tEquipmentAlarmDataService.insertTEquipmentAlarmData(alarmData); tEquipmentAlarmDataService.insertTEquipmentAlarmData(alarmData);
throw new Exception(storeyInfo.getfStoreyCode() + "号老化柜通讯故障!"); throw new Exception(storeyInfo.getfStoreyCode() + "号老化柜通讯故障,请重新尝试上电!");
} }
// 解析服务器返回信息 // 解析服务器返回信息
// 示例:00 01 00 00 00 17 01 04 14 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 示例:00 01 00 00 00 17 01 04 14 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...@@ -189,35 +183,23 @@ public class EquipmentDataCollection { ...@@ -189,35 +183,23 @@ public class EquipmentDataCollection {
// 示例:000100000006 01 功能码05 寄存器地址0000 上电FF00 // 示例:000100000006 01 功能码05 寄存器地址0000 上电FF00
String addr = Integer.toHexString(flag-1).length()<2?"0"+Integer.toHexString(flag-1):Integer.toHexString(flag-1); String addr = Integer.toHexString(flag-1).length()<2?"0"+Integer.toHexString(flag-1):Integer.toHexString(flag-1);
String sendMsg2 = "000100000006010500" + addr + "FF00"; String sendMsg2 = "000100000006010500" + addr + "FF00";
String receiveMsg2 = null; String receiveMsg2 = storeyCommunication(storeyInfo, sendMsg2);
int num2 = 1;
// 若上电失败将再次通讯,最多通讯3次
while((!sendMsg2.equals(receiveMsg2) || receiveMsg2 == null) && num2 <= 3){
receiveMsg2 = storeyCommunication(storeyInfo, sendMsg2);
num2++;
}
if(!sendMsg2.equals(receiveMsg2) || receiveMsg2 == null){ if(!sendMsg2.equals(receiveMsg2) || receiveMsg2 == null){
// 记录异常数据 // 记录异常数据
alarmData.setfAlarmType("04"); //01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位 alarmData.setfAlarmType("04"); //01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位
alarmData.setfEquipmentCode(storeyInfo.getfStoreyCode()); alarmData.setfEquipmentCode(storeyInfo.getfStoreyCode());
alarmData.setfAlarmData("上电失败"); alarmData.setfAlarmData("上电失败");
tEquipmentAlarmDataService.insertTEquipmentAlarmData(alarmData); tEquipmentAlarmDataService.insertTEquipmentAlarmData(alarmData);
throw new Exception(); throw new Exception(storeyInfo.getfStoreyCode() + "号老化层上电失败,请重新尝试上电!");
} }
// 老化层更新状态 // 老化层更新状态
// storeyInfo.setfStatus("1"); storeyInfo.setfStatus("1"); //运行
// tStoreyInfoService.updateTStoreyInfoByCode(storeyInfo); tStoreyInfoService.updateTStoreyInfo(storeyInfo);
/* 4.老化层通讯,72个点位,1-27一个端口号、28-54一个端口号、55-72一个端口号,IP不变 */ /* 4.老化层通讯,72个点位,1-27一个端口号、28-54一个端口号、55-72一个端口号,IP不变 */
// 示例:000100000006 点位地址01 功能码03 起始位置0000 终止位置000A // 示例:000100000006 点位地址01 功能码03 起始位置0000 终止位置000A
String sendMsg3 = "00010000000601030000000A"; String sendMsg3 = "00010000000601030000000A";
String receiveMsg3 = null; String receiveMsg3 = storeyCommunication(storeyInfo, sendMsg3);
int num3 = 1;
// 若无返回信息将再次通讯,最多通讯3次
while(receiveMsg3 == null && num3 <= 3){
receiveMsg3 = storeyCommunication(storeyInfo, sendMsg3);
num3++;
}
if(receiveMsg3 == null){ if(receiveMsg3 == null){
// 记录异常数据 // 记录异常数据
alarmData.setfAlarmType("04"); //01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位 alarmData.setfAlarmType("04"); //01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位
...@@ -250,14 +232,7 @@ public class EquipmentDataCollection { ...@@ -250,14 +232,7 @@ public class EquipmentDataCollection {
String year = Integer.toHexString(y).length()<4?"0"+Integer.toHexString(y):Integer.toHexString(y); String year = Integer.toHexString(y).length()<4?"0"+Integer.toHexString(y):Integer.toHexString(y);
String sendMsgYear = "0001000000060" + code + "060004" + year; String sendMsgYear = "0001000000060" + code + "060004" + year;
// String sendMsgYear = "0001000000060" + "1" + "060004" + year; String receiveMsgYear = storeyCommunication(storeyInfo, sendMsgYear);
String receiveMsgYear = null;
int numy = 1;
// 写入时间失败将再次通讯,最多通讯3次
while((!sendMsgYear.equals(receiveMsgYear) || receiveMsgYear == null) && numy <= 3){
receiveMsgYear = storeyCommunication(storeyInfo, sendMsgYear);
numy++;
}
if(!sendMsgYear.equals(receiveMsgYear) || receiveMsgYear == null){ if(!sendMsgYear.equals(receiveMsgYear) || receiveMsgYear == null){
// 记录异常数据 // 记录异常数据
alarmData.setfAlarmType("05"); //01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位 alarmData.setfAlarmType("05"); //01.老化柜 02.标定柜 03.机械臂 04.老化层 05.点位
...@@ -275,15 +250,19 @@ public class EquipmentDataCollection { ...@@ -275,15 +250,19 @@ public class EquipmentDataCollection {
String receiveMsg = null; String receiveMsg = null;
String ip = null; String ip = null;
Integer port = null; Integer port = null;
int num = 1;
try{ try{
ip = equipment.getfIp(); ip = equipment.getfIp();
port = equipment.getfPort(); port = equipment.getfPort();
if(ip == null || port == null){ if(ip == null || port == null){
receiveMsg = equipment.getfEquipmentCode(); receiveMsg = equipment.getfEquipmentCode();
return receiveMsg;
} else { } else {
// 若通讯失败将再次通讯,最多通讯3次
while((receiveMsg == null || receiveMsg.length() != 58) && num <= 3){
// 发送并接收数据 // 发送并接收数据
receiveMsg = TCPClient.PLCConnect(ip, port, sendMsg); receiveMsg = TCPClient.PLCConnect(ip, port, sendMsg);
num++;
}
} }
} catch(Exception e) { } catch(Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
...@@ -296,14 +275,20 @@ public class EquipmentDataCollection { ...@@ -296,14 +275,20 @@ public class EquipmentDataCollection {
String ip = null; String ip = null;
Integer port = null; Integer port = null;
String receiveMsg = null; String receiveMsg = null;
int num = 1;
try{ try{
ip = storey.getfIp(); ip = storey.getfIp();
port = storey.getfPort(); port = storey.getfPort();
if(ip == null || port == null){ if(ip == null || port == null){
throw new Exception("请确认老化层的IP和端口号是否正确!"); receiveMsg = storey.getfStoreyCode();
} }
// 若通讯失败将再次通讯,最多通讯3次
while((!sendMsg.equals(receiveMsg) || receiveMsg == null) && num <= 3){
// 发送并接收数据 // 发送并接收数据
receiveMsg = TCPClient.PLCConnect(ip, port, sendMsg); receiveMsg = TCPClient.PLCConnect(ip, port, sendMsg);
num++;
}
}catch(Exception e){ }catch(Exception e){
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
package com.zehong.web.controller.equipment; package com.zehong.web.controller.equipment;
import java.util.List; import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -23,7 +24,7 @@ import com.zehong.common.core.page.TableDataInfo; ...@@ -23,7 +24,7 @@ import com.zehong.common.core.page.TableDataInfo;
* 老化层点位信息Controller * 老化层点位信息Controller
* *
* @author zehong * @author zehong
* @date 2025-05-28 * @date 2025-06-06
*/ */
@RestController @RestController
@RequestMapping("/point") @RequestMapping("/point")
...@@ -35,6 +36,7 @@ public class TPointInfoController extends BaseController ...@@ -35,6 +36,7 @@ public class TPointInfoController extends BaseController
/** /**
* 查询老化层点位信息列表 * 查询老化层点位信息列表
*/ */
@PreAuthorize("@ss.hasPermi('point:point:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TPointInfo tPointInfo) public TableDataInfo list(TPointInfo tPointInfo)
{ {
...@@ -46,6 +48,7 @@ public class TPointInfoController extends BaseController ...@@ -46,6 +48,7 @@ public class TPointInfoController extends BaseController
/** /**
* 导出老化层点位信息列表 * 导出老化层点位信息列表
*/ */
@PreAuthorize("@ss.hasPermi('point:point:export')")
@Log(title = "老化层点位信息", businessType = BusinessType.EXPORT) @Log(title = "老化层点位信息", businessType = BusinessType.EXPORT)
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TPointInfo tPointInfo) public AjaxResult export(TPointInfo tPointInfo)
...@@ -58,6 +61,7 @@ public class TPointInfoController extends BaseController ...@@ -58,6 +61,7 @@ public class TPointInfoController extends BaseController
/** /**
* 获取老化层点位信息详细信息 * 获取老化层点位信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('point:point:query')")
@GetMapping(value = "/{fPointId}") @GetMapping(value = "/{fPointId}")
public AjaxResult getInfo(@PathVariable("fPointId") Long fPointId) public AjaxResult getInfo(@PathVariable("fPointId") Long fPointId)
{ {
...@@ -67,6 +71,7 @@ public class TPointInfoController extends BaseController ...@@ -67,6 +71,7 @@ public class TPointInfoController extends BaseController
/** /**
* 新增老化层点位信息 * 新增老化层点位信息
*/ */
@PreAuthorize("@ss.hasPermi('point:point:add')")
@Log(title = "老化层点位信息", businessType = BusinessType.INSERT) @Log(title = "老化层点位信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TPointInfo tPointInfo) public AjaxResult add(@RequestBody TPointInfo tPointInfo)
...@@ -77,6 +82,7 @@ public class TPointInfoController extends BaseController ...@@ -77,6 +82,7 @@ public class TPointInfoController extends BaseController
/** /**
* 修改老化层点位信息 * 修改老化层点位信息
*/ */
@PreAuthorize("@ss.hasPermi('point:point:edit')")
@Log(title = "老化层点位信息", businessType = BusinessType.UPDATE) @Log(title = "老化层点位信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TPointInfo tPointInfo) public AjaxResult edit(@RequestBody TPointInfo tPointInfo)
...@@ -87,6 +93,7 @@ public class TPointInfoController extends BaseController ...@@ -87,6 +93,7 @@ public class TPointInfoController extends BaseController
/** /**
* 删除老化层点位信息 * 删除老化层点位信息
*/ */
@PreAuthorize("@ss.hasPermi('point:point:remove')")
@Log(title = "老化层点位信息", businessType = BusinessType.DELETE) @Log(title = "老化层点位信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{fPointIds}") @DeleteMapping("/{fPointIds}")
public AjaxResult remove(@PathVariable Long[] fPointIds) public AjaxResult remove(@PathVariable Long[] fPointIds)
......
package com.zehong.web.controller.equipment;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TTrayInfo;
import com.zehong.system.service.ITTrayInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 托盘信息Controller
*
* @author zehong
* @date 2025-06-06
*/
@RestController
@RequestMapping("/tray")
public class TTrayInfoController extends BaseController
{
@Autowired
private ITTrayInfoService tTrayInfoService;
/**
* 查询托盘信息列表
*/
@PreAuthorize("@ss.hasPermi('tray:tray:list')")
@GetMapping("/list")
public TableDataInfo list(TTrayInfo tTrayInfo)
{
startPage();
List<TTrayInfo> list = tTrayInfoService.selectTTrayInfoList(tTrayInfo);
return getDataTable(list);
}
/**
* 导出托盘信息列表
*/
@PreAuthorize("@ss.hasPermi('tray:tray:export')")
@Log(title = "托盘信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTrayInfo tTrayInfo)
{
List<TTrayInfo> list = tTrayInfoService.selectTTrayInfoList(tTrayInfo);
ExcelUtil<TTrayInfo> util = new ExcelUtil<TTrayInfo>(TTrayInfo.class);
return util.exportExcel(list, "托盘信息数据");
}
/**
* 获取托盘信息详细信息
*/
@PreAuthorize("@ss.hasPermi('tray:tray:query')")
@GetMapping(value = "/{fTrayId}")
public AjaxResult getInfo(@PathVariable("fTrayId") Long fTrayId)
{
return AjaxResult.success(tTrayInfoService.selectTTrayInfoById(fTrayId));
}
/**
* 新增托盘信息
*/
@PreAuthorize("@ss.hasPermi('tray:tray:add')")
@Log(title = "托盘信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTrayInfo tTrayInfo)
{
return toAjax(tTrayInfoService.insertTTrayInfo(tTrayInfo));
}
/**
* 修改托盘信息
*/
@PreAuthorize("@ss.hasPermi('tray:tray:edit')")
@Log(title = "托盘信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTrayInfo tTrayInfo)
{
return toAjax(tTrayInfoService.updateTTrayInfo(tTrayInfo));
}
/**
* 删除托盘信息
*/
@PreAuthorize("@ss.hasPermi('tray:tray:remove')")
@Log(title = "托盘信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{fTrayIds}")
public AjaxResult remove(@PathVariable Long[] fTrayIds)
{
return toAjax(tTrayInfoService.deleteTTrayInfoByIds(fTrayIds));
}
}
...@@ -11,7 +11,7 @@ import com.zehong.common.core.domain.BaseEntity; ...@@ -11,7 +11,7 @@ import com.zehong.common.core.domain.BaseEntity;
* 老化层点位信息对象 t_point_info * 老化层点位信息对象 t_point_info
* *
* @author zehong * @author zehong
* @date 2025-05-28 * @date 2025-06-06
*/ */
public class TPointInfo extends BaseEntity public class TPointInfo extends BaseEntity
{ {
...@@ -20,9 +20,9 @@ public class TPointInfo extends BaseEntity ...@@ -20,9 +20,9 @@ public class TPointInfo extends BaseEntity
/** 点位ID */ /** 点位ID */
private Long fPointId; private Long fPointId;
/** 所属ID */ /** 所属托盘ID */
@Excel(name = "所属ID") @Excel(name = "所属托盘ID")
private Long fStoreyId; private Long fTrayId;
/** 点位编号 */ /** 点位编号 */
@Excel(name = "点位编号") @Excel(name = "点位编号")
...@@ -30,7 +30,7 @@ public class TPointInfo extends BaseEntity ...@@ -30,7 +30,7 @@ public class TPointInfo extends BaseEntity
/** 绑定PCBA设备号 */ /** 绑定PCBA设备号 */
@Excel(name = "绑定PCBA设备号") @Excel(name = "绑定PCBA设备号")
private Long fDeviceCode; private String fPcbaCode;
/** 点位状态:0在线,1离线,2故障 */ /** 点位状态:0在线,1离线,2故障 */
@Excel(name = "点位状态:0在线,1离线,2故障") @Excel(name = "点位状态:0在线,1离线,2故障")
...@@ -41,15 +41,24 @@ public class TPointInfo extends BaseEntity ...@@ -41,15 +41,24 @@ public class TPointInfo extends BaseEntity
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fCreateTime; private Date fCreateTime;
/** 更新时间 */ /** 板子状态:0预热,1正常,3传感器故障,4报警,5通讯故障 */
@Excel(name = "板子状态:0预热,1正常,3传感器故障,4报警,5通讯故障")
private String fPcbaStatus;
/** 绑定时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fBindingTime;
/** 解绑时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "解绑时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fUpdateTime; private Date fUnbindingTime;
/** 报警时间 */ /** 上料时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "上料时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fAlarmTime; private Date fLoadingTime;
public void setfPointId(Long fPointId) public void setfPointId(Long fPointId)
{ {
...@@ -60,14 +69,14 @@ public class TPointInfo extends BaseEntity ...@@ -60,14 +69,14 @@ public class TPointInfo extends BaseEntity
{ {
return fPointId; return fPointId;
} }
public void setfStoreyId(Long fStoreyId) public void setfTrayId(Long fTrayId)
{ {
this.fStoreyId = fStoreyId; this.fTrayId = fTrayId;
} }
public Long getfStoreyId() public Long getfTrayId()
{ {
return fStoreyId; return fTrayId;
} }
public void setfPointCode(String fPointCode) public void setfPointCode(String fPointCode)
{ {
...@@ -78,14 +87,14 @@ public class TPointInfo extends BaseEntity ...@@ -78,14 +87,14 @@ public class TPointInfo extends BaseEntity
{ {
return fPointCode; return fPointCode;
} }
public void setfDeviceCode(Long fDeviceCode) public void setfPcbaCode(String fPcbaCode)
{ {
this.fDeviceCode = fDeviceCode; this.fPcbaCode = fPcbaCode;
} }
public Long getfDeviceCode() public String getfPcbaCode()
{ {
return fDeviceCode; return fPcbaCode;
} }
public void setfStatus(String fStatus) public void setfStatus(String fStatus)
{ {
...@@ -105,36 +114,56 @@ public class TPointInfo extends BaseEntity ...@@ -105,36 +114,56 @@ public class TPointInfo extends BaseEntity
{ {
return fCreateTime; return fCreateTime;
} }
public void setfUpdateTime(Date fUpdateTime) public void setfPcbaStatus(String fPcbaStatus)
{
this.fPcbaStatus = fPcbaStatus;
}
public String getfPcbaStatus()
{
return fPcbaStatus;
}
public void setfBindingTime(Date fBindingTime)
{
this.fBindingTime = fBindingTime;
}
public Date getfBindingTime()
{
return fBindingTime;
}
public void setfUnbindingTime(Date fUnbindingTime)
{ {
this.fUpdateTime = fUpdateTime; this.fUnbindingTime = fUnbindingTime;
} }
public Date getfUpdateTime() public Date getfUnbindingTime()
{ {
return fUpdateTime; return fUnbindingTime;
} }
public void setfAlarmTime(Date fAlarmTime) public void setfLoadingTime(Date fLoadingTime)
{ {
this.fAlarmTime = fAlarmTime; this.fLoadingTime = fLoadingTime;
} }
public Date getfAlarmTime() public Date getfLoadingTime()
{ {
return fAlarmTime; return fLoadingTime;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fPointId", getfPointId()) .append("fPointId", getfPointId())
.append("fStoreyId", getfStoreyId()) .append("fTrayId", getfTrayId())
.append("fPointCode", getfPointCode()) .append("fPointCode", getfPointCode())
.append("fDeviceCode", getfDeviceCode()) .append("fPcbaCode", getfPcbaCode())
.append("fStatus", getfStatus()) .append("fStatus", getfStatus())
.append("fCreateTime", getfCreateTime()) .append("fCreateTime", getfCreateTime())
.append("fUpdateTime", getfUpdateTime()) .append("fPcbaStatus", getfPcbaStatus())
.append("fAlarmTime", getfAlarmTime()) .append("fBindingTime", getfBindingTime())
.append("fUnbindingTime", getfUnbindingTime())
.append("fLoadingTime", getfLoadingTime())
.toString(); .toString();
} }
} }
...@@ -28,10 +28,6 @@ public class TStoreyInfo extends BaseEntity ...@@ -28,10 +28,6 @@ public class TStoreyInfo extends BaseEntity
@Excel(name = "层编号") @Excel(name = "层编号")
private String fStoreyCode; private String fStoreyCode;
/** 绑定托盘编号 */
@Excel(name = "绑定托盘编号")
private String fTrayCode;
/** IP地址 */ /** IP地址 */
@Excel(name = "IP地址") @Excel(name = "IP地址")
private String fIp; private String fIp;
...@@ -40,8 +36,8 @@ public class TStoreyInfo extends BaseEntity ...@@ -40,8 +36,8 @@ public class TStoreyInfo extends BaseEntity
@Excel(name = "端口号") @Excel(name = "端口号")
private Integer fPort; private Integer fPort;
/** 状态:0空闲,1运行,2故障 */ /** 状态:0空闲,1运行,2故障,3断电*/
@Excel(name = "状态:0空闲,1运行,2故障") @Excel(name = "状态:0空闲,1运行,2故障,3断电")
private String fStatus; private String fStatus;
/** 更新时间 */ /** 更新时间 */
...@@ -86,15 +82,7 @@ public class TStoreyInfo extends BaseEntity ...@@ -86,15 +82,7 @@ public class TStoreyInfo extends BaseEntity
{ {
return fStoreyCode; return fStoreyCode;
} }
public void setfTrayCode(String fTrayCode)
{
this.fTrayCode = fTrayCode;
}
public String getfTrayCode()
{
return fTrayCode;
}
public void setfIp(String fIp) public void setfIp(String fIp)
{ {
this.fIp = fIp; this.fIp = fIp;
...@@ -156,7 +144,6 @@ public class TStoreyInfo extends BaseEntity ...@@ -156,7 +144,6 @@ public class TStoreyInfo extends BaseEntity
.append("fStoreyId", getfStoreyId()) .append("fStoreyId", getfStoreyId())
.append("fEquipmentId", getfEquipmentId()) .append("fEquipmentId", getfEquipmentId())
.append("fStoreyCode", getfStoreyCode()) .append("fStoreyCode", getfStoreyCode())
.append("fTrayCode", getfTrayCode())
.append("fIp", getfIp()) .append("fIp", getfIp())
.append("fStatus", getfStatus()) .append("fStatus", getfStatus())
.append("fPort", getfPort()) .append("fPort", getfPort())
......
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 托盘信息对象 t_tray_info
*
* @author zehong
* @date 2025-06-06
*/
public class TTrayInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 托盘id */
private Long fTrayId;
/** 托盘编号 */
@Excel(name = "托盘编号")
private String fTrayCode;
/** 绑定层编号 */
@Excel(name = "绑定层编号")
private String fStoreyCode;
/** 状态:0.空闲 1.运行 */
@Excel(name = "状态:0.空闲 1.运行")
private String fStatus;
/** 绑定时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fBindingTime;
/** 解绑时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "解绑时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fUnbindingTime;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date fCreateTime;
public void setfTrayId(Long fTrayId)
{
this.fTrayId = fTrayId;
}
public Long getfTrayId()
{
return fTrayId;
}
public void setfTrayCode(String fTrayCode)
{
this.fTrayCode = fTrayCode;
}
public String getfTrayCode()
{
return fTrayCode;
}
public void setfStoreyCode(String fStoreyCode)
{
this.fStoreyCode = fStoreyCode;
}
public String getfStoreyCode()
{
return fStoreyCode;
}
public void setfStatus(String fStatus)
{
this.fStatus = fStatus;
}
public String getfStatus()
{
return fStatus;
}
public void setfBindingTime(Date fBindingTime)
{
this.fBindingTime = fBindingTime;
}
public Date getfBindingTime()
{
return fBindingTime;
}
public void setfUnbindingTime(Date fUnbindingTime)
{
this.fUnbindingTime = fUnbindingTime;
}
public Date getfUnbindingTime()
{
return fUnbindingTime;
}
public void setfCreateTime(Date fCreateTime)
{
this.fCreateTime = fCreateTime;
}
public Date getfCreateTime()
{
return fCreateTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fTrayId", getfTrayId())
.append("fTrayCode", getfTrayCode())
.append("fStoreyCode", getfStoreyCode())
.append("fStatus", getfStatus())
.append("fBindingTime", getfBindingTime())
.append("fUnbindingTime", getfUnbindingTime())
.append("fCreateTime", getfCreateTime())
.toString();
}
}
...@@ -7,7 +7,7 @@ import com.zehong.system.domain.TPointInfo; ...@@ -7,7 +7,7 @@ import com.zehong.system.domain.TPointInfo;
* 老化层点位信息Mapper接口 * 老化层点位信息Mapper接口
* *
* @author zehong * @author zehong
* @date 2025-05-28 * @date 2025-06-06
*/ */
public interface TPointInfoMapper public interface TPointInfoMapper
{ {
......
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TTrayInfo;
/**
* 托盘信息Mapper接口
*
* @author zehong
* @date 2025-06-06
*/
public interface TTrayInfoMapper
{
/**
* 查询托盘信息
*
* @param fTrayId 托盘信息ID
* @return 托盘信息
*/
public TTrayInfo selectTTrayInfoById(Long fTrayId);
/**
* 查询托盘信息列表
*
* @param tTrayInfo 托盘信息
* @return 托盘信息集合
*/
public List<TTrayInfo> selectTTrayInfoList(TTrayInfo tTrayInfo);
/**
* 新增托盘信息
*
* @param tTrayInfo 托盘信息
* @return 结果
*/
public int insertTTrayInfo(TTrayInfo tTrayInfo);
/**
* 修改托盘信息
*
* @param tTrayInfo 托盘信息
* @return 结果
*/
public int updateTTrayInfo(TTrayInfo tTrayInfo);
/**
* 删除托盘信息
*
* @param fTrayId 托盘信息ID
* @return 结果
*/
public int deleteTTrayInfoById(Long fTrayId);
/**
* 批量删除托盘信息
*
* @param fTrayIds 需要删除的数据ID
* @return 结果
*/
public int deleteTTrayInfoByIds(Long[] fTrayIds);
}
...@@ -7,7 +7,7 @@ import com.zehong.system.domain.TPointInfo; ...@@ -7,7 +7,7 @@ import com.zehong.system.domain.TPointInfo;
* 老化层点位信息Service接口 * 老化层点位信息Service接口
* *
* @author zehong * @author zehong
* @date 2025-05-28 * @date 2025-06-06
*/ */
public interface ITPointInfoService public interface ITPointInfoService
{ {
......
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TTrayInfo;
/**
* 托盘信息Service接口
*
* @author zehong
* @date 2025-06-06
*/
public interface ITTrayInfoService
{
/**
* 查询托盘信息
*
* @param fTrayId 托盘信息ID
* @return 托盘信息
*/
public TTrayInfo selectTTrayInfoById(Long fTrayId);
/**
* 查询托盘信息列表
*
* @param tTrayInfo 托盘信息
* @return 托盘信息集合
*/
public List<TTrayInfo> selectTTrayInfoList(TTrayInfo tTrayInfo);
/**
* 新增托盘信息
*
* @param tTrayInfo 托盘信息
* @return 结果
*/
public int insertTTrayInfo(TTrayInfo tTrayInfo);
/**
* 修改托盘信息
*
* @param tTrayInfo 托盘信息
* @return 结果
*/
public int updateTTrayInfo(TTrayInfo tTrayInfo);
/**
* 批量删除托盘信息
*
* @param fTrayIds 需要删除的托盘信息ID
* @return 结果
*/
public int deleteTTrayInfoByIds(Long[] fTrayIds);
/**
* 删除托盘信息信息
*
* @param fTrayId 托盘信息ID
* @return 结果
*/
public int deleteTTrayInfoById(Long fTrayId);
}
...@@ -11,7 +11,7 @@ import com.zehong.system.service.ITPointInfoService; ...@@ -11,7 +11,7 @@ import com.zehong.system.service.ITPointInfoService;
* 老化层点位信息Service业务层处理 * 老化层点位信息Service业务层处理
* *
* @author zehong * @author zehong
* @date 2025-05-28 * @date 2025-06-06
*/ */
@Service @Service
public class TPointInfoServiceImpl implements ITPointInfoService public class TPointInfoServiceImpl implements ITPointInfoService
......
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TTrayInfoMapper;
import com.zehong.system.domain.TTrayInfo;
import com.zehong.system.service.ITTrayInfoService;
/**
* 托盘信息Service业务层处理
*
* @author zehong
* @date 2025-06-06
*/
@Service
public class TTrayInfoServiceImpl implements ITTrayInfoService
{
@Autowired
private TTrayInfoMapper tTrayInfoMapper;
/**
* 查询托盘信息
*
* @param fTrayId 托盘信息ID
* @return 托盘信息
*/
@Override
public TTrayInfo selectTTrayInfoById(Long fTrayId)
{
return tTrayInfoMapper.selectTTrayInfoById(fTrayId);
}
/**
* 查询托盘信息列表
*
* @param tTrayInfo 托盘信息
* @return 托盘信息
*/
@Override
public List<TTrayInfo> selectTTrayInfoList(TTrayInfo tTrayInfo)
{
return tTrayInfoMapper.selectTTrayInfoList(tTrayInfo);
}
/**
* 新增托盘信息
*
* @param tTrayInfo 托盘信息
* @return 结果
*/
@Override
public int insertTTrayInfo(TTrayInfo tTrayInfo)
{
return tTrayInfoMapper.insertTTrayInfo(tTrayInfo);
}
/**
* 修改托盘信息
*
* @param tTrayInfo 托盘信息
* @return 结果
*/
@Override
public int updateTTrayInfo(TTrayInfo tTrayInfo)
{
return tTrayInfoMapper.updateTTrayInfo(tTrayInfo);
}
/**
* 批量删除托盘信息
*
* @param fTrayIds 需要删除的托盘信息ID
* @return 结果
*/
@Override
public int deleteTTrayInfoByIds(Long[] fTrayIds)
{
return tTrayInfoMapper.deleteTTrayInfoByIds(fTrayIds);
}
/**
* 删除托盘信息信息
*
* @param fTrayId 托盘信息ID
* @return 结果
*/
@Override
public int deleteTTrayInfoById(Long fTrayId)
{
return tTrayInfoMapper.deleteTTrayInfoById(fTrayId);
}
}
...@@ -6,29 +6,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -6,29 +6,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TPointInfo" id="TPointInfoResult"> <resultMap type="TPointInfo" id="TPointInfoResult">
<result property="fPointId" column="f_point_id" /> <result property="fPointId" column="f_point_id" />
<result property="fStoreyId" column="f_storey_id" /> <result property="fTrayId" column="f_tray_id" />
<result property="fPointCode" column="f_point_code" /> <result property="fPointCode" column="f_point_code" />
<result property="fDeviceCode" column="f_device_code" /> <result property="fPcbaCode" column="f_pcba_code" />
<result property="fStatus" column="f_status" /> <result property="fStatus" column="f_status" />
<result property="fCreateTime" column="f_create_time" /> <result property="fCreateTime" column="f_create_time" />
<result property="fUpdateTime" column="f_update_time" /> <result property="fPcbaStatus" column="f_pcba_status" />
<result property="fAlarmTime" column="f_alarm_time" /> <result property="fBindingTime" column="f_binding_time" />
<result property="fUnbindingTime" column="f_unbinding_time" />
<result property="fLoadingTime" column="f_loading_time" />
</resultMap> </resultMap>
<sql id="selectTPointInfoVo"> <sql id="selectTPointInfoVo">
select f_point_id, f_storey_id, f_point_code, f_device_code, f_status, f_create_time, f_update_time, f_alarm_time from t_point_info select f_point_id, f_tray_id, f_point_code, f_pcba_code, f_status, f_create_time, f_pcba_status, f_binding_time, f_unbinding_time, f_loading_time from t_point_info
</sql> </sql>
<select id="selectTPointInfoList" parameterType="TPointInfo" resultMap="TPointInfoResult"> <select id="selectTPointInfoList" parameterType="TPointInfo" resultMap="TPointInfoResult">
<include refid="selectTPointInfoVo"/> <include refid="selectTPointInfoVo"/>
<where> <where>
<if test="fStoreyId != null "> and f_storey_id = #{fStoreyId}</if> <if test="fTrayId != null "> and f_tray_id = #{fTrayId}</if>
<if test="fPointCode != null and fPointCode != ''"> and f_point_code = #{fPointCode}</if> <if test="fPointCode != null and fPointCode != ''"> and f_point_code = #{fPointCode}</if>
<if test="fDeviceCode != null "> and f_device_code = #{fDeviceCode}</if> <if test="fPcbaCode != null and fPcbaCode != ''"> and f_pcba_code = #{fPcbaCode}</if>
<if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if> <if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if>
<if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if> <if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if>
<if test="fUpdateTime != null "> and f_update_time = #{fUpdateTime}</if> <if test="fPcbaStatus != null and fPcbaStatus != ''"> and f_pcba_status = #{fPcbaStatus}</if>
<if test="fAlarmTime != null "> and f_alarm_time = #{fAlarmTime}</if> <if test="fBindingTime != null "> and f_binding_time = #{fBindingTime}</if>
<if test="fUnbindingTime != null "> and f_unbinding_time = #{fUnbindingTime}</if>
<if test="fLoadingTime != null "> and f_loading_time = #{fLoadingTime}</if>
</where> </where>
</select> </select>
...@@ -40,35 +44,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -40,35 +44,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertTPointInfo" parameterType="TPointInfo" useGeneratedKeys="true" keyProperty="fPointId"> <insert id="insertTPointInfo" parameterType="TPointInfo" useGeneratedKeys="true" keyProperty="fPointId">
insert into t_point_info insert into t_point_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fStoreyId != null">f_storey_id,</if> <if test="fTrayId != null">f_tray_id,</if>
<if test="fPointCode != null">f_point_code,</if> <if test="fPointCode != null">f_point_code,</if>
<if test="fDeviceCode != null">f_device_code,</if> <if test="fPcbaCode != null">f_pcba_code,</if>
<if test="fStatus != null">f_status,</if> <if test="fStatus != null">f_status,</if>
<if test="fCreateTime != null">f_create_time,</if> <if test="fCreateTime != null">f_create_time,</if>
<if test="fUpdateTime != null">f_update_time,</if> <if test="fPcbaStatus != null">f_pcba_status,</if>
<if test="fAlarmTime != null">f_alarm_time,</if> <if test="fBindingTime != null">f_binding_time,</if>
<if test="fUnbindingTime != null">f_unbinding_time,</if>
<if test="fLoadingTime != null">f_loading_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fStoreyId != null">#{fStoreyId},</if> <if test="fTrayId != null">#{fTrayId},</if>
<if test="fPointCode != null">#{fPointCode},</if> <if test="fPointCode != null">#{fPointCode},</if>
<if test="fDeviceCode != null">#{fDeviceCode},</if> <if test="fPcbaCode != null">#{fPcbaCode},</if>
<if test="fStatus != null">#{fStatus},</if> <if test="fStatus != null">#{fStatus},</if>
<if test="fCreateTime != null">#{fCreateTime},</if> <if test="fCreateTime != null">#{fCreateTime},</if>
<if test="fUpdateTime != null">#{fUpdateTime},</if> <if test="fPcbaStatus != null">#{fPcbaStatus},</if>
<if test="fAlarmTime != null">#{fAlarmTime},</if> <if test="fBindingTime != null">#{fBindingTime},</if>
<if test="fUnbindingTime != null">#{fUnbindingTime},</if>
<if test="fLoadingTime != null">#{fLoadingTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateTPointInfo" parameterType="TPointInfo"> <update id="updateTPointInfo" parameterType="TPointInfo">
update t_point_info update t_point_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="fStoreyId != null">f_storey_id = #{fStoreyId},</if> <if test="fTrayId != null">f_tray_id = #{fTrayId},</if>
<if test="fPointCode != null">f_point_code = #{fPointCode},</if> <if test="fPointCode != null">f_point_code = #{fPointCode},</if>
<if test="fDeviceCode != null">f_device_code = #{fDeviceCode},</if> <if test="fPcbaCode != null">f_pcba_code = #{fPcbaCode},</if>
<if test="fStatus != null">f_status = #{fStatus},</if> <if test="fStatus != null">f_status = #{fStatus},</if>
<if test="fCreateTime != null">f_create_time = #{fCreateTime},</if> <if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if> <if test="fPcbaStatus != null">f_pcba_status = #{fPcbaStatus},</if>
<if test="fAlarmTime != null">f_alarm_time = #{fAlarmTime},</if> <if test="fBindingTime != null">f_binding_time = #{fBindingTime},</if>
<if test="fUnbindingTime != null">f_unbinding_time = #{fUnbindingTime},</if>
<if test="fLoadingTime != null">f_loading_time = #{fLoadingTime},</if>
</trim> </trim>
where f_point_id = #{fPointId} where f_point_id = #{fPointId}
</update> </update>
......
...@@ -8,7 +8,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -8,7 +8,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fStoreyId" column="f_storey_id" /> <result property="fStoreyId" column="f_storey_id" />
<result property="fEquipmentId" column="f_equipment_id" /> <result property="fEquipmentId" column="f_equipment_id" />
<result property="fStoreyCode" column="f_storey_code" /> <result property="fStoreyCode" column="f_storey_code" />
<result property="fTrayCode" column="f_tray_code" />
<result property="fIp" column="f_ip" /> <result property="fIp" column="f_ip" />
<result property="fStatus" column="f_status" /> <result property="fStatus" column="f_status" />
<result property="fPort" column="f_port" /> <result property="fPort" column="f_port" />
...@@ -26,7 +25,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -26,7 +25,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="fEquipmentId != null "> and f_equipment_id = #{fEquipmentId}</if> <if test="fEquipmentId != null "> and f_equipment_id = #{fEquipmentId}</if>
<if test="fStoreyCode != null and fStoreyCode != ''"> and f_storey_code = #{fStoreyCode}</if> <if test="fStoreyCode != null and fStoreyCode != ''"> and f_storey_code = #{fStoreyCode}</if>
<if test="fTrayCode != null "> and f_tray_code = #{fTrayCode}</if>
<if test="fIp != null and fIp != ''"> and f_ip = #{fIp}</if> <if test="fIp != null and fIp != ''"> and f_ip = #{fIp}</if>
<if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if> <if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if>
<if test="fPort != null "> and f_port = #{fPort}</if> <if test="fPort != null "> and f_port = #{fPort}</if>
...@@ -52,7 +50,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -52,7 +50,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fStoreyId != null">f_storey_id,</if> <if test="fStoreyId != null">f_storey_id,</if>
<if test="fEquipmentId != null">f_equipment_id,</if> <if test="fEquipmentId != null">f_equipment_id,</if>
<if test="fStoreyCode != null">f_storey_code,</if> <if test="fStoreyCode != null">f_storey_code,</if>
<if test="fTrayCode != null">f_tray_code,</if>
<if test="fIp != null">f_ip,</if> <if test="fIp != null">f_ip,</if>
<if test="fStatus != null">f_status,</if> <if test="fStatus != null">f_status,</if>
<if test="fPort != null">f_port,</if> <if test="fPort != null">f_port,</if>
...@@ -64,7 +61,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -64,7 +61,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fStoreyId != null">#{fStoreyId},</if> <if test="fStoreyId != null">#{fStoreyId},</if>
<if test="fEquipmentId != null">#{fEquipmentId},</if> <if test="fEquipmentId != null">#{fEquipmentId},</if>
<if test="fStoreyCode != null">#{fStoreyCode},</if> <if test="fStoreyCode != null">#{fStoreyCode},</if>
<if test="fTrayCode != null">#{fTrayCode},</if>
<if test="fIp != null">#{fIp},</if> <if test="fIp != null">#{fIp},</if>
<if test="fStatus != null">#{fStatus},</if> <if test="fStatus != null">#{fStatus},</if>
<if test="fPort != null">#{fPort},</if> <if test="fPort != null">#{fPort},</if>
...@@ -79,7 +75,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -79,7 +75,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="fEquipmentId != null">f_equipment_id = #{fEquipmentId},</if> <if test="fEquipmentId != null">f_equipment_id = #{fEquipmentId},</if>
<if test="fStoreyCode != null">f_storey_code = #{fStoreyCode},</if> <if test="fStoreyCode != null">f_storey_code = #{fStoreyCode},</if>
<if test="fTrayCode != null">f_tray_code = #{fTrayCode},</if>
<if test="fIp != null">f_ip = #{fIp},</if> <if test="fIp != null">f_ip = #{fIp},</if>
<if test="fStatus != null">f_status = #{fStatus},</if> <if test="fStatus != null">f_status = #{fStatus},</if>
<if test="fPort != null">f_port = #{fPort},</if> <if test="fPort != null">f_port = #{fPort},</if>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TTrayInfoMapper">
<resultMap type="TTrayInfo" id="TTrayInfoResult">
<result property="fTrayId" column="f_tray_id" />
<result property="fTrayCode" column="f_tray_code" />
<result property="fStoreyCode" column="f_storey_code" />
<result property="fStatus" column="f_status" />
<result property="fBindingTime" column="f_binding_time" />
<result property="fUnbindingTime" column="f_unbinding_time" />
<result property="fCreateTime" column="f_create_time" />
</resultMap>
<sql id="selectTTrayInfoVo">
select f_tray_id, f_tray_code, f_storey_code, f_status, f_binding_time, f_unbinding_time, f_create_time from t_tray_info
</sql>
<select id="selectTTrayInfoList" parameterType="TTrayInfo" resultMap="TTrayInfoResult">
<include refid="selectTTrayInfoVo"/>
<where>
<if test="fTrayCode != null and fTrayCode != ''"> and f_tray_code = #{fTrayCode}</if>
<if test="fStoreyCode != null and fStoreyCode != ''"> and f_storey_code = #{fStoreyCode}</if>
<if test="fStatus != null and fStatus != ''"> and f_status = #{fStatus}</if>
<if test="fBindingTime != null "> and f_binding_time = #{fBindingTime}</if>
<if test="fUnbindingTime != null "> and f_unbinding_time = #{fUnbindingTime}</if>
<if test="fCreateTime != null "> and f_create_time = #{fCreateTime}</if>
</where>
</select>
<select id="selectTTrayInfoById" parameterType="Long" resultMap="TTrayInfoResult">
<include refid="selectTTrayInfoVo"/>
where f_tray_id = #{fTrayId}
</select>
<insert id="insertTTrayInfo" parameterType="TTrayInfo" useGeneratedKeys="true" keyProperty="fTrayId">
insert into t_tray_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fTrayCode != null">f_tray_code,</if>
<if test="fStoreyCode != null">f_storey_code,</if>
<if test="fStatus != null">f_status,</if>
<if test="fBindingTime != null">f_binding_time,</if>
<if test="fUnbindingTime != null">f_unbinding_time,</if>
<if test="fCreateTime != null">f_create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fTrayCode != null">#{fTrayCode},</if>
<if test="fStoreyCode != null">#{fStoreyCode},</if>
<if test="fStatus != null">#{fStatus},</if>
<if test="fBindingTime != null">#{fBindingTime},</if>
<if test="fUnbindingTime != null">#{fUnbindingTime},</if>
<if test="fCreateTime != null">#{fCreateTime},</if>
</trim>
</insert>
<update id="updateTTrayInfo" parameterType="TTrayInfo">
update t_tray_info
<trim prefix="SET" suffixOverrides=",">
<if test="fTrayCode != null">f_tray_code = #{fTrayCode},</if>
<if test="fStoreyCode != null">f_storey_code = #{fStoreyCode},</if>
<if test="fStatus != null">f_status = #{fStatus},</if>
<if test="fBindingTime != null">f_binding_time = #{fBindingTime},</if>
<if test="fUnbindingTime != null">f_unbinding_time = #{fUnbindingTime},</if>
<if test="fCreateTime != null">f_create_time = #{fCreateTime},</if>
</trim>
where f_tray_id = #{fTrayId}
</update>
<delete id="deleteTTrayInfoById" parameterType="Long">
delete from t_tray_info where f_tray_id = #{fTrayId}
</delete>
<delete id="deleteTTrayInfoByIds" parameterType="String">
delete from t_tray_info where f_tray_id in
<foreach item="fTrayId" collection="array" open="(" separator="," close=")">
#{fTrayId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询托盘信息列表
export function listTray(query) {
return request({
url: '/tray/list',
method: 'get',
params: query
})
}
// 查询托盘信息详细
export function getTray(fTrayId) {
return request({
url: '/tray/' + fTrayId,
method: 'get'
})
}
// 新增托盘信息
export function addTray(data) {
return request({
url: '/tray',
method: 'post',
data: data
})
}
// 修改托盘信息
export function updateTray(data) {
return request({
url: '/tray',
method: 'put',
data: data
})
}
// 删除托盘信息
export function delTray(fTrayId) {
return request({
url: '/tray/' + fTrayId,
method: 'delete'
})
}
// 导出托盘信息
export function exportTray(query) {
return request({
url: '/tray/export',
method: 'get',
params: query
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment