Commit 537adf181fa587d3d3e9fd3d1d6a9dc9161f2319
1 parent
d2b794c1
feat:新增PDA获取所有平库接口
Showing
4 changed files
with
79 additions
and
37 deletions
src/main/java/com/huaheng/framework/config/ShiroConfig.java
... | ... | @@ -253,6 +253,7 @@ public class ShiroConfig { |
253 | 253 | // 不需要拦截的访问 |
254 | 254 | // filterChainDefinitionMap.put("/admin/home", "anon,captchaValidate"); |
255 | 255 | filterChainDefinitionMap.put("/mobile/download/*", "anon"); |
256 | + filterChainDefinitionMap.put("/config/zone/*", "anon"); | |
256 | 257 | filterChainDefinitionMap.put("/admin/login", "anon"); |
257 | 258 | filterChainDefinitionMap.put("/login", "anon"); |
258 | 259 | filterChainDefinitionMap.put("/file/**", "anon"); |
... | ... | @@ -267,8 +268,8 @@ public class ShiroConfig { |
267 | 268 | filterChainDefinitionMap.put("/api/**", "anon"); |
268 | 269 | filterChainDefinitionMap.put("/endpoint/**", "anon"); |
269 | 270 | filterChainDefinitionMap.put("/manager/**", "anon"); |
270 | - filterChainDefinitionMap.put("/API/WMS/v2/**","anon"); | |
271 | - filterChainDefinitionMap.put("/mobile/receipt/batch/**","anon"); | |
271 | + filterChainDefinitionMap.put("/API/WMS/v2/**", "anon"); | |
272 | + filterChainDefinitionMap.put("/mobile/receipt/batch/**", "anon"); | |
272 | 273 | // 系统权限列表 |
273 | 274 | // filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll()); |
274 | 275 | |
... | ... |
src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java
... | ... | @@ -211,4 +211,13 @@ public class ZoneController extends BaseController { |
211 | 211 | |
212 | 212 | return AjaxResult.success().setData(map); |
213 | 213 | } |
214 | + | |
215 | + | |
216 | + //PDA获取所有平库接口 | |
217 | + @PostMapping("/getAllFlatLocation") | |
218 | + @ResponseBody | |
219 | + public AjaxResult getAllFlatLocation() { | |
220 | + List<Zone> list = zoneService.list(new LambdaQueryWrapper<Zone>().eq(Zone::getZoneType, "平库")); | |
221 | + return AjaxResult.success(list); | |
222 | + } | |
214 | 223 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
... | ... | @@ -143,10 +143,9 @@ public class ReceiptHeaderController extends BaseController { |
143 | 143 | @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd, |
144 | 144 | Integer statusFirst, Integer statusLast) { |
145 | 145 | List<ReceiptHeader> list = new ArrayList<>(); |
146 | - LambdaQueryWrapper<ReceiptDetail> receiptDetailLambdaQuery = Wrappers.lambdaQuery(); | |
147 | - receiptDetailLambdaQuery.eq(ReceiptDetail::getSNNO, receiptHeader.getSNNO()) | |
148 | - .last("and qty > taskQty"); | |
149 | - ReceiptDetail receiptDetail = receiptDetailService.getOne(receiptDetailLambdaQuery); | |
146 | + ReceiptDetail receiptDetail = receiptDetailService.getOne(new LambdaQueryWrapper<ReceiptDetail>() | |
147 | + .eq(ReceiptDetail::getSNNO, receiptHeader.getSNNO()).last("and qty > taskQty")); | |
148 | + | |
150 | 149 | ReceiptHeader receiptHeaderData = new ReceiptHeader(); |
151 | 150 | if (StringUtils.isNotNull(receiptDetail)) { |
152 | 151 | receiptHeaderData = receiptHeaderService.getById(receiptDetail.getReceiptId()); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiving/controller/ReceivingController.java
... | ... | @@ -146,41 +146,13 @@ public class ReceivingController extends BaseController { |
146 | 146 | return ajaxResult; |
147 | 147 | } |
148 | 148 | |
149 | - | |
150 | - /** | |
151 | - * 平库组盘 | |
152 | - */ | |
153 | - @ApiOperation(value = "保存收货 ", notes = "保存收货 ", httpMethod = "POST") | |
154 | - @ResponseBody | |
155 | - @PostMapping("/flatSave") | |
156 | - @RequiresPermissions("receipt:receiving:receiving") | |
157 | - @Log(title = "入库-保存收货", operating = "PC端保存收货", action = BusinessType.OTHER) | |
158 | - public AjaxResult flatSave( | |
159 | - @ApiParam(name = "receiptCode", value = "入库单编码") String receiptCode, | |
160 | - @ApiParam(name = "receiptDetailId", value = "入库单详情id") Integer receiptDetailId, | |
161 | - @ApiParam(name = "locationCode", value = "库位编码", required = false) String locationCode, | |
162 | - @ApiParam(name = "qty", value = "收货数量") BigDecimal qty) { | |
163 | - if (qty == null || qty.intValue() <= 0) { | |
164 | - return AjaxResult.error("配盘数量必须大于0"); | |
165 | - } | |
166 | - AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { | |
167 | - @Override | |
168 | - public AjaxResult doProcess() { | |
169 | - AjaxResult ajaxResult = receiptContainerHeaderService.flatSaveContainer(receiptCode, receiptDetailId, locationCode, qty); | |
170 | - return ajaxResult; | |
171 | - } | |
172 | - }); | |
173 | - return ajaxResult; | |
174 | - } | |
175 | - | |
176 | - | |
177 | 149 | /** |
178 | - * 保存收货 | |
150 | + * PDA立库组盘 | |
179 | 151 | */ |
180 | - @ApiOperation(value = "保存收货 ", notes = "保存收货 ", httpMethod = "POST") | |
152 | + @ApiOperation(value = "PDA立库组盘保存收货 ", notes = "PDA立库组盘保存收货 ", httpMethod = "POST") | |
181 | 153 | @ResponseBody |
182 | 154 | @PostMapping("/saveBatch") |
183 | - @Log(title = "入库-保存收货", operating = "PC端保存收货", action = BusinessType.OTHER) | |
155 | + @Log(title = "入库-PDA立库组盘保存收货", operating = "PDA立库组盘端保存收货", action = BusinessType.OTHER) | |
184 | 156 | public AjaxResult saveBatch(@RequestBody List<ReceiptSave> list) { |
185 | 157 | String id = ""; |
186 | 158 | for (ReceiptSave receipt : list) { |
... | ... | @@ -210,6 +182,67 @@ public class ReceivingController extends BaseController { |
210 | 182 | return ajaxResult; |
211 | 183 | } |
212 | 184 | |
185 | + /** | |
186 | + * PDA平库组盘 | |
187 | + */ | |
188 | + @ApiOperation(value = "PDA平库组盘 ", notes = "PDA平库组盘 ", httpMethod = "POST") | |
189 | + @ResponseBody | |
190 | + @PostMapping("/flatSaveBatch") | |
191 | + @Log(title = "入库-PDA平库组盘", operating = "PDA平库组盘", action = BusinessType.OTHER) | |
192 | + public AjaxResult flatSaveBatch(@RequestBody List<ReceiptSave> list) { | |
193 | + String id = ""; | |
194 | + for (ReceiptSave receipt : list) { | |
195 | + if (receipt.getReceiptDetailId() != null) { | |
196 | + if (receipt.getQty() == null) { | |
197 | + return AjaxResult.error("入库详情id:" + receipt.getReceiptDetailId() + ",数量为空!!"); | |
198 | + } | |
199 | + if (receipt.getQty().intValue() <= 0) { | |
200 | + return AjaxResult.error("入库详情id:" + receipt.getReceiptDetailId() + ",平库配盘数量必须大于0"); | |
201 | + } | |
202 | + AjaxResult result = receiptContainerHeaderService.flatSaveContainer(receipt.getReceiptCode(), receipt.getReceiptDetailId(), receipt.getLocationCode(), receipt.getQty()); | |
203 | + if (result.getCode() != 200) { | |
204 | + return AjaxResult.error("入库详情id:" + receipt.getReceiptDetailId() + ",平库组盘失败!"); | |
205 | + } | |
206 | + String str = result.getData().toString(); | |
207 | + JSONObject obj = JSON.parseObject(str); | |
208 | + id = obj.getString("id"); | |
209 | + } | |
210 | + } | |
211 | + AjaxResult ajaxResult = new AjaxResult(); | |
212 | + JSONObject json = new JSONObject(); | |
213 | + json.put("id", id); | |
214 | + ajaxResult.setData(json); | |
215 | + ajaxResult.setMsg("平库组盘成功"); | |
216 | + ajaxResult.setCode(200); | |
217 | + return ajaxResult; | |
218 | + } | |
219 | + | |
220 | + /** | |
221 | + * 平库组盘 | |
222 | + */ | |
223 | + @ApiOperation(value = "保存收货 ", notes = "保存收货 ", httpMethod = "POST") | |
224 | + @ResponseBody | |
225 | + @PostMapping("/flatSave") | |
226 | + @RequiresPermissions("receipt:receiving:receiving") | |
227 | + @Log(title = "入库-保存收货", operating = "PC端保存收货", action = BusinessType.OTHER) | |
228 | + public AjaxResult flatSave( | |
229 | + @ApiParam(name = "receiptCode", value = "入库单编码") String receiptCode, | |
230 | + @ApiParam(name = "receiptDetailId", value = "入库单详情id") Integer receiptDetailId, | |
231 | + @ApiParam(name = "locationCode", value = "库位编码", required = false) String locationCode, | |
232 | + @ApiParam(name = "qty", value = "收货数量") BigDecimal qty) { | |
233 | + if (qty == null || qty.intValue() <= 0) { | |
234 | + return AjaxResult.error("配盘数量必须大于0"); | |
235 | + } | |
236 | + AjaxResult ajaxResult = handleMultiProcess(new MultiProcessListener() { | |
237 | + @Override | |
238 | + public AjaxResult doProcess() { | |
239 | + AjaxResult ajaxResult = receiptContainerHeaderService.flatSaveContainer(receiptCode, receiptDetailId, locationCode, qty); | |
240 | + return ajaxResult; | |
241 | + } | |
242 | + }); | |
243 | + return ajaxResult; | |
244 | + } | |
245 | + | |
213 | 246 | |
214 | 247 | /** |
215 | 248 | * 获取库存信息 |
... | ... |