Commit 74ed5c9985e2c1cd338ea2eee9cc31a464811295
Merge branch 'develop' of http://git.huahengcloud.com/wms/wms4.git into develop
Showing
11 changed files
with
136 additions
and
24 deletions
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectMultiSomeContainer.vue
@@ -27,7 +27,7 @@ export default { | @@ -27,7 +27,7 @@ export default { | ||
27 | }, | 27 | }, |
28 | data() { | 28 | data() { |
29 | return { | 29 | return { |
30 | - url: {list: '/inventory/inventoryDetail/list'}, | 30 | + url: {list: '/inventory/inventoryDetail/queryPageListList'}, |
31 | columns: [ | 31 | columns: [ |
32 | {title: '容器编码', align: 'center', dataIndex: 'containerCode'}, | 32 | {title: '容器编码', align: 'center', dataIndex: 'containerCode'}, |
33 | {title: '库位编码', align: 'center', width: '15%', dataIndex: 'locationCode'}, | 33 | {title: '库位编码', align: 'center', width: '15%', dataIndex: 'locationCode'}, |
ant-design-vue-jeecg/src/views/system/QuartzJobList.vue
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | </a-col> | 13 | </a-col> |
14 | <a-col :md="6" :sm="10"> | 14 | <a-col :md="6" :sm="10"> |
15 | <a-form-model-item label="任务状态" prop="status"> | 15 | <a-form-model-item label="任务状态" prop="status"> |
16 | - <a-select style="width: 220px" v-model="queryParam.status" placeholder="请选择状态"> | 16 | + <a-select v-model="queryParam.status" placeholder="请选择状态"> |
17 | <a-select-option value="">全部</a-select-option> | 17 | <a-select-option value="">全部</a-select-option> |
18 | <a-select-option value="0">正常</a-select-option> | 18 | <a-select-option value="0">正常</a-select-option> |
19 | <a-select-option value="-1">停止</a-select-option> | 19 | <a-select-option value="-1">停止</a-select-option> |
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
@@ -447,6 +447,9 @@ export default { | @@ -447,6 +447,9 @@ export default { | ||
447 | '次品': 'red', | 447 | '次品': 'red', |
448 | '锁定': 'red', | 448 | '锁定': 'red', |
449 | '冻结': 'red', | 449 | '冻结': 'red', |
450 | + '空闲': 'green', | ||
451 | + '有货': 'purple', | ||
452 | + '满盘': 'blue', | ||
450 | default: 'blue' | 453 | default: 'blue' |
451 | }; | 454 | }; |
452 | return colors[status] || colors.default; | 455 | return colors[status] || colors.default; |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderHistoryList.vue
@@ -286,7 +286,6 @@ export default { | @@ -286,7 +286,6 @@ export default { | ||
286 | title: '原因', | 286 | title: '原因', |
287 | align: 'center', | 287 | align: 'center', |
288 | dataIndex: 'reason', | 288 | dataIndex: 'reason', |
289 | - scopedSlots: {customRender: 'reason'} | ||
290 | }, | 289 | }, |
291 | { | 290 | { |
292 | title: '创建人', | 291 | title: '创建人', |
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
@@ -199,6 +199,16 @@ export default { | @@ -199,6 +199,16 @@ export default { | ||
199 | scopedSlots: { customRender: 'inventoryStatus_dictText' } | 199 | scopedSlots: { customRender: 'inventoryStatus_dictText' } |
200 | }, | 200 | }, |
201 | { | 201 | { |
202 | + title: '入库单ID', | ||
203 | + align: 'center', | ||
204 | + dataIndex: 'receiptId' | ||
205 | + }, | ||
206 | + { | ||
207 | + title: '出库单ID', | ||
208 | + align: 'center', | ||
209 | + dataIndex: 'shipmentId' | ||
210 | + }, | ||
211 | + { | ||
202 | title: '创建人', | 212 | title: '创建人', |
203 | align: 'center', | 213 | align: 'center', |
204 | dataIndex: 'createBy' | 214 | dataIndex: 'createBy' |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryDetail/controller/InventoryDetailController.java
@@ -22,6 +22,7 @@ import org.springframework.web.servlet.ModelAndView; | @@ -22,6 +22,7 @@ import org.springframework.web.servlet.ModelAndView; | ||
22 | 22 | ||
23 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 23 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
24 | import com.baomidou.mybatisplus.core.metadata.IPage; | 24 | import com.baomidou.mybatisplus.core.metadata.IPage; |
25 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | ||
25 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 26 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
26 | 27 | ||
27 | import cn.hutool.core.date.DateUtil; | 28 | import cn.hutool.core.date.DateUtil; |
@@ -69,6 +70,33 @@ public class InventoryDetailController extends JeecgController<InventoryDetail, | @@ -69,6 +70,33 @@ public class InventoryDetailController extends JeecgController<InventoryDetail, | ||
69 | return Result.OK(pageList); | 70 | return Result.OK(pageList); |
70 | } | 71 | } |
71 | 72 | ||
73 | + /** | ||
74 | + * 分页列表查询 | ||
75 | + * @param inventoryDetail | ||
76 | + * @param pageNo | ||
77 | + * @param pageSize | ||
78 | + * @param req | ||
79 | + * @return | ||
80 | + */ | ||
81 | + // @AutoLog(value = "库存详情-分页列表查询") | ||
82 | + @ApiOperation(value = "库存详情-分页列表查询", notes = "库存详情-分页列表查询") | ||
83 | + @GetMapping(value = "/queryPageListList") | ||
84 | + public Result<IPage<InventoryDetail>> queryPageListList(InventoryDetail inventoryDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
85 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | ||
86 | + Date inventoryAge = null; | ||
87 | + if (inventoryDetail.getInventoryAge() != null) { | ||
88 | + inventoryAge = DateUtil.offsetDay(new Date(), 0 - inventoryDetail.getInventoryAge()); | ||
89 | + inventoryDetail.setInventoryAge(null); | ||
90 | + } | ||
91 | + QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); | ||
92 | + queryWrapper.lt(inventoryAge != null, "create_time", inventoryAge); | ||
93 | + queryWrapper.lambda().groupBy(InventoryDetail::getContainerCode); | ||
94 | + Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); | ||
95 | + IPage<InventoryDetail> pageList = inventoryDetailService.queryPage(page, queryWrapper); | ||
96 | + inventoryDetailService.calculateInventoryAge(pageList.getRecords());// 计算库龄 | ||
97 | + return Result.OK(pageList); | ||
98 | + } | ||
99 | + | ||
72 | @ApiOperation(value = "库存详情-分页列表查询", notes = "库存详情-分页列表查询") | 100 | @ApiOperation(value = "库存详情-分页列表查询", notes = "库存详情-分页列表查询") |
73 | @GetMapping(value = "/selectContainerlist") | 101 | @GetMapping(value = "/selectContainerlist") |
74 | public Result<IPage<InventoryDetail>> selectContainerlist(InventoryDetail inventoryDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 102 | public Result<IPage<InventoryDetail>> selectContainerlist(InventoryDetail inventoryDetail, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
@@ -81,10 +109,14 @@ public class InventoryDetailController extends JeecgController<InventoryDetail, | @@ -81,10 +109,14 @@ public class InventoryDetailController extends JeecgController<InventoryDetail, | ||
81 | List<String> containerCodeList = inventoryDetailService.containerCodeList(warehouseCode, inventoryDetail.getMaterialCode()); | 109 | List<String> containerCodeList = inventoryDetailService.containerCodeList(warehouseCode, inventoryDetail.getMaterialCode()); |
82 | QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); | 110 | QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); |
83 | Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); | 111 | Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); |
84 | - if (containerCodeList.size() > 0) { | 112 | + if (CollectionUtils.isNotEmpty(containerCodeList)) { |
85 | queryWrapper.in("container_code", containerCodeList); | 113 | queryWrapper.in("container_code", containerCodeList); |
114 | + queryWrapper.lambda().groupBy(InventoryDetail::getContainerCode); | ||
86 | } | 115 | } |
87 | pageList = inventoryDetailService.page(page, queryWrapper); | 116 | pageList = inventoryDetailService.page(page, queryWrapper); |
117 | + if (CollectionUtils.isEmpty(pageList.getRecords())) { | ||
118 | + return Result.OK(pageList); | ||
119 | + } | ||
88 | } | 120 | } |
89 | return Result.OK(pageList); | 121 | return Result.OK(pageList); |
90 | } | 122 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/AutoDeleteReceiptTask.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.job; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import javax.annotation.Resource; | ||
6 | + | ||
7 | +import org.jeecg.common.util.DateUtils; | ||
8 | +import org.jeecg.modules.wms.api.erp.service.IErpService; | ||
9 | +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; | ||
10 | +import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; | ||
11 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | ||
12 | +import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; | ||
13 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | ||
14 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; | ||
15 | +import org.jeecg.utils.StringUtils; | ||
16 | +import org.jeecg.utils.constant.QuantityConstant; | ||
17 | +import org.quartz.*; | ||
18 | + | ||
19 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
20 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
21 | + | ||
22 | +import lombok.extern.slf4j.Slf4j; | ||
23 | + | ||
24 | +/** | ||
25 | + * 删除完成的单据 | ||
26 | + * @author 游杰 | ||
27 | + */ | ||
28 | + | ||
29 | +@Slf4j | ||
30 | +@PersistJobDataAfterExecution | ||
31 | +@DisallowConcurrentExecution | ||
32 | +public class AutoDeleteReceiptTask implements Job { | ||
33 | + | ||
34 | + @Resource | ||
35 | + private IReceiptHeaderService receiptHeaderService; | ||
36 | + | ||
37 | + @Resource | ||
38 | + private IShipmentHeaderService shipmentHeaderService; | ||
39 | + | ||
40 | + @Resource | ||
41 | + private IErpService erpService; | ||
42 | + @Resource | ||
43 | + private IHuahengMultiHandlerService huahengMultiHandlerService; | ||
44 | + @Resource | ||
45 | + private IParameterConfigurationService parameterConfigurationService; | ||
46 | + | ||
47 | + @Override | ||
48 | + public void execute(JobExecutionContext context) throws JobExecutionException { | ||
49 | + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_DELETE_RECEIPT); | ||
50 | + if (StringUtils.isEmpty(value)) { | ||
51 | + value = "0"; | ||
52 | + } | ||
53 | + int DELETE_RECEIPT = Integer.parseInt(value); | ||
54 | + if (DELETE_RECEIPT == QuantityConstant.NOT_DELETE_RECEIPT) { | ||
55 | + return; | ||
56 | + } | ||
57 | + LambdaQueryWrapper<ReceiptHeader> receiptHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
58 | + receiptHeaderLambdaQueryWrapper.eq(ReceiptHeader::getLastStatus, QuantityConstant.RECEIPT_HEADER_COMPLETED).isNull(ReceiptHeader::getReferCode); | ||
59 | + List<ReceiptHeader> receiptHeaderList = receiptHeaderService.list(receiptHeaderLambdaQueryWrapper); | ||
60 | + log.info(String.format(" AutoDeleteReceiptTask 执行任务! receiptHeaderList :" + receiptHeaderList + "时间" + DateUtils.getTimestamp())); | ||
61 | + for (ReceiptHeader receiptHeader : receiptHeaderList) { | ||
62 | + receiptHeaderService.delMain(String.valueOf(receiptHeader.getId()), QuantityConstant.WMS_COMPLETE_DELETE_RECEIPT); | ||
63 | + } | ||
64 | + LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
65 | + shipmentHeaderLambdaQueryWrapper.eq(ShipmentHeader::getLastStatus, QuantityConstant.SHIPMENT_HEADER_COMPLETED).isNull(ShipmentHeader::getReferCode); | ||
66 | + List<ShipmentHeader> shipmentHeaderList = shipmentHeaderService.list(shipmentHeaderLambdaQueryWrapper); | ||
67 | + log.info(String.format(" AutoDeleteReceiptTask 执行任务! shipmentHeaderList :" + shipmentHeaderList + "时间" + DateUtils.getTimestamp())); | ||
68 | + for (ShipmentHeader shipmentHeader : shipmentHeaderList) { | ||
69 | + shipmentHeaderService.delMain(String.valueOf(shipmentHeader.getId()), QuantityConstant.WMS_COMPLETE_DELETE_RECEIPT); | ||
70 | + } | ||
71 | + | ||
72 | + } | ||
73 | +} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/ErpTask.java
@@ -6,6 +6,7 @@ import javax.annotation.Resource; | @@ -6,6 +6,7 @@ import javax.annotation.Resource; | ||
6 | 6 | ||
7 | import org.jeecg.common.util.DateUtils; | 7 | import org.jeecg.common.util.DateUtils; |
8 | import org.jeecg.modules.wms.api.erp.service.IErpService; | 8 | import org.jeecg.modules.wms.api.erp.service.IErpService; |
9 | +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; | ||
9 | import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; | 10 | import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; |
10 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | 11 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
11 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; | 12 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; |
@@ -39,6 +40,8 @@ public class ErpTask implements Job { | @@ -39,6 +40,8 @@ public class ErpTask implements Job { | ||
39 | private IErpService erpService; | 40 | private IErpService erpService; |
40 | @Resource | 41 | @Resource |
41 | private IHuahengMultiHandlerService huahengMultiHandlerService; | 42 | private IHuahengMultiHandlerService huahengMultiHandlerService; |
43 | + @Resource | ||
44 | + private IParameterConfigurationService parameterConfigurationService; | ||
42 | 45 | ||
43 | @Override | 46 | @Override |
44 | public void execute(JobExecutionContext context) throws JobExecutionException { | 47 | public void execute(JobExecutionContext context) throws JobExecutionException { |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
@@ -79,7 +79,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | @@ -79,7 +79,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | ||
79 | public boolean delMain(String id, String reason) { | 79 | public boolean delMain(String id, String reason) { |
80 | ReceiptHeader receiptHeader = getById(id); | 80 | ReceiptHeader receiptHeader = getById(id); |
81 | if (receiptHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD | 81 | if (receiptHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD |
82 | - && receiptHeader.getFirstStatus().intValue() <= QuantityConstant.RECEIPT_HEADER_COMPLETED) { | 82 | + && receiptHeader.getLastStatus().intValue() < QuantityConstant.RECEIPT_HEADER_COMPLETED) { |
83 | throw new JeecgBootException("不能删除非新建状态单据"); | 83 | throw new JeecgBootException("不能删除非新建状态单据"); |
84 | } | 84 | } |
85 | receiptHeaderHistoryService.saveById(id, reason); | 85 | receiptHeaderHistoryService.saveById(id, reason); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
@@ -117,7 +117,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -117,7 +117,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
117 | 117 | ||
118 | @Resource | 118 | @Resource |
119 | private IZoneService zoneService; | 119 | private IZoneService zoneService; |
120 | - | 120 | + |
121 | @Resource | 121 | @Resource |
122 | private IWaveConfigService waveConfigService; | 122 | private IWaveConfigService waveConfigService; |
123 | 123 | ||
@@ -132,7 +132,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -132,7 +132,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
132 | throw new JeecgBootException("获取出库单信息失败!"); | 132 | throw new JeecgBootException("获取出库单信息失败!"); |
133 | } | 133 | } |
134 | if (shipmentHeader.getFirstStatus().intValue() > QuantityConstant.SHIPMENT_HEADER_BUILD | 134 | if (shipmentHeader.getFirstStatus().intValue() > QuantityConstant.SHIPMENT_HEADER_BUILD |
135 | - && shipmentHeader.getFirstStatus().intValue() <= QuantityConstant.SHIPMENT_HEADER_COMPLETED) { | 135 | + && shipmentHeader.getFirstStatus().intValue() < QuantityConstant.SHIPMENT_HEADER_COMPLETED) { |
136 | throw new JeecgBootException("不能删除非新建状态单据"); | 136 | throw new JeecgBootException("不能删除非新建状态单据"); |
137 | } | 137 | } |
138 | LambdaUpdateWrapper<ShipmentHeader> shipmentHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | 138 | LambdaUpdateWrapper<ShipmentHeader> shipmentHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -573,8 +573,15 @@ public class QuantityConstant { | @@ -573,8 +573,15 @@ public class QuantityConstant { | ||
573 | 573 | ||
574 | /** 自检到异常通知配置 */ | 574 | /** 自检到异常通知配置 */ |
575 | public static final String SELF_CHECK_INFORM = "selfCheckInform"; | 575 | public static final String SELF_CHECK_INFORM = "selfCheckInform"; |
576 | - | 576 | + /** 序列号前缀 */ |
577 | public static final String RULE_MATERIAL_SERAIL_NUMBER = "materialSerialNoPrefix"; | 577 | public static final String RULE_MATERIAL_SERAIL_NUMBER = "materialSerialNoPrefix"; |
578 | + /** 删除单据 */ | ||
579 | + public static final String RULE_DELETE_RECEIPT = "deleteReceipt"; | ||
580 | + | ||
581 | + /** 不删除单据 */ | ||
582 | + public static final int NOT_DELETE_RECEIPT = 0; | ||
583 | + /** 删除单据 */ | ||
584 | + public static final int DELETE_RECEIPT = 1; | ||
578 | 585 | ||
579 | public static final int RULE_TASK_NOT_CLEAR = 0; | 586 | public static final int RULE_TASK_NOT_CLEAR = 0; |
580 | public static final int RULE_TASK_AllOW_CLEAR = 1; | 587 | public static final int RULE_TASK_AllOW_CLEAR = 1; |
@@ -690,28 +697,13 @@ public class QuantityConstant { | @@ -690,28 +697,13 @@ public class QuantityConstant { | ||
690 | 697 | ||
691 | public static final int HTTP_OK = 200; | 698 | public static final int HTTP_OK = 200; |
692 | 699 | ||
693 | - public static final String URL = "http://erptest.gani.com.cn/K3Cloud/"; | ||
694 | - | ||
695 | - // pro | ||
696 | - public static final String SRC_STOCK_ID = "10221050"; | ||
697 | - public static final String SRC_STOCK_ID_BH = "10237102"; | ||
698 | - public static final String DEST_STOCK_ID = "10237102"; | ||
699 | - | ||
700 | - public static final String WORK_SHOP = "BM000346"; // 生产车间 | ||
701 | - // test | ||
702 | -// public static final String SRC_STOCK_ID_BH = "9988308"; | ||
703 | -// public static final String SRC_STOCK_ID = "9989058"; | ||
704 | -// public static final String DEST_STOCK_ID = "9989057"; | ||
705 | - | ||
706 | public static final int AGV_TASK_NOT_CREATE = 0; // 没有创建过AGV任务 | 700 | public static final int AGV_TASK_NOT_CREATE = 0; // 没有创建过AGV任务 |
707 | public static final int AGV_TASK_ALREADY_CREATE = 1; // 创建过AGV任务 | 701 | public static final int AGV_TASK_ALREADY_CREATE = 1; // 创建过AGV任务 |
708 | 702 | ||
709 | - // 第三方打印工具 | ||
710 | - public static final String PRINT_SERVICE = "PRINT_SERVICE"; | ||
711 | - | ||
712 | public static final String UPSTREAM_DELETE_RECEIPT = "上游删除"; | 703 | public static final String UPSTREAM_DELETE_RECEIPT = "上游删除"; |
713 | public static final String BACK_DELETE_RECEIPT = "回传删除"; | 704 | public static final String BACK_DELETE_RECEIPT = "回传删除"; |
714 | public static final String WMS_DELETE_RECEIPT = "WMS删除"; | 705 | public static final String WMS_DELETE_RECEIPT = "WMS删除"; |
706 | + public static final String WMS_COMPLETE_DELETE_RECEIPT = "单据完成删除"; | ||
715 | 707 | ||
716 | /** | 708 | /** |
717 | * 不受控 | 709 | * 不受控 |