diff --git a/src/main/java/com/glxp/api/controller/auth/InvBusUserController.java b/src/main/java/com/glxp/api/controller/auth/InvBusUserController.java index 880df60b7..e228d40fc 100644 --- a/src/main/java/com/glxp/api/controller/auth/InvBusUserController.java +++ b/src/main/java/com/glxp/api/controller/auth/InvBusUserController.java @@ -1,6 +1,7 @@ package com.glxp.api.controller.auth; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.IdUtil; import com.github.pagehelper.PageInfo; import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.common.enums.ResultEnum; @@ -129,12 +130,15 @@ public class InvBusUserController { public BaseResponse postRes(@RequestBody UpdateUserRelBusRequset relBusRequset) { boolean b = invBusUserService.deleteByUnion(relBusRequset.getUserId(), relBusRequset.getSubInvCode()); if (CollUtil.isNotEmpty(relBusRequset.getSelectActions())) { + + invBusUserService.deleteByUnion(relBusRequset.getUserId(), relBusRequset.getSubInvCode()); relBusRequset.getSelectActions().forEach(action -> { InvBusUserEntity invBusUserEntity = new InvBusUserEntity(); invBusUserEntity.setUserId(relBusRequset.getUserId()); invBusUserEntity.setSubInvCode(relBusRequset.getSubInvCode()); invBusUserEntity.setScAction(action); +// invBusUserEntity.setId(IdUtil.getSnowflakeNextId()); invBusUserService.insertInvBusUser(invBusUserEntity); }); } diff --git a/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java b/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java index 624c19a0c..4d983b6cd 100644 --- a/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java +++ b/src/main/java/com/glxp/api/controller/auth/InvWarehouseController.java @@ -131,7 +131,7 @@ public class InvWarehouseController extends BaseController { return ResultVOUtils.error(500, "当前仓库不能为空!"); } FilterInvSubWarehouseRequest filterInvSubWarehouseRequest = new FilterInvSubWarehouseRequest(); - if(filterInvWarehouseRequest.getType()==null){ + if (filterInvWarehouseRequest.getType() == null) { filterInvSubWarehouseRequest.setAdvanceType(1); } List invWarehouseEntities = invWarehouseService.filterInvSubWarehouse(filterInvSubWarehouseRequest); @@ -279,7 +279,6 @@ public class InvWarehouseController extends BaseController { } - //更新仓库信息 invWarehouseEntity.setUpdateTime(new Date()); boolean b = invWarehouseService.updateInvSubWarehouse(invWarehouseEntity); @@ -355,7 +354,7 @@ public class InvWarehouseController extends BaseController { // 判断此分库中是否还有库存 InvWarehouseEntity byWareId = invWarehouseService.getByWareId(deleteRequest.getId()); List byWarePcode = invWarehouseService.getByWarePcode(byWareId.getCode()); - if( byWarePcode.size()>0){ + if (byWarePcode.size() > 0) { return ResultVOUtils.error(500, "此仓库下存在仓库无法删除!"); } diff --git a/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java b/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java index 298178a5f..c01297e5b 100644 --- a/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java +++ b/src/main/java/com/glxp/api/dao/auth/WarehouseBussinessTypeDao.java @@ -9,13 +9,10 @@ import org.apache.ibatis.annotations.Param; import java.util.List; @Mapper -public interface WarehouseBussinessTypeDao extends BaseMapperPlus { - WarehouseBussinessTypeEntity selectById(Integer id); +public interface WarehouseBussinessTypeDao extends BaseMapperPlus { int deleteByPrimaryKey(Integer id); - int insert(WarehouseBussinessTypeEntity record); - int insertOrUpdateEntity(WarehouseBussinessTypeEntity record); int insertOrUpdateSelective(WarehouseBussinessTypeEntity record); @@ -32,7 +29,6 @@ public interface WarehouseBussinessTypeDao extends BaseMapperPlus list); - int batchInsert(@Param("list") List list); List selectListByCode(@Param("code") String code); @@ -48,4 +44,4 @@ public interface WarehouseBussinessTypeDao extends BaseMapperPlus selectByActions(@Param("subInvCode") String subInvCode, @Param("actions") List actions); -} \ No newline at end of file +} diff --git a/src/main/java/com/glxp/api/entity/auth/InvBusUserEntity.java b/src/main/java/com/glxp/api/entity/auth/InvBusUserEntity.java index 273dc1677..bc6763a5b 100644 --- a/src/main/java/com/glxp/api/entity/auth/InvBusUserEntity.java +++ b/src/main/java/com/glxp/api/entity/auth/InvBusUserEntity.java @@ -12,7 +12,7 @@ import java.util.Date; @Data @TableName(value = "auth_user_bustype") public class InvBusUserEntity { - @TableId(value = "id", type = IdType.INPUT) + @TableId(value = "id", type = IdType.AUTO) private Long id; @TableField(value = "userId") private String userId; diff --git a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java index d52c9d87c..a288d1b72 100644 --- a/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java +++ b/src/main/java/com/glxp/api/entity/inout/IoOrderEntity.java @@ -246,6 +246,11 @@ public class IoOrderEntity { @TableField(value = "checkPreInOrders") private String checkPreInOrders; + + // 预验收按货位出库,退货 + @TableField(value = "checkPreInInvCode") + private String checkPreInInvCode; + // 预验收按货位出库,退货 @TableField(value = "checkPreInSpaceCode") private String checkPreInSpaceCode; diff --git a/src/main/java/com/glxp/api/res/basic/BasicBussinessTypeResponse.java b/src/main/java/com/glxp/api/res/basic/BasicBussinessTypeResponse.java index 44b1fad8a..11e0c7fee 100644 --- a/src/main/java/com/glxp/api/res/basic/BasicBussinessTypeResponse.java +++ b/src/main/java/com/glxp/api/res/basic/BasicBussinessTypeResponse.java @@ -12,7 +12,7 @@ public class BasicBussinessTypeResponse { /** * 单据类型ID */ - private Integer id; + private Long id; /** * 单据类型编码 diff --git a/src/main/java/com/glxp/api/service/auth/impl/WarehouseBussinessTypeServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/WarehouseBussinessTypeServiceImpl.java index e79f2dc24..3a7ad4681 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/WarehouseBussinessTypeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/WarehouseBussinessTypeServiceImpl.java @@ -1,6 +1,7 @@ package com.glxp.api.service.auth.impl; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.IdUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.github.pagehelper.PageHelper; import com.glxp.api.dao.auth.WarehouseBussinessTypeDao; @@ -21,7 +22,7 @@ import java.util.List; @Slf4j @Service @Transactional(rollbackFor = Exception.class) -public class WarehouseBussinessTypeServiceImpl extends ServiceImpl implements WarehouseBussinessTypeService { +public class WarehouseBussinessTypeServiceImpl extends ServiceImpl implements WarehouseBussinessTypeService { @Resource private WarehouseBussinessTypeDao warehouseBussinessTypeDao; @@ -64,11 +65,11 @@ public class WarehouseBussinessTypeServiceImpl extends ServiceImpl().eq(basicBussinessTypeEntity.getId() != null, "id", basicBussinessTypeEntity.getId())); + if (null == basicBussinessTypeEntity.getId() || !isExit) { //处理添加新单据类型时的平衡补单逻辑 if (StrUtil.isNotBlank(basicBussinessTypeEntity.getSupplementOrderType())) { //查询平衡补单的单据类型数据是否存在 diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java index 30425f422..56f15512c 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java @@ -48,9 +48,6 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { if (StrUtil.isNotEmpty(orderId)) { ew.eq("orderIdFk", orderId); } -// if(chack){ -// ew.isNull("nameCode"); -// } List ioOrderDetailBizEntityList = ioOrderDetailBizDao.selectList(ew); return ioOrderDetailBizEntityList; } diff --git a/src/main/resources/mybatis/mapper/auth/InvBusUserDao.xml b/src/main/resources/mybatis/mapper/auth/InvBusUserDao.xml index ffa8dc563..078a8cd87 100644 --- a/src/main/resources/mybatis/mapper/auth/InvBusUserDao.xml +++ b/src/main/resources/mybatis/mapper/auth/InvBusUserDao.xml @@ -74,7 +74,7 @@ - replace INTO auth_user_bustype diff --git a/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml b/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml index 83df162d9..3a4d4353a 100644 --- a/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml +++ b/src/main/resources/mybatis/mapper/auth/WarehouseBussinessTypeDao.xml @@ -22,18 +22,11 @@ - delete from auth_warehouse_bustype + delete + from auth_warehouse_bustype where id = #{id,jdbcType=INTEGER} - - - insert into auth_warehouse_bustype (code, `action`, `name` - ) - values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR} - ) - @@ -81,9 +74,9 @@ update auth_warehouse_bustype - set code = #{code,jdbcType=VARCHAR}, - `action` = #{action,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR} + set code = #{code,jdbcType=VARCHAR}, + `action` = #{action,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR} where id = #{id,jdbcType=INTEGER} @@ -142,16 +135,6 @@ #{item.id,jdbcType=INTEGER} - - - insert into auth_warehouse_bustype - (code, `action`, `name`) - values - - (#{item.code,jdbcType=VARCHAR}, #{item.action,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR} - ) - - @@ -178,9 +161,9 @@ id = #{id,jdbcType=INTEGER}, - code = #{code,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, `action` = #{action,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, - @@ -284,9 +262,11 @@ - \ No newline at end of file + diff --git a/src/main/resources/schemas/schema_v2.1.sql b/src/main/resources/schemas/schema_v2.1.sql index f697efe02..6e57cb659 100644 --- a/src/main/resources/schemas/schema_v2.1.sql +++ b/src/main/resources/schemas/schema_v2.1.sql @@ -223,7 +223,7 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255 CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1); CALL Pro_Temp_ColumnWork('io_order', 'checkPreInOrders', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('io_order', 'checkPreInSpaceCode', 'varchar(255)', 1); - +CALL Pro_Temp_ColumnWork('io_order', 'checkPreInInvCode', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('sys_hosp_config', 'thirdSys', 'varchar(255)', 1); @@ -345,14 +345,14 @@ CALL Pro_Temp_ColumnWork('auth_space', 'id', 'bigint', 2); CREATE TABLE IF NOT EXISTS `inv_place_order` ( - `id` int NOT NULL AUTO_INCREMENT, - `recordId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上架记录号', - `type` tinyint NULL DEFAULT NULL COMMENT '上架方式 1:按物资上架 2:按单上架', - `orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据号', - `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人', - `createTime` datetime NULL DEFAULT NULL COMMENT '上架时间', - `updateTime` datetime NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', + `id` int NOT NULL AUTO_INCREMENT, + `recordId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上架记录号', + `type` tinyint NULL DEFAULT NULL COMMENT '上架方式 1:按物资上架 2:按单上架', + `orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据号', + `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人', + `createTime` datetime NULL DEFAULT NULL COMMENT '上架时间', + `updateTime` datetime NULL DEFAULT NULL COMMENT '更新时间', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 @@ -361,14 +361,14 @@ CREATE TABLE IF NOT EXISTS `inv_place_order` CREATE TABLE IF NOT EXISTS `inv_place_order_detail` ( - `id` int NOT NULL AUTO_INCREMENT, - `recordId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上架记录号', + `id` int NOT NULL AUTO_INCREMENT, + `recordId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上架记录号', `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库号', `invSpaceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位号', - `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'UDI码', - `relId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物资编码', - `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', - `count` int NULL DEFAULT NULL COMMENT '数量', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'UDI码', + `relId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物资编码', + `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', + `count` int NULL DEFAULT NULL COMMENT '数量', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4