Commit 0aad01ccf22702abb09e20cee8159a753facbc6d
1 parent
a0005c89
波次流主从表
Showing
2 changed files
with
170 additions
and
0 deletions
src/main/java/com/huaheng/pc/shipment/waveFlowDetail/controller/WaveFlowDetailController.java
0 → 100644
1 | +package com.huaheng.pc.shipment.waveFlowDetail.controller; | |
2 | + | |
3 | + | |
4 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
6 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
7 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
8 | +import com.huaheng.common.utils.StringUtils; | |
9 | +import com.huaheng.common.utils.security.ShiroUtils; | |
10 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | |
11 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | |
12 | +import com.huaheng.framework.web.controller.BaseController; | |
13 | +import com.huaheng.framework.web.page.PageDomain; | |
14 | +import com.huaheng.framework.web.page.TableDataInfo; | |
15 | +import com.huaheng.framework.web.page.TableSupport; | |
16 | +import com.huaheng.pc.shipment.waveFlowDetail.domain.WaveFlowDetail; | |
17 | +import com.huaheng.pc.shipment.waveFlowDetail.service.WaveFlowDetailService; | |
18 | +import io.swagger.annotations.Api; | |
19 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
20 | +import org.springframework.beans.factory.annotation.Autowired; | |
21 | +import org.springframework.stereotype.Controller; | |
22 | +import org.springframework.web.bind.annotation.GetMapping; | |
23 | +import org.springframework.web.bind.annotation.PostMapping; | |
24 | +import org.springframework.web.bind.annotation.RequestMapping; | |
25 | +import org.springframework.web.bind.annotation.ResponseBody; | |
26 | + | |
27 | +import java.util.List; | |
28 | + | |
29 | +/** | |
30 | + * 波次流明细 | |
31 | + * @author ricard | |
32 | + * @date 19.8.26 | |
33 | + * | |
34 | + */ | |
35 | + | |
36 | +@Api(tags={"波次流明细"}) | |
37 | +@Controller | |
38 | +@RequestMapping("/shipment/waveFlowDetail") | |
39 | +public class WaveFlowDetailController extends BaseController { | |
40 | + | |
41 | + private String prefix = "shipment/waveFlowDetail"; | |
42 | + | |
43 | + @Autowired | |
44 | + private WaveFlowDetailService waveFlowDetailService; | |
45 | + | |
46 | + @RequiresPermissions("shipment:waveFlowDetail:view") | |
47 | + @GetMapping() | |
48 | + public String waveFlowDetail() { | |
49 | + return prefix + "/waveFlowDetail"; | |
50 | + } | |
51 | + | |
52 | + /** | |
53 | + * 查询订单分析结果 | |
54 | + */ | |
55 | + @RequiresPermissions("shipment:waveFlowDetail:list") | |
56 | + @Log(title = "出库-波次流明细", operating="查看波次流明细", action = BusinessType.GRANT) | |
57 | + @PostMapping("/list") | |
58 | + @ResponseBody | |
59 | + public TableDataInfo list(WaveFlowDetail waveFlowDetail, String createdBegin, String createdEnd) | |
60 | + { | |
61 | + LambdaQueryWrapper<WaveFlowDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
62 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
63 | + Integer pageNum = pageDomain.getPageNum(); | |
64 | + Integer pageSize = pageDomain.getPageSize(); | |
65 | + | |
66 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),WaveFlowDetail::getCreated, createdBegin) | |
67 | + .le(StringUtils.isNotEmpty(createdEnd), WaveFlowDetail::getCreated, createdEnd) | |
68 | + .eq(WaveFlowDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
69 | + | |
70 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
71 | + /** | |
72 | + * 使用分页查询 | |
73 | + */ | |
74 | + Page<WaveFlowDetail> page = new Page<>(pageNum, pageSize); | |
75 | + IPage<WaveFlowDetail> iPage = waveFlowDetailService.page(page, lambdaQueryWrapper); | |
76 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
77 | + } else { | |
78 | + List<WaveFlowDetail> list = waveFlowDetailService.list(lambdaQueryWrapper); | |
79 | + return getDataTable(list); | |
80 | + } | |
81 | + } | |
82 | + | |
83 | + | |
84 | +} | |
... | ... |
src/main/java/com/huaheng/pc/shipment/waveFlowHeader/controller/WaveMasterController.java
0 → 100644
1 | +package com.huaheng.pc.shipment.waveFlowHeader.controller; | |
2 | + | |
3 | + | |
4 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
6 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
7 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
8 | +import com.huaheng.common.utils.StringUtils; | |
9 | +import com.huaheng.common.utils.security.ShiroUtils; | |
10 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | |
11 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | |
12 | +import com.huaheng.framework.web.controller.BaseController; | |
13 | +import com.huaheng.framework.web.page.PageDomain; | |
14 | +import com.huaheng.framework.web.page.TableDataInfo; | |
15 | +import com.huaheng.framework.web.page.TableSupport; | |
16 | +import com.huaheng.pc.shipment.waveFlowHeader.domain.WaveFlowHeader; | |
17 | +import com.huaheng.pc.shipment.waveFlowHeader.service.WaveFlowHeaderService; | |
18 | +import io.swagger.annotations.Api; | |
19 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
20 | +import org.springframework.beans.factory.annotation.Autowired; | |
21 | +import org.springframework.stereotype.Controller; | |
22 | +import org.springframework.web.bind.annotation.GetMapping; | |
23 | +import org.springframework.web.bind.annotation.PostMapping; | |
24 | +import org.springframework.web.bind.annotation.RequestMapping; | |
25 | +import org.springframework.web.bind.annotation.ResponseBody; | |
26 | + | |
27 | +import java.util.List; | |
28 | + | |
29 | +/** | |
30 | + * 波次流头表 | |
31 | + * @author ricard | |
32 | + * @date 19.8.26 | |
33 | + * | |
34 | + */ | |
35 | + | |
36 | +@Api(tags={"波次流头表"}) | |
37 | +@Controller | |
38 | +@RequestMapping("/shipment/waveFlowHeader") | |
39 | +public class WaveMasterController extends BaseController { | |
40 | + | |
41 | + private String prefix = "shipment/waveFlowHeader"; | |
42 | + | |
43 | + @Autowired | |
44 | + private WaveFlowHeaderService waveFlowHeaderService; | |
45 | + | |
46 | + @RequiresPermissions("shipment:waveFlowHeader:view") | |
47 | + @GetMapping() | |
48 | + public String waveFlowHeader() { | |
49 | + return prefix + "/waveFlowHeader"; | |
50 | + } | |
51 | + | |
52 | + /** | |
53 | + * 查询订单分析结果 | |
54 | + */ | |
55 | + @RequiresPermissions("shipment:waveFlowHeader:list") | |
56 | + @Log(title = "出库-波次流头表", operating="查看波次流头表", action = BusinessType.GRANT) | |
57 | + @PostMapping("/list") | |
58 | + @ResponseBody | |
59 | + public TableDataInfo list(WaveFlowHeader waveFlowHeader, String createdBegin, String createdEnd) | |
60 | + { | |
61 | + LambdaQueryWrapper<WaveFlowHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
62 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
63 | + Integer pageNum = pageDomain.getPageNum(); | |
64 | + Integer pageSize = pageDomain.getPageSize(); | |
65 | + | |
66 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),WaveFlowHeader::getCreated, createdBegin) | |
67 | + .le(StringUtils.isNotEmpty(createdEnd), WaveFlowHeader::getCreated, createdEnd) | |
68 | + .eq(WaveFlowHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
69 | + .eq(StringUtils.isNotEmpty(waveFlowHeader.getCode() | |
70 | + ),WaveFlowHeader::getCode,waveFlowHeader.getCode()); | |
71 | + | |
72 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
73 | + /** | |
74 | + * 使用分页查询 | |
75 | + */ | |
76 | + Page<WaveFlowHeader> page = new Page<>(pageNum, pageSize); | |
77 | + IPage<WaveFlowHeader> iPage = waveFlowHeaderService.page(page, lambdaQueryWrapper); | |
78 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
79 | + } else { | |
80 | + List<WaveFlowHeader> list = waveFlowHeaderService.list(lambdaQueryWrapper); | |
81 | + return getDataTable(list); | |
82 | + } | |
83 | + } | |
84 | + | |
85 | + | |
86 | +} | |
... | ... |