Commit 51b04cd8c6612e4bfee2931bdf372c35d9b90f1e

Authored by 肖超群
2 parents e80da0af 672d3575

Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop

# Conflicts:
#	huaheng-wms-core/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
Showing 32 changed files with 381 additions and 382 deletions
ant-design-vue-jeecg/src/views/jeecg/ThirdAppMessageTest.vue
... ... @@ -34,7 +34,7 @@
34 34 <div slot="action" slot-scope="text, record">
35 35 <template v-if="record.app==='DINGTALK'">
36 36 <a-popconfirm v-if="!record.recalled" title="确定吗?" @confirm="handleRecall(record)">
37   - <a @click="">撤回</a>
  37 + <a @click="null">撤回</a>
38 38 </a-popconfirm>
39 39 <span v-else>已撤回</span>
40 40 </template>
... ...
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
... ... @@ -14,13 +14,13 @@
14 14 <a-input placeholder="请输入请求类型" v-model="queryParam.apiMethod"></a-input>
15 15 </a-form-item>
16 16 </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <a-form-item label="请求方地址">
  19 + <a-input placeholder="请输入请求方地址" v-model="queryParam.ip"></a-input>
  20 + </a-form-item>
  21 + </a-col>
17 22 <template v-if="toggleSearchStatus">
18 23 <a-col :xl="6" :lg="7" :md="8" :sm="24">
19   - <a-form-item label="请求方地址">
20   - <a-input placeholder="请输入请求方地址" v-model="queryParam.ip"></a-input>
21   - </a-form-item>
22   - </a-col>
23   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
24 24 <a-form-item label="请求方名称">
25 25 <a-input placeholder="请输入请求方名称" v-model="queryParam.responseFrom"></a-input>
26 26 </a-form-item>
... ... @@ -93,12 +93,6 @@
93 93  
94 94 <!-- table区域-begin -->
95 95 <div>
96   - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
97   - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
98   - style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
99   - <a style="margin-left: 24px" @click="onClearSelected">清空</a>
100   - </div>
101   -
102 96 <a-table
103 97 ref="table"
104 98 size="middle"
... ... @@ -109,7 +103,6 @@
109 103 :dataSource="dataSource"
110 104 :pagination="ipagination"
111 105 :loading="loading"
112   - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
113 106 class="j-table-force-nowrap"
114 107 @change="handleTableChange">
115 108  
... ... @@ -151,24 +144,23 @@ import &#39;@/assets/less/TableExpand.less&#39;
151 144 import {mixinDevice} from '@/utils/mixin'
152 145 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
153 146 import ApiLogModal from './modules/ApiLogModal'
  147 +import JEllipsis from "@comp/jeecg/JEllipsis"
