Commit 3e1906dd185748a1c4818e6618e23bb39c7e2876
1 parent
3802a546
库存汇总页面
Showing
8 changed files
with
859 additions
and
0 deletions
src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java
0 → 100644
1 | +package com.huaheng.pc.inventory.InventoryMaterialSummary.controller; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
7 | +import com.huaheng.common.utils.StringUtils; | ||
8 | +import com.huaheng.common.utils.security.ShiroUtils; | ||
9 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | ||
10 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | ||
11 | +import com.huaheng.framework.web.controller.BaseController; | ||
12 | +import com.huaheng.framework.web.page.PageDomain; | ||
13 | +import com.huaheng.framework.web.page.TableDataInfo; | ||
14 | +import com.huaheng.framework.web.page.TableSupport; | ||
15 | + | ||
16 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary; | ||
17 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.service.InventoryMaterialSummaryService; | ||
18 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
19 | +import org.springframework.stereotype.Controller; | ||
20 | +import org.springframework.ui.ModelMap; | ||
21 | +import org.springframework.web.bind.annotation.GetMapping; | ||
22 | +import org.springframework.web.bind.annotation.PostMapping; | ||
23 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
24 | +import org.springframework.web.bind.annotation.ResponseBody; | ||
25 | + | ||
26 | +import javax.annotation.Resource; | ||
27 | +import java.util.Collections; | ||
28 | +import java.util.List; | ||
29 | + | ||
30 | + | ||
31 | +/** | ||
32 | + *库存物料汇总, | ||
33 | + * 父子页面表 | ||
34 | + * | ||
35 | + * 无表,查询筛选数据后直接展示到页面 | ||
36 | + * | ||
37 | + * | ||
38 | + * */ | ||
39 | +@Controller | ||
40 | +@RequestMapping("/inventory/inventoryMaterialSummary") | ||
41 | +public class InventoryMaterialSummaryController extends BaseController { | ||
42 | + | ||
43 | + | ||
44 | + @Resource | ||
45 | + private InventoryMaterialSummaryService inventoryMaterialSummaryService; | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + private String prefix = "inventory/inventoryMaterialSummary"; | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + /** | ||
57 | + * 页面 | ||
58 | + * */ | ||
59 | + @RequiresPermissions("inventory:inventoryMaterialSummary:view") | ||
60 | + @GetMapping() | ||
61 | + public String inventoryMaterialSummary( ModelMap m) | ||
62 | + { | ||
63 | + m.put("warehouseCode",ShiroUtils.getWarehouseCode()); | ||
64 | + return prefix + "/inventoryMaterialSummary"; | ||
65 | + } | ||
66 | + | ||
67 | + /** | ||
68 | + * 库存汇总列表 | ||
69 | + */ | ||
70 | + @RequiresPermissions("inventory:cycleCountDetail:list") | ||
71 | + @PostMapping("/list") | ||
72 | + @Log(title = "库存-盘点",operating = "查看盘点明细", action = BusinessType.GRANT) | ||
73 | + @ResponseBody | ||
74 | + public TableDataInfo list(InventoryMaterialSummary inventoryMaterialSummary, String createdBegin, String createdEnd) { | ||
75 | + | ||
76 | + LambdaQueryWrapper<InventoryMaterialSummary> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
77 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
78 | + Integer pageNum = pageDomain.getPageNum(); | ||
79 | + Integer pageSize = pageDomain.getPageSize(); | ||
80 | + lambdaQueryWrapper | ||
81 | + //仓库 | ||
82 | + .eq(InventoryMaterialSummary::getWarehouseCode, ShiroUtils.getWarehouseCode()) | ||
83 | + //物料编码 | ||
84 | + .eq(StringUtils.isNotEmpty(inventoryMaterialSummary.getMaterialCode()),InventoryMaterialSummary::getMaterialCode,inventoryMaterialSummary.getMaterialCode()) | ||
85 | + //物料名称 | ||
86 | + .eq(StringUtils.isNotEmpty(inventoryMaterialSummary.getMaterialName()),InventoryMaterialSummary::getMaterialName,inventoryMaterialSummary.getMaterialName()); | ||
87 | + //.orderByAsc(InventoryMaterialSummary::getMaterialCode); | ||
88 | + | ||
89 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { | ||
90 | + //分页查询 | ||
91 | + Page<InventoryMaterialSummary> page = new Page<>(pageNum, pageSize); | ||
92 | + IPage<InventoryMaterialSummary> iPage = inventoryMaterialSummaryService.page(page, lambdaQueryWrapper); | ||
93 | + //筛选库存汇总数据的专用方法 | ||
94 | + List<InventoryMaterialSummary> ipages = inventoryMaterialSummaryService.inventoryMaterialSummarySelect(iPage.getRecords()) ; | ||
95 | + return getMpDataTable(ipages, iPage.getTotal()); | ||
96 | + } else { | ||
97 | + List<InventoryMaterialSummary> list = inventoryMaterialSummaryService.list(lambdaQueryWrapper); | ||
98 | + //筛选库存汇总数据的专用方法 | ||
99 | + List<InventoryMaterialSummary> details = inventoryMaterialSummaryService.inventoryMaterialSummarySelect(list) ; | ||
100 | + if(details == null){ | ||
101 | + details = Collections.emptyList(); | ||
102 | + } | ||
103 | + return getDataTable(details); | ||
104 | + } | ||
105 | + //空List | ||
106 | + //return getDataTable(Collections.emptyList()); | ||
107 | + } | ||
108 | + | ||
109 | + | ||
110 | + /** | ||
111 | + * 库存汇总子单列表 | ||
112 | + */ | ||
113 | + @PostMapping("/cycleCountDetailChild") | ||
114 | + @Log(title = "库存-盘点",operating = "查看盘点明细子单", action = BusinessType.GRANT) | ||
115 | + @ResponseBody | ||
116 | + public TableDataInfo cycleCountDetailChild(InventoryMaterialSummary inventoryMaterialSummaryChild, String createdBegin, String createdEnd) { | ||
117 | + | ||
118 | + LambdaQueryWrapper<InventoryMaterialSummary> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
119 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
120 | + Integer pageNum = pageDomain.getPageNum(); | ||
121 | + Integer pageSize = pageDomain.getPageSize(); | ||
122 | + lambdaQueryWrapper | ||
123 | + //仓库 | ||
124 | + .eq(InventoryMaterialSummary::getWarehouseCode, ShiroUtils.getWarehouseCode()) | ||
125 | + //物料编码 | ||
126 | + .eq(InventoryMaterialSummary::getMaterialCode,inventoryMaterialSummaryChild.getMaterialCode()); | ||
127 | + //.orderByDesc(InventoryMaterialSummary::getId); | ||
128 | + | ||
129 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { | ||
130 | + //分页查询 | ||
131 | + Page<InventoryMaterialSummary> page = new Page<>(pageNum, pageSize); | ||
132 | + IPage<InventoryMaterialSummary> iPage = inventoryMaterialSummaryService.page(page, lambdaQueryWrapper); | ||
133 | + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | ||
134 | + } else { | ||
135 | + List<InventoryMaterialSummary> list = inventoryMaterialSummaryService.list(lambdaQueryWrapper); | ||
136 | + return getDataTable(list); | ||
137 | + } | ||
138 | + | ||
139 | + } | ||
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | ||
144 | + | ||
145 | + | ||
146 | + | ||
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | ||
156 | + | ||
157 | +} |
src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/domain/InventoryMaterialSummary.java
0 → 100644
1 | +package com.huaheng.pc.inventory.InventoryMaterialSummary.domain; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
7 | +import io.swagger.annotations.ApiModel; | ||
8 | +import io.swagger.annotations.ApiModelProperty; | ||
9 | +import lombok.Data; | ||
10 | + | ||
11 | +import java.io.Serializable; | ||
12 | +import java.math.BigDecimal; | ||
13 | +import java.util.Date; | ||
14 | + | ||
15 | +@ApiModel(value="com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryDetail") | ||
16 | +@Data | ||
17 | +@TableName(value = "inventory_detail") | ||
18 | +public class InventoryMaterialSummary implements Serializable { | ||
19 | + | ||
20 | + | ||
21 | + /** | ||
22 | + * ID | ||
23 | + */ | ||
24 | + @TableId(value = "id", type = IdType.AUTO) | ||
25 | + @ApiModelProperty(value="ID") | ||
26 | + private Integer id; | ||
27 | + | ||
28 | + /** | ||
29 | + * 库存头ID | ||
30 | + */ | ||
31 | + @TableField(value = "inventoryHeaderId") | ||
32 | + @ApiModelProperty(value="库存头ID") | ||
33 | + private Integer inventoryHeaderId; | ||
34 | + | ||
35 | + /** | ||
36 | + * 仓库 | ||
37 | + */ | ||
38 | + @TableField(value = "warehouseCode") | ||
39 | + @ApiModelProperty(value="仓库") | ||
40 | + private String warehouseCode; | ||
41 | + | ||
42 | + /** | ||
43 | + * 货主 | ||
44 | + */ | ||
45 | + @TableField(value = "companyCode") | ||
46 | + @ApiModelProperty(value="货主") | ||
47 | + private String companyCode; | ||
48 | + | ||
49 | + /** | ||
50 | + * 货位 | ||
51 | + */ | ||
52 | + @TableField(value = "locationCode") | ||
53 | + @ApiModelProperty(value="货位") | ||
54 | + private String locationCode; | ||
55 | + | ||
56 | + /** | ||
57 | + * 容器 | ||
58 | + */ | ||
59 | + @TableField(value = "containerCode") | ||
60 | + @ApiModelProperty(value="容器") | ||
61 | + private String containerCode; | ||
62 | + | ||
63 | + /** | ||
64 | + * 商品编码 | ||
65 | + */ | ||
66 | + @TableField(value = "materialCode") | ||
67 | + @ApiModelProperty(value="商品编码") | ||
68 | + private String materialCode; | ||
69 | + | ||
70 | + /** | ||
71 | + * 商品名称 | ||
72 | + */ | ||
73 | + @TableField(value = "materialName") | ||
74 | + @ApiModelProperty(value="商品名称") | ||
75 | + private String materialName; | ||
76 | + | ||
77 | + /** | ||
78 | + * 商品规格 | ||
79 | + */ | ||
80 | + @TableField(value = "materialSpec") | ||
81 | + @ApiModelProperty(value="商品规格") | ||
82 | + private String materialSpec; | ||
83 | + | ||
84 | + /** | ||
85 | + * 商品单位 | ||
86 | + */ | ||
87 | + @TableField(value = "materialUnit") | ||
88 | + @ApiModelProperty(value="商品单位") | ||
89 | + private String materialUnit; | ||
90 | + | ||
91 | + /** | ||
92 | + * 在库数量 | ||
93 | + */ | ||
94 | + @TableField(value = "qty") | ||
95 | + @ApiModelProperty(value="在库数量") | ||
96 | + private BigDecimal qty; | ||
97 | + | ||
98 | + /** | ||
99 | + * 任务数量 | ||
100 | + */ | ||
101 | + @TableField(value = "taskQty") | ||
102 | + @ApiModelProperty(value="任务数量") | ||
103 | + private BigDecimal taskQty; | ||
104 | + | ||
105 | + /** | ||
106 | + * 冻结数量 | ||
107 | + */ | ||
108 | + @TableField(value = "lockedQty") | ||
109 | + @ApiModelProperty(value="冻结数量") | ||
110 | + private BigDecimal lockedQty; | ||
111 | + | ||
112 | + /** | ||
113 | + * 库存状态 | ||
114 | + */ | ||
115 | + @TableField(value = "inventorySts") | ||
116 | + @ApiModelProperty(value="库存状态") | ||
117 | + private String inventorySts; | ||
118 | + | ||
119 | + /** | ||
120 | + * 供应商编码 | ||
121 | + */ | ||
122 | + @TableField(value = "supplierCode") | ||
123 | + @ApiModelProperty(value="供应商编码") | ||
124 | + private String supplierCode; | ||
125 | + | ||
126 | + /** | ||
127 | + * 关联上游单号 | ||
128 | + */ | ||
129 | + @TableField(value = "referCode") | ||
130 | + @ApiModelProperty(value="关联上游单号") | ||
131 | + private String referCode; | ||
132 | + | ||
133 | + /** | ||
134 | + * 关联上游单号的行号 | ||
135 | + */ | ||
136 | + @TableField(value = "referDetailId") | ||
137 | + @ApiModelProperty(value="关联上游单号的行号") | ||
138 | + private String referDetailId; | ||
139 | + | ||
140 | + /** | ||
141 | + * 批次 | ||
142 | + */ | ||
143 | + @TableField(value = "batch") | ||
144 | + @ApiModelProperty(value="批次") | ||
145 | + private String batch; | ||
146 | + | ||
147 | + /** | ||
148 | + * 批号 | ||
149 | + */ | ||
150 | + @TableField(value = "lot") | ||
151 | + @ApiModelProperty(value="批号") | ||
152 | + private String lot; | ||
153 | + | ||
154 | + /** | ||
155 | + * 项目号 | ||
156 | + */ | ||
157 | + @TableField(value = "projectNo") | ||
158 | + @ApiModelProperty(value="项目号") | ||
159 | + private String projectNo; | ||
160 | + | ||
161 | + /** | ||
162 | + * 质检 | ||
163 | + */ | ||
164 | + @TableField(value = "qcCheck") | ||
165 | + @ApiModelProperty(value="质检") | ||
166 | + private String qcCheck; | ||
167 | + | ||
168 | + /** | ||
169 | + * 重量 | ||
170 | + */ | ||
171 | + @TableField(value = "weight") | ||
172 | + @ApiModelProperty(value="重量") | ||
173 | + private String weight; | ||
174 | + | ||
175 | + /** | ||
176 | + * 生产日期 | ||
177 | + */ | ||
178 | + @TableField(value = "manufactureDate") | ||
179 | + @ApiModelProperty(value="生产日期") | ||
180 | + private Date manufactureDate; | ||
181 | + | ||
182 | + /** | ||
183 | + * 失效日期 | ||
184 | + */ | ||
185 | + @TableField(value = "expirationDate") | ||
186 | + @ApiModelProperty(value="失效日期") | ||
187 | + private Date expirationDate; | ||
188 | + | ||
189 | + /** | ||
190 | + * 入库日期 | ||
191 | + */ | ||
192 | + @TableField(value = "agingDate") | ||
193 | + @ApiModelProperty(value="入库日期") | ||
194 | + private Date agingDate; | ||
195 | + | ||
196 | + /** | ||
197 | + * 属性号 | ||
198 | + */ | ||
199 | + @TableField(value = "attributeId") | ||
200 | + @ApiModelProperty(value="属性号") | ||
201 | + private String attributeId; | ||
202 | + | ||
203 | + /** | ||
204 | + * 属性1 | ||
205 | + */ | ||
206 | + @TableField(value = "attribute1") | ||
207 | + @ApiModelProperty(value="属性1") | ||
208 | + private String attribute1; | ||
209 | + | ||
210 | + /** | ||
211 | + * 属性2 | ||
212 | + */ | ||
213 | + @TableField(value = "attribute2") | ||
214 | + @ApiModelProperty(value="属性2") | ||
215 | + private String attribute2; | ||
216 | + | ||
217 | + /** | ||
218 | + * 属性3 | ||
219 | + */ | ||
220 | + @TableField(value = "attribute3") | ||
221 | + @ApiModelProperty(value="属性3") | ||
222 | + private String attribute3; | ||
223 | + | ||
224 | + /** | ||
225 | + * 锁 (质检、出库、盘点这三个都可能锁定库存) | ||
226 | + */ | ||
227 | + @TableField(value = "lockCode") | ||
228 | + @ApiModelProperty(value="锁 (质检、出库、盘点这三个都可能锁定库存)") | ||
229 | + private String lockCode; | ||
230 | + | ||
231 | + /** | ||
232 | + * 上次盘点日期 | ||
233 | + */ | ||
234 | + @TableField(value = "lastCycleCountDate") | ||
235 | + @ApiModelProperty(value="上次盘点日期") | ||
236 | + private Date lastCycleCountDate; | ||
237 | + | ||
238 | + /** | ||
239 | + * 创建时间 | ||
240 | + */ | ||
241 | + @TableField(value = "created") | ||
242 | + @ApiModelProperty(value="创建时间") | ||
243 | + private Date created; | ||
244 | + | ||
245 | + /** | ||
246 | + * 创建用户 | ||
247 | + */ | ||
248 | + @TableField(value = "createdBy") | ||
249 | + @ApiModelProperty(value="创建用户") | ||
250 | + private String createdBy; | ||
251 | + | ||
252 | + /** | ||
253 | + * 创建时间 | ||
254 | + */ | ||
255 | + @TableField(value = "lastUpdated") | ||
256 | + @ApiModelProperty(value="创建时间") | ||
257 | + private Date lastUpdated; | ||
258 | + | ||
259 | + /** | ||
260 | + * 更新用户 | ||
261 | + */ | ||
262 | + @TableField(value = "lastUpdatedBy") | ||
263 | + @ApiModelProperty(value="更新用户") | ||
264 | + private String lastUpdatedBy; | ||
265 | + | ||
266 | + /** | ||
267 | + * 自定义字段1 | ||
268 | + */ | ||
269 | + @TableField(value = "userDef1") | ||
270 | + @ApiModelProperty(value="自定义字段1") | ||
271 | + private String userDef1; | ||
272 | + | ||
273 | + /** | ||
274 | + * 自定义字段2 | ||
275 | + */ | ||
276 | + @TableField(value = "userDef2") | ||
277 | + @ApiModelProperty(value="自定义字段2") | ||
278 | + private String userDef2; | ||
279 | + | ||
280 | + /** | ||
281 | + * 自定义字段3 | ||
282 | + */ | ||
283 | + @TableField(value = "userDef3") | ||
284 | + @ApiModelProperty(value="自定义字段3") | ||
285 | + private String userDef3; | ||
286 | + | ||
287 | + /** | ||
288 | + * 处理标记 | ||
289 | + */ | ||
290 | + @TableField(value = "processStamp") | ||
291 | + @ApiModelProperty(value="处理标记") | ||
292 | + private String processStamp; | ||
293 | + | ||
294 | + /** | ||
295 | + * 入库单编码 | ||
296 | + */ | ||
297 | + @TableField(value = "receiptCode") | ||
298 | + @ApiModelProperty(value="入库单编码") | ||
299 | + private String receiptCode; | ||
300 | + | ||
301 | + /** | ||
302 | + * 入库单明细ID | ||
303 | + */ | ||
304 | + @TableField(value = "receiptDetailId") | ||
305 | + @ApiModelProperty(value="入库单明细ID") | ||
306 | + private Integer receiptDetailId; | ||
307 | + | ||
308 | + /** | ||
309 | + * 总数 | ||
310 | + * 非数据库表字段 | ||
311 | + * */ | ||
312 | + @TableField(exist = false) | ||
313 | + private BigDecimal total; | ||
314 | + | ||
315 | + | ||
316 | + private static final long serialVersionUID = 1L; | ||
317 | +} | ||
0 | \ No newline at end of file | 318 | \ No newline at end of file |
src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/mapper/InventoryMaterialSummaryMapper.java
0 → 100644
1 | +package com.huaheng.pc.inventory.InventoryMaterialSummary.mapper; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
4 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary; | ||
5 | + | ||
6 | +public interface InventoryMaterialSummaryMapper extends BaseMapper<InventoryMaterialSummary> { | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | +} |
src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildService.java
0 → 100644
1 | +package com.huaheng.pc.inventory.InventoryMaterialSummary.service; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
4 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary; | ||
5 | + | ||
6 | +public interface InventoryMaterialSummaryChildService extends IService<InventoryMaterialSummary> { | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | +} |
src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildServiceImpl.java
0 → 100644
1 | +package com.huaheng.pc.inventory.InventoryMaterialSummary.service; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
4 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary; | ||
5 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.mapper.InventoryMaterialSummaryMapper; | ||
6 | +import org.springframework.stereotype.Service; | ||
7 | + | ||
8 | + | ||
9 | +@Service | ||
10 | +public class InventoryMaterialSummaryChildServiceImpl extends ServiceImpl<InventoryMaterialSummaryMapper, InventoryMaterialSummary> implements InventoryMaterialSummaryChildService{ | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | +} |
src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryService.java
0 → 100644
1 | +package com.huaheng.pc.inventory.InventoryMaterialSummary.service; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
4 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary; | ||
5 | + | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +public interface InventoryMaterialSummaryService extends IService<InventoryMaterialSummary> { | ||
9 | + | ||
10 | + /** | ||
11 | + * 查询库存汇总数据的专用方法 | ||
12 | + * */ | ||
13 | + List<InventoryMaterialSummary> inventoryMaterialSummarySelect(List<InventoryMaterialSummary> inventoryMaterialSummaryList); | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | +} |
src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryServiceImpl.java
0 → 100644
1 | +package com.huaheng.pc.inventory.InventoryMaterialSummary.service; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
4 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary; | ||
5 | +import com.huaheng.pc.inventory.InventoryMaterialSummary.mapper.InventoryMaterialSummaryMapper; | ||
6 | +import org.springframework.stereotype.Service; | ||
7 | + | ||
8 | +import java.util.List; | ||
9 | + | ||
10 | + | ||
11 | +@Service | ||
12 | +public class InventoryMaterialSummaryServiceImpl extends ServiceImpl<InventoryMaterialSummaryMapper, InventoryMaterialSummary> implements InventoryMaterialSummaryService{ | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + /** | ||
20 | + * 筛选库存汇总数据的专用方法 | ||
21 | + * */ | ||
22 | + @Override | ||
23 | + public List<InventoryMaterialSummary> inventoryMaterialSummarySelect(List<InventoryMaterialSummary> inventoryMaterialSummaryList) { | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + return null; | ||
28 | + } | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | +} |
src/main/resources/templates/inventory/inventoryMaterialSummary/inventoryMaterialSummary.html
0 → 100644
1 | +<!DOCTYPE HTML> | ||
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | ||
3 | +<meta charset="utf-8"> | ||
4 | +<head th:include="include :: header"></head> | ||
5 | +<body class="gray-bg"> | ||
6 | +<div class="container-div"> | ||
7 | +<div class="row"> | ||
8 | + <div class="col-sm-12"> | ||
9 | + <div class="col-sm-12 select-info"> | ||
10 | + <form id="inventoryMaterialSummary-form"> | ||
11 | + <div class="select-list"> | ||
12 | + <ul> | ||
13 | + <li> | ||
14 | + 仓库:<input id="warehouseCode" type="text" name="warehouseCode" th:value="${warehouseCode}" readonly="readonly" /> | ||
15 | + </li> | ||
16 | + <li> | ||
17 | + 物料编码:<input id="materialCode" type="text" name="materialCode" /> | ||
18 | + </li> | ||
19 | + <li> | ||
20 | + 物料名称:<input id="materialName" type="text" name="materialName" /> | ||
21 | + </li> | ||
22 | + <li> | ||
23 | + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | ||
24 | + </li> | ||
25 | + </ul> | ||
26 | + </div> | ||
27 | + </form> | ||
28 | + </div> | ||
29 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | ||
30 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()"> | ||
31 | + <i class="fa fa-trash-o"></i> 删除 | ||
32 | + </a> | ||
33 | + </div> | ||
34 | + <div class="col-sm-12 select-info"> | ||
35 | + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | ||
36 | + </div> | ||
37 | + </div> | ||
38 | +</div> | ||
39 | +</div> | ||
40 | +<div th:include="include :: footer"></div> | ||
41 | +<script th:inline="javascript"> | ||
42 | + var prefix = ctx + "inventory/inventoryMaterialSummary"; | ||
43 | + | ||
44 | + $(function () { | ||
45 | + var options = { | ||
46 | + url: prefix + "/list", | ||
47 | + modalName: "库存汇总", | ||
48 | + sortName: "materialCode", | ||
49 | + sortOrder: "asc", | ||
50 | + pagination: true, //是否分页 | ||
51 | + search: false, | ||
52 | + showSearch: false, | ||
53 | + showRefresh: true, | ||
54 | + refresh:true, | ||
55 | + detailView: true, | ||
56 | + | ||
57 | + queryParams : { | ||
58 | + //传值 | ||
59 | + warehouseCode : $('#warehouseCode').val(), | ||
60 | + | ||
61 | + }, | ||
62 | + onExpandRow : function(index, row, $detail) { | ||
63 | + detailChildTable(index, row, $detail); | ||
64 | + }, | ||
65 | + columns: [ | ||
66 | + { | ||
67 | + radio: true | ||
68 | + }, | ||
69 | + { | ||
70 | + field: 'warehouseCode', | ||
71 | + title: '仓库 ', | ||
72 | + visible: true | ||
73 | + }, | ||
74 | + /*{ | ||
75 | + field: 'companyCode', | ||
76 | + title: '货主编码' | ||
77 | + },*/ | ||
78 | + { | ||
79 | + field: 'total', | ||
80 | + title: '库存总数量' | ||
81 | + }, | ||
82 | + { | ||
83 | + field: 'materialCode', | ||
84 | + title: '物料编码' | ||
85 | + }, | ||
86 | + { | ||
87 | + field: 'materialName', | ||
88 | + title: '物料名称' | ||
89 | + }, | ||
90 | + { | ||
91 | + field: 'materialSpec', | ||
92 | + title: '物料规格' | ||
93 | + }, | ||
94 | + { | ||
95 | + field: 'materialUnit', | ||
96 | + title: '物料单位' | ||
97 | + }, | ||
98 | + /*{ | ||
99 | + field: 'weight', | ||
100 | + title: '总重量' | ||
101 | + },*/ | ||
102 | + { | ||
103 | + title: '操作', | ||
104 | + align: 'center', | ||
105 | + formatter: function (value, row, index) { | ||
106 | + var actions = []; | ||
107 | + if(row.enableStatus === 1 ){ | ||
108 | + //actions.push('<a class="btn btn-primary btn-xs ' + createTaskFalg + '" href="#" onclick="outcheck(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成盘点单</a> '); | ||
109 | + } | ||
110 | + return actions.join(''); | ||
111 | + } | ||
112 | + } | ||
113 | + ] | ||
114 | + }; | ||
115 | + $.table.init(options); | ||
116 | + }); | ||
117 | + | ||
118 | + //子表 | ||
119 | + detailChildTable = function(index, row, $detail) { | ||
120 | + let childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table'); | ||
121 | + $(childTable).bootstrapTable({ | ||
122 | + url: prefix + "/inventoryMaterialSummaryChild", | ||
123 | + method: 'post', | ||
124 | + sortName: "id", | ||
125 | + sortOrder: "desc", | ||
126 | + | ||
127 | + contentType: "application/x-www-form-urlencoded", | ||
128 | + //页面渲染 | ||
129 | + responseHandler: responseHandler, | ||
130 | + queryParams : { | ||
131 | + //传值 | ||
132 | + warehouseCode : $('#warehouseCode').val(), | ||
133 | + materialCode: row.materialCode, | ||
134 | + //materialName: row.materialName, | ||
135 | + }, | ||
136 | + columns: [ | ||
137 | + { | ||
138 | + field: 'id', | ||
139 | + title: '库存ID', | ||
140 | + sortable: true, | ||
141 | + width: 80 | ||
142 | + }, | ||
143 | + { | ||
144 | + field: 'locationCode', | ||
145 | + title: '库位编号', | ||
146 | + visible: true, | ||
147 | + width: 200 | ||
148 | + }, | ||
149 | + { | ||
150 | + field: 'containerCode', | ||
151 | + title: '容器编号', | ||
152 | + visible: true, | ||
153 | + width: 150 | ||
154 | + }, | ||
155 | + { | ||
156 | + field: 'companyCode', | ||
157 | + title: '货主编码', | ||
158 | + visible: true, | ||
159 | + width: 80 | ||
160 | + }, | ||
161 | + { | ||
162 | + field: 'materialCode', | ||
163 | + title: '物料编码', | ||
164 | + width: 200 | ||
165 | + }, | ||
166 | + { | ||
167 | + field: 'materialName', | ||
168 | + title: '物料名称', | ||
169 | + width: 200 | ||
170 | + }, | ||
171 | + { | ||
172 | + field: 'materialSpec', | ||
173 | + title: '物料规格', | ||
174 | + visible: false | ||
175 | + }, | ||
176 | + { | ||
177 | + field: 'qty', | ||
178 | + title: '库存数量' | ||
179 | + }, | ||
180 | + { | ||
181 | + field: 'materialUnit', | ||
182 | + title: '物料单位', | ||
183 | + visible: false, | ||
184 | + | ||
185 | + }, | ||
186 | + { | ||
187 | + field: 'projectNo', | ||
188 | + title: '项目号', | ||
189 | + visible: true, | ||
190 | + sortable: true | ||
191 | + }, | ||
192 | + { | ||
193 | + field: 'batch', | ||
194 | + title: '批次', | ||
195 | + sortable: true, | ||
196 | + visible: true | ||
197 | + }, | ||
198 | + { | ||
199 | + field: 'lot', | ||
200 | + title: '批号', | ||
201 | + sortable: true, | ||
202 | + visible: false | ||
203 | + }, | ||
204 | + { | ||
205 | + field: 'receiptCode', | ||
206 | + title: '入库单编码', | ||
207 | + visible: false | ||
208 | + }, | ||
209 | + /*{ | ||
210 | + title: '操作', | ||
211 | + align: 'center', | ||
212 | + width: 200, | ||
213 | + formatter: function (value, row, index) { | ||
214 | + var actions = []; | ||
215 | + actions.push('<a class="btn btn-success btn-xs ' + confirmFlag + '" href="#" onclick="confirmGapQty(\'' + row.id + '\')"><i class="fa fa-comment"></i>实盘登记</a> '); | ||
216 | + return actions.join(''); | ||
217 | + } | ||
218 | + }*/ | ||
219 | + | ||
220 | + ] | ||
221 | + }); | ||
222 | + }; | ||
223 | + | ||
224 | + /*__________*/ | ||
225 | + | ||
226 | + function open(title, url, width, height){ | ||
227 | + if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { | ||
228 | + width = 'auto'; | ||
229 | + height = 'auto'; | ||
230 | + } | ||
231 | + if (title==null){ | ||
232 | + title = false; | ||
233 | + } | ||
234 | + if (url==null){ | ||
235 | + url="404.html"; | ||
236 | + } | ||
237 | + if ($.common.isEmpty(width)) { | ||
238 | + width = 800; | ||
239 | + // width = ($(window).width() - 100); | ||
240 | + } | ||
241 | + if ($.common.isEmpty(height)) { | ||
242 | + height = ($(window).height() - 50); | ||
243 | + } | ||
244 | + layer.open({ | ||
245 | + type: 2, | ||
246 | + area: [width + 'px', height + 'px'], | ||
247 | + fix: false, | ||
248 | + //不固定 | ||
249 | + maxmin: true, | ||
250 | + shade: 0.3, | ||
251 | + title: title, | ||
252 | + content: url | ||
253 | + // shadeClose: true, //点击遮罩关闭层 | ||
254 | + }) | ||
255 | + } | ||
256 | + | ||
257 | + function responseHandler(res) { | ||
258 | + if (res.code == 200) { | ||
259 | + return { rows: res.data, total: res.total, code: 0}; | ||
260 | + } else { | ||
261 | + $.modal.alertWarning(res.msg); | ||
262 | + return { rows: [], total: 0 }; | ||
263 | + } | ||
264 | + } | ||
265 | + | ||
266 | + | ||
267 | +</script> | ||
268 | +</body> | ||
269 | +</html> | ||
0 | \ No newline at end of file | 270 | \ No newline at end of file |