Commit 442b579cabf522e6b95e93dc69949501facb75cb
Merge branch 'develop4' of http://172.16.29.40:8010/wms/wms4.git into develop4
Showing
43 changed files
with
2948 additions
and
87 deletions
ant-design-vue-jeecg/src/api/api.js
... | ... | @@ -107,6 +107,8 @@ export const getLocationTypeList = (params) => getAction('/config/locationType/g |
107 | 107 | export const getLocationHighList = (params) => postAction('/config/locationHigh/getLocationHighList', params); |
108 | 108 | //获取货主列表 |
109 | 109 | export const getCompanyList = (params) => getAction('/config/company/getCompanyList', params); |
110 | +//获取盘点类型列表 | |
111 | +export const getCountTypeList = (params) => getAction('/config/cycleCountPreference/getCountTypeList', params); | |
110 | 112 | //获取承运商列表 |
111 | 113 | export const getCarrierList = (params) => getAction('/config/carrier/getCarrierList', params); |
112 | 114 | //获取客户列表 |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue
... | ... | @@ -157,11 +157,16 @@ export default { |
157 | 157 | dataIndex: 'qty' |
158 | 158 | }, |
159 | 159 | { |
160 | - title: '已收数量', | |
160 | + title: '已出数量', | |
161 | 161 | align: "center", |
162 | 162 | dataIndex: 'taskQty' |
163 | 163 | }, |
164 | 164 | { |
165 | + title: '库存数量', | |
166 | + align: "center", | |
167 | + dataIndex: 'inventoryQty' | |
168 | + }, | |
169 | + { | |
165 | 170 | title: '库存状态', |
166 | 171 | align: "center", |
167 | 172 | dataIndex: 'inventoryStatus_dictText', |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountDetailList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card class="j-inner-table-wrapper" :bordered="false"> | |
3 | + | |
4 | + <!-- 查询区域 begin --> | |
5 | + <div class="table-page-search-wrapper"> | |
6 | + <a-form layout="inline"> | |
7 | + <a-row :gutter="24"> | |
8 | + </a-row> | |
9 | + </a-form> | |
10 | + </div> | |
11 | + <!-- 查询区域 end --> | |
12 | + | |
13 | + <!-- 操作按钮区域 begin --> | |
14 | + <div class="table-operator"> | |
15 | + <a-button type="primary" icon="plus" @click="handleAdd">新增</a-button> | |
16 | + <a-button type="primary" icon="download" @click="handleExportXls('盘点明细表')">导出</a-button> | |
17 | + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |
18 | + <a-button type="primary" icon="import">导入</a-button> | |
19 | + </a-upload> | |
20 | + <!-- 高级查询区域 --> | |
21 | + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |
22 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | |
23 | + <a-menu slot="overlay"> | |
24 | + <a-menu-item key="1" @click="batchDel"> | |
25 | + <a-icon type="delete"/> | |
26 | + <span>删除</span> | |
27 | + </a-menu-item> | |
28 | + </a-menu> | |
29 | + <a-button> | |
30 | + <span>批量操作</span> | |
31 | + <a-icon type="down"/> | |
32 | + </a-button> | |
33 | + </a-dropdown> | |
34 | + </div> | |
35 | + <!-- 操作按钮区域 end --> | |
36 | + | |
37 | + <!-- table区域 begin --> | |
38 | + <div> | |
39 | + | |
40 | + <a-alert type="info" showIcon style="margin-bottom: 16px;"> | |
41 | + <template slot="message"> | |
42 | + <span>已选择</span> | |
43 | + <a style="font-weight: 600;padding: 0 4px;">{{ selectedRowKeys.length }}</a> | |
44 | + <span>项</span> | |
45 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
46 | + </template> | |
47 | + </a-alert> | |
48 | + | |
49 | + <a-table | |
50 | + ref="table" | |
51 | + size="middle" | |
52 | + bordered | |
53 | + rowKey="id" | |
54 | + class="j-table-force-nowrap" | |
55 | + :scroll="{x:true}" | |
56 | + :loading="loading" | |
57 | + :columns="columns" | |
58 | + :dataSource="dataSource" | |
59 | + :pagination="ipagination" | |
60 | + :expandedRowKeys="expandedRowKeys" | |
61 | + :rowSelection="{selectedRowKeys, onChange: onSelectChange}" | |
62 | + @expand="handleExpand" | |
63 | + @change="handleTableChange" | |
64 | + > | |
65 | + | |
66 | + <!-- 内嵌table区域 begin --> | |
67 | + <template slot="expandedRowRender" slot-scope="record"> | |
68 | + <a-tabs tabPosition="top"> | |
69 | + <a-tab-pane tab="盘点容器明细表" key="cycleCountDetailChild" forceRender> | |
70 | + <cycle-count-detail-child-sub-table :record="record"/> | |
71 | + </a-tab-pane> | |
72 | + </a-tabs> | |
73 | + </template> | |
74 | + <!-- 内嵌table区域 end --> | |
75 | + | |
76 | + <template slot="htmlSlot" slot-scope="text"> | |
77 | + <div v-html="text"></div> | |
78 | + </template> | |
79 | + | |
80 | + <template slot="imgSlot" slot-scope="text"> | |
81 | + <div style="font-size: 12px;font-style: italic;"> | |
82 | + <span v-if="!text">无图片</span> | |
83 | + <img v-else :src="getImgView(text)" alt="" style="max-width:80px;height:25px;"/> | |
84 | + </div> | |
85 | + </template> | |
86 | + | |
87 | + | |
88 | + <template slot="fileSlot" slot-scope="text"> | |
89 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
90 | + <a-button | |
91 | + v-else | |
92 | + ghost | |
93 | + type="primary" | |
94 | + icon="download" | |
95 | + size="small" | |
96 | + @click="downloadFile(text)" | |
97 | + > | |
98 | + <span>下载</span> | |
99 | + </a-button> | |
100 | + </template> | |
101 | + | |
102 | + <template slot="action" slot-scope="text, record"> | |
103 | + <a @click="handleEdit(record)">编辑</a> | |
104 | + <a-divider type="vertical"/> | |
105 | + <a-dropdown> | |
106 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
107 | + <a-menu slot="overlay"> | |
108 | + <a-menu-item> | |
109 | + <a-popconfirm title="确定删除吗?" @confirm="handleDelete(record.id)"> | |
110 | + <a>删除</a> | |
111 | + </a-popconfirm> | |
112 | + </a-menu-item> | |
113 | + </a-menu> | |
114 | + </a-dropdown> | |
115 | + | |
116 | + </template> | |
117 | + | |
118 | + </a-table> | |
119 | + </div> | |
120 | + <!-- table区域 end --> | |
121 | + | |
122 | + <!-- 表单区域 --> | |
123 | + <cycle-count-detail-modal ref="modalForm" @ok="modalFormOk"/> | |
124 | + | |
125 | + </a-card> | |
126 | +</template> | |
127 | + | |
128 | +<script> | |
129 | + | |
130 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
131 | + import CycleCountDetailModal from './modules/CycleCountDetailModal' | |
132 | + import CycleCountDetailChildSubTable from './subTables/CycleCountDetailChildSubTable' | |
133 | + import '@/assets/less/TableExpand.less' | |
134 | + | |
135 | + export default { | |
136 | + name: 'CycleCountDetailList', | |
137 | + mixins: [JeecgListMixin], | |
138 | + components: { | |
139 | + CycleCountDetailModal, | |
140 | + CycleCountDetailChildSubTable, | |
141 | + }, | |
142 | + data() { | |
143 | + return { | |
144 | + description: '盘点明细表列表管理页面', | |
145 | + // 表头 | |
146 | + columns: [ | |
147 | + { | |
148 | + title: '#', | |
149 | + key: 'rowIndex', | |
150 | + width: 60, | |
151 | + align: 'center', | |
152 | + customRender: (t, r, index) => parseInt(index) + 1 | |
153 | + }, | |
154 | + { | |
155 | + title: '盘点主单id', | |
156 | + align: 'center', | |
157 | + dataIndex: 'cycleCountHeadId', | |
158 | + }, | |
159 | + { | |
160 | + title: '盘点主单code', | |
161 | + align: 'center', | |
162 | + dataIndex: 'cycleCountHeadCode', | |
163 | + }, | |
164 | + { | |
165 | + title: '任务表头', | |
166 | + align: 'center', | |
167 | + dataIndex: 'taskHeaderId', | |
168 | + }, | |
169 | + { | |
170 | + title: '任务明细头', | |
171 | + align: 'center', | |
172 | + dataIndex: 'taskDetailId', | |
173 | + }, | |
174 | + { | |
175 | + title: '仓库', | |
176 | + align: 'center', | |
177 | + dataIndex: 'warehouseCode', | |
178 | + }, | |
179 | + { | |
180 | + title: '货主', | |
181 | + align: 'center', | |
182 | + dataIndex: 'companyCode', | |
183 | + }, | |
184 | + { | |
185 | + title: '库存明细头', | |
186 | + align: 'center', | |
187 | + dataIndex: 'inventoryDetailId', | |
188 | + }, | |
189 | + { | |
190 | + title: '库位', | |
191 | + align: 'center', | |
192 | + dataIndex: 'locationCode', | |
193 | + }, | |
194 | + { | |
195 | + title: '容器', | |
196 | + align: 'center', | |
197 | + dataIndex: 'containerCode', | |
198 | + }, | |
199 | + { | |
200 | + title: '库存状态', | |
201 | + align: 'center', | |
202 | + dataIndex: 'inventorySts', | |
203 | + }, | |
204 | + { | |
205 | + title: '系统数量', | |
206 | + align: 'center', | |
207 | + dataIndex: 'systemQty', | |
208 | + }, | |
209 | + { | |
210 | + title: '实盘数量', | |
211 | + align: 'center', | |
212 | + dataIndex: 'countedQty', | |
213 | + }, | |
214 | + { | |
215 | + title: '差异数量', | |
216 | + align: 'center', | |
217 | + dataIndex: 'gapQty', | |
218 | + }, | |
219 | + { | |
220 | + title: '失败原因', | |
221 | + align: 'center', | |
222 | + dataIndex: 'rejectionNote', | |
223 | + }, | |
224 | + { | |
225 | + title: '完成用户', | |
226 | + align: 'center', | |
227 | + dataIndex: 'completedBy', | |
228 | + }, | |
229 | + { | |
230 | + title: '完成时间', | |
231 | + align: 'center', | |
232 | + dataIndex: 'completedAt', | |
233 | + }, | |
234 | + { | |
235 | + title: '盘点明细状态', | |
236 | + align: 'center', | |
237 | + dataIndex: 'enableStatus', | |
238 | + }, | |
239 | + { | |
240 | + title: '操作', | |
241 | + dataIndex: 'action', | |
242 | + align: 'center', | |
243 | + width:147, | |
244 | + scopedSlots: { customRender: 'action' }, | |
245 | + }, | |
246 | + ], | |
247 | + // 字典选项 | |
248 | + dictOptions: {}, | |
249 | + // 展开的行test | |
250 | + expandedRowKeys: [], | |
251 | + url: { | |
252 | + list: '/cycleCountDetail/cycleCountDetail/list', | |
253 | + delete: '/cycleCountDetail/cycleCountDetail/delete', | |
254 | + deleteBatch: '/cycleCountDetail/cycleCountDetail/deleteBatch', | |
255 | + exportXlsUrl: '/cycleCountDetail/cycleCountDetail/exportXls', | |
256 | + importExcelUrl: '/cycleCountDetail/cycleCountDetail/importExcel', | |
257 | + }, | |
258 | + superFieldList:[], | |
259 | + } | |
260 | + }, | |
261 | + created() { | |
262 | + this.getSuperFieldList(); | |
263 | + }, | |
264 | + computed: { | |
265 | + importExcelUrl() { | |
266 | + return window._CONFIG['domianURL'] + this.url.importExcelUrl | |
267 | + } | |
268 | + }, | |
269 | + methods: { | |
270 | + initDictConfig() { | |
271 | + }, | |
272 | + | |
273 | + handleExpand(expanded, record) { | |
274 | + this.expandedRowKeys = [] | |
275 | + if (expanded === true) { | |
276 | + this.expandedRowKeys.push(record.id) | |
277 | + } | |
278 | + }, | |
279 | + getSuperFieldList(){ | |
280 | + let fieldList=[]; | |
281 | + fieldList.push({type:'string',value:'cycleCountHeadId',text:'盘点主单id',dictCode:''}) | |
282 | + fieldList.push({type:'string',value:'cycleCountHeadCode',text:'盘点主单code',dictCode:''}) | |
283 | + fieldList.push({type:'string',value:'taskHeaderId',text:'任务表头',dictCode:''}) | |
284 | + fieldList.push({type:'string',value:'taskDetailId',text:'任务明细头',dictCode:''}) | |
285 | + fieldList.push({type:'string',value:'warehouseCode',text:'仓库',dictCode:''}) | |
286 | + fieldList.push({type:'string',value:'companyCode',text:'货主',dictCode:''}) | |
287 | + fieldList.push({type:'string',value:'inventoryDetailId',text:'库存明细头',dictCode:''}) | |
288 | + fieldList.push({type:'string',value:'locationCode',text:'库位',dictCode:''}) | |
289 | + fieldList.push({type:'string',value:'containerCode',text:'容器',dictCode:''}) | |
290 | + fieldList.push({type:'string',value:'inventorySts',text:'库存状态',dictCode:''}) | |
291 | + fieldList.push({type:'string',value:'systemQty',text:'系统数量',dictCode:''}) | |
292 | + fieldList.push({type:'string',value:'countedQty',text:'实盘数量',dictCode:''}) | |
293 | + fieldList.push({type:'string',value:'gapQty',text:'差异数量',dictCode:''}) | |
294 | + fieldList.push({type:'string',value:'rejectionNote',text:'失败原因',dictCode:''}) | |
295 | + fieldList.push({type:'string',value:'completedBy',text:'完成用户',dictCode:''}) | |
296 | + fieldList.push({type:'string',value:'completedAt',text:'完成时间',dictCode:''}) | |
297 | + fieldList.push({type:'string',value:'enableStatus',text:'盘点明细状态',dictCode:''}) | |
298 | + this.superFieldList = fieldList | |
299 | + } | |
300 | + } | |
301 | + } | |
302 | +</script> | |
303 | +<style lang="less" scoped> | |
304 | + @import '~@assets/less/common.less'; | |
305 | +</style> | |
0 | 306 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountHeaderList.vue
0 → 100644
1 | +<template> | |
2 | + <a-card :bordered="false"> | |
3 | + <!-- 查询区域 --> | |
4 | + <div class="table-page-search-wrapper"> | |
5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | |
6 | + <a-row :gutter="24"> | |
7 | + </a-row> | |
8 | + </a-form> | |
9 | + </div> | |
10 | + <!-- 查询区域-END --> | |
11 | + | |
12 | + <!-- 操作按钮区域 --> | |
13 | + <div class="table-operator"> | |
14 | + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | |
15 | + <a-button type="primary" icon="download" @click="handleExportXls('盘点主表')">导出</a-button> | |
16 | + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |
17 | + <a-button type="primary" icon="import">导入</a-button> | |
18 | + </a-upload> | |
19 | + <!-- 高级查询区域 --> | |
20 | + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |
21 | + <a-dropdown v-if="selectedRowKeys.length > 0"> | |
22 | + <a-menu slot="overlay"> | |
23 | + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |
24 | + </a-menu> | |
25 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |
26 | + </a-dropdown> | |
27 | + </div> | |
28 | + | |
29 | + <!-- table区域-begin --> | |
30 | + <div> | |
31 | + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
32 | + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |
33 | + <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
34 | + </div> | |
35 | + | |
36 | + <a-table | |
37 | + ref="table" | |
38 | + size="middle" | |
39 | + :scroll="{x:true}" | |
40 | + bordered | |
41 | + rowKey="id" | |
42 | + :columns="columns" | |
43 | + :dataSource="dataSource" | |
44 | + :pagination="ipagination" | |
45 | + :loading="loading" | |
46 | + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
47 | + class="j-table-force-nowrap" | |
48 | + @change="handleTableChange"> | |
49 | + | |
50 | + <span slot="companyCode" slot-scope="companyCode"> | |
51 | + <a-tag :key="companyCode" color=blue> | |
52 | + {{ solutionCompany(companyCode) }} | |
53 | + </a-tag> | |
54 | + </span> | |
55 | + | |
56 | + | |
57 | + <span slot="countType" slot-scope="countType"> | |
58 | + <a-tag :key="countType" color=pink> | |
59 | + {{ solutionCountType(countType) }} | |
60 | + </a-tag> | |
61 | + </span> | |
62 | + | |
63 | + <template slot="htmlSlot" slot-scope="text"> | |
64 | + <div v-html="text"></div> | |
65 | + </template> | |
66 | + <template slot="imgSlot" slot-scope="text"> | |
67 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
68 | + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
69 | + </template> | |
70 | + <template slot="fileSlot" slot-scope="text"> | |
71 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
72 | + <a-button | |
73 | + v-else | |
74 | + :ghost="true" | |
75 | + type="primary" | |
76 | + icon="download" | |
77 | + size="small" | |
78 | + @click="downloadFile(text)"> | |
79 | + 下载 | |
80 | + </a-button> | |
81 | + </template> | |
82 | + | |
83 | + <span slot="action" slot-scope="text, record"> | |
84 | + <a @click="handleEdit(record)">编辑</a> | |
85 | + | |
86 | + <a-divider type="vertical" /> | |
87 | + <a-dropdown> | |
88 | + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
89 | + <a-menu slot="overlay"> | |
90 | + <a-menu-item> | |
91 | + <a @click="handleDetail(record)">详情</a> | |
92 | + </a-menu-item> | |
93 | + <a-menu-item> | |
94 | + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
95 | + <a>删除</a> | |
96 | + </a-popconfirm> | |
97 | + </a-menu-item> | |
98 | + </a-menu> | |
99 | + </a-dropdown> | |
100 | + </span> | |
101 | + | |
102 | + </a-table> | |
103 | + </div> | |
104 | + | |
105 | + <cycle-count-header-modal ref="modalForm" @ok="modalFormOk"></cycle-count-header-modal> | |
106 | + </a-card> | |
107 | +</template> | |
108 | + | |
109 | +<script> | |
110 | + | |
111 | + import '@/assets/less/TableExpand.less' | |
112 | + import { mixinDevice } from '@/utils/mixin' | |
113 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
114 | + import {getCompanyList} from '@/api/api' | |
115 | + import {getCountTypeList} from '@/api/api' | |
116 | + import CycleCountHeaderModal from './modules/CycleCountHeaderModal' | |
117 | + | |
118 | + export default { | |
119 | + name: 'CycleCountHeaderList', | |
120 | + mixins:[JeecgListMixin, mixinDevice], | |
121 | + components: { | |
122 | + CycleCountHeaderModal | |
123 | + }, | |
124 | + data () { | |
125 | + return { | |
126 | + description: '盘点主表管理页面', | |
127 | + companyList: [], | |
128 | + CountTypeList:[], | |
129 | + // 表头 | |
130 | + columns: [ | |
131 | + { | |
132 | + title: 'ID', | |
133 | + dataIndex: '', | |
134 | + key:'rowIndex', | |
135 | + width:60, | |
136 | + align:"center", | |
137 | + customRender:function (t,r,index) { | |
138 | + return parseInt(index)+1; | |
139 | + } | |
140 | + }, | |
141 | + { | |
142 | + title:'盘点单编码', | |
143 | + align:"center", | |
144 | + dataIndex: 'code' | |
145 | + }, | |
146 | + { | |
147 | + title:'货主编码', | |
148 | + align: "center", | |
149 | + dataIndex: 'companyCode', | |
150 | + key: 'companyCode', | |
151 | + scopedSlots: {customRender: 'companyCode'} | |
152 | + }, | |
153 | + { | |
154 | + title:'总货位数', | |
155 | + align:"center", | |
156 | + dataIndex: 'totalLocs' | |
157 | + }, | |
158 | + { | |
159 | + title:'总物料数', | |
160 | + align:"center", | |
161 | + dataIndex: 'totalItems' | |
162 | + }, | |
163 | + { | |
164 | + title:'盘点类型', | |
165 | + align:"center", | |
166 | + dataIndex: 'countType', | |
167 | + key: 'countType', | |
168 | + scopedSlots: {customRender: 'countType'} | |
169 | + }, | |
170 | + { | |
171 | + title:'盘点主单状态', | |
172 | + align:"center", | |
173 | + dataIndex: 'statusCyc_dictText' | |
174 | + }, | |
175 | + { | |
176 | + title:'指定盘点人员', | |
177 | + align:"center", | |
178 | + dataIndex: 'stocktakingAs' | |
179 | + }, | |
180 | + { | |
181 | + title:'实际盘点人员', | |
182 | + align:"center", | |
183 | + dataIndex: 'stocktakingAc' | |
184 | + }, | |
185 | + { | |
186 | + title:'是否有效', | |
187 | + align:"center", | |
188 | + dataIndex: 'enable_dictText' | |
189 | + }, | |
190 | + // { | |
191 | + // title:'回传时间', | |
192 | + // align:"center", | |
193 | + // dataIndex: 'uploadTime' | |
194 | + // }, | |
195 | + // { | |
196 | + // title:'回传状态', | |
197 | + // align:"center", | |
198 | + // dataIndex: 'uploadStatusString' | |
199 | + // }, | |
200 | + // { | |
201 | + // title:'关闭人', | |
202 | + // align:"center", | |
203 | + // dataIndex: 'closedBy' | |
204 | + // }, | |
205 | + { | |
206 | + title:'备注', | |
207 | + align:"center", | |
208 | + dataIndex: 'remark' | |
209 | + }, | |
210 | + { | |
211 | + title: '操作', | |
212 | + dataIndex: 'action', | |
213 | + align:"center", | |
214 | + fixed:"right", | |
215 | + width:147, | |
216 | + scopedSlots: { customRender: 'action' } | |
217 | + } | |
218 | + ], | |
219 | + url: { | |
220 | + list: "/cycleCountHeader/cycleCountHeader/list", | |
221 | + delete: "/cycleCountHeader/cycleCountHeader/delete", | |
222 | + deleteBatch: "/cycleCountHeader/cycleCountHeader/deleteBatch", | |
223 | + exportXlsUrl: "/cycleCountHeader/cycleCountHeader/exportXls", | |
224 | + importExcelUrl: "cycleCountHeader/cycleCountHeader/importExcel", | |
225 | + | |
226 | + }, | |
227 | + dictOptions:{ | |
228 | + status: [], | |
229 | + }, | |
230 | + superFieldList:[], | |
231 | + } | |
232 | + }, | |
233 | + created() { | |
234 | + this.getSuperFieldList(); | |
235 | + this.loadFrom(); | |
236 | + }, | |
237 | + computed: { | |
238 | + importExcelUrl: function(){ | |
239 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
240 | + }, | |
241 | + }, | |
242 | + methods: { | |
243 | + initDictConfig(){ | |
244 | + }, | |
245 | + getSuperFieldList(){ | |
246 | + let fieldList=[]; | |
247 | + fieldList.push({type:'string',value:'code',text:'盘点主表编号',dictCode:''}) | |
248 | + fieldList.push({type:'string',value:'companyCode',text:'货主编码',dictCode:''}) | |
249 | + fieldList.push({type:'string',value:'countType',text:'盘点类型',dictCode:''}) | |
250 | + fieldList.push({type:'int',value:'statusCyc',text:'盘点状态',dictCode:'cyclecount_status'}) | |
251 | + fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''}) | |
252 | + fieldList.push({type:'int',value:'totalLocs',text:'总货位数',dictCode:''}) | |
253 | + fieldList.push({type:'int',value:'totalItems',text:'总物料数',dictCode:''}) | |
254 | + fieldList.push({type:'string',value:'stocktakingAs',text:'指定盘点人员',dictCode:''}) | |
255 | + fieldList.push({type:'string',value:'stocktakingAc',text:'实际盘点人员',dictCode:''}) | |
256 | + fieldList.push({type:'int',value:'enable',text:'是否有效',dictCode:'valid_status'}) | |
257 | + fieldList.push({type:'datetime',value:'uploadTime',text:'回传时间'}) | |
258 | + fieldList.push({type:'int',value:'uploadStatus',text:'回传状态',dictCode:'valid_status'}) | |
259 | + fieldList.push({type:'string',value:'closedBy',text:'关闭人',dictCode:''}) | |
260 | + this.superFieldList = fieldList | |
261 | + }, | |
262 | + loadFrom() { | |
263 | + getCompanyList().then((res) => { | |
264 | + if (res.success) { | |
265 | + this.companyList = res.result | |
266 | + } | |
267 | + }); | |
268 | + getCountTypeList().then((res) => { | |
269 | + if (res.success) { | |
270 | + this.CountTypeList = res.result | |
271 | + } | |
272 | + }); | |
273 | + }, | |
274 | + solutionCompany(value) { | |
275 | + var actions = [] | |
276 | + Object.keys(this.companyList).some((key) => { | |
277 | + if (this.companyList[key].code == ('' + value)) { | |
278 | + actions.push(this.companyList[key].name) | |
279 | + return true | |
280 | + } | |
281 | + }) | |
282 | + return actions.join('') | |
283 | + }, | |
284 | + | |
285 | + solutionCountType(value) { | |
286 | + var actions = [] | |
287 | + Object.keys(this.CountTypeList).some((key) => { | |
288 | + if (this.CountTypeList[key].code == ('' + value)) { | |
289 | + actions.push(this.CountTypeList[key].name) | |
290 | + return true | |
291 | + } | |
292 | + }) | |
293 | + return actions.join('') | |
294 | + }, | |
295 | + | |
296 | + } | |
297 | + } | |
298 | +</script> | |
299 | +<style scoped> | |
300 | + @import '~@assets/less/common.less'; | |
301 | +</style> | |
0 | 302 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/modules/CycleCountDetailChildForm.vue
0 → 100644
1 | +<template> | |
2 | + <j-form-container :disabled="disabled"> | |
3 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |
4 | + <a-row> | |
5 | + <a-col :xs="24" :sm="12"> | |
6 | + <a-form-model-item label="盘点主单code" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cyclecountheadcode"> | |
7 | + <a-input v-model="model.cyclecountheadcode" placeholder="请输入盘点主单code"></a-input> | |
8 | + </a-form-model-item> | |
9 | + </a-col> | |
10 | + <a-col :xs="24" :sm="12"> | |
11 | + <a-form-model-item label="盘点明细ID主id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cycleCountDetailid"> | |
12 | + <a-input v-model="model.cycleCountDetailid" placeholder="请输入盘点明细ID主id"></a-input> | |
13 | + </a-form-model-item> | |
14 | + </a-col> | |
15 | + <a-col :xs="24" :sm="12"> | |
16 | + <a-form-model-item label="盘点明细子单状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="childStatus"> | |
17 | + <a-input v-model="model.childStatus" placeholder="请输入盘点明细子单状态"></a-input> | |
18 | + </a-form-model-item> | |
19 | + </a-col> | |
20 | + <a-col :xs="24" :sm="12"> | |
21 | + <a-form-model-item label="库位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationCode"> | |
22 | + <a-input v-model="model.locationCode" placeholder="请输入库位"></a-input> | |
23 | + </a-form-model-item> | |
24 | + </a-col> | |
25 | + <a-col :xs="24" :sm="12"> | |
26 | + <a-form-model-item label="容器" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
27 | + <a-input v-model="model.containerCode" placeholder="请输入容器"></a-input> | |
28 | + </a-form-model-item> | |
29 | + </a-col> | |
30 | + <a-col :xs="24" :sm="12"> | |
31 | + <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode"> | |
32 | + <a-input v-model="model.materialCode" placeholder="请输入物料编码"></a-input> | |
33 | + </a-form-model-item> | |
34 | + </a-col> | |
35 | + <a-col :xs="24" :sm="12"> | |
36 | + <a-form-model-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialName"> | |
37 | + <a-input v-model="model.materialName" placeholder="请输入物料名称"></a-input> | |
38 | + </a-form-model-item> | |
39 | + </a-col> | |
40 | + <a-col :xs="24" :sm="12"> | |
41 | + <a-form-model-item label="物料规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialSpec"> | |
42 | + <a-input v-model="model.materialSpec" placeholder="请输入物料规格"></a-input> | |
43 | + </a-form-model-item> | |
44 | + </a-col> | |
45 | + <a-col :xs="24" :sm="12"> | |
46 | + <a-form-model-item label="物料单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialUnit"> | |
47 | + <a-input v-model="model.materialUnit" placeholder="请输入物料单位"></a-input> | |
48 | + </a-form-model-item> | |
49 | + </a-col> | |
50 | + <a-col :xs="24" :sm="12"> | |
51 | + <a-form-model-item label="系统数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="systemQty"> | |
52 | + <a-input v-model="model.systemQty" placeholder="请输入系统数量"></a-input> | |
53 | + </a-form-model-item> | |
54 | + </a-col> | |
55 | + <a-col :xs="24" :sm="12"> | |
56 | + <a-form-model-item label="实盘数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="countedQty"> | |
57 | + <a-input v-model="model.countedQty" placeholder="请输入实盘数量"></a-input> | |
58 | + </a-form-model-item> | |
59 | + </a-col> | |
60 | + <a-col :xs="24" :sm="12"> | |
61 | + <a-form-model-item label="差异数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="gapQty"> | |
62 | + <a-input v-model="model.gapQty" placeholder="请输入差异数量"></a-input> | |
63 | + </a-form-model-item> | |
64 | + </a-col> | |
65 | + <a-col :xs="24" :sm="12"> | |
66 | + <a-form-model-item label="库存明细id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryDetaiId"> | |
67 | + <a-input v-model="model.inventoryDetaiId" placeholder="请输入库存明细id"></a-input> | |
68 | + </a-form-model-item> | |
69 | + </a-col> | |
70 | + </a-row> | |
71 | + </a-form-model> | |
72 | + </j-form-container> | |
73 | +</template> | |
74 | +<script> | |
75 | + import { getAction } from '@/api/manage' | |
76 | + import { validateDuplicateValue } from '@/utils/util' | |
77 | + import { VALIDATE_NO_PASSED } from '@/utils/JEditableTableUtil' | |
78 | + | |
79 | + export default { | |
80 | + name: 'CycleCountDetailChildForm', | |
81 | + components: { | |
82 | + }, | |
83 | + props:{ | |
84 | + disabled: { | |
85 | + type: Boolean, | |
86 | + default: false, | |
87 | + required: false | |
88 | + } | |
89 | + }, | |
90 | + data () { | |
91 | + return { | |
92 | + model:{ | |
93 | + }, | |
94 | + labelCol: { | |
95 | + xs: { span: 24 }, | |
96 | + sm: { span: 5 }, | |
97 | + }, | |
98 | + wrapperCol: { | |
99 | + xs: { span: 24 }, | |
100 | + sm: { span: 16 }, | |
101 | + }, | |
102 | +validatorRules: { | |
103 | +}, | |
104 | + confirmLoading: false, | |
105 | + } | |
106 | + }, | |
107 | + created () { | |
108 | + //备份model原始值 | |
109 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
110 | + }, | |
111 | + methods:{ | |
112 | + initFormData(url,id){ | |
113 | + this.clearFormData() | |
114 | + if(!id){ | |
115 | + this.edit(this.modelDefault); | |
116 | + }else{ | |
117 | + getAction(url,{id:id}).then(res=>{ | |
118 | + if(res.success){ | |
119 | + let records = res.result.records | |
120 | + if(records && records.length>0){ | |
121 | + this.edit(records[0]) | |
122 | + } | |
123 | + } | |
124 | + }) | |
125 | + } | |
126 | + }, | |
127 | + edit(record){ | |
128 | + this.model = Object.assign({}, record) | |
129 | + }, | |
130 | + getFormData(){ | |
131 | + let formdata_arr = [] | |
132 | + this.$refs.form.validate(valid => { | |
133 | + if (valid) { | |
134 | + let isNullObj = true | |
135 | + Object.keys(this.model).forEach(key=>{ | |
136 | + if(this.model[key]){ | |
137 | + isNullObj = false | |
138 | + } | |
139 | + }) | |
140 | + if(!isNullObj){ | |
141 | + formdata_arr.push(this.model) | |
142 | + } | |
143 | + }else{ | |
144 | + this.$emit("validateError","盘点容器明细表表单校验未通过"); | |
145 | + return false | |
146 | + } | |
147 | + }) | |
148 | + return formdata_arr; | |
149 | + }, | |
150 | + validate(index){ | |
151 | + return new Promise((resolve, reject) => { | |
152 | + // 验证主表表单 | |
153 | + this.$refs.form.validate(valid => { | |
154 | + !valid ? reject({ error: VALIDATE_NO_PASSED ,index}) : resolve() | |
155 | + }) | |
156 | + }).then(values => { | |
157 | + return Promise.resolve() | |
158 | + }).catch(error => { | |
159 | + return Promise.reject(error) | |
160 | + }) | |
161 | + | |
162 | + }, | |
163 | + clearFormData(){ | |
164 | + this.$refs.form.clearValidate() | |
165 | + } | |
166 | + | |
167 | + } | |
168 | + } | |
169 | +</script> | |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/modules/CycleCountDetailForm.vue
0 → 100644
1 | +<template> | |
2 | + <a-spin :spinning="confirmLoading"> | |
3 | + <j-form-container :disabled="formDisabled"> | |
4 | + <!-- 主表单区域 --> | |
5 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |
6 | + <a-row> | |
7 | + <a-col :xs="24" :sm="12"> | |
8 | + <a-form-model-item label="盘点主单id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cycleCountHeadId"> | |
9 | + <a-input v-model="model.cycleCountHeadId" placeholder="请输入盘点主单id" ></a-input> | |
10 | + </a-form-model-item> | |
11 | + </a-col> | |
12 | + <a-col :xs="24" :sm="12"> | |
13 | + <a-form-model-item label="盘点主单code" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cycleCountHeadCode"> | |
14 | + <a-input v-model="model.cycleCountHeadCode" placeholder="请输入盘点主单code" ></a-input> | |
15 | + </a-form-model-item> | |
16 | + </a-col> | |
17 | + <a-col :xs="24" :sm="12"> | |
18 | + <a-form-model-item label="任务表头" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskHeaderId"> | |
19 | + <a-input v-model="model.taskHeaderId" placeholder="请输入任务表头" ></a-input> | |
20 | + </a-form-model-item> | |
21 | + </a-col> | |
22 | + <a-col :xs="24" :sm="12"> | |
23 | + <a-form-model-item label="任务明细头" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taskDetailId"> | |
24 | + <a-input v-model="model.taskDetailId" placeholder="请输入任务明细头" ></a-input> | |
25 | + </a-form-model-item> | |
26 | + </a-col> | |
27 | + <a-col :xs="24" :sm="12"> | |
28 | + <a-form-model-item label="仓库" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="warehouseCode"> | |
29 | + <a-input v-model="model.warehouseCode" placeholder="请输入仓库" ></a-input> | |
30 | + </a-form-model-item> | |
31 | + </a-col> | |
32 | + <a-col :xs="24" :sm="12"> | |
33 | + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | |
34 | + <a-input v-model="model.companyCode" placeholder="请输入货主" ></a-input> | |
35 | + </a-form-model-item> | |
36 | + </a-col> | |
37 | + <a-col :xs="24" :sm="12"> | |
38 | + <a-form-model-item label="库存明细头" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventoryDetailId"> | |
39 | + <a-input v-model="model.inventoryDetailId" placeholder="请输入库存明细头" ></a-input> | |
40 | + </a-form-model-item> | |
41 | + </a-col> | |
42 | + <a-col :xs="24" :sm="12"> | |
43 | + <a-form-model-item label="库位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationCode"> | |
44 | + <a-input v-model="model.locationCode" placeholder="请输入库位" ></a-input> | |
45 | + </a-form-model-item> | |
46 | + </a-col> | |
47 | + <a-col :xs="24" :sm="12"> | |
48 | + <a-form-model-item label="容器" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
49 | + <a-input v-model="model.containerCode" placeholder="请输入容器" ></a-input> | |
50 | + </a-form-model-item> | |
51 | + </a-col> | |
52 | + <a-col :xs="24" :sm="12"> | |
53 | + <a-form-model-item label="库存状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inventorySts"> | |
54 | + <a-input v-model="model.inventorySts" placeholder="请输入库存状态" ></a-input> | |
55 | + </a-form-model-item> | |
56 | + </a-col> | |
57 | + <a-col :xs="24" :sm="12"> | |
58 | + <a-form-model-item label="系统数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="systemQty"> | |
59 | + <a-input v-model="model.systemQty" placeholder="请输入系统数量" ></a-input> | |
60 | + </a-form-model-item> | |
61 | + </a-col> | |
62 | + <a-col :xs="24" :sm="12"> | |
63 | + <a-form-model-item label="实盘数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="countedQty"> | |
64 | + <a-input v-model="model.countedQty" placeholder="请输入实盘数量" ></a-input> | |
65 | + </a-form-model-item> | |
66 | + </a-col> | |
67 | + <a-col :xs="24" :sm="12"> | |
68 | + <a-form-model-item label="差异数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="gapQty"> | |
69 | + <a-input v-model="model.gapQty" placeholder="请输入差异数量" ></a-input> | |
70 | + </a-form-model-item> | |
71 | + </a-col> | |
72 | + <a-col :xs="24" :sm="12"> | |
73 | + <a-form-model-item label="失败原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rejectionNote"> | |
74 | + <a-input v-model="model.rejectionNote" placeholder="请输入失败原因" ></a-input> | |
75 | + </a-form-model-item> | |
76 | + </a-col> | |
77 | + <a-col :xs="24" :sm="12"> | |
78 | + <a-form-model-item label="完成用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="completedBy"> | |
79 | + <a-input v-model="model.completedBy" placeholder="请输入完成用户" ></a-input> | |
80 | + </a-form-model-item> | |
81 | + </a-col> | |
82 | + <a-col :xs="24" :sm="12"> | |
83 | + <a-form-model-item label="完成时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="completedAt"> | |
84 | + <a-input v-model="model.completedAt" placeholder="请输入完成时间" ></a-input> | |
85 | + </a-form-model-item> | |
86 | + </a-col> | |
87 | + <a-col :xs="24" :sm="12"> | |
88 | + <a-form-model-item label="盘点明细状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enableStatus"> | |
89 | + <a-input v-model="model.enableStatus" placeholder="请输入盘点明细状态" ></a-input> | |
90 | + </a-form-model-item> | |
91 | + </a-col> | |
92 | + </a-row> | |
93 | + </a-form-model> | |
94 | + </j-form-container> | |
95 | + <!-- 子表单区域 --> | |
96 | + <a-tabs v-model="activeKey" @change="handleChangeTabs"> | |
97 | + <a-tab-pane tab="盘点容器明细表" :key="refKeys[0]" :forceRender="true"> | |
98 | + <cycle-count-detail-child-form ref="cycleCountDetailChildForm" @validateError="validateError" :disabled="formDisabled"></cycle-count-detail-child-form> | |
99 | + </a-tab-pane> | |
100 | + | |
101 | + </a-tabs> | |
102 | + </a-spin> | |
103 | +</template> | |
104 | + | |
105 | +<script> | |
106 | + | |
107 | + import { FormTypes,getRefPromise,VALIDATE_NO_PASSED } from '@/utils/JEditableTableUtil' | |
108 | + import { JEditableTableModelMixin } from '@/mixins/JEditableTableModelMixin' | |
109 | + import { validateDuplicateValue } from '@/utils/util' | |
110 | + import CycleCountDetailChildForm from './CycleCountDetailChildForm.vue' | |
111 | + | |
112 | + export default { | |
113 | + name: 'CycleCountDetailForm', | |
114 | + mixins: [JEditableTableModelMixin], | |
115 | + components: { | |
116 | + CycleCountDetailChildForm, | |
117 | + }, | |
118 | + data() { | |
119 | + return { | |
120 | + labelCol: { | |
121 | + xs: { span: 24 }, | |
122 | + sm: { span: 5 }, | |
123 | + }, | |
124 | + wrapperCol: { | |
125 | + xs: { span: 24 }, | |
126 | + sm: { span: 16 }, | |
127 | + }, | |
128 | + model:{ | |
129 | + }, | |
130 | +validatorRules: { | |
131 | +}, | |
132 | + // 新增时子表默认添加几行空数据 | |
133 | + addDefaultRowNum: 1, | |
134 | + refKeys: ['cycleCountDetailChild', ], | |
135 | + tableKeys:[], | |
136 | + activeKey: 'cycleCountDetailChild', | |
137 | + // 盘点容器明细表 | |
138 | + cycleCountDetailChildTable: { | |
139 | + loading: false, | |
140 | + dataSource: [], | |
141 | + columns: [ | |
142 | + ] | |
143 | + }, | |
144 | + url: { | |
145 | + add: "/cycleCountDetail/cycleCountDetail/add", | |
146 | + edit: "/cycleCountDetail/cycleCountDetail/edit", | |
147 | + cycleCountDetailChild: { | |
148 | + list: '/cycleCountDetail/cycleCountDetail/queryCycleCountDetailChildByMainId' | |
149 | + }, | |
150 | + } | |
151 | + } | |
152 | + }, | |
153 | + props: { | |
154 | + //表单禁用 | |
155 | + disabled: { | |
156 | + type: Boolean, | |
157 | + default: false, | |
158 | + required: false | |
159 | + } | |
160 | + }, | |
161 | + computed: { | |
162 | + formDisabled(){ | |
163 | + return this.disabled | |
164 | + }, | |
165 | + }, | |
166 | + created () { | |
167 | + }, | |
168 | + methods: { | |
169 | + addBefore(){ | |
170 | + this.$refs.cycleCountDetailChildForm.clearFormData() | |
171 | + }, | |
172 | + getAllTable() { | |
173 | + let values = this.tableKeys.map(key => getRefPromise(this, key)) | |
174 | + return Promise.all(values) | |
175 | + }, | |
176 | + /** 调用完edit()方法之后会自动调用此方法 */ | |
177 | + editAfter() { | |
178 | + this.$nextTick(() => { | |
179 | + this.$refs.cycleCountDetailChildForm.initFormData(this.url.cycleCountDetailChild.list,this.model.id) | |
180 | + }) | |
181 | + // 加载子表数据 | |
182 | + if (this.model.id) { | |
183 | + let params = { id: this.model.id } | |
184 | + } | |
185 | + }, | |
186 | + //校验所有一对一子表表单 | |
187 | + validateSubForm(allValues){ | |
188 | + return new Promise((resolve,reject)=>{ | |
189 | + Promise.all([ | |
190 | + this.$refs.cycleCountDetailChildForm.validate(0), | |
191 | + ]).then(() => { | |
192 | + resolve(allValues) | |
193 | + }).catch(e => { | |
194 | + if (e.error === VALIDATE_NO_PASSED) { | |
195 | + // 如果有未通过表单验证的子表,就自动跳转到它所在的tab | |
196 | + this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] | |
197 | + } else { | |
198 | + console.error(e) | |
199 | + } | |
200 | + }) | |
201 | + }) | |
202 | + }, | |
203 | + /** 整理成formData */ | |
204 | + classifyIntoFormData(allValues) { | |
205 | + let main = Object.assign(this.model, allValues.formValue) | |
206 | + | |
207 | + return { | |
208 | + ...main, // 展开 | |
209 | + cycleCountDetailChildList: this.$refs.cycleCountDetailChildForm.getFormData(), | |
210 | + } | |
211 | + }, | |
212 | + validateError(msg){ | |
213 | + this.$message.error(msg) | |
214 | + }, | |
215 | + close() { | |
216 | + this.visible = false | |
217 | + this.$emit('close') | |
218 | + this.$refs.form.clearValidate(); | |
219 | + }, | |
220 | + | |
221 | + } | |
222 | + } | |
223 | +</script> | |
224 | + | |
225 | +<style scoped> | |
226 | +</style> | |
0 | 227 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/modules/CycleCountDetailModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="1200" | |
5 | + :visible="visible" | |
6 | + :maskClosable="false" | |
7 | + switchFullscreen | |
8 | + @ok="handleOk" | |
9 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |
10 | + @cancel="handleCancel"> | |
11 | + <cycle-count-detail-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/> | |
12 | + </j-modal> | |
13 | +</template> | |
14 | + | |
15 | +<script> | |
16 | + import CycleCountDetailForm from './CycleCountDetailForm' | |
17 | + export default { | |
18 | + name: 'CycleCountDetailModal', | |
19 | + components: { | |
20 | + CycleCountDetailForm | |
21 | + }, | |
22 | + data() { | |
23 | + return { | |
24 | + title:'', | |
25 | + visible: false, | |
26 | + disableSubmit: false | |
27 | + } | |
28 | + }, | |
29 | + methods:{ | |
30 | + add () { | |
31 | + this.visible=true | |
32 | + this.$nextTick(()=>{ | |
33 | + this.$refs.realForm.add(); | |
34 | + }) | |
35 | + }, | |
36 | + edit (record) { | |
37 | + this.visible=true | |
38 | + this.$nextTick(()=>{ | |
39 | + this.$refs.realForm.edit(record); | |
40 | + }) | |
41 | + }, | |
42 | + close () { | |
43 | + this.$emit('close'); | |
44 | + this.visible = false; | |
45 | + }, | |
46 | + handleOk () { | |
47 | + this.$refs.realForm.handleOk(); | |
48 | + }, | |
49 | + submitCallback(){ | |
50 | + this.$emit('ok'); | |
51 | + this.visible = false; | |
52 | + }, | |
53 | + handleCancel () { | |
54 | + this.close() | |
55 | + } | |
56 | + } | |
57 | + } | |
58 | +</script> | |
59 | + | |
60 | +<style scoped> | |
61 | +</style> | |
0 | 62 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/modules/CycleCountHeaderForm.vue
0 → 100644
1 | +<template> | |
2 | + <a-spin :spinning="confirmLoading"> | |
3 | + <j-form-container :disabled="formDisabled"> | |
4 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |
5 | + <a-row> | |
6 | + <a-col :span="24"> | |
7 | + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode"> | |
8 | + <a-select | |
9 | + show-search | |
10 | + placeholder="请选择货主" | |
11 | + option-filter-prop="children" | |
12 | + :filter-option="filterOption" | |
13 | + v-model="model.companyCode"> | |
14 | + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">{{ | |
15 | + item.name | |
16 | + }} | |
17 | + </a-select-option> | |
18 | + </a-select> | |
19 | + </a-form-model-item> | |
20 | + </a-col> | |
21 | + <a-col :span="24"> | |
22 | + <a-form-model-item label="盘点类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="countType"> | |
23 | + <a-select | |
24 | + show-search | |
25 | + placeholder="请输入盘点类型" | |
26 | + option-filter-prop="children" | |
27 | + :filter-option="filterOption" | |
28 | + v-model="model.countType"> | |
29 | + <a-select-option v-for="item in CountTypeList" :key="item.name" :value="item.code">{{ | |
30 | + item.name | |
31 | + }} | |
32 | + </a-select-option> | |
33 | + </a-select> | |
34 | + </a-form-model-item> | |
35 | + </a-col> | |
36 | + | |
37 | + | |
38 | + | |
39 | + <a-col :span="24"> | |
40 | + <a-form-model-item label="指定盘点人员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stocktakingAs"> | |
41 | + <j-select-multi-user v-model="model.stocktakingAs" :query-config="selectUserQueryConfig"/> | |
42 | + </a-form-model-item> | |
43 | + </a-col> | |
44 | + <a-col :span="24"> | |
45 | + <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> | |
46 | + <a-input v-model="model.remark" placeholder="请输入备注" ></a-input> | |
47 | + </a-form-model-item> | |
48 | + </a-col> | |
49 | + </a-row> | |
50 | + </a-form-model> | |
51 | + </j-form-container> | |
52 | + </a-spin> | |
53 | +</template> | |
54 | + | |
55 | +<script> | |
56 | + | |
57 | + import { httpAction, getAction } from '@/api/manage' | |
58 | + import { validateDuplicateValue } from '@/utils/util' | |
59 | + import {getCompanyList} from '@/api/api' | |
60 | + import {getCountTypeList} from '@/api/api' | |
61 | + | |
62 | + export default { | |
63 | + name: 'CycleCountHeaderForm', | |
64 | + components: { | |
65 | + }, | |
66 | + props: { | |
67 | + //表单禁用 | |
68 | + disabled: { | |
69 | + type: Boolean, | |
70 | + default: false, | |
71 | + required: false | |
72 | + } | |
73 | + }, | |
74 | + data () { | |
75 | + return { | |
76 | + // 选择用户查询条件配置 | |
77 | + selectUserQueryConfig: [ | |
78 | + {key: 'phone', label: '电话'}, | |
79 | + ], | |
80 | + companyList: [], | |
81 | + CountTypeList:[], | |
82 | + model:{ | |
83 | + }, | |
84 | + labelCol: { | |
85 | + xs: { span: 24 }, | |
86 | + sm: { span: 5 }, | |
87 | + }, | |
88 | + wrapperCol: { | |
89 | + xs: { span: 24 }, | |
90 | + sm: { span: 16 }, | |
91 | + }, | |
92 | + confirmLoading: false, | |
93 | + validatorRules: { | |
94 | + }, | |
95 | + url: { | |
96 | + add: "/cycleCountHeader/cycleCountHeader/add", | |
97 | + edit: "/cycleCountHeader/cycleCountHeader/edit", | |
98 | + queryById: "/cycleCountHeader/cycleCountHeader/queryById" | |
99 | + } | |
100 | + } | |
101 | + }, | |
102 | + computed: { | |
103 | + formDisabled(){ | |
104 | + return this.disabled | |
105 | + }, | |
106 | + }, | |
107 | + created () { | |
108 | + //备份model原始值 | |
109 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |
110 | + this.loadFrom(); | |
111 | + }, | |
112 | + methods: { | |
113 | + add () { | |
114 | + this.edit(this.modelDefault); | |
115 | + }, | |
116 | + edit (record) { | |
117 | + this.model = Object.assign({}, record); | |
118 | + this.visible = true; | |
119 | + }, | |
120 | + loadFrom() { | |
121 | + getCompanyList().then((res) => { | |
122 | + if (res.success) { | |
123 | + this.companyList = res.result | |
124 | + this.model.companyCode = this.companyList[0].code; | |
125 | + } | |
126 | + }); | |
127 | + | |
128 | + getCountTypeList().then((res) => { | |
129 | + if (res.success) { | |
130 | + this.CountTypeList = res.result | |
131 | + this.model.countType = this.CountTypeList[0].code; | |
132 | + } | |
133 | + }); | |
134 | + }, | |
135 | + submitForm () { | |
136 | + const that = this; | |
137 | + // 触发表单验证 | |
138 | + this.$refs.form.validate(valid => { | |
139 | + if (valid) { | |
140 | + that.confirmLoading = true; | |
141 | + let httpurl = ''; | |
142 | + let method = ''; | |
143 | + if(!this.model.id){ | |
144 | + httpurl+=this.url.add; | |
145 | + method = 'post'; | |
146 | + }else{ | |
147 | + httpurl+=this.url.edit; | |
148 | + method = 'put'; | |
149 | + } | |
150 | + httpAction(httpurl,this.model,method).then((res)=>{ | |
151 | + if(res.success){ | |
152 | + that.$message.success(res.message); | |
153 | + that.$emit('ok'); | |
154 | + }else{ | |
155 | + that.$message.warning(res.message); | |
156 | + } | |
157 | + }).finally(() => { | |
158 | + that.confirmLoading = false; | |
159 | + }) | |
160 | + } | |
161 | + | |
162 | + }) | |
163 | + }, | |
164 | + } | |
165 | + } | |
166 | +</script> | |
0 | 167 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/modules/CycleCountHeaderModal.vue
0 → 100644
1 | +<template> | |
2 | + <j-modal | |
3 | + :title="title" | |
4 | + :width="width" | |
5 | + :visible="visible" | |
6 | + switchFullscreen | |
7 | + @ok="handleOk" | |
8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |
9 | + @cancel="handleCancel" | |
10 | + cancelText="关闭"> | |
11 | + <cycle-count-header-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></cycle-count-header-form> | |
12 | + </j-modal> | |
13 | +</template> | |
14 | + | |
15 | +<script> | |
16 | + | |
17 | + import CycleCountHeaderForm from './CycleCountHeaderForm' | |
18 | + export default { | |
19 | + name: 'CycleCountHeaderModal', | |
20 | + components: { | |
21 | + CycleCountHeaderForm | |
22 | + }, | |
23 | + data () { | |
24 | + return { | |
25 | + title:'', | |
26 | + width:800, | |
27 | + visible: false, | |
28 | + disableSubmit: false | |
29 | + } | |
30 | + }, | |
31 | + methods: { | |
32 | + add () { | |
33 | + this.visible=true | |
34 | + this.$nextTick(()=>{ | |
35 | + this.$refs.realForm.add(); | |
36 | + }) | |
37 | + }, | |
38 | + edit (record) { | |
39 | + this.visible=true | |
40 | + this.$nextTick(()=>{ | |
41 | + this.$refs.realForm.edit(record); | |
42 | + }) | |
43 | + }, | |
44 | + close () { | |
45 | + this.$emit('close'); | |
46 | + this.visible = false; | |
47 | + }, | |
48 | + handleOk () { | |
49 | + this.$refs.realForm.submitForm(); | |
50 | + }, | |
51 | + submitCallback(){ | |
52 | + this.$emit('ok'); | |
53 | + this.visible = false; | |
54 | + }, | |
55 | + handleCancel () { | |
56 | + this.close() | |
57 | + } | |
58 | + } | |
59 | + } | |
60 | +</script> | |
0 | 61 | \ No newline at end of file |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/subTables/CycleCountDetailChildSubTable.vue
0 → 100644
1 | +<template> | |
2 | + <a-table | |
3 | + rowKey="id" | |
4 | + size="middle" | |
5 | + bordered | |
6 | + :loading="loading" | |
7 | + :columns="columns" | |
8 | + :dataSource="dataSource" | |
9 | + :pagination="false" | |
10 | + > | |
11 | + | |
12 | + <template slot="htmlSlot" slot-scope="text"> | |
13 | + <div v-html="text"></div> | |
14 | + </template> | |
15 | + | |
16 | + <template slot="imgSlot" slot-scope="text"> | |
17 | + <div style="font-size: 12px;font-style: italic;"> | |
18 | + <span v-if="!text">无图片</span> | |
19 | + <img v-else :src="getImgView(text)" alt="" style="max-width:80px;height:25px;"/> | |
20 | + </div> | |
21 | + </template> | |
22 | + | |
23 | + <template slot="fileSlot" slot-scope="text"> | |
24 | + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
25 | + <a-button | |
26 | + v-else | |
27 | + ghost | |
28 | + type="primary" | |
29 | + icon="download" | |
30 | + size="small" | |
31 | + @click="downloadFile(text)" | |
32 | + > | |
33 | + <span>下载</span> | |
34 | + </a-button> | |
35 | + </template> | |
36 | + | |
37 | + </a-table> | |
38 | +</template> | |
39 | + | |
40 | +<script> | |
41 | + import { getAction } from '@api/manage' | |
42 | + import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
43 | + | |
44 | + export default { | |
45 | + name: 'CycleCountDetailChildSubTable', | |
46 | + mixins: [JeecgListMixin], | |
47 | + props: { | |
48 | + record: { | |
49 | + type: Object, | |
50 | + default: null, | |
51 | + } | |
52 | + }, | |
53 | + data() { | |
54 | + return { | |
55 | + description: '盘点容器明细表内嵌列表', | |
56 | + disableMixinCreated: true, | |
57 | + loading: false, | |
58 | + dataSource: [], | |
59 | + columns: [ | |
60 | + { | |
61 | + title: '盘点主单code', | |
62 | + align: 'center', | |
63 | + dataIndex: 'cyclecountheadcode', | |
64 | + }, | |
65 | + { | |
66 | + title: '盘点明细ID主id', | |
67 | + align: 'center', | |
68 | + dataIndex: 'cycleCountDetailid', | |
69 | + }, | |
70 | + { | |
71 | + title: '盘点明细子单状态', | |
72 | + align: 'center', | |
73 | + dataIndex: 'childStatus', | |
74 | + }, | |
75 | + { | |
76 | + title: '库位', | |
77 | + align: 'center', | |
78 | + dataIndex: 'locationCode', | |
79 | + }, | |
80 | + { | |
81 | + title: '容器', | |
82 | + align: 'center', | |
83 | + dataIndex: 'containerCode', | |
84 | + }, | |
85 | + { | |
86 | + title: '物料编码', | |
87 | + align: 'center', | |
88 | + dataIndex: 'materialCode', | |
89 | + }, | |
90 | + { | |
91 | + title: '物料名称', | |
92 | + align: 'center', | |
93 | + dataIndex: 'materialName', | |
94 | + }, | |
95 | + { | |
96 | + title: '物料规格', | |
97 | + align: 'center', | |
98 | + dataIndex: 'materialSpec', | |
99 | + }, | |
100 | + { | |
101 | + title: '物料单位', | |
102 | + align: 'center', | |
103 | + dataIndex: 'materialUnit', | |
104 | + }, | |
105 | + { | |
106 | + title: '系统数量', | |
107 | + align: 'center', | |
108 | + dataIndex: 'systemQty', | |
109 | + }, | |
110 | + { | |
111 | + title: '实盘数量', | |
112 | + align: 'center', | |
113 | + dataIndex: 'countedQty', | |
114 | + }, | |
115 | + { | |
116 | + title: '差异数量', | |
117 | + align: 'center', | |
118 | + dataIndex: 'gapQty', | |
119 | + }, | |
120 | + { | |
121 | + title: '库存明细id', | |
122 | + align: 'center', | |
123 | + dataIndex: 'inventoryDetaiId', | |
124 | + }, | |
125 | + ], | |
126 | + url: { | |
127 | + listByMainId: '/cycleCountDetail/cycleCountDetail/queryCycleCountDetailChildByMainId', | |
128 | + }, | |
129 | + } | |
130 | + }, | |
131 | + watch: { | |
132 | + record: { | |
133 | + immediate: true, | |
134 | + handler() { | |
135 | + if (this.record != null) { | |
136 | + this.loadData(this.record) | |
137 | + } | |
138 | + } | |
139 | + } | |
140 | + }, | |
141 | + methods: { | |
142 | + | |
143 | + loadData(record) { | |
144 | + this.loading = true | |
145 | + this.dataSource = [] | |
146 | + getAction(this.url.listByMainId, { | |
147 | + id: record.id | |
148 | + }).then((res) => { | |
149 | + if (res.success) { | |
150 | + this.dataSource = res.result.records | |
151 | + } | |
152 | + }).finally(() => { | |
153 | + this.loading = false | |
154 | + }) | |
155 | + }, | |
156 | + | |
157 | + }, | |
158 | + } | |
159 | +</script> | |
160 | + | |
161 | +<style scoped> | |
162 | + | |
163 | +</style> | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/entity/MesBackShipment.java
1 | 1 | package org.jeecg.modules.wms.api.mes.entity; |
2 | 2 | |
3 | -import lombok.Data; | |
4 | - | |
5 | 3 | import java.math.BigDecimal; |
6 | 4 | |
5 | +import lombok.Data; | |
6 | + | |
7 | 7 | /** |
8 | 8 | * @author 游杰 |
9 | 9 | */ |
... | ... | @@ -12,5 +12,6 @@ public class MesBackShipment { |
12 | 12 | |
13 | 13 | private String shipmentCode; |
14 | 14 | private String materialCode; |
15 | + private String backMesTimeStamp; | |
15 | 16 | private BigDecimal qty; |
16 | 17 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java
... | ... | @@ -217,17 +217,17 @@ public class MesServiceImpl implements IMesService { |
217 | 217 | public Result backMesReceipt(TaskHeader taskHeader) { |
218 | 218 | int status = taskHeader.getStatus(); |
219 | 219 | int taskId = taskHeader.getId(); |
220 | - if (status == QuantityConstant.TASK_STATUS_COMPLETED) { | |
220 | + if (status != QuantityConstant.TASK_STATUS_COMPLETED) { | |
221 | 221 | return Result.ok("回传入库信息失败,任务没完成"); |
222 | 222 | } |
223 | 223 | int backMes = taskHeader.getBackMes(); |
224 | 224 | if (backMes == QuantityConstant.MES_SEND_OK) { |
225 | 225 | return Result.ok("回传入库信息失败,信息已经回传过"); |
226 | 226 | } |
227 | - String backMesTimeStamp = taskHeader.getBackMesTimeStamp(); | |
227 | + String backMesTimeStamp = taskHeader.getBackMesTimestamp(); | |
228 | 228 | if (backMesTimeStamp == null) { |
229 | 229 | backMesTimeStamp = String.valueOf(IdWorker.getId()); |
230 | - taskHeader.setBackMesTimeStamp(backMesTimeStamp); | |
230 | + taskHeader.setBackMesTimestamp(backMesTimeStamp); | |
231 | 231 | boolean success = taskHeaderService.updateById(taskHeader); |
232 | 232 | if (!success) { |
233 | 233 | throw new ServiceException("回传入库信息失败,更新任务时间戳失败"); |
... | ... | @@ -279,13 +279,25 @@ public class MesServiceImpl implements IMesService { |
279 | 279 | public Result backMesShipment(TaskHeader taskHeader) { |
280 | 280 | int status = taskHeader.getStatus(); |
281 | 281 | int taskId = taskHeader.getId(); |
282 | - if (status == QuantityConstant.TASK_STATUS_COMPLETED) { | |
282 | + if (status != QuantityConstant.TASK_STATUS_COMPLETED) { | |
283 | 283 | return Result.ok("回传出库信息失败,任务没完成"); |
284 | 284 | } |
285 | + | |
285 | 286 | int backMes = taskHeader.getBackMes(); |
286 | 287 | if (backMes == QuantityConstant.MES_SEND_OK) { |
287 | 288 | return Result.ok("回传出库信息失败,信息已经回传过"); |
288 | 289 | } |
290 | + | |
291 | + String backMesTimeStamp = taskHeader.getBackMesTimestamp(); | |
292 | + if (backMesTimeStamp == null) { | |
293 | + backMesTimeStamp = String.valueOf(IdWorker.getId()); | |
294 | + taskHeader.setBackMesTimestamp(backMesTimeStamp); | |
295 | + boolean success = taskHeaderService.updateById(taskHeader); | |
296 | + if (!success) { | |
297 | + throw new ServiceException("回传出库信息失败,更新任务时间戳失败"); | |
298 | + } | |
299 | + } | |
300 | + | |
289 | 301 | List<TaskDetail> taskDetailList = taskDetailService.getTaskDetailListByTaskId(taskId); |
290 | 302 | List<MesBackShipment> mesBackShipmentList = new ArrayList<>(); |
291 | 303 | for (TaskDetail taskDetail : taskDetailList) { |
... | ... | @@ -299,6 +311,7 @@ public class MesServiceImpl implements IMesService { |
299 | 311 | String shipmentCode = shipmentDetail.getShipmentCode(); |
300 | 312 | MesBackShipment mesBackShipment = new MesBackShipment(); |
301 | 313 | mesBackShipment.setShipmentCode(shipmentCode); |
314 | + mesBackShipment.setBackMesTimeStamp(backMesTimeStamp); | |
302 | 315 | mesBackShipment.setQty(qty); |
303 | 316 | mesBackShipment.setMaterialCode(materialCode); |
304 | 317 | mesBackShipmentList.add(mesBackShipment); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/entity/WcsTask.java
... | ... | @@ -2,9 +2,6 @@ package org.jeecg.modules.wms.api.wcs.entity; |
2 | 2 | |
3 | 3 | import lombok.Data; |
4 | 4 | |
5 | -import java.io.Serializable; | |
6 | -import java.util.List; | |
7 | - | |
8 | 5 | /** |
9 | 6 | * wcs任务接口实体层 |
10 | 7 | * @author ricard |
... | ... | @@ -61,4 +58,12 @@ public class WcsTask { |
61 | 58 | // 备注 |
62 | 59 | private String remark; |
63 | 60 | |
61 | + // 出库单顺序,越小优先级越大 | |
62 | + private long shipmentOrder; | |
63 | + | |
64 | + // 顺序 | |
65 | + private int sequence; | |
66 | + | |
67 | + // 顺序数量 | |
68 | + private int sequenceNumber; | |
64 | 69 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... | ... | @@ -353,6 +353,9 @@ public class WcsServiceImpl implements WcsService { |
353 | 353 | } else { |
354 | 354 | wcsTask.setToLocationCode(toLocationCode); |
355 | 355 | } |
356 | + wcsTask.setShipmentOrder(taskHeader.getShipmentOrder()); | |
357 | + wcsTask.setSequence(taskHeader.getSequence()); | |
358 | + wcsTask.setSequenceNumber(taskHeader.getSequenceNumber()); | |
356 | 359 | wcsTask.setPriority(10); |
357 | 360 | wcsTask.setPlatform(QuantityConstant.PLATFORM_WMS); |
358 | 361 | wcsTask.setRemark(QuantityConstant.EMPTY_STRING); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/cycleCountPreference/controller/CycleCountPreferenceController.java
... | ... | @@ -10,9 +10,12 @@ import java.net.URLDecoder; |
10 | 10 | import javax.servlet.http.HttpServletRequest; |
11 | 11 | import javax.servlet.http.HttpServletResponse; |
12 | 12 | |
13 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
14 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
13 | 15 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
14 | 16 | import org.jeecg.common.api.vo.Result; |
15 | 17 | import org.jeecg.common.system.query.QueryGenerator; |
18 | +import org.jeecg.modules.wms.config.company.entity.Company; | |
16 | 19 | import org.jeecg.utils.HuahengJwtUtil; |
17 | 20 | import org.jeecg.common.util.oConvertUtils; |
18 | 21 | |
... | ... | @@ -134,6 +137,23 @@ public class CycleCountPreferenceController extends JeecgController<CycleCountPr |
134 | 137 | return Result.OK("批量删除成功!"); |
135 | 138 | } |
136 | 139 | |
140 | + | |
141 | + | |
142 | + /** | |
143 | + * 获得盘点类型信息 | |
144 | + * @param req | |
145 | + */ | |
146 | + @RequestMapping(value = "/getCountTypeList") | |
147 | + public Result<?> getCountTypeList(HttpServletRequest req) { | |
148 | + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | |
149 | + LambdaQueryWrapper<CycleCountPreference> companyLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
150 | + companyLambdaQueryWrapper.eq(CycleCountPreference::getWarehouseCode, warehouseCode); | |
151 | + List<CycleCountPreference> cycleCountPreferenceList = cycleCountPreferenceService.list(companyLambdaQueryWrapper); | |
152 | + return Result.OK(cycleCountPreferenceList); | |
153 | + } | |
154 | + | |
155 | + | |
156 | + | |
137 | 157 | /** |
138 | 158 | * 通过id查询 |
139 | 159 | * @param id |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java
1 | 1 | package org.jeecg.modules.wms.inventory.inventoryHeader.service; |
2 | 2 | |
3 | -import com.baomidou.mybatisplus.extension.service.IService; | |
3 | +import java.math.BigDecimal; | |
4 | +import java.util.List; | |
5 | + | |
4 | 6 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
5 | 7 | |
6 | -import java.util.List; | |
8 | +import com.baomidou.mybatisplus.extension.service.IService; | |
7 | 9 | |
8 | 10 | /** |
9 | 11 | * @Description: 库存详情 |
... | ... | @@ -18,4 +20,7 @@ public interface IInventoryDetailService extends IService<InventoryDetail> { |
18 | 20 | List<InventoryDetail> getInventoryDetailListByInventoryHeaderId(Integer inventoryHeaderId); |
19 | 21 | |
20 | 22 | List<InventoryDetail> getInventoryDetailListByContainerCode(String containerCode, String warehouseCode); |
23 | + | |
24 | + // 求一种物料的库存之和 | |
25 | + BigDecimal getSumQty(InventoryDetail inventoryDetail); | |
21 | 26 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.inventory.inventoryHeader.service.impl; |
2 | 2 | |
3 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
3 | +import java.math.BigDecimal; | |
4 | +import java.util.List; | |
5 | + | |
5 | 6 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
6 | 7 | import org.jeecg.modules.wms.inventory.inventoryHeader.mapper.InventoryDetailMapper; |
7 | 8 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
9 | +import org.jeecg.utils.StringUtils; | |
10 | +import org.springframework.beans.factory.annotation.Autowired; | |
8 | 11 | import org.springframework.stereotype.Service; |
9 | 12 | |
10 | -import java.lang.ref.WeakReference; | |
11 | -import java.util.List; | |
13 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
14 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
12 | 15 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
13 | -import org.springframework.beans.factory.annotation.Autowired; | |
14 | 16 | |
15 | 17 | /** |
16 | 18 | * @Description: 库存详情 |
... | ... | @@ -44,4 +46,23 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe |
44 | 46 | List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); |
45 | 47 | return inventoryDetailList; |
46 | 48 | } |
49 | + | |
50 | + @Override | |
51 | + public BigDecimal getSumQty(InventoryDetail inventoryDetail) { | |
52 | + LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
53 | + inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getInventoryStatus, inventoryDetail.getInventoryStatus()) | |
54 | + .eq(InventoryDetail::getMaterialCode, inventoryDetail.getMaterialCode()).eq(InventoryDetail::getWarehouseCode, inventoryDetail.getWarehouseCode()) | |
55 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getBatch()), InventoryDetail::getBatch, inventoryDetail.getBatch()) | |
56 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getLot()), InventoryDetail::getLot, inventoryDetail.getLot()) | |
57 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getProject()), InventoryDetail::getProject, inventoryDetail.getLot()) | |
58 | + .eq(InventoryDetail::getCompanyCode, inventoryDetail.getCompanyCode()); | |
59 | + List<InventoryDetail> inventoryDetailList = list(inventoryDetailLambdaQueryWrapper); | |
60 | + if (inventoryDetailList.size() == 0) { | |
61 | + return BigDecimal.ZERO; | |
62 | + } | |
63 | + BigDecimal totalQty = inventoryDetailList.stream().map(InventoryDetail::getQty).reduce(BigDecimal.ZERO, BigDecimal::add); | |
64 | + BigDecimal totalTaskQty = inventoryDetailList.stream().map(InventoryDetail::getTaskQty).reduce(BigDecimal.ZERO, BigDecimal::add); | |
65 | + BigDecimal sumQty = totalQty.subtract(totalTaskQty); | |
66 | + return sumQty; | |
67 | + } | |
47 | 68 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/ErpTask.java
1 | 1 | package org.jeecg.modules.wms.monitor.job; |
2 | 2 | |
3 | -import com.baomidou.mybatisplus.core.conditions.Wrapper; | |
4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
6 | -import lombok.extern.slf4j.Slf4j; | |
3 | +import java.util.HashMap; | |
4 | +import java.util.List; | |
5 | +import java.util.Map; | |
6 | + | |
7 | +import javax.annotation.Resource; | |
8 | + | |
7 | 9 | import org.apache.commons.collections.MapUtils; |
8 | 10 | import org.jeecg.modules.wms.api.erp.service.IErpService; |
9 | 11 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
... | ... | @@ -15,10 +17,10 @@ import org.quartz.Job; |
15 | 17 | import org.quartz.JobExecutionContext; |
16 | 18 | import org.quartz.JobExecutionException; |
17 | 19 | |
18 | -import javax.annotation.Resource; | |
19 | -import java.util.HashMap; | |
20 | -import java.util.List; | |
21 | -import java.util.Map; | |
20 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
21 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
22 | + | |
23 | +import lombok.extern.slf4j.Slf4j; | |
22 | 24 | |
23 | 25 | /** |
24 | 26 | * 定时回传ERP |
... | ... | @@ -39,7 +41,7 @@ public class ErpTask implements Job { |
39 | 41 | |
40 | 42 | @Override |
41 | 43 | public void execute(JobExecutionContext context) throws JobExecutionException { |
42 | - String taskKey = "erpBack"; | |
44 | + String taskKey = "ErpTask"; | |
43 | 45 | if (MapUtils.getBoolean(runningTaskMap, taskKey, false)) { |
44 | 46 | return; |
45 | 47 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/MesTask.java
... | ... | @@ -40,7 +40,7 @@ public class MesTask implements Job { |
40 | 40 | */ |
41 | 41 | @Override |
42 | 42 | public void execute(JobExecutionContext context) throws JobExecutionException { |
43 | - String taskKey = "mesBack"; | |
43 | + String taskKey = "MesTask"; | |
44 | 44 | if (MapUtils.getBoolean(runningTaskMap, taskKey, false)) { |
45 | 45 | return; |
46 | 46 | } |
... | ... | @@ -48,7 +48,8 @@ public class MesTask implements Job { |
48 | 48 | runningTaskMap.put(taskKey, true); |
49 | 49 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
50 | 50 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED).ne(TaskHeader::getBackMes, QuantityConstant.MES_SEND_OK) |
51 | - .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_WHOLERECEIPT, QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT); | |
51 | + .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_WHOLERECEIPT, QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) | |
52 | + .le(TaskHeader::getBackMesTimes, QuantityConstant.MAX_MES_TRY_TIMES); | |
52 | 53 | List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper); |
53 | 54 | for (TaskHeader taskHeader : taskHeaderList) { |
54 | 55 | try { |
... | ... | @@ -61,7 +62,8 @@ public class MesTask implements Job { |
61 | 62 | |
62 | 63 | taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
63 | 64 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED).ne(TaskHeader::getBackMes, QuantityConstant.MES_SEND_OK) |
64 | - .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); | |
65 | + .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, QuantityConstant.TASK_TYPE_SORTINGSHIPMENT) | |
66 | + .le(TaskHeader::getBackMesTimes, QuantityConstant.MAX_MES_TRY_TIMES); | |
65 | 67 | taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper); |
66 | 68 | for (TaskHeader taskHeader : taskHeaderList) { |
67 | 69 | try { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/MesTrYTask.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.job; | |
2 | + | |
3 | +import java.util.HashMap; | |
4 | +import java.util.List; | |
5 | +import java.util.Map; | |
6 | + | |
7 | +import javax.annotation.Resource; | |
8 | + | |
9 | +import org.apache.commons.collections.MapUtils; | |
10 | +import org.jeecg.modules.wms.api.mes.servuce.IMesService; | |
11 | +import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | |
12 | +import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; | |
13 | +import org.jeecg.utils.constant.QuantityConstant; | |
14 | +import org.quartz.Job; | |
15 | +import org.quartz.JobExecutionContext; | |
16 | +import org.quartz.JobExecutionException; | |
17 | + | |
18 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
19 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
20 | + | |
21 | +import lombok.extern.slf4j.Slf4j; | |
22 | + | |
23 | +/** | |
24 | + * @author 游杰 | |
25 | + */ | |
26 | +@Slf4j | |
27 | +public class MesTrYTask implements Job { | |
28 | + | |
29 | + @Resource | |
30 | + private IMesService mesService; | |
31 | + @Resource | |
32 | + private ITaskHeaderService taskHeaderService; | |
33 | + // 并发控制 | |
34 | + Map<String, Boolean> runningTaskMap = new HashMap<>(); | |
35 | + | |
36 | + /** | |
37 | + * 找到完成状态的,没有回传成功的所有任务,然后回传信息给MES | |
38 | + * @param context | |
39 | + * @throws JobExecutionException | |
40 | + */ | |
41 | + @Override | |
42 | + public void execute(JobExecutionContext context) throws JobExecutionException { | |
43 | + String taskKey = "MesTrYTask"; | |
44 | + if (MapUtils.getBoolean(runningTaskMap, taskKey, false)) { | |
45 | + return; | |
46 | + } | |
47 | + try { | |
48 | + runningTaskMap.put(taskKey, true); | |
49 | + LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
50 | + taskHeaderLambdaQueryWrapper.eq(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED).ne(TaskHeader::getBackMes, QuantityConstant.MES_SEND_OK) | |
51 | + .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_WHOLERECEIPT, QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) | |
52 | + .gt(TaskHeader::getBackMesTimes, QuantityConstant.MAX_MES_TRY_TIMES); | |
53 | + List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper); | |
54 | + for (TaskHeader taskHeader : taskHeaderList) { | |
55 | + try { | |
56 | + taskHeaderService.addMesTryTimes(taskHeader); | |
57 | + mesService.backMesReceipt(taskHeader); | |
58 | + } catch (Exception e) { | |
59 | + e.printStackTrace(); | |
60 | + } | |
61 | + } | |
62 | + | |
63 | + taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
64 | + taskHeaderLambdaQueryWrapper.eq(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED).ne(TaskHeader::getBackMes, QuantityConstant.MES_SEND_OK) | |
65 | + .in(TaskHeader::getTaskType, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, QuantityConstant.TASK_TYPE_SORTINGSHIPMENT) | |
66 | + .gt(TaskHeader::getBackMesTimes, QuantityConstant.MAX_MES_TRY_TIMES); | |
67 | + taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper); | |
68 | + for (TaskHeader taskHeader : taskHeaderList) { | |
69 | + try { | |
70 | + taskHeaderService.addMesTryTimes(taskHeader); | |
71 | + mesService.backMesShipment(taskHeader); | |
72 | + } catch (Exception e) { | |
73 | + e.printStackTrace(); | |
74 | + } | |
75 | + } | |
76 | + } catch (Exception e) { | |
77 | + e.printStackTrace(); | |
78 | + } finally { | |
79 | + runningTaskMap.put(taskKey, false); | |
80 | + } | |
81 | + } | |
82 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/RyTask.java
1 | 1 | package org.jeecg.modules.wms.monitor.job; |
2 | 2 | |
3 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
5 | -import lombok.extern.slf4j.Slf4j; | |
3 | +import java.util.HashMap; | |
4 | +import java.util.List; | |
5 | +import java.util.Map; | |
6 | + | |
7 | +import javax.annotation.Resource; | |
8 | + | |
6 | 9 | import org.apache.commons.collections.MapUtils; |
7 | 10 | import org.jeecg.common.util.DateUtils; |
8 | 11 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
... | ... | @@ -12,10 +15,10 @@ import org.quartz.Job; |
12 | 15 | import org.quartz.JobExecutionContext; |
13 | 16 | import org.quartz.JobExecutionException; |
14 | 17 | |
15 | -import javax.annotation.Resource; | |
16 | -import java.util.HashMap; | |
17 | -import java.util.List; | |
18 | -import java.util.Map; | |
18 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
19 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
20 | + | |
21 | +import lombok.extern.slf4j.Slf4j; | |
19 | 22 | |
20 | 23 | /** |
21 | 24 | * 定时任务 |
... | ... | @@ -32,7 +35,7 @@ public class RyTask implements Job { |
32 | 35 | @Override |
33 | 36 | public void execute(JobExecutionContext context) throws JobExecutionException { |
34 | 37 | log.info(String.format(" Jeecg-Boot 执行任务! 时间:" + DateUtils.getTimestamp())); |
35 | - String taskKey = "executeTask"; | |
38 | + String taskKey = "RyTask"; | |
36 | 39 | if (MapUtils.getBoolean(runningTaskMap, taskKey, false)) { |
37 | 40 | return; |
38 | 41 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.shipment.shipmentCombination.service.impl; |
2 | 2 | |
3 | -import com.aliyun.oss.ServiceException; | |
4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
3 | +import java.math.BigDecimal; | |
4 | +import java.util.ArrayList; | |
5 | +import java.util.List; | |
6 | + | |
7 | +import javax.annotation.Resource; | |
8 | + | |
6 | 9 | import org.jeecg.common.api.vo.Result; |
7 | 10 | import org.jeecg.modules.wms.config.container.entity.Container; |
8 | 11 | import org.jeecg.modules.wms.config.container.service.IContainerService; |
9 | -import org.jeecg.modules.wms.config.container.service.impl.ContainerServiceImpl; | |
10 | 12 | import org.jeecg.modules.wms.config.location.entity.Location; |
11 | 13 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
12 | 14 | import org.jeecg.modules.wms.config.material.entity.Material; |
13 | 15 | import org.jeecg.modules.wms.config.material.service.IMaterialService; |
14 | -import org.jeecg.modules.wms.config.parameterConfiguration.entity.ParameterConfiguration; | |
15 | 16 | import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; |
16 | 17 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
17 | 18 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; |
... | ... | @@ -38,10 +39,9 @@ import org.jeecg.utils.constant.QuantityConstant; |
38 | 39 | import org.springframework.stereotype.Service; |
39 | 40 | import org.springframework.transaction.annotation.Transactional; |
40 | 41 | |
41 | -import javax.annotation.Resource; | |
42 | -import java.math.BigDecimal; | |
43 | -import java.util.ArrayList; | |
44 | -import java.util.List; | |
42 | +import com.aliyun.oss.ServiceException; | |
43 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
44 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
45 | 45 | |
46 | 46 | /** |
47 | 47 | * @author 游杰 |
... | ... | @@ -490,6 +490,9 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
490 | 490 | taskHeader.setTaskType(taskType); |
491 | 491 | taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_SHIPMENT); |
492 | 492 | taskHeader.setZoneCode(zoneCode); |
493 | + taskHeader.setShipmentOrder(shipmentOrder); | |
494 | + taskHeader.setSequence(sequence); | |
495 | + taskHeader.setSequenceNumber(sequenceNumber); | |
493 | 496 | taskHeader.setWarehouseCode(warehouseCode); |
494 | 497 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); |
495 | 498 | taskHeader.setContainerCode(containerCode); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/controller/ShipmentHeaderController.java
1 | 1 | package org.jeecg.modules.wms.shipment.shipmentHeader.controller; |
2 | 2 | |
3 | -import com.aliyun.oss.ServiceException; | |
3 | +import java.io.IOException; | |
4 | +import java.math.BigDecimal; | |
5 | +import java.util.Arrays; | |
6 | +import java.util.List; | |
7 | +import java.util.Map; | |
8 | +import java.util.stream.Collectors; | |
9 | + | |
10 | +import javax.annotation.Resource; | |
11 | +import javax.servlet.http.HttpServletRequest; | |
12 | +import javax.servlet.http.HttpServletResponse; | |
13 | + | |
14 | +import org.apache.shiro.SecurityUtils; | |
4 | 15 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
5 | -import org.jeecg.common.system.query.QueryGenerator; | |
6 | -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
7 | -import com.baomidou.mybatisplus.core.metadata.IPage; | |
8 | -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
9 | -import lombok.extern.slf4j.Slf4j; | |
10 | -import org.jeecg.common.system.base.controller.JeecgController; | |
11 | 16 | import org.jeecg.common.api.vo.Result; |
12 | -import org.jeecg.utils.HuahengJwtUtil; | |
17 | +import org.jeecg.common.aspect.annotation.AutoLog; | |
18 | +import org.jeecg.common.system.base.controller.JeecgController; | |
19 | +import org.jeecg.common.system.query.QueryGenerator; | |
20 | +import org.jeecg.common.system.vo.LoginUser; | |
21 | +import org.jeecg.common.util.oConvertUtils; | |
13 | 22 | import org.jeecg.modules.wms.api.erp.service.IErpService; |
14 | -import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; | |
15 | -import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | |
23 | +import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | |
24 | +import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; | |
16 | 25 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; |
17 | 26 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; |
18 | 27 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; |
19 | 28 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; |
20 | -import org.jeecg.utils.StringUtils; | |
29 | +import org.jeecg.utils.HuahengJwtUtil; | |
21 | 30 | import org.jeecg.utils.constant.QuantityConstant; |
22 | -import org.springframework.beans.factory.annotation.Autowired; | |
23 | -import org.springframework.web.bind.annotation.*; | |
24 | - | |
25 | -import javax.annotation.Resource; | |
26 | -import javax.servlet.http.HttpServletRequest; | |
27 | -import javax.servlet.http.HttpServletResponse; | |
28 | -import org.springframework.web.servlet.ModelAndView; | |
29 | -import java.util.Arrays; | |
30 | -import org.jeecg.common.util.oConvertUtils; | |
31 | -import io.swagger.annotations.Api; | |
32 | -import io.swagger.annotations.ApiOperation; | |
33 | -import org.jeecg.common.aspect.annotation.AutoLog; | |
34 | -import org.apache.shiro.SecurityUtils; | |
35 | -import org.jeecg.common.system.vo.LoginUser; | |
36 | 31 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
37 | 32 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
38 | 33 | import org.jeecgframework.poi.excel.entity.ExportParams; |
39 | 34 | import org.jeecgframework.poi.excel.entity.ImportParams; |
40 | 35 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
36 | +import org.springframework.beans.factory.annotation.Autowired; | |
37 | +import org.springframework.web.bind.annotation.*; | |
41 | 38 | import org.springframework.web.multipart.MultipartFile; |
42 | 39 | import org.springframework.web.multipart.MultipartHttpServletRequest; |
43 | -import java.io.IOException; | |
44 | -import java.util.List; | |
45 | -import java.util.Map; | |
46 | -import java.util.stream.Collectors; | |
40 | +import org.springframework.web.servlet.ModelAndView; | |
41 | + | |
42 | +import com.aliyun.oss.ServiceException; | |
43 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
44 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
45 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
46 | + | |
47 | +import io.swagger.annotations.Api; | |
48 | +import io.swagger.annotations.ApiOperation; | |
49 | +import lombok.extern.slf4j.Slf4j; | |
47 | 50 | |
48 | 51 | /** |
49 | 52 | * @Description: 出库单 |
... | ... | @@ -64,6 +67,8 @@ public class ShipmentHeaderController extends JeecgController<ShipmentHeader, IS |
64 | 67 | private IShipmentDetailService shipmentDetailService; |
65 | 68 | @Resource |
66 | 69 | private IErpService erpService; |
70 | + @Resource | |
71 | + private IInventoryDetailService inventoryDetailService; | |
67 | 72 | |
68 | 73 | /*---------------------------------主表处理-begin-------------------------------------*/ |
69 | 74 | |
... | ... | @@ -173,9 +178,22 @@ public class ShipmentHeaderController extends JeecgController<ShipmentHeader, IS |
173 | 178 | @GetMapping(value = "/listShipmentDetailByMainId") |
174 | 179 | public Result<IPage<ShipmentDetail>> listShipmentDetailByMainId(ShipmentDetail shipmentDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
175 | 180 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
176 | - QueryWrapper<ShipmentDetail> queryWrapper = QueryGenerator.initQueryWrapper(shipmentDetail, req.getParameterMap()); | |
181 | + QueryWrapper<ShipmentDetail> queryWrapper = QueryGenerator.initQueryWrapper(shipmentDetail, null); | |
177 | 182 | Page<ShipmentDetail> page = new Page<ShipmentDetail>(pageNo, pageSize); |
178 | 183 | IPage<ShipmentDetail> pageList = shipmentDetailService.page(page, queryWrapper); |
184 | + List<ShipmentDetail> shipmentDetailList = pageList.getRecords(); | |
185 | + for (ShipmentDetail shipmentDetail1 : shipmentDetailList) { | |
186 | + InventoryDetail inventoryDetail = new InventoryDetail(); | |
187 | + inventoryDetail.setMaterialCode(shipmentDetail1.getMaterialCode()); | |
188 | + inventoryDetail.setWarehouseCode(shipmentDetail1.getWarehouseCode()); | |
189 | + inventoryDetail.setInventoryStatus(shipmentDetail1.getInventoryStatus()); | |
190 | + inventoryDetail.setCompanyCode(shipmentDetail1.getCompanyCode()); | |
191 | + inventoryDetail.setBatch(shipmentDetail1.getBatch()); | |
192 | + inventoryDetail.setProject(shipmentDetail1.getProject()); | |
193 | + inventoryDetail.setLot(shipmentDetail1.getLot()); | |
194 | + BigDecimal sumQty = inventoryDetailService.getSumQty(inventoryDetail); | |
195 | + shipmentDetail1.setInventoryQty(sumQty); | |
196 | + } | |
179 | 197 | return Result.OK(pageList); |
180 | 198 | } |
181 | 199 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentDetail.java
1 | 1 | package org.jeecg.modules.wms.shipment.shipmentHeader.entity; |
2 | 2 | |
3 | 3 | import java.io.Serializable; |
4 | +import java.util.Date; | |
5 | + | |
6 | +import org.jeecg.common.aspect.annotation.Dict; | |
7 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
8 | + | |
4 | 9 | import com.baomidou.mybatisplus.annotation.IdType; |
10 | +import com.baomidou.mybatisplus.annotation.TableField; | |
5 | 11 | import com.baomidou.mybatisplus.annotation.TableId; |
6 | 12 | import com.baomidou.mybatisplus.annotation.TableName; |
7 | -import org.jeecg.common.aspect.annotation.Dict; | |
8 | -import lombok.Data; | |
9 | -import com.fasterxml.jackson.annotation.JsonFormat; | |
10 | -import org.springframework.format.annotation.DateTimeFormat; | |
11 | -import org.jeecgframework.poi.excel.annotation.Excel; | |
12 | -import java.util.Date; | |
13 | + | |
13 | 14 | import io.swagger.annotations.ApiModel; |
14 | 15 | import io.swagger.annotations.ApiModelProperty; |
15 | -import java.io.UnsupportedEncodingException; | |
16 | +import lombok.Data; | |
16 | 17 | |
17 | 18 | /** |
18 | 19 | * @Description: 出库单详情 |
... | ... | @@ -65,10 +66,14 @@ public class ShipmentDetail implements Serializable { |
65 | 66 | @Excel(name = "单据数量", width = 15) |
66 | 67 | @ApiModelProperty(value = "单据数量") |
67 | 68 | private java.math.BigDecimal qty; |
68 | - /** 已收数量 */ | |
69 | - @Excel(name = "已收数量", width = 15) | |
70 | - @ApiModelProperty(value = "已收数量") | |
69 | + /** 已出数量 */ | |
70 | + @Excel(name = "已出数量", width = 15) | |
71 | + @ApiModelProperty(value = "已出数量") | |
71 | 72 | private java.math.BigDecimal taskQty; |
73 | + /** 库存数量 */ | |
74 | + @ApiModelProperty(value = "库存数量") | |
75 | + @TableField(exist = false) | |
76 | + private java.math.BigDecimal inventoryQty; | |
72 | 77 | /** 库存状态 */ |
73 | 78 | @Excel(name = "库存状态", width = 15) |
74 | 79 | @Dict(dicCode = "inventory_status") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/controller/CycleCountDetailController.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.controller; | |
2 | + | |
3 | +import java.io.UnsupportedEncodingException; | |
4 | +import java.io.IOException; | |
5 | +import java.net.URLDecoder; | |
6 | +import java.util.ArrayList; | |
7 | +import java.util.Arrays; | |
8 | +import java.util.List; | |
9 | +import java.util.Map; | |
10 | +import java.util.stream.Collectors; | |
11 | + | |
12 | +import javax.servlet.http.HttpServletRequest; | |
13 | +import javax.servlet.http.HttpServletResponse; | |
14 | + | |
15 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
16 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
17 | +import org.jeecgframework.poi.excel.ExcelImportUtil; | |
18 | +import org.jeecgframework.poi.excel.def.NormalExcelConstants; | |
19 | +import org.jeecgframework.poi.excel.entity.ExportParams; | |
20 | +import org.jeecgframework.poi.excel.entity.ImportParams; | |
21 | +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | |
22 | +import org.jeecg.common.system.vo.LoginUser; | |
23 | +import org.apache.shiro.SecurityUtils; | |
24 | +import org.jeecg.common.api.vo.Result; | |
25 | +import org.jeecg.common.system.query.QueryGenerator; | |
26 | +import org.jeecg.common.util.oConvertUtils; | |
27 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetailChild; | |
28 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetail; | |
29 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.vo.CycleCountDetailPage; | |
30 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.service.ICycleCountDetailService; | |
31 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.service.ICycleCountDetailChildService; | |
32 | +import org.springframework.beans.BeanUtils; | |
33 | +import org.springframework.beans.factory.annotation.Autowired; | |
34 | +import org.springframework.web.bind.annotation.*; | |
35 | +import org.springframework.web.servlet.ModelAndView; | |
36 | +import org.springframework.web.multipart.MultipartFile; | |
37 | +import org.springframework.web.multipart.MultipartHttpServletRequest; | |
38 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
39 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
40 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
41 | +import lombok.extern.slf4j.Slf4j; | |
42 | +import com.alibaba.fastjson.JSON; | |
43 | +import io.swagger.annotations.Api; | |
44 | +import io.swagger.annotations.ApiOperation; | |
45 | +import org.jeecg.common.aspect.annotation.AutoLog; | |
46 | + | |
47 | + /** | |
48 | + * @Description: 盘点明细表 | |
49 | + * @Author: jeecg-boot | |
50 | + * @Date: 2023-01-30 | |
51 | + * @Version: V1.0 | |
52 | + */ | |
53 | +@Api(tags="盘点明细表") | |
54 | +@RestController | |
55 | +@RequestMapping("/cycleCountDetail/cycleCountDetail") | |
56 | +@Slf4j | |
57 | +public class CycleCountDetailController { | |
58 | + @Autowired | |
59 | + private ICycleCountDetailService cycleCountDetailService; | |
60 | + @Autowired | |
61 | + private ICycleCountDetailChildService cycleCountDetailChildService; | |
62 | + | |
63 | + /** | |
64 | + * 分页列表查询 | |
65 | + * | |
66 | + * @param cycleCountDetail | |
67 | + * @param pageNo | |
68 | + * @param pageSize | |
69 | + * @param req | |
70 | + * @return | |
71 | + */ | |
72 | + //@AutoLog(value = "盘点明细表-分页列表查询") | |
73 | + @ApiOperation(value="盘点明细表-分页列表查询", notes="盘点明细表-分页列表查询") | |
74 | + @GetMapping(value = "/list") | |
75 | + public Result<IPage<CycleCountDetail>> queryPageList(CycleCountDetail cycleCountDetail, | |
76 | + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |
77 | + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |
78 | + HttpServletRequest req) { | |
79 | + QueryWrapper<CycleCountDetail> queryWrapper = QueryGenerator.initQueryWrapper(cycleCountDetail, req.getParameterMap()); | |
80 | + Page<CycleCountDetail> page = new Page<CycleCountDetail>(pageNo, pageSize); | |
81 | + IPage<CycleCountDetail> pageList = cycleCountDetailService.page(page, queryWrapper); | |
82 | + return Result.OK(pageList); | |
83 | + } | |
84 | + | |
85 | + /** | |
86 | + * 添加 | |
87 | + * | |
88 | + * @param cycleCountDetailPage | |
89 | + * @return | |
90 | + */ | |
91 | + @AutoLog(value = "盘点明细表-添加") | |
92 | + @ApiOperation(value="盘点明细表-添加", notes="盘点明细表-添加") | |
93 | + @PostMapping(value = "/add") | |
94 | + public Result<String> add(@RequestBody CycleCountDetailPage cycleCountDetailPage) { | |
95 | + CycleCountDetail cycleCountDetail = new CycleCountDetail(); | |
96 | + BeanUtils.copyProperties(cycleCountDetailPage, cycleCountDetail); | |
97 | + cycleCountDetailService.saveMain(cycleCountDetail, cycleCountDetailPage.getCycleCountDetailChildList()); | |
98 | + return Result.OK("添加成功!"); | |
99 | + } | |
100 | + | |
101 | + /** | |
102 | + * 编辑 | |
103 | + * | |
104 | + * @param cycleCountDetailPage | |
105 | + * @return | |
106 | + */ | |
107 | + @AutoLog(value = "盘点明细表-编辑") | |
108 | + @ApiOperation(value="盘点明细表-编辑", notes="盘点明细表-编辑") | |
109 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |
110 | + public Result<String> edit(@RequestBody CycleCountDetailPage cycleCountDetailPage) { | |
111 | + CycleCountDetail cycleCountDetail = new CycleCountDetail(); | |
112 | + BeanUtils.copyProperties(cycleCountDetailPage, cycleCountDetail); | |
113 | + CycleCountDetail cycleCountDetailEntity = cycleCountDetailService.getById(cycleCountDetail.getId()); | |
114 | + if(cycleCountDetailEntity==null) { | |
115 | + return Result.error("未找到对应数据"); | |
116 | + } | |
117 | + cycleCountDetailService.updateMain(cycleCountDetail, cycleCountDetailPage.getCycleCountDetailChildList()); | |
118 | + return Result.OK("编辑成功!"); | |
119 | + } | |
120 | + | |
121 | + /** | |
122 | + * 通过id删除 | |
123 | + * | |
124 | + * @param id | |
125 | + * @return | |
126 | + */ | |
127 | + @AutoLog(value = "盘点明细表-通过id删除") | |
128 | + @ApiOperation(value="盘点明细表-通过id删除", notes="盘点明细表-通过id删除") | |
129 | + @DeleteMapping(value = "/delete") | |
130 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
131 | + cycleCountDetailService.delMain(id); | |
132 | + return Result.OK("删除成功!"); | |
133 | + } | |
134 | + | |
135 | + /** | |
136 | + * 批量删除 | |
137 | + * | |
138 | + * @param ids | |
139 | + * @return | |
140 | + */ | |
141 | + @AutoLog(value = "盘点明细表-批量删除") | |
142 | + @ApiOperation(value="盘点明细表-批量删除", notes="盘点明细表-批量删除") | |
143 | + @DeleteMapping(value = "/deleteBatch") | |
144 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
145 | + this.cycleCountDetailService.delBatchMain(Arrays.asList(ids.split(","))); | |
146 | + return Result.OK("批量删除成功!"); | |
147 | + } | |
148 | + | |
149 | + /** | |
150 | + * 通过id查询 | |
151 | + * | |
152 | + * @param id | |
153 | + * @return | |
154 | + */ | |
155 | + //@AutoLog(value = "盘点明细表-通过id查询") | |
156 | + @ApiOperation(value="盘点明细表-通过id查询", notes="盘点明细表-通过id查询") | |
157 | + @GetMapping(value = "/queryById") | |
158 | + public Result<CycleCountDetail> queryById(@RequestParam(name="id",required=true) String id) { | |
159 | + CycleCountDetail cycleCountDetail = cycleCountDetailService.getById(id); | |
160 | + if(cycleCountDetail==null) { | |
161 | + return Result.error("未找到对应数据"); | |
162 | + } | |
163 | + return Result.OK(cycleCountDetail); | |
164 | + | |
165 | + } | |
166 | + | |
167 | + /** | |
168 | + * 通过id查询 | |
169 | + * | |
170 | + * @param id | |
171 | + * @return | |
172 | + */ | |
173 | + //@AutoLog(value = "盘点容器明细表-通过主表ID查询") | |
174 | + @ApiOperation(value="盘点容器明细表-通过主表ID查询", notes="盘点容器明细表-通过主表ID查询") | |
175 | + @GetMapping(value = "/queryCycleCountDetailChildByMainId") | |
176 | + public Result<IPage<CycleCountDetailChild>> queryCycleCountDetailChildListByMainId(@RequestParam(name="id",required=true) int id) { | |
177 | + LambdaQueryWrapper<CycleCountDetailChild> cycleCountDetailChildLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
178 | + cycleCountDetailChildLambdaQueryWrapper.eq(CycleCountDetailChild::getCycleCountDetailid, id); | |
179 | + List<CycleCountDetailChild> cycleCountDetailChildList = cycleCountDetailChildService.list(cycleCountDetailChildLambdaQueryWrapper); | |
180 | + IPage <CycleCountDetailChild> page = new Page<>(); | |
181 | + page.setRecords(cycleCountDetailChildList); | |
182 | + page.setTotal(cycleCountDetailChildList.size()); | |
183 | + return Result.OK(page); | |
184 | + } | |
185 | + | |
186 | + /** | |
187 | + * 导出excel | |
188 | + * | |
189 | + * @param request | |
190 | + * @param cycleCountDetail | |
191 | + */ | |
192 | + @RequestMapping(value = "/exportXls") | |
193 | + public ModelAndView exportXls(HttpServletRequest request, CycleCountDetail cycleCountDetail) { | |
194 | + // Step.1 组装查询条件查询数据 | |
195 | + QueryWrapper<CycleCountDetail> queryWrapper = QueryGenerator.initQueryWrapper(cycleCountDetail, request.getParameterMap()); | |
196 | + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); | |
197 | + | |
198 | + //Step.2 获取导出数据 | |
199 | + List<CycleCountDetail> queryList = cycleCountDetailService.list(queryWrapper); | |
200 | + // 过滤选中数据 | |
201 | + String selections = request.getParameter("selections"); | |
202 | + List<CycleCountDetail> cycleCountDetailList = new ArrayList<CycleCountDetail>(); | |
203 | + if(oConvertUtils.isEmpty(selections)) { | |
204 | + cycleCountDetailList = queryList; | |
205 | + }else { | |
206 | + List<String> selectionList = Arrays.asList(selections.split(",")); | |
207 | + cycleCountDetailList = queryList.stream().filter(item -> selectionList.contains(item.getId())).collect(Collectors.toList()); | |
208 | + } | |
209 | + | |
210 | + // Step.3 组装pageList | |
211 | + List<CycleCountDetailPage> pageList = new ArrayList<CycleCountDetailPage>(); | |
212 | + for (CycleCountDetail main : cycleCountDetailList) { | |
213 | + CycleCountDetailPage vo = new CycleCountDetailPage(); | |
214 | + BeanUtils.copyProperties(main, vo); | |
215 | + LambdaQueryWrapper<CycleCountDetailChild> cycleCountDetailChildLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
216 | + cycleCountDetailChildLambdaQueryWrapper.eq(CycleCountDetailChild::getCycleCountDetailid, main.getId()); | |
217 | + List<CycleCountDetailChild> cycleCountDetailChildList = cycleCountDetailChildService.list(cycleCountDetailChildLambdaQueryWrapper); | |
218 | + vo.setCycleCountDetailChildList(cycleCountDetailChildList); | |
219 | + pageList.add(vo); | |
220 | + } | |
221 | + | |
222 | + // Step.4 AutoPoi 导出Excel | |
223 | + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); | |
224 | + mv.addObject(NormalExcelConstants.FILE_NAME, "盘点明细表列表"); | |
225 | + mv.addObject(NormalExcelConstants.CLASS, CycleCountDetailPage.class); | |
226 | + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("盘点明细表数据", "导出人:"+sysUser.getRealname(), "盘点明细表")); | |
227 | + mv.addObject(NormalExcelConstants.DATA_LIST, pageList); | |
228 | + return mv; | |
229 | + } | |
230 | + | |
231 | + /** | |
232 | + * 通过excel导入数据 | |
233 | + * | |
234 | + * @param request | |
235 | + * @param response | |
236 | + * @return | |
237 | + */ | |
238 | + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |
239 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |
240 | + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; | |
241 | + Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); | |
242 | + for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { | |
243 | + MultipartFile file = entity.getValue();// 获取上传文件对象 | |
244 | + ImportParams params = new ImportParams(); | |
245 | + params.setTitleRows(2); | |
246 | + params.setHeadRows(1); | |
247 | + params.setNeedSave(true); | |
248 | + try { | |
249 | + List<CycleCountDetailPage> list = ExcelImportUtil.importExcel(file.getInputStream(), CycleCountDetailPage.class, params); | |
250 | + for (CycleCountDetailPage page : list) { | |
251 | + CycleCountDetail po = new CycleCountDetail(); | |
252 | + BeanUtils.copyProperties(page, po); | |
253 | + cycleCountDetailService.saveMain(po, page.getCycleCountDetailChildList()); | |
254 | + } | |
255 | + return Result.OK("文件导入成功!数据行数:" + list.size()); | |
256 | + } catch (Exception e) { | |
257 | + log.error(e.getMessage(),e); | |
258 | + return Result.error("文件导入失败:"+e.getMessage()); | |
259 | + } finally { | |
260 | + try { | |
261 | + file.getInputStream().close(); | |
262 | + } catch (IOException e) { | |
263 | + e.printStackTrace(); | |
264 | + } | |
265 | + } | |
266 | + } | |
267 | + return Result.OK("文件导入失败!"); | |
268 | + } | |
269 | + | |
270 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/entity/CycleCountDetail.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import java.io.UnsupportedEncodingException; | |
5 | +import java.util.Date; | |
6 | +import com.baomidou.mybatisplus.annotation.IdType; | |
7 | +import com.baomidou.mybatisplus.annotation.TableId; | |
8 | +import com.baomidou.mybatisplus.annotation.TableName; | |
9 | +import lombok.Data; | |
10 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
11 | +import org.springframework.format.annotation.DateTimeFormat; | |
12 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
13 | +import org.jeecg.common.aspect.annotation.Dict; | |
14 | +import io.swagger.annotations.ApiModel; | |
15 | +import io.swagger.annotations.ApiModelProperty; | |
16 | + | |
17 | +/** | |
18 | + * @Description: 盘点明细表 | |
19 | + * @Author: jeecg-boot | |
20 | + * @Date: 2023-01-30 | |
21 | + * @Version: V1.0 | |
22 | + */ | |
23 | +@ApiModel(value="cycle_count_detail对象", description="盘点明细表") | |
24 | +@Data | |
25 | +@TableName("cycle_count_detail") | |
26 | +public class CycleCountDetail implements Serializable { | |
27 | + private static final long serialVersionUID = 1L; | |
28 | + | |
29 | + /** 主键 */ | |
30 | + @TableId(type = IdType.AUTO) | |
31 | + @ApiModelProperty(value = "主键") | |
32 | + private Integer id; | |
33 | + /**盘点主单id*/ | |
34 | + @Excel(name = "盘点主单id", width = 15) | |
35 | + @ApiModelProperty(value = "盘点主单id") | |
36 | + private String cycleCountHeadId; | |
37 | + /**盘点主单code*/ | |
38 | + @Excel(name = "盘点主单code", width = 15) | |
39 | + @ApiModelProperty(value = "盘点主单code") | |
40 | + private String cycleCountHeadCode; | |
41 | + /**任务表头*/ | |
42 | + @Excel(name = "任务表头", width = 15) | |
43 | + @ApiModelProperty(value = "任务表头") | |
44 | + private String taskHeaderId; | |
45 | + /**任务明细头*/ | |
46 | + @Excel(name = "任务明细头", width = 15) | |
47 | + @ApiModelProperty(value = "任务明细头") | |
48 | + private Integer taskDetailId; | |
49 | + /**仓库*/ | |
50 | + @Excel(name = "仓库", width = 15) | |
51 | + @ApiModelProperty(value = "仓库") | |
52 | + private String warehouseCode; | |
53 | + /**货主*/ | |
54 | + @Excel(name = "货主", width = 15) | |
55 | + @ApiModelProperty(value = "货主") | |
56 | + private String companyCode; | |
57 | + /**库存明细头*/ | |
58 | + @Excel(name = "库存明细头", width = 15) | |
59 | + @ApiModelProperty(value = "库存明细头") | |
60 | + private Integer inventoryDetailId; | |
61 | + /**库位*/ | |
62 | + @Excel(name = "库位", width = 15) | |
63 | + @ApiModelProperty(value = "库位") | |
64 | + private String locationCode; | |
65 | + /**容器*/ | |
66 | + @Excel(name = "容器", width = 15) | |
67 | + @ApiModelProperty(value = "容器") | |
68 | + private String containerCode; | |
69 | + /**库存状态*/ | |
70 | + @Excel(name = "库存状态", width = 15) | |
71 | + @ApiModelProperty(value = "库存状态") | |
72 | + private String inventorySts; | |
73 | + /**系统数量*/ | |
74 | + @Excel(name = "系统数量", width = 15) | |
75 | + @ApiModelProperty(value = "系统数量") | |
76 | + private String systemQty; | |
77 | + /**实盘数量*/ | |
78 | + @Excel(name = "实盘数量", width = 15) | |
79 | + @ApiModelProperty(value = "实盘数量") | |
80 | + private String countedQty; | |
81 | + /**差异数量*/ | |
82 | + @Excel(name = "差异数量", width = 15) | |
83 | + @ApiModelProperty(value = "差异数量") | |
84 | + private String gapQty; | |
85 | + /**失败原因*/ | |
86 | + @Excel(name = "失败原因", width = 15) | |
87 | + @ApiModelProperty(value = "失败原因") | |
88 | + private String rejectionNote; | |
89 | + /**完成用户*/ | |
90 | + @Excel(name = "完成用户", width = 15) | |
91 | + @ApiModelProperty(value = "完成用户") | |
92 | + private String completedBy; | |
93 | + /**完成时间*/ | |
94 | + @Excel(name = "完成时间", width = 15) | |
95 | + @ApiModelProperty(value = "完成时间") | |
96 | + private String completedAt; | |
97 | + /**盘点明细状态*/ | |
98 | + @Excel(name = "盘点明细状态", width = 15) | |
99 | + @ApiModelProperty(value = "盘点明细状态") | |
100 | + private Integer enableStatus; | |
101 | + /**创建人*/ | |
102 | + @ApiModelProperty(value = "创建人") | |
103 | + private String createBy; | |
104 | + /**创建日期*/ | |
105 | + @ApiModelProperty(value = "创建日期") | |
106 | + private Date createTime; | |
107 | + /**更新人*/ | |
108 | + @ApiModelProperty(value = "更新人") | |
109 | + private String updateBy; | |
110 | + /**更新日期*/ | |
111 | + @ApiModelProperty(value = "更新日期") | |
112 | + private Date updateTime; | |
113 | + /**所属部门*/ | |
114 | + @ApiModelProperty(value = "所属部门") | |
115 | + private String sysOrgCode; | |
116 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/entity/CycleCountDetailChild.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import com.baomidou.mybatisplus.annotation.IdType; | |
5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
6 | +import com.baomidou.mybatisplus.annotation.TableName; | |
7 | +import lombok.Data; | |
8 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
9 | +import org.springframework.format.annotation.DateTimeFormat; | |
10 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
11 | +import java.util.Date; | |
12 | +import org.jeecg.common.aspect.annotation.Dict; | |
13 | +import io.swagger.annotations.ApiModel; | |
14 | +import io.swagger.annotations.ApiModelProperty; | |
15 | +import java.io.UnsupportedEncodingException; | |
16 | + | |
17 | +/** | |
18 | + * @Description: 盘点容器明细表 | |
19 | + * @Author: jeecg-boot | |
20 | + * @Date: 2023-01-30 | |
21 | + * @Version: V1.0 | |
22 | + */ | |
23 | +@ApiModel(value="cycle_count_detail_child对象", description="盘点容器明细表") | |
24 | +@Data | |
25 | +@TableName("cycle_count_detail_child") | |
26 | +public class CycleCountDetailChild implements Serializable { | |
27 | + private static final long serialVersionUID = 1L; | |
28 | + | |
29 | + /** 主键 */ | |
30 | + @TableId(type = IdType.AUTO) | |
31 | + @ApiModelProperty(value = "主键") | |
32 | + private Integer id; | |
33 | + /**盘点主单code*/ | |
34 | + @Excel(name = "盘点主单code", width = 15) | |
35 | + @ApiModelProperty(value = "盘点主单code") | |
36 | + private String cyclecountheadcode; | |
37 | + /**盘点明细ID主id*/ | |
38 | + @ApiModelProperty(value = "盘点明细ID主id") | |
39 | + private Integer cycleCountDetailid; | |
40 | + /**盘点明细子单状态*/ | |
41 | + @Excel(name = "盘点明细子单状态", width = 15) | |
42 | + @ApiModelProperty(value = "盘点明细子单状态") | |
43 | + private String childStatus; | |
44 | + /**库位*/ | |
45 | + @Excel(name = "库位", width = 15) | |
46 | + @ApiModelProperty(value = "库位") | |
47 | + private String locationCode; | |
48 | + /**容器*/ | |
49 | + @Excel(name = "容器", width = 15) | |
50 | + @ApiModelProperty(value = "容器") | |
51 | + private String containerCode; | |
52 | + /**物料编码*/ | |
53 | + @Excel(name = "物料编码", width = 15) | |
54 | + @ApiModelProperty(value = "物料编码") | |
55 | + private String materialCode; | |
56 | + /**物料名称*/ | |
57 | + @Excel(name = "物料名称", width = 15) | |
58 | + @ApiModelProperty(value = "物料名称") | |
59 | + private String materialName; | |
60 | + /**物料规格*/ | |
61 | + @Excel(name = "物料规格", width = 15) | |
62 | + @ApiModelProperty(value = "物料规格") | |
63 | + private String materialSpec; | |
64 | + /**物料单位*/ | |
65 | + @Excel(name = "物料单位", width = 15) | |
66 | + @ApiModelProperty(value = "物料单位") | |
67 | + private String materialUnit; | |
68 | + /**系统数量*/ | |
69 | + @Excel(name = "系统数量", width = 15) | |
70 | + @ApiModelProperty(value = "系统数量") | |
71 | + private String systemQty; | |
72 | + /**实盘数量*/ | |
73 | + @Excel(name = "实盘数量", width = 15) | |
74 | + @ApiModelProperty(value = "实盘数量") | |
75 | + private String countedQty; | |
76 | + /**差异数量*/ | |
77 | + @Excel(name = "差异数量", width = 15) | |
78 | + @ApiModelProperty(value = "差异数量") | |
79 | + private String gapQty; | |
80 | + /**库存明细id*/ | |
81 | + @Excel(name = "库存明细id", width = 15) | |
82 | + @ApiModelProperty(value = "库存明细id") | |
83 | + private Integer inventoryDetaiId; | |
84 | + /**创建人*/ | |
85 | + @ApiModelProperty(value = "创建人") | |
86 | + private String createBy; | |
87 | + /**创建日期*/ | |
88 | + @ApiModelProperty(value = "创建日期") | |
89 | + private Date createTime; | |
90 | + /**更新人*/ | |
91 | + @ApiModelProperty(value = "更新人") | |
92 | + private String updateBy; | |
93 | + /**更新日期*/ | |
94 | + @ApiModelProperty(value = "更新日期") | |
95 | + private Date updateTime; | |
96 | + /**所属部门*/ | |
97 | + @ApiModelProperty(value = "所属部门") | |
98 | + private String sysOrgCode; | |
99 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/mapper/CycleCountDetailChildMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.mapper; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetailChild; | |
5 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
6 | +import org.apache.ibatis.annotations.Param; | |
7 | + | |
8 | +/** | |
9 | + * @Description: 盘点容器明细表 | |
10 | + * @Author: jeecg-boot | |
11 | + * @Date: 2023-01-30 | |
12 | + * @Version: V1.0 | |
13 | + */ | |
14 | +public interface CycleCountDetailChildMapper extends BaseMapper<CycleCountDetailChild> { | |
15 | + | |
16 | + | |
17 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/mapper/CycleCountDetailMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.mapper; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import org.apache.ibatis.annotations.Param; | |
6 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetail; | |
7 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
8 | + | |
9 | +/** | |
10 | + * @Description: 盘点明细表 | |
11 | + * @Author: jeecg-boot | |
12 | + * @Date: 2023-01-30 | |
13 | + * @Version: V1.0 | |
14 | + */ | |
15 | +public interface CycleCountDetailMapper extends BaseMapper<CycleCountDetail> { | |
16 | + | |
17 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/mapper/xml/CycleCountDetailMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="org.jeecg.modules.wms.stocktaking.cycleCountDetail.mapper.CycleCountDetailMapper"> | |
4 | + | |
5 | +</mapper> | |
0 | 6 | \ No newline at end of file |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/ICycleCountDetailChildService.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.service; | |
2 | + | |
3 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetailChild; | |
4 | +import com.baomidou.mybatisplus.extension.service.IService; | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @Description: 盘点容器明细表 | |
9 | + * @Author: jeecg-boot | |
10 | + * @Date: 2023-01-30 | |
11 | + * @Version: V1.0 | |
12 | + */ | |
13 | +public interface ICycleCountDetailChildService extends IService<CycleCountDetailChild> { | |
14 | + | |
15 | + | |
16 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/ICycleCountDetailService.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.service; | |
2 | + | |
3 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetailChild; | |
4 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetail; | |
5 | +import com.baomidou.mybatisplus.extension.service.IService; | |
6 | +import java.io.Serializable; | |
7 | +import java.util.Collection; | |
8 | +import java.util.List; | |
9 | + | |
10 | +/** | |
11 | + * @Description: 盘点明细表 | |
12 | + * @Author: jeecg-boot | |
13 | + * @Date: 2023-01-30 | |
14 | + * @Version: V1.0 | |
15 | + */ | |
16 | +public interface ICycleCountDetailService extends IService<CycleCountDetail> { | |
17 | + | |
18 | + /** | |
19 | + * 添加一对多 | |
20 | + * | |
21 | + */ | |
22 | + public void saveMain(CycleCountDetail cycleCountDetail,List<CycleCountDetailChild> cycleCountDetailChildList) ; | |
23 | + | |
24 | + /** | |
25 | + * 修改一对多 | |
26 | + * | |
27 | + */ | |
28 | + public void updateMain(CycleCountDetail cycleCountDetail,List<CycleCountDetailChild> cycleCountDetailChildList); | |
29 | + | |
30 | + /** | |
31 | + * 删除一对多 | |
32 | + */ | |
33 | + public void delMain (String id); | |
34 | + | |
35 | + /** | |
36 | + * 批量删除一对多 | |
37 | + */ | |
38 | + public void delBatchMain (Collection<? extends Serializable> idList); | |
39 | + | |
40 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailChildServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.service.impl; | |
2 | + | |
3 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetailChild; | |
4 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.mapper.CycleCountDetailChildMapper; | |
5 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.service.ICycleCountDetailChildService; | |
6 | +import org.springframework.stereotype.Service; | |
7 | +import java.util.List; | |
8 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
9 | +import org.springframework.beans.factory.annotation.Autowired; | |
10 | + | |
11 | +/** | |
12 | + * @Description: 盘点容器明细表 | |
13 | + * @Author: jeecg-boot | |
14 | + * @Date: 2023-01-30 | |
15 | + * @Version: V1.0 | |
16 | + */ | |
17 | +@Service | |
18 | +public class CycleCountDetailChildServiceImpl extends ServiceImpl<CycleCountDetailChildMapper, CycleCountDetailChild> implements ICycleCountDetailChildService { | |
19 | + | |
20 | + @Autowired | |
21 | + private CycleCountDetailChildMapper cycleCountDetailChildMapper; | |
22 | + | |
23 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.service.impl; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
5 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetail; | |
6 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetailChild; | |
7 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.mapper.CycleCountDetailChildMapper; | |
8 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.mapper.CycleCountDetailMapper; | |
9 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.service.ICycleCountDetailService; | |
10 | +import org.springframework.stereotype.Service; | |
11 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
12 | +import org.springframework.beans.factory.annotation.Autowired; | |
13 | +import org.springframework.transaction.annotation.Transactional; | |
14 | +import java.io.Serializable; | |
15 | +import java.util.List; | |
16 | +import java.util.Collection; | |
17 | + | |
18 | +/** | |
19 | + * @Description: 盘点明细表 | |
20 | + * @Author: jeecg-boot | |
21 | + * @Date: 2023-01-30 | |
22 | + * @Version: V1.0 | |
23 | + */ | |
24 | +@Service | |
25 | +public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMapper, CycleCountDetail> implements ICycleCountDetailService { | |
26 | + | |
27 | + @Autowired | |
28 | + private CycleCountDetailMapper cycleCountDetailMapper; | |
29 | + @Autowired | |
30 | + private CycleCountDetailChildMapper cycleCountDetailChildMapper; | |
31 | + | |
32 | + @Override | |
33 | + @Transactional | |
34 | + public void saveMain(CycleCountDetail cycleCountDetail, List<CycleCountDetailChild> cycleCountDetailChildList) { | |
35 | + cycleCountDetailMapper.insert(cycleCountDetail); | |
36 | + if(cycleCountDetailChildList!=null && cycleCountDetailChildList.size()>0) { | |
37 | + for(CycleCountDetailChild entity:cycleCountDetailChildList) { | |
38 | + //外键设置 | |
39 | + entity.setCycleCountDetailid(cycleCountDetail.getId()); | |
40 | + cycleCountDetailChildMapper.insert(entity); | |
41 | + } | |
42 | + } | |
43 | + } | |
44 | + | |
45 | + @Override | |
46 | + @Transactional | |
47 | + public void updateMain(CycleCountDetail cycleCountDetail,List<CycleCountDetailChild> cycleCountDetailChildList) { | |
48 | + cycleCountDetailMapper.updateById(cycleCountDetail); | |
49 | + | |
50 | + //1.先删除子表数据 | |
51 | + LambdaQueryWrapper<CycleCountDetailChild> cycleCountDetailChildLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
52 | + cycleCountDetailChildLambdaQueryWrapper.eq(CycleCountDetailChild::getCycleCountDetailid,cycleCountDetail.getId()); | |
53 | + cycleCountDetailChildMapper.delete(cycleCountDetailChildLambdaQueryWrapper); | |
54 | + | |
55 | + //2.子表数据重新插入 | |
56 | + if(cycleCountDetailChildList!=null && cycleCountDetailChildList.size()>0) { | |
57 | + for(CycleCountDetailChild entity:cycleCountDetailChildList) { | |
58 | + //外键设置 | |
59 | + entity.setCycleCountDetailid(cycleCountDetail.getId()); | |
60 | + cycleCountDetailChildMapper.insert(entity); | |
61 | + } | |
62 | + } | |
63 | + } | |
64 | + | |
65 | + @Override | |
66 | + @Transactional | |
67 | + public void delMain(String id) { | |
68 | + LambdaQueryWrapper<CycleCountDetailChild> cycleCountDetailChildLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
69 | + cycleCountDetailChildLambdaQueryWrapper.eq(CycleCountDetailChild::getCycleCountDetailid,id); | |
70 | + cycleCountDetailChildMapper.delete(cycleCountDetailChildLambdaQueryWrapper); | |
71 | + cycleCountDetailMapper.deleteById(id); | |
72 | + } | |
73 | + | |
74 | + @Override | |
75 | + @Transactional | |
76 | + public void delBatchMain(Collection<? extends Serializable> idList) { | |
77 | + for(Serializable id:idList) { | |
78 | + LambdaQueryWrapper<CycleCountDetailChild> cycleCountDetailChildLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
79 | + cycleCountDetailChildLambdaQueryWrapper.eq(CycleCountDetailChild::getCycleCountDetailid,id.toString()); | |
80 | + cycleCountDetailChildMapper.delete(cycleCountDetailChildLambdaQueryWrapper); | |
81 | + cycleCountDetailMapper.deleteById(id); | |
82 | + } | |
83 | + } | |
84 | + | |
85 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/vo/CycleCountDetailPage.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountDetail.vo; | |
2 | + | |
3 | +import java.util.List; | |
4 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetail; | |
5 | +import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetailChild; | |
6 | +import lombok.Data; | |
7 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
8 | +import org.jeecgframework.poi.excel.annotation.ExcelEntity; | |
9 | +import org.jeecgframework.poi.excel.annotation.ExcelCollection; | |
10 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
11 | +import org.springframework.format.annotation.DateTimeFormat; | |
12 | +import java.util.Date; | |
13 | +import org.jeecg.common.aspect.annotation.Dict; | |
14 | +import io.swagger.annotations.ApiModel; | |
15 | +import io.swagger.annotations.ApiModelProperty; | |
16 | + | |
17 | +/** | |
18 | + * @Description: 盘点明细表 | |
19 | + * @Author: jeecg-boot | |
20 | + * @Date: 2023-01-30 | |
21 | + * @Version: V1.0 | |
22 | + */ | |
23 | +@Data | |
24 | +@ApiModel(value="cycle_count_detailPage对象", description="盘点明细表") | |
25 | +public class CycleCountDetailPage { | |
26 | + | |
27 | + /**主键*/ | |
28 | + @ApiModelProperty(value = "主键") | |
29 | + private String id; | |
30 | + /**盘点主单id*/ | |
31 | + @Excel(name = "盘点主单id", width = 15) | |
32 | + @ApiModelProperty(value = "盘点主单id") | |
33 | + private String cycleCountHeadId; | |
34 | + /**盘点主单code*/ | |
35 | + @Excel(name = "盘点主单code", width = 15) | |
36 | + @ApiModelProperty(value = "盘点主单code") | |
37 | + private String cycleCountHeadCode; | |
38 | + /**任务表头*/ | |
39 | + @Excel(name = "任务表头", width = 15) | |
40 | + @ApiModelProperty(value = "任务表头") | |
41 | + private String taskHeaderId; | |
42 | + /**任务明细头*/ | |
43 | + @Excel(name = "任务明细头", width = 15) | |
44 | + @ApiModelProperty(value = "任务明细头") | |
45 | + private String taskDetailId; | |
46 | + /**仓库*/ | |
47 | + @Excel(name = "仓库", width = 15) | |
48 | + @ApiModelProperty(value = "仓库") | |
49 | + private String warehouseCode; | |
50 | + /**货主*/ | |
51 | + @Excel(name = "货主", width = 15) | |
52 | + @ApiModelProperty(value = "货主") | |
53 | + private String companyCode; | |
54 | + /**库存明细头*/ | |
55 | + @Excel(name = "库存明细头", width = 15) | |
56 | + @ApiModelProperty(value = "库存明细头") | |
57 | + private String inventoryDetailId; | |
58 | + /**库位*/ | |
59 | + @Excel(name = "库位", width = 15) | |
60 | + @ApiModelProperty(value = "库位") | |
61 | + private String locationCode; | |
62 | + /**容器*/ | |
63 | + @Excel(name = "容器", width = 15) | |
64 | + @ApiModelProperty(value = "容器") | |
65 | + private String containerCode; | |
66 | + /**库存状态*/ | |
67 | + @Excel(name = "库存状态", width = 15) | |
68 | + @ApiModelProperty(value = "库存状态") | |
69 | + private String inventorySts; | |
70 | + /**系统数量*/ | |
71 | + @Excel(name = "系统数量", width = 15) | |
72 | + @ApiModelProperty(value = "系统数量") | |
73 | + private String systemQty; | |
74 | + /**实盘数量*/ | |
75 | + @Excel(name = "实盘数量", width = 15) | |
76 | + @ApiModelProperty(value = "实盘数量") | |
77 | + private String countedQty; | |
78 | + /**差异数量*/ | |
79 | + @Excel(name = "差异数量", width = 15) | |
80 | + @ApiModelProperty(value = "差异数量") | |
81 | + private String gapQty; | |
82 | + /**失败原因*/ | |
83 | + @Excel(name = "失败原因", width = 15) | |
84 | + @ApiModelProperty(value = "失败原因") | |
85 | + private String rejectionNote; | |
86 | + /**完成用户*/ | |
87 | + @Excel(name = "完成用户", width = 15) | |
88 | + @ApiModelProperty(value = "完成用户") | |
89 | + private String completedBy; | |
90 | + /**完成时间*/ | |
91 | + @Excel(name = "完成时间", width = 15) | |
92 | + @ApiModelProperty(value = "完成时间") | |
93 | + private String completedAt; | |
94 | + /**盘点明细状态*/ | |
95 | + @Excel(name = "盘点明细状态", width = 15) | |
96 | + @ApiModelProperty(value = "盘点明细状态") | |
97 | + private String enableStatus; | |
98 | + /**创建人*/ | |
99 | + @ApiModelProperty(value = "创建人") | |
100 | + private String createBy; | |
101 | + /**创建日期*/ | |
102 | + @ApiModelProperty(value = "创建日期") | |
103 | + private Date createTime; | |
104 | + /**更新人*/ | |
105 | + @ApiModelProperty(value = "更新人") | |
106 | + private String updateBy; | |
107 | + /**更新日期*/ | |
108 | + @ApiModelProperty(value = "更新日期") | |
109 | + private Date updateTime; | |
110 | + /**所属部门*/ | |
111 | + @ApiModelProperty(value = "所属部门") | |
112 | + private String sysOrgCode; | |
113 | + | |
114 | + @ExcelCollection(name="盘点容器明细表") | |
115 | + @ApiModelProperty(value = "盘点容器明细表") | |
116 | + private List<CycleCountDetailChild> cycleCountDetailChildList; | |
117 | + | |
118 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountHeader/controller/CycleCountHeaderController.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountHeader.controller; | |
2 | + | |
3 | +import java.util.Arrays; | |
4 | +import java.util.List; | |
5 | +import java.util.Map; | |
6 | +import java.util.stream.Collectors; | |
7 | +import java.io.IOException; | |
8 | +import java.io.UnsupportedEncodingException; | |
9 | +import java.net.URLDecoder; | |
10 | +import javax.servlet.http.HttpServletRequest; | |
11 | +import javax.servlet.http.HttpServletResponse; | |
12 | +import org.jeecg.common.api.vo.Result; | |
13 | +import org.jeecg.common.system.query.QueryGenerator; | |
14 | +import org.jeecg.common.util.oConvertUtils; | |
15 | +import org.jeecg.modules.wms.stocktaking.cycleCountHeader.entity.CycleCountHeader; | |
16 | +import org.jeecg.modules.wms.stocktaking.cycleCountHeader.service.ICycleCountHeaderService; | |
17 | + | |
18 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
19 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
20 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
21 | +import lombok.extern.slf4j.Slf4j; | |
22 | + | |
23 | +import org.jeecg.utils.HuahengJwtUtil; | |
24 | +import org.jeecg.utils.StringUtils; | |
25 | +import org.jeecgframework.poi.excel.ExcelImportUtil; | |
26 | +import org.jeecgframework.poi.excel.def.NormalExcelConstants; | |
27 | +import org.jeecgframework.poi.excel.entity.ExportParams; | |
28 | +import org.jeecgframework.poi.excel.entity.ImportParams; | |
29 | +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | |
30 | +import org.jeecg.common.system.base.controller.JeecgController; | |
31 | +import org.springframework.beans.factory.annotation.Autowired; | |
32 | +import org.springframework.web.bind.annotation.*; | |
33 | +import org.springframework.web.multipart.MultipartFile; | |
34 | +import org.springframework.web.multipart.MultipartHttpServletRequest; | |
35 | +import org.springframework.web.servlet.ModelAndView; | |
36 | +import com.alibaba.fastjson.JSON; | |
37 | +import io.swagger.annotations.Api; | |
38 | +import io.swagger.annotations.ApiOperation; | |
39 | +import org.jeecg.common.aspect.annotation.AutoLog; | |
40 | + | |
41 | + /** | |
42 | + * @Description: 盘点主表 | |
43 | + * @Author: jeecg-boot | |
44 | + * @Date: 2023-01-30 | |
45 | + * @Version: V1.0 | |
46 | + */ | |
47 | +@Api(tags="盘点主表") | |
48 | +@RestController | |
49 | +@RequestMapping("/cycleCountHeader/cycleCountHeader") | |
50 | +@Slf4j | |
51 | +public class CycleCountHeaderController extends JeecgController<CycleCountHeader, ICycleCountHeaderService> { | |
52 | + @Autowired | |
53 | + private ICycleCountHeaderService cycleCountHeaderService; | |
54 | + | |
55 | + /** | |
56 | + * 分页列表查询 | |
57 | + * | |
58 | + * @param cycleCountHeader | |
59 | + * @param pageNo | |
60 | + * @param pageSize | |
61 | + * @param req | |
62 | + * @return | |
63 | + */ | |
64 | + //@AutoLog(value = "盘点主表-分页列表查询") | |
65 | + @ApiOperation(value="盘点主表-分页列表查询", notes="盘点主表-分页列表查询") | |
66 | + @GetMapping(value = "/list") | |
67 | + public Result<IPage<CycleCountHeader>> queryPageList(CycleCountHeader cycleCountHeader, | |
68 | + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |
69 | + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |
70 | + HttpServletRequest req) { | |
71 | + QueryWrapper<CycleCountHeader> queryWrapper = QueryGenerator.initQueryWrapper(cycleCountHeader, req.getParameterMap()); | |
72 | + Page<CycleCountHeader> page = new Page<CycleCountHeader>(pageNo, pageSize); | |
73 | + IPage<CycleCountHeader> pageList = cycleCountHeaderService.page(page, queryWrapper); | |
74 | + return Result.OK(pageList); | |
75 | + } | |
76 | + | |
77 | + /** | |
78 | + * 添加 | |
79 | + * | |
80 | + * @param cycleCountHeader | |
81 | + * @return | |
82 | + */ | |
83 | + @AutoLog(value = "盘点主表-添加") | |
84 | + @ApiOperation(value="盘点主表-添加", notes="盘点主表-添加") | |
85 | + @PostMapping(value = "/add") | |
86 | + public Result<String> add(@RequestBody CycleCountHeader cycleCountHeader, HttpServletRequest req) { | |
87 | + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | |
88 | + if (StringUtils.isNotEmpty(warehouseCode)) { | |
89 | + cycleCountHeader.setWarehouseCode(warehouseCode); | |
90 | + } | |
91 | + Result result = cycleCountHeaderService.saveCycleCountHeader(cycleCountHeader); | |
92 | + return result; | |
93 | + } | |
94 | + | |
95 | + /** | |
96 | + * 编辑 | |
97 | + * | |
98 | + * @param cycleCountHeader | |
99 | + * @return | |
100 | + */ | |
101 | + @AutoLog(value = "盘点主表-编辑") | |
102 | + @ApiOperation(value="盘点主表-编辑", notes="盘点主表-编辑") | |
103 | + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |
104 | + public Result<String> edit(@RequestBody CycleCountHeader cycleCountHeader) { | |
105 | + cycleCountHeaderService.updateById(cycleCountHeader); | |
106 | + return Result.OK("编辑成功!"); | |
107 | + } | |
108 | + | |
109 | + /** | |
110 | + * 通过id删除 | |
111 | + * | |
112 | + * @param id | |
113 | + * @return | |
114 | + */ | |
115 | + @AutoLog(value = "盘点主表-通过id删除") | |
116 | + @ApiOperation(value="盘点主表-通过id删除", notes="盘点主表-通过id删除") | |
117 | + @DeleteMapping(value = "/delete") | |
118 | + public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |
119 | + cycleCountHeaderService.removeById(id); | |
120 | + return Result.OK("删除成功!"); | |
121 | + } | |
122 | + | |
123 | + /** | |
124 | + * 批量删除 | |
125 | + * | |
126 | + * @param ids | |
127 | + * @return | |
128 | + */ | |
129 | + @AutoLog(value = "盘点主表-批量删除") | |
130 | + @ApiOperation(value="盘点主表-批量删除", notes="盘点主表-批量删除") | |
131 | + @DeleteMapping(value = "/deleteBatch") | |
132 | + public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |
133 | + this.cycleCountHeaderService.removeByIds(Arrays.asList(ids.split(","))); | |
134 | + return Result.OK("批量删除成功!"); | |
135 | + } | |
136 | + | |
137 | + /** | |
138 | + * 通过id查询 | |
139 | + * | |
140 | + * @param id | |
141 | + * @return | |
142 | + */ | |
143 | + //@AutoLog(value = "盘点主表-通过id查询") | |
144 | + @ApiOperation(value="盘点主表-通过id查询", notes="盘点主表-通过id查询") | |
145 | + @GetMapping(value = "/queryById") | |
146 | + public Result<CycleCountHeader> queryById(@RequestParam(name="id",required=true) String id) { | |
147 | + CycleCountHeader cycleCountHeader = cycleCountHeaderService.getById(id); | |
148 | + if(cycleCountHeader==null) { | |
149 | + return Result.error("未找到对应数据"); | |
150 | + } | |
151 | + return Result.OK(cycleCountHeader); | |
152 | + } | |
153 | + | |
154 | + /** | |
155 | + * 导出excel | |
156 | + * | |
157 | + * @param request | |
158 | + * @param cycleCountHeader | |
159 | + */ | |
160 | + @RequestMapping(value = "/exportXls") | |
161 | + public ModelAndView exportXls(HttpServletRequest request, CycleCountHeader cycleCountHeader) { | |
162 | + return super.exportXls(request, cycleCountHeader, CycleCountHeader.class, "盘点主表"); | |
163 | + } | |
164 | + | |
165 | + /** | |
166 | + * 通过excel导入数据 | |
167 | + * | |
168 | + * @param request | |
169 | + * @param response | |
170 | + * @return | |
171 | + */ | |
172 | + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |
173 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |
174 | + return super.importExcel(request, response, CycleCountHeader.class); | |
175 | + } | |
176 | + | |
177 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountHeader/entity/CycleCountHeader.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountHeader.entity; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | +import java.io.UnsupportedEncodingException; | |
5 | +import java.util.Date; | |
6 | +import java.math.BigDecimal; | |
7 | +import com.baomidou.mybatisplus.annotation.IdType; | |
8 | +import com.baomidou.mybatisplus.annotation.TableField; | |
9 | +import com.baomidou.mybatisplus.annotation.TableId; | |
10 | +import com.baomidou.mybatisplus.annotation.TableName; | |
11 | +import lombok.Data; | |
12 | +import com.fasterxml.jackson.annotation.JsonFormat; | |
13 | +import org.springframework.format.annotation.DateTimeFormat; | |
14 | +import org.jeecgframework.poi.excel.annotation.Excel; | |
15 | +import org.jeecg.common.aspect.annotation.Dict; | |
16 | +import io.swagger.annotations.ApiModel; | |
17 | +import io.swagger.annotations.ApiModelProperty; | |
18 | +import lombok.EqualsAndHashCode; | |
19 | +import lombok.experimental.Accessors; | |
20 | + | |
21 | +/** | |
22 | + * @Description: 盘点主表 | |
23 | + * @Author: jeecg-boot | |
24 | + * @Date: 2023-01-30 | |
25 | + * @Version: V1.0 | |
26 | + */ | |
27 | +@Data | |
28 | +@TableName("cycle_count_header") | |
29 | +@Accessors(chain = true) | |
30 | +@EqualsAndHashCode(callSuper = false) | |
31 | +@ApiModel(value="cycle_count_header对象", description="盘点主表") | |
32 | +public class CycleCountHeader implements Serializable { | |
33 | + private static final long serialVersionUID = 1L; | |
34 | + | |
35 | + /** 主键 */ | |
36 | + @TableId(type = IdType.AUTO) | |
37 | + @ApiModelProperty(value = "主键") | |
38 | + private Integer id; | |
39 | + /**盘点主表编号*/ | |
40 | + @Excel(name = "盘点主表编号", width = 15) | |
41 | + @ApiModelProperty(value = "盘点主表编号") | |
42 | + private String code; | |
43 | + /**仓库编码*/ | |
44 | + @Excel(name = "仓库编码", width = 15) | |
45 | + @ApiModelProperty(value = "仓库编码") | |
46 | + private String warehouseCode; | |
47 | + /**货主编码*/ | |
48 | + @Excel(name = "货主编码", width = 15) | |
49 | + @ApiModelProperty(value = "货主编码") | |
50 | + private String companyCode; | |
51 | + /**盘点类型*/ | |
52 | + @Excel(name = "盘点类型", width = 15) | |
53 | + @ApiModelProperty(value = "盘点类型") | |
54 | + private String countType; | |
55 | + /**盘点状态*/ | |
56 | + @Excel(name = "盘点状态", width = 15,dicCode = "cyclecount_status") | |
57 | + @Dict(dicCode = "cyclecount_status") | |
58 | + @ApiModelProperty(value = "盘点状态") | |
59 | + private Integer statusCyc; | |
60 | + | |
61 | + /**是否有效*/ | |
62 | + @Excel(name = "是否有效", width = 15,dicCode = "valid_status") | |
63 | + @Dict(dicCode = "valid_status") | |
64 | + @ApiModelProperty(value="是否有效") | |
65 | + private Integer enable; | |
66 | + | |
67 | + /**备注*/ | |
68 | + @Excel(name = "备注", width = 15) | |
69 | + @ApiModelProperty(value = "备注") | |
70 | + private String remark; | |
71 | + /**总货位数*/ | |
72 | + @Excel(name = "总货位数", width = 15) | |
73 | + @ApiModelProperty(value = "总货位数") | |
74 | + private Integer totalLocs; | |
75 | + /**总物料数*/ | |
76 | + @Excel(name = "总物料数", width = 15) | |
77 | + @ApiModelProperty(value = "总物料数") | |
78 | + private Integer totalItems; | |
79 | + /**审核人*/ | |
80 | + @Excel(name = "审核人", width = 15) | |
81 | + @ApiModelProperty(value = "审核人") | |
82 | + private String verifyBy; | |
83 | + /**指定盘点人员*/ | |
84 | + @Excel(name = "指定盘点人员", width = 15) | |
85 | + @ApiModelProperty(value = "指定盘点人员") | |
86 | + private String stocktakingAs; | |
87 | + /**实际盘点人员*/ | |
88 | + @Excel(name = "实际盘点人员", width = 15) | |
89 | + @ApiModelProperty(value = "实际盘点人员") | |
90 | + private String stocktakingAc; | |
91 | + /**回传时间*/ | |
92 | + @Excel(name = "回传时间", width = 15) | |
93 | + @ApiModelProperty(value = "回传时间") | |
94 | + private Date uploadTime; | |
95 | + /**回传状态*/ | |
96 | + @Excel(name = "回传状态", width = 15) | |
97 | + private Boolean uploadStatus; | |
98 | + /**关闭人*/ | |
99 | + @Excel(name = "关闭人", width = 15) | |
100 | + @ApiModelProperty(value = "关闭人") | |
101 | + private String closedBy; | |
102 | + /**创建人*/ | |
103 | + @ApiModelProperty(value = "创建人") | |
104 | + private String createBy; | |
105 | + /**创建日期*/ | |
106 | + @ApiModelProperty(value = "创建日期") | |
107 | + private java.util.Date createTime; | |
108 | + /**更新人*/ | |
109 | + @ApiModelProperty(value = "更新人") | |
110 | + private String updateBy; | |
111 | + /**更新日期*/ | |
112 | + @ApiModelProperty(value = "更新日期") | |
113 | + private java.util.Date updateTime; | |
114 | + /**所属部门*/ | |
115 | + @ApiModelProperty(value = "所属部门") | |
116 | + private String sysOrgCode; | |
117 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountHeader/mapper/CycleCountHeaderMapper.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountHeader.mapper; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import org.apache.ibatis.annotations.Param; | |
6 | +import org.jeecg.modules.wms.stocktaking.cycleCountHeader.entity.CycleCountHeader; | |
7 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |
8 | + | |
9 | +/** | |
10 | + * @Description: 盘点主表 | |
11 | + * @Author: jeecg-boot | |
12 | + * @Date: 2023-01-30 | |
13 | + * @Version: V1.0 | |
14 | + */ | |
15 | +public interface CycleCountHeaderMapper extends BaseMapper<CycleCountHeader> { | |
16 | + | |
17 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountHeader/mapper/xml/CycleCountHeaderMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="org.jeecg.modules.wms.stocktaking.cycleCountHeader.mapper.CycleCountHeaderMapper"> | |
4 | + | |
5 | +</mapper> | |
0 | 6 | \ No newline at end of file |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountHeader/service/ICycleCountHeaderService.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountHeader.service; | |
2 | + | |
3 | +import org.jeecg.common.api.vo.Result; | |
4 | +import org.jeecg.modules.wms.stocktaking.cycleCountHeader.entity.CycleCountHeader; | |
5 | +import com.baomidou.mybatisplus.extension.service.IService; | |
6 | + | |
7 | +/** | |
8 | + * @Description: 盘点主表 | |
9 | + * @Author: jeecg-boot | |
10 | + * @Date: 2023-01-30 | |
11 | + * @Version: V1.0 | |
12 | + */ | |
13 | +public interface ICycleCountHeaderService extends IService<CycleCountHeader> { | |
14 | + | |
15 | + public Result<CycleCountHeader> saveCycleCountHeader(CycleCountHeader cycleCountHeader); | |
16 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountHeader/service/impl/CycleCountHeaderServiceImpl.java
0 → 100644
1 | +package org.jeecg.modules.wms.stocktaking.cycleCountHeader.service.impl; | |
2 | + | |
3 | +import com.aliyun.oss.ServiceException; | |
4 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
6 | +import org.jeecg.common.api.vo.Result; | |
7 | +import org.jeecg.modules.wms.config.receiptType.entity.ReceiptType; | |
8 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | |
9 | +import org.jeecg.modules.wms.stocktaking.cycleCountHeader.entity.CycleCountHeader; | |
10 | +import org.jeecg.modules.wms.stocktaking.cycleCountHeader.mapper.CycleCountHeaderMapper; | |
11 | +import org.jeecg.modules.wms.stocktaking.cycleCountHeader.service.ICycleCountHeaderService; | |
12 | +import org.jeecg.utils.StringUtils; | |
13 | +import org.jeecg.utils.constant.QuantityConstant; | |
14 | +import org.springframework.stereotype.Service; | |
15 | + | |
16 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
17 | +import org.springframework.transaction.annotation.Transactional; | |
18 | + | |
19 | +import java.text.SimpleDateFormat; | |
20 | +import java.util.Date; | |
21 | + | |
22 | +/** | |
23 | + * @Description: 盘点主表 | |
24 | + * @Author: jeecg-boot | |
25 | + * @Date: 2023-01-30 | |
26 | + * @Version: V1.0 | |
27 | + */ | |
28 | +@Service | |
29 | +public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMapper, CycleCountHeader> implements ICycleCountHeaderService { | |
30 | + | |
31 | + @Override | |
32 | + public Result<CycleCountHeader> saveCycleCountHeader(CycleCountHeader cycleCountHeader) { | |
33 | + String code = createCode(QuantityConstant.SHIPMENT_BILL_TYPE_PD); | |
34 | + if (StringUtils.isEmpty(code)) { | |
35 | + throw new ServiceException("根据单据类型,生成单号失败"); | |
36 | + } | |
37 | + cycleCountHeader.setCode(code); | |
38 | + cycleCountHeader.setStocktakingAc("-"); | |
39 | + boolean success = save(cycleCountHeader); | |
40 | + if (!success) { | |
41 | + return Result.OK("添加失败!"); | |
42 | + } | |
43 | + return Result.OK("添加成功!", cycleCountHeader); | |
44 | + } | |
45 | + | |
46 | + | |
47 | + @Transactional | |
48 | + public String createCode(String receiptType) { | |
49 | + int i = 0; | |
50 | + String code = null; | |
51 | + Date now = new Date(); | |
52 | + SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd"); | |
53 | + LambdaQueryWrapper<CycleCountHeader> cycleCountHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
54 | + cycleCountHeaderLambdaQueryWrapper.select(CycleCountHeader::getCode).orderByDesc(CycleCountHeader::getId).last("Limit 1"); | |
55 | + String maxCode = null; | |
56 | + CycleCountHeader cycleCountHeader = this.getOne(cycleCountHeaderLambdaQueryWrapper); | |
57 | + if (cycleCountHeader != null) { | |
58 | + maxCode = cycleCountHeader.getCode(); | |
59 | + } | |
60 | + if (maxCode != null) { | |
61 | + String day = maxCode.substring(maxCode.length() - 13, maxCode.length() - 5); | |
62 | + if (day.equals(df.format(now))) { | |
63 | + Integer Count = Integer.valueOf(maxCode.substring(maxCode.length() - 5, maxCode.length())); | |
64 | + code = receiptType + df.format(now) + String.format("%05d", Count + 1); | |
65 | + } else { | |
66 | + code = receiptType + df.format(now) + String.format("%05d", 0000 + 1); | |
67 | + } | |
68 | + } else { | |
69 | + code = receiptType + df.format(now) + String.format("%05d", 0000 + 1); | |
70 | + } | |
71 | + return code; | |
72 | + } | |
73 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java
... | ... | @@ -109,7 +109,7 @@ public class TaskHeader implements Serializable { |
109 | 109 | @ApiModelProperty(value = "MES提交次数") |
110 | 110 | private Integer backMesTimes; |
111 | 111 | @ApiModelProperty(value = "MES回传的唯一标识") |
112 | - private String backMesTimeStamp; | |
112 | + private String backMesTimestamp; | |
113 | 113 | @ApiModelProperty(value = "长度") |
114 | 114 | private Integer length; |
115 | 115 | @ApiModelProperty(value = "宽度") |
... | ... | @@ -118,6 +118,12 @@ public class TaskHeader implements Serializable { |
118 | 118 | private Integer height; |
119 | 119 | @ApiModelProperty(value = "重量") |
120 | 120 | private Integer weight; |
121 | + @ApiModelProperty(value = "出库单顺序") | |
122 | + private Long shipmentOrder; | |
123 | + @ApiModelProperty(value = "顺序") | |
124 | + private Integer sequence; | |
125 | + @ApiModelProperty(value = "顺序数量") | |
126 | + private Integer sequenceNumber; | |
121 | 127 | /** 备用字段1 */ |
122 | 128 | @Excel(name = "备用字段1", width = 15) |
123 | 129 | @ApiModelProperty(value = "备用字段1") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
... | ... | @@ -530,6 +530,9 @@ public class QuantityConstant { |
530 | 530 | public static final String SHIPMENT_BILL_TYPE_DN = "DN";// 发货通知单 |
531 | 531 | public static final String SHIPMENT_BILL_TYPE_JS = "JS";// 直接调拨单 |
532 | 532 | |
533 | + /* 盘点单据类型 */ | |
534 | + public static final String SHIPMENT_BILL_TYPE_PD = "PD";// 盘点单 | |
535 | + | |
533 | 536 | /* ERP单据名称 */ |
534 | 537 | public static final String BILL_TYPE_NAME_DN = "发货通知单"; |
535 | 538 | public static final String BILL_TYPE_NAME_RN = "退货通知单"; |
... | ... |