From 0fca534de3968f82331463b39558934e9ca7af72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9A=B4=E7=82=B3=E6=9E=97?= <15237758276@163.com> Date: Thu, 13 Mar 2025 13:54:54 +0800 Subject: [PATCH] no message --- .../components/duochaxun/Jianhuojiemian.vue | 12 ++-- .../src/components/duochaxun/Kucunhuizong.vue | 57 ++++++++--------- .../src/components/duochaxun/Kucunrizhi.vue | 49 +++++++++++++-- wms-vue/src/components/duochaxun/RongQi.vue | 4 +- wms-vue/src/components/duochaxun/Xuliehao.vue | 6 +- wms-vue/src/main.js | 4 +- .../main/java/com/yc/wms/bean/Kucunrizhi.java | 6 ++ .../wms/controller/EnumerateController.java | 56 +++++++++++++++++ .../yc/wms/service/impl/KucunhuizongImpl.java | 63 +++++++++++-------- .../yc/wms/service/impl/KucunrizhiImpl.java | 48 ++++++++++++++ .../com/yc/wms/utils/JdbcQueryExample.java | 28 +++++++++ wms/src/main/resources/application.yml | 12 ++-- 12 files changed, 266 insertions(+), 79 deletions(-) create mode 100644 wms/src/main/java/com/yc/wms/controller/EnumerateController.java create mode 100644 wms/src/main/java/com/yc/wms/utils/JdbcQueryExample.java diff --git a/wms-vue/src/components/duochaxun/Jianhuojiemian.vue b/wms-vue/src/components/duochaxun/Jianhuojiemian.vue index 5fd2414..f3239d0 100644 --- a/wms-vue/src/components/duochaxun/Jianhuojiemian.vue +++ b/wms-vue/src/components/duochaxun/Jianhuojiemian.vue @@ -45,7 +45,7 @@ - + - + - + - + - + - + + - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + diff --git a/wms-vue/src/components/duochaxun/Kucunrizhi.vue b/wms-vue/src/components/duochaxun/Kucunrizhi.vue index fa9351f..506bd1a 100644 --- a/wms-vue/src/components/duochaxun/Kucunrizhi.vue +++ b/wms-vue/src/components/duochaxun/Kucunrizhi.vue @@ -14,12 +14,12 @@ - + @@ -60,7 +60,21 @@ - + + + + + + + + + + + + + + + @@ -384,6 +398,8 @@ export default { pageSize: 50, pageNum: 1, total: 3, + /* 日志类型下拉框*/ + logTypes:[], param: { //相关单号 RELATED_BILL: '', @@ -401,6 +417,9 @@ export default { OPERATOR: '', //发生时间 OCCUR_TIME: [], + PROP_C9: '', + DESCRIPTION: '', + LP: '' }, LOCS: [], Log: [], @@ -419,6 +438,7 @@ export default { mounted() { this.queryUser(); this.LOC(); + this.JdbcLogType(); }, methods: { handleEdit(index, row) { @@ -455,6 +475,23 @@ export default { this.tableloding=false; }) }, + JdbcLogType(){ + //LOC下拉列表数据加载 + this.$axios.post(this.$httpUrl + '/Enumerate/InventoryLogType', { + + }).then(res => res.data) + .then(res => { + if (res.code == 200) { + this.logTypes = res.data; + } else { + this.$message.error('获取数据失败'); + } + + // eslint-disable-next-line no-unused-vars + },err=>{ + this.tableloding=false; + }) + }, queryUser() { //列表数据加载 this.$axios.post(this.$httpUrl + '/Kucunrizhi/queryRi', { diff --git a/wms-vue/src/components/duochaxun/RongQi.vue b/wms-vue/src/components/duochaxun/RongQi.vue index 2177a1f..4ed9bff 100644 --- a/wms-vue/src/components/duochaxun/RongQi.vue +++ b/wms-vue/src/components/duochaxun/RongQi.vue @@ -114,8 +114,8 @@ - - + +
diff --git a/wms-vue/src/components/duochaxun/Xuliehao.vue b/wms-vue/src/components/duochaxun/Xuliehao.vue index 33da966..f28b4f6 100644 --- a/wms-vue/src/components/duochaxun/Xuliehao.vue +++ b/wms-vue/src/components/duochaxun/Xuliehao.vue @@ -33,7 +33,7 @@ - + - + - + > logTypes = new ArrayList<>(); + // 使用LinkedHashMap保持插入顺序 + logTypes.add(createEntry("ARRANGEMENT", "整理")); + logTypes.add(createEntry("RECEIVING", "入库")); + logTypes.add(createEntry("SHIPPING", "拣配")); + logTypes.add(createEntry("FROZEN", "冻结")); + logTypes.add(createEntry("CHECK_ADJUST", "盘点调整")); + logTypes.add(createEntry("HAND_ORDER", "交单")); + logTypes.add(createEntry("MOVE", "移库")); + logTypes.add(createEntry("SOLUTION_K", "解K")); + logTypes.add(createEntry("RECEIVING_ADJUST", "其它入库")); + logTypes.add(createEntry("SHIPPING_ADJUST", "其它出库")); + logTypes.add(createEntry("CONVERT_PACKAGEUNIT", "工单退料")); + logTypes.add(createEntry("INVENTORY_ADJUST", "调整")); + logTypes.add(createEntry("COUNT_ADJUST", "删除库存")); + logTypes.add(createEntry("PROCESS_DOWN", "取消整理")); + logTypes.add(createEntry("PROCESS_UP", "合单")); + logTypes.add(createEntry("MODIFY_LOT", "批次调整")); + logTypes.add(createEntry("MODIFY_STATUS", "状态调整")); + logTypes.add(createEntry("COMPANY_TRANS_OUT", "异常登记")); + logTypes.add(createEntry("COMPANY_TRANS_IN", "取消分配")); + +// return logTypes; + return Result.success(logTypes); + } + private static Map createEntry(String value, String label) { + Map entry = new LinkedHashMap<>(); + entry.put("value", value); + entry.put("label", label); + return entry; + } + +} diff --git a/wms/src/main/java/com/yc/wms/service/impl/KucunhuizongImpl.java b/wms/src/main/java/com/yc/wms/service/impl/KucunhuizongImpl.java index af319e2..718b4a5 100644 --- a/wms/src/main/java/com/yc/wms/service/impl/KucunhuizongImpl.java +++ b/wms/src/main/java/com/yc/wms/service/impl/KucunhuizongImpl.java @@ -30,31 +30,42 @@ public class KucunhuizongImpl implements Kucunhuizong { String sql=" SELECT " +" ROW_NUMBER() OVER (ORDER BY inventory.id ASC) AS Row_Num," - +" inventory.id, " - +" inventory.locCode, " - +" inventory.itemCode, " - +" inventory.itemName, " - +" inventory.UNIT, " - +" inventory.status, " - +" inventory.statuss, " - +" inventory.quantity, " - +" inventory.queuedQuantity , " - +" inventory.LSname, " - +" inventory.weight, " - +" inventory.propC1, " - +" inventory.propC2, " - +" inventory.propC3, " - +" inventory.propC5, " - +" inventory.propC9, " - +" inventory.propD2, " - +" inventory.kqName, " - +" inventory.agvFlag, " - +" inventory.SINGLE_ITEM, " - +" inventory.validity, " - +" inventory.storageDate, " - +" inventory.invDes, " - +" inventory.propC7, " - +" inventory.lock " + +" inventory.id , " + +" inventory.locCode as 'locCode', " //库位号 + +" inventory.itemCode as 'itemCode', " //料号 + +" inventory.itemName as 'itemName', " //物料描述 + +" inventory.UNIT as 'UNIT', " //单位 + +" inventory.status as 'status', "//库存状态 + +" inventory.statuss as 'inv_status', "//退料标记 + +" inventory.quantity as 'quantity', "//库存数量 + +" inventory.queuedQuantity as 'queuedQuantity', "//待上架数量 + +" inventory.propC1 as 'propC1', " + +" inventory.propC2 as 'propC2', " + +" inventory.propC3 as 'propC3', " + +" inventory.propC4 as 'propC4', " + +" inventory.propC5 as 'propC5', " + +" inventory.propC6 as 'propC6', " + +" inventory.propC7 as 'propC7', " + +" inventory.propC8 as 'propC8', " + +" inventory.propC9 as 'propC9', " + +" inventory.propD1 as 'prop_D1', " + +" inventory.propD2 as 'prop_D2', " + +" inventory.kqName as 'kqName', " + +" inventory.lock as 'lock'," + +" inventory.LSname as 'LSname', " + +" inventory.VOLUME as 'VOLUME'," + +" inventory.BE_WEIGHT as 'BE_WEIGHT'," + +" inventory.SHIP_RULES as 'SHIP_RULES'," + +" inventory.BE_MARK_WEIGHT as 'BE_MARK_WEIGHT'," + +" inventory.STR_EXTEND1 as 'STR_EXTEND1'," + +" inventory.STR_EXTEND2 as 'STR_EXTEND2'," + +" inventory.agvFlag as 'agvFlag', " + +" inventory.lts_name as 'lts_name', " + +" inventory.SINGLE_ITEM as 'SINGLE_ITEM', " + +" inventory.validity as 'validity', " + +" inventory.storageDate as 'storageDate', " + +" inventory.invDes as 'invDes', " + +" inventory.WEIGHT as 'WEIGHT' " +" FROM INVENTORY_VIEW inventory " +" WHERE 1=1 " +" and inventory.quantity>0 and inventory.Be_SAP_Item=1 " @@ -138,7 +149,7 @@ public class KucunhuizongImpl implements Kucunhuizong { sb.append("'"+ kucunhuizong.kqName[i]+"'"+","); } } - sql+=" and z.kqName in ("+sb.toString()+")";; + sql+=" and inventory.kqName in ("+sb.toString()+")";; } //批次号 diff --git a/wms/src/main/java/com/yc/wms/service/impl/KucunrizhiImpl.java b/wms/src/main/java/com/yc/wms/service/impl/KucunrizhiImpl.java index 77ef2a9..821d058 100644 --- a/wms/src/main/java/com/yc/wms/service/impl/KucunrizhiImpl.java +++ b/wms/src/main/java/com/yc/wms/service/impl/KucunrizhiImpl.java @@ -59,6 +59,54 @@ public class KucunrizhiImpl implements Kucunrizhi { sql+=" and log.RELATED_BILL in ("+sb.toString()+")"; } } + //容器 + if(kucunrizhi.LP!=null){ + if(!kucunrizhi.LP.trim().equals("")){ + String[] str=kucunrizhi.LP.trim().split("\n"); + StringBuffer sb = new StringBuffer(); + for (int i=0;i0){ diff --git a/wms/src/main/java/com/yc/wms/utils/JdbcQueryExample.java b/wms/src/main/java/com/yc/wms/utils/JdbcQueryExample.java new file mode 100644 index 0000000..ae72c86 --- /dev/null +++ b/wms/src/main/java/com/yc/wms/utils/JdbcQueryExample.java @@ -0,0 +1,28 @@ +package com.yc.wms.utils; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +@Component +@Service +public class JdbcQueryExample { + private final JdbcTemplate jdbcTemplate; + + @Autowired + public JdbcQueryExample(JdbcTemplate jdbcTemplate) { + this.jdbcTemplate = jdbcTemplate; + } + + public List> sqlQuery(String sql, Object... params) { + return jdbcTemplate.queryForList(sql, params); + } + + public int executeUpdate(String sql, Object... params) { + return jdbcTemplate.update(sql, params); + } +} diff --git a/wms/src/main/resources/application.yml b/wms/src/main/resources/application.yml index 1a8e249..399fa10 100644 --- a/wms/src/main/resources/application.yml +++ b/wms/src/main/resources/application.yml @@ -13,13 +13,13 @@ server: spring: datasource: -# url: jdbc:sqlserver://10.1.96.105:1433;DatabaseName=LD_WMSDB - url: jdbc:sqlserver://47.103.100.52:1433;DatabaseName=zwlgtest + url: jdbc:sqlserver://10.1.96.105:1433;DatabaseName=LD_WMSDB +# url: jdbc:sqlserver://47.103.100.52:1433;DatabaseName=zwlgtest driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver -# username: wmsdb -# password: AmecDDbb32A - username: WMSDB - password: WmsYc@5688 + username: wmsdb + password: AmecDDbb32A +# username: WMSDB +# password: WmsYc@5688 hikari: connection-timeout: 60000