如果盘点出现已经出现过的,则直接跳过

除去每次新建restTemplate
bozhou-古井贡酒
LAPTOP-S9HJSOEB\昊天 10 months ago
parent f25546edab
commit 5ed8998980

@ -75,6 +75,7 @@ public class OrderController {
public ResultResp<List<KsecDataInfo>> orderDecoder(@ApiParam("工单信息") @RequestBody KsecInfos ksecInfos){
List<KsecInfo> dataInfos = KsecInfos.getList(ksecInfos);
List<KsecDataInfo> ksecDataInfos = new ArrayList<>();
log.info("解析工单信息:"+ksecInfos.toString());
for (KsecInfo ksecInfo :dataInfos) {
KsecDataInfo ksecDataInfo ;

@ -79,4 +79,7 @@ public class CheckLog {
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
Integer wmsCount;
String wmsCategory;
}

@ -680,11 +680,29 @@ public class PlcService {
long startTime = System.currentTimeMillis();
Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId());
if (checkLogMapper.selectCount(new QueryWrapper<CheckLog>()
.eq("street_Id",street.getId())
.eq("check_Num",plcCmdInfo.getOrderNum()))>0){
log.error("库存信息已经盘点");
CheckLog checkLog = checkLogMapper.selectOne(new QueryWrapper<CheckLog>()
.eq("street_Id",street.getId())
.eq("check_Num",plcCmdInfo.getOrderNum()));
AlgorithmPojo pojo = AlgorithmPojo.buildAlgorithmPojo(street, dataInfo);
if (checkLog.getWmsCategory() != null)
pojo.setGoodsType(checkLog.getWmsCategory());
if (checkLog.getWmsCount() != null)
pojo.setGoodsNumber(checkLog.getWmsCount());
if (checkLog.getCategory() != null)
pojo.setGoodsTypeResult(checkLog.getCategory());
if (checkLog.getCount() != null)
pojo.setGoodsNumberResult(checkLog.getCount());
return pojo;
}
//打开光源
streetController.openStreetLightSource( street.getId());
CronTab.putTime(street.getId());
plcCmdInfo.setStreetName(street.getName());
List<LightSource> lightSources = lightSourceMapper.selectList(new QueryWrapper<LightSource>().eq("street_id", street.getId()));
// List<LightSource> lightSources = lightSourceMapper.selectList(new QueryWrapper<LightSource>().eq("street_id", street.getId()));
//关闭光源
streetController.openStreetLightSource(street.getId());
@ -792,6 +810,11 @@ public class PlcService {
checkLog.setTrayCode(stock.getTrayCode());
checkLog.setPreoperationPic(stock.getPreoperationPic());
checkLog.setWmsTrayCode(stock.getWmsTrayCode());
checkLog.setCount(stock.getCount());
checkLog.setCategory(stock.getCategory());
checkLog.setWmsCount(stock.getWmsCount());
checkLog.setWmsCategory(stock.getWmsCategory());
checkLog.setLotnum(stock.getLotnum());
checkLogMapper.insert(checkLog);
}

@ -107,7 +107,7 @@ public class AlgorithmService {
public AlgorithmPojo getGoodResult(AlgorithmPojo algorithmPojo) {
String url = "http://"+algorithmPojo.getIp()+":"+algorithmPojo.getPort()+configProperties.getVisualSense().getUrl();
restTemplate = new RestTemplate();
// restTemplate = new RestTemplate();

Loading…
Cancel
Save