提交 60aeb7df authored 作者: zhoushaopan's avatar zhoushaopan

feat(装备模块): 修改单位名称从而修改装备的所属所在

去掉修正单位的类
上级 6248dba4
......@@ -115,6 +115,7 @@ public class AllotBill {
* 出库附件文件名
*/
@ApiModelProperty(value = "出库附件文件名")
@Column(name = "file_name",columnDefinition = "TEXT")
private String fileName;
/**
* 出库附件文件地址URL
......@@ -126,6 +127,7 @@ public class AllotBill {
* 入库附件文件名
*/
@ApiModelProperty(value = "入库附件文件名")
@Column(name = "receive_file_name",columnDefinition = "TEXT")
private String receiveFileName;
/**
* 入库附件文件地址URL
......
......@@ -509,6 +509,7 @@ public class MatchingDeviceController {
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setType(matchingDeviceEditVo.getType());
m.setTypeName(matchingDeviceEditVo.getTypeName());
}
//添加绑定和解绑装备
//添加
......@@ -529,6 +530,16 @@ public class MatchingDeviceController {
m.setDeviceId(0);
}
if (matchingDeviceEditVo.getMatchingDeviceStorageLocation() != null &&
!m.getMatchingDeviceStorageLocation().equals(matchingDeviceEditVo.getMatchingDeviceStorageLocation())) {
//添加设备日志 存放位置
String remark = "将设备的存放位置改为" + matchingDeviceEditVo.getMatchingDeviceStorageLocation();
DeviceLogDto deviceLogDto = new DeviceLogDto(1, matchingDeviceEditVo.getMatchingDeviceId(), remark, null,null);
deviceLogService.addLog(deviceLogDto);
m.setMatchingDeviceStorageLocation(matchingDeviceEditVo.getMatchingDeviceStorageLocation());
m.setMatchingDeviceStorageLocationId(matchingDeviceEditVo.getMatchingDeviceStorageLocationId());
}
matchingDeviceLibraryService.update(m);
return ResponseEntity.ok("修改成功");
}
......
......@@ -184,6 +184,7 @@ public class AccessController {
//对交集外的装备进行告警
LibraryWarningLog libraryWarningLog = new LibraryWarningLog();
libraryWarningLog.setUnit(userPublicService.findByUnitsToname(unitId));
libraryWarningLog.setUnitId(unitId);
libraryWarningLog.setInventoryResults("异常出库" + idList.size() + "台");
libraryWarningLog.setStatus("1");
libraryWarningLog.setWarningHandle(0);
......
......@@ -379,6 +379,7 @@ public class RfidController {
RfidChangeLog rfidChangeLog = new RfidChangeLog(
d.getDeviceId(),
currentUserInfo.getUnits().getName(),
currentUserInfo.getUnitsId(),
currentUserInfo.getUserId(),
rfidChangeBillSaved.getUserBId(),
d.getOldRfidCardId(),
......
......@@ -38,6 +38,9 @@ public class LibraryWarningLog {
@ApiModelProperty(value = "告警单位")
private String unit;
@ApiModelProperty(value = "告警单位Id")
private Integer unitId;
/**
* 告警状态
*/
......@@ -58,6 +61,7 @@ public class LibraryWarningLog {
* 盘点结果
*/
@ApiModelProperty(value = "异常情况(正常 新增X台 缺失X台)")
@Column(name = "inventory_results",columnDefinition ="TEXT")
private String inventoryResults;
/**
* 应有数量
......
......@@ -63,11 +63,13 @@ public class LibraryWarningLogDetail {
* 处理结果
*/
@ApiModelProperty(value = "处理结果")
@Column(name = "handle_results",columnDefinition ="TEXT")
private String handleResult;
/**
* 异常情况
*/
@ApiModelProperty(value = "异常情况")
@Column(name = "inventory_results",columnDefinition ="TEXT")
private String inventoryResults;
/**
* 创建用户id
......
......@@ -45,10 +45,15 @@ public class RfidChangeLog {
@ApiModelProperty(value = "对应装备ID")
private Integer deviceId;
/**
* 修改单位
* 修改单位名称
*/
@ApiModelProperty(value = "修改单位")
private String unit;
/**
* 修改单位id
*/
@ApiModelProperty(value = "修改单位ID")
private Integer unitId;
/**
* 修改人A
*/
......@@ -113,9 +118,10 @@ public class RfidChangeLog {
private String recordId;
public RfidChangeLog(Integer deviceId, String unit, Integer userAId, Integer userBId, String oldCardId, String newCardId, Integer rfidChangeBillId, Integer validTag) {
public RfidChangeLog(Integer deviceId, String unit, Integer unitId,Integer userAId, Integer userBId, String oldCardId, String newCardId, Integer rfidChangeBillId, Integer validTag) {
this.deviceId = deviceId;
this.unit = unit;
this.unitId = unitId;
this.userAId = userAId;
this.userBId = userBId;
this.oldCardId = oldCardId;
......
package com.tykj.dev.rfid.entity.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
......@@ -8,8 +9,10 @@ import lombok.Data;
@Data
public class AccessData {
@ApiModelProperty(value = "命令")
private String cmd ;
@ApiModelProperty(value = "数据详情类")
private DataDetail data;
}
package com.tykj.dev.rfid.entity.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
......@@ -8,10 +10,13 @@ import java.util.List;
* @author dengdiyi
*/
@Data
@ApiModel("数据详情类")
public class DataDetail {
@ApiModelProperty(value = "门禁名称")
private String deviceNo;
@ApiModelProperty(value = "IP地址")
private String ip;
private List<Record> epcs;
......
package com.tykj.dev.rfid.entity.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class Record {
@ApiModelProperty(value = "标签的内容")
private String epc;
@ApiModelProperty(value = "报警时间")
private String alarmtime;
@ApiModelProperty(value = "允许出入库的方向 0为入 1为出")
private Integer direction;
}
......@@ -9,5 +9,10 @@ public interface AccessControlNameService {
AccessControlName add(AccessControlName accessControlName);
/**
* 根据门禁名称查询
* @param deviceNo 门禁名称
* @return 门禁名称对象
*/
AccessControlName getByDeviceNo(String deviceNo);
}
......@@ -4,12 +4,14 @@ import com.module.interaction.ReaderHelper;
import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo;
import com.tykj.dev.device.user.subject.service.UnitsService;
import com.tykj.dev.rfid.entity.domin.LibraryWarningLog;
import com.tykj.dev.rfid.entity.domin.LibraryWarningLogDetail;
import com.tykj.dev.rfid.repository.LibraryWarningLogDetailDao;
import com.tykj.dev.rfid.service.LibraryWarningLogService;
import com.tykj.dev.rfid.service.RfidChangeBillService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.stereotype.Component;
......@@ -36,6 +38,10 @@ public class InventoryScheduled {
final LibraryWarningLogDetailDao libraryWarningLogDetailDao;
@Resource
DeviceLibraryService deviceLibraryService;
@Resource
private UnitsService unitsService;
InventoryThread inventoryThread = new InventoryThread();
// private String cron = "0 0/1 * * * ? ";
private String cron = "0 0 1 * * ?";
......@@ -97,13 +103,15 @@ public class InventoryScheduled {
//执行数据库操作
DeviceLibrarySelectVo deviceLibrarySelectVo = new DeviceLibrarySelectVo();
deviceLibrarySelectVo.setLifeStatus(Arrays.asList(2));
deviceLibrarySelectVo.setLocationUnit("省机要局");
// deviceLibrarySelectVo.setLocationUnit("省机要局");
deviceLibrarySelectVo.setUnitId(1);
deviceLibrarySelectVo.setLocationUnit(unitsService.findById(1).getName());
List<DeviceLibrary> list = deviceLibraryService.getListWithoutParent(deviceLibrarySelectVo);
//遍历判断结果
LibraryWarningLog libraryWarningLog = new LibraryWarningLog();
libraryWarningLog.setUnit("省机要局");
// libraryWarningLog.setUnit("省机要局");
libraryWarningLog.setUnitId(1);
libraryWarningLog.setUnit(unitsService.findById(1).getName());
libraryWarningLog.setStatus("0");
libraryWarningLog.setWarningType(2);
libraryWarningLog.setWarningHandle(0);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论