Commit dc30745ae4ab57a872e0c3b82f673cde840fcec4
1 parent
68c6faeb
手持直接输托盘和物料编码入库
Showing
7 changed files
with
16 additions
and
9 deletions
src/main/java/com/huaheng/mobile/receipt/MobileBatchReceiptController.java
... | ... | @@ -239,7 +239,7 @@ public class MobileBatchReceiptController { |
239 | 239 | if(container == null) { |
240 | 240 | throw new JSONException("不存在这个托盘"); |
241 | 241 | } |
242 | - if(locationCode.equals(container.getLocationCode())) { | |
242 | + if(locationCode != null && locationCode.equals(container.getLocationCode())) { | |
243 | 243 | /* 查询未完成的入库任务*/ |
244 | 244 | LambdaQueryWrapper<TaskHeader> taskQueryWrapper = Wrappers.lambdaQuery(); |
245 | 245 | taskQueryWrapper.eq(TaskHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
... | ... | @@ -308,12 +308,14 @@ public class MobileBatchReceiptController { |
308 | 308 | |
309 | 309 | } else { |
310 | 310 | ReceiptContainerView record = new ReceiptContainerView(); |
311 | - record.setReceiptContainerCode(receiptBills.get(0).getReceiptContainerCode()); | |
312 | - record.setLocationCode(receiptBills.get(0).getLocationCode()); | |
311 | + record.setReceiptContainerCode(containerCode); | |
312 | + record.setLocationCode(locationCode); | |
313 | 313 | record.setTaskType((short)100); |
314 | 314 | record.setCompanyCode(receiptBills.get(0).getCompanyCode()); |
315 | 315 | receiptContainerHeaderService.checkContainer(record); |
316 | - receiptContainerHeaderService.mobileCheckLocationCode(record); | |
316 | + if(locationCode != null) { | |
317 | + receiptContainerHeaderService.mobileCheckLocationCode(record); | |
318 | + } | |
317 | 319 | int receiptHeaderId = receiptHeaderService.createTodayHeader(companyCode); |
318 | 320 | ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptHeaderId); |
319 | 321 | List<Integer> receiptDetailIds = receiptDetailService.insertTodayReceiptDetail(receiptHeaderId, receiptBills, true, companyCode); |
... | ... | @@ -333,6 +335,7 @@ public class MobileBatchReceiptController { |
333 | 335 | return AjaxResult.error("插入入库明细表单失败"); |
334 | 336 | } |
335 | 337 | } |
338 | + | |
336 | 339 | return AjaxResult.success("收货成功"); |
337 | 340 | } |
338 | 341 | |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java
... | ... | @@ -165,10 +165,12 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContai |
165 | 165 | record.setMaterialName(material.getName()); |
166 | 166 | record.setMaterialSpec(material.getSpec()); |
167 | 167 | record.setQty(receiptBill.getQty()); |
168 | + record.setContainerCode(receiptBills.get(0).getReceiptContainerCode()); | |
168 | 169 | if(receiptBill.getWeight() != null) { |
169 | 170 | record.setWeight(receiptBill.getWeight()); |
170 | 171 | } |
171 | 172 | record.setCreatedBy(ShiroUtils.getLoginName()); |
173 | + record.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
172 | 174 | |
173 | 175 | LambdaQueryWrapper<ReceiptContainerDetail> detailyWrapper = Wrappers.lambdaQuery(); |
174 | 176 | detailyWrapper.eq(ReceiptContainerDetail::getReceiptContainerId, headerId) |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -480,6 +480,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
480 | 480 | recorder.setTaskType(String.valueOf(QuantityConstant.TASK_TYPE_WHOLERECEIPT)); |
481 | 481 | recorder.setStatus((short) 0); |
482 | 482 | recorder.setCreatedBy(ShiroUtils.getLoginName()); |
483 | + recorder.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
483 | 484 | |
484 | 485 | LambdaQueryWrapper<ReceiptContainerHeader> receiptContainerHeaderLambada = Wrappers.lambdaQuery(); |
485 | 486 | receiptContainerHeaderLambada.eq(ReceiptContainerHeader::getContainerCode, receiptContainerCode) |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
... | ... | @@ -461,6 +461,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
461 | 461 | receiptDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); |
462 | 462 | receiptDetail.setDeleted(false); |
463 | 463 | receiptDetail.setBatch(receiptBill.getBatch()); |
464 | + receiptDetail.setCompanyCode(companyCode); | |
464 | 465 | save(receiptDetail); |
465 | 466 | mReceiptDetailIds.add(receiptDetail.getId()); |
466 | 467 | } |
... | ... |
src/main/resources/mybatis/receipt/ReceiptHeaderMapper.xml
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | </select> |
62 | 62 | |
63 | 63 | <select id="createCode" resultType="java.lang.String"> |
64 | - SELECT code FROM receipt_header WHERE type = #{receiptType,jdbcType=VARCHAR} ORDER BY id DESC LIMIT 1 | |
64 | + SELECT code FROM receipt_header WHERE receiptType = #{receiptType,jdbcType=VARCHAR} ORDER BY id DESC LIMIT 1 | |
65 | 65 | </select> |
66 | 66 | <select id="getLatestReceipt" resultType="com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader"> |
67 | 67 | select * from receipt_header order by id desc limit 10 |
... | ... |
src/main/resources/templates/receipt/receiptDetail/add.html
... | ... | @@ -134,8 +134,8 @@ |
134 | 134 | <!--</div>--> |
135 | 135 | <div class="form-group"> |
136 | 136 | <div class="form-control-static col-sm-offset-9"> |
137 | - <button type="submit" class="btn btn-primary" style="position: fixed">提交</button> | |
138 | - <button onclick="$.modal.close()" class="btn btn-danger" type="button" style="position: fixed">关闭</button> | |
137 | + <button type="submit" class="btn btn-primary" >提交</button> | |
138 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | |
139 | 139 | </div> |
140 | 140 | </div> |
141 | 141 | </form> |
... | ... |
src/main/resources/templates/receipt/receiptHeader/add.html
... | ... | @@ -41,8 +41,8 @@ |
41 | 41 | </div> |
42 | 42 | <div class="form-group"> |
43 | 43 | <div class="form-control-static col-sm-offset-9"> |
44 | - <button type="submit" class="btn btn-primary" style="position: fixed" >提交</button> | |
45 | - <button onclick="$.modal.close()" class="btn btn-danger" type="button" style="position: fixed">关闭</button> | |
44 | + <button type="submit" class="btn btn-primary" >提交</button> | |
45 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button" >关闭</button> | |
46 | 46 | </div> |
47 | 47 | </div> |
48 | 48 | </form> |
... | ... |