diff --git a/ant-design-vue-jeecg/.env b/ant-design-vue-jeecg/.env
index d7523a1c1b8bb9814fa109e6fda9f5001c27de93..d1e5fd05fd25f53821e8894bc85da2121920810e 100644
--- a/ant-design-vue-jeecg/.env
+++ b/ant-design-vue-jeecg/.env
@@ -1,5 +1,5 @@
NODE_ENV=production
-VUE_APP_PLATFORM_NAME=Finer 进销存
+VUE_APP_PLATFORM_NAME=椰罗万象
# 开启单点登录
VUE_APP_SSO=false
# 开启微应用模式
diff --git a/ant-design-vue-jeecg/public/index.html b/ant-design-vue-jeecg/public/index.html
index 11717b678966bf27e9c9259212c0d88793182388..d2d2a44f35175a1a2ff7dee64f0b8a500ef5dc9a 100644
--- a/ant-design-vue-jeecg/public/index.html
+++ b/ant-design-vue-jeecg/public/index.html
@@ -5,7 +5,7 @@
-
Finer 进销存
+ 椰罗万象
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/erp/base/BasMaterialList.vue b/ant-design-vue-jeecg/src/views/erp/base/BasMaterialList.vue
index 348f0fc013c5adaf8991b68768b0dd7717a85b84..08e27d5f09b79a7be76cac558d99f7dd11dfdd62 100644
--- a/ant-design-vue-jeecg/src/views/erp/base/BasMaterialList.vue
+++ b/ant-design-vue-jeecg/src/views/erp/base/BasMaterialList.vue
@@ -27,21 +27,21 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
查询
重置
-
- {{ toggleSearchStatus ? '收起' : '展开' }}
-
-
+
+
+
+
@@ -141,6 +141,7 @@
},
{
title:'名称',
+ width:180,
fixed:"left",
align:"left",
dataIndex: 'name',
@@ -154,7 +155,7 @@
},
{
title:'分类',
- width:160,
+ width:80,
align:"left",
dataIndex: 'categoryId_dictText',
sorter: true
@@ -176,12 +177,12 @@
dataIndex: 'salePrice',
customRender: t => XEUtils.commafy(t,{digits: 2})
},
- {
- title:'税控编码',
- width:160,
- align:"center",
- dataIndex: 'taxCode'
- },
+ // {
+ // title:'税控编码',
+ // width:160,
+ // align:"center",
+ // dataIndex: 'taxCode'
+ // },
{
title:'启用',
width:75,
@@ -220,8 +221,6 @@
align:"center",
dataIndex: 'updateBy_dictText'
},
- {
- },
{
title: '操作',
dataIndex: 'action',
diff --git a/ant-design-vue-jeecg/src/views/erp/common/components/BillHeader.vue b/ant-design-vue-jeecg/src/views/erp/common/components/BillHeader.vue
index 40df6f1a6180924ade400d850e978b6f1a841173..3e262f7c6a21dfc179cab798bcc926d8c25d6483 100644
--- a/ant-design-vue-jeecg/src/views/erp/common/components/BillHeader.vue
+++ b/ant-design-vue-jeecg/src/views/erp/common/components/BillHeader.vue
@@ -13,94 +13,15 @@
:allowClear="false" :inputReadOnly="true" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStock/LhStockList.vue b/ant-design-vue-jeecg/src/views/lhStock/LhStockList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..db40d6d2c130a9a3d5574fc95bae4d986ada0d56
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStock/LhStockList.vue
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+ {{ toggleSearchStatus ? '收起' : '展开' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
导出
+
+
+
+
+
+
+
+ 删除
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 编辑
+
+
+
+ 更多
+
+
+ 详情
+
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockCheckForm.vue b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockCheckForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..bb2f87e67a2a41d7207c78430da507d2bffc73ca
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockCheckForm.vue
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockCheckModal.vue b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockCheckModal.vue
new file mode 100644
index 0000000000000000000000000000000000000000..c874ec557ab767ac4690538faf7c40a65843db7f
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockCheckModal.vue
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockForm.vue b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..63c8cc665b9971ba79cd76bbf6ab03d14f16b12a
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockForm.vue
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockModal.Style#Drawer.vue b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockModal.Style#Drawer.vue
new file mode 100644
index 0000000000000000000000000000000000000000..13ece361d1c87b28b6ee20a99969e226d1e28d7e
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockModal.Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockModal.vue b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockModal.vue
new file mode 100644
index 0000000000000000000000000000000000000000..95dcc982d0144523e45de371579f8557e79e8fc8
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStock/modules/LhStockModal.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStockBill/LhStockBillList.vue b/ant-design-vue-jeecg/src/views/lhStockBill/LhStockBillList.vue
new file mode 100644
index 0000000000000000000000000000000000000000..49bdbf3437f2b4928809359cd1d2875f4c1ee128
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStockBill/LhStockBillList.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+ {{ toggleSearchStatus ? '收起' : '展开' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
报水果
+
报耗材
+
导出
+
+
+
+
+
+
+
+ 删除
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 编辑
+
+
+
+ 更多
+
+
+ 详情
+
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStockBill/LhStockBill_menu_insert.sql b/ant-design-vue-jeecg/src/views/lhStockBill/LhStockBill_menu_insert.sql
new file mode 100644
index 0000000000000000000000000000000000000000..3f653cf18b2991c74a4e4fcc9c33e2c4e9f01857
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStockBill/LhStockBill_menu_insert.sql
@@ -0,0 +1,26 @@
+-- 注意:该页面对应的前台目录为views/lhStockBill文件夹下
+-- 如果你想更改到其他目录,请修改sql中component字段对应的值
+
+
+INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
+VALUES ('2025052312452290320', NULL, '报货/出货单', '/lhStockBill/lhStockBillList', 'lhStockBill/LhStockBillList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 1, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-05-23 12:45:32', NULL, NULL, 0);
+
+-- 权限控制sql
+-- 新增
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2025052312452290321', '2025052312452290320', '添加报货/出货单', NULL, NULL, 0, NULL, NULL, 2, 'io.finer.erp:lh_stock_bill:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-05-23 12:45:32', NULL, NULL, 0, 0, '1', 0);
+-- 编辑
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2025052312452290322', '2025052312452290320', '编辑报货/出货单', NULL, NULL, 0, NULL, NULL, 2, 'io.finer.erp:lh_stock_bill:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-05-23 12:45:32', NULL, NULL, 0, 0, '1', 0);
+-- 删除
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2025052312452290323', '2025052312452290320', '删除报货/出货单', NULL, NULL, 0, NULL, NULL, 2, 'io.finer.erp:lh_stock_bill:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-05-23 12:45:32', NULL, NULL, 0, 0, '1', 0);
+-- 批量删除
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2025052312452290324', '2025052312452290320', '批量删除报货/出货单', NULL, NULL, 0, NULL, NULL, 2, 'io.finer.erp:lh_stock_bill:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-05-23 12:45:32', NULL, NULL, 0, 0, '1', 0);
+-- 导出excel
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2025052312452290325', '2025052312452290320', '导出excel_报货/出货单', NULL, NULL, 0, NULL, NULL, 2, 'io.finer.erp:lh_stock_bill:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-05-23 12:45:32', NULL, NULL, 0, 0, '1', 0);
+-- 导入excel
+INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
+VALUES ('2025052312452290326', '2025052312452290320', '导入excel_报货/出货单', NULL, NULL, 0, NULL, NULL, 2, 'io.finer.erp:lh_stock_bill:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-05-23 12:45:32', NULL, NULL, 0, 0, '1', 0);
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStockBill/modules/LhStockBillForm.vue b/ant-design-vue-jeecg/src/views/lhStockBill/modules/LhStockBillForm.vue
new file mode 100644
index 0000000000000000000000000000000000000000..5ff80f5f36ecc949d50732d5ee18adc8af5fd59b
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStockBill/modules/LhStockBillForm.vue
@@ -0,0 +1,298 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/lhStockBill/modules/LhStockBillModal.vue b/ant-design-vue-jeecg/src/views/lhStockBill/modules/LhStockBillModal.vue
new file mode 100644
index 0000000000000000000000000000000000000000..27d6b0b1992476395e622c03d75ba61f7ed4c834
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/lhStockBill/modules/LhStockBillModal.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/views/system/DepartList.vue b/ant-design-vue-jeecg/src/views/system/DepartList.vue
index 05bbbabeba75548beedc2a3864090a1990f47551..d6a6e217ed86de6bae79520104c2d7d363fe133d 100644
--- a/ant-design-vue-jeecg/src/views/system/DepartList.vue
+++ b/ant-design-vue-jeecg/src/views/system/DepartList.vue
@@ -5,16 +5,16 @@
- 添加部门
- 添加下级
- 导出
+ 添加大区
+ 添加门店
+ 导出
导入
批量删除
- 同步到钉钉
+
-
+
@@ -77,10 +77,10 @@
-
-
+
+
-
+
-
-
+
+
-
+
-
+
- 公司
+ 大区
-
-
- 部门
-
-
- 岗位
-
-
+
-
+
-
-
+
+
+
+
+
@@ -139,7 +135,7 @@
-
+
@@ -175,7 +171,7 @@
dataIndex: 'mobile'
},
{
- title: '传真',
+ title: '门店确认码',
dataIndex: 'fax'
},
{
@@ -239,9 +235,9 @@
edges: []
},
validatorRules: {
- departName: [{required: true, message: '请输入机构/部门名称!'}],
- orgCode: [{required: true, message: '请输入机构编码!'}],
- orgCategory:[{required: true, message: '请选择机构类型!'}],
+ departName: [{required: true, message: '请输入大区/门店名称!'}],
+ orgCode: [{required: true, message: '请输入门店编码!'}],
+ orgCategory:[{required: true, message: '请选择门店类型!'}],
mobile: Vue.prototype.rules.mobile2
},
url: {
@@ -453,7 +449,7 @@
this.$refs.form.validate(valid => {
if (valid) {
if (!this.currSelected.id) {
- this.$message.warning('请点击选择要修改部门!')
+ this.$message.warning('请点击选择要修改门店!')
return
}
@@ -493,7 +489,7 @@
} else if (num == 2) {
let key = this.currSelected.key
if (!key) {
- this.$message.warning('请先点击选中上级部门!')
+ this.$message.warning('请先点击选中上级大区!')
return false
}
this.$refs.departModal.add(this.selectedKeys)
@@ -507,7 +503,7 @@
var that = this
this.$confirm({
title: '确认删除',
- content: '确定要删除此部门以及子节点数据吗?',
+ content: '确定要删除此门店以及子节点数据吗?',
onOk: function () {
deleteByDepartId({id: that.rightClickSelectedKey}).then((resp) => {
if (resp.success) {
diff --git a/ant-design-vue-jeecg/src/views/system/UserList.vue b/ant-design-vue-jeecg/src/views/system/UserList.vue
index 73dceb5e9db778d68708595e68fd50cac04dd942..cb61beda0b920f673b3910b725902574f6cdc4b9 100644
--- a/ant-design-vue-jeecg/src/views/system/UserList.vue
+++ b/ant-design-vue-jeecg/src/views/system/UserList.vue
@@ -70,7 +70,7 @@
导入
-
+
回收站
@@ -258,13 +258,13 @@
dataIndex: 'phone'
},
{
- title: '部门',
+ title: '门店',
align: "center",
width: 180,
dataIndex: 'orgCodeTxt'
},
{
- title: '负责部门',
+ title: '负责门店',
align: "center",
width: 180,
dataIndex: 'departIds_dictText'
diff --git a/ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue b/ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue
index 8c8385a4b5da78af01d362643481cd97bfe346f2..8ee1f4b17d903863313523a8385ff31895dc2dd0 100644
--- a/ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue
+++ b/ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue
@@ -15,42 +15,35 @@
-
+
-
+
+ label="门店类型">
-
+
- 公司
+ 大区
-
-
- 部门
-
-
- 岗位
-
-
+
@@ -66,21 +59,21 @@
-
+ label="门店确认码">
+
-
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/ant-design-vue-jeecg/src/views/system/modules/DeptBaseInfo.vue b/ant-design-vue-jeecg/src/views/system/modules/DeptBaseInfo.vue
index 54d8b6536ebbbbd2d621eaecd870bc73f18831c3..b489cf908349e817957992c7b361b69e768296bd 100644
--- a/ant-design-vue-jeecg/src/views/system/modules/DeptBaseInfo.vue
+++ b/ant-design-vue-jeecg/src/views/system/modules/DeptBaseInfo.vue
@@ -1,7 +1,7 @@
- {{model.departName}}
+ {{model.departName}}
{{model.parentId}}
{{model.orgCode}}
{{model.orgCategory}}
diff --git a/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue b/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue
index cc7c1f018831b5e1e0101c8caea4264912b7be8d..59faba8425e1c9a0c6a20a81b76533d73f8cc71e 100644
--- a/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue
+++ b/ant-design-vue-jeecg/src/views/system/modules/UserModal.vue
@@ -62,32 +62,32 @@
-
+
>
-
-
-
-
-
-
-
-
- 普通用户
- 上级
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ placeholder="请选择负责门店">
@@ -110,6 +110,29 @@
女
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -119,9 +142,9 @@
-
-
-
+
+
+
@@ -231,7 +254,7 @@
}else{
this.departIdShow=false;
}
-
+ this.departIdShow=true;
if(record.hasOwnProperty("id")){
that.getUserRoles(record.id);
that.getUserDeparts(record.id);
diff --git a/ant-design-vue-jeecg/src/views/user/Login.vue b/ant-design-vue-jeecg/src/views/user/Login.vue
index 0861bb6d32692eb926404b7f20d09befcc85d1d3..f43997edcf06b5fa866883089afd90ed07d23b62 100644
--- a/ant-design-vue-jeecg/src/views/user/Login.vue
+++ b/ant-design-vue-jeecg/src/views/user/Login.vue
@@ -6,9 +6,9 @@
-
-
-
+
+
+
diff --git a/ant-design-vue-jeecg/src/views/user/LoginAccount.vue b/ant-design-vue-jeecg/src/views/user/LoginAccount.vue
index 1ff9a73d22d17375c0f4f1744e65b118cc77d7ce..4a8cab362b8950d030d9989a8d7f0d43cd171fa4 100644
--- a/ant-design-vue-jeecg/src/views/user/LoginAccount.vue
+++ b/ant-design-vue-jeecg/src/views/user/LoginAccount.vue
@@ -12,19 +12,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -55,9 +55,9 @@
password: [{
required: true, message: '请输入密码!', validator: 'click'
}],
- inputCode: [{
- required: true, message: '请输入验证码!'
- }]
+ // inputCode: [{
+ // required: true, message: '请输入验证码!'
+ // }]
}
}
@@ -123,7 +123,8 @@
},
//账号密码登录
handleLogin(rememberMe){
- this.validateFields([ 'username', 'password', 'inputCode' ], (err)=>{
+ // this.validateFields([ 'username', 'password', 'inputCode' ], (err)=>{
+ this.validateFields([ 'username', 'password' ], (err)=>{
if(!err){
let loginParams = {
username: this.model.username,
diff --git a/ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue b/ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue
index 2a5bcb13cf582253de2793dd484b03356590ad81..fa5c7729a527ec8e55350e3c9b21e741714ef706 100644
--- a/ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue
+++ b/ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue
@@ -31,12 +31,12 @@
- 您有多个部门,请选择登录部门
+ 您有多个门店,请选择登录门店
-
+
{{ d.departName }}
@@ -76,9 +76,9 @@ export default {
computed:{
title(){
if(this.isMultiDepart && this.isMultiTenant){
- return '请选择租户和部门'
+ return '请选择租户和门店'
}else if(this.isMultiDepart && !this.isMultiTenant){
- return '请选择部门'
+ return '请选择门店'
}else if(!this.isMultiDepart && this.isMultiTenant){
return '请选择租户'
}
@@ -98,14 +98,15 @@ export default {
if(multi_depart==0){
this.$notification.warn({
message: '提示',
- description: `您尚未归属部门,请确认账号信息`,
+ description: `您尚未归属门店,请确认账号信息`,
duration:3
});
this.isMultiDepart = false
}else if(multi_depart==2){
this.visible=true
this.isMultiDepart = true
- this.departList = loginResult.departs
+ this.departList = loginResult.departs.filter(i=>i.orgCategory!=='1');
+ // this.departList = loginResult.departs
}else {
this.isMultiDepart = false
}
diff --git a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/exception/JeecgBootExceptionHandler.java b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/exception/JeecgBootExceptionHandler.java
index 6d5d8ef719b47c0aee69c4f65ffd583342674b87..9a4e76ea7a63d99a0b4ee69f5b86d9e248ed0d04 100644
--- a/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/exception/JeecgBootExceptionHandler.java
+++ b/jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/common/exception/JeecgBootExceptionHandler.java
@@ -65,7 +65,7 @@ public class JeecgBootExceptionHandler {
@ExceptionHandler(DuplicateKeyException.class)
public Result> handleDuplicateKeyException(DuplicateKeyException e){
log.error(e.getMessage(), e);
- return Result.error("数据库中已存在该记录");
+ return Result.error("存在重复项请检查");
}
@ExceptionHandler({UnauthorizedException.class, AuthorizationException.class})
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-base/src/main/java/io/finer/erp/base/rule/BillNoRule.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-base/src/main/java/io/finer/erp/base/rule/BillNoRule.java
index 41704abfa996c6bc8c4477ceff647a2263be671c..c3ba88e1b4f988b1d48528dd6fc0bc61feb95d8d 100644
--- a/jeecg-boot/jeecg-module-erp/jeecg-erp-base/src/main/java/io/finer/erp/base/rule/BillNoRule.java
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-base/src/main/java/io/finer/erp/base/rule/BillNoRule.java
@@ -11,12 +11,12 @@ import java.util.Date;
public class BillNoRule implements IFillRuleHandler {
@Override
public Object execute(JSONObject params, JSONObject formData) {
- String prefix = "", period = "";
+ String prefix = "", period = "",orgCode ="";
Integer seqLen = 0;
if (params != null) {
Object obj = params.get("prefix");
if (obj != null) prefix = obj.toString();
-
+ orgCode = formData.getString("orgCode");
obj = params.get("period");
if (obj != null) period = obj.toString();
@@ -25,7 +25,7 @@ public class BillNoRule implements IFillRuleHandler {
}
SimpleDateFormat format = new SimpleDateFormat(period);
- String k = prefix + format.format(new Date());
+ String k = orgCode+"-"+ prefix + format.format(new Date());
if (k == null || k.length() == 0) {
return null;
}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/controller/LhStockCheckController.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/controller/LhStockCheckController.java
new file mode 100644
index 0000000000000000000000000000000000000000..710b0378c23ca5307d5c86f7e202c4eceb6588c0
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/controller/LhStockCheckController.java
@@ -0,0 +1,295 @@
+package io.finer.erp.lhStock.controller;
+
+import java.io.UnsupportedEncodingException;
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.vo.LoginUser;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import io.finer.erp.lhStock.entity.LhStockCheckDetail;
+import io.finer.erp.lhStock.entity.LhStockCheck;
+import io.finer.erp.lhStock.vo.LhStockCheckPage;
+import io.finer.erp.lhStock.service.ILhStockCheckService;
+import io.finer.erp.lhStock.service.ILhStockCheckDetailService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 盘点主表
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@Api(tags="盘点主表")
+@RestController
+@RequestMapping("/lhStock/lhStockCheck")
+@Slf4j
+public class LhStockCheckController {
+ @Autowired
+ private ILhStockCheckService lhStockCheckService;
+ @Autowired
+ private ILhStockCheckDetailService lhStockCheckDetailService;
+
+ /**
+ * 分页列表查询
+ *
+ * @param lhStockCheck
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ //@AutoLog(value = "盘点主表-分页列表查询")
+ @ApiOperation(value="盘点主表-分页列表查询", notes="盘点主表-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(LhStockCheck lhStockCheck,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lhStockCheck, req.getParameterMap());
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = lhStockCheckService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
+ /**
+ * 添加
+ *
+ * @param lhStockCheckPage
+ * @return
+ */
+ @AutoLog(value = "盘点主表-添加")
+ @ApiOperation(value="盘点主表-添加", notes="盘点主表-添加")
+ //@RequiresPermissions("io.finer.erp:lh_stock_check:add")
+ @PostMapping(value = "/add")
+ public Result add(@RequestBody LhStockCheckPage lhStockCheckPage) {
+ LhStockCheck lhStockCheck = new LhStockCheck();
+ BeanUtils.copyProperties(lhStockCheckPage, lhStockCheck);
+ lhStockCheckService.saveMain(lhStockCheck, lhStockCheckPage.getLhStockCheckDetailList());
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param lhStockCheckPage
+ * @return
+ */
+ @AutoLog(value = "盘点主表-编辑")
+ @ApiOperation(value="盘点主表-编辑", notes="盘点主表-编辑")
+ //@RequiresPermissions("io.finer.erp:lh_stock_check:edit")
+ @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+ public Result edit(@RequestBody LhStockCheckPage lhStockCheckPage) {
+ LhStockCheck lhStockCheck = new LhStockCheck();
+ BeanUtils.copyProperties(lhStockCheckPage, lhStockCheck);
+ LhStockCheck lhStockCheckEntity = lhStockCheckService.getById(lhStockCheck.getId());
+ if(lhStockCheckEntity==null) {
+ return Result.error("未找到对应数据");
+ }
+ lhStockCheckService.updateMain(lhStockCheck, lhStockCheckPage.getLhStockCheckDetailList());
+ return Result.OK("编辑成功!");
+ }
+
+ /**
+ * 通过id删除
+ *
+ * @param id
+ * @return
+ */
+ @AutoLog(value = "盘点主表-通过id删除")
+ @ApiOperation(value="盘点主表-通过id删除", notes="盘点主表-通过id删除")
+ //@RequiresPermissions("io.finer.erp:lh_stock_check:delete")
+ @DeleteMapping(value = "/delete")
+ public Result delete(@RequestParam(name="id",required=true) String id) {
+ lhStockCheckService.delMain(id);
+ return Result.OK("删除成功!");
+ }
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return
+ */
+ @AutoLog(value = "盘点主表-批量删除")
+ @ApiOperation(value="盘点主表-批量删除", notes="盘点主表-批量删除")
+ //@RequiresPermissions("io.finer.erp:lh_stock_check:deleteBatch")
+ @DeleteMapping(value = "/deleteBatch")
+ public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+ this.lhStockCheckService.delBatchMain(Arrays.asList(ids.split(",")));
+ return Result.OK("批量删除成功!");
+ }
+
+ /**
+ * 通过id查询
+ *
+ * @param id
+ * @return
+ */
+ //@AutoLog(value = "盘点主表-通过id查询")
+ @ApiOperation(value="盘点主表-通过id查询", notes="盘点主表-通过id查询")
+ @GetMapping(value = "/queryById")
+ public Result queryById(@RequestParam(name="id",required=true) String id) {
+ LhStockCheck lhStockCheck = lhStockCheckService.getById(id);
+ if(lhStockCheck==null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(lhStockCheck);
+
+ }
+
+ /**
+ * 通过id查询
+ *
+ * @param id
+ * @return
+ */
+ //@AutoLog(value = "盘点明细通过主表ID查询")
+ @ApiOperation(value="盘点明细主表ID查询", notes="盘点明细-通主表ID查询")
+ @GetMapping(value = "/queryLhStockCheckDetailByMainId")
+ public Result> queryLhStockCheckDetailListByMainId(@RequestParam(name="id",required=true) String id) {
+ List lhStockCheckDetailList = lhStockCheckDetailService.selectByMainId(id);
+ return Result.OK(lhStockCheckDetailList);
+ }
+
+ /**
+ * 通过id查询
+ *
+ * @param checkCategory
+ * @return
+ */
+ //@AutoLog(value = "盘点明细通过主表ID查询")
+ @ApiOperation(value="盘点明细主表ID查询", notes="盘点明细-通主表ID查询")
+ @GetMapping(value = "/queryLhStockCheckDetailByMaterCategoryId")
+ public Result> queryLhStockCheckDetailByMaterCategoryId(@RequestParam(name="checkCategory",required=true) String checkCategory,@RequestParam(name="orgCode",required=true) String orgCode) {
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(LhStockCheck::getCheckCategory, checkCategory);
+ queryWrapper.eq(LhStockCheck::getOrgCode, orgCode);
+ queryWrapper.orderByDesc(LhStockCheck::getCheckTime);
+ queryWrapper.last("limit 1");
+ LhStockCheck lhStockCheck = lhStockCheckService.getOne(queryWrapper);
+ List lhStockCheckDetailList = new ArrayList<>();
+ if (lhStockCheck != null) {
+ lhStockCheckDetailList = lhStockCheckDetailService.selectByMainId(lhStockCheck.getId());
+ for (LhStockCheckDetail lhStockCheckDetail : lhStockCheckDetailList) {
+ lhStockCheckDetail.setId(null);
+ lhStockCheckDetail.setMaterId(null);
+ lhStockCheckDetail.setPreQty(lhStockCheckDetail.getQty());
+ lhStockCheckDetail.setQty(null);
+ }
+ }
+ return Result.OK(lhStockCheckDetailList);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param lhStockCheck
+ */
+ //@RequiresPermissions("io.finer.erp:lh_stock_check:exportXls")
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, LhStockCheck lhStockCheck) {
+ // Step.1 组装查询条件查询数据
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lhStockCheck, request.getParameterMap());
+ LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+ //配置选中数据查询条件
+ String selections = request.getParameter("selections");
+ if(oConvertUtils.isNotEmpty(selections)) {
+ List selectionList = Arrays.asList(selections.split(","));
+ queryWrapper.in("id",selectionList);
+ }
+ //Step.2 获取导出数据
+ List lhStockCheckList = lhStockCheckService.list(queryWrapper);
+
+ // Step.3 组装pageList
+ List pageList = new ArrayList();
+ for (LhStockCheck main : lhStockCheckList) {
+ LhStockCheckPage vo = new LhStockCheckPage();
+ BeanUtils.copyProperties(main, vo);
+ List lhStockCheckDetailList = lhStockCheckDetailService.selectByMainId(main.getId());
+ vo.setLhStockCheckDetailList(lhStockCheckDetailList);
+ pageList.add(vo);
+ }
+
+ // Step.4 AutoPoi 导出Excel
+ ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+ mv.addObject(NormalExcelConstants.FILE_NAME, "盘点主表列表");
+ mv.addObject(NormalExcelConstants.CLASS, LhStockCheckPage.class);
+ mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("盘点主表数据", "导出人:"+sysUser.getRealname(), "盘点主表"));
+ mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+ return mv;
+ }
+
+ /**
+ * 通过excel导入数据
+ *
+ * @param request
+ * @param response
+ * @return
+ */
+ //@RequiresPermissions("io.finer.erp:lh_stock_check:importExcel")
+ @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+ public Result> importExcel(HttpServletRequest request, HttpServletResponse response) {
+ MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+ Map fileMap = multipartRequest.getFileMap();
+ for (Map.Entry entity : fileMap.entrySet()) {
+ // 获取上传文件对象
+ MultipartFile file = entity.getValue();
+ ImportParams params = new ImportParams();
+ params.setTitleRows(2);
+ params.setHeadRows(1);
+ params.setNeedSave(true);
+ try {
+ List list = ExcelImportUtil.importExcel(file.getInputStream(), LhStockCheckPage.class, params);
+ for (LhStockCheckPage page : list) {
+ LhStockCheck po = new LhStockCheck();
+ BeanUtils.copyProperties(page, po);
+ lhStockCheckService.saveMain(po, page.getLhStockCheckDetailList());
+ }
+ return Result.OK("文件导入成功!数据行数:" + list.size());
+ } catch (Exception e) {
+ log.error(e.getMessage(),e);
+ return Result.error("文件导入失败:"+e.getMessage());
+ } finally {
+ try {
+ file.getInputStream().close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ return Result.OK("文件导入失败!");
+ }
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/controller/LhStockController.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/controller/LhStockController.java
new file mode 100644
index 0000000000000000000000000000000000000000..22b036445fede32c9cda6e3dcf5205f2c83df53d
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/controller/LhStockController.java
@@ -0,0 +1,177 @@
+package io.finer.erp.lhStock.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import io.finer.erp.lhStock.entity.LhStock;
+import io.finer.erp.lhStock.service.ILhStockService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 实时库存
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@Api(tags="实时库存")
+@RestController
+@RequestMapping("/lhStock/lhStock")
+@Slf4j
+public class LhStockController extends JeecgController {
+ @Autowired
+ private ILhStockService lhStockService;
+
+ /**
+ * 分页列表查询
+ *
+ * @param lhStock
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ //@AutoLog(value = "实时库存-分页列表查询")
+ @ApiOperation(value="实时库存-分页列表查询", notes="实时库存-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(LhStock lhStock,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lhStock, req.getParameterMap());
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = lhStockService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
+ /**
+ * 添加
+ *
+ * @param lhStock
+ * @return
+ */
+ @AutoLog(value = "实时库存-添加")
+ @ApiOperation(value="实时库存-添加", notes="实时库存-添加")
+ //@RequiresPermissions("io.finer.erp:lh_stock:add")
+ @PostMapping(value = "/add")
+ public Result add(@RequestBody LhStock lhStock) {
+ lhStockService.save(lhStock);
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param lhStock
+ * @return
+ */
+ @AutoLog(value = "实时库存-编辑")
+ @ApiOperation(value="实时库存-编辑", notes="实时库存-编辑")
+ //@RequiresPermissions("io.finer.erp:lh_stock:edit")
+ @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+ public Result edit(@RequestBody LhStock lhStock) {
+ lhStockService.updateById(lhStock);
+ return Result.OK("编辑成功!");
+ }
+
+ /**
+ * 通过id删除
+ *
+ * @param id
+ * @return
+ */
+ @AutoLog(value = "实时库存-通过id删除")
+ @ApiOperation(value="实时库存-通过id删除", notes="实时库存-通过id删除")
+ //@RequiresPermissions("io.finer.erp:lh_stock:delete")
+ @DeleteMapping(value = "/delete")
+ public Result delete(@RequestParam(name="id",required=true) String id) {
+ lhStockService.removeById(id);
+ return Result.OK("删除成功!");
+ }
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return
+ */
+ @AutoLog(value = "实时库存-批量删除")
+ @ApiOperation(value="实时库存-批量删除", notes="实时库存-批量删除")
+ //@RequiresPermissions("io.finer.erp:lh_stock:deleteBatch")
+ @DeleteMapping(value = "/deleteBatch")
+ public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+ this.lhStockService.removeByIds(Arrays.asList(ids.split(",")));
+ return Result.OK("批量删除成功!");
+ }
+
+ /**
+ * 通过id查询
+ *
+ * @param id
+ * @return
+ */
+ //@AutoLog(value = "实时库存-通过id查询")
+ @ApiOperation(value="实时库存-通过id查询", notes="实时库存-通过id查询")
+ @GetMapping(value = "/queryById")
+ public Result queryById(@RequestParam(name="id",required=true) String id) {
+ LhStock lhStock = lhStockService.getById(id);
+ if(lhStock==null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(lhStock);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param lhStock
+ */
+ //@RequiresPermissions("io.finer.erp:lh_stock:exportXls")
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, LhStock lhStock) {
+ return super.exportXls(request, lhStock, LhStock.class, "实时库存");
+ }
+
+ /**
+ * 通过excel导入数据
+ *
+ * @param request
+ * @param response
+ * @return
+ */
+ //@RequiresPermissions("lh_stock:importExcel")
+ @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+ public Result> importExcel(HttpServletRequest request, HttpServletResponse response) {
+ return super.importExcel(request, response, LhStock.class);
+ }
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStock.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStock.java
new file mode 100644
index 0000000000000000000000000000000000000000..9593bb60d12abc30651b9780131073f33127fcd6
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStock.java
@@ -0,0 +1,89 @@
+package io.finer.erp.lhStock.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 实时库存
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@Data
+@TableName("lh_stock")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="lh_stock对象", description="实时库存")
+public class LhStock implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**ID*/
+ @TableId(type = IdType.ASSIGN_ID)
+ @ApiModelProperty(value = "ID")
+ private String id;
+ /**门店code*/
+ @Excel(name = "门店code", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @ApiModelProperty(value = "门店code")
+ private String orgCode;
+ /**物料*/
+ @Excel(name = "物料", width = 15, dictTable = "bas_material", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_material", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "物料")
+ private String materialId;
+ /**物料类型ID*/
+ @Excel(name = "物料类型ID", width = 15, dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "物料类型ID")
+ private String materCategoryId;
+ /**数量*/
+ @Excel(name = "数量", width = 15)
+ @ApiModelProperty(value = "数量")
+ private BigDecimal qty;
+ /**计量单位*/
+ @Excel(name = "计量单位", width = 15, dictTable = "bas_unit", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_unit", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "计量单位")
+ private String unitId;
+ /**最近盘点时间*/
+ @Excel(name = "最近盘点时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "最近盘点时间")
+ private Date checkTime;
+ /**最近盘点人*/
+ @Excel(name = "最近盘点人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @ApiModelProperty(value = "最近盘点人")
+ private String checker;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private String createBy;
+ /**创建时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "创建时间")
+ private Date createTime;
+ /**修改人*/
+ @ApiModelProperty(value = "修改人")
+ private String updateBy;
+ /**修改时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "修改时间")
+ private Date updateTime;
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStockCheck.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStockCheck.java
new file mode 100644
index 0000000000000000000000000000000000000000..579e78a5a453766b73551f13727a86a6824fec92
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStockCheck.java
@@ -0,0 +1,70 @@
+package io.finer.erp.lhStock.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 盘库存
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@ApiModel(value="lh_stock_check对象", description="盘库存")
+@Data
+@TableName("lh_stock_check")
+public class LhStockCheck implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**ID*/
+ @TableId(type = IdType.ASSIGN_ID)
+ @ApiModelProperty(value = "ID")
+ private String id;
+ /**门店code*/
+ @Excel(name = "门店code", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @ApiModelProperty(value = "门店code")
+ private String orgCode;
+ /**盘点类型*/
+ @Excel(name = "盘点类型", width = 15, dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "盘点类型")
+ private String checkCategory;
+ /**盘点时间*/
+ @Excel(name = "盘点时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "盘点时间")
+ private Date checkTime;
+ /**盘点人*/
+ @Excel(name = "盘点人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @ApiModelProperty(value = "盘点人")
+ private String checker;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private String createBy;
+ /**创建时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "创建时间")
+ private Date createTime;
+ /**修改人*/
+ @ApiModelProperty(value = "修改人")
+ private String updateBy;
+ /**修改时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "修改时间")
+ private Date updateTime;
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStockCheckDetail.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStockCheckDetail.java
new file mode 100644
index 0000000000000000000000000000000000000000..88467781a85d8b0857e94a7d315da673d3fb8c70
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/entity/LhStockCheckDetail.java
@@ -0,0 +1,80 @@
+package io.finer.erp.lhStock.entity;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import java.util.Date;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * @Description: 物料明细
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@ApiModel(value="lh_stock_check_detail对象", description="物料明细")
+@Data
+@TableName("lh_stock_check_detail")
+public class LhStockCheckDetail implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**ID*/
+ @TableId(type = IdType.ASSIGN_ID)
+ @ApiModelProperty(value = "ID")
+ private String id;
+ /**主表ID*/
+ @ApiModelProperty(value = "主表ID")
+ private String materId;
+ /**门店code*/
+ @Excel(name = "门店code", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @ApiModelProperty(value = "门店code")
+ private String orgCode;
+ /**物料id*/
+ @Excel(name = "物料id", width = 15, dictTable = "bas_material", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_material", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "物料id")
+ private String materialId;
+ /**物料类型ID*/
+ @Excel(name = "物料类型ID", width = 15, dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "物料类型ID")
+ private String materCategoryId;
+ /**计量单位*/
+ @Excel(name = "计量单位", width = 15, dictTable = "bas_unit", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_unit", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "计量单位")
+ private String unitId;
+ /**上次数量*/
+ @Excel(name = "上次数量", width = 15)
+ @ApiModelProperty(value = "上次数量")
+ private java.math.BigDecimal preQty;
+ /**数量*/
+ @Excel(name = "数量", width = 15)
+ @ApiModelProperty(value = "数量")
+ private java.math.BigDecimal qty;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private String createBy;
+ /**创建时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "创建时间")
+ private Date createTime;
+ /**修改人*/
+ @ApiModelProperty(value = "修改人")
+ private String updateBy;
+ /**修改时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "修改时间")
+ private Date updateTime;
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockCheckDetailMapper.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockCheckDetailMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..d2d347e9b3312abb30a1bc927c73112a7d229ef1
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockCheckDetailMapper.java
@@ -0,0 +1,31 @@
+package io.finer.erp.lhStock.mapper;
+
+import java.util.List;
+import io.finer.erp.lhStock.entity.LhStockCheckDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 物料明细
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+public interface LhStockCheckDetailMapper extends BaseMapper {
+
+ /**
+ * 通过主表id删除子表数据
+ *
+ * @param mainId 主表id
+ * @return boolean
+ */
+ public boolean deleteByMainId(@Param("mainId") String mainId);
+
+ /**
+ * 通过主表id查询子表数据
+ *
+ * @param mainId 主表id
+ * @return List
+ */
+ public List selectByMainId(@Param("mainId") String mainId);
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockCheckMapper.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockCheckMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..8e3850d34d7d2e9a75e82d2ce1f7e0a3f05a5dc4
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockCheckMapper.java
@@ -0,0 +1,17 @@
+package io.finer.erp.lhStock.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import io.finer.erp.lhStock.entity.LhStockCheck;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 盘库存
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+public interface LhStockCheckMapper extends BaseMapper {
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockMapper.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..d4748ca73f47d0f06a40ffa9aff3fb1a553aee0c
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/LhStockMapper.java
@@ -0,0 +1,17 @@
+package io.finer.erp.lhStock.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import io.finer.erp.lhStock.entity.LhStock;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 实时库存
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+public interface LhStockMapper extends BaseMapper {
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockCheckDetailMapper.xml b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockCheckDetailMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d9e6886ccf514f9796fd23554ac3358a25fb8a00
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockCheckDetailMapper.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ DELETE
+ FROM lh_stock_check_detail
+ WHERE
+ mater_id = #{mainId}
+
+
+
+
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockCheckMapper.xml b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockCheckMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c69d76e7cdca6ff98b336f0bd159c288ea22e006
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockCheckMapper.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockMapper.xml b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..050f7e38ade0282eb0a14e6c3b6e96d1fc0434d3
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/mapper/xml/LhStockMapper.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockCheckDetailService.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockCheckDetailService.java
new file mode 100644
index 0000000000000000000000000000000000000000..f998625b1a289ddcaa648e3fe99983c88a10d109
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockCheckDetailService.java
@@ -0,0 +1,22 @@
+package io.finer.erp.lhStock.service;
+
+import io.finer.erp.lhStock.entity.LhStockCheckDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 盘点明细
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+public interface ILhStockCheckDetailService extends IService {
+
+ /**
+ * 通过主表id查询子表数据
+ *
+ * @param mainId 主表id
+ * @return List
+ */
+ public List selectByMainId(String mainId);
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockCheckService.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockCheckService.java
new file mode 100644
index 0000000000000000000000000000000000000000..3dc58f22270b7dad74c3d08640194328301e8338
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockCheckService.java
@@ -0,0 +1,48 @@
+package io.finer.erp.lhStock.service;
+
+import io.finer.erp.lhStock.entity.LhStockCheckDetail;
+import io.finer.erp.lhStock.entity.LhStockCheck;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 盘点主表
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+public interface ILhStockCheckService extends IService {
+
+ /**
+ * 添加一对多
+ *
+ * @param lhStockCheck
+ * @param lhStockCheckDetailList
+ */
+ public void saveMain(LhStockCheck lhStockCheck,List lhStockCheckDetailList) ;
+
+ /**
+ * 修改一对多
+ *
+ * @param lhStockCheck
+ * @param lhStockCheckDetailList
+ */
+ public void updateMain(LhStockCheck lhStockCheck,List lhStockCheckDetailList);
+
+ /**
+ * 删除一对多
+ *
+ * @param id
+ */
+ public void delMain (String id);
+
+ /**
+ * 批量删除一对多
+ *
+ * @param idList
+ */
+ public void delBatchMain (Collection extends Serializable> idList);
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockService.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockService.java
new file mode 100644
index 0000000000000000000000000000000000000000..a042723265087c70e1191151cdd3f65aff4b5f76
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/ILhStockService.java
@@ -0,0 +1,14 @@
+package io.finer.erp.lhStock.service;
+
+import io.finer.erp.lhStock.entity.LhStock;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 实时库存
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+public interface ILhStockService extends IService {
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockCheckDetailServiceImpl.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockCheckDetailServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..170f9db6e6dd9b269754418b57b27d452573a99b
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockCheckDetailServiceImpl.java
@@ -0,0 +1,28 @@
+package io.finer.erp.lhStock.service.impl;
+
+import io.finer.erp.lhStock.entity.LhStockCheckDetail;
+import io.finer.erp.lhStock.mapper.LhStockCheckDetailMapper;
+import io.finer.erp.lhStock.service.ILhStockCheckDetailService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 盘点明细
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@Service
+public class LhStockCheckDetailServiceImpl extends ServiceImpl implements ILhStockCheckDetailService {
+
+ @Autowired
+ private LhStockCheckDetailMapper lhStockCheckDetailMapper;
+
+ @Override
+ public List selectByMainId(String mainId) {
+ return lhStockCheckDetailMapper.selectByMainId(mainId);
+ }
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockCheckServiceImpl.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockCheckServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..88023c849424256b0bdeff8d16840c791970fc4d
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockCheckServiceImpl.java
@@ -0,0 +1,111 @@
+package io.finer.erp.lhStock.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import io.finer.erp.lhStock.entity.LhStock;
+import io.finer.erp.lhStock.entity.LhStockCheck;
+import io.finer.erp.lhStock.entity.LhStockCheckDetail;
+import io.finer.erp.lhStock.mapper.LhStockCheckDetailMapper;
+import io.finer.erp.lhStock.mapper.LhStockCheckMapper;
+import io.finer.erp.lhStock.mapper.LhStockMapper;
+import io.finer.erp.lhStock.service.ILhStockCheckService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Collection;
+
+/**
+ * @Description: 盘点主表
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@Service
+public class LhStockCheckServiceImpl extends ServiceImpl implements ILhStockCheckService {
+
+ @Autowired
+ private LhStockCheckMapper lhStockCheckMapper;
+ @Autowired
+ private LhStockCheckDetailMapper lhStockCheckDetailMapper;
+ @Autowired
+ private LhStockMapper lhStockMapper;
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void saveMain(LhStockCheck lhStockCheck, List lhStockCheckDetailList) {
+ lhStockCheckMapper.insert(lhStockCheck);
+ if(lhStockCheckDetailList!=null && lhStockCheckDetailList.size()>0) {
+ for(LhStockCheckDetail entity:lhStockCheckDetailList) {
+ //外键设置
+ entity.setMaterId(lhStockCheck.getId());
+ entity.setOrgCode(lhStockCheck.getOrgCode());
+ entity.setMaterCategoryId(lhStockCheck.getCheckCategory());
+ lhStockCheckDetailMapper.insert(entity);
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(LhStock::getOrgCode, lhStockCheck.getOrgCode());
+ queryWrapper.eq(LhStock::getMaterialId, entity.getMaterialId());
+ queryWrapper.orderByDesc(LhStock::getCheckTime);
+ queryWrapper.last("limit 1");
+ LhStock lhStock = lhStockMapper.selectOne(queryWrapper);
+ if (lhStock != null){
+ // 存在库存
+ lhStock.setChecker(lhStockCheck.getChecker());
+ lhStock.setCheckTime(lhStockCheck.getCheckTime());
+ lhStock.setQty(entity.getQty());
+ lhStock.setUnitId(entity.getUnitId());
+ lhStockMapper.updateById(lhStock);
+ }else {
+ lhStock = new LhStock();
+ lhStock.setChecker(lhStockCheck.getChecker());
+ lhStock.setCheckTime(lhStockCheck.getCheckTime());
+ lhStock.setQty(entity.getQty());
+ lhStock.setUnitId(entity.getUnitId());
+ lhStock.setOrgCode(entity.getOrgCode());
+ lhStock.setMaterCategoryId(entity.getMaterCategoryId());
+ lhStock.setMaterialId(entity.getMaterialId());
+ lhStockMapper.insert(lhStock);
+ }
+ }
+ }
+
+
+
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void updateMain(LhStockCheck lhStockCheck,List lhStockCheckDetailList) {
+ lhStockCheckMapper.updateById(lhStockCheck);
+
+ //1.先删除子表数据
+ lhStockCheckDetailMapper.deleteByMainId(lhStockCheck.getId());
+
+ //2.子表数据重新插入
+ if(lhStockCheckDetailList!=null && lhStockCheckDetailList.size()>0) {
+ for(LhStockCheckDetail entity:lhStockCheckDetailList) {
+ //外键设置
+ entity.setMaterId(lhStockCheck.getId());
+ lhStockCheckDetailMapper.insert(entity);
+ }
+ }
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delMain(String id) {
+ lhStockCheckDetailMapper.deleteByMainId(id);
+ lhStockCheckMapper.deleteById(id);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delBatchMain(Collection extends Serializable> idList) {
+ for(Serializable id:idList) {
+ lhStockCheckDetailMapper.deleteByMainId(id.toString());
+ lhStockCheckMapper.deleteById(id);
+ }
+ }
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockServiceImpl.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..08aadec8330dbd43f79cbad4ecbe1af47830df2d
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/service/impl/LhStockServiceImpl.java
@@ -0,0 +1,19 @@
+package io.finer.erp.lhStock.service.impl;
+
+import io.finer.erp.lhStock.entity.LhStock;
+import io.finer.erp.lhStock.mapper.LhStockMapper;
+import io.finer.erp.lhStock.service.ILhStockService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 实时库存
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@Service
+public class LhStockServiceImpl extends ServiceImpl implements ILhStockService {
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/vo/LhStockCheckPage.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/vo/LhStockCheckPage.java
new file mode 100644
index 0000000000000000000000000000000000000000..03416507a1384ca7315c370b23b5eb1eaa5bca94
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStock/vo/LhStockCheckPage.java
@@ -0,0 +1,69 @@
+package io.finer.erp.lhStock.vo;
+
+import java.util.List;
+import io.finer.erp.lhStock.entity.LhStockCheck;
+import io.finer.erp.lhStock.entity.LhStockCheckDetail;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelEntity;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.util.Date;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 盘点主表
+ * @Author: jeecg-boot
+ * @Date: 2025-05-16
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value="lh_stock_checkPage对象", description="盘点主表")
+public class LhStockCheckPage {
+
+ /**ID*/
+ @ApiModelProperty(value = "ID")
+ private String id;
+ /**门店code*/
+ @Excel(name = "门店code", width = 15)
+ @ApiModelProperty(value = "门店code")
+ private String orgCode;
+ /**盘点类型*/
+ @Excel(name = "盘点类型", width = 15)
+ @ApiModelProperty(value = "盘点类型")
+ private String checkCategory;
+ /**盘点时间*/
+ @Excel(name = "盘点时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "盘点时间")
+ private Date checkTime;
+ /**盘点人*/
+ @Excel(name = "盘点人", width = 15)
+ @ApiModelProperty(value = "盘点人")
+ private String checker;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private String createBy;
+ /**创建时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "创建时间")
+ private Date createTime;
+ /**修改人*/
+ @ApiModelProperty(value = "修改人")
+ private String updateBy;
+ /**修改时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "修改时间")
+ private Date updateTime;
+
+ @ExcelCollection(name="盘点明细")
+ @ApiModelProperty(value = "盘点明细")
+ private List lhStockCheckDetailList;
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/controller/LhStockBillController.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/controller/LhStockBillController.java
new file mode 100644
index 0000000000000000000000000000000000000000..908ec1ef391c610401d193e52be9f3f6e21a8d91
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/controller/LhStockBillController.java
@@ -0,0 +1,265 @@
+package io.finer.erp.lhStockBill.controller;
+
+import java.io.UnsupportedEncodingException;
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.vo.LoginUser;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import io.finer.erp.lhStockBill.entity.LhStockBillDetail;
+import io.finer.erp.lhStockBill.entity.LhStockBill;
+import io.finer.erp.lhStockBill.vo.LhStockBillPage;
+import io.finer.erp.lhStockBill.service.ILhStockBillService;
+import io.finer.erp.lhStockBill.service.ILhStockBillDetailService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+
+ /**
+ * @Description: 报货/出货单
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+@Api(tags="报货/出货单")
+@RestController
+@RequestMapping("/lhStockBill/lhStockBill")
+@Slf4j
+public class LhStockBillController {
+ @Autowired
+ private ILhStockBillService lhStockBillService;
+ @Autowired
+ private ILhStockBillDetailService lhStockBillDetailService;
+
+ /**
+ * 分页列表查询
+ *
+ * @param lhStockBill
+ * @param pageNo
+ * @param pageSize
+ * @param req
+ * @return
+ */
+ //@AutoLog(value = "报货/出货单-分页列表查询")
+ @ApiOperation(value="报货/出货单-分页列表查询", notes="报货/出货单-分页列表查询")
+ @GetMapping(value = "/list")
+ public Result> queryPageList(LhStockBill lhStockBill,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lhStockBill, req.getParameterMap());
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = lhStockBillService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
+ /**
+ * 添加
+ *
+ * @param lhStockBillPage
+ * @return
+ */
+ @AutoLog(value = "报货/出货单-添加")
+ @ApiOperation(value="报货/出货单-添加", notes="报货/出货单-添加")
+ //@RequiresPermissions("io.finer.erp:lh_stock_bill:add")
+ @PostMapping(value = "/add")
+ public Result add(@RequestBody LhStockBillPage lhStockBillPage) {
+ LhStockBill lhStockBill = new LhStockBill();
+ BeanUtils.copyProperties(lhStockBillPage, lhStockBill);
+ lhStockBillService.saveMain(lhStockBill, lhStockBillPage.getLhStockBillDetailList());
+ return Result.OK("添加成功!");
+ }
+
+ /**
+ * 编辑
+ *
+ * @param lhStockBillPage
+ * @return
+ */
+ @AutoLog(value = "报货/出货单-编辑")
+ @ApiOperation(value="报货/出货单-编辑", notes="报货/出货单-编辑")
+ //@RequiresPermissions("io.finer.erp:lh_stock_bill:edit")
+ @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+ public Result edit(@RequestBody LhStockBillPage lhStockBillPage) {
+ LhStockBill lhStockBill = new LhStockBill();
+ BeanUtils.copyProperties(lhStockBillPage, lhStockBill);
+ LhStockBill lhStockBillEntity = lhStockBillService.getById(lhStockBill.getId());
+ if(lhStockBillEntity==null) {
+ return Result.error("未找到对应数据");
+ }
+ lhStockBillService.updateMain(lhStockBill, lhStockBillPage.getLhStockBillDetailList());
+ return Result.OK("编辑成功!");
+ }
+
+ /**
+ * 通过id删除
+ *
+ * @param id
+ * @return
+ */
+ @AutoLog(value = "报货/出货单-通过id删除")
+ @ApiOperation(value="报货/出货单-通过id删除", notes="报货/出货单-通过id删除")
+ //@RequiresPermissions("io.finer.erp:lh_stock_bill:delete")
+ @DeleteMapping(value = "/delete")
+ public Result delete(@RequestParam(name="id",required=true) String id) {
+ lhStockBillService.delMain(id);
+ return Result.OK("删除成功!");
+ }
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return
+ */
+ @AutoLog(value = "报货/出货单-批量删除")
+ @ApiOperation(value="报货/出货单-批量删除", notes="报货/出货单-批量删除")
+ //@RequiresPermissions("io.finer.erp:lh_stock_bill:deleteBatch")
+ @DeleteMapping(value = "/deleteBatch")
+ public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+ this.lhStockBillService.delBatchMain(Arrays.asList(ids.split(",")));
+ return Result.OK("批量删除成功!");
+ }
+
+ /**
+ * 通过id查询
+ *
+ * @param id
+ * @return
+ */
+ //@AutoLog(value = "报货/出货单-通过id查询")
+ @ApiOperation(value="报货/出货单-通过id查询", notes="报货/出货单-通过id查询")
+ @GetMapping(value = "/queryById")
+ public Result queryById(@RequestParam(name="id",required=true) String id) {
+ LhStockBill lhStockBill = lhStockBillService.getById(id);
+ if(lhStockBill==null) {
+ return Result.error("未找到对应数据");
+ }
+ return Result.OK(lhStockBill);
+
+ }
+
+ /**
+ * 通过id查询
+ *
+ * @param id
+ * @return
+ */
+ //@AutoLog(value = "表单明细通过主表ID查询")
+ @ApiOperation(value="表单明细主表ID查询", notes="表单明细-通主表ID查询")
+ @GetMapping(value = "/queryLhStockBillDetailByMainId")
+ public Result> queryLhStockBillDetailListByMainId(@RequestParam(name="id",required=true) String id) {
+ List lhStockBillDetailList = lhStockBillDetailService.selectByMainId(id);
+ return Result.OK(lhStockBillDetailList);
+ }
+
+ /**
+ * 导出excel
+ *
+ * @param request
+ * @param lhStockBill
+ */
+ //@RequiresPermissions("io.finer.erp:lh_stock_bill:exportXls")
+ @RequestMapping(value = "/exportXls")
+ public ModelAndView exportXls(HttpServletRequest request, LhStockBill lhStockBill) {
+ // Step.1 组装查询条件查询数据
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lhStockBill, request.getParameterMap());
+ LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+ //配置选中数据查询条件
+ String selections = request.getParameter("selections");
+ if(oConvertUtils.isNotEmpty(selections)) {
+ List selectionList = Arrays.asList(selections.split(","));
+ queryWrapper.in("id",selectionList);
+ }
+ //Step.2 获取导出数据
+ List lhStockBillList = lhStockBillService.list(queryWrapper);
+
+ // Step.3 组装pageList
+ List pageList = new ArrayList();
+ for (LhStockBill main : lhStockBillList) {
+ LhStockBillPage vo = new LhStockBillPage();
+ BeanUtils.copyProperties(main, vo);
+ List lhStockBillDetailList = lhStockBillDetailService.selectByMainId(main.getId());
+ vo.setLhStockBillDetailList(lhStockBillDetailList);
+ pageList.add(vo);
+ }
+
+ // Step.4 AutoPoi 导出Excel
+ ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+ mv.addObject(NormalExcelConstants.FILE_NAME, "报货/出货单列表");
+ mv.addObject(NormalExcelConstants.CLASS, LhStockBillPage.class);
+ mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("报货/出货单数据", "导出人:"+sysUser.getRealname(), "报货/出货单"));
+ mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+ return mv;
+ }
+
+ /**
+ * 通过excel导入数据
+ *
+ * @param request
+ * @param response
+ * @return
+ */
+ //@RequiresPermissions("io.finer.erp:lh_stock_bill:importExcel")
+ @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+ public Result> importExcel(HttpServletRequest request, HttpServletResponse response) {
+ MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+ Map fileMap = multipartRequest.getFileMap();
+ for (Map.Entry entity : fileMap.entrySet()) {
+ // 获取上传文件对象
+ MultipartFile file = entity.getValue();
+ ImportParams params = new ImportParams();
+ params.setTitleRows(2);
+ params.setHeadRows(1);
+ params.setNeedSave(true);
+ try {
+ List list = ExcelImportUtil.importExcel(file.getInputStream(), LhStockBillPage.class, params);
+ for (LhStockBillPage page : list) {
+ LhStockBill po = new LhStockBill();
+ BeanUtils.copyProperties(page, po);
+ lhStockBillService.saveMain(po, page.getLhStockBillDetailList());
+ }
+ return Result.OK("文件导入成功!数据行数:" + list.size());
+ } catch (Exception e) {
+ log.error(e.getMessage(),e);
+ return Result.error("文件导入失败:"+e.getMessage());
+ } finally {
+ try {
+ file.getInputStream().close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ return Result.OK("文件导入失败!");
+ }
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/entity/LhStockBill.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/entity/LhStockBill.java
new file mode 100644
index 0000000000000000000000000000000000000000..ecb789a730cef180a2f932c90d951df6b9cf927a
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/entity/LhStockBill.java
@@ -0,0 +1,85 @@
+package io.finer.erp.lhStockBill.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 报货/出货单
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+@ApiModel(value="lh_stock_bill对象", description="报货/出货单")
+@Data
+@TableName("lh_stock_bill")
+public class LhStockBill implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**ID*/
+ @TableId(type = IdType.ASSIGN_ID)
+ @ApiModelProperty(value = "ID")
+ private String id;
+ /**门店code*/
+ @Excel(name = "门店code", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @ApiModelProperty(value = "门店code")
+ private String orgCode;
+ /**物料类型id*/
+ @Excel(name = "物料类型id", width = 15, dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "物料类型id")
+ private String materCategoryId;
+ /**单据类型*/
+ @Excel(name = "单据类型", width = 15, dicCode = "lh_bill_category")
+ @Dict(dicCode = "lh_bill_category")
+ @ApiModelProperty(value = "单据类型")
+ private String billCategory;
+ /**单据时间*/
+ @Excel(name = "单据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "单据时间")
+ private Date billTime;
+ /**发货人*/
+ @Excel(name = "发货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @ApiModelProperty(value = "发货人")
+ private String inOperator;
+ /**单据状态*/
+ @Excel(name = "单据状态", width = 15, dicCode = "lh_bill_status")
+ @Dict( dicCode = "lh_bill_status")
+ @ApiModelProperty(value = "单据状态")
+ private String billStatus;
+ /**报货人*/
+ @Excel(name = "报货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @ApiModelProperty(value = "报货人")
+ private String operator;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private String createBy;
+ /**创建时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "创建时间")
+ private Date createTime;
+ /**修改人*/
+ @ApiModelProperty(value = "修改人")
+ private String updateBy;
+ /**修改时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "修改时间")
+ private Date updateTime;
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/entity/LhStockBillDetail.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/entity/LhStockBillDetail.java
new file mode 100644
index 0000000000000000000000000000000000000000..1c3eaf07e2ecf4d234ce0f1562c77807d8bb6103
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/entity/LhStockBillDetail.java
@@ -0,0 +1,75 @@
+package io.finer.erp.lhStockBill.entity;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import java.util.Date;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * @Description: 表单明细
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+@ApiModel(value="lh_stock_bill_detail对象", description="表单明细")
+@Data
+@TableName("lh_stock_bill_detail")
+public class LhStockBillDetail implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**ID*/
+ @TableId(type = IdType.ASSIGN_ID)
+ @ApiModelProperty(value = "ID")
+ private String id;
+ /**门店code*/
+ @Excel(name = "门店code", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @ApiModelProperty(value = "门店code")
+ private String orgCode;
+ /**物料id*/
+ @Excel(name = "物料id", width = 15, dictTable = "bas_material", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "物料id")
+ private String materialId;
+ /**物料类型ID*/
+ @Excel(name = "物料类型ID", width = 15, dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "物料类型ID")
+ private String materCategoryId;
+ /**计量单位*/
+ @Excel(name = "计量单位", width = 15, dictTable = "bas_unit", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "计量单位")
+ private String unitId;
+ /**库存数量*/
+ @Excel(name = "库存数量", width = 15)
+ @ApiModelProperty(value = "库存数量")
+ private java.math.BigDecimal stockQty;
+ /**数量*/
+ @Excel(name = "数量", width = 15)
+ @ApiModelProperty(value = "数量")
+ private java.math.BigDecimal qty;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private String createBy;
+ /**创建时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "创建时间")
+ private Date createTime;
+ /**修改人*/
+ @ApiModelProperty(value = "修改人")
+ private String updateBy;
+ /**修改时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "修改时间")
+ private Date updateTime;
+ /**主表ID*/
+ @ApiModelProperty(value = "主表ID")
+ private String materId;
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/LhStockBillDetailMapper.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/LhStockBillDetailMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..e3f98e0a471cdb54e817f5b426baef5c2149e795
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/LhStockBillDetailMapper.java
@@ -0,0 +1,31 @@
+package io.finer.erp.lhStockBill.mapper;
+
+import java.util.List;
+import io.finer.erp.lhStockBill.entity.LhStockBillDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 表单明细
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+public interface LhStockBillDetailMapper extends BaseMapper {
+
+ /**
+ * 通过主表id删除子表数据
+ *
+ * @param mainId 主表id
+ * @return boolean
+ */
+ public boolean deleteByMainId(@Param("mainId") String mainId);
+
+ /**
+ * 通过主表id查询子表数据
+ *
+ * @param mainId 主表id
+ * @return List
+ */
+ public List selectByMainId(@Param("mainId") String mainId);
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/LhStockBillMapper.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/LhStockBillMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..9b5487b79cd68f7b6c50207247f09cd749d7277c
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/LhStockBillMapper.java
@@ -0,0 +1,17 @@
+package io.finer.erp.lhStockBill.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import io.finer.erp.lhStockBill.entity.LhStockBill;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 报货/出货单
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+public interface LhStockBillMapper extends BaseMapper {
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/xml/LhStockBillDetailMapper.xml b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/xml/LhStockBillDetailMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eb8be91fb64fb35711ebe2b4d683b6646763977c
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/xml/LhStockBillDetailMapper.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ DELETE
+ FROM lh_stock_bill_detail
+ WHERE
+ mater_id = #{mainId}
+
+
+
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/xml/LhStockBillMapper.xml b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/xml/LhStockBillMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d9aee7b14cc01051c531a979820b0d04ed3f2d1d
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/mapper/xml/LhStockBillMapper.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/ILhStockBillDetailService.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/ILhStockBillDetailService.java
new file mode 100644
index 0000000000000000000000000000000000000000..57033acbae11881389d01b32b34c13e837bae487
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/ILhStockBillDetailService.java
@@ -0,0 +1,22 @@
+package io.finer.erp.lhStockBill.service;
+
+import io.finer.erp.lhStockBill.entity.LhStockBillDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 表单明细
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+public interface ILhStockBillDetailService extends IService {
+
+ /**
+ * 通过主表id查询子表数据
+ *
+ * @param mainId 主表id
+ * @return List
+ */
+ public List selectByMainId(String mainId);
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/ILhStockBillService.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/ILhStockBillService.java
new file mode 100644
index 0000000000000000000000000000000000000000..53e47377e90f75cc40bf0549bee07d91d7853070
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/ILhStockBillService.java
@@ -0,0 +1,48 @@
+package io.finer.erp.lhStockBill.service;
+
+import io.finer.erp.lhStockBill.entity.LhStockBillDetail;
+import io.finer.erp.lhStockBill.entity.LhStockBill;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 报货/出货单
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+public interface ILhStockBillService extends IService {
+
+ /**
+ * 添加一对多
+ *
+ * @param lhStockBill
+ * @param lhStockBillDetailList
+ */
+ public void saveMain(LhStockBill lhStockBill,List lhStockBillDetailList) ;
+
+ /**
+ * 修改一对多
+ *
+ * @param lhStockBill
+ * @param lhStockBillDetailList
+ */
+ public void updateMain(LhStockBill lhStockBill,List lhStockBillDetailList);
+
+ /**
+ * 删除一对多
+ *
+ * @param id
+ */
+ public void delMain (String id);
+
+ /**
+ * 批量删除一对多
+ *
+ * @param idList
+ */
+ public void delBatchMain (Collection extends Serializable> idList);
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/impl/LhStockBillDetailServiceImpl.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/impl/LhStockBillDetailServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..dddf5fba9fb721b108e48f7d03fc1336615fd3e5
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/impl/LhStockBillDetailServiceImpl.java
@@ -0,0 +1,27 @@
+package io.finer.erp.lhStockBill.service.impl;
+
+import io.finer.erp.lhStockBill.entity.LhStockBillDetail;
+import io.finer.erp.lhStockBill.mapper.LhStockBillDetailMapper;
+import io.finer.erp.lhStockBill.service.ILhStockBillDetailService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 表单明细
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+@Service
+public class LhStockBillDetailServiceImpl extends ServiceImpl implements ILhStockBillDetailService {
+
+ @Autowired
+ private LhStockBillDetailMapper lhStockBillDetailMapper;
+
+ @Override
+ public List selectByMainId(String mainId) {
+ return lhStockBillDetailMapper.selectByMainId(mainId);
+ }
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/impl/LhStockBillServiceImpl.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/impl/LhStockBillServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..9311d4da1a1a5e4cd7f810f9122bc1cf5d61b248
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/service/impl/LhStockBillServiceImpl.java
@@ -0,0 +1,79 @@
+package io.finer.erp.lhStockBill.service.impl;
+
+import io.finer.erp.lhStockBill.entity.LhStockBill;
+import io.finer.erp.lhStockBill.entity.LhStockBillDetail;
+import io.finer.erp.lhStockBill.mapper.LhStockBillDetailMapper;
+import io.finer.erp.lhStockBill.mapper.LhStockBillMapper;
+import io.finer.erp.lhStockBill.service.ILhStockBillService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Collection;
+
+/**
+ * @Description: 报货/出货单
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+@Service
+public class LhStockBillServiceImpl extends ServiceImpl implements ILhStockBillService {
+
+ @Autowired
+ private LhStockBillMapper lhStockBillMapper;
+ @Autowired
+ private LhStockBillDetailMapper lhStockBillDetailMapper;
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void saveMain(LhStockBill lhStockBill, List lhStockBillDetailList) {
+ lhStockBillMapper.insert(lhStockBill);
+ if(lhStockBillDetailList!=null && lhStockBillDetailList.size()>0) {
+ for(LhStockBillDetail entity:lhStockBillDetailList) {
+ //外键设置
+ entity.setMaterId(lhStockBill.getId());
+ entity.setOrgCode(lhStockBill.getOrgCode());
+ entity.setMaterCategoryId(lhStockBill.getMaterCategoryId());
+ lhStockBillDetailMapper.insert(entity);
+ }
+ }
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void updateMain(LhStockBill lhStockBill,List lhStockBillDetailList) {
+ lhStockBillMapper.updateById(lhStockBill);
+
+ //1.先删除子表数据
+ lhStockBillDetailMapper.deleteByMainId(lhStockBill.getId());
+
+ //2.子表数据重新插入
+ if(lhStockBillDetailList!=null && lhStockBillDetailList.size()>0) {
+ for(LhStockBillDetail entity:lhStockBillDetailList) {
+ //外键设置
+ entity.setMaterId(lhStockBill.getId());
+ lhStockBillDetailMapper.insert(entity);
+ }
+ }
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delMain(String id) {
+ lhStockBillDetailMapper.deleteByMainId(id);
+ lhStockBillMapper.deleteById(id);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delBatchMain(Collection extends Serializable> idList) {
+ for(Serializable id:idList) {
+ lhStockBillDetailMapper.deleteByMainId(id.toString());
+ lhStockBillMapper.deleteById(id);
+ }
+ }
+
+}
diff --git a/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/vo/LhStockBillPage.java b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/vo/LhStockBillPage.java
new file mode 100644
index 0000000000000000000000000000000000000000..2b75ae07303322eb6888b6d2f552b41c4d976436
--- /dev/null
+++ b/jeecg-boot/jeecg-module-erp/jeecg-erp-servi/src/main/java/io/finer/erp/lhStockBill/vo/LhStockBillPage.java
@@ -0,0 +1,87 @@
+package io.finer.erp.lhStockBill.vo;
+
+import java.util.List;
+import io.finer.erp.lhStockBill.entity.LhStockBill;
+import io.finer.erp.lhStockBill.entity.LhStockBillDetail;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelEntity;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.util.Date;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 报货/出货单
+ * @Author: jeecg-boot
+ * @Date: 2025-05-23
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value="lh_stock_billPage对象", description="报货/出货单")
+public class LhStockBillPage {
+
+ /**ID*/
+ @ApiModelProperty(value = "ID")
+ private String id;
+ /**门店code*/
+ @Excel(name = "门店code", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "org_code")
+ @ApiModelProperty(value = "门店code")
+ private String orgCode;
+ /**物料类型id*/
+ @Excel(name = "物料类型id", width = 15, dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @Dict(dictTable = "bas_material_category", dicText = "name", dicCode = "id")
+ @ApiModelProperty(value = "物料类型id")
+ private String materCategoryId;
+ /**单据类型*/
+ @Excel(name = "单据类型", width = 15, dicCode = "lh_bill_category")
+ @Dict(dicCode = "lh_bill_category")
+ @ApiModelProperty(value = "单据类型")
+ private String billCategory;
+ /**单据时间*/
+ @Excel(name = "单据时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "单据时间")
+ private Date billTime;
+ /**发货人*/
+ @Excel(name = "发货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @ApiModelProperty(value = "发货人")
+ private String inOperator;
+ /**单据状态*/
+ @Excel(name = "单据状态", width = 15, dicCode = "lh_bill_status")
+ @Dict( dicCode = "lh_bill_status")
+ @ApiModelProperty(value = "单据状态")
+ private String billStatus;
+ /**报货人*/
+ @Excel(name = "报货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
+ @ApiModelProperty(value = "报货人")
+ private String operator;
+ /**创建人*/
+ @ApiModelProperty(value = "创建人")
+ private String createBy;
+ /**创建时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "创建时间")
+ private Date createTime;
+ /**修改人*/
+ @ApiModelProperty(value = "修改人")
+ private String updateBy;
+ /**修改时间*/
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty(value = "修改时间")
+ private Date updateTime;
+
+ @ExcelCollection(name="表单明细")
+ @ApiModelProperty(value = "表单明细")
+ private List lhStockBillDetailList;
+
+}
diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java
index 5e1422d06fd63c2e5628d10fb1e66d6aa97116aa..8095a2372993d890698832f7c23cb1345e96ab70 100644
--- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java
+++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java
@@ -82,27 +82,27 @@ public class LoginController {
//update-begin--Author:scott Date:20190805 for:暂时注释掉密码加密逻辑,有点问题
//update-begin-author:taoyan date:20190828 for:校验验证码
- String captcha = sysLoginModel.getCaptcha();
- if(captcha==null){
- result.error500("验证码无效");
- return result;
- }
- String lowerCaseCaptcha = captcha.toLowerCase();
- //update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
- // 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
- String origin = lowerCaseCaptcha+sysLoginModel.getCheckKey()+jeecgBaseConfig.getSignatureSecret();
- String realKey = Md5Util.md5Encode(origin, "utf-8");
- //update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
- Object checkCode = redisUtil.get(realKey);
- //当进入登录页时,有一定几率出现验证码错误 #1714
- if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
- log.warn("验证码错误,key= {} , Ui checkCode= {}, Redis checkCode = {}", sysLoginModel.getCheckKey(), lowerCaseCaptcha, checkCode);
- result.error500("验证码错误");
- // 改成特殊的code 便于前端判断
- result.setCode(HttpStatus.PRECONDITION_FAILED.value());
- return result;
- }
- //update-end-author:taoyan date:20190828 for:校验验证码
+// String captcha = sysLoginModel.getCaptcha();
+// if(captcha==null){
+// result.error500("验证码无效");
+// return result;
+// }
+// String lowerCaseCaptcha = captcha.toLowerCase();
+// //update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
+// // 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
+// String origin = lowerCaseCaptcha+sysLoginModel.getCheckKey()+jeecgBaseConfig.getSignatureSecret();
+// String realKey = Md5Util.md5Encode(origin, "utf-8");
+// //update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
+// Object checkCode = redisUtil.get(realKey);
+// //当进入登录页时,有一定几率出现验证码错误 #1714
+// if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
+// log.warn("验证码错误,key= {} , Ui checkCode= {}, Redis checkCode = {}", sysLoginModel.getCheckKey(), lowerCaseCaptcha, checkCode);
+// result.error500("验证码错误");
+// // 改成特殊的code 便于前端判断
+// result.setCode(HttpStatus.PRECONDITION_FAILED.value());
+// return result;
+// }
+// //update-end-author:taoyan date:20190828 for:校验验证码
//1. 校验用户是否有效
//update-begin-author:wangshuai date:20200601 for: 登录代码验证用户是否注销bug,if条件永远为false
@@ -126,7 +126,7 @@ public class LoginController {
//用户登录信息
userInfo(sysUser, result);
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
- redisUtil.del(realKey);
+// redisUtil.del(realKey);
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
LoginUser loginUser = new LoginUser();
BeanUtils.copyProperties(sysUser, loginUser);
@@ -273,7 +273,9 @@ public class LoginController {
}
String orgCode= user.getOrgCode();
this.sysUserService.updateUserDepart(username, orgCode);
+ SysDepart depart = sysDepartService.queryCompByOrgCode(orgCode);
SysUser sysUser = sysUserService.getUserByName(username);
+ sysUser.setOrgCodeTxt(depart!=null?depart.getDepartName():"");
JSONObject obj = new JSONObject();
obj.put("userInfo", sysUser);
result.setResult(obj);
diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
index fcfd21a80c0f887ae9c0bb8443f21e92cf683563..afa8b9928d1ca5148b1d1a939b1156ff51a629a5 100644
--- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
+++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
@@ -354,10 +354,10 @@ public class SysDepartController {
}
});
//导出文件名称
- mv.addObject(NormalExcelConstants.FILE_NAME, "部门列表");
+ mv.addObject(NormalExcelConstants.FILE_NAME, "门店列表");
mv.addObject(NormalExcelConstants.CLASS, SysDepart.class);
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
- mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("部门列表数据", "导出人:"+user.getRealname(), "导出信息"));
+ mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("门店列表数据", "导出人:"+user.getRealname(), "导出信息"));
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
return mv;
}
diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
index 2d44d608453a10944b79e48e6a3389b8b7db8e03..b601dc8e370a3585556ff9d2b2ad3a66a21b3d6c 100644
--- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
+++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
@@ -901,11 +901,14 @@ public class SysUserController {
* @return
*/
@RequestMapping(value = "/getCurrentUserDeparts", method = RequestMethod.GET)
- public Result