|
|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
|