Commit e38555798dd020628039c804935d59b76712602f

Authored by 肖超群
1 parent cb13fb08

完善平库入库

ant-design-vue-jeecg/src/api/api.js
... ... @@ -257,7 +257,7 @@ export const auditShipment = (params) => getAction("/audit/audit/auditShipment",
257 257 //查询是否开启审核流程
258 258 export const getDocumentAduitFlow = (params) => getAction("/config/parameterConfiguration/getDocumentAduitFlow", params);
259 259 //库位监控-快速入库
260   -export const monitoringQuickReceipt = (params) => postAction("/config/location/quickReceipt", params);
  260 +export const monitoringQuickReceipt = (params) => postAction("/receipt/receiveHeader/flatQuickReceipt", params);
261 261 //快速入库
262 262 export const quickReceipt = (params) => postAction("/task/taskHeader/quickReceipt", params);
263 263 //快速出库,批量快速出整托
... ... @@ -265,7 +265,7 @@ export const shipmentInventoryHeader = (params) => postAction('/inventory/invent
265 265 //快速出库,批量快速出库存详情
266 266 export const shipmentInventoryDetail = (params) => postAction('/inventory/inventoryHeader/shipmentInventoryDetail', params);
267 267 // 快速出库,通过库存ID
268   -export const autoShipmentByID = (params) => postAction('/config/location/quickShipment', params);
  268 +export const flatQuickShipment = (params) => postAction('/shipment/shipmentCombination/flatQuickShipment', params);
269 269 //呼叫入库托盘
270 270 export const callReceiptBox = (params) => postAction('/receipt/receiptHeader/callbox', params);
271 271 //批量呼叫入库托盘
... ... @@ -316,6 +316,8 @@ export const quickShipment = (params) => postAction("/task/taskHeader/quickShipm
316 316 export const shipmentCheck = (params) => postAction("/shipment/shipmentCombination/shipmentCheck", params);
317 317 //查询盘点明细子表
318 318 export const listCycleDetailChildByDetailId = (params) => postAction("/cycleCountDetail/cycleCountDetail/listCycleDetailChildByDetailId", params);
  319 +//平库上架
  320 +export const flatOnShell = (params) => postAction("/receipt/receiveHeader/flatOnShell", params);
319 321  
320 322 // 中转HTTP请求
321 323 export const transitRESTful = {
... ...
ant-design-vue-jeecg/src/views/system/config/MaterialList.vue
... ... @@ -5,7 +5,7 @@
5 5 <a-form layout="inline" @keyup.enter.native="searchQuery">
6 6 <a-row :gutter="24">
7 7 <a-col :xl="6" :lg="7" :md="8" :sm="24">
8   - <a-form-item label="物料编码">dy
  8 + <a-form-item label="物料编码">
9 9 <a-input placeholder="请输入物料编码" v-model="queryParam.code"></a-input>
10 10 </a-form-item>
11 11 </a-col>
... ...
ant-design-vue-jeecg/src/views/system/monitor/modules/ExpressDeliveryModal.vue
... ... @@ -66,7 +66,7 @@
66 66 <script>
67 67  
68 68 import JEditableTable from '@/components/jeecg/JEditableTable'
69   -import {execute, autoShipmentByID} from '@/api/api'
  69 +import {execute, flatQuickShipment} from '@/api/api'
70 70 import JDate from '@/components/jeecg/JDate'
71 71 import JSelectMultiCanUseContainer from "../../../../components/jeecgbiz/JSelectMultiCanUseContainer";
72 72  
... ... @@ -152,7 +152,7 @@ export default {
152 152 debugger
153 153 this.confirmLoading = true
154 154 this.model = Object.assign({}, record);
155   - autoShipmentByID(record.receiptEntityList).then((res) => {
  155 + flatQuickShipment(record.receiptEntityList).then((res) => {
156 156 this.loading = false;
157 157 if (res.success) {
158 158 this.$message.success(res.message);
... ...
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... ... @@ -133,7 +133,7 @@
133 133 <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button></a>
134 134 <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button></a>
135 135 <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)">
136   - <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a>
  136 + <a><a-button type="danger">取消配盘</a-button></a>
137 137 </a-popconfirm>
138 138  
139 139 <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-button type="default">编辑</a-button></a>
... ... @@ -151,6 +151,7 @@
151 151 <receiptContainerSelect-modal ref="modalForm2" @ok="modalFormOk"></receiptContainerSelect-modal>
152 152 <receiptContainerFillSelect-modal ref="modalForm3" @ok="modalFormOk"></receiptContainerFillSelect-modal>
153 153 <receiptContainerStatusSelect-modal ref="modalForm4" @ok="modalFormOk"></receiptContainerStatusSelect-modal>
  154 + <receipt-container-on-shell-modal ref="modalForm4" @ok="modalFormOk"></receipt-container-on-shell-modal>
154 155  
155 156 </a-card>
156 157 </template>
... ... @@ -169,11 +170,13 @@ import ReceiptContainerSelectModal from &quot;./modules/ReceiptContainerSelectModal&quot;;
169 170 import ReceiptContainerFillSelectModal from "./modules/ReceiptContainerFillSelectModal";
170 171 import ReceiptContainerStatusSelectModal from "./modules/ReceiptContainerStatusSelectModal";
171 172 import '@/assets/less/TableExpand.less'
  173 +import ReceiptContainerOnShellModal from "@views/system/receipt/modules/ReceiptContainerOnShellModal.vue";
172 174  
173 175 export default {
174 176 name: "ReceiptContainerHeaderList",
175 177 mixins: [JeecgListMixin],
176 178 components: {
  179 + ReceiptContainerOnShellModal,
177 180 ReceiptContainerSelectModal,
178 181 ReceiptContainerDetailList,
179 182 ReceiptContainerHeaderModal,
... ...
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerOnShellModal.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 + <div class="table-page-search-wrapper">
  12 + <a-spin :spinning="confirmLoading">
  13 + <a-form-model ref="form" :model="model" :rules="validatorRules" >
  14 + <a-row>
  15 + <a-col :span="24">
  16 + <a-form-model-item label="库位编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toLocationCode">
  17 + <a-input v-model="model.remark" placeholder="请输入库位编码"></a-input>
  18 + </a-form-model-item>
  19 + </a-col>
  20 + </a-row>
  21 + </a-form-model>
  22 + </a-spin>
  23 + </div>
  24 + </j-modal>
  25 +</template>
  26 +
  27 +<script>
  28 +
  29 +import {httpAction} from '@/api/manage'
  30 +import {validateDuplicateValue} from '@/utils/util'
  31 +import {flatOnShell} from '@/api/api'
  32 +
  33 +export default {
  34 + name: "ReceiptContainerOnShellModal",
  35 + components: {},
  36 + props: {
  37 + mainId: {
  38 + type: String,
  39 + required: false,
  40 + default: ''
  41 + }
  42 + },
  43 + data() {
  44 + return {
  45 + title: "操作",
  46 + portList: [],
  47 + flag:'0',
  48 + width: 500,
  49 + visible: false,
  50 + model: {},
  51 + labelCol: {
  52 + xs: {span: 24},
  53 + sm: {span: 5},
  54 + },
  55 + wrapperCol: {
  56 + xs: {span: 24},
  57 + sm: {span: 16},
  58 + },
  59 + confirmLoading: false,
  60 + validatorRules: {
  61 + toLocationCode: [{ required: true, message: '请输入库位编码!' }]
  62 + },
  63 + url: {
  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.model = Object.assign({}, record);
  77 + this.visible = true;
  78 + },
  79 + close() {
  80 + this.$emit('close');
  81 + this.visible = false;
  82 + this.$refs.form.clearValidate();
  83 + },
  84 + handleOk() {
  85 + const that = this;
  86 + // 触发表单验证
  87 + this.$refs.form.validate(valid => {
  88 + if (valid) {
  89 + that.confirmLoading = true;
  90 + flatOnShell(this.model).then((res) => {
  91 + if (res.success) {
  92 + that.$message.success(res.message);
  93 + that.$emit('ok');
  94 + } else {
  95 + that.$message.warning(res.message);
  96 + }
  97 + }).finally(() => {
  98 + that.confirmLoading = false;
  99 + that.close();
  100 + });
  101 + } else {
  102 + return false
  103 + }
  104 + });
  105 + },
  106 + handleCancel() {
  107 + this.close()
  108 + },
  109 + }
  110 +}
  111 +</script>
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java
... ... @@ -19,6 +19,8 @@ public interface IContainerService extends IService&lt;Container&gt; {
19 19  
20 20 Container getContainerByCode(String containCode, String warehouseCode);
21 21  
  22 + Container getContainerByLocationCode(String locationCode, String warehouseCode);
  23 +
22 24 boolean updateStatus(String containerCode, String status, String warehouseCode);
23 25  
24 26 boolean updateFillStatus(String containerCode, String fillStatus, String warehouseCode);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... ... @@ -91,6 +91,20 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container
91 91 }
92 92  
93 93 @Override
  94 + public Container getContainerByLocationCode(String locationCode, String warehouseCode) {
  95 + if (StringUtils.isEmpty(locationCode)) {
  96 + throw new JeecgBootException("库位编码为空");
  97 + }
  98 + if (StringUtils.havaLowerCase(locationCode)) {
  99 + throw new JeecgBootException("库位不能有小字母" + locationCode);
  100 + }
  101 + LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery();
  102 + containerLambdaQueryWrapper.eq(Container::getLocationCode, locationCode).eq(Container::getWarehouseCode, warehouseCode);
  103 + Container container = containerService.getOne(containerLambdaQueryWrapper);
  104 + return container;
  105 + }
  106 +
  107 + @Override
94 108 @Transactional
95 109 public boolean updateStatus(String containerCode, String status, String warehouseCode) {
96 110 LambdaUpdateWrapper<Container> updateWrapper = Wrappers.lambdaUpdate();
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/controller/LocationController.java
... ... @@ -12,19 +12,15 @@ import org.jeecg.common.api.vo.Result;
12 12 import org.jeecg.common.aspect.annotation.AutoLog;
13 13 import org.jeecg.common.system.base.controller.JeecgController;
14 14 import org.jeecg.common.system.query.QueryGenerator;
15   -import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean;
16   -import org.jeecg.modules.wms.config.container.service.IContainerService;
17 15 import org.jeecg.modules.wms.config.location.dto.*;
18 16 import org.jeecg.modules.wms.config.location.entity.BatchLocation;
19 17 import org.jeecg.modules.wms.config.location.entity.Location;
20 18 import org.jeecg.modules.wms.config.location.service.ILocationService;
21 19 import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService;
22   -import org.jeecg.modules.wms.shipment.shipmentCombination.entity.FlatShipment;
23 20 import org.jeecg.utils.HuahengJwtUtil;
24 21 import org.jeecg.utils.PageUtil;
25 22 import org.jeecg.utils.StringUtils;
26 23 import org.jeecg.utils.constant.QuantityConstant;
27   -import org.jeecg.utils.support.ApiLogger;
28 24 import org.springframework.beans.factory.annotation.Autowired;
29 25 import org.springframework.validation.annotation.Validated;
30 26 import org.springframework.web.bind.annotation.*;
... ... @@ -94,9 +90,9 @@ public class LocationController extends JeecgController&lt;Location, ILocationServi
94 90 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
95 91 Page<Location> page = new Page<Location>(pageNo, pageSize);
96 92 HuahengJwtUtil.setWarehouseCode(req, location);
97   - IPage<Location> pageList = locationService.getContainerInLocation(page, QuantityConstant.STATUS_LOCATION_EMPTY,
98   - QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_FILL_SOME, HuahengJwtUtil.getWarehouseCodeByToken(req),
99   - location.getZoneCode(), location.getContainerCode(), location.getCode(), location.getRoadWay());
  93 + IPage<Location> pageList = locationService.getContainerInLocation(page, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_CONTAINER_EMPTY,
  94 + QuantityConstant.STATUS_CONTAINER_FILL_SOME, HuahengJwtUtil.getWarehouseCodeByToken(req), location.getZoneCode(), location.getContainerCode(),
  95 + location.getCode(), location.getRoadWay());
100 96 return Result.OK(pageList);
101 97 }
102 98  
... ... @@ -111,9 +107,9 @@ public class LocationController extends JeecgController&lt;Location, ILocationServi
111 107 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
112 108 Page<Location> page = new Page<Location>(pageNo, pageSize);
113 109 HuahengJwtUtil.setWarehouseCode(req, location);
114   - IPage<Location> pageList = locationService.getContainerInLocation(page, QuantityConstant.STATUS_LOCATION_EMPTY,
115   - QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_EMPTY, HuahengJwtUtil.getWarehouseCodeByToken(req),
116   - location.getZoneCode(), location.getContainerCode(), location.getCode(), location.getRoadWay());
  110 + IPage<Location> pageList = locationService.getContainerInLocation(page, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_CONTAINER_EMPTY,
  111 + QuantityConstant.STATUS_CONTAINER_EMPTY, HuahengJwtUtil.getWarehouseCodeByToken(req), location.getZoneCode(), location.getContainerCode(),
  112 + location.getCode(), location.getRoadWay());
117 113 return Result.OK(pageList);
118 114 }
119 115  
... ... @@ -128,9 +124,9 @@ public class LocationController extends JeecgController&lt;Location, ILocationServi
128 124 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
129 125 Page<Location> page = new Page<Location>(pageNo, pageSize);
130 126 HuahengJwtUtil.setWarehouseCode(req, location);
131   - IPage<Location> pageList = locationService.getContainerInLocation(page, QuantityConstant.STATUS_LOCATION_EMPTY,
132   - QuantityConstant.STATUS_CONTAINER_EMPTY, QuantityConstant.STATUS_CONTAINER_FILL_MANY, HuahengJwtUtil.getWarehouseCodeByToken(req),
133   - location.getZoneCode(), location.getContainerCode(), location.getCode(), location.getRoadWay());
  127 + IPage<Location> pageList = locationService.getContainerInLocation(page, QuantityConstant.STATUS_LOCATION_EMPTY, QuantityConstant.STATUS_CONTAINER_EMPTY,
  128 + QuantityConstant.STATUS_CONTAINER_FILL_MANY, HuahengJwtUtil.getWarehouseCodeByToken(req), location.getZoneCode(), location.getContainerCode(),
  129 + location.getCode(), location.getRoadWay());
134 130 return Result.OK(pageList);
135 131 }
136 132  
... ... @@ -317,23 +313,4 @@ public class LocationController extends JeecgController&lt;Location, ILocationServi
317 313 return Result.OK(compareContainerTaskDtoPage);
318 314 }
319 315  
320   - /**
321   - * 平库出库,通过库存ID
322   - * @return
323   - */
324   - @ApiOperation(value = "库位监控-快速出库,通过库存ID", notes = "库位监控,通过库存ID")
325   - @PostMapping("/quickShipment")
326   - public Result quickShipment(@RequestBody List<FlatShipment> flatShipmentList, HttpServletRequest req){
327   - String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
328   - return huahengMultiHandlerService.autoShipmentByIDService(flatShipmentList, warehouseCode);
329   - }
330   -
331   - @ApiOperation(value = "库位监控-快速入库", notes = "快速入库")
332   - @PostMapping("/quickReceipt")
333   - public Result<?> quickReceipt(@RequestBody QuickReceiptBean bean, HttpServletRequest req) {
334   - String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
335   - bean.setWarehouseCode(warehouseCode);
336   - Result result = huahengMultiHandlerService.quickReceiptService(bean, warehouseCode);
337   - return result;
338   - }
339 316 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/impl/HuahengMultiHandlerServiceImpl.java
... ... @@ -34,7 +34,6 @@ import org.jeecg.modules.wms.receipt.receiving.domain.Receive;
34 34 import org.jeecg.modules.wms.receipt.receiving.service.IReceiveService;
35 35 import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel;
36 36 import org.jeecg.modules.wms.shipment.shipmentCombination.entity.FlatShipment;
37   -import org.jeecg.modules.wms.shipment.shipmentCombination.entity.Shipment;
38 37 import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService;
39 38 import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader;
40 39 import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService;
... ... @@ -46,12 +45,11 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderServ
46 45 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
47 46 import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService;
48 47 import org.jeecg.utils.constant.QuantityConstant;
49   -import org.springframework.beans.factory.annotation.Autowired;
50 48 import org.springframework.scheduling.annotation.Async;
51 49 import org.springframework.stereotype.Service;
  50 +import org.springframework.transaction.annotation.Transactional;
52 51  
53 52 import lombok.extern.slf4j.Slf4j;
54   -import org.springframework.transaction.annotation.Transactional;
55 53  
56 54 /**
57 55 * @author 游杰
... ... @@ -100,7 +98,6 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
100 98 @Resource
101 99 private ILocationService locationService;
102 100  
103   -
104 101 @Override
105 102 public Result sendTaskToWcs(TaskHeader taskHeader, String zoneCode) {
106 103 if (taskHeader == null) {
... ... @@ -144,17 +141,18 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
144 141 if (flatShipmentList == null || flatShipmentList.size() == 0) {
145 142 return Result.error("参数不能为空");
146 143 }
147   - for (FlatShipment item :flatShipmentList){
  144 + for (FlatShipment item : flatShipmentList) {
148 145 if (item.getInventoryDetailId() == null) {
149 146 return Result.error("库存ID不能为空");
150 147 }
151   - if (item.getShipQty() == null || item.getShipQty().compareTo(BigDecimal.ZERO) == 0){
  148 + if (item.getShipQty() == null || item.getShipQty().compareTo(BigDecimal.ZERO) == 0) {
152 149 return Result.error("出库数量不能为空");
153 150 }
154 151 }
155 152 // 通过库存ID查询库存详情数据
156   - List<InventoryDetail> inventoryDetailList = inventoryDetailService.listByIds(flatShipmentList.stream().map(FlatShipment::getInventoryDetailId).collect(Collectors.toList()));
157   - if (inventoryDetailList == null || inventoryDetailList.size() == 0){
  153 + List<InventoryDetail> inventoryDetailList =
  154 + inventoryDetailService.listByIds(flatShipmentList.stream().map(FlatShipment::getInventoryDetailId).collect(Collectors.toList()));
  155 + if (inventoryDetailList == null || inventoryDetailList.size() == 0) {
158 156 return Result.error("根据库存ID查询库存信息失败!");
159 157 }
160 158 // 根据库存详情创建出库单
... ... @@ -165,11 +163,11 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
165 163 shipmentHeader.setZoneCode(QuantityConstant.ZONE_TYPE_FLAT);
166 164 shipmentHeader.setCompanyCode(inventoryDetailList.get(0).getCompanyCode());
167 165 Result result = shipmentHeaderService.saveShipmentHeader(shipmentHeader);
168   - if (!result.isSuccess()){
  166 + if (!result.isSuccess()) {
169 167 return result;
170 168 }
171 169 List<ShipmentDetail> shipmentDetailList = new ArrayList<>();
172   - for (FlatShipment item : flatShipmentList){
  170 + for (FlatShipment item : flatShipmentList) {
173 171 InventoryDetail inventoryDetail = inventoryDetailMap.get(item.getInventoryDetailId());
174 172 ShipmentDetail shipmentDetail = new ShipmentDetail();
175 173 shipmentDetail.setShipmentId(shipmentHeader.getId());
... ... @@ -181,23 +179,24 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
181 179 shipmentDetail.setInventoryDetailId(item.getInventoryDetailId());
182 180 shipmentDetail.setCompanyCode(shipmentHeader.getCompanyCode());
183 181 result = shipmentDetailService.saveShipmentDetail(shipmentDetail);
184   - if (!result.isSuccess()){
  182 + if (!result.isSuccess()) {
185 183 throw new RuntimeException(result.getMessage());
186 184 }
187 185 shipmentDetailList.add(shipmentDetail);
188 186 }
189 187 // 将出库单详情转换为map存储
190   - Map<Integer, ShipmentDetail> shipmentDetailMap = shipmentDetailList.stream().collect(Collectors.toMap(ShipmentDetail::getInventoryDetailId, Function.identity()));
191   - for (FlatShipment item : flatShipmentList){
  188 + Map<Integer, ShipmentDetail> shipmentDetailMap =
  189 + shipmentDetailList.stream().collect(Collectors.toMap(ShipmentDetail::getInventoryDetailId, Function.identity()));
  190 + for (FlatShipment item : flatShipmentList) {
192 191 item.setShipmentDetailId(shipmentDetailMap.get(item.getInventoryDetailId()).getId());
193 192 item.setContainerCode(inventoryDetailMap.get(item.getInventoryDetailId()).getContainerCode());
194 193 }
195 194 // 将flatShipmentList根据容器进行分类合并为一个map
196 195 Map<String, List<FlatShipment>> stringListMap = flatShipmentList.stream().collect(Collectors.groupingBy(FlatShipment::getContainerCode));
197 196 // 遍历stringListMap并完成出库任务
198   - for (String containerCode :stringListMap.keySet()){
  197 + for (String containerCode : stringListMap.keySet()) {
199 198 result = shipmentCombinationService.flatShipmentByContainerCode(containerCode, stringListMap.get(containerCode), warehouseCode);
200   - if (!result.isSuccess()){
  199 + if (!result.isSuccess()) {
201 200 throw new RuntimeException(result.getMessage());
202 201 }
203 202 }
... ... @@ -208,11 +207,25 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
208 207 @Transactional(rollbackFor = Exception.class)
209 208 public Result quickReceiptService(QuickReceiptBean bean, String warehouseCode) {
210 209 String containerCode = bean.getContainerCode();
  210 + String locationCode = bean.getLocationCode();
  211 + if (StringUtils.isEmpty(locationCode)) {
  212 + return Result.error("平库入库,库位编码为空");
  213 + }
  214 + Location location = locationService.getLocationByCode(locationCode, warehouseCode);
  215 + if (location == null) {
  216 + return Result.error("平库入库, 库位:" + locationCode + "不存在");
  217 + }
  218 + if (StringUtils.isEmpty(containerCode)) {
  219 + Container container = containerService.getContainerByLocationCode(locationCode, warehouseCode);
  220 + if (container != null) {
  221 + containerCode = container.getCode();
  222 + }
  223 + }
211 224 if (StringUtils.isEmpty(containerCode)) {
212 225 Container container = containerService.createLSContainer(warehouseCode);
213 226 containerCode = container.getCode();
214 227 }
215   - if (StringUtils.isEmpty(containerCode)){
  228 + if (StringUtils.isEmpty(containerCode)) {
216 229 return Result.error("托盘号containerCode不能为空");
217 230 }
218 231 if (bean.getReceiptDetails() == null || bean.getReceiptDetails().size() == 0) {
... ... @@ -227,19 +240,15 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
227 240 if (!rs1.isSuccess()) {
228 241 return rs1;
229 242 }
230   - Location location = locationService.getLocationByCode(bean.getLocationCode(), warehouseCode);
231   - if (location == null) {
232   - return Result.error("库位:"+bean.getLocationCode()+"不存在");
233   - }
234   - if (!QuantityConstant.ZONE_TYPE_FLAT.equals(location.getZoneCode())){
235   - return Result.error("库位:"+bean.getLocationCode()+"不是平库库位");
  243 + if (!QuantityConstant.ZONE_TYPE_FLAT.equals(location.getZoneCode())) {
  244 + return Result.error("库位:" + bean.getLocationCode() + "不是平库库位");
236 245 }
237 246 // 创建入库单明细
238 247 List<ReceiptDetail> receiptDetails = bean.getReceiptDetails();
239 248 List<Receive> receiveList = new ArrayList<>();
240 249 for (ReceiptDetail receiptDetail : receiptDetails) {
241   - if (receiptDetail.getQty() == null || receiptDetail.getQty().compareTo(BigDecimal.ZERO) == 0){
242   - throw new JeecgBootException("物料编码:" + receiptDetail.getMaterialCode() + "入库数量不能为0!" );
  250 + if (receiptDetail.getQty() == null || receiptDetail.getQty().compareTo(BigDecimal.ZERO) == 0) {
  251 + throw new JeecgBootException("物料编码:" + receiptDetail.getMaterialCode() + "入库数量不能为0!");
243 252 }
244 253 Receive receive = new Receive();
245 254 receiptDetail.setReceiptId(receiptHeader.getId());
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java
... ... @@ -10,10 +10,12 @@ import javax.servlet.http.HttpServletRequest;
10 10 import org.jeecg.common.api.vo.Result;
11 11 import org.jeecg.common.aspect.annotation.AutoLog;
12 12 import org.jeecg.common.system.query.QueryGenerator;
  13 +import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean;
13 14 import org.jeecg.modules.wms.config.container.entity.Container;
14 15 import org.jeecg.modules.wms.config.container.service.IContainerService;
15 16 import org.jeecg.modules.wms.config.location.service.ILocationService;
16 17 import org.jeecg.modules.wms.framework.controller.HuahengBaseController;
  18 +import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService;
17 19 import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader;
18 20 import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryHeaderService;
19 21 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail;
... ... @@ -50,6 +52,8 @@ public class ReceiveController extends HuahengBaseController {
50 52 private ILocationService locationService;
51 53 @Resource
52 54 private IInventoryHeaderService inventoryHeaderService;
  55 + @Resource
  56 + private IHuahengMultiHandlerService huahengMultiHandlerService;
53 57  
54 58 /**
55 59 * 通过详情ID查询
... ... @@ -228,4 +232,13 @@ public class ReceiveController extends HuahengBaseController {
228 232 });
229 233 return result;
230 234 }
  235 +
  236 + @ApiOperation(value = "平库快速入库", notes = "平库快速入库")
  237 + @PostMapping("/flatQuickReceipt")
  238 + public Result<?> flatQuickReceipt(@RequestBody QuickReceiptBean bean, HttpServletRequest req) {
  239 + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
  240 + bean.setWarehouseCode(warehouseCode);
  241 + Result result = huahengMultiHandlerService.quickReceiptService(bean, warehouseCode);
  242 + return result;
  243 + }
231 244 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... ... @@ -161,7 +161,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
161 161 String zoneCode = location.getZoneCode();
162 162 Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode);
163 163 if (!zone.getType().equals(QuantityConstant.ZONE_TYPE_STEREOSCOPIC)) {
164   - return Result.error("入库组盘,库区类型不是立库区");
  164 +// return Result.error("入库组盘,库区类型不是立库区");
165 165 }
166 166 }
167 167 int callBox = QuantityConstant.NOT_CALL_BOX;
... ... @@ -676,7 +676,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
676 676 @Transactional(rollbackFor = Exception.class)
677 677 public Result flatReceipt(List<Receive> receiveList, String containerCode, String toLocationCode, String warehouseCode) {
678 678 Result result = receiveService.flatReceive(receiveList, containerCode, warehouseCode);
679   - if (!result.isSuccess()){
  679 + if (!result.isSuccess()) {
680 680 throw new JeecgBootException(result.getMessage());
681 681 }
682 682 result = receiveService.flatOnShell(containerCode, toLocationCode, warehouseCode);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/controller/ShipmentCombinationController.java
... ... @@ -398,4 +398,15 @@ public class ShipmentCombinationController extends HuahengBaseController {
398 398 });
399 399 return result;
400 400 }
  401 +
  402 + /**
  403 + * 平库出库,通过库存ID
  404 + * @return
  405 + */
  406 + @ApiOperation(value = "库位监控-快速出库,通过库存ID", notes = "库位监控,通过库存ID")
  407 + @PostMapping("/flatQuickShipment")
  408 + public Result flatQuickShipment(@RequestBody List<FlatShipment> flatShipmentList, HttpServletRequest req) {
  409 + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
  410 + return huahengMultiHandlerService.autoShipmentByIDService(flatShipmentList, warehouseCode);
  411 + }
401 412 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -317,7 +317,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
317 317 Location location = locationService.getNear(fromLocation);
318 318 String locationCode = location.getCode();
319 319 if (StringUtils.isNotEmpty(location.getContainerCode())) {
320   - TaskHeader taskHeader = getUnCompleteTaskByFromLocationCode(fromLocationCode, warehouseCode);
  320 + TaskHeader taskHeader = getUnCompleteTaskByFromLocationCode(locationCode, warehouseCode);
321 321 if (taskHeader != null) {
322 322 preTaskNo = taskHeader.getId();
323 323 } else {
... ...