Commit 156f31d0e9b189491de659fd888bab6e9c2dcf5a
1 parent
59ea08d3
feat: 换站任务创建时接收MES的JSON字符串保存,任务完成回传时再返回MES
Showing
12 changed files
with
159 additions
and
36 deletions
src/main/java/com/huaheng/api/mes/controller/MesController.java
... | ... | @@ -3,6 +3,7 @@ package com.huaheng.api.mes.controller; |
3 | 3 | import com.huaheng.api.mes.domain.*; |
4 | 4 | import com.huaheng.api.mes.service.MesService; |
5 | 5 | import com.huaheng.common.constant.QuantityConstant; |
6 | +import com.huaheng.common.exception.service.ServiceException; | |
6 | 7 | import com.huaheng.common.utils.StringUtils; |
7 | 8 | import com.huaheng.framework.aspectj.lang.annotation.ApiLogger; |
8 | 9 | import com.huaheng.framework.web.controller.BaseController; |
... | ... | @@ -31,7 +32,7 @@ public class MesController extends BaseController { |
31 | 32 | |
32 | 33 | /** |
33 | 34 | * 生成空托盘入库任务 |
34 | - * 7 料点呼叫移走空容器 | |
35 | + * 7 料点呼叫移走空载具 | |
35 | 36 | * |
36 | 37 | * @return |
37 | 38 | */ |
... | ... | @@ -277,6 +278,42 @@ public class MesController extends BaseController { |
277 | 278 | } |
278 | 279 | |
279 | 280 | /** |
281 | + * 工位之间载具流转 11 | |
282 | + * | |
283 | + * @return | |
284 | + */ | |
285 | + @PostMapping("/overStation") | |
286 | + @ApiOperation("MES载具流转") | |
287 | + @ApiLogger(apiName = "MES载具流转", from = "MES") | |
288 | + public AjaxResult overStation(@RequestBody MesOverStationDto mesOverStationDto) { | |
289 | + String containerCode = mesOverStationDto.getContainerCode(); | |
290 | + String starPort = mesOverStationDto.getStartPort(); | |
291 | + String endPort = mesOverStationDto.getEndPort(); | |
292 | + String taskNo = mesOverStationDto.getTaskNo(); | |
293 | + String vehicleCode = mesOverStationDto.getVehicleCode(); | |
294 | + String orderCode = mesOverStationDto.getOrderCode(); | |
295 | + if (StringUtils.isEmpty(containerCode)) { | |
296 | + return AjaxResult.error("containerCode 为空"); | |
297 | + } | |
298 | + if (StringUtils.isEmpty(starPort)) { | |
299 | + return AjaxResult.error("startPort 为空"); | |
300 | + } | |
301 | + if (StringUtils.isEmpty(endPort)) { | |
302 | + return AjaxResult.error("endPort 为空"); | |
303 | + } | |
304 | + if (StringUtils.isEmpty(taskNo)) { | |
305 | + return AjaxResult.error("taskNo 为空"); | |
306 | + } | |
307 | + if (StringUtils.isEmpty(vehicleCode)) { | |
308 | + return AjaxResult.error("vehicleCode 为空"); | |
309 | + } | |
310 | + if (StringUtils.isEmpty(orderCode)) { | |
311 | + return AjaxResult.error("orderCode 为空"); | |
312 | + } | |
313 | + return handleMultiProcess(() -> mesService.createOverStation(mesOverStationDto)); | |
314 | + } | |
315 | + | |
316 | + /** | |
280 | 317 | * MES物料入库 |
281 | 318 | * 6 料点呼叫移走物料 |
282 | 319 | * |
... | ... | @@ -505,15 +542,15 @@ public class MesController extends BaseController { |
505 | 542 | } |
506 | 543 | |
507 | 544 | /** |
508 | - * 空容器入库出库回传 | |
545 | + * 工位之间载具流转回传 | |
509 | 546 | */ |
510 | - @PostMapping("/backEmpty") | |
547 | + @PostMapping("/backChangeStation") | |
511 | 548 | @ResponseBody |
512 | - @ApiLogger(from = "WMS", to = "MES", apiName = "空容器任务回传") | |
549 | + @ApiLogger(from = "WMS", to = "MES", apiName = "工位之间载具流转回传") | |
513 | 550 | public AjaxResult backEmpty(String id) { |
514 | 551 | if (StringUtils.isEmpty(id)) { |
515 | - return AjaxResult.error("id不能为空"); | |
552 | + return AjaxResult.error("任务id不能为空"); | |
516 | 553 | } |
517 | - return mesService.backEmpty(id); | |
554 | + return mesService.backChangeStation(id); | |
518 | 555 | } |
519 | 556 | } |
... | ... |
src/main/java/com/huaheng/api/mes/domain/MesOverStationDto.java
0 → 100644
src/main/java/com/huaheng/api/mes/domain/MesReturn.java
... | ... | @@ -6,16 +6,68 @@ import java.util.List; |
6 | 6 | |
7 | 7 | @Data |
8 | 8 | public class MesReturn { |
9 | + /** | |
10 | + * 任务号 | |
11 | + */ | |
9 | 12 | private String taskNo; |
13 | + | |
14 | + /** | |
15 | + * 任务状态 | |
16 | + */ | |
10 | 17 | private Integer taskStatus; |
18 | + | |
19 | + /** | |
20 | + * 工单号 | |
21 | + */ | |
11 | 22 | private String orderCode; |
23 | + | |
24 | + /** | |
25 | + * 领料单号 | |
26 | + */ | |
12 | 27 | private String shipmentReferCode; |
28 | + | |
29 | + /** | |
30 | + * 载具类型编码 | |
31 | + */ | |
13 | 32 | private String containerTypeCode; |
33 | + | |
34 | + /** | |
35 | + * 载具编码 | |
36 | + */ | |
14 | 37 | private String containerCode; |
38 | + | |
39 | + /** | |
40 | + * 料点编码。入库时代表fromPort,出库时代表toPort | |
41 | + */ | |
15 | 42 | private String toPort; |
43 | + | |
44 | + /** | |
45 | + * 盛具编码 | |
46 | + */ | |
16 | 47 | private String vehicleCode; |
48 | + | |
49 | + /** | |
50 | + * 盛具类型编码 | |
51 | + */ | |
17 | 52 | private String vehicleTypeCode; |
53 | + | |
54 | + /** | |
55 | + * x轴最大列 | |
56 | + */ | |
18 | 57 | private Integer maxX; |
58 | + | |
59 | + /** | |
60 | + * y轴最大列 | |
61 | + */ | |
19 | 62 | private Integer maxY; |
63 | + | |
64 | + /** | |
65 | + * 物料信息 | |
66 | + */ | |
20 | 67 | private List<MaterialData> materialDataList; |
68 | + | |
69 | + /** | |
70 | + * 接收MES传来的某些信息,字段先随便写 | |
71 | + */ | |
72 | + private String temp; | |
21 | 73 | } |
... | ... |
src/main/java/com/huaheng/api/mes/service/MesService.java
... | ... | @@ -59,4 +59,9 @@ public interface MesService { |
59 | 59 | List<InventoryDetail> lockRawInventory(List<InventoryDetail> inventoryList, |
60 | 60 | MesOrderMaterial mesOrderMaterial, |
61 | 61 | MesShipmentOrder mesShipmentOrder); |
62 | + | |
63 | + /** | |
64 | + * 载具工位之间流转 | |
65 | + */ | |
66 | + AjaxResult createOverStation(MesOverStationDto mesOverStationDto); | |
62 | 67 | } |
... | ... |
src/main/java/com/huaheng/api/mes/service/MesServiceImpl.java
... | ... | @@ -351,6 +351,20 @@ public class MesServiceImpl implements MesService { |
351 | 351 | return invList; |
352 | 352 | } |
353 | 353 | |
354 | + @Override | |
355 | + public AjaxResult createOverStation(MesOverStationDto mesOverStationDto) { | |
356 | + Container container = containerService.getContainerByCode(mesOverStationDto.getContainerCode()); | |
357 | + Vehicle vehicle = vehicleService.getVehicleByCode(mesOverStationDto.getVehicleCode()); | |
358 | + String fromPort = mesOverStationDto.getStartPort(); | |
359 | + String toPort = mesOverStationDto.getEndPort(); | |
360 | + String temp = mesOverStationDto.getTemp(); | |
361 | + boolean success = taskHeaderService.createOverStationTask(container, vehicle, fromPort, toPort, temp); | |
362 | + if (!success){ | |
363 | + throw new ServiceException("换站失败,创建换站任务失败"); | |
364 | + } | |
365 | + return AjaxResult.success("创建换站任务成功"); | |
366 | + } | |
367 | + | |
354 | 368 | public List<ShipmentDetail> crateShipmentDetailByInventory(List<InventoryDetail> invList, |
355 | 369 | ShipmentHeader shipmentHeader, |
356 | 370 | MesOrderMaterial mesOrderMaterial, MesShipmentOrder mesShipmentOrder) { |
... | ... | @@ -518,7 +532,7 @@ public class MesServiceImpl implements MesService { |
518 | 532 | //原材料、半成品入库 没有入库单,需手动生成入库单。余料退库不生成入库单 |
519 | 533 | mesService.receiptOrder(mesOrder); |
520 | 534 | // 新建保存组盘头表记录 |
521 | - // 根据容器编码查询组盘表头记录 | |
535 | + // 根据载具编码查询组盘表头记录 | |
522 | 536 | LambdaQueryWrapper<ReceiptContainerHeader> lambda = Wrappers.lambdaQuery(); |
523 | 537 | lambda.eq(ReceiptContainerHeader::getContainerCode, mesReceipt.getContainerCode()) |
524 | 538 | .eq(ReceiptContainerHeader::getStatus, QuantityConstant.RECEIPT_CONTAINER_BUILD); |
... | ... | @@ -826,10 +840,13 @@ public class MesServiceImpl implements MesService { |
826 | 840 | List<MaterialData> materialDataList = new ArrayList<>(); |
827 | 841 | taskDetailList.forEach(taskDetail -> { |
828 | 842 | MaterialData materialData = new MaterialData(); |
829 | - materialData.setIsMaterial(StringUtils.isEmpty(taskDetail.getOrderCode())); | |
843 | + materialData.setIsMaterial(taskDetail.getIsMaterial()); | |
830 | 844 | materialData.setMaterialCode(taskDetail.getMaterialCode()); |
831 | 845 | materialData.setQty(taskDetail.getQty()); |
832 | 846 | materialData.setTracingNo(taskDetail.getTracingNo()); |
847 | + materialData.setSupplierCode(taskDetail.getSupplierCode()); | |
848 | + materialData.setTracingNo(taskDetail.getTracingNo()); | |
849 | + materialData.setBatch(taskDetail.getBatch()); | |
833 | 850 | // materialData.setSequence(); |
834 | 851 | materialData.setLocationNoX(taskDetail.getLocationNoX()); |
835 | 852 | materialData.setLocationNoY(taskDetail.getLocationNoY()); |
... | ... | @@ -851,12 +868,12 @@ public class MesServiceImpl implements MesService { |
851 | 868 | vehicleTypeQueryWrapper.eq(VehicleType::getCode, mesReturn.getVehicleTypeCode()); |
852 | 869 | VehicleType vehicleType = vehicleTypeService.getOne(vehicleTypeQueryWrapper); |
853 | 870 | if (StringUtils.isNull(vehicleType)) { |
854 | - throw new ServiceException(StringUtils.format("不存在盛具编码: {}", mesReturn.getVehicleTypeCode())); | |
871 | + throw new ServiceException(StringUtils.format("出库回传失败,不存在盛具编码: {}", mesReturn.getVehicleTypeCode())); | |
855 | 872 | } |
856 | 873 | mesReturn.setMaxX(vehicleType.getMaxX()); |
857 | 874 | mesReturn.setMaxY(vehicleType.getMaxY()); |
858 | 875 | mesReturn.setMaterialDataList(materialDataList); |
859 | - String url = addressService.selectAddress(QuantityConstant.ADDRESS_MES_BACK_TASK, QuantityConstant.DEFAULT_WAREHOUSE, QuantityConstant.DEFAULT_AREA); | |
876 | + String url = addressService.selectAddress(QuantityConstant.ADDRESS_MES, QuantityConstant.DEFAULT_WAREHOUSE, QuantityConstant.DEFAULT_AREA); | |
860 | 877 | String jsonParam = JSON.toJSONString(mesReturn); |
861 | 878 | ResponseEntity<JSONObject> result = RestUtil.request_post(url, QuantityConstant.DEFAULT_WAREHOUSE, jsonParam); |
862 | 879 | if (result != null && result.getBody() != null) { |
... | ... | @@ -905,6 +922,8 @@ public class MesServiceImpl implements MesService { |
905 | 922 | details.setIsMaterial(detail.getIsMaterial()); |
906 | 923 | details.setQty(detail.getQty()); |
907 | 924 | details.setTracingNo(detail.getTracingNo()); |
925 | + details.setBatch(detail.getBatch()); | |
926 | + details.setSupplierCode(detail.getSupplierCode()); | |
908 | 927 | details.setMaterialCode(detail.getMaterialCode()); |
909 | 928 | lst.add(details); |
910 | 929 | } |
... | ... | @@ -922,7 +941,7 @@ public class MesServiceImpl implements MesService { |
922 | 941 | mesReturn.setVehicleCode(header.getVehicleCode()); |
923 | 942 | mesReturn.setVehicleTypeCode(header.getVehicleTypeCode()); |
924 | 943 | mesReturn.setMaterialDataList(lst); |
925 | - String url = addressService.selectAddress(QuantityConstant.ADDRESS_MES_BACK_TASK, QuantityConstant.DEFAULT_WAREHOUSE, QuantityConstant.DEFAULT_AREA); | |
944 | + String url = addressService.selectAddress(QuantityConstant.ADDRESS_MES, QuantityConstant.DEFAULT_WAREHOUSE, QuantityConstant.DEFAULT_AREA); | |
926 | 945 | String jsonParam = JSON.toJSONString(mesReturn); |
927 | 946 | ResponseEntity<JSONObject> result = RestUtil.request_post(url, QuantityConstant.DEFAULT_WAREHOUSE, jsonParam); |
928 | 947 | if (result != null && result.getBody() != null) { |
... | ... | @@ -948,17 +967,17 @@ public class MesServiceImpl implements MesService { |
948 | 967 | TaskHeader taskHeader = taskHeaderService.getById(id); |
949 | 968 | Container container = containerService.getContainerByCode(taskHeader.getContainerCode(), QuantityConstant.DEFAULT_WAREHOUSE); |
950 | 969 | if (StringUtils.isNull(container)) { |
951 | - throw new ServiceException("空容器入出库时,没有找到载具: ".concat(taskHeader.getContainerCode())); | |
970 | + throw new ServiceException("回传空载具入出库时,没有找到载具: ".concat(taskHeader.getContainerCode())); | |
952 | 971 | } |
953 | 972 | Vehicle vehicle = vehicleService.getVehicleByCode(taskHeader.getVehicleCode(), QuantityConstant.DEFAULT_WAREHOUSE); |
954 | 973 | if (StringUtils.isNull(vehicle)) { |
955 | - throw new ServiceException("空容器入出库时,没有找到盛具: ".concat(taskHeader.getVehicleCode())); | |
974 | + throw new ServiceException("回传空载具入出库时,没有找到盛具: ".concat(taskHeader.getVehicleCode())); | |
956 | 975 | } |
957 | 976 | LambdaQueryWrapper<VehicleType> queryWrapper = Wrappers.lambdaQuery(); |
958 | 977 | queryWrapper.eq(VehicleType::getCode, taskHeader.getVehicleType()); |
959 | 978 | VehicleType vehicleType = vehicleTypeService.getOne(queryWrapper); |
960 | 979 | if (StringUtils.isNull(vehicle)) { |
961 | - throw new ServiceException("空容器入出库时,没有找到盛具类型: ".concat(taskHeader.getVehicleType())); | |
980 | + throw new ServiceException("回传空载具入出库时,没有找到盛具类型: ".concat(taskHeader.getVehicleType())); | |
962 | 981 | } |
963 | 982 | MesReturn mesReturn = new MesReturn(); |
964 | 983 | mesReturn.setTaskNo(taskHeader.getTaskNo()); |
... | ... | @@ -976,7 +995,7 @@ public class MesServiceImpl implements MesService { |
976 | 995 | mesReturn.setVehicleTypeCode(taskHeader.getVehicleType()); |
977 | 996 | mesReturn.setMaxX(vehicleType.getMaxX()); |
978 | 997 | mesReturn.setMaxY(vehicleType.getMaxY()); |
979 | - String url = addressService.selectAddress(QuantityConstant.ADDRESS_MES_BACK_TASK, QuantityConstant.DEFAULT_WAREHOUSE, QuantityConstant.DEFAULT_AREA); | |
998 | + String url = addressService.selectAddress(QuantityConstant.ADDRESS_MES, QuantityConstant.DEFAULT_WAREHOUSE, QuantityConstant.DEFAULT_AREA); | |
980 | 999 | String jsonParam = JSON.toJSONString(mesReturn); |
981 | 1000 | ResponseEntity<JSONObject> result = RestUtil.request_post(url, QuantityConstant.DEFAULT_WAREHOUSE, jsonParam); |
982 | 1001 | if (result != null && result.getBody() != null) { |
... | ... | @@ -988,7 +1007,6 @@ public class MesServiceImpl implements MesService { |
988 | 1007 | } else { |
989 | 1008 | throw new ServiceException("接口地址错误或返回为空"); |
990 | 1009 | } |
991 | - taskHeader.setUserDef2(QuantityConstant.EMPTY_CHECK); | |
992 | 1010 | taskHeader.setIsBack(QuantityConstant.MES_TASK_BACK); |
993 | 1011 | taskHeaderService.updateById(taskHeader); |
994 | 1012 | return AjaxResult.success(mesReturn); |
... | ... | @@ -1019,7 +1037,9 @@ public class MesServiceImpl implements MesService { |
1019 | 1037 | mesReturn.setMaxX(vehicleType.getMaxX()); |
1020 | 1038 | mesReturn.setMaxY(vehicleType.getMaxY()); |
1021 | 1039 | mesReturn.setOrderCode(taskHeader.getOrderCode()); |
1022 | - String url = addressService.selectAddress(QuantityConstant.ADDRESS_MES_BACK_TASK, QuantityConstant.DEFAULT_WAREHOUSE, QuantityConstant.DEFAULT_AREA); | |
1040 | + mesReturn.setTemp(taskHeader.getUserDef2()); | |
1041 | + | |
1042 | + String url = addressService.selectAddress(QuantityConstant.ADDRESS_MES, QuantityConstant.DEFAULT_WAREHOUSE, QuantityConstant.DEFAULT_AREA); | |
1023 | 1043 | String jsonParam = JSON.toJSONString(mesReturn); |
1024 | 1044 | ResponseEntity<JSONObject> result = RestUtil.request_post(url, QuantityConstant.DEFAULT_WAREHOUSE, jsonParam); |
1025 | 1045 | if (result != null && result.getBody() != null) { |
... | ... | @@ -1031,7 +1051,6 @@ public class MesServiceImpl implements MesService { |
1031 | 1051 | } else { |
1032 | 1052 | throw new ServiceException("接口地址错误或返回为空"); |
1033 | 1053 | } |
1034 | - taskHeader.setUserDef2(QuantityConstant.EMPTY_CHECK); | |
1035 | 1054 | taskHeader.setIsBack(QuantityConstant.MES_TASK_BACK); |
1036 | 1055 | taskHeaderService.updateById(taskHeader); |
1037 | 1056 | return AjaxResult.success(mesReturn); |
... | ... |
src/main/java/com/huaheng/common/constant/QuantityConstant.java
... | ... | @@ -779,15 +779,9 @@ public class QuantityConstant { |
779 | 779 | public static final Boolean IS_MATERIAL = true; |
780 | 780 | |
781 | 781 | /** |
782 | - * 空容器入库出库回传状态 | |
783 | - */ | |
784 | - public static final String EMPTY_NO_CHECK = "0"; | |
785 | - public static final String EMPTY_CHECK = "1"; | |
786 | - | |
787 | - /** | |
788 | 782 | * MES 任务完成回传 |
789 | 783 | */ |
790 | - public static final String ADDRESS_MES_BACK_TASK = "MES_BACK_TASK"; | |
784 | + public static final String ADDRESS_MES = "MES"; | |
791 | 785 | |
792 | 786 | /** |
793 | 787 | * MES指定任务完成 返回 1 |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderServiceImpl.java
... | ... | @@ -707,7 +707,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
707 | 707 | throw new ServiceException("换站失败,锁定载具和绑定盛具失败"); |
708 | 708 | } |
709 | 709 | |
710 | - success = taskHeaderService.createOverStationTask(container, vehicle, fromPort, toPort); | |
710 | + success = taskHeaderService.createOverStationTask(container, vehicle, fromPort, toPort, null); | |
711 | 711 | if (!success){ |
712 | 712 | throw new ServiceException("换站失败,创建换站任务失败"); |
713 | 713 | } |
... | ... |
src/main/java/com/huaheng/pc/monitor/job/task/RyTask.java
... | ... | @@ -267,6 +267,9 @@ public class RyTask extends BaseController { |
267 | 267 | } |
268 | 268 | } |
269 | 269 | |
270 | + /** | |
271 | + * 入库任务回传 | |
272 | + */ | |
270 | 273 | public void backReceipt() { |
271 | 274 | // 入库 按单据回传 |
272 | 275 | String taskKey = "backReceipt"; |
... | ... | @@ -296,7 +299,7 @@ public class RyTask extends BaseController { |
296 | 299 | } |
297 | 300 | |
298 | 301 | /** |
299 | - * 任务回传 | |
302 | + * 出库任务回传 | |
300 | 303 | */ |
301 | 304 | public void backShipment() { |
302 | 305 | // 出库 按任务回传 |
... | ... | @@ -325,7 +328,7 @@ public class RyTask extends BaseController { |
325 | 328 | } |
326 | 329 | |
327 | 330 | /** |
328 | - * 任务回传 | |
331 | + * 空载具出入库回传 | |
329 | 332 | */ |
330 | 333 | public void backEmptyInOut() { |
331 | 334 | String taskKey = "backEmptyInOut"; |
... | ... | @@ -360,7 +363,7 @@ public class RyTask extends BaseController { |
360 | 363 | } |
361 | 364 | |
362 | 365 | /** |
363 | - * 任务回传 | |
366 | + * 换站回传 | |
364 | 367 | */ |
365 | 368 | public void backChangeStation() { |
366 | 369 | String taskKey = "backChangeStation"; |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/domain/TaskHeader.java
... | ... | @@ -334,10 +334,10 @@ public class TaskHeader implements Serializable { |
334 | 334 | private String userDef1; |
335 | 335 | |
336 | 336 | /** |
337 | - * 自定义字段2 | |
337 | + * MES下发换站任务时,WMS接收的一段JSON字符串,任务完成时将值回传给MES | |
338 | 338 | */ |
339 | 339 | @TableField(value = "userDef2") |
340 | - @ApiModelProperty(value="自定义字段2") | |
340 | + @ApiModelProperty(value="JSON字符串") | |
341 | 341 | private String userDef2; |
342 | 342 | |
343 | 343 | /** |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java
... | ... | @@ -84,7 +84,8 @@ public interface TaskHeaderService extends IService<TaskHeader> { |
84 | 84 | * @param vehicle 盛具 |
85 | 85 | * @param fromPort 来源站台 |
86 | 86 | * @param toPort 目标站台 |
87 | + * @param temp json字符 | |
87 | 88 | * @return true:创建成功, false:创建失败 |
88 | 89 | */ |
89 | - boolean createOverStationTask(Container container, Vehicle vehicle, String fromPort, String toPort); | |
90 | + boolean createOverStationTask(Container container, Vehicle vehicle, String fromPort, String toPort, String temp); | |
90 | 91 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -685,7 +685,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
685 | 685 | } |
686 | 686 | |
687 | 687 | @Override |
688 | - public boolean createOverStationTask(Container container, Vehicle vehicle, String fromPort, String toPort) { | |
688 | + public boolean createOverStationTask(Container container, Vehicle vehicle, String fromPort, String toPort, String temp) { | |
689 | 689 | TaskHeader taskHeader = new TaskHeader(); |
690 | 690 | taskHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
691 | 691 | taskHeader.setTaskType(QuantityConstant.TASK_TYPE_OVER_STATION); |
... | ... | @@ -699,6 +699,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
699 | 699 | } |
700 | 700 | taskHeader.setFromPort(fromPort); |
701 | 701 | taskHeader.setPort(toPort); |
702 | + taskHeader.setUserDef2(temp); | |
702 | 703 | return taskHeaderService.save(taskHeader); |
703 | 704 | } |
704 | 705 | |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/WorkTaskService.java
... | ... | @@ -784,7 +784,6 @@ public class WorkTaskService { |
784 | 784 | */ |
785 | 785 | public AjaxResult completeManyEmptyIn(TaskHeader taskHeader) { |
786 | 786 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); |
787 | - taskHeader.setUserDef2(QuantityConstant.EMPTY_NO_CHECK); | |
788 | 787 | if (!taskHeaderService.updateById(taskHeader)) { |
789 | 788 | throw new ServiceException("任务单据状态更新失败!"); |
790 | 789 | } |
... | ... | @@ -806,7 +805,6 @@ public class WorkTaskService { |
806 | 805 | */ |
807 | 806 | public AjaxResult completeEmptyOut(TaskHeader taskHeader) { |
808 | 807 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); |
809 | - taskHeader.setUserDef2(QuantityConstant.EMPTY_NO_CHECK); | |
810 | 808 | if (!taskHeaderService.updateById(taskHeader)) { |
811 | 809 | throw new ServiceException("任务单据状态更新失败!"); |
812 | 810 | } |
... | ... | @@ -826,7 +824,6 @@ public class WorkTaskService { |
826 | 824 | */ |
827 | 825 | public AjaxResult completeManyEmptyOut(TaskHeader taskHeader) { |
828 | 826 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); |
829 | - taskHeader.setUserDef2(QuantityConstant.EMPTY_NO_CHECK); | |
830 | 827 | if (!taskHeaderService.updateById(taskHeader)) { |
831 | 828 | throw new ServiceException("任务单据状态更新失败!"); |
832 | 829 | } |
... | ... |