154 148  
155 149 export default {
156 150 name: 'ApiLogList',
157 151 mixins: [JeecgListMixin, mixinDevice],
158 152 components: {
159   - ApiLogModal
  153 + ApiLogModal,
  154 + JEllipsis
160 155 },
161 156 data() {
  157 + let ellipsis1 = (v, l = 20) => (<j-ellipsis value={v} length={l}/>)
  158 + let ellipsis2 = (v, l = 150) => (<j-ellipsis value={v} length={l}/>)
162 159 return {
163 160 description: '接口日志管理页面',
164 161 // 表头
165 162 columns: [
166 163 {
167   - title: '接口ID',
168   - align: "center",
169   - dataIndex: 'id'
170   - },
171   - {
172 164 title: '接口名称',
173 165 align: "center",
174 166 dataIndex: 'apiName'
... ... @@ -200,7 +192,7 @@ export default {
200 192 },
201 193 {
202 194 title: '请求地址',
203   - align: "center",
  195 + align: "left",
204 196 dataIndex: 'url'
205 197 },
206 198 {
... ... @@ -215,23 +207,27 @@ export default {
215 207 },
216 208 {
217 209 title: '请求头',
218   - align: "center",
219   - dataIndex: 'requestHeader'
  210 + align: "left",
  211 + dataIndex: 'requestHeader',
  212 + customRender: (t) => ellipsis1(t)
220 213 },
221 214 {
222 215 title: '请求内容',
223   - align: "center",
224   - dataIndex: 'requestBody'
  216 + align: "left",
  217 + dataIndex: 'requestBody',
  218 + customRender: (t) => ellipsis2(t)
225 219 },
226 220 {
227 221 title: '响应头',
228   - align: "center",
229   - dataIndex: 'responseHeader'
  222 + align: "left",
  223 + dataIndex: 'responseHeader',
  224 + customRender: (t) => ellipsis1(t)
230 225 },
231 226 {
232 227 title: '响应内容',
233   - align: "center",
234   - dataIndex: 'responseBody'
  228 + align: "left",
  229 + dataIndex: 'responseBody',
  230 + customRender: (t) => ellipsis2(t)
235 231 },
236 232 {
237 233 title: 'httpCode',
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
... ... @@ -28,7 +28,7 @@ import org.springframework.stereotype.Service;
28 28 import org.springframework.transaction.annotation.Transactional;
29 29  
30 30 import com.alibaba.fastjson.JSONObject;
31   -import com.aliyun.oss.ServiceException;
  31 +import org.jeecg.common.exception.JeecgBootException;
32 32 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
33 33 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
34 34 import com.baomidou.mybatisplus.core.metadata.IPage;
... ... @@ -492,7 +492,7 @@ public class SysUserServiceImpl extends ServiceImpl&lt;SysUserMapper, SysUser&gt; impl
492 492 sysUserWarehouse.setUserid(user.getId());
493 493 sysUserWarehouse.setUsername(user.getUsername());
494 494 if (!sysUserWarehouseService.save(sysUserWarehouse)) {
495   - throw new ServiceException("保存失败");
  495 + throw new JeecgBootException("保存失败");
496 496 }
497 497 }
498 498 }
... ... @@ -557,8 +557,9 @@ public class SysUserServiceImpl extends ServiceImpl&lt;SysUserMapper, SysUser&gt; impl
557 557 // step5
558 558 LambdaQueryWrapper<SysUserWarehouse> sysUserWarehouseLambdaQueryWrapper = Wrappers.lambdaQuery();
559 559 sysUserWarehouseLambdaQueryWrapper.eq(SysUserWarehouse::getUserid, user.getId());
560   - sysUserWarehouseService.remove(sysUserWarehouseLambdaQueryWrapper);
561   - if (StringUtils.isNotEmpty(warehouses)) {
  560 + sysUserWarehouseService.remove(sysUserWarehouseLambdaQueryWrapper{
  561 +
  562 + if (StringUtils.isNotEmpty(warehouses)) {
562 563 String[] strs = warehouses.split(",");
563 564 for (String warehouseCode : strs) {
564 565 SysUserWarehouse sysUserWarehouse = new SysUserWarehouse();
... ... @@ -566,7 +567,7 @@ public class SysUserServiceImpl extends ServiceImpl&lt;SysUserMapper, SysUser&gt; impl
566 567 sysUserWarehouse.setWarehousecode(warehouseCode);
567 568 sysUserWarehouse.setUsername(user.getRealname());
568 569 if (!sysUserWarehouseService.save(sysUserWarehouse)) {
569   - throw new ServiceException("保存用户和仓库关系失败");
  570 + throw new JeecgBootException("保存用户和仓库关系失败");
570 571 }
571 572 }
572 573 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/acs/service/impl/AcsServiceImpl.java
... ... @@ -3,6 +3,7 @@ package org.jeecg.modules.wms.api.acs.service.impl;
3 3 import javax.annotation.Resource;
4 4  
5 5 import org.jeecg.common.api.vo.Result;
  6 +import org.jeecg.common.exception.JeecgBootException;
6 7 import org.jeecg.modules.wms.api.acs.entity.AgvEntity;
7 8 import org.jeecg.modules.wms.api.acs.service.IAcsService;
8 9 import org.jeecg.modules.wms.config.address.service.IAddressService;
... ... @@ -16,7 +17,6 @@ import org.jeecg.utils.constant.QuantityConstant;
16 17 import org.springframework.stereotype.Service;
17 18  
18 19 import com.alibaba.fastjson.JSON;
19   -import com.aliyun.oss.ServiceException;
20 20  
21 21 @Service
22 22 public class AcsServiceImpl implements IAcsService {
... ... @@ -61,7 +61,7 @@ public class AcsServiceImpl implements IAcsService {
61 61 agvTask.setPreTaskNo(preTaskNo);
62 62 boolean success = agvTaskService.updateById(agvTask);
63 63 if (!success) {
64   - throw new ServiceException("更新Agv任务状态失败");
  64 + throw new JeecgBootException("更新Agv任务状态失败");
65 65 }
66 66 AgvEntity agvEntity = new AgvEntity();
67 67 agvEntity.setTaskNo(agvTask.getId());
... ... @@ -77,7 +77,7 @@ public class AcsServiceImpl implements IAcsService {
77 77 System.out.println(jsonParam);
78 78 String body = OkHttpUtils.sendPostByJsonStr(url, jsonParam);
79 79 if (StringUtils.isEmpty(body)) {
80   - throw new ServiceException("接口地址错误或返回为空");
  80 + throw new JeecgBootException("接口地址错误或返回为空");
81 81 }
82 82 Result result = JSON.parseObject(body, Result.class);
83 83 if (result.getCode() != QuantityConstant.HTTP_OK) {
... ... @@ -94,7 +94,7 @@ public class AcsServiceImpl implements IAcsService {
94 94 String jsonParam = JSON.toJSONString(agvEntity);
95 95 String body = OkHttpUtils.sendPostByJsonStr(url, jsonParam);
96 96 if (StringUtils.isEmpty(body)) {
97   - throw new ServiceException("接口地址错误或返回为空");
  97 + throw new JeecgBootException("接口地址错误或返回为空");
98 98 }
99 99 Result result = JSON.parseObject(body, Result.class);
100 100 if (result.getCode() != QuantityConstant.HTTP_OK) {
... ... @@ -112,7 +112,7 @@ public class AcsServiceImpl implements IAcsService {
112 112 String jsonParam = JSON.toJSONString(agvEntity);
113 113 String body = OkHttpUtils.sendPostByJsonStr(url, jsonParam);
114 114 if (StringUtils.isEmpty(body)) {
115   - throw new ServiceException("接口地址错误或返回为空");
  115 + throw new JeecgBootException("接口地址错误或返回为空");
116 116 }
117 117 Result result = JSON.parseObject(body, Result.class);
118 118 if (result.getCode() != QuantityConstant.HTTP_OK) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/erp/service/impl/ErpServiceImpl.java
... ... @@ -38,7 +38,7 @@ import org.springframework.stereotype.Service;
38 38 import org.springframework.transaction.annotation.Transactional;
39 39  
40 40 import com.alibaba.fastjson.JSON;
41   -import com.aliyun.oss.ServiceException;
  41 +import org.jeecg.common.exception.JeecgBootException;
42 42 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
43 43 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
44 44  
... ... @@ -124,7 +124,7 @@ public class ErpServiceImpl implements IErpService {
124 124 receiptHeader.setRemark(remark);
125 125 Result result = receiptHeaderService.saveReceiptHeader(receiptHeader);
126 126 if (!result.isSuccess()) {
127   - throw new ServiceException("创建入库单头失败" + result.getMessage());
  127 + throw new JeecgBootException("创建入库单头失败" + result.getMessage());
128 128 }
129 129 for (ErpReceiptDetail erpReceiptDetail : erpReceiptDetailList) {
130 130 BigDecimal qty = erpReceiptDetail.getQty();
... ... @@ -137,13 +137,13 @@ public class ErpServiceImpl implements IErpService {
137 137 String lot = erpReceiptDetail.getLot();
138 138 String project = erpReceiptDetail.getProject();
139 139 if (StringUtils.isEmpty(materialCode)) {
140   - throw new ServiceException("入库单下发, 物料编码为空");
  140 + throw new JeecgBootException("入库单下发, 物料编码为空");
141 141 }
142 142 if (StringUtils.isEmpty(inventoryStatus)) {
143 143 inventoryStatus = QuantityConstant.QUALITY_GOOD;
144 144 }
145 145 if (qty.compareTo(BigDecimal.ZERO) <= 0) {
146   - throw new ServiceException("入库单下发, 单据数量必须大于0");
  146 + throw new JeecgBootException("入库单下发, 单据数量必须大于0");
147 147 }
148 148 ReceiptDetail receiptDetail = new ReceiptDetail();
149 149 receiptDetail.setWarehouseCode(warehouseCode);
... ... @@ -164,7 +164,7 @@ public class ErpServiceImpl implements IErpService {
164 164 material.setEnable(QuantityConstant.STATUS_ENABLE);
165 165 success = materialService.save(material);
166 166 if (!success) {
167   - throw new ServiceException("入库单下发, 保存物料失败");
  167 + throw new JeecgBootException("入库单下发, 保存物料失败");
168 168 }
169 169 }
170 170 receiptDetail.setInventoryStatus(inventoryStatus);
... ... @@ -177,12 +177,12 @@ public class ErpServiceImpl implements IErpService {
177 177 receiptDetail.setProject(project);
178 178 success = receiptDetailService.save(receiptDetail);
179 179 if (!success) {
180   - throw new ServiceException("入库单下发, 保存入库单详情失败");
  180 + throw new JeecgBootException("入库单下发, 保存入库单详情失败");
181 181 }
182 182 }
183 183 success = receiptHeaderService.updateReceiptHeader(receiptHeader.getId());
184 184 if (!success) {
185   - throw new ServiceException("入库单下发, 更新入库单失败");
  185 + throw new JeecgBootException("入库单下发, 更新入库单失败");
186 186 }
187 187 return Result.OK("入库单下发成功");
188 188 }
... ... @@ -261,7 +261,7 @@ public class ErpServiceImpl implements IErpService {
261 261 shipmentHeader.setRemark(remark);
262 262 Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader);
263 263 if (!result.isSuccess()) {
264   - throw new ServiceException("创建出库单头失败" + result.getMessage());
  264 + throw new JeecgBootException("创建出库单头失败" + result.getMessage());
265 265 }
266 266  
267 267 for (ErpShipmentDetail erpShipmentDetail : erpShipmentDetailList) {
... ... @@ -272,13 +272,13 @@ public class ErpServiceImpl implements IErpService {
272 272 String lot = erpShipmentDetail.getLot();
273 273 String project = erpShipmentDetail.getProject();
274 274 if (StringUtils.isEmpty(materialCode)) {
275   - throw new ServiceException("出库单下发, 物料编码为空");
  275 + throw new JeecgBootException("出库单下发, 物料编码为空");
276 276 }
277 277 if (StringUtils.isEmpty(inventoryStatus)) {
278 278 inventoryStatus = QuantityConstant.QUALITY_GOOD;
279 279 }
280 280 if (qty.compareTo(BigDecimal.ZERO) <= 0) {
281   - throw new ServiceException("出库单下发, 单据数量必须大于0");
  281 + throw new JeecgBootException("出库单下发, 单据数量必须大于0");
282 282 }
283 283 ShipmentDetail shipmentDetail = new ShipmentDetail();
284 284 shipmentDetail.setWarehouseCode(warehouseCode);
... ... @@ -289,7 +289,7 @@ public class ErpServiceImpl implements IErpService {
289 289 shipmentDetail.setQty(qty);
290 290 Material material = materialService.getMaterialByCode(materialCode);
291 291 if (material == null) {
292   - throw new ServiceException("出库单下发, 没有找到物料信息" + materialCode);
  292 + throw new JeecgBootException("出库单下发, 没有找到物料信息" + materialCode);
293 293 }
294 294 shipmentDetail.setInventoryStatus(inventoryStatus);
295 295 shipmentDetail.setMaterialCode(materialCode);
... ... @@ -301,12 +301,12 @@ public class ErpServiceImpl implements IErpService {
301 301 shipmentDetail.setProject(project);
302 302 boolean success = shipmentDetailService.save(shipmentDetail);
303 303 if (!success) {
304   - throw new ServiceException("出库单下发, 保存入库单详情失败");
  304 + throw new JeecgBootException("出库单下发, 保存入库单详情失败");
305 305 }
306 306 }
307 307 boolean success = shipmentHeaderService.updateShipmentHeader(shipmentHeader.getId());
308 308 if (!success) {
309   - throw new ServiceException("出库单下发, 更新入库单失败");
  309 + throw new JeecgBootException("出库单下发, 更新入库单失败");
310 310 }
311 311 return Result.OK("出库单下发成功");
312 312 }
... ... @@ -393,7 +393,7 @@ public class ErpServiceImpl implements IErpService {
393 393 BeanUtils.copyProperties(erpMaterial, material);
394 394 boolean success = materialService.save(material);
395 395 if (!success) {
396   - throw new ServiceException("增加物料失败, 保存时报错");
  396 + throw new JeecgBootException("增加物料失败, 保存时报错");
397 397 }
398 398 return Result.ok("增加物料成功");
399 399 }
... ... @@ -415,7 +415,7 @@ public class ErpServiceImpl implements IErpService {
415 415 System.out.println(jsonParam);
416 416 String body = OkHttpUtils.sendPostByJsonStr(url, jsonParam);
417 417 if (StringUtils.isEmpty(body)) {
418   - throw new ServiceException("接口地址错误或返回为空");
  418 + throw new JeecgBootException("接口地址错误或返回为空");
419 419 }
420 420 Result result = JSON.parseObject(body, Result.class);
421 421 if (result.getCode() != QuantityConstant.HTTP_OK) {
... ... @@ -429,7 +429,7 @@ public class ErpServiceImpl implements IErpService {
429 429 receiptHeader.setLastStatus(QuantityConstant.RECEIPT_HEADER_RETURN);
430 430 boolean success = receiptHeaderService.updateById(receiptHeader);
431 431 if (!success) {
432   - throw new ServiceException("回传入库单失败, 更新入库单头失败");
  432 + throw new JeecgBootException("回传入库单失败, 更新入库单头失败");
433 433 }
434 434 receiptHeaderService.delMain(receiptHeader.getId().toString(), QuantityConstant.BACK_DELETE_RECEIPT);
435 435 return Result.ok("回传入库单成功");
... ... @@ -452,7 +452,7 @@ public class ErpServiceImpl implements IErpService {
452 452 System.out.println(jsonParam);
453 453 String body = OkHttpUtils.sendPostByJsonStr(url, jsonParam);
454 454 if (StringUtils.isEmpty(body)) {
455   - throw new ServiceException("接口地址错误或返回为空");
  455 + throw new JeecgBootException("接口地址错误或返回为空");
456 456 }
457 457 Result result = JSON.parseObject(body, Result.class);
458 458 if (result.getCode() != QuantityConstant.HTTP_OK) {
... ... @@ -462,7 +462,7 @@ public class ErpServiceImpl implements IErpService {
462 462 shipmentHeader.setLastStatus(QuantityConstant.SHIPMENT_HEADER_RETURN);
463 463 boolean success = shipmentHeaderService.updateById(shipmentHeader);
464 464 if (!success) {
465   - throw new ServiceException("回传出库单失败, 更新出库单头失败");
  465 + throw new JeecgBootException("回传出库单失败, 更新出库单头失败");
466 466 }
467 467 return Result.ok("回传出库单成功");
468 468 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java
... ... @@ -42,7 +42,7 @@ import org.springframework.stereotype.Service;
42 42 import org.springframework.transaction.annotation.Transactional;
43 43  
44 44 import com.alibaba.fastjson.JSON;
45   -import com.aliyun.oss.ServiceException;
  45 +import org.jeecg.common.exception.JeecgBootException;
46 46 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
47 47  
48 48 /**
... ... @@ -136,16 +136,16 @@ public class MesServiceImpl implements IMesService {
136 136 }
137 137 Result result = receiveService.receiving(receiveList, warehouseCode);
138 138 if (!result.isSuccess()) {
139   - throw new ServiceException(result.getMessage());
  139 + throw new JeecgBootException(result.getMessage());
140 140 }
141 141 ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getUnCompleteReceiptContainerByCode(containerCode, warehouseCode);
142 142 if (receiptContainerHeader == null) {
143   - throw new ServiceException(result.getMessage());
  143 + throw new JeecgBootException(result.getMessage());
144 144 }
145 145 receiptContainerHeader.setToPort(toPort);
146 146 boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader);
147 147 if (!success) {
148   - throw new ServiceException("MES下发入库信息,更新入库组盘头失败");
  148 + throw new JeecgBootException("MES下发入库信息,更新入库组盘头失败");
149 149 }
150 150 return receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode);
151 151 }
... ... @@ -194,15 +194,15 @@ public class MesServiceImpl implements IMesService {
194 194 BigDecimal shipQty = mesShipmentDetail.getShipQty();
195 195 Result result = shipmentCombinationService.autoCombinationDetail(shipmentDetail, shipQty);
196 196 if (!result.isSuccess()) {
197   - throw new ServiceException("MES下发出库信息," + result.getMessage());
  197 + throw new JeecgBootException("MES下发出库信息," + result.getMessage());
198 198 }
199 199 }
200 200 if (mesShipmentDetailList.size() == 0) {
201   - throw new ServiceException("MES下发出库信息为空");
  201 + throw new JeecgBootException("MES下发出库信息为空");
202 202 }
203 203 List<ShipmentContainerDetail> shipmentContainerDetailList = shipmentContainerDetailService.getShipmentContainerDetailListByShipmentCode(shipmentCode);
204 204 if (shipmentContainerDetailList == null) {
205   - throw new ServiceException("MES下发出库信息, 没有找到出库配盘详情");
  205 + throw new JeecgBootException("MES下发出库信息, 没有找到出库配盘详情");
206 206 }
207 207 List<Integer> shipmentContainerIdList =
208 208 shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).distinct().collect(Collectors.toList());
... ... @@ -213,16 +213,16 @@ public class MesServiceImpl implements IMesService {
213 213 sequence++;
214 214 ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(shipmentContainerId);
215 215 if (shipmentContainerHeader == null) {
216   - throw new ServiceException("MES下发出库信息,没有找到出库表头:" + shipmentContainerId);
  216 + throw new JeecgBootException("MES下发出库信息,没有找到出库表头:" + shipmentContainerId);
217 217 }
218 218 shipmentContainerHeader.setToPort(toPort);
219 219 boolean success = shipmentContainerHeaderService.updateById(shipmentContainerHeader);
220 220 if (!success) {
221   - throw new ServiceException("MES下发出库信息,更新出库组盘头失败");
  221 + throw new JeecgBootException("MES下发出库信息,更新出库组盘头失败");
222 222 }
223 223 Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, warehouseCode, shipmentOrder, sequence, sequenceNumber);
224 224 if (!result.isSuccess()) {
225   - throw new ServiceException(result.getMessage());
  225 + throw new JeecgBootException(result.getMessage());
226 226 }
227 227 }
228 228 return Result.OK("MES下发出库信息成功");
... ... @@ -246,7 +246,7 @@ public class MesServiceImpl implements IMesService {
246 246 taskHeader.setBackMesTimestamp(backMesTimeStamp);
247 247 boolean success = taskHeaderService.updateById(taskHeader);
248 248 if (!success) {
249   - throw new ServiceException("回传入库信息失败,更新任务时间戳失败");
  249 + throw new JeecgBootException("回传入库信息失败,更新任务时间戳失败");
250 250 }
251 251 }
252 252  
... ... @@ -256,7 +256,7 @@ public class MesServiceImpl implements IMesService {
256 256 int receiptDetailId = taskDetail.getReceiptDetailId();
257 257 ReceiptDetail receiptDetail = receiptDetailService.getById(receiptDetailId);
258 258 if (receiptDetail == null) {
259   - throw new ServiceException("回传入库信息失败,没有找到入库单详情");
  259 + throw new JeecgBootException("回传入库信息失败,没有找到入库单详情");
260 260 }
261 261 String materialCode = receiptDetail.getMaterialCode();
262 262 BigDecimal qty = taskDetail.getQty();
... ... @@ -276,16 +276,16 @@ public class MesServiceImpl implements IMesService {
276 276 System.out.println(jsonParam);
277 277 String body = OkHttpUtils.sendPostByJsonStr(url, jsonParam);
278 278 if (StringUtils.isEmpty(body)) {
279   - throw new ServiceException("接口地址错误或返回为空");
  279 + throw new JeecgBootException("接口地址错误或返回为空");
280 280 }
281 281 Result result = JSON.parseObject(body, Result.class);
282 282 if (result.getCode() != QuantityConstant.HTTP_OK) {
283   - throw new ServiceException(result.getMessage());
  283 + throw new JeecgBootException(result.getMessage());
284 284 }
285 285 taskHeader.setBackMes(QuantityConstant.MES_SEND_OK);
286 286 boolean success = taskHeaderService.updateById(taskHeader);
287 287 if (!success) {
288   - throw new ServiceException("回传入库信息失败,更新任务失败");
  288 + throw new JeecgBootException("回传入库信息失败,更新任务失败");
289 289 }
290 290 return Result.ok("回传MES入库信息成功");
291 291 }
... ... @@ -310,7 +310,7 @@ public class MesServiceImpl implements IMesService {
310 310 taskHeader.setBackMesTimestamp(backMesTimeStamp);
311 311 boolean success = taskHeaderService.updateById(taskHeader);
312 312 if (!success) {
313   - throw new ServiceException("回传出库信息失败,更新任务时间戳失败");
  313 + throw new JeecgBootException("回传出库信息失败,更新任务时间戳失败");
314 314 }
315 315 }
316 316  
... ... @@ -320,7 +320,7 @@ public class MesServiceImpl implements IMesService {
320 320 int shipmentDetailId = taskDetail.getShipmentDetailId();
321 321 ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentDetailId);
322 322 if (shipmentDetail == null) {
323   - throw new ServiceException("回传出库信息失败,没有找到出库单详情");
  323 + throw new JeecgBootException("回传出库信息失败,没有找到出库单详情");
324 324 }
325 325 String materialCode = shipmentDetail.getMaterialCode();
326 326 BigDecimal qty = taskDetail.getQty();
... ... @@ -338,18 +338,18 @@ public class MesServiceImpl implements IMesService {
338 338 taskHeader.setBackMes(QuantityConstant.MES_SEND_OK);
339 339 boolean success = taskHeaderService.updateById(taskHeader);
340 340 if (!success) {
341   - throw new ServiceException("回传出库信息失败,更新任务失败");
  341 + throw new JeecgBootException("回传出库信息失败,更新任务失败");
342 342 }
343 343 String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_MES_BACK_SHIPMENT);
344 344 String jsonParam = JSON.toJSONString(mesBackShipmentList);
345 345 System.out.println(jsonParam);
346 346 String body = OkHttpUtils.sendPostByJsonStr(url, jsonParam);
347 347 if (StringUtils.isEmpty(body)) {
348   - throw new ServiceException("接口地址错误或返回为空");
  348 + throw new JeecgBootException("接口地址错误或返回为空");
349 349 }
350 350 Result result = JSON.parseObject(body, Result.class);
351 351 if (result.getCode() != QuantityConstant.HTTP_OK) {
352   - throw new ServiceException(result.getMessage());
  352 + throw new JeecgBootException(result.getMessage());
353 353 }
354 354 return Result.ok("回传出库信息成功");
355 355 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java
... ... @@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
24 24 import org.springframework.stereotype.Service;
25 25 import org.springframework.transaction.annotation.Transactional;
26 26  
27   -import com.aliyun.oss.ServiceException;
  27 +import org.jeecg.common.exception.JeecgBootException;
28 28  
29 29 import java.util.ArrayList;
30 30 import java.util.List;
... ... @@ -119,7 +119,7 @@ public class MobileService implements IMobileService {
119 119 // 锁定库位状态
120 120 locationService.updateStatus(loc.getCode(), QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
121 121 } else {
122   - throw new ServiceException("补充入库主表生成失败!");
  122 + throw new JeecgBootException("补充入库主表生成失败!");
123 123 }
124 124  
125 125 return Result.OK("呼叫料盒成功", taskHeader);
... ... @@ -151,7 +151,7 @@ public class MobileService implements IMobileService {
151 151 if (rs1.isSuccess()) {
152 152 receiptHeader = rs1.getResult();
153 153 } else {
154   - throw new ServiceException(rs1.getMessage());
  154 + throw new JeecgBootException(rs1.getMessage());
155 155 }
156 156  
157 157 List<Receive> receiveList = new ArrayList<>();
... ... @@ -159,7 +159,7 @@ public class MobileService implements IMobileService {
159 159 d.setReceiptId(receiptHeader.getId());
160 160 Result rs2 = receiptDetailService.saveReceiptDetail(d);
161 161 if(!rs2.isSuccess()) {
162   - throw new ServiceException(rs2.getMessage());
  162 + throw new JeecgBootException(rs2.getMessage());
163 163 }
164 164 Receive v = new Receive();
165 165 v.setId(d.getId());
... ... @@ -179,7 +179,7 @@ public class MobileService implements IMobileService {
179 179 if(rs3.isSuccess()) {
180 180 return rs3;
181 181 }else{
182   - throw new ServiceException(rs3.getMessage());
  182 + throw new JeecgBootException(rs3.getMessage());
183 183 }
184 184 }
185 185 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
1 1 package org.jeecg.modules.wms.api.wcs.service;
2 2  
3   -import com.aliyun.oss.ServiceException;
  3 +import org.jeecg.common.exception.JeecgBootException;
4 4 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5 5 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 6 import org.jeecg.modules.wms.config.container.entity.Container;
... ... @@ -56,15 +56,15 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
56 56 String containerCode, String materialAreaCode) {
57 57 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
58 58 if (container == null) {
59   - throw new ServiceException("分配库位时,容器为空");
  59 + throw new JeecgBootException("分配库位时,容器为空");
60 60 }
61 61 ContainerType containerType = containerTypeService.getContainerTypeByCode(container.getContainerTypeCode(), warehouseCode);
62 62 if (containerType == null) {
63   - throw new ServiceException("分配库位时,容器类型为空");
  63 + throw new JeecgBootException("分配库位时,容器类型为空");
64 64 }
65 65 String locationType = containerType.getLocationType();
66 66 if (StringUtils.isEmpty(locationType)) {
67   - throw new ServiceException("分配库位时,库位类型为空");
  67 + throw new JeecgBootException("分配库位时,库位类型为空");
68 68 }
69 69 List<LocationType> locationTypeList = new ArrayList<>();
70 70 String[] list = locationType.split(",");
... ... @@ -123,7 +123,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
123 123 roadWays.removeAll(removeRoadWays);
124 124 Collections.shuffle(roadWays);
125 125 if (roadWays == null || roadWays.size() == 0) {
126   - throw new ServiceException("分配库位时, 巷道为空");
  126 + throw new JeecgBootException("分配库位时, 巷道为空");
127 127 }
128 128 Integer roadWay = roadWays.get(0);
129 129 // 优先找外侧库位
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... ... @@ -42,7 +42,7 @@ import org.springframework.stereotype.Service;
42 42 import org.springframework.transaction.annotation.Transactional;
43 43  
44 44 import com.alibaba.fastjson.JSON;
45   -import com.aliyun.oss.ServiceException;
  45 +import org.jeecg.common.exception.JeecgBootException;
46 46 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
47 47 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
48 48  
... ... @@ -169,12 +169,12 @@ public class WcsServiceImpl implements WcsService {
169 169  
170 170 boolean success = locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
171 171 if (!success) {
172   - throw new ServiceException("分配库位时,更新库位状态失败");
  172 + throw new JeecgBootException("分配库位时,更新库位状态失败");
173 173 }
174 174 if (StringUtils.isNotEmpty(taskHeader.getToLocationCode()) && !locationCode.equals(taskHeader.getToLocationCode())) {
175 175 success = locationService.updateStatus(taskHeader.getToLocationCode(), QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
176 176 if (!success) {
177   - throw new ServiceException("分配库位时,更新之前分配的库位状态失败");
  177 + throw new JeecgBootException("分配库位时,更新之前分配的库位状态失败");
178 178 }
179 179 }
180 180  
... ... @@ -196,7 +196,7 @@ public class WcsServiceImpl implements WcsService {
196 196 ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId());
197 197 receiptContainerHeader.setToLocationCode(locationCode);
198 198 if (!receiptContainerHeaderService.updateById(receiptContainerHeader)) {
199   - throw new ServiceException("分配库位时,更新入库组盘的库位号失败");
  199 + throw new JeecgBootException("分配库位时,更新入库组盘的库位号失败");
200 200 }
201 201 }
202 202 }
... ... @@ -212,11 +212,11 @@ public class WcsServiceImpl implements WcsService {
212 212 if (StringUtils.isNotEmpty(insideLocation.getContainerCode())) {
213 213 Location destinationLocation = locationService.getEmptyLocation(insideLocation);
214 214 if (destinationLocation == null) {
215   - throw new ServiceException("创建移库任务失败, 目标库位为空");
  215 + throw new JeecgBootException("创建移库任务失败, 目标库位为空");
216 216 }
217 217 Result result = taskHeaderService.createTransferTask(insideLocation.getCode(), destinationLocation.getCode(), warehouseCode);
218 218 if (!result.isSuccess()) {
219   - throw new ServiceException("创建移库任务失败");
  219 + throw new JeecgBootException("创建移库任务失败");
220 220 }
221 221 return Result.ok("移库任务先执行");
222 222 }
... ... @@ -235,7 +235,7 @@ public class WcsServiceImpl implements WcsService {
235 235 taskHeader.setWeight(Integer.parseInt(warecellDomain.getWeight()));
236 236 taskHeader.setToLocationCode(locationCode);
237 237 if (!taskHeaderService.updateById(taskHeader)) {
238   - throw new ServiceException("更新任务头表目标库位失败");
  238 + throw new JeecgBootException("更新任务头表目标库位失败");
239 239 }
240 240  
241 241 WcsTask wcsTask = new WcsTask();
... ... @@ -385,12 +385,12 @@ public class WcsServiceImpl implements WcsService {
385 385 wcsTask.setRemark(QuantityConstant.EMPTY_STRING);
386 386 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
387 387 if (container == null) {
388   - throw new ServiceException("下发任务时,容器没有找到");
  388 + throw new JeecgBootException("下发任务时,容器没有找到");
389 389 }
390 390  
391 391 String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_CONNECT_WCS);
392 392 if (StringUtils.isEmpty(value)) {
393   - throw new ServiceException("下发任务时,没有找到连接WCS的数据配置");
  393 + throw new JeecgBootException("下发任务时,没有找到连接WCS的数据配置");
394 394 }
395 395 int connectWCS = Integer.parseInt(value);
396 396 if (connectWCS == QuantityConstant.RULE_WCS_CONNECT) {
... ... @@ -400,7 +400,7 @@ public class WcsServiceImpl implements WcsService {
400 400 System.out.println(jsonParam);
401 401 String body = OkHttpUtils.sendPostByJsonStr(url, jsonParam);
402 402 if (StringUtils.isEmpty(body)) {
403   - throw new ServiceException("接口地址错误或返回为空");
  403 + throw new JeecgBootException("接口地址错误或返回为空");
404 404 }
405 405 Result result = JSON.parseObject(body, Result.class);
406 406 if (result.getCode() != QuantityConstant.HTTP_OK) {
... ... @@ -440,7 +440,7 @@ public class WcsServiceImpl implements WcsService {
440 440 wcsTask.setTaskType(1000);
441 441 break;
442 442 default:
443   - throw new ServiceException("不支持的任务类型");
  443 + throw new JeecgBootException("不支持的任务类型");
444 444  
445 445 }
446 446 return wcsTask;
... ... @@ -557,13 +557,13 @@ public class WcsServiceImpl implements WcsService {
557 557 receiptContainerHeader.setToLocationCode(locationCode);
558 558 boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader);
559 559 if (!success) {
560   - throw new ServiceException("重入处理失败, 更新入库组盼头失败");
  560 + throw new JeecgBootException("重入处理失败, 更新入库组盼头失败");
561 561 }
562 562 }
563 563 // 6. 锁定WMS分配的库位
564 564 boolean success = locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
565 565 if (!success) {
566   - throw new ServiceException("重入处理失败, 更新库位状态失败");
  566 + throw new JeecgBootException("重入处理失败, 更新库位状态失败");
567 567 }
568 568 String originLocationCode = taskHeader.getOriginLocationCode();
569 569 String taskLocationCode = taskHeader.getToLocationCode();
... ... @@ -582,7 +582,7 @@ public class WcsServiceImpl implements WcsService {
582 582 // 8. 更新任务信息
583 583 success = taskHeaderService.updateById(taskHeader);
584 584 if (!success) {
585   - throw new ServiceException("重入处理失败, 更新任务信息失败");
  585 + throw new JeecgBootException("重入处理失败, 更新任务信息失败");
586 586 }
587 587  
588 588 // 9. 封装返回的数据格式,包括任务号和重新分配的库位号
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java
... ... @@ -12,7 +12,7 @@ import javax.annotation.Resource;
12 12 import javax.servlet.http.HttpServletRequest;
13 13 import javax.servlet.http.HttpServletResponse;
14 14  
15   -import com.aliyun.oss.ServiceException;
  15 +import org.jeecg.common.exception.JeecgBootException;
16 16 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
17 17 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
18 18 import org.apache.shiro.authz.annotation.RequiresPermissions;
... ... @@ -119,12 +119,12 @@ public class ContainerController extends JeecgController&lt;Container, IContainerSe
119 119 if (StringUtils.isNotEmpty(locationCode)) {
120 120 Location location = locationService.getLocationByCode(locationCode, container.getWarehouseCode());
121 121 if (location == null) {
122   - throw new ServiceException("编辑的库位号不存在");
  122 + throw new JeecgBootException("编辑的库位号不存在");
123 123 }
124 124 }
125 125 boolean success = containerService.updateById(container);
126 126 if (!success) {
127   - throw new ServiceException("编辑失败");
  127 + throw new JeecgBootException("编辑失败");
128 128 }
129 129 return Result.OK("编辑成功!");
130 130 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... ... @@ -17,7 +17,7 @@ import org.jeecg.utils.constant.QuantityConstant;
17 17 import org.springframework.stereotype.Service;
18 18 import org.springframework.transaction.annotation.Transactional;
19 19  
20   -import com.aliyun.oss.ServiceException;
  20 +import org.jeecg.common.exception.JeecgBootException;
21 21 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
22 22 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
23 23 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -102,7 +102,7 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container
102 102 if (StringUtils.isNotEmpty(locationCode)) {
103 103 success = havaLocationCodeByContainer(locationCode, warehouseCode);
104 104 if (success) {
105   - throw new ServiceException("容器表已经存在这个库位号,不能再写入");
  105 + throw new JeecgBootException("容器表已经存在这个库位号,不能再写入");
106 106 }
107 107 }
108 108 container.setStatus(status);
... ... @@ -119,7 +119,7 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container
119 119 container.setWarehouseCode(warehouseCode);
120 120 container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY);
121 121 if (!save(container)) {
122   - throw new ServiceException("新增容器失败");
  122 + throw new JeecgBootException("新增容器失败");
123 123 }
124 124 return container;
125 125 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java
... ... @@ -24,7 +24,7 @@ import org.jeecg.utils.constant.QuantityConstant;
24 24 import org.springframework.stereotype.Service;
25 25 import org.springframework.transaction.annotation.Transactional;
26 26  
27   -import com.aliyun.oss.ServiceException;
  27 +import org.jeecg.common.exception.JeecgBootException;
28 28 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
29 29 import com.baomidou.mybatisplus.core.metadata.IPage;
30 30 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
... ... @@ -98,7 +98,7 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
98 98 if (StringUtils.isNotEmpty(containerCode)) {
99 99 success = havaContainerCodeInLocation(containerCode, warehouseCode);
100 100 if (success) {
101   - throw new ServiceException("库位表已经存在这个容器号,不能再写入");
  101 + throw new JeecgBootException("库位表已经存在这个容器号,不能再写入");
102 102 }
103 103 }
104 104 location.setContainerCode(containerCode);
... ... @@ -330,7 +330,7 @@ public class LocationServiceImpl extends ServiceImpl&lt;LocationMapper, Location&gt; i
330 330  
331 331 boolean success = saveBatch(locationList);
332 332 if (!success) {
333   - throw new ServiceException("批量增加库位失败");
  333 + throw new JeecgBootException("批量增加库位失败");
334 334 }
335 335 return Result.ok("批量增加库位成功");
336 336 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/aspectj/ApiLoggerAspect.java
... ... @@ -471,9 +471,11 @@ public class ApiLoggerAspect {
471 471 // Class type = m.getParameterTypes()[i];
472 472 if (args[i] instanceof HttpServletRequest) {
473 473 continue;
474   - } else {
475   - map.put(name, args[i]);
476 474 }
  475 + if (args[i] instanceof HttpServletResponse) {
  476 + continue;
  477 + }
  478 + map.put(name, args[i]);
477 479 }
478 480  
479 481 if (!map.isEmpty()) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
... ... @@ -33,7 +33,7 @@ import org.springframework.stereotype.Service;
33 33 import org.springframework.transaction.annotation.Transactional;
34 34  
35 35 import com.alibaba.fastjson.JSON;
36   -import com.aliyun.oss.ServiceException;
  36 +import org.jeecg.common.exception.JeecgBootException;
37 37 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
38 38 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
39 39 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -97,7 +97,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
97 97 }
98 98  
99 99 @Override
100   - @Transactional(rollbackFor = ServiceException.class)
  100 + @Transactional(rollbackFor = JeecgBootException.class)
101 101 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务生成'", extra = "#extraJsonString1", msg = "'任务ID:' + #taskHeader.getId()",
102 102 condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true)
103 103 @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务生成'", extra = "#extraJsonString2",
... ... @@ -119,40 +119,40 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
119 119 }
120 120 boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode);
121 121 if (!success) {
122   - throw new ServiceException("更新容器状态失败");
  122 + throw new JeecgBootException("更新容器状态失败");
123 123 }
124 124 String fromLocationCode = receiptContainerHeader.getFromLocationCode();
125 125 String toLocaitonCode = receiptContainerHeader.getToLocationCode();
126 126 if (StringUtils.isNotEmpty(fromLocationCode)) {
127 127 success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
128 128 if (!success) {
129   - throw new ServiceException("更新起始库位状态失败");
  129 + throw new JeecgBootException("更新起始库位状态失败");
130 130 }
131 131 }
132 132 String zoneCode = null;
133 133 if (StringUtils.isNotEmpty(toLocaitonCode)) {
134 134 success = locationService.updateStatus(toLocaitonCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
135 135 if (!success) {
136   - throw new ServiceException("更新目标库位状态失败");
  136 + throw new JeecgBootException("更新目标库位状态失败");
137 137 }
138 138 Location toLocation = locationService.getLocationByCode(toLocaitonCode, warehouseCode);
139 139 if (!toLocation.getWarehouseCode().equals(warehouseCode)) {
140   - throw new ServiceException("库位对应的仓库不匹配");
  140 + throw new JeecgBootException("库位对应的仓库不匹配");
141 141 }
142 142 zoneCode = toLocation.getZoneCode();
143 143 // 旁边库位有任务
144 144 if (taskHeaderService.haveUncompleteTaskInNear(toLocation)) {
145   - throw new ServiceException("旁边库位任务数大于0");
  145 + throw new JeecgBootException("旁边库位任务数大于0");
146 146 }
147 147 }
148 148 int receiptContainerStatus = receiptContainerHeader.getStatus();
149 149 if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_BUILD) {
150   - throw new ServiceException("入库组盘状态不是创建状态");
  150 + throw new JeecgBootException("入库组盘状态不是创建状态");
151 151 }
152 152 receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK);
153 153 success = receiptContainerHeaderService.updateById(receiptContainerHeader);
154 154 if (!success) {
155   - throw new ServiceException("更新入库组盘头状态失败");
  155 + throw new JeecgBootException("更新入库组盘头状态失败");
156 156 }
157 157 TaskHeader taskHeader = new TaskHeader();
158 158 taskHeader.setContainerCode(containerCode);
... ... @@ -168,7 +168,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
168 168 taskHeader.setToPortCode(receiptContainerHeader.getToPort());
169 169 success = taskHeaderService.save(taskHeader);
170 170 if (!success) {
171   - throw new ServiceException("任务生成失败");
  171 + throw new JeecgBootException("任务生成失败");
172 172 }
173 173 int taskHeaderId = taskHeader.getId();
174 174 List<TaskDetail> taskDetailList = new ArrayList<>();
... ... @@ -194,29 +194,29 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
194 194 taskDetailList.add(taskDetail);
195 195 ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId());
196 196 if (receiptDetail == null) {
197   - throw new ServiceException("根据id:" + receiptContainerDetail.getReceiptDetailId() + ",没有找到入库单详情");
  197 + throw new JeecgBootException("根据id:" + receiptContainerDetail.getReceiptDetailId() + ",没有找到入库单详情");
198 198 }
199 199 receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_WAIT_SHELF);
200 200 receiptDetailList.add(receiptDetail);
201 201 }
202 202 success = taskDetailService.saveBatch(taskDetailList);
203 203 if (!success) {
204   - throw new ServiceException("任务详情生成失败");
  204 + throw new JeecgBootException("任务详情生成失败");
205 205 }
206 206 receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK);
207 207 success = this.updateById(receiptContainerHeader);
208 208 if (!success) {
209   - throw new ServiceException("生成任务时,更新入库组盘头失败");
  209 + throw new JeecgBootException("生成任务时,更新入库组盘头失败");
210 210 }
211 211 success = receiptDetailService.updateBatchById(receiptDetailList);
212 212 if (!success) {
213   - throw new ServiceException("更新入库单明细失败");
  213 + throw new JeecgBootException("更新入库单明细失败");
214 214 }
215 215 List<Integer> receiptIdList = receiptDetailList.stream().map(ReceiptDetail::getReceiptId).distinct().collect(Collectors.toList());
216 216 for (Integer receiptId : receiptIdList) {
217 217 success = receiptHeaderService.updateReceiptHeaderStatus(receiptId);
218 218 if (!success) {
219   - throw new ServiceException("更新入库单明细失败");
  219 + throw new JeecgBootException("更新入库单明细失败");
220 220 }
221 221 }
222 222 LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集
... ... @@ -292,7 +292,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
292 292 }
293 293  
294 294 @Override
295   - @Transactional(rollbackFor = ServiceException.class)
  295 + @Transactional(rollbackFor = JeecgBootException.class)
296 296 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务取消'", extra = "#extraJsonString", msg = "'任务ID:' + #taskHeader.getId()",
297 297 condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true)
298 298 public boolean cancelReceiptTask(TaskHeader taskHeader) {
... ... @@ -302,14 +302,14 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
302 302 }
303 303 int receiptContainerStatus = receiptContainerHeader.getStatus();
304 304 if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_TASK) {
305   - throw new ServiceException("取消入库任务时, 任务状态不为生成任务状态");
  305 + throw new JeecgBootException("取消入库任务时, 任务状态不为生成任务状态");
306 306 }
307 307 receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_BUILD);
308 308 // 取消任务后,不指定组盘库位
309 309 receiptContainerHeader.setToLocationCode(QuantityConstant.EMPTY_STRING);
310 310 boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader);
311 311 if (!success) {
312   - throw new ServiceException("取消入库任务时, 更新入库组盘头失败");
  312 + throw new JeecgBootException("取消入库任务时, 更新入库组盘头失败");
313 313 }
314 314  
315 315 List<ReceiptContainerDetail> receiptContainerDetailList =
... ... @@ -318,7 +318,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
318 318 for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) {
319 319 ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId());
320 320 if (receiptDetail == null) {
321   - throw new ServiceException("取消入库任务时, 没有找到入库单详情" + receiptContainerDetail.getReceiptDetailId());
  321 + throw new JeecgBootException("取消入库任务时, 没有找到入库单详情" + receiptContainerDetail.getReceiptDetailId());
322 322 }
323 323 receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_RECEIVING);
324 324 receiptDetailList.add(receiptDetail);
... ... @@ -326,14 +326,14 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
326 326 if (receiptDetailList.size() != 0) {
327 327 success = receiptDetailService.updateBatchById(receiptDetailList);
328 328 if (!success) {
329   - throw new ServiceException("取消入库任务时, 更新入库单详情头失败");
  329 + throw new JeecgBootException("取消入库任务时, 更新入库单详情头失败");
330 330 }
331 331  
332 332 List<Integer> receiptIdList = receiptDetailList.stream().map(ReceiptDetail::getReceiptId).distinct().collect(Collectors.toList());
333 333 for (Integer receiptId : receiptIdList) {
334 334 success = receiptHeaderService.updateReceiptHeaderStatus(receiptId);
335 335 if (!success) {
336   - throw new ServiceException("更新入库单明细失败");
  336 + throw new JeecgBootException("更新入库单明细失败");
337 337 }
338 338 }
339 339 }
... ... @@ -343,7 +343,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
343 343 }
344 344  
345 345 @Override
346   - @Transactional(rollbackFor = ServiceException.class)
  346 + @Transactional(rollbackFor = JeecgBootException.class)
347 347 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情取消组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true)
348 348 public Result cancelReceiving(Integer id) {
349 349 ReceiptContainerHeader receiptContainerHeader = getById(id);
... ... @@ -359,23 +359,23 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
359 359 for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) {
360 360 ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId());
361 361 if (receiptDetail == null) {
362   - throw new ServiceException("取消组盘失败, 没有找到入库组盘详情,入库详情ID:" + receiptContainerDetail.getReceiptDetailId());
  362 + throw new JeecgBootException("取消组盘失败, 没有找到入库组盘详情,入库详情ID:" + receiptContainerDetail.getReceiptDetailId());
363 363 }
364 364 receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD);
365 365 receiptDetail.setTaskQty(receiptDetail.getTaskQty().subtract(receiptContainerDetail.getQty()));
366 366 if (!receiptDetailService.updateById(receiptDetail)) {
367   - throw new ServiceException("取消组盘失败, 更新入库明细失败,入库详情ID:" + receiptContainerDetail.getReceiptDetailId());
  367 + throw new JeecgBootException("取消组盘失败, 更新入库明细失败,入库详情ID:" + receiptContainerDetail.getReceiptDetailId());
368 368 }
369 369 if (!receiptContainerDetailService.removeById(receiptContainerDetail.getId())) {
370   - throw new ServiceException("取消组盘失败, 删除入库组盘明细表失败,组盘详情ID:" + receiptContainerDetail.getId());
  370 + throw new JeecgBootException("取消组盘失败, 删除入库组盘明细表失败,组盘详情ID:" + receiptContainerDetail.getId());
371 371 }
372 372 if (!receiptHeaderService.updateReceiptHeaderStatus(receiptDetail.getReceiptId())) {
373   - throw new ServiceException("取消组盘失败, 更新入库单头失败,入库单ID:" + receiptDetail.getReceiptId());
  373 + throw new JeecgBootException("取消组盘失败, 更新入库单头失败,入库单ID:" + receiptDetail.getReceiptId());
374 374 }
375 375 receiptDetailList.add(receiptDetail);
376 376 }
377 377 if (!this.removeById(id)) {
378   - throw new ServiceException("取消组盘失败, 删除入库组盘头表失败,组盘ID:" + id);
  378 + throw new JeecgBootException("取消组盘失败, 删除入库组盘头表失败,组盘ID:" + id);
379 379 }
380 380 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptContainerDetailList));
381 381 return Result.ok("取消组盘成功");
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptDetailServiceImpl.java
... ... @@ -21,7 +21,7 @@ import org.springframework.stereotype.Service;
21 21 import org.springframework.transaction.annotation.Transactional;
22 22  
23 23 import com.alibaba.fastjson.JSON;
24   -import com.aliyun.oss.ServiceException;
  24 +import org.jeecg.common.exception.JeecgBootException;
25 25 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
26 26  
27 27 import cn.monitor4all.logRecord.annotation.OperationLog;
... ... @@ -54,7 +54,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
54 54 public boolean save(ReceiptDetail entity) {
55 55 BigDecimal qty = entity.getQty();
56 56 if (qty.compareTo(BigDecimal.ZERO) < 0) {
57   - throw new ServiceException("单据数量不能小于0");
  57 + throw new JeecgBootException("单据数量不能小于0");
58 58 }
59 59 return super.save(entity);
60 60 }
... ... @@ -92,18 +92,18 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
92 92 receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD);
93 93 boolean success = receiptDetailService.save(receiptDetail);
94 94 if (!success) {
95   - throw new ServiceException("添加失败, 保存入库单详情的时候报错");
  95 + throw new JeecgBootException("添加失败, 保存入库单详情的时候报错");
96 96 }
97 97 success = receiptHeaderService.updateReceiptHeader(receiptDetail.getReceiptId());
98 98 if (!success) {
99   - throw new ServiceException("添加失败, 保存入库单详失败");
  99 + throw new JeecgBootException("添加失败, 保存入库单详失败");
100 100 }
101 101 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(Collections.singletonList(receiptDetail)));// 操作日志收集
102 102 return Result.OK("添加成功!");
103 103 }
104 104  
105 105 @Override
106   - @Transactional(rollbackFor = ServiceException.class)
  106 + @Transactional(rollbackFor = JeecgBootException.class)
107 107 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情删除'", extra = "#extraJsonString", msg = "''", recordReturnValue = true)
108 108 public Result removeDetailById(String id) {
109 109 ReceiptDetail receiptDetail = receiptDetailService.getById(id);
... ... @@ -123,18 +123,18 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
123 123 }
124 124 boolean success = receiptDetailService.removeById(id);
125 125 if (!success) {
126   - throw new ServiceException("删除详情失败");
  126 + throw new JeecgBootException("删除详情失败");
127 127 }
128 128 success = receiptHeaderService.updateReceiptHeader(receiptDetail.getReceiptId());
129 129 if (!success) {
130   - throw new ServiceException("更新入库单头数量失败");
  130 + throw new JeecgBootException("更新入库单头数量失败");
131 131 }
132 132 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(Collections.singletonList(receiptDetail)));// 操作日志收集
133 133 return Result.OK("删除成功!");
134 134 }
135 135  
136 136 @Override
137   - @Transactional(rollbackFor = ServiceException.class)
  137 + @Transactional(rollbackFor = JeecgBootException.class)
138 138 public Result removeDetailListById(List<String> idList) {
139 139 Result result = null;
140 140 for (String id : idList) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
... ... @@ -25,7 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
25 25 import org.springframework.stereotype.Service;
26 26 import org.springframework.transaction.annotation.Transactional;
27 27  
28   -import com.aliyun.oss.ServiceException;
  28 +import org.jeecg.common.exception.JeecgBootException;
29 29 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
30 30 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
31 31 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -67,7 +67,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
67 67 public boolean delMain(String id, String reason) {
68 68 ReceiptHeader receiptHeader = getById(id);
69 69 if (receiptHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) {
70   - throw new ServiceException("不能删除非新建状态单据");
  70 + throw new JeecgBootException("不能删除非新建状态单据");
71 71 }
72 72 receiptHeaderHistoryService.saveById(id, reason);
73 73 receiptDetailMapper.deleteByMainId(id);
... ... @@ -97,7 +97,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
97 97 }
98 98 String code = createCode(receiptHeader.getType());
99 99 if (StringUtils.isEmpty(code)) {
100   - throw new ServiceException("根据入库单据类型" + receiptHeader.getType() + "生成单号失败");
  100 + throw new JeecgBootException("根据入库单据类型" + receiptHeader.getType() + "生成单号失败");
101 101 }
102 102 receiptHeader.setCode(code);
103 103 receiptHeader.setFirstStatus(QuantityConstant.RECEIPT_HEADER_BUILD);
... ... @@ -176,7 +176,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
176 176 receiptHeader.setFirstStatus(maxStatus);
177 177 receiptHeader.setLastStatus(minStatus);
178 178 if (!receiptHeaderService.updateById(receiptHeader)) {
179   - throw new ServiceException("更新入库单:" + receiptHeader.getCode() + " 头状态失败");
  179 + throw new JeecgBootException("更新入库单:" + receiptHeader.getCode() + " 头状态失败");
180 180 }
181 181 LogRecordContext.putVariable("minStatus", minStatus);
182 182 LogRecordContext.putVariable("receiptHeader", receiptHeader);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeaderHistory/service/impl/ReceiptHeaderHistoryServiceImpl.java
... ... @@ -4,7 +4,7 @@ import java.math.BigDecimal;
4 4 import java.util.ArrayList;
5 5 import java.util.Date;
6 6  
7   -import com.aliyun.oss.ServiceException;
  7 +import org.jeecg.common.exception.JeecgBootException;
8 8 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
9 9 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail;
10 10 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
... ... @@ -110,7 +110,7 @@ public class ReceiptHeaderHistoryServiceImpl extends ServiceImpl&lt;ReceiptHeaderHi
110 110 receiptDetailHistoryList.add(receiptDetailHistory);
111 111 }
112 112 if (!receiptDetailHistoryService.saveBatch(receiptDetailHistoryList)) {
113   - throw new ServiceException("批量新增失败");
  113 + throw new JeecgBootException("批量新增失败");
114 114 }
115 115 }
116 116 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... ... @@ -32,7 +32,7 @@ import org.springframework.stereotype.Service;
32 32 import org.springframework.transaction.annotation.Transactional;
33 33  
34 34 import com.alibaba.fastjson.JSON;
35   -import com.aliyun.oss.ServiceException;
  35 +import org.jeecg.common.exception.JeecgBootException;
36 36 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
37 37 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
38 38 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -70,7 +70,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
70 70 * @return
71 71 */
72 72 @Override
73   - @Transactional(rollbackFor = ServiceException.class)
  73 + @Transactional(rollbackFor = JeecgBootException.class)
74 74 public Result<TaskHeader> receivingAndCreateTask(List<Receive> receiveList, String warehouseCode) {
75 75 Result<ReceiptContainerHeader> result = receiving(receiveList, warehouseCode);
76 76 if (result.isSuccess()) {
... ... @@ -90,7 +90,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
90 90 * 7.更新入库单状态
91 91 */
92 92 @Override
93   - @Transactional(rollbackFor = ServiceException.class)
  93 + @Transactional(rollbackFor = JeecgBootException.class)
94 94 @OperationLog(bizId = "''", bizType = "'物料追踪'", tag = "'入库组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true)
95 95 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情组盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true)
96 96 public Result<ReceiptContainerHeader> receiving(List<Receive> receiveList, String warehouseCode) {
... ... @@ -134,7 +134,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
134 134 ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getUnCompleteReceiptContainerByCode(containerCode, warehouseCode);
135 135 if (receiptContainerHeader != null) {
136 136 if (receiptContainerHeader.getStatus() >= QuantityConstant.RECEIPT_CONTAINER_TASK) {
137   - throw new ServiceException("容器已经生成任务,不能放物料了!");
  137 + throw new JeecgBootException("容器已经生成任务,不能放物料了!");
138 138 }
139 139 } else {
140 140 receiptContainerHeader = new ReceiptContainerHeader();
... ... @@ -153,7 +153,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
153 153 }
154 154 result = receiptContainerHeaderService.save(receiptContainerHeader);
155 155 if (!result) {
156   - throw new ServiceException("保存入库组盘头失败");
  156 + throw new JeecgBootException("保存入库组盘头失败");
157 157 }
158 158 }
159 159  
... ... @@ -165,38 +165,38 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
165 165 // 收货数量
166 166 BigDecimal taskQty = receive.getTaskQty();
167 167 if (qty == null || taskQty == null) {
168   - throw new ServiceException("收货数量或可收数量为空");
  168 + throw new JeecgBootException("收货数量或可收数量为空");
169 169 }
170 170 if (taskQty.compareTo(qty) > 0) {
171   - throw new ServiceException("收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty);
  171 + throw new JeecgBootException("收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty);
172 172 }
173 173 if (taskQty.compareTo(BigDecimal.ZERO) <= 0) {
174 174 continue;
175 175 }
176 176 ReceiptDetail receiptDetail = receiptDetailService.getById(receive.getId());
177 177 if (receiptDetail == null) {
178   - throw new ServiceException("没有找到入库单详情,id:" + receive.getId());
  178 + throw new JeecgBootException("没有找到入库单详情,id:" + receive.getId());
179 179 }
180 180 ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId());
181 181 if (receiptHeader == null) {
182   - throw new ServiceException("没有找到入库单,id:" + receiptDetail.getReceiptId());
  182 + throw new JeecgBootException("没有找到入库单,id:" + receiptDetail.getReceiptId());
183 183 }
184 184 if (!receiptHeader.getWarehouseCode().equals(warehouseCode)) {
185   - throw new ServiceException("仓库编码不一致,不能操作");
  185 + throw new JeecgBootException("仓库编码不一致,不能操作");
186 186 }
187 187 String materialCode = receiptDetail.getMaterialCode();
188 188 if (StringUtils.isEmpty(materialCode)) {
189   - throw new ServiceException("物料编码为空");
  189 + throw new JeecgBootException("物料编码为空");
190 190 }
191 191 Material material = materialService.getMaterialByCode(materialCode);
192 192 if (material == null) {
193   - throw new ServiceException(materialCode + "物料不存在");
  193 + throw new JeecgBootException(materialCode + "物料不存在");
194 194 }
195 195 BigDecimal receiptQty = receiptDetail.getQty();
196 196 BigDecimal receiptTaskQty = receiptDetail.getTaskQty();
197 197 receiptTaskQty = receiptTaskQty.add(taskQty);
198 198 if (receiptTaskQty.compareTo(receiptQty) > 0) {
199   - throw new ServiceException("收货数量必须小于单据数量");
  199 + throw new JeecgBootException("收货数量必须小于单据数量");
200 200 }
201 201 receiptDetail.setTaskQty(receiptTaskQty);
202 202 receiptDetailList.add(receiptDetail);
... ... @@ -236,13 +236,13 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
236 236  
237 237 result = receiptDetailService.updateBatchById(receiptDetailList);
238 238 if (!result) {
239   - throw new ServiceException("批量更新入库单详情失败");
  239 + throw new JeecgBootException("批量更新入库单详情失败");
240 240 }
241 241  
242 242 if (receiptContainerDetailList.size() > 0) {
243 243 result = receiptContainerDetailService.saveBatch(receiptContainerDetailList);
244 244 if (!result) {
245   - throw new ServiceException("保存入库组盘详情失败");
  245 + throw new JeecgBootException("保存入库组盘详情失败");
246 246 }
247 247 }
248 248 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptContainerDetailList));
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... ... @@ -40,7 +40,7 @@ import org.springframework.stereotype.Service;
40 40 import org.springframework.transaction.annotation.Transactional;
41 41  
42 42 import com.alibaba.fastjson.JSON;
43   -import com.aliyun.oss.ServiceException;
  43 +import org.jeecg.common.exception.JeecgBootException;
44 44 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
45 45 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
46 46  
... ... @@ -95,16 +95,16 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
95 95 String materialCode = shipmentDetail.getMaterialCode();
96 96 String inventoryStatus = shipmentDetail.getInventoryStatus();
97 97 if (StringUtils.isEmpty(warehouseCode)) {
98   - throw new ServiceException("寻找库存详情时,出库详情没有仓库编码");
  98 + throw new JeecgBootException("寻找库存详情时,出库详情没有仓库编码");
99 99 }
100 100 if (StringUtils.isEmpty(companyCode)) {
101   - throw new ServiceException("寻找库存详情时,出库详情没有货主编码");
  101 + throw new JeecgBootException("寻找库存详情时,出库详情没有货主编码");
102 102 }
103 103 if (StringUtils.isEmpty(materialCode)) {
104   - throw new ServiceException("寻找库存详情时, 出库详情没有物料编码");
  104 + throw new JeecgBootException("寻找库存详情时, 出库详情没有物料编码");
105 105 }
106 106 if (StringUtils.isEmpty(inventoryStatus)) {
107   - throw new ServiceException("寻找库存详情时, 出库详情没有物料品质");
  107 + throw new JeecgBootException("寻找库存详情时, 出库详情没有物料品质");
108 108 }
109 109 LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
110 110 inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getCompanyCode, companyCode)
... ... @@ -114,13 +114,13 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
114 114 }
115 115  
116 116 @Override
117   - @Transactional(rollbackFor = ServiceException.class)
  117 + @Transactional(rollbackFor = JeecgBootException.class)
118 118 public Result autoCombination(String shipmentCode, String warehouseCode) {
119 119 LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
120 120 shipmentHeaderLambdaQueryWrapper.eq(ShipmentHeader::getWarehouseCode, warehouseCode).eq(ShipmentHeader::getCode, shipmentCode);
121 121 ShipmentHeader shipmentHeader = shipmentHeaderService.getOne(shipmentHeaderLambdaQueryWrapper);
122 122 if (shipmentHeader == null) {
123   - throw new ServiceException("系统没有此单据");
  123 + throw new JeecgBootException("系统没有此单据");
124 124 }
125 125 if (shipmentHeader.getLastStatus() >= QuantityConstant.SHIPMENT_HEADER_COMPLETED) {
126 126 return Result.OK("出库单已经作业完毕");
... ... @@ -135,7 +135,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
135 135 }
136 136 Result result = shipmentCombinationService.autoCombinationDetail(shipmentDetail, null);
137 137 if (!result.isSuccess()) {
138   - throw new ServiceException(result.getMessage());
  138 + throw new JeecgBootException(result.getMessage());
139 139 }
140 140 }
141 141 if (over) {
... ... @@ -145,7 +145,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
145 145 }
146 146  
147 147 @Override
148   - @Transactional(rollbackFor = ServiceException.class)
  148 + @Transactional(rollbackFor = JeecgBootException.class)
149 149 public Result autoCombinationDetail(ShipmentDetail shipmentDetail, BigDecimal shipQty) {
150 150 // 出库数量
151 151 BigDecimal shipmentQty = shipmentDetail.getQty().subtract(shipmentDetail.getTaskQty());
... ... @@ -196,7 +196,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
196 196 break;
197 197 }
198 198 if (shipmentQty.compareTo(BigDecimal.ZERO) < 0) {
199   - throw new ServiceException("配盘时,出库数量不能小于0");
  199 + throw new JeecgBootException("配盘时,出库数量不能小于0");
200 200 }
201 201 CombinationModel combinationModel = new CombinationModel();
202 202 combinationModel.setShipmentDetail(shipmentDetail);
... ... @@ -211,14 +211,14 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
211 211 }
212 212 Result result = shipmentCombinationService.combination(combinationModel);
213 213 if (!result.isSuccess()) {
214   - throw new ServiceException(result.getMessage());
  214 + throw new JeecgBootException(result.getMessage());
215 215 }
216 216 }
217 217 return Result.OK("自动组盘成功", null);
218 218 }
219 219  
220 220 @Override
221   - @Transactional(rollbackFor = ServiceException.class)
  221 + @Transactional(rollbackFor = JeecgBootException.class)
222 222 @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情配盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true)
223 223 public Result combination(CombinationModel combinationModel) {
224 224 BigDecimal shipmentQty = combinationModel.getShipQty();
... ... @@ -280,7 +280,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
280 280 inventoryDetail.setTaskQty(inventoryDetailTaskQty);
281 281 success = inventoryDetailService.updateById(inventoryDetail);
282 282 if (!success) {
283   - throw new ServiceException("配盘时, 更新库存详情失败");
  283 + throw new JeecgBootException("配盘时, 更新库存详情失败");
284 284 }
285 285 shipmentDetailTaskQty = shipmentDetailTaskQty.add(shipmentQty);
286 286 if (shipmentDetailTaskQty.compareTo(BigDecimal.ZERO) <= 0) {
... ... @@ -296,25 +296,25 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
296 296 shipmentDetail.setTaskQty(shipmentDetailTaskQty);
297 297 success = shipmentDetailService.updateById(shipmentDetail);
298 298 if (!success) {
299   - throw new ServiceException("配盘时, 更新出库详情失败");
  299 + throw new JeecgBootException("配盘时, 更新出库详情失败");
300 300 }
301 301 ShipmentContainerHeader shipmentContainerHeader = addShipmentContainerHeader(inventoryDetail, shipmentDetail);
302 302 if (shipmentContainerHeader == null) {
303   - throw new ServiceException("配盘时, 新增出库组盘头失败");
  303 + throw new JeecgBootException("配盘时, 新增出库组盘头失败");
304 304 }
305 305 ShipmentContainerDetail shipmentContainerDetail = addShipmentContainerDetail(shipmentContainerHeader, combinationModel);
306 306 if (shipmentContainerDetail == null) {
307   - throw new ServiceException("配盘时, 新增出库组盘详情失败");
  307 + throw new JeecgBootException("配盘时, 新增出库组盘详情失败");
308 308 }
309 309 success = shipmentHeaderService.updateShipmentHeaderStatus(shipmentDetail.getShipmentId());
310 310 if (!success) {
311   - throw new ServiceException("配盘时, 更新出库单失败");
  311 + throw new JeecgBootException("配盘时, 更新出库单失败");
312 312 }
313 313 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(Collections.singletonList(shipmentContainerDetail)));
314 314 return Result.ok("配盘成功");
315 315 }
316 316  
317   - @Transactional(rollbackFor = ServiceException.class)
  317 + @Transactional(rollbackFor = JeecgBootException.class)
318 318 public ShipmentContainerHeader addShipmentContainerHeader(InventoryDetail inventoryDetail, ShipmentDetail shipmentDetail) {
319 319 String containerCode = inventoryDetail.getContainerCode();
320 320 String warehouseCode = inventoryDetail.getWarehouseCode();
... ... @@ -349,13 +349,13 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
349 349 shipmentContainerHeader.setTaskType(taskType);
350 350 boolean success = shipmentContainerHeaderService.save(shipmentContainerHeader);
351 351 if (!success) {
352   - throw new ServiceException("新增出库组盘头失败");
  352 + throw new JeecgBootException("新增出库组盘头失败");
353 353 }
354 354 return shipmentContainerHeader;
355 355 }
356 356 }
357 357  
358   - @Transactional(rollbackFor = ServiceException.class)
  358 + @Transactional(rollbackFor = JeecgBootException.class)
359 359 public ShipmentContainerDetail addShipmentContainerDetail(ShipmentContainerHeader shipmentContainerHeader, CombinationModel combinationModel) {
360 360 boolean success = false;
361 361 BigDecimal shipmentQty = combinationModel.getShipQty();
... ... @@ -374,12 +374,12 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
374 374 shipmentContainerDetail.setQty(shipmentContainerDetail.getQty().add(combinationModel.getShipQty()));
375 375 success = shipmentContainerDetailService.updateById(shipmentContainerDetail);
376 376 if (!success) {
377   - throw new ServiceException("更新出库组盘详情失败");
  377 + throw new JeecgBootException("更新出库组盘详情失败");
378 378 }
379 379 } else {
380 380 Material material = materialService.getMaterialByCode(materialCode);
381 381 if (material == null) {
382   - throw new ServiceException("出库单(" + shipmentDetail.getShipmentCode() + ")的物料(" + materialCode + ")不存在!");
  382 + throw new JeecgBootException("出库单(" + shipmentDetail.getShipmentCode() + ")的物料(" + materialCode + ")不存在!");
383 383 }
384 384 shipmentContainerDetail = new ShipmentContainerDetail();
385 385 shipmentContainerDetail.setWarehouseCode(shipmentContainerHeader.getWarehouseCode());
... ... @@ -403,14 +403,14 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
403 403 shipmentContainerDetail.setProject(shipmentDetail.getProject());
404 404 success = shipmentContainerDetailService.save(shipmentContainerDetail);
405 405 if (!success) {
406   - throw new ServiceException("新建组盘明细失败,sql错误");
  406 + throw new JeecgBootException("新建组盘明细失败,sql错误");
407 407 }
408 408 }
409 409 return shipmentContainerDetail;
410 410 }
411 411  
412 412 @Override
413   - @Transactional(rollbackFor = ServiceException.class)
  413 + @Transactional(rollbackFor = JeecgBootException.class)
414 414 @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务生成'", extra = "#extraJsonString",
415 415 msg = "'任务ID:' + #taskHeaderId + ',库位编码:' + #shipmentContainerHeader.getFromLocationCode() + ',容器编码:' + #shipmentContainerHeader.getContainerCode() + ',目标出入口:' + #shipmentContainerHeader.getToPort()",
416 416 condition = "#shipmentContainerDetailList.size() > 0", recordReturnValue = true)
... ... @@ -460,11 +460,11 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
460 460 container.setStatus(QuantityConstant.STATUS_CONTAINER_LOCK);
461 461 boolean success = containerService.updateById(container);
462 462 if (!success) {
463   - throw new ServiceException("生成出库任务时, 更新容器失败" + containerCode);
  463 + throw new JeecgBootException("生成出库任务时, 更新容器失败" + containerCode);
464 464 }
465 465 success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
466 466 if (!success) {
467   - throw new ServiceException("生成出库任务时, 更新库位失败" + fromLocationCode);
  467 + throw new JeecgBootException("生成出库任务时, 更新库位失败" + fromLocationCode);
468 468 }
469 469 List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode);
470 470 BigDecimal inventoryTotal = BigDecimal.ZERO;
... ... @@ -515,7 +515,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
515 515 taskHeader.setShipmentContainerHeaderId(shipmentContainerHeader.getId());
516 516 success = taskHeaderService.save(taskHeader);
517 517 if (!success) {
518   - throw new ServiceException("生成出库任务时, 创建任务失败");
  518 + throw new JeecgBootException("生成出库任务时, 创建任务失败");
519 519 }
520 520 int taskHeaderId = taskHeader.getId();
521 521 List<TaskDetail> taskDetailList = new ArrayList<>();
... ... @@ -542,19 +542,19 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
542 542 }
543 543 success = taskDetailService.saveBatch(taskDetailList);
544 544 if (!success) {
545   - throw new ServiceException("生成出库任务时, 创建任务详情失败");
  545 + throw new JeecgBootException("生成出库任务时, 创建任务详情失败");
546 546 }
547 547 shipmentContainerHeader.setStatus(QuantityConstant.SHIPMENT_CONTAINER_TASK);
548 548 success = shipmentContainerHeaderService.updateById(shipmentContainerHeader);
549 549 if (!success) {
550   - throw new ServiceException("生成出库任务时, 更新出库组盘头失败");
  550 + throw new JeecgBootException("生成出库任务时, 更新出库组盘头失败");
551 551 }
552 552 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
553 553 if (inventoryHeader != null) {
554 554 inventoryHeader.setContainerStatus(container.getStatus());
555 555 success = inventoryHeaderService.updateById(inventoryHeader);
556 556 if (!success) {
557   - throw new ServiceException("生成出库任务时, 更新库存头失败");
  557 + throw new JeecgBootException("生成出库任务时, 更新库存头失败");
558 558 }
559 559 }
560 560 LogRecordContext.putVariable("taskHeaderId", taskHeaderId);// 操作日志收集
... ... @@ -602,7 +602,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
602 602 if (removeInventoryList.size() > 0) {
603 603 boolean success = inventoryDetailList.removeAll(removeInventoryList);
604 604 if (!success) {
605   - throw new ServiceException("移除库存失败");
  605 + throw new JeecgBootException("移除库存失败");
606 606 }
607 607 }
608 608 return Result.ok(inventoryDetailList);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/service/impl/ShipmentContainerHeaderServiceImpl.java
... ... @@ -28,7 +28,7 @@ import org.springframework.stereotype.Service;
28 28 import org.springframework.transaction.annotation.Transactional;
29 29  
30 30 import com.alibaba.fastjson.JSON;
31   -import com.aliyun.oss.ServiceException;
  31 +import org.jeecg.common.exception.JeecgBootException;
32 32 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
33 33 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
34 34 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -140,12 +140,12 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
140 140 }
141 141 int shipmentContainerStatus = shipmentContainerHeader.getStatus();
142 142 if (shipmentContainerStatus != QuantityConstant.SHIPMENT_CONTAINER_TASK) {
143   - throw new ServiceException("取消出库任务时, 任务状态不为生成任务状态");
  143 + throw new JeecgBootException("取消出库任务时, 任务状态不为生成任务状态");
144 144 }
145 145 shipmentContainerHeader.setStatus(QuantityConstant.SHIPMENT_CONTAINER_BUILD);
146 146 boolean success = updateById(shipmentContainerHeader);
147 147 if (!success) {
148   - throw new ServiceException("取消入库任务时, 更新入库组盘头失败");
  148 + throw new JeecgBootException("取消入库任务时, 更新入库组盘头失败");
149 149 }
150 150  
151 151 List<ShipmentContainerDetail> shipmentContainerDetailList =
... ... @@ -154,7 +154,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
154 154 for (ShipmentContainerDetail shipmentContainerDetail : shipmentContainerDetailList) {
155 155 ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentContainerDetail.getShipmentDetailId());
156 156 if (shipmentDetail == null) {
157   - throw new ServiceException("取消出库任务时, 没有找到出库单详情" + shipmentContainerDetail.getShipmentDetailId());
  157 + throw new JeecgBootException("取消出库任务时, 没有找到出库单详情" + shipmentContainerDetail.getShipmentDetailId());
158 158 }
159 159 shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_GROUPDISK);
160 160 shipmentDetailList.add(shipmentDetail);
... ... @@ -162,13 +162,13 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
162 162 if (shipmentDetailList.size() != 0) {
163 163 success = shipmentDetailService.updateBatchById(shipmentDetailList);
164 164 if (!success) {
165   - throw new ServiceException("取消出库任务时, 更新出库单详情头失败");
  165 + throw new JeecgBootException("取消出库任务时, 更新出库单详情头失败");
166 166 }
167 167 List<Integer> shipmentIdList = shipmentDetailList.stream().map(ShipmentDetail::getShipmentId).distinct().collect(Collectors.toList());
168 168 for (Integer shipmentId : shipmentIdList) {
169 169 success = shipmentHeaderService.updateShipmentHeaderStatus(shipmentId);
170 170 if (!success) {
171   - throw new ServiceException("取消出库任务时, 更新出库单明细失败");
  171 + throw new JeecgBootException("取消出库任务时, 更新出库单明细失败");
172 172 }
173 173 }
174 174 }
... ... @@ -179,7 +179,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
179 179 }
180 180  
181 181 @Override
182   - @Transactional(rollbackFor = ServiceException.class)
  182 + @Transactional(rollbackFor = JeecgBootException.class)
183 183 @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情取消配盘'", extra = "#extraJsonString", msg = "''", recordReturnValue = true)
184 184 public Result cancelCombine(Integer id) {
185 185 ShipmentContainerHeader shipmentContainerHeader = this.getById(id);
... ... @@ -195,28 +195,28 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl&lt;ShipmentCont
195 195 for (ShipmentContainerDetail shipmentContainerDetail : shipmentContainerDetailList) {
196 196 ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentContainerDetail.getShipmentDetailId());
197 197 if (shipmentDetail == null) {
198   - throw new ServiceException("取消出库配盘失败, 没有找到出库单,出库详情ID:" + shipmentContainerDetail.getShipmentDetailId());
  198 + throw new JeecgBootException("取消出库配盘失败, 没有找到出库单,出库详情ID:" + shipmentContainerDetail.getShipmentDetailId());
199 199 }
200 200 shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_BUILD);
201 201 shipmentDetail.setTaskQty(shipmentDetail.getTaskQty().subtract(shipmentContainerDetail.getQty()));
202 202 if (!shipmentDetailService.updateById(shipmentDetail)) {
203   - throw new ServiceException("取消出库配盘失败, 更新出库明细失败,出库详情ID:" + shipmentContainerDetail.getShipmentDetailId());
  203 + throw new JeecgBootException("取消出库配盘失败, 更新出库明细失败,出库详情ID:" + shipmentContainerDetail.getShipmentDetailId());
204 204 }
205 205 if (!shipmentContainerDetailService.removeById(shipmentContainerDetail.getId())) {
206   - throw new ServiceException("取消出库配盘失败, 删除出库组盘明细表失败,配盘详情ID:" + shipmentContainerDetail.getId());
  206 + throw new JeecgBootException("取消出库配盘失败, 删除出库组盘明细表失败,配盘详情ID:" + shipmentContainerDetail.getId());
207 207 }
208 208 if (!shipmentHeaderService.updateShipmentHeaderStatus(shipmentDetail.getShipmentId())) {
209   - throw new ServiceException("取消出库配盘失败, 更新出库单头失败,出库单ID:" + shipmentDetail.getShipmentId());
  209 + throw new JeecgBootException("取消出库配盘失败, 更新出库单头失败,出库单ID:" + shipmentDetail.getShipmentId());
210 210 }
211 211 InventoryDetail inventoryDetail = inventoryDetailService.getById(shipmentContainerDetail.getInventoryDetailId());
212 212 inventoryDetail.setTaskQty(inventoryDetail.getTaskQty().subtract(shipmentContainerDetail.getQty()));
213 213 if (!inventoryDetailService.updateById(inventoryDetail)) {
214   - throw new ServiceException("取消出库配盘失败, 解锁库存详情失败,库存详情ID:" + inventoryDetail.getId());
  214 + throw new JeecgBootException("取消出库配盘失败, 解锁库存详情失败,库存详情ID:" + inventoryDetail.getId());
215 215 }
216 216 shipmentDetailList.add(shipmentDetail);
217 217 }
218 218 if (!this.removeById(id)) {
219   - throw new ServiceException("取消出库配盘失败, 删除出库组盘头表失败,配盘ID:" + id);
  219 + throw new JeecgBootException("取消出库配盘失败, 删除出库组盘头表失败,配盘ID:" + id);
220 220 }
221 221 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(shipmentContainerDetailList));
222 222 return Result.ok("取消配盘成功");
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/controller/ShipmentHeaderController.java
... ... @@ -46,7 +46,7 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
46 46 import org.springframework.web.servlet.ModelAndView;
47 47  
48 48 import com.alibaba.fastjson.JSON;
49   -import com.aliyun.oss.ServiceException;
  49 +import org.jeecg.common.exception.JeecgBootException;
50 50 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
51 51 import com.baomidou.mybatisplus.core.metadata.IPage;
52 52 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
... ... @@ -259,11 +259,11 @@ public class ShipmentHeaderController extends JeecgController&lt;ShipmentHeader, IS
259 259 }
260 260 boolean success = shipmentDetailService.removeById(id);
261 261 if (!success) {
262   - throw new ServiceException("删除详情失败");
  262 + throw new JeecgBootException("删除详情失败");
263 263 }
264 264 success = shipmentHeaderService.updateShipmentHeader(shipmentDetail.getShipmentId());
265 265 if (!success) {
266   - throw new ServiceException("更新出库单头数量失败");
  266 + throw new JeecgBootException("更新出库单头数量失败");
267 267 }
268 268 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(Collections.singletonList(shipmentDetail)));// 操作日志收集
269 269 return Result.OK("删除成功!");
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentDetailServiceImpl.java
1 1 package org.jeecg.modules.wms.shipment.shipmentHeader.service.impl;
2 2  
3 3 import com.alibaba.fastjson.JSON;
4   -import com.aliyun.oss.ServiceException;
  4 +import org.jeecg.common.exception.JeecgBootException;
5 5 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
6 6 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
7 7 import org.jeecg.common.api.vo.Result;
... ... @@ -86,11 +86,11 @@ public class ShipmentDetailServiceImpl extends ServiceImpl&lt;ShipmentDetailMapper,
86 86 shipmentDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD);
87 87 boolean success = shipmentDetailService.save(shipmentDetail);
88 88 if (!success) {
89   - throw new ServiceException("添加失败, 保存出库单详情的时候报错");
  89 + throw new JeecgBootException("添加失败, 保存出库单详情的时候报错");
90 90 }
91 91 success = shipmentHeaderService.updateShipmentHeader(shipmentHeader.getId());
92 92 if (!success) {
93   - throw new ServiceException("添加失败, 更新出库单失败");
  93 + throw new JeecgBootException("添加失败, 更新出库单失败");
94 94 }
95 95 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(Collections.singletonList(shipmentDetail)));// 操作日志收集
96 96 return Result.OK("添加成功!");
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
1 1 package org.jeecg.modules.wms.shipment.shipmentHeader.service.impl;
2 2  
3   -import com.aliyun.oss.ServiceException;
  3 +import org.jeecg.common.exception.JeecgBootException;
4 4 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5 5 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 6 import org.jeecg.common.api.vo.Result;
... ... @@ -86,7 +86,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
86 86 public boolean delMain(String id) {
87 87 ShipmentHeader shipmentHeader = getById(id);
88 88 if (shipmentHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) {
89   - throw new ServiceException("不能删除非新建状态单据");
  89 + throw new JeecgBootException("不能删除非新建状态单据");
90 90 }
91 91 boolean success = shipmentDetailMapper.deleteByMainId(id);
92 92 if (!success) {
... ... @@ -102,7 +102,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
102 102 for (Serializable id : idList) {
103 103 ShipmentHeader shipmentHeader = getById(id);
104 104 if (shipmentHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) {
105   - throw new ServiceException("不能删除非新建状态单据");
  105 + throw new JeecgBootException("不能删除非新建状态单据");
106 106 }
107 107 shipmentDetailMapper.deleteByMainId(id.toString());
108 108 shipmentHeaderMapper.deleteById(id);
... ... @@ -122,7 +122,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
122 122 }
123 123 String code = createCode(shipmentHeader.getType());
124 124 if (StringUtils.isEmpty(code)) {
125   - throw new ServiceException("根据出库单类型" + shipmentHeader.getType() + "生成单号失败");
  125 + throw new JeecgBootException("根据出库单类型" + shipmentHeader.getType() + "生成单号失败");
126 126 }
127 127 shipmentHeader.setCode(code);
128 128 shipmentHeader.setFirstStatus(QuantityConstant.RECEIPT_HEADER_BUILD);
... ... @@ -194,7 +194,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
194 194 shipmentHeader.setFirstStatus(maxStatus);
195 195 shipmentHeader.setLastStatus(minStatus);
196 196 if (!shipmentHeaderService.updateById(shipmentHeader)) {
197   - throw new ServiceException("更新出库单:" + shipmentHeader.getCode() + " 头状态失败");
  197 + throw new JeecgBootException("更新出库单:" + shipmentHeader.getCode() + " 头状态失败");
198 198 }
199 199 LogRecordContext.putVariable("minStatus", minStatus);
200 200 LogRecordContext.putVariable("shipmentHeader", shipmentHeader);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeaderHistory/service/impl/ShipmentHeaderHistoryServiceImpl.java
... ... @@ -3,7 +3,7 @@ package org.jeecg.modules.wms.shipment.shipmentHeaderHistory.service.impl;
3 3 import java.math.BigDecimal;
4 4 import java.util.Date;
5 5  
6   -import com.aliyun.oss.ServiceException;
  6 +import org.jeecg.common.exception.JeecgBootException;
7 7 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
8 8 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail;
9 9 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
... ... @@ -106,7 +106,7 @@ public class ShipmentHeaderHistoryServiceImpl extends ServiceImpl&lt;ShipmentHeader
106 106 List<ShipmentDetailHistory> newList =
107 107 shipmentDetailHistoryList.stream().peek(detail -> detail.setShipmentId(shipmentHeaderHistory.getId())).collect(Collectors.toList());
108 108 if (!shipmentDetailHistoryService.saveBatch(newList)) {
109   - throw new ServiceException("批量新增失败");
  109 + throw new JeecgBootException("批量新增失败");
110 110 }
111 111 }
112 112  
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailChildServiceImpl.java
... ... @@ -123,7 +123,7 @@ public class CycleCountDetailChildServiceImpl extends ServiceImpl&lt;CycleCountDeta
123 123 cycleCountHeader.setStatusCyc(QuantityConstant.CYCLECOUNT_STATUS_REGISTERED);
124 124 cycleCountHeader.setStocktakingAc(sysUser.getUsername());
125 125  
126   - Result result = new Result();
  126 + Result<Integer> result = new Result<Integer>();
127 127 result.setCode(200);
128 128 result.setMessage("调整成功");
129 129 result.setResult(cycleCountHeader.getId());
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java
... ... @@ -34,7 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
34 34 import org.springframework.stereotype.Service;
35 35 import org.springframework.transaction.annotation.Transactional;
36 36  
37   -import com.aliyun.oss.ServiceException;
  37 +import org.jeecg.common.exception.JeecgBootException;
38 38 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
39 39 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
40 40 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -257,7 +257,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
257 257 locationService.updateStatus(location.getContainerCode(), QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
258 258 cycleCountDetail.setTaskHeaderId(task.getId()); // 盘点明细修改状态task数据源
259 259 } else {
260   - throw new ServiceException("盘点任务主表生成失败!");
  260 + throw new JeecgBootException("盘点任务主表生成失败!");
261 261 }
262 262  
263 263 // 写入任务细表
... ... @@ -280,7 +280,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
280 280 // taskDetail.setProjectNo(cycleCountDetail.getProjectNo());
281 281 taskDetail.setCompanyCode(cycleCountDetail.getCompanyCode());
282 282 if (taskDetailService.save(taskDetail) == false) {
283   - throw new ServiceException("盘点任务明细生成失败!");
  283 + throw new JeecgBootException("盘点任务明细生成失败!");
284 284 }
285 285 // 修改子单状态
286 286 item.setChildStatus(QuantityConstant.CYCLECOUNT_STATUS_BUILDTASK);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountHeader/service/impl/CycleCountHeaderServiceImpl.java
1 1 package org.jeecg.modules.wms.stocktaking.cycleCountHeader.service.impl;
2 2  
3   -import com.aliyun.oss.ServiceException;
  3 +import org.jeecg.common.exception.JeecgBootException;
4 4 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5 5 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6 6 import org.jeecg.common.api.vo.Result;
... ... @@ -44,7 +44,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
44 44 public Result<CycleCountHeader> saveCycleCountHeader(CycleCountHeader cycleCountHeader) {
45 45 String code = createCode(QuantityConstant.SHIPMENT_BILL_TYPE_PD);
46 46 if (StringUtils.isEmpty(code)) {
47   - throw new ServiceException("根据单据类型,生成单号失败");
  47 + throw new JeecgBootException("根据单据类型,生成单号失败");
48 48 }
49 49 cycleCountHeader.setCode(code);
50 50 cycleCountHeader.setStocktakingAc("-");
... ... @@ -67,7 +67,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
67 67 LambdaQueryWrapper<CycleCountHeader> lamb = Wrappers.lambdaQuery(cyclecountHeader);
68 68 cyclecountHeader = this.getOne(lamb);
69 69 if(StringUtils.isNull(cyclecountHeader)){
70   - throw new ServiceException("没有找到盘点主单!");
  70 + throw new JeecgBootException("没有找到盘点主单!");
71 71 }
72 72 CycleCountDetail temp = new CycleCountDetail();
73 73 temp.setCycleCountHeadCode(cyclecountHeader.getCode());
... ... @@ -76,7 +76,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
76 76 LambdaQueryWrapper<CycleCountDetail> lam = Wrappers.lambdaQuery(temp);
77 77 List<CycleCountDetail> list = cycleCountDetailService.list(lam);
78 78 if(list.size() < 1){
79   - throw new ServiceException("明细为空!");
  79 + throw new JeecgBootException("明细为空!");
80 80 }
81 81 //当有子单的状态为100时触发主单的完成状态
82 82 //100状态只有全部完成才写入主单
... ... @@ -107,7 +107,6 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl&lt;CycleCountHeaderMap
107 107  
108 108 @Transactional
109 109 public String createCode(String receiptType) {
110   - int i = 0;
111 110 String code = null;
112 111 Date now = new Date();
113 112 SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java
... ... @@ -22,7 +22,7 @@ import org.jeecg.utils.constant.QuantityConstant;
22 22 import org.springframework.stereotype.Service;
23 23 import org.springframework.transaction.annotation.Transactional;
24 24  
25   -import com.aliyun.oss.ServiceException;
  25 +import org.jeecg.common.exception.JeecgBootException;
26 26 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
27 27 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
28 28 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -72,7 +72,7 @@ public class AgvTaskServiceImpl extends ServiceImpl&lt;AgvTaskMapper, AgvTask&gt; impl
72 72 agvTask.setStatus(QuantityConstant.AGV_TASK_STATUS_RELEASE);
73 73 boolean success = updateById(agvTask);
74 74 if (!success) {
75   - throw new ServiceException("更新AGV任务状态失败");
  75 + throw new JeecgBootException("更新AGV任务状态失败");
76 76 }
77 77 }
78 78 return result;
... ... @@ -99,7 +99,7 @@ public class AgvTaskServiceImpl extends ServiceImpl&lt;AgvTaskMapper, AgvTask&gt; impl
99 99 if (fromLocation != null) {
100 100 success = locationService.updateContainerCodeAndStatus(fromPort, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
101 101 if (!success) {
102   - throw new ServiceException("完成AGV任务时,更新起始库位数据失败");
  102 + throw new JeecgBootException("完成AGV任务时,更新起始库位数据失败");
103 103 }
104 104 } else {
105 105 fromPort = QuantityConstant.EMPTY_STRING;
... ... @@ -108,29 +108,29 @@ public class AgvTaskServiceImpl extends ServiceImpl&lt;AgvTaskMapper, AgvTask&gt; impl
108 108 if (toLocation != null) {
109 109 success = locationService.updateContainerCodeAndStatus(toPort, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
110 110 if (!success) {
111   - throw new ServiceException("完成AGV任务时,更新终点库位数据失败");
  111 + throw new JeecgBootException("完成AGV任务时,更新终点库位数据失败");
112 112 }
113 113 } else {
114 114 toPort = QuantityConstant.EMPTY_STRING;
115 115 }
116 116 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
117 117 if (container == null) {
118   - throw new ServiceException("完成AGV任务时,根据容器号没有找到容器");
  118 + throw new JeecgBootException("完成AGV任务时,根据容器号没有找到容器");
119 119 }
120 120 success = containerService.updateLocationCodeAndStatus(containerCode, toPort, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
121 121 if (!success) {
122   - throw new ServiceException("完成AGV任务时,更新容器数据失败");
  122 + throw new JeecgBootException("完成AGV任务时,更新容器数据失败");
123 123 }
124 124 agvTask.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
125 125 success = updateById(agvTask);
126 126 if (!success) {
127   - throw new ServiceException("完成AGV任务时, 更新AGV任务失败");
  127 + throw new JeecgBootException("完成AGV任务时, 更新AGV任务失败");
128 128 }
129 129 TaskHeader taskHeader = taskHeaderService.getTaskHeaderByAgvTaskId(taskId);
130 130 if (taskHeader != null) {
131 131 Result result = taskHeaderService.completeTaskByWMS(taskHeader.getId());
132 132 if (!result.isSuccess()) {
133   - throw new ServiceException("完成AGV任务时, 完成WCS任务失败");
  133 + throw new JeecgBootException("完成AGV任务时, 完成WCS任务失败");
134 134 }
135 135 }
136 136  
... ... @@ -154,19 +154,19 @@ public class AgvTaskServiceImpl extends ServiceImpl&lt;AgvTaskMapper, AgvTask&gt; impl
154 154 if (fromLocation != null) {
155 155 success = locationService.updateContainerCodeAndStatus(fromPort, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
156 156 if (!success) {
157   - throw new ServiceException("取消AGV任务。 更新起始库位状态失败");
  157 + throw new JeecgBootException("取消AGV任务。 更新起始库位状态失败");
158 158 }
159 159 }
160 160 Location toLocation = locationService.getLocationByCode(toPort, warehouseCode);
161 161 if (toLocation != null) {
162 162 success = locationService.updateContainerCodeAndStatus(toPort, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
163 163 if (!success) {
164   - throw new ServiceException("取消AGV任务。 更新终点库位状态失败");
  164 + throw new JeecgBootException("取消AGV任务。 更新终点库位状态失败");
165 165 }
166 166 }
167 167 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
168 168 if (container == null) {
169   - throw new ServiceException("取消AGV任务。 根据容器号没有找到容器");
  169 + throw new JeecgBootException("取消AGV任务。 根据容器号没有找到容器");
170 170 }
171 171 String containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY;
172 172 List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode);
... ... @@ -175,18 +175,18 @@ public class AgvTaskServiceImpl extends ServiceImpl&lt;AgvTaskMapper, AgvTask&gt; impl
175 175 }
176 176 success = containerService.updateStatus(containerCode, containerStatus, warehouseCode);
177 177 if (!success) {
178   - throw new ServiceException("取消AGV任务。 更新容器状态失败");
  178 + throw new JeecgBootException("取消AGV任务。 更新容器状态失败");
179 179 }
180 180 int status = agvTask.getStatus();
181 181 if (status != QuantityConstant.AGV_TASK_STATUS_BUILD) {
182 182 Result result = acsService.cancelAGVTask(agvTask);
183 183 if (!result.isSuccess()) {
184   - throw new ServiceException(result.getMessage());
  184 + throw new JeecgBootException(result.getMessage());
185 185 }
186 186 }
187 187 success = removeById(taskId);
188 188 if (!success) {
189   - throw new ServiceException("取消agv任务失败,任务id:" + taskId);
  189 + throw new JeecgBootException("取消agv任务失败,任务id:" + taskId);
190 190 }
191 191 return Result.ok("取消AGV任务成功");
192 192 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -66,7 +66,7 @@ import org.springframework.stereotype.Service;
66 66 import org.springframework.transaction.annotation.Transactional;
67 67  
68 68 import com.alibaba.fastjson.JSON;
69   -import com.aliyun.oss.ServiceException;
  69 +import org.jeecg.common.exception.JeecgBootException;
70 70 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
71 71 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
72 72 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
... ... @@ -250,7 +250,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
250 250 container.setLastStatus(container.getStatus());
251 251 boolean success = containerService.updateById(container);
252 252 if (!success) {
253   - throw new ServiceException("创建移库任务时,更新容器状态失败,容器号" + fromLocation.getContainerCode());
  253 + throw new JeecgBootException("创建移库任务时,更新容器状态失败,容器号" + fromLocation.getContainerCode());
254 254 }
255 255  
256 256 // 3. 判断源库位旁边有托盘但是没有任务,那么不允许移库
... ... @@ -286,20 +286,20 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
286 286 taskHeader.setPreTaskNo(preTaskNo);
287 287 success = taskHeaderService.save(taskHeader);
288 288 if (!success) {
289   - throw new ServiceException("创建移库任务时,创建任务失败");
  289 + throw new JeecgBootException("创建移库任务时,创建任务失败");
290 290 }
291 291  
292 292 success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
293 293 if (!success) {
294   - throw new ServiceException("创建移库任务时, 库位" + fromLocationCode + "更新失败");
  294 + throw new JeecgBootException("创建移库任务时, 库位" + fromLocationCode + "更新失败");
295 295 }
296 296 success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
297 297 if (!success) {
298   - throw new ServiceException("创建移库任务时, 库位" + toLocationCode + "更新失败");
  298 + throw new JeecgBootException("创建移库任务时, 库位" + toLocationCode + "更新失败");
299 299 }
300 300 success = containerService.updateStatus(fromLocation.getContainerCode(), QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode);
301 301 if (!success) {
302   - throw new ServiceException("创建移库任务时,容器" + fromLocation.getContainerCode() + "更新失败");
  302 + throw new JeecgBootException("创建移库任务时,容器" + fromLocation.getContainerCode() + "更新失败");
303 303 }
304 304 return Result.OK("创建移库任务成功");
305 305 }
... ... @@ -347,16 +347,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
347 347 }
348 348 success = inventoryDetailService.updateBatchById(inventoryDetailList);
349 349 if (!success) {
350   - throw new ServiceException("创建出库查看任务时,更新库存详情失败");
  350 + throw new JeecgBootException("创建出库查看任务时,更新库存详情失败");
351 351 }
352 352 }
353 353 success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
354 354 if (!success) {
355   - throw new ServiceException("创建出库查看任务时,更新库位状态失败");
  355 + throw new JeecgBootException("创建出库查看任务时,更新库位状态失败");
356 356 }
357 357 success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode);
358 358 if (!success) {
359   - throw new ServiceException("创建出库查看任务时,更新容器状态失败");
  359 + throw new JeecgBootException("创建出库查看任务时,更新容器状态失败");
360 360 }
361 361 TaskHeader taskHeader = new TaskHeader();
362 362 taskHeader.setWarehouseCode(warehouseCode);
... ... @@ -374,7 +374,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
374 374 taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD);
375 375 success = taskHeaderService.save(taskHeader);
376 376 if (!success) {
377   - throw new ServiceException("创建出库查看任务时, 创建任务失败");
  377 + throw new JeecgBootException("创建出库查看任务时, 创建任务失败");
378 378 }
379 379 return Result.OK("创建出库查看任务成功");
380 380 }
... ... @@ -485,11 +485,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
485 485 int high = locationHigh.getHigh();
486 486 String toLocationCode = allocationService.allocation(allocationRule, locationTypeCodeList, high, zoneCode, roadWays, warehouseCode, containerCode, null);
487 487 if (StringUtils.isEmpty(toLocationCode)) {
488   - throw new ServiceException("创建空托盘组入库任务时,目标库位为空");
  488 + throw new JeecgBootException("创建空托盘组入库任务时,目标库位为空");
489 489 }
490 490 Result result = taskHeaderService.createManyEmptyIn(containerCode, toLocationCode, warehouseCode);
491 491 if (!result.isSuccess()) {
492   - throw new ServiceException(result.getMessage());
  492 + throw new JeecgBootException(result.getMessage());
493 493 }
494 494 return Result.ok("创建空托盘组入库任务成功");
495 495 }
... ... @@ -516,7 +516,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
516 516 }
517 517 boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode);
518 518 if (!success) {
519   - throw new ServiceException("创建空托盘组入库任务时, 更新容器状态失败");
  519 + throw new JeecgBootException("创建空托盘组入库任务时, 更新容器状态失败");
520 520 }
521 521 if (StringUtils.isNotEmpty(toLocationCode)) {
522 522 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode);
... ... @@ -528,7 +528,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
528 528 }
529 529 success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
530 530 if (!success) {
531   - throw new ServiceException("创建空托盘组入库任务时, 更新库位状态失败");
  531 + throw new JeecgBootException("创建空托盘组入库任务时, 更新库位状态失败");
532 532 }
533 533 zoneCode = toLocation.getZoneCode();
534 534 }
... ... @@ -542,7 +542,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
542 542 taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD);
543 543 success = taskHeaderService.save(taskHeader);
544 544 if (!success) {
545   - throw new ServiceException("创建空托盘组入库任务时, 创建任务失败");
  545 + throw new JeecgBootException("创建空托盘组入库任务时, 创建任务失败");
546 546 }
547 547 return Result.ok("创建空托盘组入库任务成功");
548 548 }
... ... @@ -580,11 +580,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
580 580 }
581 581 boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode);
582 582 if (!success) {
583   - throw new ServiceException("创建空托盘组出库任务时, 更新容器状态失败");
  583 + throw new JeecgBootException("创建空托盘组出库任务时, 更新容器状态失败");
584 584 }
585 585 success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
586 586 if (!success) {
587   - throw new ServiceException("创建空托盘组出库任务时, 更新库位状态失败");
  587 + throw new JeecgBootException("创建空托盘组出库任务时, 更新库位状态失败");
588 588 }
589 589 TaskHeader taskHeader = new TaskHeader();
590 590 taskHeader.setWarehouseCode(warehouseCode);
... ... @@ -597,7 +597,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
597 597 taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD);
598 598 success = taskHeaderService.save(taskHeader);
599 599 if (!success) {
600   - throw new ServiceException("创建空托盘组出库任务时,生成任务失败");
  600 + throw new JeecgBootException("创建空托盘组出库任务时,生成任务失败");
601 601 }
602 602 return Result.ok("创建空托盘组出库任务成功");
603 603 }
... ... @@ -655,20 +655,20 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
655 655 boolean success =
656 656 containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
657 657 if (!success) {
658   - throw new ServiceException("处理空出失败, 更新容器状态失败");
  658 + throw new JeecgBootException("处理空出失败, 更新容器状态失败");
659 659 }
660 660 // 6、删除库位上的容器号,并设置状态为空闲
661 661 success =
662 662 locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
663 663 if (!success) {
664   - throw new ServiceException("处理空出失败, 更新库位状态失败");
  664 + throw new JeecgBootException("处理空出失败, 更新库位状态失败");
665 665 }
666 666 // 7、删除库存头失败
667 667 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
668 668 if (inventoryHeader != null) {
669 669 success = inventoryHeaderService.removeById(inventoryHeader.getId());
670 670 if (!success) {
671   - throw new ServiceException("处理空出失败, 删除库存头失败");
  671 + throw new JeecgBootException("处理空出失败, 删除库存头失败");
672 672 }
673 673 }
674 674 // 8、删除库存详情失败
... ... @@ -677,14 +677,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
677 677 List<Integer> idList = inventoryDetailList.stream().map(InventoryDetail::getId).collect(Collectors.toList());;
678 678 success = inventoryDetailService.removeByIds(idList);
679 679 if (!success) {
680   - throw new ServiceException("处理空出失败, 删除库存详情失败");
  680 + throw new JeecgBootException("处理空出失败, 删除库存详情失败");
681 681 }
682 682 }
683 683 // 9 更新单据
684 684 taskHeader.setExceptionState(QuantityConstant.EXCEPTION_TASK_HANDLE);
685 685 success = taskHeaderService.updateById(taskHeader);
686 686 if (!success) {
687   - throw new ServiceException("处理空出失败,更新任务失败");
  687 + throw new JeecgBootException("处理空出失败,更新任务失败");
688 688 }
689 689 return Result.ok("处理空出成功");
690 690 }
... ... @@ -731,13 +731,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
731 731 toLocation.setStatus(QuantityConstant.STATUS_LOCATION_EMPTY);
732 732 boolean success = locationService.updateById(toLocation);
733 733 if (!success) {
734   - throw new ServiceException("处理重入失败,更新库位失败");
  734 + throw new JeecgBootException("处理重入失败,更新库位失败");
735 735 }
736 736 }
737 737 taskHeader.setExceptionState(QuantityConstant.EXCEPTION_TASK_HANDLE);
738 738 boolean success = taskHeaderService.updateById(taskHeader);
739 739 if (!success) {
740   - throw new ServiceException("处理重入失败,更新任务失败");
  740 + throw new JeecgBootException("处理重入失败,更新任务失败");
741 741 }
742 742 return Result.ok("处理重入成功");
743 743 }
... ... @@ -762,7 +762,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
762 762 taskHeader.setExceptionState(QuantityConstant.EXCEPTION_TASK_HANDLE);
763 763 boolean success = taskHeaderService.updateById(taskHeader);
764 764 if (!success) {
765   - throw new ServiceException("处理取货错失败,更新任务失败");
  765 + throw new JeecgBootException("处理取货错失败,更新任务失败");
766 766 }
767 767 return Result.ok("处理取货错成功");
768 768 }
... ... @@ -867,7 +867,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
867 867 result = taskHeaderService.completeManyEmptyOutTask(taskHeader);
868 868 break;
869 869 default:
870   - throw new ServiceException("不支持的任务类型" + taskType);
  870 + throw new JeecgBootException("不支持的任务类型" + taskType);
