diff --git a/shkj-wms/src/main/java/com/shkj/wms/controller/busin/TaskController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/busin/TaskController.java index fb0fc3d..4ab0bb8 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/busin/TaskController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/busin/TaskController.java @@ -9,6 +9,7 @@ import com.shkj.wms.plc.PlcEventTask; import com.shkj.wms.plc.PlcEventTmpTask; import com.shkj.wms.scheduled.ScheduledTasks; import com.shkj.wms.service.IBusinEnptyContainerService; +import com.sun.org.apache.xpath.internal.operations.Bool; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -38,7 +39,7 @@ public class TaskController extends BaseController { @Log(title = "手动调度任务流程",businessType = BusinessType.UPDATE) @PostMapping("/exeTask") @RepeatSubmit - public Result exeTask(){ + public Result exeTask(){ scheduledTasks.task(); return Result.ok(); } @@ -49,7 +50,7 @@ public class TaskController extends BaseController { @Log(title = "执行PLC相关任务",businessType = BusinessType.UPDATE) @PostMapping("/exePlcTmpTask") @RepeatSubmit - public Result exePlcTmpTask(){ + public Result exePlcTmpTask(){ plcEventTmpTask.init(); return Result.ok(); } @@ -60,7 +61,7 @@ public class TaskController extends BaseController { @Log(title = "执行PLC相关任务",businessType = BusinessType.UPDATE) @PostMapping("/exePlcTask") @RepeatSubmit - public Result exePlcTask(){ + public Result exePlcTask(){ plcEventTask.init(); return Result.ok(); } @@ -71,7 +72,7 @@ public class TaskController extends BaseController { @Log(title = "空治具出库流程",businessType = BusinessType.UPDATE) @PostMapping("/exeEmptyContainerFromWare") @RepeatSubmit - public Result exeEmptyContainerFromWare(){ + public Result exeEmptyContainerFromWare(){ iBusinEnptyContainerService.emptyContainerFromWare(); return Result.ok(); } @@ -82,7 +83,7 @@ public class TaskController extends BaseController { @Log(title = "空治具出库流程",businessType = BusinessType.UPDATE) @PostMapping("/intask") @RepeatSubmit - public Result intask(Long taskId,Long containerId){ + public Result intask(Long taskId,Long containerId){ scheduledTasks.inTask(taskId,containerId); return Result.ok(); } diff --git a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java index e8caa76..9a43d7a 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BaseBarcodesController.java @@ -13,8 +13,12 @@ import com.shkj.wms.service.IBaseBarcodesOutService; import com.shkj.wms.service.IBaseGoodsDataService; import com.shkj.wms.vo.BaseBarcodesOutTaskVo; import com.shkj.wms.vo.BaseBarcodesOutVo; +import com.shkj.wms.vo.BaseContainerVo; import com.shkj.wms.vo.BaseInOutQtyVo; +import com.sun.org.apache.xpath.internal.operations.Bool; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/shkj-wms/src/main/java/com/shkj/wms/controller/report/SysReportStockController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/report/SysReportStockController.java index f104e08..57d1370 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/report/SysReportStockController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/report/SysReportStockController.java @@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import java.util.Comparator; import java.util.List; import java.util.Map; diff --git a/shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java b/shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java index 88cd94a..8a1edc8 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java +++ b/shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java @@ -339,7 +339,7 @@ public class PlcEventTask { String thirdBarcode = pointMap.get(thirdBarAddress).toString().trim(); String containerCode = pointMap.get(containerCodeAddress).toString().trim(); // containerCode=containerCode.substring(0,containerCode.length()-1); - log.info("治具编号"+containerCode); + log.info("治具编号"+containerCode +"first:"+firstBarcode+"second:"+secondBarcode+"third:"+thirdBarcode); //连续读到相同治具编号时不生成新任务 String redisContainerCode = redisTemplate.opsForValue().get("autoTask").toString(); if (redisContainerCode.equals(containerCode)){ @@ -758,7 +758,7 @@ public class PlcEventTask { if(redisTask != null){ return; } - log.error("立库输送线读取的任务号:"+taskId); + log.info("立库输送线读取的任务号:"+taskId); if (taskId!=null&&taskId !=0) { //获取任务信息 BusinDataTask businDataTask = iBusinDataTaskService.getById(taskId); @@ -968,7 +968,7 @@ public class PlcEventTask { //组装线前杠正常放行 if(pointMap.containsKey(frontPoint) && Boolean.valueOf(String.valueOf(pointMap.get(frontPoint)))){ - log.error("组装线前杠正常放行"); + log.info("组装线前杠正常放行"); PlcOperate plcOperate= plcInit.getPlcOperateByIp(baseDevicePlcVo.getPlcIp()); TaskwriteMap.put(frontPointValueType, "False"); taskidMap.put(frontPoint, TaskwriteMap); @@ -980,7 +980,7 @@ public class PlcEventTask { //组装线后杠正常放行 //组装线现分为一个点位,暂时注释,后续打开 if(pointMap.containsKey(afterPoint) && Boolean.valueOf(String.valueOf(pointMap.get(afterPoint)))){ - log.error("组装线后杠正常放行"); + log.info("组装线后杠正常放行"); PlcOperate plcOperate = plcInit.getPlcOperateByIp(baseDevicePlcVo.getPlcIp()); TaskwriteMap.put(afterPointValueType, "False"); taskidMap.put(afterPoint, TaskwriteMap); diff --git a/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java b/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java index 6ddf237..240822f 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java +++ b/shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java @@ -175,7 +175,7 @@ public class ScheduledTasks { } // @PostConstruct - // @Scheduled(cron = "0/3 * * * * ? ") + @Scheduled(cron = "0/3 * * * * ? ") @Transactional(rollbackFor = Exception.class) public void task() { log.info("开始获取需要执行的任务"); @@ -225,6 +225,9 @@ public class ScheduledTasks { taskQueryBo.setTaskType("19"); List businDataTaskVo19 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo); businDataTaskVos.addAll(businDataTaskVo19); + taskQueryBo.setTaskType("21"); + List businDataTaskVo21 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo); + businDataTaskVos.addAll(businDataTaskVo21); for (BusinDataTaskVo businDataTaskVo : businDataTaskVos) { String taskType = businDataTaskVo.getTaskType(); @@ -917,19 +920,8 @@ public class ScheduledTasks { basePointDeviceVo = baseLocationPlcMapper.selectBasePointByGroupno(pointQueryBo).get(1); } } else { - Result baseLocationVoResult = iBaseLocationService.queryById(businDataTaskVo.getLocationId()); - List businDataTaskGoodsVos = iBusinDataTaskGoodsService.selectBusinTaskGoodsByTaskCode(businDataTaskVo.getId()); - BusinTaskExeBo exeBo = new BusinTaskExeBo(); - exeBo.setTaskCode(taskId); - exeBo.setBusinDataTaskGoodsVo(businDataTaskGoodsVos); - exeBo.setContainerId(containerId); - exeBo.setBaseLocationVo(baseLocationVoResult.getData()); - exeBo.setTransNo("1"); - exeBo.setTransQual("1"); - iPutInOutStorageService.exeTaskPutinStorage(exeBo); - NUMBER = false; //先入待冲孔区 Long punchingArea = Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.punching_area)); @@ -944,6 +936,16 @@ public class ScheduledTasks { //获取货位及巷道; String tunnel = locationVo.getTunnel(); businDataTaskVo.setTunnel(tunnel); +// Result baseLocationVoResult = iBaseLocationService.queryById(locationVo.getId()); + List businDataTaskGoodsVos = iBusinDataTaskGoodsService.selectBusinTaskGoodsByTaskCode(businDataTaskVo.getId()); + BusinTaskExeBo exeBo = new BusinTaskExeBo(); + exeBo.setTaskCode(taskId); + exeBo.setBusinDataTaskGoodsVo(businDataTaskGoodsVos); + exeBo.setContainerId(containerId); + exeBo.setBaseLocationVo(locationVo); + exeBo.setTransNo("1"); + exeBo.setTransQual("1"); + iPutInOutStorageService.exeTaskPutinStorage(exeBo); //获取巷道对应的立库输送线接驳口 pointQueryBo.setTunnel(tunnel); pointQueryBo.setDirection("0"); @@ -1076,6 +1078,7 @@ public class ScheduledTasks { List list = iSysStockDetailService.list(new LambdaQueryWrapper() .in(SysStockDetail::getGoodsNo, goodsno) .eq(SysStockDetail::getQty, "1") + .ne(SysStockDetail::getOutQty ,"1" ) .isNotNull(SysStockDetail::getLocationId)); //查询库存并返回库位信息 BusinTaskExeBo businTaskExeBo = iBusinDataTaskService.outboundInfo(businDataTaskGoodsVos, String.valueOf(businDataTaskVo.getId())); @@ -1083,9 +1086,11 @@ public class ScheduledTasks { if (ObjectUtils.isNotEmpty(list)) { BusinDataTask businDataTask = iBusinDataTaskService.getById(businDataTaskVo.getId()); if (ObjectUtils.isNotEmpty(businDataTask) && ObjectUtils.isNotEmpty(businDataTask.getFromLayer())) { - ////生成出库单 - Result billResult = iPutInOutStorageService.exeTaskPutinStorage(businTaskExeBo); - businDataTask.setTransId(billResult.getData()); + if (ObjectUtils.isNotEmpty(businTaskExeBo)){ + ////生成出库单 + Result billResult = iPutInOutStorageService.exeTaskPutinStorage(businTaskExeBo); + businDataTask.setTransId(billResult.getData()); + } //添加货位预占和库存预占 //获取货位信息 BaseLocation location = iBaseLocationService.getById(businDataTask.getLocationId()); @@ -1133,6 +1138,9 @@ public class ScheduledTasks { businDataTask.setDistinction(businDataTaskVo.getDistinction()); iBusinDataTaskService.saveOrUpdate(businDataTask); businDataTaskVo = BeanUtil.toBean(businDataTask, BusinDataTaskVo.class); + }else { + businDataTaskVo.setExceptionMsg("当前开放的货位已无当前库存"); + businDataTaskVo.setTaskStatus("-3"); } }else { @@ -1384,6 +1392,36 @@ public class ScheduledTasks { } else if(taskType.equals(TaskTypeEnum.punching_delivery.getValue())){ + + } + else if(taskType.equals(TaskTypeEnum.replenished_in.getValue())){ + String agvno = null; + if (businDataTaskVo.getTaskPath().contains("manMade")) { + List agvtaskType=new ArrayList(); + agvtaskType.add("15"); + agvtaskType.add("12"); + BusinDataTask manMade01 = iBusinDataTaskService.getOne(new LambdaQueryWrapper() + .in(BusinDataTask::getTaskType, agvtaskType) + .eq(BusinDataTask::getContainerId, businDataTaskVo.getContainerId()) + .eq(BusinDataTask::getTaskStatus, "2") + .orderByDesc(BusinDataTask::getId) + .last("limit 1")); + if (ObjectUtils.isNotEmpty(manMade01)) { + agvno = manMade01.getAgvNo(); + } + } else if (businDataTaskVo.getTaskPath().contains("Artificial")) { + String idArr = redisTemplate.opsForValue().get(RedisConstant.Replenishment).toString(); + String[] idArrs = idArr.split("_"); + agvno = idArrs[1]; + } + + List goodsVos = iBusinDataTaskGoodsService.selectBusinTaskGoodsByTaskCode(taskId); + List goodsNoStr = goodsVos.stream().map(e -> e.getGoodsNo()).collect(Collectors.toList()); + + iBusinDataTaskService.runReplenishIn(businDataTaskVo,agvno); + Result booleanResult = iPutInOutStorageService.reduceInventory(taskId,goodsNoStr); + } + else if (taskType.equals("21")){ // 冲孔出库 //待冲孔区货位 Long abnormalArea =Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.punching_area)); @@ -1472,7 +1510,7 @@ public class ScheduledTasks { //拿到库存里的治具编号(不分体的每个保险杠在一个货位一个任务,分体的只有一个任务一个货位所以只随机拿到一个库存信息的治具号就可以) businDataTaskVo.setContainerId(sysStockDetailList.get(0).getContainerCode()); - Result taskResult1 = outTask(businDataTaskVo); + Result taskResult1 = outTask(businDataTaskVo); if (taskResult1.getCode() == HttpStatus.SUCCESS.getCode()) { businDataTaskVo.setTaskStatus(TaskStatusEnum.wait_callback.getValue()); //生成出库单 @@ -1507,33 +1545,6 @@ public class ScheduledTasks { businDataTaskVo.setTaskStatus("-3"); } } - else if(taskType.equals(TaskTypeEnum.replenished_in.getValue())){ - String agvno = null; - if (businDataTaskVo.getTaskPath().contains("manMade")) { - List agvtaskType=new ArrayList(); - agvtaskType.add("15"); - agvtaskType.add("12"); - BusinDataTask manMade01 = iBusinDataTaskService.getOne(new LambdaQueryWrapper() - .in(BusinDataTask::getTaskType, agvtaskType) - .eq(BusinDataTask::getContainerId, businDataTaskVo.getContainerId()) - .eq(BusinDataTask::getTaskStatus, "2") - .orderByDesc(BusinDataTask::getId) - .last("limit 1")); - if (ObjectUtils.isNotEmpty(manMade01)) { - agvno = manMade01.getAgvNo(); - } - } else if (businDataTaskVo.getTaskPath().contains("Artificial")) { - String idArr = redisTemplate.opsForValue().get(RedisConstant.Replenishment).toString(); - String[] idArrs = idArr.split("_"); - agvno = idArrs[1]; - } - - List goodsVos = iBusinDataTaskGoodsService.selectBusinTaskGoodsByTaskCode(taskId); - List goodsNoStr = goodsVos.stream().map(e -> e.getGoodsNo()).collect(Collectors.toList()); - - iBusinDataTaskService.runReplenishIn(businDataTaskVo,agvno); - Result booleanResult = iPutInOutStorageService.reduceInventory(taskId,goodsNoStr); - } //统一提交任务数据 iBusinDataTaskService.saveOrUpdate(BeanUtil.toBean(businDataTaskVo, BusinDataTask.class)); } @@ -1823,7 +1834,7 @@ public class ScheduledTasks { int randomoperands = (int) Math.round(Math.random() * 1000); String taskCode = "T_" + DateUtils.dateTimeNow() + randomoperands; task.setTaskCode(taskCode); - task.setTaskType("4"); + task.setTaskType("21"); task.setBatch(DateUtils.getDate()); task.setPriority("2"); task.setIsTop("0"); diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java b/shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java index 7dbe14d..c262ad1 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/IBusinDataTaskService.java @@ -155,7 +155,7 @@ public interface IBusinDataTaskService extends IService { /** * 可视化大屏统计出入任务数量 - * @param + * @param bo * @return */ List getCurDateTaskQty(); diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java index 46cec94..9f5fe38 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java @@ -719,7 +719,7 @@ public class BaseLocationServiceImpl extends ServiceImpl 0) { diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java index 43de60a..d6beb4f 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinDataTaskServiceImpl.java @@ -217,8 +217,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl dbTableColumnNames = pointDeviceout.stream().map(BasePointDeviceVo::getPointNo).collect(Collectors.toList()); String urgencyBefore = null; String urgencyAfter = null; - for (String str : dbTableColumnNames) { + for (String str : dbTableColumnNames + ) { // TODO 中科 测试 需要还原 if (str.equals(ParameterConstants.ParameterSystem.assemble_point_after)) { urgencyAfter = str; @@ -731,12 +731,12 @@ public class BusinDataTaskServiceImpl extends ServiceImpl tunnelVo = baseLocationService.getTUunnel(good.getGoodsNo()); //log.info("查询到的保险杠所在的货位信息:"+JsonUtil.toJSONString(tunnelVo)); List tunnelall = tunnelVo.stream().map(e -> e.getTunnel()).collect(Collectors.toList()); - log.info("查询到保险杠所在的巷道:"+JsonUtil.toJSONString(tunnelall)); + // log.info("查询到保险杠所在的巷道:"+JsonUtil.toJSONString(tunnelall)); //拿到任务数最少的巷道 String tunnelone=this.quickSort(tunnelall); log.info("任务数最少的巷道:"+tunnelone); List tunnelLocation = tunnelVo.stream().filter(e -> e.getTunnel().equals(tunnelone)).collect(Collectors.toList()); - log.info("当前巷道的有库存的货位信息:"+JsonUtil.toJSONString(tunnelLocation)); + // log.info("当前巷道的有库存的货位信息:"+JsonUtil.toJSONString(tunnelLocation)); List listlocationId=new ArrayList<>(); //生成出库明细 BusinTaskExeBo exeBo = new BusinTaskExeBo(); @@ -935,18 +935,22 @@ public class BusinDataTaskServiceImpl extends ServiceImpl tunnelVo = baseLocationService.getTUunnel(good.getGoodsNo()); + if (tunnelVo !=null && tunnelVo.size()==0){ + log.info("要出库的保险杠编号:"+good.getGoodsNo()); + return null; + } Map tunnelLocQtyDic = tunnelVo.stream().collect(Collectors.groupingBy(BaseLocationVo::getTunnel, Collectors.counting())); //排序后的巷道货位数(降序) Map tunnelLocQtyDicSort = new LinkedHashMap<>(); tunnelLocQtyDic.entrySet().stream().sorted(Map.Entry.comparingByValue().reversed()).forEachOrdered(e -> tunnelLocQtyDicSort.put(e.getKey(), e.getValue().intValue())); //log.info("查询到的保险杠所在的货位信息:"+JsonUtil.toJSONString(tunnelVo)); List tunnelall = tunnelVo.stream().map(e -> e.getTunnel()).collect(Collectors.toList()); - log.info("查询到保险杠所在的巷道:"+JsonUtil.toJSONString(tunnelall)); + // log.info("查询到保险杠所在的巷道:"+JsonUtil.toJSONString(tunnelall)); //拿到任务数最少的巷道并且库存量是最大的 String tunnelone=this.quickSortTaskQty(tunnelLocQtyDicSort); log.info("任务数最少的巷道:"+tunnelone); List tunnelLocation = tunnelVo.stream().filter(e -> e.getTunnel().equals(tunnelone)).collect(Collectors.toList()); - log.info("当前巷道的有库存的货位信息:"+JsonUtil.toJSONString(tunnelLocation)); + //log.info("当前巷道的有库存的货位信息:"+JsonUtil.toJSONString(tunnelLocation)); List listlocationId=new ArrayList<>(); //生成出库明细 BusinTaskExeBo exeBo = new BusinTaskExeBo(); diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinPickupServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinPickupServiceImpl.java index 4c55ada..304f5e1 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinPickupServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/BusinPickupServiceImpl.java @@ -179,7 +179,7 @@ public class BusinPickupServiceImpl extends ServiceImpl baseLocationVos = baseLocationMapper.getLocationByAreaId(abnormalArea); if(baseLocationVos.size()<=0){ diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/WcsDeviceServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/WcsDeviceServiceImpl.java index a337bdf..16134fd 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/WcsDeviceServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/WcsDeviceServiceImpl.java @@ -21,7 +21,7 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Set; -import java.util.stream.Stream; +import java.util.stream.Collectors; /** * 设备管理Service业务层处理 @@ -133,16 +133,17 @@ public class WcsDeviceServiceImpl extends ServiceImpl collect = businPlcStatuses.stream().sorted(Comparator.comparing(BusinPlcStatus::getTunnel)).collect(Collectors.toList()); + return collect; } @Override public List getAGVRealStatesInfo() { List list =(List)redisTemplate.opsForValue().get(RedisConstant.redisAgvRealInfo ); - list.stream().sorted(Comparator.comparing(BusinAgvRealRedisInfo::getId)); - return list; + List collect = list.stream().sorted(Comparator.comparing(BusinAgvRealRedisInfo::getId)).collect(Collectors.toList()); + return collect; } + } diff --git a/shkj-wms/src/main/java/com/shkj/wms/third/rcs/RCSUtil.java b/shkj-wms/src/main/java/com/shkj/wms/third/rcs/RCSUtil.java index 19c4991..f6a0ebc 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/third/rcs/RCSUtil.java +++ b/shkj-wms/src/main/java/com/shkj/wms/third/rcs/RCSUtil.java @@ -569,7 +569,7 @@ public class RCSUtil { if(StringUtils.isNotEmpty(points)){ agvMap = JsonUtil.JsonStrToMap(points); } - log.error("AGV的点位信息:"+agvMap.toString()); + log.info("AGV的点位信息:"+agvMap.toString()); WcsPlcConnect conn = iWcsPlcConnectService.selectWcsPlcConnectById(plcId); diff --git a/shkj-wms/src/main/java/com/shkj/wms/utils/PdfConvertHtmlUtil.java b/shkj-wms/src/main/java/com/shkj/wms/utils/PdfConvertHtmlUtil.java index c03dce4..23d28ab 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/utils/PdfConvertHtmlUtil.java +++ b/shkj-wms/src/main/java/com/shkj/wms/utils/PdfConvertHtmlUtil.java @@ -4,6 +4,7 @@ import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.rendering.PDFRenderer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import sun.misc.BASE64Encoder; import javax.imageio.ImageIO; import java.awt.*; @@ -148,7 +149,7 @@ public class PdfConvertHtmlUtil { public static String bufferedImageToBase64(BufferedImage bufferedImage) { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); String png_base64 = ""; - /* try { + try { ImageIO.write(bufferedImage, "png", byteArrayOutputStream);// 写入流中 byte[] bytes = byteArrayOutputStream.toByteArray();// 转换成字节 BASE64Encoder encoder = new BASE64Encoder(); @@ -158,7 +159,7 @@ public class PdfConvertHtmlUtil { .replaceAll("\r", ""); } catch (IOException e) { e.printStackTrace(); - }*/ + } return png_base64; } diff --git a/shkj-wms/src/main/resources/mapper/wms/BaseBarcodesOutMapper.xml b/shkj-wms/src/main/resources/mapper/wms/BaseBarcodesOutMapper.xml index b01fc49..da29e1b 100644 --- a/shkj-wms/src/main/resources/mapper/wms/BaseBarcodesOutMapper.xml +++ b/shkj-wms/src/main/resources/mapper/wms/BaseBarcodesOutMapper.xml @@ -187,7 +187,7 @@ LEFT JOIN base_branch bb ON bdr.branch_id = bb.id LEFT JOIN busin_data_task bdt ON bdr.task_code = bdt.id LEFT JOIN base_container bc ON bdr.container_id = bc.id - where bdr.is_state != 1 and date_format(bdr.create_time,'%Y-%m-%d') >=CURDATE() + where bdr.is_state != 1 and date_format(bdr.create_time,'%Y-%m-%d') >=CURDATE() order by bdr.id desc,bp.point_name desc diff --git a/shkj-wms/src/main/resources/mapper/wms/SysStockMapper.xml b/shkj-wms/src/main/resources/mapper/wms/SysStockMapper.xml index c23f5cc..7cac5a0 100644 --- a/shkj-wms/src/main/resources/mapper/wms/SysStockMapper.xml +++ b/shkj-wms/src/main/resources/mapper/wms/SysStockMapper.xml @@ -131,7 +131,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"