diff --git a/src/main/java/com/glxp/api/controller/collect/IoCollectLedGroupController.java b/src/main/java/com/glxp/api/controller/collect/IoCollectLedGroupController.java index 9bfceb7f3..aa5f3a017 100644 --- a/src/main/java/com/glxp/api/controller/collect/IoCollectLedGroupController.java +++ b/src/main/java/com/glxp/api/controller/collect/IoCollectLedGroupController.java @@ -24,6 +24,7 @@ import com.glxp.api.service.collect.IoCollectCodeService; import com.glxp.api.service.collect.IoCollectLedGroupService; import com.glxp.api.service.collect.IoCollectOrderBizService; import com.glxp.api.service.inout.IoSplitCodeService; +import com.glxp.api.util.IntUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PostMapping; @@ -96,6 +97,9 @@ public class IoCollectLedGroupController extends BaseController { bizId = collectLedGroup.getGreen(); collectLedGroup.setGreen(0l); } + if (IntUtil.value(bizId) == 0){ + return ResultVOUtils.error("无订单"); + } ioCollectLedGroupService.updateById(collectLedGroup); IoCollectOrderBiz collectOrderBiz = ioCollectOrderBizService.getById(bizId); splitCodeService.confirmBizAutiTagCode(collectOrderBiz, sysWorkplaceQueue.getCode()); diff --git a/src/main/java/com/glxp/api/service/collect/IoCollectLedGroupService.java b/src/main/java/com/glxp/api/service/collect/IoCollectLedGroupService.java index eeaf918b1..70836c2af 100644 --- a/src/main/java/com/glxp/api/service/collect/IoCollectLedGroupService.java +++ b/src/main/java/com/glxp/api/service/collect/IoCollectLedGroupService.java @@ -1,5 +1,6 @@ package com.glxp.api.service.collect; +import cn.hutool.core.thread.ThreadUtil; import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; @@ -92,6 +93,7 @@ public class IoCollectLedGroupService extends ServiceImpl().eq(UdiRelevanceEntity::getMainId, entity.getThrCode()).last("limit 1")); if (basicUdirelEntity != null) { collectOrderBiz.setRelId(basicUdirelEntity.getId()); - BasicProductsEntity basicProductsEntity = basicProductsDao.selectOne(new LambdaQueryWrapper().eq(BasicProductsEntity::getUuid, basicUdirelEntity.getUuid()).last("limit 1")); + BasicProductsEntity basicProductsEntity = basicProductsDao.selectOne(new LambdaQueryWrapper().eq(BasicProductsEntity::getUuid, basicUdirelEntity.getUuid()).eq(BasicProductsEntity::getPackLevel, "1").last("limit 1")); if (basicProductsEntity == null || StrUtil.isEmpty(basicProductsEntity.getNameCode())) { errorMsg.append(entity.getCpmctymc()).append("字典未对照").append(";"); + } else { + collectOrderBiz.setMeasureUnit(basicProductsEntity.getXjdw()); } } else { errorMsg.append(entity.getCpmctymc()).append("字典未对照").append(";"); diff --git a/src/main/java/com/glxp/api/service/inout/IoSplitCodeService.java b/src/main/java/com/glxp/api/service/inout/IoSplitCodeService.java index 9687ac9d2..8c01e8c80 100644 --- a/src/main/java/com/glxp/api/service/inout/IoSplitCodeService.java +++ b/src/main/java/com/glxp/api/service/inout/IoSplitCodeService.java @@ -1,6 +1,7 @@ package com.glxp.api.service.inout; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -562,7 +563,11 @@ public class IoSplitCodeService extends ServiceImpl { + ioCollectLedGroupService.openLed(collectOrderBizs); + } + ); + collectOrderBizService.updateBatchById(collectOrderBizs); } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 2da350c4d..328c5b9d6 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -4,7 +4,7 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_hlfy_pro?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://192.168.0.43:3306/udi_wms_hlfy_pro?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: 123456 hikari: diff --git a/src/main/resources/mybatis/mapper/collect/IoCollectOrderMapper.xml b/src/main/resources/mybatis/mapper/collect/IoCollectOrderMapper.xml index ba039dc43..a7493232b 100644 --- a/src/main/resources/mybatis/mapper/collect/IoCollectOrderMapper.xml +++ b/src/main/resources/mybatis/mapper/collect/IoCollectOrderMapper.xml @@ -24,7 +24,7 @@ ico.fromCorpName, ico.tagMsg, sys_workplace_document.busName busTypeName, - COALESCE(thr_bustype_origin.name, basic_bussiness_type.name) as actionName, + COALESCE(thr_bustype_origin.name, basic_bussiness_type.name) as actionName, sw.workplaceName, ico.id, ico.orderTime, @@ -177,6 +177,8 @@ TRUNCATE io_collect_order_biz_origin; TRUNCATE io_collect_order_backup; TRUNCATE io_collect_order_biz_backup; + + TRUNCATE io_collect_code_backup; diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index 9969c6716..9ab92944f 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -5079,10 +5079,10 @@ CREATE TABLE IF NOT EXISTS `io_collect_led_group` `id` bigint NOT NULL COMMENT '主键id', `mac` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '标签id', `ledNum` int NULL DEFAULT NULL COMMENT 'led灯编号', - `red` tinyint NULL DEFAULT NULL COMMENT '红灯', - `orange` tinyint NULL DEFAULT NULL COMMENT '橘灯', - `blue` tinyint NULL DEFAULT NULL COMMENT '蓝色', - `green` tinyint NULL DEFAULT NULL COMMENT '绿色', + `red` bigint NULL DEFAULT NULL COMMENT '红灯', + `orange` bigint NULL DEFAULT NULL COMMENT '橘灯', + `blue` bigint NULL DEFAULT NULL COMMENT '蓝色', + `green` bigint NULL DEFAULT NULL COMMENT '绿色', `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', `createTime` datetime NULL DEFAULT NULL, `updateTime` datetime NULL DEFAULT NULL,