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 a64d687..ae22872 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,12 +13,8 @@ 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/business/BusinBillInController.java b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinBillInController.java index 1b4b301..bb3fe66 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinBillInController.java +++ b/shkj-wms/src/main/java/com/shkj/wms/controller/business/BusinBillInController.java @@ -71,6 +71,7 @@ public class BusinBillInController extends BaseController { @PostMapping("/saveBillTaskIn") @RepeatSubmit public Result saveBillTaskIn(@Valid @RequestBody BillTaskAddbo billTaskAddbo){ + logger.info("人工入库信息:"+JsonUtil.toJSONString(billTaskAddbo)); if (billTaskAddbo.getContainerCode() == null){ if (billTaskAddbo.getContainerCodes() == null){ return Result.err().msg("无此治具号的容器"); 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 2cf8c90..af6cab9 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 @@ -33,7 +33,6 @@ import com.shkj.wms.service.IBaseGoodsDataService; import com.shkj.wms.service.IBusinDataTaskService; import com.shkj.wms.service.IPutInOutStorageService; import com.shkj.wms.utils.JsonUtil; -import com.sun.xml.internal.bind.v2.TODO; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; 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 34170e6..7a89bfd 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 @@ -387,6 +387,7 @@ public class ScheduledTasks { businDataTaskVo.setToLayer(locationVo.getLayer()); businDataTaskVo.setToRow(locationVo.getLocationRow()); businDataTaskVo.setTunnel(tunnel); + businDataTaskVo.setLocationId(locationVo.getId()); //获取货位对应的巷道及巷道对应的设备信息 pointQueryBo.setTunnel(tunnel); pointQueryBo.setDirection("0"); @@ -957,6 +958,7 @@ public class ScheduledTasks { //获取货位及巷道; String tunnel = locationVo.getTunnel(); businDataTaskVo.setTunnel(tunnel); + businDataTaskVo.setLocationId(locationVo.getId()); // Result baseLocationVoResult = iBaseLocationService.queryById(locationVo.getId()); List businDataTaskGoodsVos = iBusinDataTaskGoodsService.selectBusinTaskGoodsByTaskCode(businDataTaskVo.getId()); BusinTaskExeBo exeBo = new BusinTaskExeBo(); 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 e5c4743..a0979ad 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 @@ -1932,6 +1932,9 @@ public class BusinDataTaskServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper() .notIn(BusinDataTask::getTaskStatus, Arrays.asList("2", "3")) diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/IBusinContainerUpkeepServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/IBusinContainerUpkeepServiceImpl.java index 0e65393..df7b084 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/IBusinContainerUpkeepServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/IBusinContainerUpkeepServiceImpl.java @@ -10,6 +10,7 @@ import com.shkj.common.utils.DateUtils; import com.shkj.common.utils.SecurityUtils; import com.shkj.common.utils.StringUtils; import com.shkj.system.service.ISysParameterService; +import com.shkj.wms.bo.AssingEmptyLocBo; import com.shkj.wms.bo.BasePointDeviceQueryBo; import com.shkj.wms.domain.*; import com.shkj.wms.enums.TaskStatusEnum; @@ -75,6 +76,9 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl getContainerUpkeepDate(BusinContainerUpkeepQueryBo bo) { //治具保养周期 @@ -90,6 +94,8 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl saveBusintContainerUpkeepEnd(BusinContainerUpkeepAddBo bo) { + log.info("治具入库参数:"+JsonUtil.toJSONString(bo)); + //更新保养的记录,新增 BusinContainerUpkeep businContainerUpkeep = this.baseMapper.selectById(bo.getId()); if(businContainerUpkeep != null){ @@ -134,12 +140,27 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo); + + if (!Result.isOk(locationVoResult)){ return Result.err().msg("暂无空治具存放区域"); } - BasePointDeviceVo pointDeviceVo = BeanUtil.toBean(map.get("basePointDeviceVo"),BasePointDeviceVo.class); - BaseLocationVo locationVo = BeanUtil.toBean(map.get("locationVo"), BaseLocationVo.class); + + BasePointDeviceVo pointDeviceVo = null; + BaseLocationVo locationVo =locationVoResult.getData(); + + BasePointDeviceQueryBo pointDeviceQueryBo = new BasePointDeviceQueryBo(); + pointDeviceQueryBo.setTunnel(locationVo.getTunnel()); + pointDeviceQueryBo.setDirection("0"); + List basePointDeviceVos = baseLocationPlcMapper.selectBasePointByGroupno(pointDeviceQueryBo); + + if (basePointDeviceVos.size() > 0) { + pointDeviceVo = basePointDeviceVos.get(0); + } + String agvType= String.valueOf(RCSTaskTypeEnum.A_TO_B_HAND_PUT.getValue()); String toPpoint = pointDeviceVo.getPointNo(); Long dspPlcId =Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.LK_plc_id)); @@ -223,12 +244,12 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo); @@ -688,7 +689,7 @@ public class IBusinEnptyContainerServiceImpl extends ServiceImpl baseLocationVos = baseLocationMapper.queryBaseLocationListByDerive1(bo); log.info("如果查询到的是单深位,查找到的双深位货位:"+JsonUtil.toJSONString(baseLocationVos)); if (baseLocationVos.size() > 0) { diff --git a/shkj-wms/src/main/java/com/shkj/wms/service/impl/PutInOutStorageServiceImpl.java b/shkj-wms/src/main/java/com/shkj/wms/service/impl/PutInOutStorageServiceImpl.java index 77a4450..b1d04af 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/service/impl/PutInOutStorageServiceImpl.java +++ b/shkj-wms/src/main/java/com/shkj/wms/service/impl/PutInOutStorageServiceImpl.java @@ -443,12 +443,25 @@ public class PutInOutStorageServiceImpl extends ServiceImpl locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo); + + if (!Result.isOk(locationVoResult)){ return Result.err().msg("暂无空治具存放区域"); } - pointDeviceVo = BeanUtil.toBean(map.get("basePointDeviceVo"),BasePointDeviceVo.class); - locationVo = BeanUtil.toBean(map.get("locationVo"),BaseLocationVo.class); + + locationVo =locationVoResult.getData(); + + BasePointDeviceQueryBo pointDeviceQueryBo = new BasePointDeviceQueryBo(); + pointDeviceQueryBo.setTunnel(locationVo.getTunnel()); + pointDeviceQueryBo.setDirection("0"); + List basePointDeviceVos = baseLocationPlcMapper.selectBasePointByGroupno(pointDeviceQueryBo); + + if (basePointDeviceVos.size() > 0) { + pointDeviceVo = basePointDeviceVos.get(0); + } + agvType= String.valueOf(RCSTaskTypeEnum.A_TO_B_HAND_PUT.getValue()); toPpoint = pointDeviceVo.getPointNo(); dspPlcId=Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.LK_plc_id)); 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 23d28ab..0f0e801 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,7 +4,6 @@ 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.*; @@ -147,7 +146,7 @@ public class PdfConvertHtmlUtil { * @return */ public static String bufferedImageToBase64(BufferedImage bufferedImage) { - ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + /* ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); String png_base64 = ""; try { ImageIO.write(bufferedImage, "png", byteArrayOutputStream);// 写入流中 @@ -160,7 +159,8 @@ public class PdfConvertHtmlUtil { } catch (IOException e) { e.printStackTrace(); } - return png_base64; + return png_base64;*/ + return null; } diff --git a/shkj-wms/src/main/java/com/shkj/wms/vo/SysStockVCLocationVo.java b/shkj-wms/src/main/java/com/shkj/wms/vo/SysStockVCLocationVo.java index 97ea663..486ee0b 100644 --- a/shkj-wms/src/main/java/com/shkj/wms/vo/SysStockVCLocationVo.java +++ b/shkj-wms/src/main/java/com/shkj/wms/vo/SysStockVCLocationVo.java @@ -45,5 +45,11 @@ public class SysStockVCLocationVo { */ private Integer emptyLocQty; + /** + * 空托数量 + */ + + private Integer emptyConQty; + } diff --git a/shkj-wms/src/main/resources/mapper/wms/BusinContainerUpkeepMapper.xml b/shkj-wms/src/main/resources/mapper/wms/BusinContainerUpkeepMapper.xml index 4ead2e2..bb127d6 100644 --- a/shkj-wms/src/main/resources/mapper/wms/BusinContainerUpkeepMapper.xml +++ b/shkj-wms/src/main/resources/mapper/wms/BusinContainerUpkeepMapper.xml @@ -25,5 +25,6 @@ and conttainer.branch_id = #{branchId} + limit 1 diff --git a/shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml b/shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml index 29e6703..8fdcade 100644 --- a/shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml +++ b/shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml @@ -236,11 +236,11 @@ task left join (select task_code,min(goods_no) goods_no from busin_data_task_goods where 1=1 - and create_time>=#{createTimeS} + and DATE_FORMAT(create_time,'%Y-%m-%d')>=#{createTimeS} - and create_time <=#{createTimeE} + and DATE_FORMAT(create_time,'%Y-%m-%d') <=#{createTimeE} group by task_code) taskGoods on task.id=taskGoods.task_code @@ -249,11 +249,11 @@ - and task.create_time>=#{createTimeS} + and DATE_FORMAT(task.create_time,'%Y-%m-%d')>=#{createTimeS} - and task.create_time <=#{createTimeE} + and DATE_FORMAT(task.create_time,'%Y-%m-%d') <=#{createTimeE} diff --git a/shkj-wms/src/main/resources/mapper/wms/SysStockMapper.xml b/shkj-wms/src/main/resources/mapper/wms/SysStockMapper.xml index 9f974e2..8f152e4 100644 --- a/shkj-wms/src/main/resources/mapper/wms/SysStockMapper.xml +++ b/shkj-wms/src/main/resources/mapper/wms/SysStockMapper.xml @@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"