Commit 86391dfacb19560cf99faa556f7eeb064028d02e

Authored by 易文鹏
2 parents 8e3a7e33 0e71c0b9

Merge remote-tracking branch 'origin/develop' into develop

Showing 23 changed files with 153 additions and 103 deletions
ant-design-vue-jeecg/src/api/api.js
... ... @@ -58,6 +58,8 @@ const queryMyDepartTreeList = (params) => getAction("/sys/sysDepart/queryMyDeptT
58 58 //日志管理
59 59 const deleteLog = (params) => deleteAction("/sys/log/delete", params);
60 60 const deleteLogList = (params) => deleteAction("/sys/log/deleteBatch", params);
  61 +//获得所有接口日志名称
  62 +const getApiNameList = (params) => deleteAction("/monitor/apiLog/getApiNameList", params);
61 63  
62 64 //数据字典
63 65 const addDict = (params) => postAction("/sys/dict/add", params);
... ... @@ -160,11 +162,11 @@ export const selectPort = (params) => postAction('/task/taskHeader/selectPort',
160 162 //创建跨站任务
161 163 export const createOverStationTask = (params) => postAction('/task/taskHeader/createOverStationTask', params);
162 164 //盘点任务创建
163   -export const stockTakeTask = (params,headerId,code) => postAction('/cycleCountDetail/cycleCountDetail/stockTakeTask?ids='+params+'&headerId='+headerId+'&code='+code, code);
  165 +export const stockTakeTask = (params, headerId, code) => postAction('/cycleCountDetail/cycleCountDetail/stockTakeTask?ids=' + params + '&headerId=' + headerId + '&code=' + code, code);
164 166 //盘盈添加
165 167 export const increaseInInventoryGain = (params) => postAction('/cycleCountDetail/cycleCountDetail/increaseInInventoryGain', params);
166 168 //盘点任务生成
167   -export const createCycleCoutTaskByDetailId = (params,toPort) => postAction('/cycleCountDetail/cycleCountDetail/createCycleCoutTaskByDetailId?cycleId='+params+'&toPort='+toPort, params);
  169 +export const createCycleCoutTaskByDetailId = (params, toPort) => postAction('/cycleCountDetail/cycleCountDetail/createCycleCoutTaskByDetailId?cycleId=' + params + '&toPort=' + toPort, params);
168 170 //盘点确定实盘数量
169 171 export const confirmGapQty = (params) => postAction('/cycleCountDetail/cycleCountDetail/confirmGapQty', params);
170 172 //创建空托盘组入库任务
... ... @@ -277,5 +279,6 @@ export {
277 279 saveDeptRolePermission,
278 280 queryMyDepartTreeList,
279 281 getUserNoticeInfo,
280   - getDictItemsFromCache
  282 + getDictItemsFromCache,
  283 + getApiNameList
281 284 }
... ...
ant-design-vue-jeecg/src/views/system/UserList.vue
... ... @@ -230,19 +230,16 @@ export default {
230 230 {
231 231 title: '用户账号',
232 232 align: "center",
233   - dataIndex: 'username',
234   - width: 120
  233 + dataIndex: 'username'
235 234 },
236 235 {
237 236 title: '用户姓名',
238 237 align: "center",
239   - width: 100,
240 238 dataIndex: 'realname',
241 239 },
242 240 {
243 241 title: '工号',
244 242 align: "center",
245   - width: 100,
246 243 dataIndex: 'workNo',
247 244 },
248 245 // {
... ... @@ -256,13 +253,11 @@ export default {
256 253 {
257 254 title: '性别',
258 255 align: "center",
259   - width: 80,
260 256 dataIndex: 'sex_dictText'
261 257 },
262 258 {
263 259 title: '角色',
264 260 align: "center",
265   - width: 200,
266 261 dataIndex: 'selectedRoles',
267 262 key: 'selectedRoles',
268 263 scopedSlots: {customRender: 'selectedRoles'}
... ... @@ -276,19 +271,18 @@ export default {
276 271 {
277 272 title: '手机号码',
278 273 align: "center",
279   - width: 100,
280 274 dataIndex: 'phone'
281 275 },
282 276 {
283 277 title: '邮箱',
284 278 align: "center",
285   - width: 200,
286 279 dataIndex: 'email'
287 280 },
288 281 {
289 282 title: '所属仓库',
290 283 align: "center",
291 284 dataIndex: 'selectedWarehouses',
  285 + width: 300,
292 286 key: 'selectedWarehouses',
293 287 scopedSlots: {customRender: 'selectedWarehouses'}
294 288 },
... ... @@ -306,11 +300,8 @@ export default {
306 300 {
307 301 title: '状态',
308 302 align: "center",
309   - width: 80,
310 303 dataIndex: 'status_dictText'
311 304 },
312   -
313   -
314 305 {
315 306 title: '操作',
316 307 dataIndex: 'action',
... ...
ant-design-vue-jeecg/src/views/system/config/BomHeaderList.vue
... ... @@ -90,9 +90,7 @@
90 90 </template>
91 91  
92 92 <span slot="action" slot-scope="text, record">
93   - <a v-has="'bomHeader:edit'" @click="handleEdit(record)">编辑</a>
94   -
95   - <a-divider type="vertical"/>
  93 + <a v-has="'bomHeader:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
96 94 <a-dropdown>
97 95 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
98 96 <a-menu slot="overlay">
... ...
ant-design-vue-jeecg/src/views/system/config/CarrierList.vue
... ... @@ -74,9 +74,7 @@
74 74 </template>
75 75  
76 76 <span slot="action" slot-scope="text, record">
77   - <a v-has="'carrier:edit'" @click="handleEdit(record)">编辑</a>
78   -
79   - <a-divider type="vertical"/>
  77 + <a v-has="'carrier:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
80 78 <a-dropdown>
81 79 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
82 80 <a-menu slot="overlay">
... ...
ant-design-vue-jeecg/src/views/system/config/CustomerList.vue
... ... @@ -74,9 +74,7 @@
74 74 </template>
75 75  
76 76 <span slot="action" slot-scope="text, record">
77   - <a v-has="'customer:edit'" @click="handleEdit(record)">编辑</a>
78   -
79   - <a-divider type="vertical"/>
  77 + <a v-has="'customer:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
80 78 <a-dropdown>
81 79 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
82 80 <a-menu slot="overlay">
... ...
ant-design-vue-jeecg/src/views/system/config/LocationHighList.vue
... ... @@ -100,9 +100,7 @@
100 100 </template>
101 101  
102 102 <span slot="action" slot-scope="text, record">
103   - <a v-has="'locationHigh:edit'" @click="handleEdit(record)">编辑</a>
104   -
105   - <a-divider type="vertical"/>
  103 + <a v-has="'locationHigh:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
106 104 <a-dropdown>
107 105 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
108 106 <a-menu slot="overlay">
... ...
ant-design-vue-jeecg/src/views/system/config/LocationList.vue
... ... @@ -19,22 +19,22 @@
19 19 <j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" dictCode="location_status" />
20 20 </a-form-item>
21 21 </a-col>
22   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
23   - <a-form-item label="库位类型">
24   - <a-select
25   - show-search
26   - placeholder="请选择库位类型"
27   - option-filter-prop="children"
28   - v-model="queryParam.locationTypeCode"
29   - >
30   - <a-select-option v-for="item in locationTypeList" :key="item.name" :value="item.code">
31   - {{ item.name }}
32   - </a-select-option>
33   - </a-select>
34   - </a-form-item>
35   - </a-col>
36 22 <template v-if="toggleSearchStatus">
37 23 <a-col :xl="6" :lg="7" :md="8" :sm="24">
  24 + <a-form-item label="库位类型">
  25 + <a-select
  26 + show-search
  27 + placeholder="请选择库位类型"
  28 + option-filter-prop="children"
  29 + v-model="queryParam.locationTypeCode"
  30 + >
  31 + <a-select-option v-for="item in locationTypeList" :key="item.name" :value="item.code">
  32 + {{ item.name }}
  33 + </a-select-option>
  34 + </a-select>
  35 + </a-form-item>
  36 + </a-col>
  37 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
38 38 <a-form-item label="库区">
39 39 <a-select
40 40 show-search
... ...
ant-design-vue-jeecg/src/views/system/config/SupplierList.vue
... ... @@ -101,9 +101,7 @@
101 101 </template>
102 102  
103 103 <span slot="action" slot-scope="text, record">
104   - <a v-has="'supplier:edit'" @click="handleEdit(record)">编辑</a>
105   -
106   - <a-divider type="vertical"/>
  104 + <a v-has="'supplier:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
107 105 <a-dropdown>
108 106 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
109 107 <a-menu slot="overlay">
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
... ... @@ -166,9 +166,7 @@
166 166 </template>
167 167  
168 168 <span slot="action" slot-scope="text, record">
169   - <a v-has="'inventoryTransaction:edit'" @click="handleEdit(record)">编辑</a>
170   -
171   - <a-divider type="vertical"/>
  169 + <a v-has="'inventoryTransaction:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
172 170 <a-dropdown>
173 171 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
174 172 <a-menu slot="overlay">
... ...
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
... ... @@ -4,9 +4,13 @@
4 4 <div class="table-page-search-wrapper">
5 5 <a-form layout="inline" @keyup.enter.native="searchQuery">
6 6 <a-row :gutter="24">
7   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
8   - <a-form-item label="接口名称">
9   - <j-input placeholder="请输入接口名称" v-model="queryParam.apiName"></j-input>
  7 + <a-col :xl='6' :lg='7' :md='8' :sm='24'>
  8 + <a-form-item label='接口名称'>
  9 + <a-select show-search placeholder='请输入接口名称' option-filter-prop='children' v-model='queryParam.apiName'>
  10 + <a-select-option v-for='name in apiNameList' :key='name' :value='name'>
  11 + {{ name }}
  12 + </a-select-option>
  13 + </a-select>
10 14 </a-form-item>
11 15 </a-col>
12 16 <a-col :xl="6" :lg="7" :md="8" :sm="24">
... ... @@ -128,6 +132,7 @@ import { mixinDevice } from &#39;@/utils/mixin&#39;
128 132 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
129 133 import ApiLogModal from './modules/ApiLogModal'
130 134 import JEllipsis from '@comp/jeecg/JEllipsis'
  135 +import {getApiNameList} from '@api/api'
131 136  
132 137 export default {
133 138 name: 'ApiLogList',
... ... @@ -139,6 +144,7 @@ export default {
139 144 data() {
140 145 return {
141 146 description: '接口日志管理页面',
  147 + apiNameList: [],
142 148 // 表头
143 149 columns: [
144 150 {
... ... @@ -211,6 +217,7 @@ export default {
211 217 },
212 218 created() {
213 219 this.getSuperFieldList()
  220 + this.loadFrom()
214 221 },
215 222 mounted() {
216 223 this.expandedRowRender = "expandedRowRender";
... ... @@ -221,6 +228,13 @@ export default {
221 228 }
222 229 },
223 230 methods: {
  231 + loadFrom() {
  232 + getApiNameList().then((res) => {
  233 + if (res.success) {
  234 + this.apiNameList = res.result
  235 + }
  236 + })
  237 + },
224 238 initDictConfig() {},
225 239 getSuperFieldList() {
226 240 let fieldList = []
... ...
ant-design-vue-jeecg/src/views/system/receipt/ReceiptDetailList.vue
... ... @@ -72,9 +72,8 @@
72 72  
73 73 <span slot="action" slot-scope="text, record">
74 74 <a v-has="'receiptDetail:edit'" @click="edit(record)">编辑</a>
75   - <a-divider type="vertical"/>
76 75 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
77   - <a v-has="'receiptDetail:delete'">删除</a>
  76 + <a v-has="'receiptDetail:delete'"><a-divider type="vertical"/>删除</a>
78 77 </a-popconfirm>
79 78 </span>
80 79  
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
... ... @@ -120,11 +120,11 @@
120 120 </template>
121 121  
122 122 <span slot="action" slot-scope="text, record">
123   - <a v-if="record.status == 0" @click="selectPort(record)">生成任务<a-divider type="vertical"/></a>
  123 + <a v-if="record.status == 0" @click="selectPort(record)">生成任务</a>
124 124 <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)">
125   - <a>取消配盘<a-divider type="vertical"/></a>
  125 + <a><a-divider type="vertical"/>取消配盘</a>
126 126 </a-popconfirm>
127   - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)">编辑</a>
  127 + <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-divider type="vertical"/>编辑</a>
128 128 </span>
129 129 </a-table>
130 130 </div>
... ...
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
... ... @@ -111,8 +111,8 @@
111 111 <a-menu-item>
112 112 <a @click="handleDetail(record)">详情</a>
113 113 </a-menu-item>
114   - <a-menu-item>
115   - <a v-has="'agvTask:edit'" @click="handleEdit(record)">编辑</a>
  114 + <a-menu-item v-has="'agvTask:edit'">
  115 + <a @click="handleEdit(record)">编辑</a>
116 116 </a-menu-item>
117 117 </a-menu>
118 118 </a-dropdown>
... ...
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
... ... @@ -148,9 +148,8 @@
148 148 <a-divider type="vertical"/></a>
149 149 <a v-if="record.isDoubleIn == 1 && record.exceptionState == 1" v-has="'taskHeader:executeTask'" @click="handleDoubleInTask(record)">修复重入数据
150 150 <a-divider type="vertical"/></a>
151   - <a v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消<a-divider type="vertical"/></a>
  151 + <a v-if="record.status <= 10" v-has="'taskHeader:cancelTask'" @click="cancelTask(record)">取消</a>
152 152 </span>
153   -
154 153 </a-table>
155 154 </div>
156 155  
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/controller/WcsController.java
1 1 package org.jeecg.modules.wms.api.wcs.controller;
2 2  
  3 +import java.net.SocketException;
  4 +
3 5 import javax.annotation.Resource;
4 6 import javax.servlet.http.HttpServletRequest;
5 7  
... ... @@ -59,8 +61,7 @@ public class WcsController extends HuahengBaseController {
59 61 Result result = handleMultiProcess("warecellAllocation", lockKey, new MultiProcessListener() {
60 62 @Override
61 63 public Result<?> doProcess() {
62   - Result result = wcsService.warecellAllocation(warecellDomain);
63   - return result;
  64 + return wcsService.warecellAllocation(warecellDomain);
64 65 }
65 66 });
66 67 return result;
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
... ... @@ -107,8 +107,6 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
107 107 searchNumber = Integer.parseInt(value);
108 108 }
109 109 String lastString = "ORDER BY layer asc, id asc limit " + searchNumber;
110   - StopWatch stopWatch = new StopWatch();
111   - stopWatch.start("aaa");
112 110 List<Integer> removeRoadWays = new ArrayList<>();
113 111 // 寻找可用巷道,空闲的空库位低于设定值,那么这个巷道就不能用来分配库位
114 112 for (Integer roadWay : roadWays) {
... ... @@ -122,9 +120,6 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
122 120 removeRoadWays.add(roadWay);
123 121 }
124 122 }
125   - stopWatch.stop();
126   - System.out.println("waste aa:" + stopWatch.getLastTaskTimeMillis());
127   - stopWatch.start("bbb");
128 123 roadWays.removeAll(removeRoadWays);
129 124 if (roadWays == null || roadWays.size() == 0) {
130 125 throw new JeecgBootException("分配库位时, 巷道为空");
... ... @@ -147,8 +142,6 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
147 142 }
148 143 }
149 144 locationList.removeAll(removeLocaationList);
150   - stopWatch.stop();
151   - System.out.println("waste bb:" + stopWatch.getLastTaskTimeMillis());
152 145 if (locationList.size() == 0) {
153 146 locationLambda = Wrappers.lambdaQuery();
154 147 locationLambda.eq(Location::getZoneCode, zoneCode).eq(Location::getWarehouseCode, warehouseCode).eq(Location::getRoadWay, roadWay)
... ... @@ -170,8 +163,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
170 163 return null;
171 164 }
172 165 Location location = locationList.stream().findFirst().orElse(null);
173   - String locationCode = location.getCode();
174   - return locationCode;
  166 + return location.getCode();
175 167 }
176 168  
177 169 /**
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsService.java
1 1 package org.jeecg.modules.wms.api.wcs.service;
2 2  
  3 +import java.net.SocketException;
  4 +
3 5 import org.jeecg.common.api.vo.Result;
4 6 import org.jeecg.modules.wms.api.wcs.entity.MaterialInfoEntity;
5 7 import org.jeecg.modules.wms.api.wcs.entity.WarecellDomain;
... ... @@ -11,7 +13,8 @@ import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
11 13 */
12 14 public interface WcsService {
13 15  
14   - /** 仓位分配 */
  16 + /** 仓位分配
  17 + * @throws SocketException */
15 18 Result warecellAllocation(WarecellDomain warecellDomain);
16 19  
17 20 /**
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
1 1 package org.jeecg.modules.wms.api.wcs.service;
2 2  
  3 +import java.net.SocketException;
3 4 import java.util.ArrayList;
4 5 import java.util.List;
5 6 import java.util.stream.Collectors;
... ... @@ -59,43 +60,57 @@ public class WcsServiceImpl implements WcsService {
59 60  
60 61 @Resource
61 62 private IZoneService zoneService;
  63 +
62 64 @Resource
63 65 private ITaskHeaderService taskHeaderService;
  66 +
64 67 @Resource
65 68 private ITaskDetailService taskDetailService;
  69 +
66 70 @Resource
67 71 private IContainerService containerService;
  72 +
68 73 @Resource
69 74 private ILocationTypeService locationTypeService;
  75 +
70 76 @Resource
71 77 private ILocationHighService locationHighService;
  78 +
72 79 @Resource
73 80 private IParameterConfigurationService parameterConfigurationService;
  81 +
74 82 @Resource
75 83 private IReceiptContainerDetailService receiptContainerDetailService;
  84 +
76 85 @Resource
77 86 private IMaterialService materialService;
  87 +
78 88 @Resource
79 89 private IReceiptContainerHeaderService receiptContainerHeaderService;
  90 +
80 91 @Resource
81 92 private LocationAllocationService locationAllocationService;
  93 +
82 94 @Resource
83 95 private ILocationService locationService;
  96 +
84 97 @Resource
85 98 private IAddressService addressService;
  99 +
86 100 @Resource
87 101 private IContainerTypeService containerTypeService;
88 102  
89 103 /**
90 104 * 库位分配
  105 + * @throws SocketException
91 106 */
92 107 @Override
93 108 @Transactional(rollbackFor = Exception.class)
94 109 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情分配库位'", extra = "#extraJsonString",
95   - msg = "'任务ID:' + #warecellDomain.getTaskNo() + ',库位编码:' + #locationCode", condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true)
96   - @OperationLog(bizId = "#taskHeader.getId()", bizType = "'任务追踪'", tag = "'分配库位'", extra = "''",
  110 + msg = "'任务ID:' + #warecellDomain.getTaskNo() + ',库位编码:' + #locationCode", condition = "null != #success && #success", recordReturnValue = true)
  111 + @OperationLog(bizId = "#taskHeader.getId()", bizType = "'任务追踪'", tag = "'分配库位'",
97 112 msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
98   - recordReturnValue = true)
  113 + condition = "null != #success && #success", recordReturnValue = true)
99 114 public Result warecellAllocation(WarecellDomain warecellDomain) {
100 115 log.info("开始分配库位");
101 116 String warehouseCode = warecellDomain.getWarehouseCode();
... ... @@ -247,14 +262,15 @@ public class WcsServiceImpl implements WcsService {
247 262 if (!taskHeaderService.updateById(taskHeader)) {
248 263 throw new JeecgBootException("更新任务头表目标库位失败");
249 264 }
250   -
  265 +
251 266 WcsTask wcsTask = new WcsTask();
252 267 wcsTask.setToLocationCode(locationCode);
253 268 wcsTask.setPreTaskNo(String.valueOf(preTaskNo));
254   - LogRecordContext.putVariable("locationCode", locationCode);// 操作日志收集
255   - LogRecordContext.putVariable("receiptContainerDetailList", receiptContainerDetailList);// 操作日志收集
256   - LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptContainerDetailList));// 操作日志收集
257   - LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集
  269 + // 操作日志收集
  270 + LogRecordContext.putVariable("locationCode", locationCode);
  271 + LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptContainerDetailList));
  272 + LogRecordContext.putVariable("taskHeader", taskHeader);
  273 + LogRecordContext.putVariable("success", true);
258 274 log.info("完成分配库位,任务号:" + taskNo + ", 库位号:" + locationCode);
259 275 return Result.OK(wcsTask);
260 276 }
... ... @@ -263,7 +279,7 @@ public class WcsServiceImpl implements WcsService {
263 279 @Transactional(rollbackFor = Exception.class)
264 280 @OperationLog(bizId = "#taskHeader.getId()", bizType = "'任务追踪'", tag = "'任务下发'", extra = "''",
265 281 msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
266   - recordReturnValue = true)
  282 + condition = "null != #success && #success", recordReturnValue = true)
267 283 public Result wcsTaskAssign(TaskHeader taskHeader) {
268 284 if (taskHeader == null) {
269 285 return Result.error("wms任务为空");
... ... @@ -415,6 +431,7 @@ public class WcsServiceImpl implements WcsService {
415 431 }
416 432 }
417 433 LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集
  434 + LogRecordContext.putVariable("success", true);
418 435 return Result.ok("下发任务成功");
419 436 }
420 437  
... ... @@ -500,7 +517,7 @@ public class WcsServiceImpl implements WcsService {
500 517 @Transactional(rollbackFor = Exception.class)
501 518 @OperationLog(bizId = "#taskHeader.getId()", bizType = "'任务追踪'", tag = "'空出处理'", extra = "''",
502 519 msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()",
503   - recordReturnValue = true)
  520 + condition = "null != #success && #success", recordReturnValue = true)
504 521 public Result emptyOutHandle(String taskNo) {
505 522 if (StringUtils.isEmpty(taskNo)) {
506 523 return Result.error("任务号为空");
... ... @@ -525,7 +542,9 @@ public class WcsServiceImpl implements WcsService {
525 542 if (!success) {
526 543 return Result.error("修改任务失败,空出处理失败");
527 544 }
528   - LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集
  545 + // 操作日志收集
  546 + LogRecordContext.putVariable("taskHeader", taskHeader);
  547 + LogRecordContext.putVariable("success", true);
529 548 return Result.ok("空出处理成功");
530 549 }
531 550  
... ... @@ -533,7 +552,7 @@ public class WcsServiceImpl implements WcsService {
533 552 @Transactional(rollbackFor = Exception.class)
534 553 @OperationLog(bizId = "#taskHeader.getId()", bizType = "'任务追踪'", tag = "'重入处理'", extra = "''",
535 554 msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()",
536   - recordReturnValue = true)
  555 + condition = "null != #success && #success", recordReturnValue = true)
537 556 public Result reentryHandle(String taskNo) {
538 557 // 1、判断非空字段
539 558 if (StringUtils.isEmpty(taskNo)) {
... ... @@ -630,7 +649,9 @@ public class WcsServiceImpl implements WcsService {
630 649 TaskReentryEntity taskReentryEntity = new TaskReentryEntity();
631 650 taskReentryEntity.setTaskNo(Integer.parseInt(taskNo));
632 651 taskReentryEntity.setRedirectionLocationCode(locationCode);
633   - LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集
  652 + // 操作日志收集
  653 + LogRecordContext.putVariable("taskHeader", taskHeader);
  654 + LogRecordContext.putVariable("success", true);
634 655 return Result.ok(taskReentryEntity);
635 656 }
636 657  
... ... @@ -638,7 +659,7 @@ public class WcsServiceImpl implements WcsService {
638 659 @Transactional(rollbackFor = Exception.class)
639 660 @OperationLog(bizId = "#taskHeader.getId()", bizType = "'任务追踪'", tag = "'取货错处理'", extra = "''",
640 661 msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()",
641   - recordReturnValue = true)
  662 + condition = "null != #success && #success", recordReturnValue = true)
642 663 public Result pickupErrorHandle(String taskNo) {
643 664 // 1、判断非空字段
644 665 if (StringUtils.isEmpty(taskNo)) {
... ... @@ -662,6 +683,7 @@ public class WcsServiceImpl implements WcsService {
662 683 return Result.error("取货错处理失败,更新任务失败");
663 684 }
664 685 LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集
  686 + LogRecordContext.putVariable("success", true);
665 687 return Result.ok("取货错处理成功");
666 688 }
667 689  
... ... @@ -669,7 +691,7 @@ public class WcsServiceImpl implements WcsService {
669 691 @Transactional(rollbackFor = Exception.class)
670 692 @OperationLog(bizId = "#taskHeader.getId()", bizType = "'任务追踪'", tag = "'到达站台'", extra = "''",
671 693 msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()",
672   - recordReturnValue = true)
  694 + condition = "null != #success && #success", recordReturnValue = true)
673 695 public Result arrivedNotice(String taskNo, String port) {
674 696 TaskHeader taskHeader = taskHeaderService.getById(taskNo);
675 697 if (taskHeader == null) {
... ... @@ -685,7 +707,9 @@ public class WcsServiceImpl implements WcsService {
685 707 if (!result) {
686 708 return Result.error("更新到达站台失败");
687 709 }
688   - LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集
  710 + // 操作日志收集
  711 + LogRecordContext.putVariable("taskHeader", taskHeader);
  712 + LogRecordContext.putVariable("success", true);
689 713 return Result.ok("更新到达站台成功");
690 714 }
691 715  
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/controller/HuahengBaseController.java
... ... @@ -5,6 +5,7 @@ import java.util.concurrent.TimeUnit;
5 5 import javax.annotation.Nonnull;
6 6  
7 7 import org.jeecg.common.api.vo.Result;
  8 +import org.jeecg.common.exception.JeecgBootException;
8 9 import org.jeecg.utils.support.RedissonDistributedLocker;
9 10 import org.springframework.beans.factory.annotation.Autowired;
10 11  
... ... @@ -73,7 +74,7 @@ public class HuahengBaseController {
73 74 result = multiProcessListener.doProcess();
74 75 } catch (Exception e) {
75 76 log.error("[{}] 执行分布式事务失败 lockKey = {},errorMessage = {}", taskName, fullLockKey, ExceptionUtil.getMessage(e), e);
76   - throw ExceptionUtil.convertFromOrSuppressedThrowable(e, RuntimeException.class);
  77 + return Result.error(ExceptionUtil.getMessage(e));
77 78 } finally {
78 79 redissonDistributedLocker.unlock(fullLockKey);
79 80 final long finishTime = SystemClock.now();
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apiLog/controller/ApiLogController.java
... ... @@ -13,7 +13,14 @@ import org.jeecg.common.system.query.QueryGenerator;
13 13 import org.jeecg.modules.wms.monitor.apiLog.entity.ApiLog;
14 14 import org.jeecg.modules.wms.monitor.apiLog.service.IApiLogService;
15 15 import org.springframework.beans.factory.annotation.Autowired;
16   -import org.springframework.web.bind.annotation.*;
  16 +import org.springframework.web.bind.annotation.DeleteMapping;
  17 +import org.springframework.web.bind.annotation.GetMapping;
  18 +import org.springframework.web.bind.annotation.PostMapping;
  19 +import org.springframework.web.bind.annotation.RequestBody;
  20 +import org.springframework.web.bind.annotation.RequestMapping;
  21 +import org.springframework.web.bind.annotation.RequestMethod;
  22 +import org.springframework.web.bind.annotation.RequestParam;
  23 +import org.springframework.web.bind.annotation.RestController;
17 24 import org.springframework.web.servlet.ModelAndView;
18 25  
19 26 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
... ... @@ -148,4 +155,12 @@ public class ApiLogController extends JeecgController&lt;ApiLog, IApiLogService&gt; {
148 155 return super.importExcel(request, response, ApiLog.class);
149 156 }
150 157  
  158 + /**
  159 + * 获得所有接口日志名称
  160 + */
  161 + @RequestMapping(value = "/getApiNameList")
  162 + public Result<?> getApiNameList(HttpServletRequest request) {
  163 + return Result.OK(apiLogService.getApiNameList());
  164 + }
  165 +
151 166 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apiLog/service/IApiLogService.java
1 1 package org.jeecg.modules.wms.monitor.apiLog.service;
2 2  
3   -import com.baomidou.mybatisplus.extension.service.IService;
  3 +import java.util.List;
  4 +
4 5 import org.jeecg.modules.wms.monitor.apiLog.entity.ApiLog;
5 6  
  7 +import com.baomidou.mybatisplus.extension.service.IService;
  8 +
6 9 /**
7 10 * @Description: 接口日志
8 11 * @Author: jeecg-boot
... ... @@ -11,4 +14,6 @@ import org.jeecg.modules.wms.monitor.apiLog.entity.ApiLog;
11 14 */
12 15 public interface IApiLogService extends IService<ApiLog> {
13 16  
  17 + public List<String> getApiNameList();
  18 +
14 19 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/apiLog/service/impl/ApiLogServiceImpl.java
1 1 package org.jeecg.modules.wms.monitor.apiLog.service.impl;
2 2  
  3 +import java.util.Date;
  4 +import java.util.List;
  5 +import java.util.stream.Collectors;
  6 +
3 7 import org.jeecg.modules.wms.monitor.apiLog.entity.ApiLog;
4 8 import org.jeecg.modules.wms.monitor.apiLog.mapper.ApiLogMapper;
5 9 import org.jeecg.modules.wms.monitor.apiLog.service.IApiLogService;
  10 +import org.springframework.cache.annotation.Cacheable;
6 11 import org.springframework.stereotype.Service;
7 12  
  13 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  14 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
8 15 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
9 16  
  17 +import cn.hutool.core.date.DateUtil;
  18 +
10 19 /**
11 20 * @Description: 接口日志
12 21 * @Author: jeecg-boot
... ... @@ -16,4 +25,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
16 25 @Service
17 26 public class ApiLogServiceImpl extends ServiceImpl<ApiLogMapper, ApiLog> implements IApiLogService {
18 27  
  28 + @Override
  29 + @Cacheable(cacheNames = "getApiNameList#7200", key = "#root.methodName", unless = "#result == null ")
  30 + public List<String> getApiNameList() {
  31 + LambdaQueryWrapper<ApiLog> lambdaQueryWrapper = Wrappers.lambdaQuery();
  32 + lambdaQueryWrapper.select(ApiLog::getApiName).groupBy(ApiLog::getApiName).ge(ApiLog::getCreateTime, DateUtil.offsetDay(new Date(), -7));
  33 + List<ApiLog> apiLogList = list(lambdaQueryWrapper);
  34 + return apiLogList.stream().map(t -> t.getApiName()).collect(Collectors.toList());
  35 + }
  36 +
19 37 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -196,8 +196,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
196 196 return Result.error("创建移库任务时,起始库位:" + fromLocationCode + "未找到");
197 197 }
198 198 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode);
199   - if (fromLocation == null) {
200   - return Result.error("创建移库任务时,起始库位:" + fromLocationCode + "未找到");
  199 + if (toLocation == null) {
  200 + return Result.error("创建移库任务时,目标库位:" + toLocation + "未找到");
201 201 }
202 202 String containerCode = fromLocation.getContainerCode();
203 203 // 这里增加组盘校验,如果此托盘存在未完成的组盘数据,则不能移库
... ... @@ -979,11 +979,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
979 979 @Transactional(rollbackFor = Exception.class)
980 980 @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1",
981 981 msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
982   - condition = "#taskDetailList.size() > 0", recordReturnValue = true)
  982 + condition = "null != #success && #success", recordReturnValue = true)
983 983 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1",
984 984 msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
985   - condition = "#taskDetailList.size() > 0", recordReturnValue = true)
986   - @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情入库完成'", extra = "#extraJsonString2", msg = "''", condition = "#receiptDetaiList.size() > 0",
  985 + condition = "null != #success && #success", recordReturnValue = true)
  986 + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情入库完成'", extra = "#extraJsonString2", msg = "''", condition = "null != #success && #success",
987 987 recordReturnValue = true)
988 988 public Result completeReceiptTask(TaskHeader taskHeader) {
989 989 if (taskHeader == null) {
... ... @@ -1161,11 +1161,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1161 1161 }
1162 1162 receiptDetaiList = receiptDetaiList.stream().filter(t -> t.getStatus().equals(QuantityConstant.RECEIPT_HEADER_COMPLETED)).collect(Collectors.toList());
1163 1163 LogRecordContext.putVariable("taskHeader", taskHeader);
1164   - LogRecordContext.putVariable("taskDetailList", taskDetailList);
1165 1164 LogRecordContext.putVariable("extraJsonString1", JSON.toJSONString(taskDetailList));
1166   - LogRecordContext.putVariable("receiptDetaiList", receiptDetaiList);
1167 1165 LogRecordContext.putVariable("extraJsonString2", JSON.toJSONString(receiptDetaiList));
1168   - log.info("完成入库任务, 任务号" + taskHeader.getId());
  1166 + LogRecordContext.putVariable("success", true);// 操作日志收集
  1167 + log.info("完成入库任务, 任务号:" + taskHeader.getId());
1169 1168 return Result.ok("完成入库任务");
1170 1169 }
1171 1170  
... ... @@ -1178,11 +1177,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1178 1177 @Transactional(rollbackFor = Exception.class)
1179 1178 @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1",
1180 1179 msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
1181   - condition = "#taskDetailList.size() > 0", recordReturnValue = true)
  1180 + condition = "null != #success && #success", recordReturnValue = true)
1182 1181 @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1",
1183 1182 msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()",
1184   - recordReturnValue = true)
1185   - @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情出库完成'", extra = "#extraJsonString2", msg = "''", condition = "#shipmentDetailList.size() > 0",
  1183 + condition = "null != #success && #success", recordReturnValue = true)
  1184 + @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情出库完成'", extra = "#extraJsonString2", msg = "''", condition = "null != #success && #success",
1186 1185 recordReturnValue = true)
1187 1186 public Result completeShipmentTask(TaskHeader taskHeader) {
1188 1187 if (taskHeader == null) {
... ... @@ -1193,7 +1192,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1193 1192 String fromLocationCode = taskHeader.getFromLocationCode();
1194 1193 String toLocationCode = taskHeader.getToLocationCode();
1195 1194 String containerCode = taskHeader.getContainerCode();
1196   - String zoneCode = taskHeader.getZoneCode();
1197 1195 int taskType = taskHeader.getTaskType();
1198 1196 List<TaskDetail> taskDetailList = taskDetailService.getTaskDetailListByTaskId(taskHeader.getId());
1199 1197 boolean success = false;
... ... @@ -1383,10 +1381,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1383 1381 // 操作记录添加
1384 1382 shipmentDetailList = shipmentDetailList.stream().filter(t -> t.getStatus().equals(QuantityConstant.SHIPMENT_HEADER_COMPLETED)).collect(Collectors.toList());
1385 1383 LogRecordContext.putVariable("taskHeader", taskHeader);
1386   - LogRecordContext.putVariable("taskDetailList", taskDetailList); // 操作记录添加
1387 1384 LogRecordContext.putVariable("extraJsonString1", JSON.toJSONString(taskDetailList));
1388   - LogRecordContext.putVariable("shipmentDetailList", shipmentDetailList);
1389 1385 LogRecordContext.putVariable("extraJsonString2", JSON.toJSONString(shipmentDetailList));
  1386 + LogRecordContext.putVariable("success", true);
1390 1387 log.info("完成出库任务,任务号:" + taskHeader.getId());
1391 1388 return Result.ok("完成出库任务");
1392 1389 }
... ...