Commit ded8cb8d2606cd1e04704a33cd9455be4144164d
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop
Showing
9 changed files
with
108 additions
and
61 deletions
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
... | ... | @@ -6,8 +6,7 @@ |
6 | 6 | <a-row :gutter="24"> |
7 | 7 | <a-col :xl='6' :lg='7' :md='8' :sm='24'> |
8 | 8 | <a-form-item label='接口名称'> |
9 | - <a-select show-search placeholder='请输入接口名称' option-filter-prop='children' | |
10 | - v-model='queryParam.apiName'> | |
9 | + <a-select show-search placeholder='请输入接口名称' option-filter-prop='children' v-model='queryParam.apiName'> | |
11 | 10 | <a-select-option v-for='name in apiNameList' :key='name' :value='name'> |
12 | 11 | {{ name }} |
13 | 12 | </a-select-option> |
... | ... | @@ -64,6 +63,11 @@ |
64 | 63 | </a-form-item> |
65 | 64 | </a-col> |
66 | 65 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
66 | + <a-form-item label="Http Code"> | |
67 | + <a-input placeholder="请输入 Http Code" v-model="queryParam.httpCode"></a-input> | |
68 | + </a-form-item> | |
69 | + </a-col> | |
70 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
67 | 71 | <a-form-item label="响应耗时(毫秒)"> |
68 | 72 | <a-input placeholder="请输入大于响应耗时" v-model="queryParam.duration_begin"></a-input> |
69 | 73 | </a-form-item> |
... | ... | @@ -72,10 +76,6 @@ |
72 | 76 | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
73 | 77 | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
74 | 78 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
75 | - <a @click="handleToggleSearch" style="margin-left: 8px"> | |
76 | - {{ toggleSearchStatus ? '收起' : '展开' }} | |
77 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
78 | - </a> | |
79 | 79 | </span> |
80 | 80 | </a-col> |
81 | 81 | </a-row> |
... | ... | @@ -86,10 +86,8 @@ |
86 | 86 | <!-- 操作按钮区域 --> |
87 | 87 | <div class="table-operator"> |
88 | 88 | <a-button v-has="'apiLog:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
89 | - <a-button v-has="'apiLog:export'" type="primary" icon="download" @click="handleExportXls('接口日志')">导出 | |
90 | - </a-button> | |
91 | - <j-super-query :fieldList="superFieldList" v-has="'apiLog:superQuery'" | |
92 | - @handleSuperQuery="handleSuperQuery"/> | |
89 | + <a-button v-has="'apiLog:export'" type="primary" icon="download" @click="handleExportXls('接口日志')">导出</a-button> | |
90 | + <j-super-query :fieldList="superFieldList" v-has="'apiLog:superQuery'" @handleSuperQuery="handleSuperQuery"/> | |
93 | 91 | </div> |
94 | 92 | |
95 | 93 | <!-- table区域-begin --> |
... | ... | @@ -110,40 +108,22 @@ |
110 | 108 | <template :slot="expandedRowRender" slot-scope="record"> |
111 | 109 | <div style="margin: 0"> |
112 | 110 | <div> |
113 | - <a-button @click="copyToClipboard(record.requestHeader)" type="link" icon="copy" | |
114 | - style="vertical-align: revert;"></a-button> | |
115 | - <span | |
116 | - style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">请求头:</span> | |
117 | - <a-button @click="record.expandHeader = !record.expandHeader" type="link" icon="down-circle" | |
118 | - style="vertical-align: revert;"></a-button> | |
119 | - <span v-if="record.expandHeader" | |
120 | - style="padding:0 0 0 32px;display: block; vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">{{ | |
121 | - record.requestHeader | |
122 | - }}</span> | |
111 | + <a-button @click="copyToClipboard(record.requestHeader)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | |
112 | + <span style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">请求头:</span> | |
113 | + <a-button @click="record.expandHeader = !record.expandHeader" type="link" icon="down-circle" style="vertical-align: revert;"></a-button> | |
114 | + <span v-if="record.expandHeader" style="padding:0 0 0 32px;display: block; vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">{{ record.requestHeader }}</span> | |
123 | 115 | </div> |
124 | 116 | <div> |
125 | - <a-button @click="copyToClipboard(record.requestBody)" type="link" icon="copy" | |
126 | - style="vertical-align: revert;"></a-button> | |
127 | - <span | |
128 | - style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color: saddlebrown;">请求内容:{{ | |
129 | - record.requestBody | |
130 | - }}</span> | |
117 | + <a-button @click="copyToClipboard(record.requestBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | |
118 | + <span style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color: saddlebrown;">请求内容:{{ record.requestBody }}</span> | |
131 | 119 | </div> |
132 | 120 | <div> |
133 | - <a-button @click="copyToClipboard(record.responseBody)" type="link" icon="copy" | |
134 | - style="vertical-align: revert;"></a-button> | |
135 | - <span | |
136 | - style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#0066CC;">响应内容:{{ | |
137 | - record.responseBody | |
138 | - }}</span> | |
121 | + <a-button @click="copyToClipboard(record.responseBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | |
122 | + <span style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#0066CC;">响应内容:{{ record.responseBody }}</span> | |
139 | 123 | </div> |
140 | 124 | <div v-if="record.exception"> |
141 | - <a-button @click="copyToClipboard(record.exception)" type="link" icon="copy" | |
142 | - style="vertical-align: revert;"></a-button> | |
143 | - <span | |
144 | - style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:red">异常堆栈信息:{{ | |
145 | - record.exception | |
146 | - }}</span> | |
125 | + <a-button @click="copyToClipboard(record.exception)" type="link" icon="copy" style="vertical-align: revert;"></a-button> | |
126 | + <span style="vertical-align: initial; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:red">异常堆栈信息:{{ record.exception }}</span> | |
147 | 127 | </div> |
148 | 128 | </div> |
149 | 129 | </template> |
... | ... | @@ -265,10 +245,17 @@ export default { |
265 | 245 | } |
266 | 246 | }, |
267 | 247 | methods: { |
248 | + searchReset() { | |
249 | + let that = this; | |
250 | + Object.keys(that.queryParam).forEach(function (key) { | |
251 | + that.queryParam[key] = ''; | |
252 | + }); | |
253 | + that.queryParam['requestTime_begin'] = this.getDefaultDate() | |
254 | + }, | |
268 | 255 | getDefaultDate() { |
269 | 256 | var tempDate = new Date() |
270 | 257 | tempDate.setDate(tempDate.getDate() - 7) |
271 | - return moment(tempDate).utcOffset(480).format('YYYY-MM-DD HH:mm:ss'); | |
258 | + return moment(tempDate).utcOffset(480).format('YYYY-MM-DD 00:00:00'); | |
272 | 259 | }, |
273 | 260 | loadFrom() { |
274 | 261 | getApiNameList().then((res) => { |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/CycleCountDetailList.vue
... | ... | @@ -77,8 +77,8 @@ |
77 | 77 | <cycle-count-detail-chi-id-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id"/> |
78 | 78 | <a @click="createMany()"><a-icon/>新增</a> |
79 | 79 | <a-divider type="vertical"/> |
80 | - <a v-if="record.enableStatus === 1" @click="selectPort(record)">生成盘点任务</a> | |
81 | - <a-divider v-if="record.enableStatus === 1" type="vertical"/> | |
80 | + <a v-if="record.enableStatus == '1'" @click="selectPort(record)">生成盘点任务</a> | |
81 | + <a-divider v-if="record.enableStatus == '1'" type="vertical"/> | |
82 | 82 | <a @click="loadDatas(record.cycleCountHeadId)"><a-icon type="sync"/>刷新</a> |
83 | 83 | </template> |
84 | 84 | |
... | ... |
ant-design-vue-jeecg/src/views/system/stocktaking/subTables/CycleCountDetailChildSubTable.vue
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | |
24 | 24 | <template slot="action" slot-scope="text, record"> |
25 | 25 | <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk"/> |
26 | - <a v-if="record.childStatus != 1" @click="createMany(record.id)"><a-icon />实盘登记</a> | |
26 | + <a v-if="record.childStatus != 1" @click="createMany(record)"><a-icon />实盘登记</a> | |
27 | 27 | </template> |
28 | 28 | |
29 | 29 | <template slot="fileSlot" slot-scope="text"> |
... | ... |
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | |
81 | 81 | <span slot="action" slot-scope="text, record"> |
82 | 82 | <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id" :taskHeaderId="record.taskHeaderId"/> |
83 | - <a v-if="record.taskType==700" @click="createMany(record)">实盘登记</a> | |
83 | + <a v-if="record.taskType==700" @click="createMany(record)">实盘登记<a-divider type="vertical" /></a> | |
84 | 84 | <a v-has="'taskDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical" /></a> |
85 | 85 | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
86 | 86 | <a v-has="'taskDetail:delete'">删除</a> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationService.java
... | ... | @@ -34,9 +34,10 @@ public interface LocationAllocationService { |
34 | 34 | * 排除巷道,如果这个巷道分配了超过2个库位,那么就不往这边分库位了,避免堵死的情况 |
35 | 35 | * @param roadWays |
36 | 36 | * @param warehouseCode |
37 | + * @param warehouseCode2 | |
37 | 38 | * @return |
38 | 39 | */ |
39 | - List<Integer> removeRoadWaysByPreLocations(List<Integer> roadWays, String warehouseCode); | |
40 | + List<Integer> removeRoadWaysByPreLocations(List<Integer> roadWays, String zoneCode, String warehouseCode); | |
40 | 41 | |
41 | 42 | /** |
42 | 43 | * 获取巷道,根据入库物料均分原则,选取物料最少的巷道 |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
... | ... | @@ -28,6 +28,7 @@ import org.jeecg.utils.StringUtils; |
28 | 28 | import org.jeecg.utils.constant.QuantityConstant; |
29 | 29 | import org.springframework.stereotype.Service; |
30 | 30 | import org.springframework.transaction.annotation.Transactional; |
31 | +import org.springframework.util.CollectionUtils; | |
31 | 32 | |
32 | 33 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
33 | 34 | import com.baomidou.mybatisplus.core.metadata.IPage; |
... | ... | @@ -237,16 +238,15 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
237 | 238 | @Override |
238 | 239 | @Transactional(rollbackFor = Exception.class) |
239 | 240 | public Integer getRoadWay(List<Integer> roadWays, String materialCode, String zoneCode, String warehouseCode) { |
240 | - if (StringUtils.isEmpty(roadWays)) { | |
241 | + if (CollectionUtils.isEmpty(roadWays)) { | |
241 | 242 | throw new JeecgBootException("分配库位错误,没有巷道"); |
242 | 243 | } |
243 | 244 | int roadWay = roadWays.get(0); |
244 | 245 | if (roadWays.size() == 1) { |
245 | 246 | return roadWay; |
246 | 247 | } |
247 | - | |
248 | - roadWays = locationAllocationService.removeRoadWaysByPreLocations(roadWays, warehouseCode); | |
249 | - if (StringUtils.isEmpty(roadWays)) { | |
248 | + roadWays = locationAllocationService.removeRoadWaysByPreLocations(roadWays, zoneCode, warehouseCode); | |
249 | + if (CollectionUtils.isEmpty(roadWays)) { | |
250 | 250 | return roadWay; |
251 | 251 | } |
252 | 252 | // 获取巷道,选取空闲库位最多作为巷道 |
... | ... | @@ -288,7 +288,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
288 | 288 | |
289 | 289 | @Override |
290 | 290 | @Transactional(rollbackFor = Exception.class) |
291 | - public List<Integer> removeRoadWaysByPreLocations(List<Integer> roadWays, String warehouseCode) { | |
291 | + public List<Integer> removeRoadWaysByPreLocations(List<Integer> roadWays, String zoneCode, String warehouseCode) { | |
292 | 292 | String value = parameterConfigurationService.getValueByCode(QuantityConstant.MAX_ROADWAY_RECEIPT); |
293 | 293 | // 同巷道分配的库位大于等于2时,这个巷道就不能再分了 |
294 | 294 | int maxRoadReceipt = 2; |
... | ... | @@ -296,8 +296,8 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
296 | 296 | maxRoadReceipt = Integer.parseInt(value); |
297 | 297 | } |
298 | 298 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
299 | - taskHeaderLambdaQueryWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED).ne(TaskHeader::getToLocationCode, | |
300 | - QuantityConstant.EMPTY_STRING); | |
299 | + taskHeaderLambdaQueryWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED).eq(TaskHeader::getZoneCode, zoneCode) | |
300 | + .ne(TaskHeader::getToLocationCode, QuantityConstant.EMPTY_STRING); | |
301 | 301 | List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper); |
302 | 302 | if (taskHeaderList.size() != 0) { |
303 | 303 | List<Integer> roadWayList = taskHeaderList.stream().map(TaskHeader::getRoadWay).collect(toList()); |
... | ... | @@ -321,14 +321,14 @@ public class LocationAllocationServiceImpl implements LocationAllocationService |
321 | 321 | } |
322 | 322 | Collections.shuffle(roadWays);// 打乱巷道排序 |
323 | 323 | int roadWay = roadWays.get(0); |
324 | - if (roadWays.size() == 1) { | |
325 | - return roadWay; | |
326 | - } | |
324 | +// if (roadWays.size() == 1) { | |
325 | +// return roadWay; | |
326 | +// } | |
327 | +// roadWays = locationAllocationService.removeRoadWaysByPreLocations(roadWays, zoneCode, warehouseCode); | |
328 | +// if (roadWays.size() == 0) { | |
329 | +// return roadWay; | |
330 | +// } | |
327 | 331 | int min = Integer.MAX_VALUE; |
328 | - roadWays = locationAllocationService.removeRoadWaysByPreLocations(roadWays, warehouseCode); | |
329 | - if (roadWays.size() == 0) { | |
330 | - return roadWay; | |
331 | - } | |
332 | 332 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByMaterialCodeAndZoneCode(materialCode, zoneCode, warehouseCode); |
333 | 333 | if (inventoryDetailList.size() != 0) { |
334 | 334 | List<Integer> roadWayList = inventoryDetailList.stream().map(InventoryDetail::getRoadWay).collect(toList()); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java
... | ... | @@ -4,9 +4,11 @@ import java.io.Serializable; |
4 | 4 | import java.math.BigDecimal; |
5 | 5 | import java.util.Collection; |
6 | 6 | import java.util.List; |
7 | +import java.util.stream.Collectors; | |
7 | 8 | |
8 | 9 | import javax.annotation.Resource; |
9 | 10 | |
11 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |
10 | 12 | import org.jeecg.common.api.vo.Result; |
11 | 13 | import org.jeecg.common.exception.JeecgBootException; |
12 | 14 | import org.jeecg.modules.wms.config.container.entity.Container; |
... | ... | @@ -17,7 +19,9 @@ import org.jeecg.modules.wms.config.material.entity.Material; |
17 | 19 | import org.jeecg.modules.wms.config.material.service.impl.MaterialServiceImpl; |
18 | 20 | import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; |
19 | 21 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
22 | +import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | |
20 | 23 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
24 | +import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService; | |
21 | 25 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService; |
22 | 26 | import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService; |
23 | 27 | import org.jeecg.modules.wms.stocktaking.cycleCountDetail.entity.CycleCountDetail; |
... | ... | @@ -79,6 +83,8 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
79 | 83 | private IReceiptContainerHeaderService receiptContainerHeaderService; |
80 | 84 | @Resource |
81 | 85 | private IShipmentContainerHeaderService shipmentContainerHeaderService; |
86 | + @Resource | |
87 | + private IInventoryHeaderService inventoryHeaderService; | |
82 | 88 | |
83 | 89 | @Override |
84 | 90 | @Transactional |
... | ... | @@ -160,6 +166,10 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
160 | 166 | if (locationByCode.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { |
161 | 167 | return Result.error("当前库位已锁定 请检查数据 库存里面不是锁定 实际上库位里面锁定了"); |
162 | 168 | } |
169 | + InventoryHeader inventoryHeader = inventoryHeaderService.getById(taskId); | |
170 | + if (inventoryHeader == null) { | |
171 | + return Result.error("根据库存头ID:" + taskId + "没有找到库存头"); | |
172 | + } | |
163 | 173 | |
164 | 174 | CycleCountDetail cycleCountDetail = new CycleCountDetail(); |
165 | 175 | cycleCountDetail.setCycleCountHeadId(headerId); |
... | ... | @@ -170,9 +180,9 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
170 | 180 | cycleCountDetail.setInventoryHeaderId(inventoryDetails.get(0).getInventoryHeaderId()); |
171 | 181 | cycleCountDetail.setLocationCode(inventoryDetails.get(0).getLocationCode()); |
172 | 182 | cycleCountDetail.setInventorySts(inventoryDetails.get(0).getInventoryStatus()); |
173 | - cycleCountDetail.setSystemQty(BigDecimal.ZERO); | |
174 | - cycleCountDetail.setCountedQty(BigDecimal.ZERO); | |
175 | - cycleCountDetail.setGapQty(BigDecimal.ZERO); | |
183 | + cycleCountDetail.setSystemQty(inventoryHeader.getTotalQty()); | |
184 | +// cycleCountDetail.setCountedQty(BigDecimal.ZERO); | |
185 | +// cycleCountDetail.setGapQty(BigDecimal.ZERO); | |
176 | 186 | cycleCountDetail.setEnableStatus(QuantityConstant.CYCLECOUNT_STATUS_BUILD); |
177 | 187 | cycleCountDetailService.save(cycleCountDetail); |
178 | 188 | for (InventoryDetail inventoryDetail : inventoryDetails) { |
... | ... | @@ -196,6 +206,24 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
196 | 206 | cycleCountDetailChildServiceImpl.save(cycleCountDetailChild); |
197 | 207 | } |
198 | 208 | } |
209 | + LambdaQueryWrapper <CycleCountDetail> cycleCountDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
210 | + cycleCountDetailLambdaQueryWrapper.eq(CycleCountDetail::getCycleCountHeadCode, code); | |
211 | + List<CycleCountDetail> cycleCountDetailList = cycleCountDetailService.list(cycleCountDetailLambdaQueryWrapper); | |
212 | + if (CollectionUtils.isEmpty(cycleCountDetailList)) { | |
213 | + throw new JeecgBootException("没有找到盘点头信息"); | |
214 | + } | |
215 | + BigDecimal countSystemQty = BigDecimal.ZERO; | |
216 | + List<BigDecimal> systemQty = cycleCountDetailList.stream().map(i -> i.getSystemQty()).collect(Collectors.toList()); | |
217 | + for (BigDecimal bigDecimal : systemQty) { | |
218 | + countSystemQty = countSystemQty.add(bigDecimal); | |
219 | + } | |
220 | + CycleCountHeader cycleCountHeader = new CycleCountHeader(); | |
221 | + cycleCountHeader.setId(cycleCountDetailList.get(0).getCycleCountHeadId()); | |
222 | + cycleCountHeader.setTotalLocs(cycleCountDetailList.size()); | |
223 | + cycleCountHeader.setTotalItems(countSystemQty); | |
224 | + if (!cycleCountHeaderService.updateById(cycleCountHeader)) { | |
225 | + throw new JeecgBootException("修改盘点头数量信息失败"); | |
226 | + } | |
199 | 227 | return Result.OK("生成完成", headerId); |
200 | 228 | } |
201 | 229 | |
... | ... | @@ -330,6 +358,9 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
330 | 358 | if (cycleCountDetail.getEnableStatus().equals(QuantityConstant.CYCLECOUNT_STATUS_BUILD)) { |
331 | 359 | return Result.error("当前盘点明细是新建状态 不能调整"); |
332 | 360 | } |
361 | + if (cycleCountDetail.getEnableStatus().equals(QuantityConstant.CYCLECOUNT_STATUS_COMPLETED)) { | |
362 | + return Result.error("当前盘点明细是完成状态 不能调整"); | |
363 | + } | |
333 | 364 | |
334 | 365 | if (cycleCountDetailChild.getCountedQty().compareTo(BigDecimal.ZERO) == 0) { |
335 | 366 | return Result.error("别闹"); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/ITaskHeaderService.java
... | ... | @@ -4,6 +4,7 @@ import java.io.Serializable; |
4 | 4 | import java.util.Collection; |
5 | 5 | import java.util.List; |
6 | 6 | |
7 | +import javafx.concurrent.Task; | |
7 | 8 | import org.jeecg.common.api.vo.Result; |
8 | 9 | import org.jeecg.modules.wms.config.location.entity.Location; |
9 | 10 | import org.jeecg.modules.wms.task.taskHeader.entity.QucikReceiptEntity; |
... | ... | @@ -310,6 +311,13 @@ public interface ITaskHeaderService extends IService<TaskHeader> { |
310 | 311 | Result cancelShipmentTask(TaskHeader taskHeader); |
311 | 312 | |
312 | 313 | /** |
314 | + * 修改盘点明细状态 | |
315 | + * @param taskHeader | |
316 | + * @return | |
317 | + */ | |
318 | + Result updateCycleCountDetailByEnableStatus(TaskHeader taskHeader); | |
319 | + | |
320 | + /** | |
313 | 321 | * 更新状态 |
314 | 322 | * @param status |
315 | 323 | * @param id |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -910,6 +910,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
910 | 910 | case QuantityConstant.TASK_TYPE_WHOLESHIPMENT: |
911 | 911 | case QuantityConstant.TASK_TYPE_SORTINGSHIPMENT: |
912 | 912 | result = taskHeaderService.cancelShipmentTask(taskHeader); |
913 | + case QuantityConstant.TASK_TYPE_CYCLECOUNT: | |
914 | + result = taskHeaderService.updateCycleCountDetailByEnableStatus(taskHeader); | |
913 | 915 | break; |
914 | 916 | } |
915 | 917 | taskHeaderService.cancelLocationAndContainerStatus(taskHeader); |
... | ... | @@ -2772,6 +2774,24 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2772 | 2774 | } |
2773 | 2775 | |
2774 | 2776 | @Override |
2777 | + public Result updateCycleCountDetailByEnableStatus(TaskHeader taskHeader) { | |
2778 | + log.info("开始取消盘点任务"); | |
2779 | + LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
2780 | + cycleCountDetailLambdaQueryWrapper.eq(CycleCountDetail::getContainerCode, taskHeader.getContainerCode()) | |
2781 | + .ne(CycleCountDetail::getEnableStatus, QuantityConstant.SHIPMENT_RECEIVE_SUCCESS); | |
2782 | + CycleCountDetail cycleCountDetail = cycleCountDetailService.getOne(cycleCountDetailLambdaQueryWrapper); | |
2783 | + if (cycleCountDetail == null) { | |
2784 | + throw new JeecgBootException("取消盘点任务,没有找到盘点明细"); | |
2785 | + } | |
2786 | + cycleCountDetail.setEnableStatus(QuantityConstant.CYCLECOUNT_STATUS_BUILD); | |
2787 | + if (!cycleCountDetailService.updateById(cycleCountDetail)) { | |
2788 | + throw new JeecgBootException("取消盘点任务,修改盘点明细状态失败"); | |
2789 | + } | |
2790 | + log.info("完成取消盘点任务"); | |
2791 | + return Result.ok("取消盘点任务成功"); | |
2792 | + } | |
2793 | + | |
2794 | + @Override | |
2775 | 2795 | public boolean updateStatusById(int status, int id) { |
2776 | 2796 | TaskHeader taskHeader = new TaskHeader(); |
2777 | 2797 | taskHeader.setId(id); |
... | ... |