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 | 27 | }, |
28 | 28 | data() { |
29 | 29 | return { |
30 | - url: {list: '/inventory/inventoryDetail/list'}, | |
30 | + url: {list: '/inventory/inventoryDetail/queryPageListList'}, | |
31 | 31 | columns: [ |
32 | 32 | {title: '容器编码', align: 'center', dataIndex: 'containerCode'}, |
33 | 33 | {title: '库位编码', align: 'center', width: '15%', dataIndex: 'locationCode'}, |
... | ... |
ant-design-vue-jeecg/src/views/system/QuartzJobList.vue
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | </a-col> |
14 | 14 | <a-col :md="6" :sm="10"> |
15 | 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 | 17 | <a-select-option value="">全部</a-select-option> |
18 | 18 | <a-select-option value="0">正常</a-select-option> |
19 | 19 | <a-select-option value="-1">停止</a-select-option> |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderHistoryList.vue
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
... | ... | @@ -199,6 +199,16 @@ export default { |
199 | 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 | 212 | title: '创建人', |
203 | 213 | align: 'center', |
204 | 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 | 22 | |
23 | 23 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
24 | 24 | import com.baomidou.mybatisplus.core.metadata.IPage; |
25 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |
25 | 26 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
26 | 27 | |
27 | 28 | import cn.hutool.core.date.DateUtil; |
... | ... | @@ -69,6 +70,33 @@ public class InventoryDetailController extends JeecgController<InventoryDetail, |
69 | 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 | 100 | @ApiOperation(value = "库存详情-分页列表查询", notes = "库存详情-分页列表查询") |
73 | 101 | @GetMapping(value = "/selectContainerlist") |
74 | 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 | 109 | List<String> containerCodeList = inventoryDetailService.containerCodeList(warehouseCode, inventoryDetail.getMaterialCode()); |
82 | 110 | QueryWrapper<InventoryDetail> queryWrapper = QueryGenerator.initQueryWrapper(inventoryDetail, req.getParameterMap()); |
83 | 111 | Page<InventoryDetail> page = new Page<InventoryDetail>(pageNo, pageSize); |
84 | - if (containerCodeList.size() > 0) { | |
112 | + if (CollectionUtils.isNotEmpty(containerCodeList)) { | |
85 | 113 | queryWrapper.in("container_code", containerCodeList); |
114 | + queryWrapper.lambda().groupBy(InventoryDetail::getContainerCode); | |
86 | 115 | } |
87 | 116 | pageList = inventoryDetailService.page(page, queryWrapper); |
117 | + if (CollectionUtils.isEmpty(pageList.getRecords())) { | |
118 | + return Result.OK(pageList); | |
119 | + } | |
88 | 120 | } |
89 | 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 | |
7 | 7 | import org.jeecg.common.util.DateUtils; |
8 | 8 | import org.jeecg.modules.wms.api.erp.service.IErpService; |
9 | +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; | |
9 | 10 | import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; |
10 | 11 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
11 | 12 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; |
... | ... | @@ -39,6 +40,8 @@ public class ErpTask implements Job { |
39 | 40 | private IErpService erpService; |
40 | 41 | @Resource |
41 | 42 | private IHuahengMultiHandlerService huahengMultiHandlerService; |
43 | + @Resource | |
44 | + private IParameterConfigurationService parameterConfigurationService; | |
42 | 45 | |
43 | 46 | @Override |
44 | 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 | 79 | public boolean delMain(String id, String reason) { |
80 | 80 | ReceiptHeader receiptHeader = getById(id); |
81 | 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 | 83 | throw new JeecgBootException("不能删除非新建状态单据"); |
84 | 84 | } |
85 | 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 | 117 | |
118 | 118 | @Resource |
119 | 119 | private IZoneService zoneService; |
120 | - | |
120 | + | |
121 | 121 | @Resource |
122 | 122 | private IWaveConfigService waveConfigService; |
123 | 123 | |
... | ... | @@ -132,7 +132,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
132 | 132 | throw new JeecgBootException("获取出库单信息失败!"); |
133 | 133 | } |
134 | 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 | 136 | throw new JeecgBootException("不能删除非新建状态单据"); |
137 | 137 | } |
138 | 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 | 573 | |
574 | 574 | /** 自检到异常通知配置 */ |
575 | 575 | public static final String SELF_CHECK_INFORM = "selfCheckInform"; |
576 | - | |
576 | + /** 序列号前缀 */ | |
577 | 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 | 586 | public static final int RULE_TASK_NOT_CLEAR = 0; |
580 | 587 | public static final int RULE_TASK_AllOW_CLEAR = 1; |
... | ... | @@ -690,28 +697,13 @@ public class QuantityConstant { |
690 | 697 | |
691 | 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 | 700 | public static final int AGV_TASK_NOT_CREATE = 0; // 没有创建过AGV任务 |
707 | 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 | 703 | public static final String UPSTREAM_DELETE_RECEIPT = "上游删除"; |
713 | 704 | public static final String BACK_DELETE_RECEIPT = "回传删除"; |
714 | 705 | public static final String WMS_DELETE_RECEIPT = "WMS删除"; |
706 | + public static final String WMS_COMPLETE_DELETE_RECEIPT = "单据完成删除"; | |
715 | 707 | |
716 | 708 | /** |
717 | 709 | * 不受控 |
... | ... |