871 871 }
872 872 return result;
873 873 }
... ... @@ -920,12 +920,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
920 920 }
921 921 Result result = wcsService.wcsTaskAssign(taskHeader);
922 922 if (!result.isSuccess()) {
923   - throw new ServiceException(result.getMessage());
  923 + throw new JeecgBootException(result.getMessage());
924 924 }
925 925 taskHeader.setStatus(QuantityConstant.TASK_STATUS_RELEASE);
926 926 boolean success = taskHeaderService.updateById(taskHeader);
927 927 if (!success) {
928   - throw new ServiceException("下发wcs任务时, 更新任务状态失败");
  928 + throw new JeecgBootException("下发wcs任务时, 更新任务状态失败");
929 929 }
930 930  
931 931 return Result.ok("执行下发任务成功");
... ... @@ -973,13 +973,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
973 973 }
974 974 boolean success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
975 975 if (!success) {
976   - throw new ServiceException("创建空托盘入库时,更新库位状态失败");
  976 + throw new JeecgBootException("创建空托盘入库时,更新库位状态失败");
977 977 }
978 978 }
979 979  
980 980 boolean success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode);
981 981 if (!success) {
982   - throw new ServiceException("创建空托盘入库时,更新容器状态失败");
  982 + throw new JeecgBootException("创建空托盘入库时,更新容器状态失败");
983 983 }
984 984 TaskHeader taskHeader = new TaskHeader();
985 985 taskHeader.setWarehouseCode(warehouseCode);
... ... @@ -990,7 +990,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
990 990 taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD);
991 991 success = taskHeaderService.save(taskHeader);
992 992 if (!success) {
993   - throw new ServiceException("创建空托盘入库时,保存任务失败");
  993 + throw new JeecgBootException("创建空托盘入库时,保存任务失败");
994 994 }
995 995 return Result.OK("创建空托盘入库任务成功", taskHeader);
996 996 }
... ... @@ -1039,11 +1039,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1039 1039 }
1040 1040 boolean success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);
1041 1041 if (!success) {
1042   - throw new ServiceException("创建空托盘出库时,更新库位状态失败");
  1042 + throw new JeecgBootException("创建空托盘出库时,更新库位状态失败");
1043 1043 }
1044 1044 success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode);
1045 1045 if (!success) {
1046   - throw new ServiceException("创建空托盘出库时,更新容器状态失败");
  1046 + throw new JeecgBootException("创建空托盘出库时,更新容器状态失败");
1047 1047 }
1048 1048 TaskHeader taskHeader = new TaskHeader();
1049 1049 taskHeader.setWarehouseCode(warehouseCode);
... ... @@ -1056,7 +1056,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1056 1056 taskHeader.setToPortCode(toPortCode);
1057 1057 success = taskHeaderService.save(taskHeader);
1058 1058 if (!success) {
1059   - throw new ServiceException("创建空托盘出库时,保存任务失败");
  1059 + throw new JeecgBootException("创建空托盘出库时,保存任务失败");
1060 1060 }
1061 1061 return Result.OK("创建空托盘出库任务成功");
1062 1062 }
... ... @@ -1092,11 +1092,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1092 1092 return Result.ok("任务(" + taskHeader.getId() + ")任务已经是完成的!");
1093 1093 }
1094 1094 if (taskDetailList.isEmpty()) {
1095   - throw new ServiceException("任务明细为空");
  1095 + throw new JeecgBootException("任务明细为空");
1096 1096 }
1097 1097 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode);
1098 1098 if (toLocation == null) {
1099   - throw new ServiceException("完成任务时,没有找到目的库位");
  1099 + throw new JeecgBootException("完成任务时,没有找到目的库位");
1100 1100 }
1101 1101 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
1102 1102 if (inventoryHeader != null) {
... ... @@ -1122,7 +1122,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1122 1122 inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_SOME);
1123 1123 inventoryHeader.setEnable(QuantityConstant.STATUS_ENABLE);
1124 1124 if (!inventoryHeaderService.save(inventoryHeader)) {
1125   - throw new ServiceException("添加库存头失败");
  1125 + throw new JeecgBootException("添加库存头失败");
1126 1126 }
1127 1127 }
1128 1128  
... ... @@ -1132,7 +1132,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1132 1132 for (TaskDetail taskDetail : taskDetailList) {
1133 1133 ReceiptDetail receiptDetail = receiptDetailService.getById(taskDetail.getReceiptDetailId());
1134 1134 if (receiptDetail == null) {
1135   - throw new ServiceException("未找到ID:" + taskDetail.getReceiptDetailId() + "入库单明细");
  1135 + throw new JeecgBootException("未找到ID:" + taskDetail.getReceiptDetailId() + "入库单明细");
1136 1136 }
1137 1137 // 操作记录统计用
1138 1138 taskDetail.setReceiptCode(receiptDetail.getReceiptCode());
... ... @@ -1187,51 +1187,51 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1187 1187 }
1188 1188 success = receiptContainerHeaderService.updateStatusById(QuantityConstant.RECEIPT_CONTAINER_FINISHED, taskHeader.getReceiptContainerHeaderId());
1189 1189 if (!success) {
1190   - throw new ServiceException("完成入库任务时,更新入库组盘头表状态失败");
  1190 + throw new JeecgBootException("完成入库任务时,更新入库组盘头表状态失败");
1191 1191 }
1192 1192  
1193 1193 success = inventoryDetailService.saveBatch(inventoryDetailList);
1194 1194 if (!success) {
1195   - throw new ServiceException("完成入库任务时,保存库存详情失败");
  1195 + throw new JeecgBootException("完成入库任务时,保存库存详情失败");
1196 1196 }
1197 1197 success = inventoryTransactionService.saveBatch(inventoryTransactionList);
1198 1198 if (!success) {
1199   - throw new ServiceException("完成入库任务时,保存库存交易失败");
  1199 + throw new JeecgBootException("完成入库任务时,保存库存交易失败");
1200 1200 }
1201 1201  
1202 1202 if (StringUtils.isEmpty(fromLocationCode)) {
1203 1203 success =
1204 1204 locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1205 1205 if (!success) {
1206   - throw new ServiceException("完成入库任务时,更新源库位失败");
  1206 + throw new JeecgBootException("完成入库任务时,更新源库位失败");
1207 1207 }
1208 1208 }
1209 1209  
1210 1210 success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1211 1211 if (!success) {
1212   - throw new ServiceException("完成入库任务时,更新库位失败");
  1212 + throw new JeecgBootException("完成入库任务时,更新库位失败");
1213 1213 }
1214 1214  
1215 1215 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
1216 1216 success = taskHeaderService.updateById(taskHeader);
1217 1217 if (!success) {
1218   - throw new ServiceException("完成入库任务时,更新任务失败");
  1218 + throw new JeecgBootException("完成入库任务时,更新任务失败");
1219 1219 }
1220 1220 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode);
1221 1221 if (!success) {
1222   - throw new ServiceException("完成入库任务时,更新容器失败");
  1222 + throw new JeecgBootException("完成入库任务时,更新容器失败");
1223 1223 }
1224 1224 if (!combineInventoryDetail(taskHeader)) {
1225   - throw new ServiceException("合并入库库存失败");
  1225 + throw new JeecgBootException("合并入库库存失败");
1226 1226 }
1227 1227 if (!receiptDetailService.updateBatchById(receiptDetaiList)) {
1228   - throw new ServiceException("完成入库任务时,更新入库单详情失败");
  1228 + throw new JeecgBootException("完成入库任务时,更新入库单详情失败");
1229 1229 }
1230 1230 List<Integer> receiptIdList = receiptDetaiList.stream().map(ReceiptDetail::getReceiptId).distinct().collect(Collectors.toList());
1231 1231 for (Integer receiptId : receiptIdList) {
1232 1232 success = receiptHeaderService.updateReceiptHeaderStatus(receiptId);
1233 1233 if (!success) {
1234   - throw new ServiceException("完成入库任务时,更新入库单头失败");
  1234 + throw new JeecgBootException("完成入库任务时,更新入库单头失败");
1235 1235 }
1236 1236 }
1237 1237 receiptDetaiList = receiptDetaiList.stream().filter(t -> t.getStatus().equals(QuantityConstant.RECEIPT_HEADER_COMPLETED)).collect(Collectors.toList());
... ... @@ -1271,17 +1271,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1271 1271 return Result.ok("完成出库任务,(" + taskHeader.getId() + ")任务已经是完成的!");
1272 1272 }
1273 1273 if (taskDetailList.isEmpty()) {
1274   - throw new ServiceException("完成出库任务,任务明细为空");
  1274 + throw new JeecgBootException("完成出库任务,任务明细为空");
1275 1275 }
1276 1276 if (StringUtils.isEmpty(fromLocationCode)) {
1277   - throw new ServiceException("完成出库任务" + taskHeader.getId() + "没有起始库位,执行中止");
  1277 + throw new JeecgBootException("完成出库任务" + taskHeader.getId() + "没有起始库位,执行中止");
1278 1278 }
1279 1279 if (StringUtils.isEmpty(toLocationCode) && taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT) {
1280   - throw new ServiceException("完成出库任务,任务" + taskHeader.getId() + "没有目的库位,执行中止");
  1280 + throw new JeecgBootException("完成出库任务,任务" + taskHeader.getId() + "没有目的库位,执行中止");
1281 1281 }
1282 1282 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
1283 1283 if (inventoryHeader == null) {
1284   - throw new ServiceException("完成出库任务,出库任务" + taskHeader.getId() + "没有找到库存头");
  1284 + throw new JeecgBootException("完成出库任务,出库任务" + taskHeader.getId() + "没有找到库存头");
1285 1285 }
1286 1286 List<InventoryTransaction> inventoryTransactionList = new ArrayList<>();
1287 1287 List<Integer> shipmentIdList = new ArrayList<>();
... ... @@ -1289,11 +1289,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1289 1289 for (TaskDetail taskDetail : taskDetailList) {
1290 1290 ShipmentContainerDetail shipmentContainerDetail = shipmentContainerDetailService.getById(taskDetail.getShipmentContainerDetailId());
1291 1291 if (shipmentContainerDetail == null) {
1292   - throw new ServiceException("完成出库任务, 出库任务没有找到出库组盘详情" + taskDetail.getShipmentContainerDetailId());
  1292 + throw new JeecgBootException("完成出库任务, 出库任务没有找到出库组盘详情" + taskDetail.getShipmentContainerDetailId());
1293 1293 }
1294 1294 ShipmentDetail shipmentDetail = shipmentDetailService.getById(taskDetail.getShipmentDetailId());
1295 1295 if (shipmentDetail == null) {
1296   - throw new ServiceException("完成出库任务, 出库任务没有找到出库详情" + taskDetail.getShipmentDetailId());
  1296 + throw new JeecgBootException("完成出库任务, 出库任务没有找到出库详情" + taskDetail.getShipmentDetailId());
1297 1297 }
1298 1298 taskDetail.setShipmentCode(shipmentDetail.getShipmentCode());
1299 1299 if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) == 0) {
... ... @@ -1301,32 +1301,32 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1301 1301 } else if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) > 0) {
1302 1302 shipmentDetail.setStatus(QuantityConstant.SHIPMENT_HEADER_OFF_SHELF);
1303 1303 } else if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) < 0) {
1304   - throw new ServiceException("完成出库任务时, 出库单 单据数量不能小于配盘数量");
  1304 + throw new JeecgBootException("完成出库任务时, 出库单 单据数量不能小于配盘数量");
1305 1305 }
1306 1306 shipmentDetailList.add(shipmentDetail);
1307 1307 InventoryDetail inventoryDetail = inventoryDetailService.getById(taskDetail.getFromInventoryDetailId());
1308 1308 if (inventoryDetail == null) {
1309   - throw new ServiceException("完成出库任务,出库任务没有找到库存详情" + taskDetail.getFromInventoryDetailId());
  1309 + throw new JeecgBootException("完成出库任务,出库任务没有找到库存详情" + taskDetail.getFromInventoryDetailId());
1310 1310 }
1311 1311 inventoryDetail.setTaskQty(inventoryDetail.getTaskQty().subtract(taskDetail.getQty()));
1312 1312 inventoryDetail.setQty(inventoryDetail.getQty().subtract(taskDetail.getQty()));
1313 1313 inventoryDetail.setLocationCode(toLocationCode);
1314 1314 // 扣减后的库存不能小于0
1315 1315 if (inventoryDetail.getQty().compareTo(BigDecimal.ZERO) < 0) {
1316   - throw new ServiceException("完成出库任务,扣减库存大于wms库存");
  1316 + throw new JeecgBootException("完成出库任务,扣减库存大于wms库存");
1317 1317 }
1318 1318 if (inventoryDetail.getQty().compareTo(BigDecimal.ZERO) == 0) {
1319 1319 if (inventoryDetail.getTaskQty().compareTo(BigDecimal.ZERO) != 0) {
1320   - throw new ServiceException("完成出库任务,扣减库存的库存详情任务数量不为0");
  1320 + throw new JeecgBootException("完成出库任务,扣减库存的库存详情任务数量不为0");
1321 1321 }
1322 1322 success = inventoryDetailService.removeById(inventoryDetail.getId());
1323 1323 if (!success) {
1324   - throw new ServiceException("完成出库任务,删除库存详情失败");
  1324 + throw new JeecgBootException("完成出库任务,删除库存详情失败");
1325 1325 }
1326 1326 } else {
1327 1327 success = inventoryDetailService.updateById(inventoryDetail);
1328 1328 if (!success) {
1329   - throw new ServiceException("完成出库任务,更新库存详情失败");
  1329 + throw new JeecgBootException("完成出库任务,更新库存详情失败");
1330 1330 }
1331 1331 }
1332 1332  
... ... @@ -1356,78 +1356,78 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1356 1356 if (inventoryDetailList.size() == 0) {
1357 1357 success = inventoryHeaderService.removeById(inventoryHeader.getId());
1358 1358 if (!success) {
1359   - throw new ServiceException("完成出库任务,删除库存头失败");
  1359 + throw new JeecgBootException("完成出库任务,删除库存头失败");
1360 1360 }
1361 1361 containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY;
1362 1362 } else {
1363 1363 if (taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT) {
1364   - throw new ServiceException("完成整盘出库任务,不能还剩库存详情");
  1364 + throw new JeecgBootException("完成整盘出库任务,不能还剩库存详情");
1365 1365 }
1366 1366 containerStatus = QuantityConstant.STATUS_CONTAINER_SOME;
1367 1367 inventoryHeader.setContainerStatus(containerStatus);
1368 1368 inventoryHeader.setLocationCode(toLocationCode);
1369 1369 success = inventoryHeaderService.updateById(inventoryHeader);
1370 1370 if (!success) {
1371   - throw new ServiceException("完成出库任务,更新库存头失败");
  1371 + throw new JeecgBootException("完成出库任务,更新库存头失败");
1372 1372 }
1373 1373 }
1374 1374 success = inventoryTransactionService.saveBatch(inventoryTransactionList);
1375 1375 if (!success) {
1376   - throw new ServiceException("完成出库任务,保存库存详情失败");
  1376 + throw new JeecgBootException("完成出库任务,保存库存详情失败");
1377 1377 }
1378 1378 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
1379 1379 success = taskHeaderService.updateById(taskHeader);
1380 1380 if (!success) {
1381   - throw new ServiceException("完成出库任务,保存任务头失败");
  1381 + throw new JeecgBootException("完成出库任务,保存任务头失败");
1382 1382 }
1383 1383 if (taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT) {
1384 1384 success =
1385 1385 locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1386 1386 if (!success) {
1387   - throw new ServiceException("完成整盘出库任务,更新源库位失败");
  1387 + throw new JeecgBootException("完成整盘出库任务,更新源库位失败");
1388 1388 }
1389 1389 containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
1390 1390 if (!success) {
1391   - throw new ServiceException("完成整盘出库任务,更新容器失败");
  1391 + throw new JeecgBootException("完成整盘出库任务,更新容器失败");
1392 1392 }
1393 1393 } else if (taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT) {
1394 1394 success =
1395 1395 locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1396 1396 if (!success) {
1397   - throw new ServiceException("完成分拣出库任务,更新源库位失败");
  1397 + throw new JeecgBootException("完成分拣出库任务,更新源库位失败");
1398 1398 }
1399 1399 success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1400 1400 if (!success) {
1401   - throw new ServiceException("完成分拣出库任务,更新目标库位失败");
  1401 + throw new JeecgBootException("完成分拣出库任务,更新目标库位失败");
1402 1402 }
1403 1403 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, containerStatus, warehouseCode);
1404 1404 if (!success) {
1405   - throw new ServiceException("完成分拣出库任务,更新容器失败");
  1405 + throw new JeecgBootException("完成分拣出库任务,更新容器失败");
1406 1406 }
1407 1407 }
1408 1408 ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(taskHeader.getShipmentContainerHeaderId());
1409 1409 if (shipmentContainerHeader == null) {
1410   - throw new ServiceException("完成出库任务,获取出库组盘头失败");
  1410 + throw new JeecgBootException("完成出库任务,获取出库组盘头失败");
1411 1411 }
1412 1412 shipmentContainerHeader.setStatus(QuantityConstant.SHIPMENT_CONTAINER_FINISHED);
1413 1413 success = shipmentContainerHeaderService.updateById(shipmentContainerHeader);
1414 1414 if (!success) {
1415   - throw new ServiceException("完成出库任务,更新出库组盘头失败");
  1415 + throw new JeecgBootException("完成出库任务,更新出库组盘头失败");
1416 1416 }
1417 1417 if (inventoryDetailList.size() != 0) {
1418 1418 if (!combineInventoryDetail(taskHeader)) {
1419   - throw new ServiceException("合并入库库存失败");
  1419 + throw new JeecgBootException("合并入库库存失败");
1420 1420 }
1421 1421 }
1422 1422 success = shipmentDetailService.updateBatchById(shipmentDetailList);
1423 1423 if (!success) {
1424   - throw new ServiceException("完成出库任务,更新出库详情失败");
  1424 + throw new JeecgBootException("完成出库任务,更新出库详情失败");
1425 1425 }
1426 1426 shipmentIdList = shipmentIdList.stream().distinct().collect(Collectors.toList());
1427 1427 for (Integer shipmentId : shipmentIdList) {
1428 1428 success = shipmentHeaderService.updateShipmentHeaderStatus(shipmentId);
1429 1429 if (!success) {
1430   - throw new ServiceException("完成出库任务,更新出库单头失败");
  1430 + throw new JeecgBootException("完成出库任务,更新出库单头失败");
1431 1431 }
1432 1432 }
1433 1433 // 操作记录添加
... ... @@ -1446,11 +1446,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1446 1446  
1447 1447 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
1448 1448 if (inventoryHeader == null) {
1449   - throw new ServiceException("合并库存时, 没有找到库存头");
  1449 + throw new JeecgBootException("合并库存时, 没有找到库存头");
1450 1450 }
1451 1451 List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByInventoryHeaderId(inventoryHeader.getId());
1452 1452 if (inventoryDetailList.size() == 0) {
1453   - throw new ServiceException("合并库存时, 没有找到库存详情");
  1453 + throw new JeecgBootException("合并库存时, 没有找到库存详情");
1454 1454 }
1455 1455 for (int i = 0; i < inventoryDetailList.size() - 1; i++) {
1456 1456 for (int j = inventoryDetailList.size() - 1; j > i; j--) {
... ... @@ -1462,11 +1462,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1462 1462 inventoryDetail1.setQty(totalQty);
1463 1463 success = inventoryDetailService.updateById(inventoryDetail1);
1464 1464 if (!success) {
1465   - throw new ServiceException("合并库存时, 更新库存详情失败:" + inventoryDetail1.getId());
  1465 + throw new JeecgBootException("合并库存时, 更新库存详情失败:" + inventoryDetail1.getId());
1466 1466 }
1467 1467 success = inventoryDetailService.removeById(inventoryDetail2.getId());
1468 1468 if (!success) {
1469   - throw new ServiceException("合并库存时, 删除库存详情失败:" + inventoryDetail2.getId());
  1469 + throw new JeecgBootException("合并库存时, 删除库存详情失败:" + inventoryDetail2.getId());
1470 1470 }
1471 1471 inventoryDetailList.remove(j);
1472 1472 }
... ... @@ -1480,7 +1480,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1480 1480 }
1481 1481 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
1482 1482 if (container == null) {
1483   - throw new ServiceException("合并库存时, 没有找到容器, 容器号为" + containerCode);
  1483 + throw new JeecgBootException("合并库存时, 没有找到容器, 容器号为" + containerCode);
1484 1484 }
1485 1485 inventoryHeader.setTotalQty(totalQty);
1486 1486 inventoryHeader.setTotalLines(totalLines);
... ... @@ -1519,16 +1519,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1519 1519 }
1520 1520 boolean success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
1521 1521 if (!success) {
1522   - throw new ServiceException("完成空托盘入库任务时, 更新容器的库位号和状态失败");
  1522 + throw new JeecgBootException("完成空托盘入库任务时, 更新容器的库位号和状态失败");
1523 1523 }
1524 1524 success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1525 1525 if (!success) {
1526   - throw new ServiceException("完成空托盘入库任务时, 更新库位的容器号和状态失败");
  1526 + throw new JeecgBootException("完成空托盘入库任务时, 更新库位的容器号和状态失败");
1527 1527 }
1528 1528 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
1529 1529 success = taskHeaderService.updateById(taskHeader);
1530 1530 if (!success) {
1531   - throw new ServiceException("完成空托盘入库任务时, 更新任务失败");
  1531 + throw new JeecgBootException("完成空托盘入库任务时, 更新任务失败");
1532 1532 }
1533 1533 return Result.OK("完成空托盘入库成功");
1534 1534 }
... ... @@ -1587,13 +1587,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1587 1587  
1588 1588 for (CycleCountDetailChild child : children) {
1589 1589 if (!child.getChildStatus().equals(QuantityConstant.CYCLECOUNT_STATUS_REGISTERED)) {
1590   - throw new ServiceException("当前任务里面还有没有进行登记的数据,不能完成任务");
  1590 + throw new JeecgBootException("当前任务里面还有没有进行登记的数据,不能完成任务");
1591 1591 }
1592 1592  
1593 1593 if (child.getInventoryDetaiId() != null) {
1594 1594 InventoryDetail inventoryDetail = inventoryDetailService.getById(child.getInventoryDetaiId());
1595 1595 if (inventoryDetail == null) {
1596   - throw new ServiceException("盘点还没完成 库存明细单据就不存在了 可能出现了问题或者所容器没成功");
  1596 + throw new JeecgBootException("盘点还没完成 库存明细单据就不存在了 可能出现了问题或者所容器没成功");
1597 1597 }
1598 1598 inventoryHeader.setTotalQty(inventoryHeader.getTotalQty().add(child.getGapQty()));
1599 1599 inventoryDetail.setQty(child.getCountedQty());
... ... @@ -1748,7 +1748,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1748 1748  
1749 1749 // 4.完成当前任务
1750 1750 if (!taskHeaderService.saveOrUpdate(taskHeader)) {
1751   - throw new ServiceException("盘点任务单据状态更新失败!");
  1751 + throw new JeecgBootException("盘点任务单据状态更新失败!");
1752 1752 }
1753 1753 // 盘点明细状态
1754 1754 cycleCountDetail.setEnableStatus(QuantityConstant.CYCLECOUNT_STATUS_COMPLETED);
... ... @@ -1771,12 +1771,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1771 1771 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
1772 1772 }
1773 1773 if (!success) {
1774   - throw new ServiceException("完成出库查看任务时,更新容器状态失败");
  1774 + throw new JeecgBootException("完成出库查看任务时,更新容器状态失败");
1775 1775 }
1776 1776 } else {
1777 1777 success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
1778 1778 if (!success) {
1779   - throw new ServiceException("完成出库查看任务时,更新容器状态失败");
  1779 + throw new JeecgBootException("完成出库查看任务时,更新容器状态失败");
1780 1780 }
1781 1781 }
1782 1782 return Result.OK("完成盘点任务成功");
... ... @@ -1822,17 +1822,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1822 1822 boolean success =
1823 1823 containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
1824 1824 if (!success) {
1825   - throw new ServiceException("完成空托盘出库任务时, 更新容器的库位号和状态失败");
  1825 + throw new JeecgBootException("完成空托盘出库任务时, 更新容器的库位号和状态失败");
1826 1826 }
1827 1827 success =
1828 1828 locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1829 1829 if (!success) {
1830   - throw new ServiceException("完成空托盘出库任务时, 更新库位的容器号和状态失败");
  1830 + throw new JeecgBootException("完成空托盘出库任务时, 更新库位的容器号和状态失败");
1831 1831 }
1832 1832 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
1833 1833 success = taskHeaderService.updateById(taskHeader);
1834 1834 if (!success) {
1835   - throw new ServiceException("完成空托盘出库任务时, 更新任务失败");
  1835 + throw new JeecgBootException("完成空托盘出库任务时, 更新任务失败");
1836 1836 }
1837 1837 return Result.OK("完成空托盘出库成功");
1838 1838 }
... ... @@ -1892,39 +1892,39 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1892 1892 if (inventoryTransactionList.size() > 0) {
1893 1893 success = inventoryTransactionService.saveBatch(inventoryTransactionList);
1894 1894 if (!success) {
1895   - throw new ServiceException("完成移库任务时,保存库存交易失败");
  1895 + throw new JeecgBootException("完成移库任务时,保存库存交易失败");
1896 1896 }
1897 1897 }
1898 1898 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
1899 1899 success = taskHeaderService.updateById(taskHeader);
1900 1900 if (!success) {
1901   - throw new ServiceException("完成移库任务时, 更新任务失败");
  1901 + throw new JeecgBootException("完成移库任务时, 更新任务失败");
1902 1902 }
1903 1903 if (inventoryDetailList.size() > 0) {
1904 1904 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode);
1905 1905 if (!success) {
1906   - throw new ServiceException("完成移库任务时, 更新容器状态失败");
  1906 + throw new JeecgBootException("完成移库任务时, 更新容器状态失败");
1907 1907 }
1908 1908 } else {
1909 1909 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
1910 1910 if (!success) {
1911   - throw new ServiceException("完成移库任务时, 更新容器状态失败");
  1911 + throw new JeecgBootException("完成移库任务时, 更新容器状态失败");
1912 1912 }
1913 1913 }
1914 1914 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
1915 1915 container.setLastStatus(QuantityConstant.EMPTY_STRING);
1916 1916 success = containerService.updateById(container);
1917 1917 if (!success) {
1918   - throw new ServiceException("完成移库任务时, 更新容器状态失败");
  1918 + throw new JeecgBootException("完成移库任务时, 更新容器状态失败");
1919 1919 }
1920 1920 success =
1921 1921 locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1922 1922 if (!success) {
1923   - throw new ServiceException("完成移库任务时, 更新起始库位状态失败");
  1923 + throw new JeecgBootException("完成移库任务时, 更新起始库位状态失败");
1924 1924 }
1925 1925 success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
1926 1926 if (!success) {
1927   - throw new ServiceException("完成移库任务时, 更新目标库位状态失败");
  1927 + throw new JeecgBootException("完成移库任务时, 更新目标库位状态失败");
1928 1928 }
1929 1929 LambdaUpdateWrapper<InventoryHeader> inventoryHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate();
1930 1930 inventoryHeaderLambdaUpdateWrapper.eq(InventoryHeader::getWarehouseCode, warehouseCode).eq(InventoryHeader::getContainerCode, containerCode)
... ... @@ -1934,13 +1934,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1934 1934 inventoryHeader.setLocationCode(toLocationCode);
1935 1935 success = inventoryHeaderService.updateById(inventoryHeader);
1936 1936 if (!success) {
1937   - throw new ServiceException("完成移库任务时, 更新库存头失败");
  1937 + throw new JeecgBootException("完成移库任务时, 更新库存头失败");
1938 1938 }
1939 1939 }
1940 1940 if (inventoryDetailList.size() != 0) {
1941 1941 success = inventoryDetailService.updateBatchById(inventoryDetailList);
1942 1942 if (!success) {
1943   - throw new ServiceException("完成移库任务时, 更新库存详情失败");
  1943 + throw new JeecgBootException("完成移库任务时, 更新库存详情失败");
1944 1944 }
1945 1945 }
1946 1946 return Result.OK("完成移库任务成功");
... ... @@ -1988,16 +1988,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1988 1988 }
1989 1989 success = inventoryDetailService.updateBatchById(inventoryDetailList);
1990 1990 if (!success) {
1991   - throw new ServiceException("完成出库查看任务时,更新库存详情失败");
  1991 + throw new JeecgBootException("完成出库查看任务时,更新库存详情失败");
1992 1992 }
1993 1993 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
1994 1994 if (inventoryHeader == null) {
1995   - throw new ServiceException("完成出库查看任务时,没有找到库存头");
  1995 + throw new JeecgBootException("完成出库查看任务时,没有找到库存头");
1996 1996 }
1997 1997 inventoryHeader.setLocationCode(toLocationCode);
1998 1998 success = inventoryHeaderService.updateById(inventoryHeader);
1999 1999 if (!success) {
2000   - throw new ServiceException("完成出库查看任务时,更新库存头失败");
  2000 + throw new JeecgBootException("完成出库查看任务时,更新库存头失败");
2001 2001 }
2002 2002 if (fromLocationCode.equals(toLocationCode)) {
2003 2003 success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode);
... ... @@ -2005,27 +2005,27 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2005 2005 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_SOME, warehouseCode);
2006 2006 }
2007 2007 if (!success) {
2008   - throw new ServiceException("完成出库查看任务时,更新容器状态失败");
  2008 + throw new JeecgBootException("完成出库查看任务时,更新容器状态失败");
2009 2009 }
2010 2010 } else {
2011 2011 success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
2012 2012 if (!success) {
2013   - throw new ServiceException("完成出库查看任务时,更新容器状态失败");
  2013 + throw new JeecgBootException("完成出库查看任务时,更新容器状态失败");
2014 2014 }
2015 2015 }
2016 2016 success =
2017 2017 locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2018 2018 if (!success) {
2019   - throw new ServiceException("完成出库查看任务时,更新起始库位状态失败");
  2019 + throw new JeecgBootException("完成出库查看任务时,更新起始库位状态失败");
2020 2020 }
2021 2021 success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2022 2022 if (!success) {
2023   - throw new ServiceException("完成出库查看任务时,更新目标库位状态失败");
  2023 + throw new JeecgBootException("完成出库查看任务时,更新目标库位状态失败");
2024 2024 }
2025 2025 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
2026 2026 success = taskHeaderService.updateById(taskHeader);
2027 2027 if (!success) {
2028   - throw new ServiceException("完成出库查看任务时,保存任务失败");
  2028 + throw new JeecgBootException("完成出库查看任务时,保存任务失败");
2029 2029 }
2030 2030 return Result.ok("完成出库查看任务");
2031 2031 }
... ... @@ -2069,11 +2069,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2069 2069 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
2070 2070 boolean success = taskHeaderService.updateById(taskHeader);
2071 2071 if (!success) {
2072   - throw new ServiceException("创建跨站任务时, 更新任务失败");
  2072 + throw new JeecgBootException("创建跨站任务时, 更新任务失败");
2073 2073 }
2074 2074 success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
2075 2075 if (!success) {
2076   - throw new ServiceException("创建跨站任务时, 更新容器状态失败");
  2076 + throw new JeecgBootException("创建跨站任务时, 更新容器状态失败");
2077 2077 }
2078 2078 return Result.OK("完成跨站任务成功");
2079 2079 }
... ... @@ -2109,15 +2109,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2109 2109 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
2110 2110 boolean success = taskHeaderService.updateById(taskHeader);
2111 2111 if (!success) {
2112   - throw new ServiceException("完成空托盘组入库任务时, 更新任务失败");
  2112 + throw new JeecgBootException("完成空托盘组入库任务时, 更新任务失败");
2113 2113 }
2114 2114 success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_MANY, warehouseCode);
2115 2115 if (!success) {
2116   - throw new ServiceException("完成空托盘组入库任务时, 更新容器失败");
  2116 + throw new JeecgBootException("完成空托盘组入库任务时, 更新容器失败");
2117 2117 }
2118 2118 success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2119 2119 if (!success) {
2120   - throw new ServiceException("完成空托盘组入库任务时, 更新库位失败");
  2120 + throw new JeecgBootException("完成空托盘组入库任务时, 更新库位失败");
2121 2121 }
2122 2122 return Result.ok("完成空托盘组入库任务成功");
2123 2123 }
... ... @@ -2157,15 +2157,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2157 2157 taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
2158 2158 boolean success = taskHeaderService.updateById(taskHeader);
2159 2159 if (!success) {
2160   - throw new ServiceException("完成空托盘组出库任务时, 更新任务失败");
  2160 + throw new JeecgBootException("完成空托盘组出库任务时, 更新任务失败");
2161 2161 }
2162 2162 success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2163 2163 if (!success) {
2164   - throw new ServiceException("完成空托盘组出库任务时, 更新容器失败");
  2164 + throw new JeecgBootException("完成空托盘组出库任务时, 更新容器失败");
2165 2165 }
2166 2166 success = locationService.updateContainerCodeAndStatus(toLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2167 2167 if (!success) {
2168   - throw new ServiceException("完成空托盘组出库任务时, 更新库位失败");
  2168 + throw new JeecgBootException("完成空托盘组出库任务时, 更新库位失败");
2169 2169 }
2170 2170 return Result.ok("完成空托盘组出库任务成功");
2171 2171 }
... ... @@ -2180,21 +2180,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2180 2180 public Result cancelReceiptTask(TaskHeader taskHeader) {
2181 2181 boolean success = receiptContainerHeaderService.cancelReceiptTask(taskHeader);
2182 2182 if (!success) {
2183   - throw new ServiceException("取消入库任务时, 更新组盘头状态失败");
  2183 + throw new JeecgBootException("取消入库任务时, 更新组盘头状态失败");
2184 2184 }
2185 2185 String containerCode = taskHeader.getContainerCode();
2186 2186 String warehouseCode = taskHeader.getWarehouseCode();
2187 2187 ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getUnCompleteReceiptContainerByCode(containerCode, warehouseCode);
2188 2188 String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION);
2189 2189 if (StringUtils.isEmpty(value)) {
2190   - throw new ServiceException("取消入库任务时, 没有获取到配置属性");
  2190 + throw new JeecgBootException("取消入库任务时, 没有获取到配置属性");
2191 2191 }
2192 2192 int taskLocationRule = Integer.parseInt(value);
2193 2193 if (taskLocationRule == QuantityConstant.RULE_TASK_NOT_LOCATION) {
2194 2194 receiptContainerHeader.setToLocationCode(QuantityConstant.EMPTY_STRING);
2195 2195 success = receiptContainerHeaderService.updateById(receiptContainerHeader);
2196 2196 if (!success) {
2197   - throw new ServiceException("取消入库任务时, 更新组盘头状态失败!!");
  2197 + throw new JeecgBootException("取消入库任务时, 更新组盘头状态失败!!");
2198 2198 }
2199 2199 }
2200 2200 return Result.ok("取消入库任务成功");
... ... @@ -2210,7 +2210,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2210 2210 public Result cancelShipmentTask(TaskHeader taskHeader) {
2211 2211 boolean success = shipmentContainerHeaderService.cancelShipmentTask(taskHeader);
2212 2212 if (!success) {
2213   - throw new ServiceException("取消入库任务时, 更新组盘头状态失败");
  2213 + throw new JeecgBootException("取消入库任务时, 更新组盘头状态失败");
2214 2214 }
2215 2215 return Result.ok("取消出库任务成功");
2216 2216 }
... ... @@ -2231,26 +2231,26 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2231 2231 if (StringUtils.isNotEmpty(fromLocationCode)) {
2232 2232 success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2233 2233 if (!success) {
2234   - throw new ServiceException("取消任务时, 更新起始库位状态失败");
  2234 + throw new JeecgBootException("取消任务时, 更新起始库位状态失败");
2235 2235 }
2236 2236 }
2237 2237 if (StringUtils.isNotEmpty(toLocationCode)) {
2238 2238 success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2239 2239 if (!success) {
2240   - throw new ServiceException("取消任务时, 更新目标库位状态失败");
  2240 + throw new JeecgBootException("取消任务时, 更新目标库位状态失败");
2241 2241 }
2242 2242 }
2243 2243 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
2244 2244 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
2245 2245 if (container == null) {
2246   - throw new ServiceException("取消任务时, 没有找到容器");
  2246 + throw new JeecgBootException("取消任务时, 没有找到容器");
2247 2247 }
2248 2248 if (inventoryHeader != null) {
2249 2249 container.setStatus(QuantityConstant.STATUS_CONTAINER_SOME);
2250 2250 inventoryHeader.setContainerStatus(QuantityConstant.STATUS_CONTAINER_SOME);
2251 2251 success = inventoryHeaderService.updateById(inventoryHeader);
2252 2252 if (!success) {
2253   - throw new ServiceException("取消任务时, 更新库存成功");
  2253 + throw new JeecgBootException("取消任务时, 更新库存成功");
2254 2254 }
2255 2255 } else {
2256 2256 container.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY);
... ... @@ -2262,14 +2262,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2262 2262 // if (StringUtils.isNotEmpty(fromLocationCode)) {
2263 2263 // success = containerService.havaLocationCodeByContainer(fromLocationCode, warehouseCode);
2264 2264 // if (success) {
2265   -// throw new ServiceException("库位表已经存在这个容器号,不能再写入");
  2265 +// throw new JeecgBootException("库位表已经存在这个容器号,不能再写入");
