提交 af8bbc34 authored 作者: zjm's avatar zjm

Merge branch 'bug' of git.yfzx.zjtys.com.cn:matrix/device-back

# Conflicts: # dev-blockcha/src/main/java/com/tykj/dev/blockcha/subject/service/impl/BlockChainUtilImpl.java
...@@ -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
......
...@@ -16,16 +16,13 @@ ...@@ -16,16 +16,13 @@
// * 步骤: // * 步骤:
// * 1.构建请求参数 // * 1.构建请求参数
// * 2.通过rest_template获取数据 // * 2.通过rest_template获取数据
// * // * 测试
// * @author LJJ cnljj1995@gmail.com // * @author LJJ cnljj1995@gmail.com
// * on 2020-08-13 // * on 2020-08-13
// */ // */
//@Slf4j //@Slf4j
//@Component //@Component
//public class BlockChainUtilImplLocal implements BlockChainUtil { //public class BlockChainUtilImpl1 implements BlockChainUtil {
//
//
//
// //
// //
// private String SECRET_KEY = "3mdeM1dw2FfHrd5h6WAuhB3WYdDG6ZAgz96CcM1nzxbiYA8QaaZHW75Je9xKixTTD2rwujyb1gVUNPYm5W6FPZQ8"; // private String SECRET_KEY = "3mdeM1dw2FfHrd5h6WAuhB3WYdDG6ZAgz96CcM1nzxbiYA8QaaZHW75Je9xKixTTD2rwujyb1gVUNPYm5W6FPZQ8";
...@@ -118,6 +115,7 @@ ...@@ -118,6 +115,7 @@
// request, // request,
// BcText.class // BcText.class
// ); // );
//// return new BcText().toData();
// } // }
// //
// @Override // @Override
...@@ -126,6 +124,7 @@ ...@@ -126,6 +124,7 @@
// request.put("content", content); // request.put("content", content);
// request.put("subCode", subCode); // request.put("subCode", subCode);
// request.put("apiSignature", ApiSignatureUtil.getApiSignature(request, SECRET_KEY)); // request.put("apiSignature", ApiSignatureUtil.getApiSignature(request, SECRET_KEY));
//
// return new RestTemplate().postForObject( // return new RestTemplate().postForObject(
// BLOCK_CHAIN_URL + BcUrl.SEND_TEXT, // BLOCK_CHAIN_URL + BcUrl.SEND_TEXT,
// request, // request,
...@@ -133,10 +132,6 @@ ...@@ -133,10 +132,6 @@
// ); // );
// } // }
// //
//// public static void main(String[] args) {
//// new BlockChainUtilImpl().sendHash(1,"阿斯顿好看");
//// }
//
// //
// @Override // @Override
// public BcHash sendHash(Integer index,Integer subCode, String content) { // public BcHash sendHash(Integer index,Integer subCode, String content) {
...@@ -202,10 +197,6 @@ ...@@ -202,10 +197,6 @@
// request, // request,
// BcHash.class // BcHash.class
// ); // );
//// }
//// else {
//// return new BcHash(0, "", new BcHashData("000"));
//// }
// } // }
// //
// @Override // @Override
...@@ -226,6 +217,7 @@ ...@@ -226,6 +217,7 @@
// SortedMap<Object, Object> request = getRequest(); // SortedMap<Object, Object> request = getRequest();
// map.forEach(request::put); // map.forEach(request::put);
// request.put("apiSignature", ApiSignatureUtil.getApiSignature(request, SECRET_KEY)); // request.put("apiSignature", ApiSignatureUtil.getApiSignature(request, SECRET_KEY));
//
// return new RestTemplate().postForObject( // return new RestTemplate().postForObject(
// BLOCK_CHAIN_URL + BcUrl.FETCH_HISTORY, // BLOCK_CHAIN_URL + BcUrl.FETCH_HISTORY,
// request, // request,
...@@ -275,6 +267,7 @@ ...@@ -275,6 +267,7 @@
// BLOCK_CHAIN_URL + BcUrl.APPEND_TEXT, // BLOCK_CHAIN_URL + BcUrl.APPEND_TEXT,
// request, // request,
// BcText.class); // BcText.class);
//// return new BcText().toData();
// } // }
// //
// @Override // @Override
...@@ -285,7 +278,7 @@ ...@@ -285,7 +278,7 @@
// String s = ApiSignatureUtil.getApiSignature(request, SECRET_KEY); // String s = ApiSignatureUtil.getApiSignature(request, SECRET_KEY);
// request.put("apiSignature", s); // request.put("apiSignature", s);
// //
// return new RestTemplate().postForObject( // return new RestTemplate().postForObject(
// BLOCK_CHAIN_URL + BcUrl.APPEND_TEXT, // BLOCK_CHAIN_URL + BcUrl.APPEND_TEXT,
// request, // request,
// BcText.class); // BcText.class);
...@@ -338,6 +331,7 @@ ...@@ -338,6 +331,7 @@
// request, // request,
// BcHash.class // BcHash.class
// ); // );
//// return new BcHash().toDate();
// //
// } // }
// //
...@@ -354,6 +348,7 @@ ...@@ -354,6 +348,7 @@
// request, // request,
// BcHash.class // BcHash.class
// ); // );
//// return new BcHash().toDate();
// } // }
// //
// @Override // @Override
......
...@@ -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);
......
...@@ -8,3 +8,4 @@ spring.jpa.hibernate.ddl-auto=update ...@@ -8,3 +8,4 @@ spring.jpa.hibernate.ddl-auto=update
# spring boot admin # spring boot admin
spring.boot.admin.client.url=http://localhost:8769 spring.boot.admin.client.url=http://localhost:8769
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087w spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087w
block.flag=true
...@@ -6,4 +6,5 @@ file.path=C:/Users/dengdiyi/Documents/file/ ...@@ -6,4 +6,5 @@ file.path=C:/Users/dengdiyi/Documents/file/
logging.file=./log/equip.log logging.file=./log/equip.log
preview.path=http://124.70.145.101:8087/equip/file/ preview.path=http://124.70.145.101:8087/equip/file/
# spring boot admin # spring boot admin
spring.boot.admin.client.url=http://localhost:8769 spring.boot.admin.client.url=http://localhost:8769
\ No newline at end of file block.flag=true
\ No newline at end of file
...@@ -6,4 +6,5 @@ spring.datasource.password=szoscar55 ...@@ -6,4 +6,5 @@ spring.datasource.password=szoscar55
spring.jpa.database-platform=org.hibernate.dialect.OscarDialect spring.jpa.database-platform=org.hibernate.dialect.OscarDialect
#file.path=/opt/zb/ #file.path=/opt/zb/
#preview.path=http://10.153.4.11:8088/equip/file/ #preview.path=http://10.153.4.11:8088/equip/file/
#preview.path=http://192.168.0.80:8088/equip/file/ #preview.path=http://192.168.0.80:8088/equip/file/
\ No newline at end of file block.flag=true
\ No newline at end of file
...@@ -6,4 +6,5 @@ spring.datasource.password=szoscar55 ...@@ -6,4 +6,5 @@ spring.datasource.password=szoscar55
spring.jpa.database-platform=org.hibernate.dialect.OscarDialect spring.jpa.database-platform=org.hibernate.dialect.OscarDialect
file.path=/opt/zb/ file.path=/opt/zb/
preview.path=http://10.153.4.11:8088/equip/file/ preview.path=http://10.153.4.11:8088/equip/file/
#preview.path=http://192.168.0.80:8088/equip/file/ #preview.path=http://192.168.0.80:8088/equip/file/
\ No newline at end of file block.flag=true
\ No newline at end of file
...@@ -7,3 +7,4 @@ spring.jpa.database-platform=org.hibernate.dialect.OscarDialect ...@@ -7,3 +7,4 @@ spring.jpa.database-platform=org.hibernate.dialect.OscarDialect
file.path=/opt/zb/ file.path=/opt/zb/
preview.path=http://10.153.4.11:8088/equipTest/file/ preview.path=http://10.153.4.11:8088/equipTest/file/
spring.jmx.enabled=false spring.jmx.enabled=false
block.flag=false
...@@ -8,4 +8,5 @@ file.path=/opt/zb/ ...@@ -8,4 +8,5 @@ file.path=/opt/zb/
#preview.path=http://10.153.4.11:8088/equip/file/ #preview.path=http://10.153.4.11:8088/equip/file/
preview.path=http://192.168.0.80:8088/equip/file/ preview.path=http://192.168.0.80:8088/equip/file/
spring.boot.admin.client.url=http://localhost:8769 spring.boot.admin.client.url=http://localhost:8769
spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087 spring.boot.admin.client.instance.serviceBaseUrl=http://localhost:8087
\ No newline at end of file block.flag=true
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论