提交 d4517de2 authored 作者: 黄夏豪's avatar 黄夏豪

新增了出入库报警白名单类

上级 e769578e
package com.tykj.dev.rfid.aop;
/**
* 在装备库的装备发生保存动作时加入切面
* 判断装备保存时的状态,根据状态判断该装备发生出入库时是否需要声光报警
* @author HuangXiahao
* @version V1.0
* @class InputOutputAop
* @packageName com.tykj.dev.rfid.aop
**/
public class InputOutputAop {
}
...@@ -85,6 +85,16 @@ public class RfidController { ...@@ -85,6 +85,16 @@ public class RfidController {
this.inventoryScheduled = inventoryScheduled; this.inventoryScheduled = inventoryScheduled;
} }
@ApiOperation(value = "接收报警记录", notes = "可以通过这个接口生成RFID表面号")
@PostMapping(value = "/test")
public ResponseEntity test(@RequestBody List<RfidCreateVo> list) {
//接收报警记录
//根据报警记录进行判断
return ResultUtil.success(rfidService.getRfidNumber(list));
}
@ApiOperation(value = "生成RFID表面号", notes = "可以通过这个接口生成RFID表面号") @ApiOperation(value = "生成RFID表面号", notes = "可以通过这个接口生成RFID表面号")
@PostMapping(value = "/createRFID") @PostMapping(value = "/createRFID")
public ResponseEntity createRfid(@RequestBody List<RfidCreateVo> list) { public ResponseEntity createRfid(@RequestBody List<RfidCreateVo> list) {
......
package com.tykj.dev.rfid.entity.domin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.util.Date;
/**
* @author HuangXiahao
* @version V1.0
* @class InputDevice
* @packageName com.tykj.dev.rfid.entity.domin
**/
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@SQLDelete(sql = "update library_warning_log set delete_tag = 1 where id = ?")
@Where(clause = "delete_tag = 0")
@ApiModel("可出入库的装备,该表用于放置可以出库或者可以入库的装备")
public class InputOutputDevice {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(name = "主键id")
private Integer id;
/**
* 允许出入口的装备ID
*/
@ApiModelProperty(value = "装备ID")
private Integer deviceId;
/**
* 允许出入库的方向 0为入 1为出
*/
@ApiModelProperty(value = "允许出入库的方向 0为入 1为出")
private Integer direction;
/**
* 创建时间
*/
@CreatedDate
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新时间
*/
@LastModifiedDate
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 删除标记(0:未删除,1:已删除)
*/
@ApiModelProperty(value = "删除标记(0:未删除,1:已删除)")
private Integer deleteTag = 0;
}
package com.tykj.dev.rfid.repository;
import com.tykj.dev.rfid.entity.domin.InputOutputDevice;
import com.tykj.dev.rfid.entity.domin.LibraryWarningLog;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @author HuangXiahao
* @version V1.0
* @packageName com.tykj.dev.rfid.repository
**/
public interface InputOutputDeviceDao extends JpaRepository<InputOutputDevice, Integer>, JpaSpecificationExecutor<InputOutputDevice> {
}
package com.tykj.dev.rfid.service;
import com.tykj.dev.rfid.entity.domin.InputOutputDevice;
/**
* @author HuangXiahao
* @version V1.0
* @class InputOutputDeviceService
* @packageName com.tykj.dev.rfid.service
**/
public interface InputOutputDeviceService {
/**
* 新增实体
* @param inputOutputDevice
* @return
*/
InputOutputDevice addEntity(InputOutputDevice inputOutputDevice);
}
package com.tykj.dev.rfid.service.impl;
import com.tykj.dev.rfid.entity.domin.InputOutputDevice;
import com.tykj.dev.rfid.repository.InputOutputDeviceDao;
import com.tykj.dev.rfid.service.InputOutputDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author HuangXiahao
* @version V1.0
* @class InputOutputDeviceServiceImpl
* @packageName com.tykj.dev.rfid.service.impl
**/
@Service
public class InputOutputDeviceServiceImpl implements InputOutputDeviceService {
@Autowired
InputOutputDeviceDao inputOutputDeviceDao;
@Override
public InputOutputDevice addEntity(InputOutputDevice inputOutputDevice) {
return inputOutputDeviceDao.save(inputOutputDevice);
}
}
...@@ -113,6 +113,7 @@ public class RfidServiceImpl implements RfidService { ...@@ -113,6 +113,7 @@ public class RfidServiceImpl implements RfidService {
if (pl == PrinterLanguage.ZPL) { if (pl == PrinterLanguage.ZPL) {
configLabel = ("^XA\n" + configLabel = ("^XA\n" +
"^CW1,E:SIMSUN.FNT\n"+
"~TA000\n" + "~TA000\n" +
"~JSN\n" + "~JSN\n" +
"^LT0\n" + "^LT0\n" +
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论