2266 2266 // }
2267 2267 // }
2268 2268 container.setLastStatus(QuantityConstant.EMPTY_STRING);
2269 2269 // container.setLocationCode(fromLocationCode);
2270 2270 success = containerService.updateById(container);
2271 2271 if (!success) {
2272   - throw new ServiceException("取消任务时, 更新容器失败");
  2272 + throw new JeecgBootException("取消任务时, 更新容器失败");
2273 2273 }
2274 2274 return Result.ok("取消任务成功");
2275 2275 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/OkHttpUtils.java
... ... @@ -3,7 +3,7 @@ package org.jeecg.utils;
3 3 import com.alibaba.fastjson.JSON;
4 4 import com.alibaba.fastjson.TypeReference;
5 5 import com.alibaba.fastjson.parser.Feature;
6   -import com.aliyun.oss.ServiceException;
  6 +import org.jeecg.common.exception.JeecgBootException;
7 7 import com.xkcoding.http.util.StringUtil;
8 8  
9 9 import antlr.StringUtils;
... ... @@ -120,7 +120,7 @@ public class OkHttpUtils {
120 120 } else {
121 121 String errorString = StrUtil.format("执行GET请求失败,url:{},header:{},param:{},responseCode:{},responseMessage:{}", url,
122 122 JSON.toJSONString(headers), param, response.code(), response.message());
123   - throw new ServiceException(errorString);
  123 + throw new JeecgBootException(errorString);
124 124 }
125 125 return result;
126 126 }
... ...
huaheng-wms-core/src/main/resources/application-dev.yml
... ... @@ -131,7 +131,7 @@ spring:
131 131 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
132 132 datasource:
133 133 master:
134   - url: jdbc:mysql://127.0.0.1:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
  134 + url: jdbc:mysql://localhost:3306/wms4?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
