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

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

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