Commit 0281517bca515e35b8a98836f2fdf533721a95e2
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms4 into develop
Showing
23 changed files
with
272 additions
and
81 deletions
ant-design-vue-jeecg/src/views/system/config/WaveConfigDetailList.vue
@@ -32,6 +32,7 @@ | @@ -32,6 +32,7 @@ | ||
32 | :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" | 32 | :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" |
33 | @change="handleTableChange" | 33 | @change="handleTableChange" |
34 | > | 34 | > |
35 | + | ||
35 | <span slot="action" slot-scope="text, record"> | 36 | <span slot="action" slot-scope="text, record"> |
36 | <a @click="handleEdit(record)">编辑</a> | 37 | <a @click="handleEdit(record)">编辑</a> |
37 | <a-divider type="vertical" /> | 38 | <a-divider type="vertical" /> |
@@ -91,11 +92,6 @@ export default { | @@ -91,11 +92,6 @@ export default { | ||
91 | } | 92 | } |
92 | }, | 93 | }, |
93 | { | 94 | { |
94 | - title: '主表ID', | ||
95 | - align: 'center', | ||
96 | - dataIndex: 'mainId' | ||
97 | - }, | ||
98 | - { | ||
99 | title: '物料编码', | 95 | title: '物料编码', |
100 | align: 'center', | 96 | align: 'center', |
101 | dataIndex: 'materialCode' | 97 | dataIndex: 'materialCode' |
@@ -144,6 +140,10 @@ export default { | @@ -144,6 +140,10 @@ export default { | ||
144 | scopedSlots: { customRender: 'action' } | 140 | scopedSlots: { customRender: 'action' } |
145 | } | 141 | } |
146 | ], | 142 | ], |
143 | + isorter: { | ||
144 | + column: 'sortingPriority', | ||
145 | + order: 'asc' | ||
146 | + }, | ||
147 | url: { | 147 | url: { |
148 | list: '/waveConfig/waveConfig/listWaveConfigDetailByMainId', | 148 | list: '/waveConfig/waveConfig/listWaveConfigDetailByMainId', |
149 | delete: '/waveConfig/waveConfig/deleteWaveConfigDetail', | 149 | delete: '/waveConfig/waveConfig/deleteWaveConfigDetail', |
@@ -154,7 +154,8 @@ export default { | @@ -154,7 +154,8 @@ export default { | ||
154 | dictOptions: {} | 154 | dictOptions: {} |
155 | } | 155 | } |
156 | }, | 156 | }, |
157 | - created() {}, | 157 | + created() { |
158 | + }, | ||
158 | computed: { | 159 | computed: { |
159 | importExcelUrl() { | 160 | importExcelUrl() { |
160 | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}` | 161 | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}` |
ant-design-vue-jeecg/src/views/system/config/WaveConfigList.vue
@@ -16,7 +16,11 @@ | @@ -16,7 +16,11 @@ | ||
16 | </a-col> | 16 | </a-col> |
17 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 17 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
18 | <a-form-item label="是否启用"> | 18 | <a-form-item label="是否启用"> |
19 | - <j-dict-select-tag placeholder="请选择是否启用" v-model="queryParam.isEnable" dictCode="is_enable_status" /> | 19 | + <j-dict-select-tag |
20 | + placeholder="请选择是否启用" | ||
21 | + v-model="queryParam.isEnable" | ||
22 | + dictCode="is_enable_status" | ||
23 | + /> | ||
20 | </a-form-item> | 24 | </a-form-item> |
21 | </a-col> | 25 | </a-col> |
22 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 26 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
@@ -75,6 +79,17 @@ | @@ -75,6 +79,17 @@ | ||
75 | :customRow="clickThenSelect" | 79 | :customRow="clickThenSelect" |
76 | @change="handleTableChange" | 80 | @change="handleTableChange" |
77 | > | 81 | > |
82 | + <span slot="companyCode" slot-scope="companyCode"> | ||
83 | + <a-tag :key="companyCode" color="blue"> | ||
84 | + {{ solutionCompany(companyCode) }} | ||
85 | + </a-tag> | ||
86 | + </span> | ||
87 | + | ||
88 | + <span slot="zoneCode" slot-scope="zoneCode"> | ||
89 | + <a-tag :key="zoneCode" color="blue"> | ||
90 | + {{ solutionZoneCode(zoneCode) }} | ||
91 | + </a-tag> | ||
92 | + </span> | ||
78 | 93 | ||
79 | <span slot="action" slot-scope="text, record"> | 94 | <span slot="action" slot-scope="text, record"> |
80 | <a @click="handleEdit(record)">编辑</a> | 95 | <a @click="handleEdit(record)">编辑</a> |
@@ -90,7 +105,6 @@ | @@ -90,7 +105,6 @@ | ||
90 | </a-menu> | 105 | </a-menu> |
91 | </a-dropdown> | 106 | </a-dropdown> |
92 | </span> | 107 | </span> |
93 | - | ||
94 | </a-table> | 108 | </a-table> |
95 | </div> | 109 | </div> |
96 | 110 | ||
@@ -110,6 +124,7 @@ import WaveConfigModal from './modules/WaveConfigModal' | @@ -110,6 +124,7 @@ import WaveConfigModal from './modules/WaveConfigModal' | ||
110 | import { getAction } from '@/api/manage' | 124 | import { getAction } from '@/api/manage' |
111 | import WaveConfigDetailList from './WaveConfigDetailList' | 125 | import WaveConfigDetailList from './WaveConfigDetailList' |
112 | import '@/assets/less/TableExpand.less' | 126 | import '@/assets/less/TableExpand.less' |
127 | +import { getCompanyList, getZoneList } from '@/api/api' | ||
113 | 128 | ||
114 | export default { | 129 | export default { |
115 | name: 'WaveConfigList', | 130 | name: 'WaveConfigList', |
@@ -121,9 +136,25 @@ export default { | @@ -121,9 +136,25 @@ export default { | ||
121 | data() { | 136 | data() { |
122 | return { | 137 | return { |
123 | description: '波次配置管理页面', | 138 | description: '波次配置管理页面', |
139 | + companyList: [], | ||
140 | + zoneList: [], | ||
124 | // 表头 | 141 | // 表头 |
125 | columns: [ | 142 | columns: [ |
126 | { | 143 | { |
144 | + title: '货主', | ||
145 | + align: 'center', | ||
146 | + dataIndex: 'companyCode', | ||
147 | + key: 'companyCode', | ||
148 | + scopedSlots: { customRender: 'companyCode' } | ||
149 | + }, | ||
150 | + { | ||
151 | + title: '库区', | ||
152 | + align: 'center', | ||
153 | + dataIndex: 'zoneCode', | ||
154 | + key: 'zoneCode', | ||
155 | + scopedSlots: { customRender: 'zoneCode' } | ||
156 | + }, | ||
157 | + { | ||
127 | title: '波次名称', | 158 | title: '波次名称', |
128 | align: 'center', | 159 | align: 'center', |
129 | dataIndex: 'waveName' | 160 | dataIndex: 'waveName' |
@@ -142,13 +173,13 @@ export default { | @@ -142,13 +173,13 @@ export default { | ||
142 | title: '波次模式', | 173 | title: '波次模式', |
143 | align: 'center', | 174 | align: 'center', |
144 | dataIndex: 'waveModel_dictText', | 175 | dataIndex: 'waveModel_dictText', |
145 | - scopedSlots: {customRender: 'waveModel_dictText'} | 176 | + scopedSlots: { customRender: 'waveModel_dictText' } |
146 | }, | 177 | }, |
147 | { | 178 | { |
148 | title: '是否启用', | 179 | title: '是否启用', |
149 | align: 'center', | 180 | align: 'center', |
150 | dataIndex: 'isEnable_dictText', | 181 | dataIndex: 'isEnable_dictText', |
151 | - scopedSlots: {customRender: 'isEnable_dictText'} | 182 | + scopedSlots: { customRender: 'isEnable_dictText' } |
152 | }, | 183 | }, |
153 | { | 184 | { |
154 | title: '创建人', | 185 | title: '创建人', |
@@ -205,6 +236,7 @@ export default { | @@ -205,6 +236,7 @@ export default { | ||
205 | }, | 236 | }, |
206 | created() { | 237 | created() { |
207 | this.getSuperFieldList() | 238 | this.getSuperFieldList() |
239 | + this.loadFrom() | ||
208 | }, | 240 | }, |
209 | computed: { | 241 | computed: { |
210 | importExcelUrl: function() { | 242 | importExcelUrl: function() { |
@@ -212,6 +244,38 @@ export default { | @@ -212,6 +244,38 @@ export default { | ||
212 | } | 244 | } |
213 | }, | 245 | }, |
214 | methods: { | 246 | methods: { |
247 | + solutionCompany(value) { | ||
248 | + var actions = [] | ||
249 | + Object.keys(this.companyList).some(key => { | ||
250 | + if (this.companyList[key].code == '' + value) { | ||
251 | + actions.push(this.companyList[key].name) | ||
252 | + return true | ||
253 | + } | ||
254 | + }) | ||
255 | + return actions.join('') | ||
256 | + }, | ||
257 | + solutionZoneCode(value) { | ||
258 | + var actions = [] | ||
259 | + Object.keys(this.zoneList).some(key => { | ||
260 | + if (this.zoneList[key].code == '' + value) { | ||
261 | + actions.push(this.zoneList[key].name) | ||
262 | + return true | ||
263 | + } | ||
264 | + }) | ||
265 | + return actions.join('') | ||
266 | + }, | ||
267 | + loadFrom() { | ||
268 | + getCompanyList().then(res => { | ||
269 | + if (res.success) { | ||
270 | + this.companyList = res.result | ||
271 | + } | ||
272 | + }) | ||
273 | + getZoneList().then(res => { | ||
274 | + if (res.success) { | ||
275 | + this.zoneList = res.result | ||
276 | + } | ||
277 | + }) | ||
278 | + }, | ||
215 | initDictConfig() {}, | 279 | initDictConfig() {}, |
216 | clickThenSelect(record) { | 280 | clickThenSelect(record) { |
217 | return { | 281 | return { |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
@@ -163,12 +163,12 @@ | @@ -163,12 +163,12 @@ | ||
163 | </span> | 163 | </span> |
164 | 164 | ||
165 | <span slot="lastStatus_dictText" slot-scope="lastStatus_dictText"> | 165 | <span slot="lastStatus_dictText" slot-scope="lastStatus_dictText"> |
166 | - <a-tag :key="lastStatus_dictText" :color="getStatusColor(lastStatus_dictText)"> | ||
167 | - {{ lastStatus_dictText }} | ||
168 | - </a-tag> | 166 | + <a-tag :key="lastStatus_dictText" :color="getStatusColor(lastStatus_dictText)"> |
167 | + {{ lastStatus_dictText }} | ||
168 | + </a-tag> | ||
169 | </span> | 169 | </span> |
170 | 170 | ||
171 | - <span slot="companyCode" slot-scope="companyCode"> | 171 | + <span slot="companyCode" slot-scope="companyCode"> |
172 | <a-tag :key="companyCode" color=blue> | 172 | <a-tag :key="companyCode" color=blue> |
173 | {{ solutionCompany(companyCode) }} | 173 | {{ solutionCompany(companyCode) }} |
174 | </a-tag> | 174 | </a-tag> |
@@ -610,7 +610,6 @@ export default { | @@ -610,7 +610,6 @@ export default { | ||
610 | }, | 610 | }, |
611 | solutionZoneCode(value) { | 611 | solutionZoneCode(value) { |
612 | var actions = [] | 612 | var actions = [] |
613 | - console.log("solutionZoneCode " + this.zoneList); | ||
614 | Object.keys(this.zoneList).some((key) => { | 613 | Object.keys(this.zoneList).some((key) => { |
615 | if (this.zoneList[key].code == ('' + value)) { | 614 | if (this.zoneList[key].code == ('' + value)) { |
616 | actions.push(this.zoneList[key].name) | 615 | actions.push(this.zoneList[key].name) |
huaheng-wms-core/src/main/java/org/jeecg/modules/quartz/service/impl/QuartzJobServiceImpl.java
@@ -44,7 +44,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | @@ -44,7 +44,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | ||
44 | * 保存&启动定时任务 | 44 | * 保存&启动定时任务 |
45 | */ | 45 | */ |
46 | @Override | 46 | @Override |
47 | - @Transactional(rollbackFor = JeecgBootException.class) | 47 | + @Transactional(rollbackFor = Exception.class) |
48 | public boolean saveAndScheduleJob(QuartzJob quartzJob) { | 48 | public boolean saveAndScheduleJob(QuartzJob quartzJob) { |
49 | // DB设置修改 | 49 | // DB设置修改 |
50 | quartzJob.setDelFlag(CommonConstant.DEL_FLAG_0); | 50 | quartzJob.setDelFlag(CommonConstant.DEL_FLAG_0); |
@@ -62,7 +62,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | @@ -62,7 +62,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | ||
62 | * 恢复定时任务 | 62 | * 恢复定时任务 |
63 | */ | 63 | */ |
64 | @Override | 64 | @Override |
65 | - @Transactional(rollbackFor = JeecgBootException.class) | 65 | + @Transactional(rollbackFor = Exception.class) |
66 | public boolean resumeJob(QuartzJob quartzJob) { | 66 | public boolean resumeJob(QuartzJob quartzJob) { |
67 | schedulerDelete(quartzJob.getId()); | 67 | schedulerDelete(quartzJob.getId()); |
68 | schedulerAdd(quartzJob.getId(), quartzJob.getJobClassName().trim(), quartzJob.getCronExpression().trim(), quartzJob.getParameter()); | 68 | schedulerAdd(quartzJob.getId(), quartzJob.getJobClassName().trim(), quartzJob.getCronExpression().trim(), quartzJob.getParameter()); |
@@ -75,7 +75,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | @@ -75,7 +75,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | ||
75 | * @throws SchedulerException | 75 | * @throws SchedulerException |
76 | */ | 76 | */ |
77 | @Override | 77 | @Override |
78 | - @Transactional(rollbackFor = JeecgBootException.class) | 78 | + @Transactional(rollbackFor = Exception.class) |
79 | public boolean editAndScheduleJob(QuartzJob quartzJob) throws SchedulerException { | 79 | public boolean editAndScheduleJob(QuartzJob quartzJob) throws SchedulerException { |
80 | if (CommonConstant.STATUS_NORMAL.equals(quartzJob.getStatus())) { | 80 | if (CommonConstant.STATUS_NORMAL.equals(quartzJob.getStatus())) { |
81 | schedulerDelete(quartzJob.getId()); | 81 | schedulerDelete(quartzJob.getId()); |
@@ -90,7 +90,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | @@ -90,7 +90,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | ||
90 | * 删除&停止删除定时任务 | 90 | * 删除&停止删除定时任务 |
91 | */ | 91 | */ |
92 | @Override | 92 | @Override |
93 | - @Transactional(rollbackFor = JeecgBootException.class) | 93 | + @Transactional(rollbackFor = Exception.class) |
94 | public boolean deleteAndStopJob(QuartzJob job) { | 94 | public boolean deleteAndStopJob(QuartzJob job) { |
95 | schedulerDelete(job.getId()); | 95 | schedulerDelete(job.getId()); |
96 | boolean ok = this.removeById(job.getId()); | 96 | boolean ok = this.removeById(job.getId()); |
@@ -118,7 +118,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | @@ -118,7 +118,7 @@ public class QuartzJobServiceImpl extends ServiceImpl<QuartzJobMapper, QuartzJob | ||
118 | } | 118 | } |
119 | 119 | ||
120 | @Override | 120 | @Override |
121 | - @Transactional(rollbackFor = JeecgBootException.class) | 121 | + @Transactional(rollbackFor = Exception.class) |
122 | public void pause(QuartzJob quartzJob) { | 122 | public void pause(QuartzJob quartzJob) { |
123 | schedulerDelete(quartzJob.getId()); | 123 | schedulerDelete(quartzJob.getId()); |
124 | quartzJob.setStatus(CommonConstant.STATUS_DISABLE); | 124 | quartzJob.setStatus(CommonConstant.STATUS_DISABLE); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/controller/WaveConfigController.java
@@ -21,6 +21,7 @@ import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig; | @@ -21,6 +21,7 @@ import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig; | ||
21 | import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail; | 21 | import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail; |
22 | import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigDetailService; | 22 | import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigDetailService; |
23 | import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigService; | 23 | import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigService; |
24 | +import org.jeecg.utils.HuahengJwtUtil; | ||
24 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 25 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
25 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 26 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
26 | import org.jeecgframework.poi.excel.entity.ExportParams; | 27 | import org.jeecgframework.poi.excel.entity.ExportParams; |
@@ -80,8 +81,9 @@ public class WaveConfigController extends JeecgController<WaveConfig, IWaveConfi | @@ -80,8 +81,9 @@ public class WaveConfigController extends JeecgController<WaveConfig, IWaveConfi | ||
80 | @ApiOperation(value = "波次配置-分页列表查询", notes = "波次配置-分页列表查询") | 81 | @ApiOperation(value = "波次配置-分页列表查询", notes = "波次配置-分页列表查询") |
81 | @GetMapping(value = "/list") | 82 | @GetMapping(value = "/list") |
82 | public Result<IPage<WaveConfig>> queryPageList(WaveConfig waveConfig, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 83 | public Result<IPage<WaveConfig>> queryPageList(WaveConfig waveConfig, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
83 | - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | ||
84 | - QueryWrapper<WaveConfig> queryWrapper = QueryGenerator.initQueryWrapper(waveConfig, req.getParameterMap()); | 84 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { |
85 | + HuahengJwtUtil.setWarehouseCode(request, waveConfig); | ||
86 | + QueryWrapper<WaveConfig> queryWrapper = QueryGenerator.initQueryWrapper(waveConfig, request.getParameterMap()); | ||
85 | Page<WaveConfig> page = new Page<WaveConfig>(pageNo, pageSize); | 87 | Page<WaveConfig> page = new Page<WaveConfig>(pageNo, pageSize); |
86 | IPage<WaveConfig> pageList = waveConfigService.page(page, queryWrapper); | 88 | IPage<WaveConfig> pageList = waveConfigService.page(page, queryWrapper); |
87 | return Result.OK(pageList); | 89 | return Result.OK(pageList); |
@@ -96,7 +98,8 @@ public class WaveConfigController extends JeecgController<WaveConfig, IWaveConfi | @@ -96,7 +98,8 @@ public class WaveConfigController extends JeecgController<WaveConfig, IWaveConfi | ||
96 | @ApiOperation(value = "波次配置-添加", notes = "波次配置-添加") | 98 | @ApiOperation(value = "波次配置-添加", notes = "波次配置-添加") |
97 | @RequiresPermissions("waveConfig:add") | 99 | @RequiresPermissions("waveConfig:add") |
98 | @PostMapping(value = "/add") | 100 | @PostMapping(value = "/add") |
99 | - public Result<String> add(@RequestBody WaveConfig waveConfig) { | 101 | + public Result<String> add(@RequestBody WaveConfig waveConfig, HttpServletRequest request) { |
102 | + HuahengJwtUtil.setWarehouseCode(request, waveConfig); | ||
100 | waveConfigService.save(waveConfig); | 103 | waveConfigService.save(waveConfig); |
101 | return Result.OK("添加成功!"); | 104 | return Result.OK("添加成功!"); |
102 | } | 105 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/entity/WaveConfig.java
@@ -31,6 +31,21 @@ public class WaveConfig implements Serializable { | @@ -31,6 +31,21 @@ public class WaveConfig implements Serializable { | ||
31 | @ApiModelProperty(value = "ID") | 31 | @ApiModelProperty(value = "ID") |
32 | private java.lang.Integer id; | 32 | private java.lang.Integer id; |
33 | 33 | ||
34 | + /** 仓库 */ | ||
35 | + @Excel(name = "仓库", width = 15) | ||
36 | + @ApiModelProperty(value = "仓库") | ||
37 | + private String warehouseCode; | ||
38 | + | ||
39 | + /** 货主 */ | ||
40 | + @Excel(name = "货主", width = 15, dictTable = "company", dicText = "name", dicCode = "code") | ||
41 | + @ApiModelProperty(value = "货主") | ||
42 | + private String companyCode; | ||
43 | + | ||
44 | + /** 库区 */ | ||
45 | + @Excel(name = "库区", width = 15, dictTable = "zone", dicText = "name", dicCode = "code") | ||
46 | + @ApiModelProperty(value = "库区") | ||
47 | + private String zoneCode; | ||
48 | + | ||
34 | /** 波次名称 */ | 49 | /** 波次名称 */ |
35 | @Excel(name = "波次名称", width = 15) | 50 | @Excel(name = "波次名称", width = 15) |
36 | @ApiModelProperty(value = "波次名称") | 51 | @ApiModelProperty(value = "波次名称") |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/entity/WaveConfigDetail.java
@@ -55,16 +55,6 @@ public class WaveConfigDetail implements Serializable { | @@ -55,16 +55,6 @@ public class WaveConfigDetail implements Serializable { | ||
55 | @ApiModelProperty(value = "排序优先级") | 55 | @ApiModelProperty(value = "排序优先级") |
56 | private java.lang.Integer sortingPriority; | 56 | private java.lang.Integer sortingPriority; |
57 | 57 | ||
58 | - /** 仓库 */ | ||
59 | - @Excel(name = "仓库", width = 15) | ||
60 | - @ApiModelProperty(value = "仓库") | ||
61 | - private String warehouseCode; | ||
62 | - | ||
63 | - /** 库区 */ | ||
64 | - @Excel(name = "库区", width = 15) | ||
65 | - @ApiModelProperty(value = "库区") | ||
66 | - private String zoneCode; | ||
67 | - | ||
68 | /** 创建人 */ | 58 | /** 创建人 */ |
69 | @ApiModelProperty(value = "创建人") | 59 | @ApiModelProperty(value = "创建人") |
70 | private java.lang.String createBy; | 60 | private java.lang.String createBy; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java
@@ -193,7 +193,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -193,7 +193,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
193 | } | 193 | } |
194 | 194 | ||
195 | @Override | 195 | @Override |
196 | - @Transactional(rollbackFor = JeecgBootException.class) | 196 | + @Transactional(rollbackFor = Exception.class) |
197 | public Result shipmentInventoryHeader(List<InventoryHeader> inventoryHeaderList, String warehouseCode) { | 197 | public Result shipmentInventoryHeader(List<InventoryHeader> inventoryHeaderList, String warehouseCode) { |
198 | if (StringUtils.isEmpty(inventoryHeaderList)) { | 198 | if (StringUtils.isEmpty(inventoryHeaderList)) { |
199 | return Result.error("批量快速出库,所选库存头为空"); | 199 | return Result.error("批量快速出库,所选库存头为空"); |
@@ -293,7 +293,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -293,7 +293,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
293 | * @return | 293 | * @return |
294 | */ | 294 | */ |
295 | @Override | 295 | @Override |
296 | - @Transactional(rollbackFor = JeecgBootException.class) | 296 | + @Transactional(rollbackFor = Exception.class) |
297 | public Result shipmentInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) { | 297 | public Result shipmentInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) { |
298 | if (StringUtils.isEmpty(inventoryDetailList)) { | 298 | if (StringUtils.isEmpty(inventoryDetailList)) { |
299 | return Result.error("批量快速出库,所选库存详情为空"); | 299 | return Result.error("批量快速出库,所选库存详情为空"); |
@@ -388,7 +388,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -388,7 +388,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
388 | * @return | 388 | * @return |
389 | */ | 389 | */ |
390 | @Override | 390 | @Override |
391 | - @Transactional(rollbackFor = JeecgBootException.class) | 391 | + @Transactional(rollbackFor = Exception.class) |
392 | public Result decuceInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) { | 392 | public Result decuceInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) { |
393 | if (CollectionUtils.isEmpty(inventoryDetailList)) { | 393 | if (CollectionUtils.isEmpty(inventoryDetailList)) { |
394 | return Result.error("扣减库存失败,参数为空"); | 394 | return Result.error("扣减库存失败,参数为空"); |
@@ -508,7 +508,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | @@ -508,7 +508,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe | ||
508 | * @return | 508 | * @return |
509 | */ | 509 | */ |
510 | @Override | 510 | @Override |
511 | - @Transactional(rollbackFor = JeecgBootException.class) | 511 | + @Transactional(rollbackFor = Exception.class) |
512 | public Result qualityInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) { | 512 | public Result qualityInventoryDetail(List<InventoryDetail> inventoryDetailList, String warehouseCode) { |
513 | if (StringUtils.isEmpty(inventoryDetailList)) { | 513 | if (StringUtils.isEmpty(inventoryDetailList)) { |
514 | return Result.error("质检库存详情失败,所选库存详情为空"); | 514 | return Result.error("质检库存详情失败,所选库存详情为空"); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/AutoCreateWaveConfigTask.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.job; | ||
2 | + | ||
3 | +import com.alibaba.fastjson.JSON; | ||
4 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
5 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | ||
6 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
7 | +import lombok.extern.slf4j.Slf4j; | ||
8 | +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig; | ||
9 | +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail; | ||
10 | +import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigDetailService; | ||
11 | +import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigService; | ||
12 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | ||
13 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; | ||
14 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; | ||
15 | +import org.jeecg.utils.constant.QuantityConstant; | ||
16 | +import org.quartz.*; | ||
17 | + | ||
18 | +import javax.annotation.Resource; | ||
19 | +import java.util.List; | ||
20 | + | ||
21 | +@Slf4j | ||
22 | +@PersistJobDataAfterExecution | ||
23 | +@DisallowConcurrentExecution | ||
24 | +public class AutoCreateWaveConfigTask implements Job { | ||
25 | + | ||
26 | + @Resource | ||
27 | + private IWaveConfigService waveConfigService; | ||
28 | + | ||
29 | + @Resource | ||
30 | + private IWaveConfigDetailService waveConfigDetailService; | ||
31 | + | ||
32 | + @Resource | ||
33 | + private IShipmentHeaderService shipmentHeaderService; | ||
34 | + | ||
35 | + @Override | ||
36 | + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { | ||
37 | + LambdaQueryWrapper<WaveConfig> waveConfigLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
38 | + waveConfigLambdaQueryWrapper.eq(WaveConfig::getIsEnable, QuantityConstant.WAVE_Config_START); | ||
39 | + List<WaveConfig> waveConfigList = waveConfigService.list(waveConfigLambdaQueryWrapper); | ||
40 | + if (CollectionUtils.isEmpty(waveConfigList)) { | ||
41 | + return; | ||
42 | + } | ||
43 | + for (WaveConfig waveConfig : waveConfigList) { | ||
44 | + LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
45 | + shipmentHeaderLambdaQueryWrapper.eq(ShipmentHeader::getWaveConfigId, waveConfig.getId()).lt(ShipmentHeader::getFirstStatus, | ||
46 | + QuantityConstant.RECEIPT_HEADER_COMPLETED); | ||
47 | + List<ShipmentHeader> shipmentHeaderList = shipmentHeaderService.list(shipmentHeaderLambdaQueryWrapper); | ||
48 | + if (!CollectionUtils.isEmpty(shipmentHeaderList)) { | ||
49 | + continue; | ||
50 | + } | ||
51 | + LambdaQueryWrapper<WaveConfigDetail> waveConfigDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
52 | + waveConfigDetailLambdaQueryWrapper.eq(WaveConfigDetail::getMainId, waveConfig.getId()); | ||
53 | + List<WaveConfigDetail> waveConfigDetailList = waveConfigDetailService.list(waveConfigDetailLambdaQueryWrapper); | ||
54 | + if (CollectionUtils.isEmpty(waveConfigDetailList)) { | ||
55 | + continue; | ||
56 | + } | ||
57 | + try { | ||
58 | + shipmentHeaderService.createShipment(waveConfig, waveConfigDetailList); | ||
59 | + } catch (Exception e) { | ||
60 | + log.error("波次下发任务异常,waveConfig:{}", JSON.toJSONString(waveConfig), e); | ||
61 | + } | ||
62 | + } | ||
63 | + } | ||
64 | +} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
@@ -359,7 +359,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -359,7 +359,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
359 | } | 359 | } |
360 | 360 | ||
361 | @Override | 361 | @Override |
362 | - @Transactional(rollbackFor = JeecgBootException.class) | 362 | + @Transactional(rollbackFor = Exception.class) |
363 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务取消'", extra = "#extraJsonString", msg = "'任务ID:' + #taskHeader.getId()", | 363 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务取消'", extra = "#extraJsonString", msg = "'任务ID:' + #taskHeader.getId()", |
364 | condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true) | 364 | condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true) |
365 | public boolean cancelReceiptTask(TaskHeader taskHeader) { | 365 | public boolean cancelReceiptTask(TaskHeader taskHeader) { |
@@ -446,7 +446,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -446,7 +446,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
446 | } | 446 | } |
447 | 447 | ||
448 | @Override | 448 | @Override |
449 | - @Transactional(rollbackFor = JeecgBootException.class) | 449 | + @Transactional(rollbackFor = Exception.class) |
450 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情取消组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 450 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情取消组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
451 | public Result cancelReceiving(Integer id) { | 451 | public Result cancelReceiving(Integer id) { |
452 | log.info("开始取消入库组盘"); | 452 | log.info("开始取消入库组盘"); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptDetailServiceImpl.java
@@ -104,7 +104,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R | @@ -104,7 +104,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R | ||
104 | } | 104 | } |
105 | 105 | ||
106 | @Override | 106 | @Override |
107 | - @Transactional(rollbackFor = JeecgBootException.class) | 107 | + @Transactional(rollbackFor = Exception.class) |
108 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情删除'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 108 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情删除'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
109 | public Result removeDetailById(String id) { | 109 | public Result removeDetailById(String id) { |
110 | ReceiptDetail receiptDetail = receiptDetailService.getById(id); | 110 | ReceiptDetail receiptDetail = receiptDetailService.getById(id); |
@@ -135,7 +135,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R | @@ -135,7 +135,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R | ||
135 | } | 135 | } |
136 | 136 | ||
137 | @Override | 137 | @Override |
138 | - @Transactional(rollbackFor = JeecgBootException.class) | 138 | + @Transactional(rollbackFor = Exception.class) |
139 | public Result removeDetailListById(List<String> idList) { | 139 | public Result removeDetailListById(List<String> idList) { |
140 | Result result = null; | 140 | Result result = null; |
141 | for (String id : idList) { | 141 | for (String id : idList) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
@@ -114,7 +114,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -114,7 +114,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
114 | * @return | 114 | * @return |
115 | */ | 115 | */ |
116 | @Override | 116 | @Override |
117 | - @Transactional(rollbackFor = JeecgBootException.class) | 117 | + @Transactional(rollbackFor = Exception.class) |
118 | public Result<TaskHeader> receivingAndCreateTask(List<Receive> receiveList, String warehouseCode) { | 118 | public Result<TaskHeader> receivingAndCreateTask(List<Receive> receiveList, String warehouseCode) { |
119 | Result<ReceiptContainerHeader> result = receiveService.receiving(receiveList, warehouseCode); | 119 | Result<ReceiptContainerHeader> result = receiveService.receiving(receiveList, warehouseCode); |
120 | if (result.isSuccess()) { | 120 | if (result.isSuccess()) { |
@@ -135,7 +135,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -135,7 +135,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
135 | * 7.更新入库单状态 | 135 | * 7.更新入库单状态 |
136 | */ | 136 | */ |
137 | @Override | 137 | @Override |
138 | - @Transactional(rollbackFor = JeecgBootException.class) | 138 | + @Transactional(rollbackFor = Exception.class) |
139 | @OperationLog(bizId = "''", bizType = "'物料追踪'", tag = "'入库组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 139 | @OperationLog(bizId = "''", bizType = "'物料追踪'", tag = "'入库组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
140 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 140 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
141 | public Result<ReceiptContainerHeader> receiving(List<Receive> receiveList, String warehouseCode) { | 141 | public Result<ReceiptContainerHeader> receiving(List<Receive> receiveList, String warehouseCode) { |
@@ -339,7 +339,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -339,7 +339,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
339 | } | 339 | } |
340 | 340 | ||
341 | @Override | 341 | @Override |
342 | - @Transactional(rollbackFor = JeecgBootException.class) | 342 | + @Transactional(rollbackFor = Exception.class) |
343 | public Result flatReceive(List<Receive> receiveList, String containerCode, String warehouseCode) { | 343 | public Result flatReceive(List<Receive> receiveList, String containerCode, String warehouseCode) { |
344 | log.info("开始平库入库组盘"); | 344 | log.info("开始平库入库组盘"); |
345 | boolean success = false; | 345 | boolean success = false; |
@@ -512,7 +512,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -512,7 +512,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
512 | } | 512 | } |
513 | 513 | ||
514 | @Override | 514 | @Override |
515 | - @Transactional(rollbackFor = JeecgBootException.class) | 515 | + @Transactional(rollbackFor = Exception.class) |
516 | public Result flatOnShell(String containerCode, String toLocationCode, String warehouseCode) { | 516 | public Result flatOnShell(String containerCode, String toLocationCode, String warehouseCode) { |
517 | log.info("开始完成上架任务, 托盘号" + containerCode); | 517 | log.info("开始完成上架任务, 托盘号" + containerCode); |
518 | int taskType = QuantityConstant.TASK_TYPE_WHOLERECEIPT; | 518 | int taskType = QuantityConstant.TASK_TYPE_WHOLERECEIPT; |
@@ -669,7 +669,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | @@ -669,7 +669,7 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl | ||
669 | } | 669 | } |
670 | 670 | ||
671 | @Override | 671 | @Override |
672 | - @Transactional(rollbackFor = JeecgBootException.class) | 672 | + @Transactional(rollbackFor = Exception.class) |
673 | public Result flatReceipt(List<Receive> receiveList, String containerCode, String toLocationCode, String warehouseCode) { | 673 | public Result flatReceipt(List<Receive> receiveList, String containerCode, String toLocationCode, String warehouseCode) { |
674 | Result result = receiveService.flatReceive(receiveList, containerCode, warehouseCode); | 674 | Result result = receiveService.flatReceive(receiveList, containerCode, warehouseCode); |
675 | result = receiveService.flatOnShell(containerCode, toLocationCode, warehouseCode); | 675 | result = receiveService.flatOnShell(containerCode, toLocationCode, warehouseCode); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -134,7 +134,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -134,7 +134,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
134 | * @return | 134 | * @return |
135 | */ | 135 | */ |
136 | @Override | 136 | @Override |
137 | - @Transactional(rollbackFor = JeecgBootException.class) | 137 | + @Transactional(rollbackFor = Exception.class) |
138 | public List<InventoryDetail> getInventorys(ShipmentDetail shipmentDetail) { | 138 | public List<InventoryDetail> getInventorys(ShipmentDetail shipmentDetail) { |
139 | String warehouseCode = shipmentDetail.getWarehouseCode(); | 139 | String warehouseCode = shipmentDetail.getWarehouseCode(); |
140 | String companyCode = shipmentDetail.getCompanyCode(); | 140 | String companyCode = shipmentDetail.getCompanyCode(); |
@@ -213,7 +213,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -213,7 +213,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
213 | } | 213 | } |
214 | 214 | ||
215 | @Override | 215 | @Override |
216 | - @Transactional(rollbackFor = JeecgBootException.class) | 216 | + @Transactional(rollbackFor = Exception.class) |
217 | public List<InventoryDetail> getAllInventorys(ShipmentDetail shipmentDetail) { | 217 | public List<InventoryDetail> getAllInventorys(ShipmentDetail shipmentDetail) { |
218 | String warehouseCode = shipmentDetail.getWarehouseCode(); | 218 | String warehouseCode = shipmentDetail.getWarehouseCode(); |
219 | String companyCode = shipmentDetail.getCompanyCode(); | 219 | String companyCode = shipmentDetail.getCompanyCode(); |
@@ -248,13 +248,13 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -248,13 +248,13 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
248 | } | 248 | } |
249 | 249 | ||
250 | @Override | 250 | @Override |
251 | - @Transactional(rollbackFor = JeecgBootException.class) | 251 | + @Transactional(rollbackFor = Exception.class) |
252 | public Result autoCombination(String shipmentCode, String warehouseCode) { | 252 | public Result autoCombination(String shipmentCode, String warehouseCode) { |
253 | return shipmentCombinationService.autoCombination(shipmentCode, false, warehouseCode); | 253 | return shipmentCombinationService.autoCombination(shipmentCode, false, warehouseCode); |
254 | } | 254 | } |
255 | 255 | ||
256 | @Override | 256 | @Override |
257 | - @Transactional(rollbackFor = JeecgBootException.class) | 257 | + @Transactional(rollbackFor = Exception.class) |
258 | public Result autoCombination(String shipmentCode, boolean advice, String warehouseCode) { | 258 | public Result autoCombination(String shipmentCode, boolean advice, String warehouseCode) { |
259 | log.info("开始自动配盘,单号" + shipmentCode); | 259 | log.info("开始自动配盘,单号" + shipmentCode); |
260 | LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | 260 | LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
@@ -290,19 +290,19 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -290,19 +290,19 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
290 | } | 290 | } |
291 | 291 | ||
292 | @Override | 292 | @Override |
293 | - @Transactional(rollbackFor = JeecgBootException.class) | 293 | + @Transactional(rollbackFor = Exception.class) |
294 | public Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber) { | 294 | public Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber) { |
295 | return shipmentCombinationService.createShipmentTask(shipmentContainerHeader, 0, warehouseCode, shipmentOrder, sequence, sequenceNumber); | 295 | return shipmentCombinationService.createShipmentTask(shipmentContainerHeader, 0, warehouseCode, shipmentOrder, sequence, sequenceNumber); |
296 | } | 296 | } |
297 | 297 | ||
298 | @Override | 298 | @Override |
299 | - @Transactional(rollbackFor = JeecgBootException.class) | 299 | + @Transactional(rollbackFor = Exception.class) |
300 | public Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, int forceTaskType, String warehouseCode) { | 300 | public Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, int forceTaskType, String warehouseCode) { |
301 | return shipmentCombinationService.createShipmentTask(shipmentContainerHeader, forceTaskType, warehouseCode, 0, 0, 0); | 301 | return shipmentCombinationService.createShipmentTask(shipmentContainerHeader, forceTaskType, warehouseCode, 0, 0, 0); |
302 | } | 302 | } |
303 | 303 | ||
304 | @Override | 304 | @Override |
305 | - @Transactional(rollbackFor = JeecgBootException.class) | 305 | + @Transactional(rollbackFor = Exception.class) |
306 | public Result autoCombinationDetail(ShipmentDetail shipmentDetail, BigDecimal shipQty) { | 306 | public Result autoCombinationDetail(ShipmentDetail shipmentDetail, BigDecimal shipQty) { |
307 | return shipmentCombinationService.autoCombinationDetail(shipmentDetail, false, shipQty); | 307 | return shipmentCombinationService.autoCombinationDetail(shipmentDetail, false, shipQty); |
308 | } | 308 | } |
@@ -311,7 +311,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -311,7 +311,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
311 | * 出库单据明细自动配盘 | 311 | * 出库单据明细自动配盘 |
312 | */ | 312 | */ |
313 | @Override | 313 | @Override |
314 | - @Transactional(rollbackFor = JeecgBootException.class) | 314 | + @Transactional(rollbackFor = Exception.class) |
315 | public Result autoCombinationDetail(ShipmentDetail shipmentDetail, boolean advice, BigDecimal shipQty) { | 315 | public Result autoCombinationDetail(ShipmentDetail shipmentDetail, boolean advice, BigDecimal shipQty) { |
316 | // 出库数量 | 316 | // 出库数量 |
317 | BigDecimal shipmentQty = shipmentDetail.getQty().subtract(shipmentDetail.getTaskQty()); | 317 | BigDecimal shipmentQty = shipmentDetail.getQty().subtract(shipmentDetail.getTaskQty()); |
@@ -394,7 +394,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -394,7 +394,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
394 | } | 394 | } |
395 | 395 | ||
396 | @Override | 396 | @Override |
397 | - @Transactional(rollbackFor = JeecgBootException.class) | 397 | + @Transactional(rollbackFor = Exception.class) |
398 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情配盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 398 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情配盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
399 | public Result combination(CombinationModel combinationModel) { | 399 | public Result combination(CombinationModel combinationModel) { |
400 | BigDecimal shipmentQty = combinationModel.getShipQty(); | 400 | BigDecimal shipmentQty = combinationModel.getShipQty(); |
@@ -514,7 +514,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -514,7 +514,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
514 | } | 514 | } |
515 | 515 | ||
516 | @Override | 516 | @Override |
517 | - @Transactional(rollbackFor = JeecgBootException.class) | 517 | + @Transactional(rollbackFor = Exception.class) |
518 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情配盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 518 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情配盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
519 | public Result combinationAdvice(CombinationModel combinationModel) { | 519 | public Result combinationAdvice(CombinationModel combinationModel) { |
520 | BigDecimal shipmentQty = combinationModel.getShipQty(); | 520 | BigDecimal shipmentQty = combinationModel.getShipQty(); |
@@ -634,7 +634,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -634,7 +634,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
634 | } | 634 | } |
635 | 635 | ||
636 | @Override | 636 | @Override |
637 | - @Transactional(rollbackFor = JeecgBootException.class) | 637 | + @Transactional(rollbackFor = Exception.class) |
638 | public ShipmentContainerHeader addShipmentContainerHeader(InventoryDetail inventoryDetail, ShipmentDetail shipmentDetail) { | 638 | public ShipmentContainerHeader addShipmentContainerHeader(InventoryDetail inventoryDetail, ShipmentDetail shipmentDetail) { |
639 | String containerCode = inventoryDetail.getContainerCode(); | 639 | String containerCode = inventoryDetail.getContainerCode(); |
640 | String warehouseCode = inventoryDetail.getWarehouseCode(); | 640 | String warehouseCode = inventoryDetail.getWarehouseCode(); |
@@ -705,7 +705,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -705,7 +705,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
705 | } | 705 | } |
706 | 706 | ||
707 | @Override | 707 | @Override |
708 | - @Transactional(rollbackFor = JeecgBootException.class) | 708 | + @Transactional(rollbackFor = Exception.class) |
709 | public ShipmentContainerDetail addShipmentContainerDetail(ShipmentContainerHeader shipmentContainerHeader, CombinationModel combinationModel) { | 709 | public ShipmentContainerDetail addShipmentContainerDetail(ShipmentContainerHeader shipmentContainerHeader, CombinationModel combinationModel) { |
710 | boolean success = false; | 710 | boolean success = false; |
711 | BigDecimal shipmentQty = combinationModel.getShipQty(); | 711 | BigDecimal shipmentQty = combinationModel.getShipQty(); |
@@ -759,7 +759,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -759,7 +759,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
759 | } | 759 | } |
760 | 760 | ||
761 | @Override | 761 | @Override |
762 | - @Transactional(rollbackFor = JeecgBootException.class) | 762 | + @Transactional(rollbackFor = Exception.class) |
763 | public ShipmentContainerAdvice addShipmentContainerAdvice(ShipmentContainerHeader shipmentContainerHeader, CombinationModel combinationModel) { | 763 | public ShipmentContainerAdvice addShipmentContainerAdvice(ShipmentContainerHeader shipmentContainerHeader, CombinationModel combinationModel) { |
764 | boolean success = false; | 764 | boolean success = false; |
765 | BigDecimal shipmentQty = combinationModel.getShipQty(); | 765 | BigDecimal shipmentQty = combinationModel.getShipQty(); |
@@ -809,7 +809,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -809,7 +809,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
809 | } | 809 | } |
810 | 810 | ||
811 | @Override | 811 | @Override |
812 | - @Transactional(rollbackFor = JeecgBootException.class) | 812 | + @Transactional(rollbackFor = Exception.class) |
813 | public Result flatShipmentByContainerCode(String containerCode, List<FlatShipment> flatShipments, String warehouseCode) { | 813 | public Result flatShipmentByContainerCode(String containerCode, List<FlatShipment> flatShipments, String warehouseCode) { |
814 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); | 814 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
815 | if (container == null) { | 815 | if (container == null) { |
@@ -1032,7 +1032,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -1032,7 +1032,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | @Override | 1034 | @Override |
1035 | - @Transactional(rollbackFor = JeecgBootException.class) | 1035 | + @Transactional(rollbackFor = Exception.class) |
1036 | public Result flatShipmentByLocationCode(String locationCode, List<FlatShipment> flatShipments, String warehouseCode) { | 1036 | public Result flatShipmentByLocationCode(String locationCode, List<FlatShipment> flatShipments, String warehouseCode) { |
1037 | InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByLocationCode(locationCode, warehouseCode); | 1037 | InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByLocationCode(locationCode, warehouseCode); |
1038 | if (inventoryHeader == null) { | 1038 | if (inventoryHeader == null) { |
@@ -1049,7 +1049,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -1049,7 +1049,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
1049 | * @return | 1049 | * @return |
1050 | */ | 1050 | */ |
1051 | @Override | 1051 | @Override |
1052 | - @Transactional(rollbackFor = JeecgBootException.class) | 1052 | + @Transactional(rollbackFor = Exception.class) |
1053 | public Result completeFlatShipment(ShipmentContainerHeader shipmentContainerHeader) { | 1053 | public Result completeFlatShipment(ShipmentContainerHeader shipmentContainerHeader) { |
1054 | if (shipmentContainerHeader == null) { | 1054 | if (shipmentContainerHeader == null) { |
1055 | throw new JeecgBootException("完成平库出库失败,获取出库组盘头失败"); | 1055 | throw new JeecgBootException("完成平库出库失败,获取出库组盘头失败"); |
@@ -1195,7 +1195,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -1195,7 +1195,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
1195 | } | 1195 | } |
1196 | 1196 | ||
1197 | @Override | 1197 | @Override |
1198 | - @Transactional(rollbackFor = JeecgBootException.class) | 1198 | + @Transactional(rollbackFor = Exception.class) |
1199 | public Result createCallShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, | 1199 | public Result createCallShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, |
1200 | int sequenceNumber) { | 1200 | int sequenceNumber) { |
1201 | Integer preTaskNo = 0; | 1201 | Integer preTaskNo = 0; |
@@ -1281,7 +1281,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -1281,7 +1281,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
1281 | } | 1281 | } |
1282 | 1282 | ||
1283 | @Override | 1283 | @Override |
1284 | - @Transactional(rollbackFor = JeecgBootException.class) | 1284 | + @Transactional(rollbackFor = Exception.class) |
1285 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务生成'", extra = "#extraJsonString1", | 1285 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务生成'", extra = "#extraJsonString1", |
1286 | msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #shipmentContainerHeader.getFromLocationCode() + ',容器编码:' + #shipmentContainerHeader.getContainerCode() + ',目标出入口:' + #shipmentContainerHeader.getToPort()", | 1286 | msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #shipmentContainerHeader.getFromLocationCode() + ',容器编码:' + #shipmentContainerHeader.getContainerCode() + ',目标出入口:' + #shipmentContainerHeader.getToPort()", |
1287 | condition = "#shipmentContainerDetailList.size() > 0", recordReturnValue = true) | 1287 | condition = "#shipmentContainerDetailList.size() > 0", recordReturnValue = true) |
@@ -1459,7 +1459,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -1459,7 +1459,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
1459 | } | 1459 | } |
1460 | 1460 | ||
1461 | @Override | 1461 | @Override |
1462 | - @Transactional(rollbackFor = JeecgBootException.class) | 1462 | + @Transactional(rollbackFor = Exception.class) |
1463 | public Result createShipmentTaskByAgv(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode) { | 1463 | public Result createShipmentTaskByAgv(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode) { |
1464 | Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, warehouseCode, 0, 0, 0); | 1464 | Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, warehouseCode, 0, 0, 0); |
1465 | String containerCode = shipmentContainerHeader.getContainerCode(); | 1465 | String containerCode = shipmentContainerHeader.getContainerCode(); |
@@ -1477,7 +1477,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -1477,7 +1477,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
1477 | } | 1477 | } |
1478 | 1478 | ||
1479 | @Override | 1479 | @Override |
1480 | - @Transactional(rollbackFor = JeecgBootException.class) | 1480 | + @Transactional(rollbackFor = Exception.class) |
1481 | public Result createShipmentTaskAndAgvTask(ShipmentContainerHeader shipmentContainerHeader, int forceTaskType, String warehouseCode) { | 1481 | public Result createShipmentTaskAndAgvTask(ShipmentContainerHeader shipmentContainerHeader, int forceTaskType, String warehouseCode) { |
1482 | Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, forceTaskType, warehouseCode); | 1482 | Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, forceTaskType, warehouseCode); |
1483 | if (!result.isSuccess()) { | 1483 | if (!result.isSuccess()) { |
@@ -1511,7 +1511,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | @@ -1511,7 +1511,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi | ||
1511 | } | 1511 | } |
1512 | 1512 | ||
1513 | @Override | 1513 | @Override |
1514 | - @Transactional(rollbackFor = JeecgBootException.class) | 1514 | + @Transactional(rollbackFor = Exception.class) |
1515 | public Result getInventoryFromShipmentDetail(Integer shipmentDetailId) { | 1515 | public Result getInventoryFromShipmentDetail(Integer shipmentDetailId) { |
1516 | ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentDetailId); | 1516 | ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentDetailId); |
1517 | if (shipmentDetail == null) { | 1517 | if (shipmentDetail == null) { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerAdvice/service/impl/ShipmentContainerAdviceServiceImpl.java
@@ -97,7 +97,7 @@ public class ShipmentContainerAdviceServiceImpl extends ServiceImpl<ShipmentCont | @@ -97,7 +97,7 @@ public class ShipmentContainerAdviceServiceImpl extends ServiceImpl<ShipmentCont | ||
97 | } | 97 | } |
98 | 98 | ||
99 | @Override | 99 | @Override |
100 | - @Transactional(rollbackFor = JeecgBootException.class) | 100 | + @Transactional(rollbackFor = Exception.class) |
101 | public Result cancelCombine(Integer id) { | 101 | public Result cancelCombine(Integer id) { |
102 | log.info("开始取消预配盘,id:" + id); | 102 | log.info("开始取消预配盘,id:" + id); |
103 | ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(id); | 103 | ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(id); |
@@ -161,7 +161,7 @@ public class ShipmentContainerAdviceServiceImpl extends ServiceImpl<ShipmentCont | @@ -161,7 +161,7 @@ public class ShipmentContainerAdviceServiceImpl extends ServiceImpl<ShipmentCont | ||
161 | } | 161 | } |
162 | 162 | ||
163 | @Override | 163 | @Override |
164 | - @Transactional(rollbackFor = JeecgBootException.class) | 164 | + @Transactional(rollbackFor = Exception.class) |
165 | public Result reduceInventoryDetailBySn(String snList, String warehouseCode) { | 165 | public Result reduceInventoryDetailBySn(String snList, String warehouseCode) { |
166 | List<String> snList1 = Arrays.asList(snList.split(",")); | 166 | List<String> snList1 = Arrays.asList(snList.split(",")); |
167 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | 167 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/service/impl/ShipmentContainerHeaderServiceImpl.java
@@ -225,7 +225,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont | @@ -225,7 +225,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont | ||
225 | } | 225 | } |
226 | 226 | ||
227 | @Override | 227 | @Override |
228 | - @Transactional(rollbackFor = JeecgBootException.class) | 228 | + @Transactional(rollbackFor = Exception.class) |
229 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情取消配盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 229 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情取消配盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
230 | public Result cancelCombine(Integer id) { | 230 | public Result cancelCombine(Integer id) { |
231 | log.info("开始取消配盘,id:" + id); | 231 | log.info("开始取消配盘,id:" + id); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentHeader.java
@@ -81,6 +81,10 @@ public class ShipmentHeader implements Serializable { | @@ -81,6 +81,10 @@ public class ShipmentHeader implements Serializable { | ||
81 | @Excel(name = "总行数", width = 15) | 81 | @Excel(name = "总行数", width = 15) |
82 | @ApiModelProperty(value = "总行数") | 82 | @ApiModelProperty(value = "总行数") |
83 | private Integer totalLines; | 83 | private Integer totalLines; |
84 | + /** 波次id */ | ||
85 | + @Excel(name = "波次id", width = 15) | ||
86 | + @ApiModelProperty(value = "波次id") | ||
87 | + private Integer waveConfigId; | ||
84 | /** 出库单备注 */ | 88 | /** 出库单备注 */ |
85 | @Excel(name = "出库单备注", width = 15) | 89 | @Excel(name = "出库单备注", width = 15) |
86 | @ApiModelProperty(value = "出库单备注") | 90 | @ApiModelProperty(value = "出库单备注") |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/IShipmentHeaderService.java
@@ -5,6 +5,8 @@ import java.util.Collection; | @@ -5,6 +5,8 @@ import java.util.Collection; | ||
5 | import java.util.List; | 5 | import java.util.List; |
6 | 6 | ||
7 | import org.jeecg.common.api.vo.Result; | 7 | import org.jeecg.common.api.vo.Result; |
8 | +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig; | ||
9 | +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail; | ||
8 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | 10 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; |
9 | 11 | ||
10 | import com.baomidou.mybatisplus.extension.service.IService; | 12 | import com.baomidou.mybatisplus.extension.service.IService; |
@@ -46,4 +48,6 @@ public interface IShipmentHeaderService extends IService<ShipmentHeader> { | @@ -46,4 +48,6 @@ public interface IShipmentHeaderService extends IService<ShipmentHeader> { | ||
46 | Result autoShipment(String shipmentCode, String warehouseCode); | 48 | Result autoShipment(String shipmentCode, String warehouseCode); |
47 | 49 | ||
48 | Result autoShipmentAdvice(String shipmentCode, String warehouseCode); | 50 | Result autoShipmentAdvice(String shipmentCode, String warehouseCode); |
51 | + | ||
52 | + Result createShipment(WaveConfig waveConfig, List<WaveConfigDetail> waveConfigDetailList); | ||
49 | } | 53 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentDetailServiceImpl.java
@@ -53,7 +53,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, | @@ -53,7 +53,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, | ||
53 | } | 53 | } |
54 | 54 | ||
55 | @Override | 55 | @Override |
56 | - @Transactional(rollbackFor = JeecgBootException.class) | 56 | + @Transactional(rollbackFor = Exception.class) |
57 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情添加'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) | 57 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情添加'", extra = "#extraJsonString", msg = "''", recordReturnValue = true) |
58 | public Result saveShipmentDetail(ShipmentDetail shipmentDetail) { | 58 | public Result saveShipmentDetail(ShipmentDetail shipmentDetail) { |
59 | ShipmentHeader shipmentHeader = shipmentHeaderService.getById(shipmentDetail.getShipmentId()); | 59 | ShipmentHeader shipmentHeader = shipmentHeaderService.getById(shipmentDetail.getShipmentId()); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
@@ -6,6 +6,7 @@ import java.text.SimpleDateFormat; | @@ -6,6 +6,7 @@ import java.text.SimpleDateFormat; | ||
6 | import java.util.Collection; | 6 | import java.util.Collection; |
7 | import java.util.Date; | 7 | import java.util.Date; |
8 | import java.util.List; | 8 | import java.util.List; |
9 | +import java.util.Map; | ||
9 | import java.util.stream.Collectors; | 10 | import java.util.stream.Collectors; |
10 | 11 | ||
11 | import javax.annotation.Resource; | 12 | import javax.annotation.Resource; |
@@ -20,10 +21,14 @@ import org.jeecg.modules.wms.config.port.entity.Port; | @@ -20,10 +21,14 @@ import org.jeecg.modules.wms.config.port.entity.Port; | ||
20 | import org.jeecg.modules.wms.config.port.service.IPortService; | 21 | import org.jeecg.modules.wms.config.port.service.IPortService; |
21 | import org.jeecg.modules.wms.config.shipmentType.entity.ShipmentType; | 22 | import org.jeecg.modules.wms.config.shipmentType.entity.ShipmentType; |
22 | import org.jeecg.modules.wms.config.shipmentType.service.IShipmentTypeService; | 23 | import org.jeecg.modules.wms.config.shipmentType.service.IShipmentTypeService; |
24 | +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig; | ||
25 | +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail; | ||
23 | import org.jeecg.modules.wms.config.zone.entity.Zone; | 26 | import org.jeecg.modules.wms.config.zone.entity.Zone; |
24 | import org.jeecg.modules.wms.config.zone.service.IZoneService; | 27 | import org.jeecg.modules.wms.config.zone.service.IZoneService; |
25 | import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; | 28 | import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; |
29 | +import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | ||
26 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; | 30 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
31 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | ||
27 | import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService; | 32 | import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService; |
28 | import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.entity.ShipmentContainerAdvice; | 33 | import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.entity.ShipmentContainerAdvice; |
29 | import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.service.IShipmentContainerAdviceService; | 34 | import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.service.IShipmentContainerAdviceService; |
@@ -99,16 +104,22 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -99,16 +104,22 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
99 | 104 | ||
100 | @Resource | 105 | @Resource |
101 | private IShipmentHeaderHistoryService shipmentHeaderHistoryService; | 106 | private IShipmentHeaderHistoryService shipmentHeaderHistoryService; |
107 | + | ||
102 | @Resource | 108 | @Resource |
103 | private IShipmentCombinationService shipmentCombinationService; | 109 | private IShipmentCombinationService shipmentCombinationService; |
110 | + | ||
104 | @Resource | 111 | @Resource |
105 | private IShipmentContainerHeaderService shipmentContainerHeaderService; | 112 | private IShipmentContainerHeaderService shipmentContainerHeaderService; |
113 | + | ||
106 | @Resource | 114 | @Resource |
107 | private IHuahengMultiHandlerService huahengMultiHandlerService; | 115 | private IHuahengMultiHandlerService huahengMultiHandlerService; |
116 | + | ||
108 | @Resource | 117 | @Resource |
109 | private IPortService portService; | 118 | private IPortService portService; |
119 | + | ||
110 | @Resource | 120 | @Resource |
111 | private IZoneService zoneService; | 121 | private IZoneService zoneService; |
122 | + | ||
112 | @Resource | 123 | @Resource |
113 | private IShipmentContainerAdviceService shipmentContainerAdviceService; | 124 | private IShipmentContainerAdviceService shipmentContainerAdviceService; |
114 | 125 | ||
@@ -134,7 +145,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -134,7 +145,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
134 | } | 145 | } |
135 | 146 | ||
136 | @Override | 147 | @Override |
137 | - @Transactional(rollbackFor = JeecgBootException.class) | 148 | + @Transactional(rollbackFor = Exception.class) |
138 | @OperationLog(bizId = "#shipmentHeader == null ? '' : #shipmentHeader.getCode()", bizType = "'出库单追踪'", tag = "'出库单新增'", | 149 | @OperationLog(bizId = "#shipmentHeader == null ? '' : #shipmentHeader.getCode()", bizType = "'出库单追踪'", tag = "'出库单新增'", |
139 | msg = "'上游单号:'+ #shipmentHeader.getReferCode() + ',仓库编码:' + #shipmentHeader.getWarehouseCode()", recordReturnValue = true) | 150 | msg = "'上游单号:'+ #shipmentHeader.getReferCode() + ',仓库编码:' + #shipmentHeader.getWarehouseCode()", recordReturnValue = true) |
140 | public Result saveShipmentHeader(ShipmentHeader shipmentHeader) { | 151 | public Result saveShipmentHeader(ShipmentHeader shipmentHeader) { |
@@ -359,7 +370,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -359,7 +370,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
359 | * 自动出库 | 370 | * 自动出库 |
360 | */ | 371 | */ |
361 | @Override | 372 | @Override |
362 | - @Transactional(rollbackFor = JeecgBootException.class) | 373 | + @Transactional(rollbackFor = Exception.class) |
363 | public Result autoShipment(String shipmentCode, String warehouseCode) { | 374 | public Result autoShipment(String shipmentCode, String warehouseCode) { |
364 | if (StringUtils.isEmpty(shipmentCode)) { | 375 | if (StringUtils.isEmpty(shipmentCode)) { |
365 | return Result.error("自动出库, 出库单编码为空"); | 376 | return Result.error("自动出库, 出库单编码为空"); |
@@ -449,7 +460,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -449,7 +460,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
449 | * 自动预配盘出库 | 460 | * 自动预配盘出库 |
450 | */ | 461 | */ |
451 | @Override | 462 | @Override |
452 | - @Transactional(rollbackFor = JeecgBootException.class) | 463 | + @Transactional(rollbackFor = Exception.class) |
453 | public Result autoShipmentAdvice(String shipmentCode, String warehouseCode) { | 464 | public Result autoShipmentAdvice(String shipmentCode, String warehouseCode) { |
454 | if (StringUtils.isEmpty(shipmentCode)) { | 465 | if (StringUtils.isEmpty(shipmentCode)) { |
455 | return Result.error("自动预配盘出库, 出库单编码为空"); | 466 | return Result.error("自动预配盘出库, 出库单编码为空"); |
@@ -540,6 +551,37 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -540,6 +551,37 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
540 | } | 551 | } |
541 | 552 | ||
542 | @Override | 553 | @Override |
554 | + @Transactional(rollbackFor = Exception.class) | ||
555 | + public Result createShipment(WaveConfig waveConfig, List<WaveConfigDetail> waveConfigDetailList) { | ||
556 | + ShipmentHeader shipmentHeader = new ShipmentHeader(); | ||
557 | + shipmentHeader.setType(QuantityConstant.SHIPMENT_BILL_TYPE_QTC); | ||
558 | + shipmentHeader.setWaveConfigId(waveConfig.getId()); | ||
559 | + shipmentHeader.setCompanyCode(waveConfig.getCompanyCode()); | ||
560 | + shipmentHeader.setWarehouseCode(waveConfig.getWarehouseCode()); | ||
561 | + shipmentHeader.setZoneCode(waveConfig.getZoneCode()); | ||
562 | + Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader); | ||
563 | + if (!result.isSuccess()) { | ||
564 | + throw new JeecgBootException("创建出库单失败,波次ID:" + waveConfigDetailList.get(0).getId()); | ||
565 | + } | ||
566 | + for (WaveConfigDetail waveConfigDetail : waveConfigDetailList) { | ||
567 | + ShipmentDetail shipmentDetail = new ShipmentDetail(); | ||
568 | + shipmentDetail.setMaterialCode(waveConfigDetail.getMaterialCode()); | ||
569 | + shipmentDetail.setShipmentId(shipmentHeader.getId()); | ||
570 | + shipmentDetail.setInventoryStatus(QuantityConstant.QUALITY_GOOD); | ||
571 | + shipmentDetail.setQty(new BigDecimal(waveConfigDetail.getLoadingCount())); | ||
572 | + result = shipmentDetailService.saveShipmentDetail(shipmentDetail); | ||
573 | + if (!result.isSuccess()) { | ||
574 | + throw new JeecgBootException("创建出库单明细失败,波次ID:" + waveConfigDetail.getId()); | ||
575 | + } | ||
576 | + } | ||
577 | + result = shipmentHeaderService.autoShipment(shipmentHeader.getCode(), waveConfig.getWarehouseCode()); | ||
578 | + if (!result.isSuccess()) { | ||
579 | + throw new JeecgBootException("波次自动出库失败,波次ID:" + waveConfigDetailList.get(0).getId()); | ||
580 | + } | ||
581 | + return Result.OK("波次自动出库成功"); | ||
582 | + } | ||
583 | + | ||
584 | + @Override | ||
543 | public boolean updateById(ShipmentHeader shipmentHeader) { | 585 | public boolean updateById(ShipmentHeader shipmentHeader) { |
544 | LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | 586 | LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
545 | shipmentHeaderLambdaQueryWrapper.eq(ShipmentHeader::getId, shipmentHeader.getId()) | 587 | shipmentHeaderLambdaQueryWrapper.eq(ShipmentHeader::getId, shipmentHeader.getId()) |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java
@@ -76,7 +76,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | @@ -76,7 +76,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | ||
76 | } | 76 | } |
77 | 77 | ||
78 | @Override | 78 | @Override |
79 | - @Transactional(rollbackFor = JeecgBootException.class) | 79 | + @Transactional(rollbackFor = Exception.class) |
80 | public Result sendAgvTaskToAcs(Integer taskId) { | 80 | public Result sendAgvTaskToAcs(Integer taskId) { |
81 | AgvTask agvTask = getById(taskId); | 81 | AgvTask agvTask = getById(taskId); |
82 | if (agvTask == null) { | 82 | if (agvTask == null) { |
@@ -94,7 +94,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | @@ -94,7 +94,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | ||
94 | } | 94 | } |
95 | 95 | ||
96 | @Override | 96 | @Override |
97 | - @Transactional(rollbackFor = JeecgBootException.class) | 97 | + @Transactional(rollbackFor = Exception.class) |
98 | public Result completeAgvTask(Integer taskId) { | 98 | public Result completeAgvTask(Integer taskId) { |
99 | boolean success = false; | 99 | boolean success = false; |
100 | AgvTask agvTask = getById(taskId); | 100 | AgvTask agvTask = getById(taskId); |
@@ -152,7 +152,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | @@ -152,7 +152,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | ||
152 | } | 152 | } |
153 | 153 | ||
154 | @Override | 154 | @Override |
155 | - @Transactional(rollbackFor = JeecgBootException.class) | 155 | + @Transactional(rollbackFor = Exception.class) |
156 | public Result cancelAgvTask(Integer taskId) { | 156 | public Result cancelAgvTask(Integer taskId) { |
157 | AgvTask agvTask = getById(taskId); | 157 | AgvTask agvTask = getById(taskId); |
158 | if (agvTask == null) { | 158 | if (agvTask == null) { |
@@ -243,7 +243,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | @@ -243,7 +243,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl | ||
243 | } | 243 | } |
244 | 244 | ||
245 | @Override | 245 | @Override |
246 | - @Transactional(rollbackFor = JeecgBootException.class) | 246 | + @Transactional(rollbackFor = Exception.class) |
247 | public Result editAgvTask(AgvTask agvTask, String warehouseCode) { | 247 | public Result editAgvTask(AgvTask agvTask, String warehouseCode) { |
248 | if (agvTask == null) { | 248 | if (agvTask == null) { |
249 | return Result.error("AGV任务信息为空"); | 249 | return Result.error("AGV任务信息为空"); |
huaheng-wms-core/src/main/java/org/jeecg/utils/aspect/TaskBuildAudienceAspect.java
@@ -57,7 +57,7 @@ public class TaskBuildAudienceAspect { | @@ -57,7 +57,7 @@ public class TaskBuildAudienceAspect { | ||
57 | 57 | ||
58 | @Before("executeTask()") | 58 | @Before("executeTask()") |
59 | public void doBefore(JoinPoint joinPoint) throws NoSuchMethodException { | 59 | public void doBefore(JoinPoint joinPoint) throws NoSuchMethodException { |
60 | - new ApiAuthentication.ApiAuthenticationBuild().audience(HuahengJwtUtil.TASK_AUDIENCE_NAME).bulid(); | 60 | + new ApiAuthentication.ApiAuthenticationBuild().audience(joinPoint.getTarget().getClass().getSimpleName()).bulid(); |
61 | } | 61 | } |
62 | 62 | ||
63 | @Around("executeTask()") | 63 | @Around("executeTask()") |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -750,6 +750,9 @@ public class QuantityConstant { | @@ -750,6 +750,9 @@ public class QuantityConstant { | ||
750 | // 关闭站台锁定 | 750 | // 关闭站台锁定 |
751 | public static int START_UNLOCK_STATION = 0; | 751 | public static int START_UNLOCK_STATION = 0; |
752 | 752 | ||
753 | + //波次开启 | ||
754 | + public static int WAVE_Config_START = 1; | ||
755 | + | ||
753 | /** 备份历史数据,默认不开启 */ | 756 | /** 备份历史数据,默认不开启 */ |
754 | public static final String RULE_BACK_UP_DATA = "backUpData"; | 757 | public static final String RULE_BACK_UP_DATA = "backUpData"; |
755 | public static final int RULE_NOT_BACK_UP = 0; | 758 | public static final int RULE_NOT_BACK_UP = 0; |
huaheng-wms-core/src/main/resources/application-test.yml
@@ -190,8 +190,10 @@ mybatis-plus: | @@ -190,8 +190,10 @@ mybatis-plus: | ||
190 | configuration: | 190 | configuration: |
191 | map-underscore-to-camel-case: true | 191 | map-underscore-to-camel-case: true |
192 | auto-mapping-behavior: full | 192 | auto-mapping-behavior: full |
193 | - # 这个配置不打印自带的SQL日志 | ||
194 | - log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | 193 | + # 配置打印自带的SQL日志 |
194 | + # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl | ||
195 | + # 配置不打印自带的SQL日志 | ||
196 | + log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl | ||
195 | # 返回类型为Map,显示null对应的字段 | 197 | # 返回类型为Map,显示null对应的字段 |
196 | call-setters-on-nulls: true | 198 | call-setters-on-nulls: true |
197 | #jeecg专用配置 | 199 | #jeecg专用配置 |