Commit ec38a7809e8cdb47ebf672451dee56e0ce2f91d2
1 parent
adae2fa5
库存查看,交易-权限,出库查看修复传参错误
Showing
10 changed files
with
50 additions
and
39 deletions
src/main/java/com/huaheng/pc/inventory/inventoryDetail/controller/InventoryDetailController.java
... | ... | @@ -18,6 +18,7 @@ import com.huaheng.pc.config.material.service.MaterialServiceImpl; |
18 | 18 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
19 | 19 | import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; |
20 | 20 | import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService; |
21 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
21 | 22 | import org.springframework.stereotype.Controller; |
22 | 23 | import org.springframework.web.bind.annotation.GetMapping; |
23 | 24 | import org.springframework.web.bind.annotation.PostMapping; |
... | ... | @@ -160,9 +161,8 @@ public class InventoryDetailController extends BaseController |
160 | 161 | return AjaxResult.success("库存明细出库查看任务下发成功!"); |
161 | 162 | } |
162 | 163 | |
163 | - | |
164 | 164 | /**在库质检*/ |
165 | - //@RequiresPermissions("inventory:inventoryHeader:detailCheckTask") | |
165 | + @RequiresPermissions("inventory:inventoryDetail:detailCheckTask") | |
166 | 166 | @PostMapping("/detailCheckTask") |
167 | 167 | @ResponseBody |
168 | 168 | public AjaxResult detailCheckTask(String ids) throws InvocationTargetException, IllegalAccessException { |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
... | ... | @@ -95,7 +95,7 @@ public class InventoryHeaderController extends BaseController |
95 | 95 | } |
96 | 96 | |
97 | 97 | /**移库*/ |
98 | - //@RequiresPermissions("inventory:inventoryHeader:transfer") | |
98 | + @RequiresPermissions("inventory:inventoryHeader:transfer") | |
99 | 99 | @PostMapping("/transfer") |
100 | 100 | @ResponseBody |
101 | 101 | public AjaxResult transfer(String sourceLocation, String destinationLocation){ |
... | ... | @@ -106,7 +106,7 @@ public class InventoryHeaderController extends BaseController |
106 | 106 | } |
107 | 107 | |
108 | 108 | /**出库查看*/ |
109 | - //@RequiresPermissions("inventory:inventoryHeader:seeOut") | |
109 | + @RequiresPermissions("inventory:inventoryHeader:seeOut") | |
110 | 110 | @PostMapping("/createCheckOutTask") |
111 | 111 | @ResponseBody |
112 | 112 | public AjaxResult createCheckOutTask(String[] ids){ |
... | ... | @@ -130,7 +130,7 @@ public class InventoryHeaderController extends BaseController |
130 | 130 | * @param destinationLocation |
131 | 131 | * @return |
132 | 132 | */ |
133 | - //@RequiresPermissions("task:task:emptyIn") | |
133 | + @RequiresPermissions("inventory:inventoryHeader:emptyIn") | |
134 | 134 | @PostMapping("/emptyIn") |
135 | 135 | @Log(title = "任务-任务管理", operating = "生成空托盘入库任务", action = BusinessType.INSERT) |
136 | 136 | @ResponseBody |
... | ... | @@ -155,7 +155,7 @@ public class InventoryHeaderController extends BaseController |
155 | 155 | * @param sourceLocation |
156 | 156 | * @return |
157 | 157 | */ |
158 | - //@RequiresPermissions("task:task:emptyOut") | |
158 | + @RequiresPermissions("inventory:inventoryHeader:emptyOut") | |
159 | 159 | @PostMapping("/emptyOut") |
160 | 160 | @Log(title = "任务-任务管理", operating = "生成空托盘出库任务", action = BusinessType.INSERT) |
161 | 161 | @ResponseBody |
... | ... | @@ -180,7 +180,7 @@ public class InventoryHeaderController extends BaseController |
180 | 180 | * @param location |
181 | 181 | * @return |
182 | 182 | */ |
183 | - //@RequiresPermissions("task:task:emptyInOut") | |
183 | + @RequiresPermissions("inventory:inventoryHeader:emptyCheckOut") | |
184 | 184 | @PostMapping("/emptyCheckOut") |
185 | 185 | @Log(title = "任务-任务管理", operating = "生成空托盘出库查看任务", action = BusinessType.INSERT) |
186 | 186 | @ResponseBody |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryTransaction/controller/InventoryTransactionController.java
... | ... | @@ -18,6 +18,7 @@ import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService; |
18 | 18 | import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction; |
19 | 19 | import com.huaheng.pc.inventory.inventoryTransaction.service.InventoryTransactionService; |
20 | 20 | import io.swagger.models.auth.In; |
21 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
21 | 22 | import org.springframework.stereotype.Controller; |
22 | 23 | import org.springframework.ui.ModelMap; |
23 | 24 | import org.springframework.web.bind.annotation.*; |
... | ... | @@ -43,7 +44,7 @@ public class InventoryTransactionController extends BaseController{ |
43 | 44 | |
44 | 45 | private String prefix = "inventory/inventoryTransaction"; |
45 | 46 | |
46 | - //@RequiresPermissions("inventory:inventoryTransaction:view") | |
47 | + @RequiresPermissions("inventory:inventoryTransaction:view") | |
47 | 48 | @GetMapping() |
48 | 49 | public String inventoryTransaction() |
49 | 50 | { |
... | ... | @@ -53,7 +54,7 @@ public class InventoryTransactionController extends BaseController{ |
53 | 54 | /** |
54 | 55 | * 查询库存交易列表 |
55 | 56 | */ |
56 | - //@RequiresPermissions("inventory:inventoryTransaction:inventoryTransactionList") | |
57 | + @RequiresPermissions("inventory:inventoryTransaction:inventoryTransactionList") | |
57 | 58 | @Log(title = "库存-库存交易",operating = "查看库存交易列表", action = BusinessType.GRANT) |
58 | 59 | @PostMapping("/inventoryTransactionList") |
59 | 60 | @ResponseBody |
... | ... | @@ -95,15 +96,16 @@ public class InventoryTransactionController extends BaseController{ |
95 | 96 | } |
96 | 97 | } |
97 | 98 | |
98 | - //@RequiresPermissions("receipt:bill:report") | |
99 | + @RequiresPermissions("inventory:inventoryTransaction:view:report") | |
99 | 100 | @Log(title = "库存-库存交易明细", operating = "库存交易明细报表打印", action = BusinessType.OTHER) |
100 | 101 | @GetMapping("/report/{ids}") |
101 | 102 | public String report(@PathVariable("ids") Integer[] ids, ModelMap mmap) |
102 | 103 | { |
103 | - List<InventoryTransaction> list=new ArrayList<InventoryTransaction>(); | |
104 | + List<InventoryTransaction> list = new ArrayList<>(); | |
104 | 105 | for(Integer id:ids){ |
105 | - if(id!=null) { | |
106 | - //list.add(inventoryTransaction); | |
106 | + if(id != null) { | |
107 | + InventoryTransaction inventoryTransaction = inventoryTransactionService.getById(id); | |
108 | + list.add(inventoryTransaction); | |
107 | 109 | } |
108 | 110 | mmap.put("inventoryTransaction", list); |
109 | 111 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -865,6 +865,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
865 | 865 | |
866 | 866 | for (String id : ids) { |
867 | 867 | InventoryHeader inventoryHeader = inventoryHeaderService.getById(Integer.parseInt(id)); |
868 | + //校验库位是否锁定 | |
868 | 869 | //检查库位容器 |
869 | 870 | Location temp = new Location(); |
870 | 871 | temp.setCode(inventoryHeader.getLocationCode()); |
... | ... | @@ -924,7 +925,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
924 | 925 | } |
925 | 926 | if (taskDetailService.saveBatch(taskDetails)) { |
926 | 927 | //锁定库位状态 |
927 | - locationService.updateStatus(loc.getContainerCode(), "lock"); | |
928 | + locationService.updateStatus(inventoryHeader.getLocationCode(), "lock"); | |
928 | 929 | } else { |
929 | 930 | throw new ServiceException("出库查看任务明细生成失败!"); |
930 | 931 | } |
... | ... |
src/main/resources/templates/check/checkHeader/checkHeader.html
... | ... | @@ -103,10 +103,12 @@ |
103 | 103 | </div> |
104 | 104 | |
105 | 105 | <div class="btn-group hidden-xs" id="toolbarReg" role="group"> |
106 | - <a class="btn btn-outline btn-success btn-rounded" onclick="complete()" shiro:hasPermission="check:checkingRegister:remove"> | |
106 | + <a class="btn btn-outline btn-success btn-rounded" onclick="complete()" | |
107 | + shiro:hasPermission="check:checkingRegister:remove"> | |
107 | 108 | <i class="fa fa-check-circle-o"></i> 质检完成 |
108 | 109 | </a> |
109 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="check:checkingRegister:remove"> | |
110 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | |
111 | + shiro:hasPermission="check:checkingRegister:remove"> | |
110 | 112 | <i class="fa fa-trash-o"></i> 删除 |
111 | 113 | </a> |
112 | 114 | </div> |
... | ... |
src/main/resources/templates/inventory/adjustHeader/adjustHeader.html
... | ... | @@ -180,9 +180,9 @@ |
180 | 180 | align: 'center', |
181 | 181 | formatter: function (value, row, index) { |
182 | 182 | var actions = []; |
183 | - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="adjustPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> '); | |
184 | - /* actions.push('<a class="btn btn-info btn-xs ' + upload + ' " href="#" onclick="upLoad(\'' + row.code + '\',\'' + row.sourceCode + '\')"><i class="fa fa-edit"></i>上传</a> '); | |
185 | - actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');*/ | |
183 | + /* actions.push('<a class="btn btn-success btn-xs " href="#" onclick="adjustPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> '); | |
184 | + actions.push('<a class="btn btn-info btn-xs ' + upload + ' " href="#" onclick="upLoad(\'' + row.code + '\',\'' + row.sourceCode + '\')"><i class="fa fa-edit"></i>上传</a> '); | |
185 | + actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');*/ | |
186 | 186 | actions.push('<a style="background: #b5bdc0" class="btn btn-default btn-xs " href="#" onclick="detail(\'' + row.id + '\',\'' + row.code + '\')"><i class="fa fa-list-ul"></i>明细</a>'); |
187 | 187 | return actions.join(''); |
188 | 188 | } |
... | ... |
src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html
... | ... | @@ -83,11 +83,11 @@ |
83 | 83 | </div> |
84 | 84 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
85 | 85 | <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()" |
86 | - shiro:hasPermission="inventory:inventory:seeOut"> | |
86 | + shiro:hasPermission="inventory:inventoryHeader:seeOut"> | |
87 | 87 | <i class="fa fa-eye"></i> 出库查看 |
88 | 88 | </a> |
89 | 89 | <a class="btn btn-outline btn-primary btn-rounded" onclick="check()" |
90 | - > | |
90 | + shiro:hasPermission="inventory:inventoryDetail:detailCheckTask"> | |
91 | 91 | <i class="fa fa-eye"></i> 在库质检 |
92 | 92 | </a> |
93 | 93 | </div> |
... | ... |
src/main/resources/templates/inventory/inventoryHeader/inventoryHeader.html
... | ... | @@ -53,19 +53,24 @@ |
53 | 53 | </form> |
54 | 54 | </div> |
55 | 55 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
56 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="transfer()"> | |
56 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="transfer()" | |
57 | + shiro:hasPermission="inventory:inventoryHeader:transfer"> | |
57 | 58 | <i class="fa fa-exchange"></i> 立库移库 |
58 | 59 | </a> |
59 | - <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()"> | |
60 | + <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()" | |
61 | + shiro:hasPermission="inventory:inventoryHeader:seeOut"> | |
60 | 62 | <i class="fa fa-eye"></i> 出库查看 |
61 | 63 | </a> |
62 | - <a class="btn btn-outline btn-info btn-rounded" onclick="emptyIn()" shiro:hasPermission="task:task:emptyIn"> | |
64 | + <a class="btn btn-outline btn-info btn-rounded" onclick="emptyIn()" | |
65 | + shiro:hasPermission="inventory:inventoryHeader:emptyIn"> | |
63 | 66 | <i class="fa fa-level-down"></i> 空托入库 |
64 | 67 | </a> |
65 | - <a class="btn btn-outline btn-default btn-rounded" onclick="emptyCheckOut()" > | |
68 | + <a class="btn btn-outline btn-default btn-rounded" onclick="emptyCheckOut()" | |
69 | + shiro:hasPermission="inventory:inventoryHeader:emptyCheckOut"> | |
66 | 70 | <i class="fa fa fa-eye"></i> 空托出库查看 |
67 | 71 | </a> |
68 | - <a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()" shiro:hasPermission="task:task:emptyOut"> | |
72 | + <a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()" | |
73 | + shiro:hasPermission="inventory:inventoryHeader:emptyOut"> | |
69 | 74 | <i class="fa fa-level-up"></i> 空托出库 |
70 | 75 | </a> |
71 | 76 | </div> |
... | ... |
src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html
... | ... | @@ -81,7 +81,8 @@ |
81 | 81 | </div> |
82 | 82 | <div class="col-sm-12 select-info"> |
83 | 83 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
84 | - <a class="btn btn-outline btn-success btn-rounded" onclick="report()"> | |
84 | + <a class="btn btn-outline btn-success btn-rounded" onclick="report()" | |
85 | + shiro:hasPermission="inventory:inventoryTransaction:report"> | |
85 | 86 | <i class="fa fa-plus"></i> 打印 |
86 | 87 | </a> |
87 | 88 | </div> |
... | ... |
src/main/resources/templates/inventory/inventoryTransaction/report.html
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <head> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
6 | 6 | <head th:include="include :: header"></head> |
7 | - <title>文字</title> | |
7 | + <title>库存交易明细</title> | |
8 | 8 | <!--<link href="css/bootstrap.min.css" rel="stylesheet" />--> |
9 | 9 | <!--<link href="css/font-awesome.min.css" rel="stylesheet" />--> |
10 | 10 | <!--<!–[if IE]>--> |
... | ... | @@ -33,19 +33,19 @@ |
33 | 33 | <caption style="font-size:18px;text-align:center; color:#333; padding-bottom: 3px;">长沙华恒机器人系统有限公司</caption> |
34 | 34 | <tbody> |
35 | 35 | <tr> |
36 | - <td width="20%" scope="col">存货编码</td> | |
36 | + <td width="20%" scope="col">物料编码</td> | |
37 | 37 | <td colspan="2" scope="col" style="text-align:center"> |
38 | 38 | <span th:text="${row.materialCode}" ></span> |
39 | 39 | </td> |
40 | 40 | </tr> |
41 | 41 | <tr> |
42 | - <td scope="col">存货代码</td> | |
42 | + <td scope="col">重量</td> | |
43 | 43 | <td colspan="2" scope="col" style="text-align:center"> |
44 | - <span th:text="${row.userDef1}" ></span> | |
44 | + <span th:text="${row.weight}" ></span> | |
45 | 45 | </td> |
46 | 46 | </tr> |
47 | 47 | <tr style="vertical-align:middle"> |
48 | - <td>存货名称</td> | |
48 | + <td>物料名称</td> | |
49 | 49 | <td style="text-align:center"> |
50 | 50 | <span th:text="${row.materialName}"></span> |
51 | 51 | </td> |
... | ... | @@ -56,22 +56,22 @@ |
56 | 56 | </td> |
57 | 57 | </tr> |
58 | 58 | <tr> |
59 | - <td>规格型号</td> | |
59 | + <td>物料规格</td> | |
60 | 60 | <td style="text-align:center"> |
61 | 61 | <span th:text="${row.materialSpec}"></span> |
62 | 62 | </td> |
63 | 63 | </tr> |
64 | 64 | <tr> |
65 | - <td>数 量</td> | |
65 | + <td>任务数量</td> | |
66 | 66 | <td style="text-align:center; padding: 0"> |
67 | 67 | <!--<input name="" type="text" style="line-height:18px; border:0; text-align:center;" th:text="${receiptDetail.qty}"/>--> |
68 | - <input id="qty" name="qty" th:value="*{row.qty}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/> | |
68 | + <input id="qty" name="qty" th:value="*{row.taskQty}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/> | |
69 | 69 | </td> |
70 | 70 | </tr> |
71 | 71 | <tr> |
72 | - <td scope="col">生产编号</td> | |
72 | + <td scope="col">项目号</td> | |
73 | 73 | <td colspan="2" scope="col" style="text-align:center"> |
74 | - <span th:text="${row.project}" ></span> | |
74 | + <span th:text="${row.projectNo}" ></span> | |
75 | 75 | </td> |
76 | 76 | </tr> |
77 | 77 | </tbody> |
... | ... | @@ -102,12 +102,12 @@ |
102 | 102 | var code16=$(this).children()[1].children[1].innerText; |
103 | 103 | var name=$(this).children()[1].children[2].innerText; |
104 | 104 | var spec=$(this).children()[1].children[3].innerText; |
105 | - var project=$(this).children()[1].children[5].innerText; | |
105 | + var projectNo=$(this).children()[1].children[5].innerText; | |
106 | 106 | company=company.substring(5); |
107 | 107 | code16=code16.substring(5); |
108 | 108 | name=name.substring(5); |
109 | 109 | spec=spec.substring(5); |
110 | - project=project.substring(5); | |
110 | + projectNo=projectNo.substring(5); | |
111 | 111 | var reg=/\t/; |
112 | 112 | name=name.replace(reg,""); |
113 | 113 | var qty=$(this).find('input').val(); |
... | ... |