配置文件暂时修改

changchun-医药
LAPTOP-S9HJSOEB\昊天 2 years ago
parent 136b6b3523
commit 04d70dc542

@ -1,10 +1,13 @@
package com.zhehekeji.web.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zhehekeji.web.entity.CheckLog;
import com.zhehekeji.web.entity.RfidLog;
import com.zhehekeji.web.entity.Videocc;
import com.zhehekeji.web.entity.VideoccResponse;
import com.zhehekeji.web.mapper.CheckLogMapper;
import com.zhehekeji.web.mapper.RFIDMapper;
import com.zhehekeji.web.service.CheckLogService;
import com.zhehekeji.web.service.interfaces.RfidLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -22,6 +25,8 @@ import java.util.*;
public class VideoccController {
@Resource
private RfidLogService rfidLogService;
@Resource
private CheckLogMapper checkLogMapper;
@PostMapping("/xiddata")
@ApiOperation(value = "库存信息")
public VideoccResponse xiddata(@RequestBody Videocc videocc ){
@ -38,20 +43,26 @@ public class VideoccController {
VideoccResponse videoccResponse = new VideoccResponse();
videoccResponse.setMsg("失败");
videoccResponse.setIsSuccess(0);
CheckLog checkLog = checkLogMapper.selectOne(new QueryWrapper<CheckLog>().eq("check_Num",videocc.getJobNum()).orderByDesc("create_time"));
RfidLog rfidLog = rfidLogService.getOne(new QueryWrapper<RfidLog>().eq("task_id",videocc.getJobNum()).orderByDesc("create_time"));
if(rfidLog!=null){
Set<String> codes = rfidLog.getRfidTrayCode().split(",").length>0?new HashSet<>(Arrays.asList(rfidLog.getRfidTrayCode().split(","))):new HashSet<>();
if(codes.containsAll(list)){
checkLog.setStatus(2);
videoccResponse.setMsg("成功");
videoccResponse.setIsSuccess(1);
}else {
checkLog.setStatus(1);
videoccResponse.setMsg("扫码错误,请检查货物");
videoccResponse.setIsSuccess(0);
}
checkLogMapper.updateById(checkLog);
}else {
videoccResponse.setMsg("rfid扫码未完成请稍后重试");
videoccResponse.setIsSuccess(0);
}
return videoccResponse;
}

@ -13,6 +13,8 @@ import java.time.LocalDateTime;
public class CheckLog {
private Integer id;
private Integer streetId;

@ -107,6 +107,9 @@ public class InitService implements ApplicationRunner {
try {
ksecNettyClient.createClient(ksec);
}catch (Exception e){
log.info(" reconnect......");
nettyClient.reconnect(1);
log.error("kesc connect error,url:{},port:{}",ksec.getIp(),ksec.getPort());
}
}else {

@ -693,6 +693,9 @@ public class PlcService {
} else if (configProperties.getScanCodeMode().getTray() == 3 ) {
// //RFID
// RFID rfid = rfidService.getRFIDByPlc(street.getId(),plcCmdInfo.getLeftRight1());
trayCode = "识别异常";
trayCheck = Boolean.FALSE;
Set<String> tags = new HashSet<>();
try {
RFIDCheck(plcCmdInfo,true);
@ -703,36 +706,10 @@ public class PlcService {
tags = RFIDStop(plcCmdInfo);
log.info("盘点rfid扫描结果"+tags);
}
// if (tags != null && tags.size() > 0 && tags.contains(wmsTrayCode)) {
//
// trayCode = wmsTrayCode;
// trayCheck = Boolean.TRUE;
// if(! rfidLiveService.getRfidLive(plcCmdInfo,street,wmsTrayCode)){
//
// RFID rfid = rfidMapper.selectOne(new QueryWrapper<RFID>().eq("street_id", street.getId()));
// rfidLiveService.rfidRemoveLive(plcCmdInfo,street,rfid);
// rfidLiveService.rfidSave(plcCmdInfo,trayCode,street,rfid);
// }
// } else {
// log.warn("sick ocr error:{}", "");
// //查看数据库里数据
// RfidLive rfidLive = rfidLiveService.getOne(new QueryWrapper<RfidLive>()
// .eq("street_Id", street.getId())
// .eq("direction", plcCmdInfo.getFromDirection())
// .eq("side", plcCmdInfo.getFromSeparation())
// .eq("rfid_row", plcCmdInfo.getRow1())
// .eq("rfid_column", plcCmdInfo.getColumn1()));
// if (ToolUtil.isNotEmpty(rfidLive) && ToolUtil.isNotEmpty(rfidLive.getRfidTrayCode()) && rfidLive.getRfidTrayCode().contains(wmsTrayCode)) {
// trayCode = wmsTrayCode;
// trayCheck = Boolean.TRUE;
// log.info("数据库查询rfid", trayCode);
// } else {
// trayCode = "";
// trayCheck = Boolean.FALSE;
// }
// }
if (tags != null && tags.size() > 0 ) {
trayCode = "未盘点";
trayCheck = Boolean.TRUE;
RFID rfid = rfidMapper.selectOne(new QueryWrapper<RFID>().eq("street_id", street.getId()));
if(! rfidLiveService.getRfidLive(plcCmdInfo,street,wmsTrayCode)){

@ -7,14 +7,14 @@ spring:
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 15
password: Leaper@123
password: root
poolPreparedStatements: true
testOnBorrow: true
testOnReturn: false
testWhileIdle: false
timeBetweenEvictionRunsMillis: 60000
type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://192.168.77.91:3306/lia_duoji?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
url: jdbc:mysql://127.0.0.1:3306/lia_duoji?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
username: root
validationQuery: SELECT 1 FROM DUAL
# --------本服务端口号

Loading…
Cancel
Save