Commit 26933e89ef78cae34cc0ed5dd7f37dc93f6eff0a

Authored by 肖超群
1 parent 45986749

增加agv库区出库

ant-design-vue-jeecg/src/api/api.js
... ... @@ -276,6 +276,10 @@ export const qualityInventoryDetail = (params) => postAction('/inventory/invento
276 276 export const qualityRegister = (params) => postAction('/task/taskHeader/qualityRegister', params);
277 277 //创建出库任务,AGV去接
278 278 export const createShipmentTaskByAgv = (params) => postAction('/shipment/shipmentCombination/createShipmentTaskByAgv', params);
  279 +//批量创建出库任务,AGV去接
  280 +export const createBatchShipmentTaskByAgv = (params) => postAction('/shipment/shipmentCombination/createBatchShipmentTaskByAgv', params);
  281 +//创建出库任务和AGV去接
  282 +export const createShipmentTaskAndAgvTask = (params) => postAction('/shipment/shipmentCombination/createShipmentTaskAndAgvTask', params);
279 283  
280 284 // 中转HTTP请求
281 285 export const transitRESTful = {
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
... ... @@ -122,9 +122,9 @@
122 122 </span>
123 123  
124 124 <span slot="action" slot-scope="text, record">
125   -<!-- <a v-if="record.status == 0 && record.zoneType =='A'" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>-->
126   - <a v-if="record.status == 0 && record.zoneType =='L'" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
127   -<!-- <a v-if="record.status == 0 && record.zoneType =='L'" @click="openCreateShipmentTaskAgv(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>-->
  125 + <a v-if="record.status == 0 && record.zoneType =='A'" @click="openCreateShipmentTaskAndAgvTask(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
  126 +<!-- <a v-if="record.status == 0 && record.zoneType =='L'" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>-->
  127 + <a v-if="record.status == 0 && record.zoneType =='L'" @click="openCreateShipmentTaskAgv(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
128 128 <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)">
129 129 <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a>
130 130 </a-popconfirm>
... ... @@ -142,6 +142,7 @@
142 142 <shipmentContainerHeader-modal ref="modalForm" @ok="modalFormOk"></shipmentContainerHeader-modal>
143 143 <shipmentContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></shipmentContainerSelect-modal>
144 144 <createShipmentTaskByAgv-modal ref="modalForm3" @ok="modalFormOk"></createShipmentTaskByAgv-modal>
  145 + <createShipmentTaskAndAgvTask-modal ref="modalForm4" @ok="modalFormOk"></createShipmentTaskAndAgvTask-modal>
145 146 </a-card>
146 147 </template>
147 148  
... ... @@ -157,11 +158,13 @@ import {createShipmentTask, execute, getCompanyList, getCustomerList, getShipmen
157 158 import {selectSortingPort, createShipmentTaskByAgv} from '@/api/api'
158 159 import ShipmentContainerSelectModal from "./modules/ShipmentContainerSelectModal";
159 160 import CreateShipmentTaskByAgvModal from "./modules/CreateShipmentTaskByAgvModal";
  161 +import CreateShipmentTaskAndAgvTaskModal from "@views/system/shipment/modules/createShipmentTaskAndAgvTaskModal";
160 162  
161 163 export default {
162 164 name: "ShipmentContainerHeaderList",
163 165 mixins: [JeecgListMixin],
164 166 components: {
  167 + CreateShipmentTaskAndAgvTaskModal,
165 168 CreateShipmentTaskByAgvModal,
166 169 ShipmentContainerSelectModal,
167 170 ShipmentContainerDetailList,
... ... @@ -349,17 +352,9 @@ export default {
349 352 this.$refs.modalForm3.edit(record);
350 353 this.$refs.modalForm3.title = "选择出库口";
351 354 },
352   - createShipmentTaskByAgv(record) {
353   - this.loading = true;
354   - createShipmentTaskByAgv(record).then((res) => {
355   - this.loading = false;
356   - if (res.success) {
357   - this.$message.success(res.message);
358   - } else {
359   - this.$message.error(res.message);
360   - }
361   - this.searchQuery();
362   - });
  355 + openCreateShipmentTaskAndAgvTask(record) {
  356 + this.$refs.modalForm4.edit(record);
  357 + this.$refs.modalForm4.title = "选择出库口";
363 358 },
364 359 createBatchTask() {
365 360 if (this.selectedRowKeys.length <= 0) {
... ... @@ -430,7 +425,7 @@ export default {
430 425 },
431 426 solutionZoneCode(value) {
432 427 var actions = []
433   - console.log("solutionZoneCode " + this.zoneList);
  428 + // console.log("solutionZoneCode " + this.zoneList);
434 429 Object.keys(this.zoneList).some((key) => {
435 430 if (this.zoneList[key].code == ('' + value)) {
436 431 actions.push(this.zoneList[key].name)
... ...
ant-design-vue-jeecg/src/views/system/shipment/modules/CreateShipmentTaskByAgvModal.vue
... ... @@ -25,8 +25,8 @@
25 25 </a-select>
26 26 </a-form-model-item>
27 27 <a-col :span="24">
28   - <a-form-model-item label="去向工位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toAgvPort">
29   - <a-input v-model="model.toAgvPort" placeholder="请输入去向工位" style="width: 100%"/>
  28 + <a-form-model-item label="去向位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toAgvPort">
  29 + <a-input v-model="model.toAgvPort" placeholder="请输入去向位置" style="width: 100%"/>
30 30 </a-form-model-item>
31 31 </a-col>
32 32 </a-col>
... ... @@ -40,7 +40,7 @@
40 40  
41 41 import {httpAction} from '@/api/manage'
42 42 import {validateDuplicateValue} from '@/utils/util'
43   -import {createShipmentTask, createShipmentTaskByAgv, createShipmentBatchTask} from '@/api/api'
  43 +import {createShipmentTask, createShipmentTaskByAgv, createShipmentBatchTask, createBatchShipmentTaskByAgv} from '@/api/api'
44 44 import {selectSortingPort} from '@/api/api'
45 45  
46 46 export default {
... ... @@ -111,7 +111,7 @@ export default {
111 111 x["toPort"]=that.model.toPort;
112 112 x["toAgvPort"]=that.model.toAgvPort;
113 113 })
114   - createShipmentBatchTask(this.shipmentContainerHeaderList).then((res) => {
  114 + createBatchShipmentTaskByAgv(this.shipmentContainerHeaderList).then((res) => {
115 115 if (res.success) {
116 116 that.$message.success(res.message);
117 117 that.$emit('ok');
... ...
ant-design-vue-jeecg/src/views/system/shipment/modules/createShipmentTaskAndAgvTaskModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + :confirmLoading="confirmLoading"
  7 + switchFullscreen
  8 + @ok="handleOk"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <a-spin :spinning="confirmLoading">
  12 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  13 + <a-row>
  14 + <a-col :span="24">
  15 + <a-form-model-item label="去向位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toAgvPort">
  16 + <a-input v-model="model.toAgvPort" placeholder="请输入去向位置" style="width: 100%"/>
  17 + </a-form-model-item>
  18 + </a-col>
  19 + </a-row>
  20 + </a-form-model>
  21 + </a-spin>
  22 + </j-modal>
  23 +</template>
  24 +
  25 +<script>
  26 +
  27 +import {httpAction} from '@/api/manage'
  28 +import {validateDuplicateValue} from '@/utils/util'
  29 +import {createShipmentTaskAndAgvTask, createBatchShipmentTaskByAgv} from '@/api/api'
  30 +import {selectSortingPort} from '@/api/api'
  31 +
  32 +export default {
  33 + name: "createShipmentTaskAndAgvTaskModal",
  34 + components: {},
  35 + props: {
  36 + mainId: {
  37 + type: String,
  38 + required: false,
  39 + default: ''
  40 + }
  41 + },
  42 + data() {
  43 + return {
  44 + flag:'0',
  45 + shipmentContainerHeaderList:[],
  46 + title: "操作",
  47 + width: 500,
  48 + visible: false,
  49 + model: {},
  50 + labelCol: {
  51 + xs: {span: 24},
  52 + sm: {span: 5},
  53 + },
  54 + wrapperCol: {
  55 + xs: {span: 24},
  56 + sm: {span: 16},
  57 + },
  58 +
  59 + confirmLoading: false,
  60 + validatorRules: {},
  61 + url: {
  62 + createTask: "/shipment/shipmentContainerHeader/createShipmentTask",
  63 + }
  64 +
  65 + }
  66 + },
  67 + created() {
  68 + //备份model原始值
  69 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  70 + },
  71 + methods: {
  72 + add() {
  73 + this.edit(this.modelDefault);
  74 + },
  75 + edit(record) {
  76 + this.visible = true;
  77 + this.model = Object.assign({}, record);
  78 + this.flag='0';
  79 + },
  80 + batchEdit(record) {
  81 + this.visible = true;
  82 + this.flag='1';
  83 + this.shipmentContainerHeaderList=record;
  84 + },
  85 + close() {
  86 + this.$emit('close');
  87 + this.visible = false;
  88 + this.$refs.form.clearValidate();
  89 + },
  90 + handleOk() {
  91 + const that = this;
  92 + if (this.flag=='1'){
  93 + this.$refs.form.validate(valid => {
  94 + if (valid) {
  95 + this.shipmentContainerHeaderList.forEach(x=>{
  96 + x["toAgvPort"]=that.model.toAgvPort;
  97 + })
  98 + createBatchShipmentTaskByAgv(this.shipmentContainerHeaderList).then((res) => {
  99 + if (res.success) {
  100 + that.$message.success(res.message);
  101 + that.$emit('ok');
  102 + } else {
  103 + that.$message.warning(res.message);
  104 + }
  105 + }).finally(() => {
  106 + that.confirmLoading = false;
  107 + that.close();
  108 + });
  109 + }else {
  110 + return false
  111 + }
  112 + })
  113 +
  114 + }else{
  115 + // 触发表单验证
  116 + this.$refs.form.validate(valid => {
  117 + if (valid) {
  118 + that.confirmLoading = true;
  119 + createShipmentTaskAndAgvTask(this.model).then((res) => {
  120 + if (res.success) {
  121 + that.$message.success(res.message);
  122 + that.$emit('ok');
  123 + } else {
  124 + that.$message.warning(res.message);
  125 + }
  126 + }).finally(() => {
  127 + that.confirmLoading = false;
  128 + that.close();
  129 + });
  130 + } else {
  131 + return false
  132 + }
  133 + })
  134 + }
  135 +
  136 +
  137 + },
  138 + handleCancel() {
  139 + this.close()
  140 + },
  141 +
  142 + }
  143 +}
  144 +</script>
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/ShipmentCombinationController.java
... ... @@ -124,9 +124,9 @@ public class ShipmentCombinationController {
124 124 @ApiOperation(value = "出库组盘-批量创建出库任务", notes = "出库组盘-批量创建出库任务")
125 125 @PostMapping("/createShipmentBatchTask")
126 126 @ResponseBody
127   - public Result createShipmentBatchTask(@RequestBody List<ShipmentContainerHeader> shipmentContainerHeaderLiat, HttpServletRequest req) {
  127 + public Result createShipmentBatchTask(@RequestBody List<ShipmentContainerHeader> shipmentContainerHeaderList, HttpServletRequest req) {
128 128 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
129   - for (ShipmentContainerHeader shipmentContainerHeader : shipmentContainerHeaderLiat) {
  129 + for (ShipmentContainerHeader shipmentContainerHeader : shipmentContainerHeaderList) {
130 130 Result result = huahengMultiHandlerService.createShipmentTask(shipmentContainerHeader, warehouseCode, 0, 0, 0);
131 131 if (!result.isSuccess()) {
132 132 return result;
... ... @@ -249,11 +249,30 @@ public class ShipmentCombinationController {
249 249 @ResponseBody
250 250 public Result createShipmentTaskByAgv(@RequestBody ShipmentContainerHeader shipmentContainerHeader, HttpServletRequest req) {
251 251 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
252   - Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, warehouseCode, 0, 0, 0);
  252 + Result result = shipmentCombinationService.createShipmentTaskByAgv(shipmentContainerHeader, warehouseCode);
253 253 return result;
254 254 }
255 255  
256 256 /**
  257 + * 立库区
  258 + * 批量创建出库任务, 出库任务完成以后,AGV去接
  259 + * @return
  260 + */
  261 + @ApiOperation(value = "创建出库任务, 出库任务完成以后,AGV去接", notes = "创建出库任务, 出库任务完成以后,AGV去接")
  262 + @PostMapping("/createBatchShipmentTaskByAgv")
  263 + @ResponseBody
  264 + public Result createBatchShipmentTaskByAgv(@RequestBody List<ShipmentContainerHeader> shipmentContainerHeaderList, HttpServletRequest req) {
  265 + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
  266 + for (ShipmentContainerHeader shipmentContainerHeader : shipmentContainerHeaderList) {
  267 + Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, warehouseCode, 0, 0, 0);
  268 + if (!result.isSuccess()) {
  269 + return result;
  270 + }
  271 + }
  272 + return Result.OK("批量创建出库任务成功");
  273 + }
  274 +
  275 + /**
257 276 * AGV库区
258 277 * 同时创建出库任务和AGV任务
259 278 * @return
... ... @@ -263,8 +282,7 @@ public class ShipmentCombinationController {
263 282 @ResponseBody
264 283 public Result createShipmentTaskAndAgvTask(@RequestBody ShipmentContainerHeader shipmentContainerHeader, HttpServletRequest req) {
265 284 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
266   - Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, warehouseCode, 0, 0, 0);
267   -
  285 + Result result = shipmentCombinationService.createShipmentTaskAndAgvTask(shipmentContainerHeader, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, warehouseCode);
268 286 return result;
269 287 }
270 288 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/IShipmentCombinationService.java
... ... @@ -31,6 +31,10 @@ public interface IShipmentCombinationService {
31 31 Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, int forceTaskType, String warehouseCode, long shipmentOrder, int sequence,
32 32 int sequenceNumber);
33 33  
  34 + Result createShipmentTaskByAgv(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode);
  35 +
  36 + Result createShipmentTaskAndAgvTask(ShipmentContainerHeader shipmentContainerHeader, int force, String warehouseCode);
  37 +
34 38 Result getInventoryFromShipmentDetail(Integer shipmentDetailId);
35 39  
36 40 Result combination(CombinationModel combinationModel);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... ... @@ -39,6 +39,8 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail;
39 39 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader;
40 40 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService;
41 41 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService;
  42 +import org.jeecg.modules.wms.task.agvTask.entity.AgvTask;
  43 +import org.jeecg.modules.wms.task.agvTask.service.IAgvTaskService;
42 44 import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail;
43 45 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
44 46 import org.jeecg.modules.wms.task.taskHeader.entity.TaskLockEntity;
... ... @@ -118,6 +120,8 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
118 120  
119 121 @Resource
120 122 private WcsService wcsService;
  123 + @Resource
  124 + private IAgvTaskService agvTaskService;
121 125  
122 126 /**
123 127 * 根据出库单详情,匹配到可用出库的库存详情
... ... @@ -937,10 +941,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
937 941 taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_SHIPMENT);
938 942 taskHeader.setZoneCode(zoneCode);
939 943 taskHeader.setShipmentOrder(shipmentOrder);
940   - if (StringUtils.isNotEmpty(toAgvPort)) {
941   - taskHeader.setToAgvPort(toAgvPort);
942   - taskHeader.setCreateAgvTask(QuantityConstant.AGV_CREATE_NEED);
943   - }
  944 + taskHeader.setToAgvPort(toAgvPort);
944 945 taskHeader.setSequence(sequence);
945 946 taskHeader.setSequenceNumber(sequenceNumber);
946 947 taskHeader.setWarehouseCode(warehouseCode);
... ... @@ -1023,6 +1024,58 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
1023 1024  
1024 1025 @Override
1025 1026 @Transactional(rollbackFor = JeecgBootException.class)
  1027 + public Result createShipmentTaskByAgv(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode) {
  1028 + Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, QuantityConstant.TASK_TYPE_WHOLESHIPMENT, warehouseCode, 0, 0, 0);
  1029 + String containerCode = shipmentContainerHeader.getContainerCode();
  1030 + TaskHeader taskHeader = taskHeaderService.getUnCompleteTaskByContainerCode(containerCode, warehouseCode);
  1031 + if (taskHeader == null) {
  1032 + throw new JeecgBootException("创建出库任务时,没有找到任务");
  1033 + }
  1034 + TaskHeader taskHeader1 = new TaskHeader();
  1035 + taskHeader1.setId(taskHeader.getId());
  1036 + taskHeader1.setCreateAgvTask(QuantityConstant.AGV_CREATE_NEED);
  1037 + if (!taskHeaderService.updateById(taskHeader1)) {
  1038 + throw new JeecgBootException("创建出库任务时,更新任务标记失败");
  1039 + }
  1040 + return result;
  1041 + }
  1042 +
  1043 + @Override
  1044 + @Transactional(rollbackFor = JeecgBootException.class)
  1045 + public Result createShipmentTaskAndAgvTask(ShipmentContainerHeader shipmentContainerHeader, int forceTaskType, String warehouseCode) {
  1046 + Result result = shipmentCombinationService.createShipmentTask(shipmentContainerHeader, forceTaskType, warehouseCode);
  1047 + if (!result.isSuccess()) {
  1048 + throw new JeecgBootException(result.getMessage());
  1049 + }
  1050 + String containerCode = shipmentContainerHeader.getContainerCode();
  1051 + String zoneCode = shipmentContainerHeader.getZoneCode();
  1052 + String fromPortCode = shipmentContainerHeader.getFromLocationCode();
  1053 + String toPortCode = shipmentContainerHeader.getToAgvPort();
  1054 + AgvTask agvTask = new AgvTask();
  1055 + agvTask.setWarehouseCode(warehouseCode);
  1056 + agvTask.setZoneCode(zoneCode);
  1057 + agvTask.setTaskType(QuantityConstant.AGV_TYPE_TAKE_AND_RELEASE);
  1058 + agvTask.setStatus(QuantityConstant.AGV_TASK_STATUS_BUILD);
  1059 + agvTask.setContainerCode(containerCode);
  1060 + agvTask.setFromPort(fromPortCode);
  1061 + agvTask.setToPort(toPortCode);
  1062 + agvTask.setPriority(10);
  1063 + result = agvTaskService.addAgvTask(agvTask, warehouseCode);
  1064 + TaskHeader taskHeader = taskHeaderService.getUnCompleteTaskByContainerCode(containerCode, warehouseCode);
  1065 + if (taskHeader == null) {
  1066 + throw new JeecgBootException("创建出库任务时,没有找到任务");
  1067 + }
  1068 + TaskHeader taskHeader1 = new TaskHeader();
  1069 + taskHeader1.setId(taskHeader.getId());
  1070 + taskHeader1.setAgvTaskId(agvTask.getId());
  1071 + if (!taskHeaderService.updateById(taskHeader1)) {
  1072 + throw new JeecgBootException("创建出库任务时,更新任务标记失败");
  1073 + }
  1074 + return result;
  1075 + }
  1076 +
  1077 + @Override
  1078 + @Transactional(rollbackFor = JeecgBootException.class)
1026 1079 public Result getInventoryFromShipmentDetail(Integer shipmentDetailId) {
1027 1080 ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentDetailId);
1028 1081 if (shipmentDetail == null) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java
... ... @@ -115,36 +115,27 @@ public class AgvTaskServiceImpl extends ServiceImpl&lt;AgvTaskMapper, AgvTask&gt; impl
115 115 throw new JeecgBootException("完成AGV任务时,根据容器编码没有找到容器");
116 116 }
117 117 TaskHeader taskHeader = taskHeaderService.getTaskHeaderByAgvTaskId(agvTask.getId());
118   - if (taskHeader == null) {
119   - Location fromLocation = locationService.getLocationByCode(fromPort, warehouseCode);
120   - if (fromLocation != null) {
121   - success =
122   - locationService.updateContainerCodeAndStatus(fromPort, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
123   - if (!success) {
124   - throw new JeecgBootException("完成AGV任务时,更新起始库位数据失败");
125   - }
126   - } else {
127   - fromPort = QuantityConstant.EMPTY_STRING;
128   - }
129   - Location toLocation = locationService.getLocationByCode(toPort, warehouseCode);
130   - if (toLocation != null) {
131   - success = locationService.updateContainerCodeAndStatus(toPort, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
132   - if (!success) {
133   - throw new JeecgBootException("完成AGV任务时,更新终点库位数据失败");
134   - }
135   - } else {
136   - toPort = QuantityConstant.EMPTY_STRING;
137   - }
138   - success = containerService.updateLocationCodeAndStatus(containerCode, toPort, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
139   - if (!success) {
140   - throw new JeecgBootException("完成AGV任务时,更新容器数据失败");
141   - }
142   - } else {
143   - success = containerService.updateLocationCode(containerCode, toPort, warehouseCode);
144   - if (!success) {
145   - throw new JeecgBootException("完成AGV任务时,更新容器数据失败");
146   - }
147   - }
  118 +// if (taskHeader == null) {
  119 +// Location fromLocation = locationService.getLocationByCode(fromPort, warehouseCode);
  120 +// if (fromLocation != null) {
  121 +// success =
  122 +// locationService.updateContainerCodeAndStatus(fromPort, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
  123 +// if (!success) {
  124 +// throw new JeecgBootException("完成AGV任务时,更新起始库位数据失败");
  125 +// }
  126 +// } else {
  127 +// fromPort = QuantityConstant.EMPTY_STRING;
  128 +// }
  129 +// Location toLocation = locationService.getLocationByCode(toPort, warehouseCode);
  130 +// if (toLocation != null) {
  131 +// success = locationService.updateContainerCodeAndStatus(toPort, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
  132 +// if (!success) {
  133 +// throw new JeecgBootException("完成AGV任务时,更新终点库位数据失败");
  134 +// }
  135 +// } else {
  136 +// toPort = QuantityConstant.EMPTY_STRING;
  137 +// }
  138 +// }
148 139 agvTask.setStatus(QuantityConstant.TASK_STATUS_COMPLETED);
149 140 success = updateById(agvTask);
150 141 if (!success) {
... ...