135 135 username: root
136 136 password: HHsoft123.
137 137 driver-class-name: com.mysql.cj.jdbc.Driver
... ... @@ -149,9 +149,9 @@ spring:
149 149 #redis 配置
150 150 redis:
151 151 database: 0
152   - host: 127.0.0.1
  152 + host: 172.16.29.77
153 153 port: 6379
154   - password: ""
  154 + password: 123456
155 155 lettuce:
156 156 pool:
157 157 min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
... ... @@ -198,7 +198,8 @@ jeecg:
198 198 #webapp文件路径
199 199 webapp: ./webapp
200 200 shiro:
201   - excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/test/test**,/api/**,/sys/cas/client/validateLogin #阿里云oss存储和大鱼短信秘钥配置
  201 + excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/sys/getWarehouseByUserCode,/api/**,/sys/cas/client/validateLogin,/sys/common/static/**
  202 + #阿里云oss存储和大鱼短信秘钥配置
202 203 oss:
203 204 accessKey: ??
204 205 secretKey: ??
... ...
huaheng-wms-core/src/main/resources/application-test.yml
... ... @@ -190,8 +190,8 @@ jeecg:
190 190 signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
191 191 # 本地:local\Minio:minio\阿里云:alioss
192 192 uploadType: local
193   - # 允许上传的文件类型,使用,分割
194   - uploadFileType: apk,txt,jpg,png
  193 + # 允许上传的文件类型 使用,分割
  194 + uploadFileType: apk,txt,jpg,png,sh
195 195 path:
196 196 #文件上传根目录 设置
197 197 upload: ./upFiles
... ...