Commit 5b6938fe8383d844b1ec858c6f5c5a2388a601c4
1 parent
4111235b
修改 入库收货,生成上架任务自动执行定位
Showing
10 changed files
with
31 additions
and
21 deletions
src/main/java/com/huaheng/pc/check/checkHeader/controller/CheckHeaderController.java
... | ... | @@ -74,7 +74,8 @@ public class CheckHeaderController extends BaseController { |
74 | 74 | .eq(StringUtils.isNotNull(checkHeader.getCode()), CheckHeader::getCode, checkHeader.getCode()) |
75 | 75 | .eq(StringUtils.isNotEmpty(checkHeader.getReferCode()), CheckHeader::getReferCode, checkHeader.getReferCode()) |
76 | 76 | .eq(StringUtils.isNotEmpty(checkHeader.getStatus()), CheckHeader::getStatus, checkHeader.getStatus()) |
77 | - .in(StringUtils.isNotEmpty(checkHeader.getType()), CheckHeader::getType, types); | |
77 | + .in(StringUtils.isNotEmpty(checkHeader.getType()), CheckHeader::getType, types) | |
78 | + .orderByDesc(CheckHeader::getCreated); | |
78 | 79 | |
79 | 80 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
80 | 81 | // 使用分页查询 |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
... | ... | @@ -2,12 +2,15 @@ package com.huaheng.pc.inventory.cycleCountDetail.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
5 | 6 | import com.huaheng.common.exception.service.ServiceException; |
6 | 7 | import com.huaheng.common.utils.StringUtils; |
7 | 8 | import com.huaheng.common.utils.security.ShiroUtils; |
8 | 9 | import com.huaheng.framework.web.domain.AjaxResult; |
9 | 10 | import com.huaheng.pc.config.location.domain.Location; |
10 | 11 | import com.huaheng.pc.config.location.service.LocationService; |
12 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
13 | +import com.huaheng.pc.inventory.cycleCountDetail.mapper.CycleCountDetailMapper; | |
11 | 14 | import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader; |
12 | 15 | import com.huaheng.pc.inventory.cycleCountHeader.service.CycleCountHeaderService; |
13 | 16 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
... | ... | @@ -16,15 +19,10 @@ import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
16 | 19 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
17 | 20 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
18 | 21 | import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; |
19 | -import javafx.concurrent.Task; | |
20 | 22 | import org.springframework.stereotype.Service; |
21 | -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
22 | -import com.huaheng.pc.inventory.cycleCountDetail.mapper.CycleCountDetailMapper; | |
23 | -import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
24 | 23 | import org.springframework.transaction.annotation.Transactional; |
25 | 24 | |
26 | 25 | import javax.annotation.Resource; |
27 | -import java.math.BigDecimal; | |
28 | 26 | import java.util.ArrayList; |
29 | 27 | import java.util.Date; |
30 | 28 | import java.util.List; |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailService.java
... | ... | @@ -3,7 +3,6 @@ package com.huaheng.pc.receipt.receiptContainerDetail.service; |
3 | 3 | import com.huaheng.framework.web.domain.AjaxResult; |
4 | 4 | import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; |
5 | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
6 | -import com.sun.org.apache.xpath.internal.operations.Bool; | |
7 | 6 | |
8 | 7 | import java.util.List; |
9 | 8 | import java.util.Map; |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
... | ... | @@ -86,7 +86,8 @@ public class ReceiptContainerHeaderController extends BaseController { |
86 | 86 | .eq(StringUtils.isNotEmpty(receiptContainerHeader.getTaskType()),ReceiptContainerHeader::getTaskType, receiptContainerHeader.getTaskType()) |
87 | 87 | .eq(StringUtils.isNotNull(receiptContainerHeader.getStatus()),ReceiptContainerHeader::getStatus, receiptContainerHeader.getStatus()) |
88 | 88 | .eq(StringUtils.isNotEmpty(receiptContainerHeader.getCreatedBy()),ReceiptContainerHeader::getCreatedBy, receiptContainerHeader.getCreatedBy()) |
89 | - .inSql(StringUtils.isNotEmpty(receiptCode), ReceiptContainerHeader::getId, sql); | |
89 | + .inSql(StringUtils.isNotEmpty(receiptCode), ReceiptContainerHeader::getId, sql) | |
90 | + .orderByDesc(ReceiptContainerHeader::getId); | |
90 | 91 | |
91 | 92 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
92 | 93 | /** |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
... | ... | @@ -137,6 +137,9 @@ public class ReceiptHeaderController extends BaseController { |
137 | 137 | @PostMapping("/edit") |
138 | 138 | @ResponseBody |
139 | 139 | public AjaxResult editSave(ReceiptHeader receiptHeader) { |
140 | + if (receiptHeader.getFirstStatus() >100 | receiptHeader.getLastStatus()>100){ | |
141 | + return AjaxResult.error("已进入订单池,不允许修改"); | |
142 | + } | |
140 | 143 | receiptHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); |
141 | 144 | return toAjax(receiptHeaderService.updateById(receiptHeader)); |
142 | 145 | } |
... | ... | @@ -250,7 +253,7 @@ public class ReceiptHeaderController extends BaseController { |
250 | 253 | } |
251 | 254 | |
252 | 255 | /** |
253 | - * 入库质检 | |
256 | + * 入库单打印 | |
254 | 257 | */ |
255 | 258 | @ApiOperation(value="打印入库单报表", notes="打印入库单报表", httpMethod = "POST") |
256 | 259 | @RequiresPermissions("receipt:receiptHeader:check") |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
src/main/resources/templates/config/bomDetail/bomDetail.html
... | ... | @@ -5,10 +5,10 @@ |
5 | 5 | <body> |
6 | 6 | |
7 | 7 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
8 | - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="general:bomDetail:add"> | |
8 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:bomDetail:add"> | |
9 | 9 | <i class="fa fa-plus"></i> 新增 |
10 | 10 | </a> |
11 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="general:bomDetail:remove"> | |
11 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:bomDetail:remove"> | |
12 | 12 | <i class="fa fa-trash-o"></i> 删除 |
13 | 13 | </a> |
14 | 14 | </div> |
... | ... |
src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html
... | ... | @@ -144,11 +144,7 @@ |
144 | 144 | formatter: function(value, row, index) { |
145 | 145 | var actions = []; |
146 | 146 | actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>明细</a> '); |
147 | - if (row.toLocation == null || row.toLocation == ""){ | |
148 | - actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="position(\'' + row.id + '\')"><i class="fa fa-edit"></i>定位</a> '); | |
149 | - } else { | |
150 | - actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
151 | - } | |
147 | + actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
152 | 148 | if (row.status == 0) { |
153 | 149 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消配盘</a>'); |
154 | 150 | } |
... | ... |
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... | ... | @@ -339,15 +339,15 @@ |
339 | 339 | if (row.firstStatus < 100) |
340 | 340 | actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> '); |
341 | 341 | if (row.firstStatus == 120 || row.lastStatus ==120){ |
342 | - actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>入库预约</a> '); | |
342 | + actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="arrival(\'' + row.id + '\')" ><i class="fa fa-edit"></i>入库预约</a> '); | |
343 | 343 | } |
344 | 344 | if (row.firstStatus ==150 || row.lastStatus == 150 ){ |
345 | 345 | actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>到货通知</a> '); |
346 | 346 | } |
347 | 347 | if (row.firstStatus ==180 || row.lastStatus == 180 ){ |
348 | - actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>质检</a> '); | |
348 | + actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="check(\'' + row.id + '\')" ><i class="fa fa-edit"></i>质检</a> '); | |
349 | 349 | } |
350 | - if (row.lastStatus>100 && row.lastStatus < 200) | |
350 | + if (row.firstStatus == 200 && row.lastStatus == 200) | |
351 | 351 | actions.push('<a class="btn btn-primary btn-xs to-receive" ' +addFlag+ ' onclick="Toreceiving(\''+ row.code + '\')"><i class="fa fa-cart-plus"></i>收货</a> '); |
352 | 352 | if (row.firstStatus < 120) |
353 | 353 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); |
... | ... | @@ -724,6 +724,7 @@ |
724 | 724 | $.operate.submit(url, "post", "json", data); |
725 | 725 | } |
726 | 726 | |
727 | + //通过审核 | |
727 | 728 | function approval() { |
728 | 729 | var rows=$("#bootstrap-table").bootstrapTable('getSelections'); |
729 | 730 | if (rows.length == 0) { |
... | ... | @@ -738,6 +739,17 @@ |
738 | 739 | var data = { "ids": ids.substring(0, ids.length-1),"approval": 100 }; |
739 | 740 | $.operate.submit(url, "post", "json", data); |
740 | 741 | } |
742 | + | |
743 | + function arrival(id) { | |
744 | + var url = prefix+"/arrival/"+id; | |
745 | + $.modal.open("预约到货" + $.table._option.modalName, url); | |
746 | + } | |
747 | + | |
748 | + function check(id) { | |
749 | + var url = prefix+"/check"; | |
750 | + var data = { "id": id }; | |
751 | + $.operate.submit(url, "post", "json", data); | |
752 | + } | |
741 | 753 | </script> |
742 | 754 | </body> |
743 | 755 | </html> |
744 | 756 | \ No newline at end of file |
... | ... |
src/main/resources/templates/receipt/receiving/add.html
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | <div class="form-group"> |
71 | 71 | <label class="col-sm-3 control-label">定位规则:</label> |
72 | 72 | <div class="col-sm-8"> |
73 | - <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail()}"> | |
73 | + <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('入库')}"> | |
74 | 74 | <option value="">请选择</option> |
75 | 75 | <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option> |
76 | 76 | </select> |
... | ... |