diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/DeviceCollectOrderServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/DeviceCollectOrderServiceImpl.java index edbec9b2..7e7aea81 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/DeviceCollectOrderServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inventory/impl/DeviceCollectOrderServiceImpl.java @@ -126,7 +126,11 @@ public class DeviceCollectOrderServiceImpl implements DeviceCollectOrderService deviceCollectOrderDetailDao.updateByPrimaryKey(detailEntity); } }); - deviceCollectOrderDao.updateStatusById(status, id); + + String auditUser = customerService.getUserBean().getUserName(); + deviceCollectOrderEntity.setAuditUser(auditUser); + deviceCollectOrderEntity.setStatus(status); + deviceCollectOrderDao.updateByPrimaryKey(deviceCollectOrderEntity); return ResultVOUtils.success("更新成功!"); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/util/FilterUdiUtils.java b/api-admin/src/main/java/com/glxp/api/admin/util/FilterUdiUtils.java index bc021d04..8ae122bf 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/util/FilterUdiUtils.java +++ b/api-admin/src/main/java/com/glxp/api/admin/util/FilterUdiUtils.java @@ -11,6 +11,7 @@ import com.glxp.api.admin.util.gs1.Gs1128Decoder; import com.glxp.api.admin.util.gs1.Gs1128Engine; import java.util.Map; +import java.util.Optional; /** * @author 彭于晏 @@ -315,8 +316,11 @@ public class FilterUdiUtils { * @return */ public static String transGlxpHasSerStr(WarehouseEntity warehouseEntity) { - String udiCode = "#" + warehouseEntity.getNameCode() + "#" + warehouseEntity.getProduceDate() + "#" + warehouseEntity.getExpireDate() + - "#" + warehouseEntity.getBatchNo() + "#" + warehouseEntity.getSerialNo() + "#" + "#"; + String udiCode = "#" + warehouseEntity.getNameCode() + + "#" + Optional.ofNullable(warehouseEntity.getProduceDate()).orElse("") + + "#" + Optional.ofNullable(warehouseEntity.getExpireDate()).orElse("") + + "#" + Optional.ofNullable(warehouseEntity.getBatchNo()).orElse("") + + "#" + Optional.ofNullable(warehouseEntity.getSerialNo()).orElse("") + "#" + "#"; return udiCode; } } diff --git a/scripts/设备领用养护功能表.sql b/scripts/设备领用养护功能表.sql index 1598b144..7becde2d 100644 --- a/scripts/设备领用养护功能表.sql +++ b/scripts/设备领用养护功能表.sql @@ -56,11 +56,3 @@ CREATE TABLE `device_ma_order` ( `status` tinyint(1) NULL DEFAULT NULL COMMENT '状态', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '设备养护记录表' ROW_FORMAT = Dynamic; - -ALTER TABLE `udiwms`.`device_collect_order_detail` - ADD COLUMN `invStorageCode` varchar(255) NULL COMMENT '领用仓库' AFTER `updateTime`, - MODIFY COLUMN `invWarehouseCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '领用分库' AFTER `updateTime`; - -ALTER TABLE `udiwms`.`device_collect_order_detail` - ADD COLUMN `receiveStorageCode` varchar(255) NULL COMMENT '接收仓库' AFTER `invSpaceCode`, - MODIFY COLUMN `receiveWarehouseCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '接收分库' AFTER `invSpaceCode`; \ No newline at end of file