Commit b3d54578792ee8e25ce3e25c20b049c22ad7f148
1 parent
40b9b8ce
订单分析过滤主从表
Showing
5 changed files
with
187 additions
and
56 deletions
src/main/java/com/huaheng/pc/config/FilterConfigDetail/controller/FilterConfigDetailController.java
0 → 100644
1 | +package com.huaheng.pc.config.FilterConfigDetail.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.config.FilterConfigDetail.domain.FilterConfigDetail; | |
17 | +import com.huaheng.pc.config.FilterConfigDetail.service.FilterConfigDetailService; | |
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("/config/filterConfigDetail") | |
39 | +public class FilterConfigDetailController extends BaseController { | |
40 | + | |
41 | + private String prefix = "config/filterConfigDetail"; | |
42 | + | |
43 | + @Autowired | |
44 | + private FilterConfigDetailService filterConfigDetailService; | |
45 | + | |
46 | + | |
47 | + @RequiresPermissions("config:filterConfigDetail:view") | |
48 | + @GetMapping() | |
49 | + public String filterConfigDetail() { | |
50 | + return prefix + "/filterConfigDetail"; | |
51 | + } | |
52 | + | |
53 | + /** | |
54 | + * 查询订单分析结果 | |
55 | + */ | |
56 | + @RequiresPermissions("config:filterConfigDetail:list") | |
57 | + @Log(title = "配置-订单分析过滤子表", operating="查看订单分析过滤子表", action = BusinessType.GRANT) | |
58 | + @PostMapping("/list") | |
59 | + @ResponseBody | |
60 | + public TableDataInfo list(FilterConfigDetail filterConfigDetail, String createdBegin, String createdEnd) | |
61 | + { | |
62 | + LambdaQueryWrapper<FilterConfigDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
63 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
64 | + Integer pageNum = pageDomain.getPageNum(); | |
65 | + Integer pageSize = pageDomain.getPageSize(); | |
66 | + | |
67 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),FilterConfigDetail::getCreated, createdBegin) | |
68 | + .le(StringUtils.isNotEmpty(createdEnd), FilterConfigDetail::getCreated, createdEnd) | |
69 | + .eq(FilterConfigDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
70 | + .eq(StringUtils.isNotEmpty(filterConfigDetail.getModuleType() | |
71 | + ),FilterConfigDetail::getModuleType,filterConfigDetail.getModuleType()) | |
72 | + .eq(StringUtils.isNotEmpty(filterConfigDetail.getRecordType() | |
73 | + ),FilterConfigDetail::getRecordType,filterConfigDetail.getRecordType()) | |
74 | + .eq(StringUtils.isNotEmpty(filterConfigDetail.getFilterCode() | |
75 | + ),FilterConfigDetail::getFilterCode,filterConfigDetail.getFilterCode()) | |
76 | + .like(StringUtils.isNotEmpty(filterConfigDetail.getFilterName() | |
77 | + ),FilterConfigDetail::getFilterName,filterConfigDetail.getFilterName()); | |
78 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
79 | + /** | |
80 | + * 使用分页查询 | |
81 | + */ | |
82 | + Page<FilterConfigDetail> page = new Page<>(pageNum, pageSize); | |
83 | + IPage<FilterConfigDetail> iPage = filterConfigDetailService.page(page, lambdaQueryWrapper); | |
84 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
85 | + } else { | |
86 | + List<FilterConfigDetail> list = filterConfigDetailService.list(lambdaQueryWrapper); | |
87 | + return getDataTable(list); | |
88 | + } | |
89 | + } | |
90 | + | |
91 | + | |
92 | +} | |
... | ... |
src/main/java/com/huaheng/pc/config/FilterConfigDetail/domain/FilterConfigDetail.java
... | ... | @@ -155,33 +155,6 @@ public class FilterConfigDetail implements Serializable { |
155 | 155 | @ApiModelProperty(value="自定义字段4") |
156 | 156 | private String userDef4; |
157 | 157 | |
158 | - /** | |
159 | - * 自定义字段5 | |
160 | - */ | |
161 | - @TableField(value = "userDef5") | |
162 | - @ApiModelProperty(value="自定义字段5") | |
163 | - private String userDef5; | |
164 | - | |
165 | - /** | |
166 | - * 自定义字段6 | |
167 | - */ | |
168 | - @TableField(value = "userDef6") | |
169 | - @ApiModelProperty(value="自定义字段6") | |
170 | - private String userDef6; | |
171 | - | |
172 | - /** | |
173 | - * 自定义字段7 | |
174 | - */ | |
175 | - @TableField(value = "userDef7") | |
176 | - @ApiModelProperty(value="自定义字段7") | |
177 | - private String userDef7; | |
178 | - | |
179 | - /** | |
180 | - * 自定义字段8 | |
181 | - */ | |
182 | - @TableField(value = "userDef8") | |
183 | - @ApiModelProperty(value="自定义字段8") | |
184 | - private String userDef8; | |
185 | 158 | |
186 | 159 | /** |
187 | 160 | * 处理标记 |
... | ... |
src/main/java/com/huaheng/pc/config/FilterConfigHeader/controller/FilterConfigHeaderController.java
0 → 100644
1 | +package com.huaheng.pc.config.FilterConfigHeader.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.config.FilterConfigHeader.domain.FilterConfigHeader; | |
17 | +import com.huaheng.pc.config.FilterConfigHeader.service.FilterConfigHeaderService; | |
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("/config/filterConfigHeader") | |
39 | +public class FilterConfigHeaderController extends BaseController { | |
40 | + | |
41 | + private String prefix = "config/filterConfigHeader"; | |
42 | + | |
43 | + @Autowired | |
44 | + private FilterConfigHeaderService filterConfigHeaderService; | |
45 | + | |
46 | + @RequiresPermissions("config:filterConfigHeader:view") | |
47 | + @GetMapping() | |
48 | + public String filterConfigHeader() { | |
49 | + return prefix + "/filterConfigHeader"; | |
50 | + } | |
51 | + | |
52 | + /** | |
53 | + * 查询订单分析结果 | |
54 | + */ | |
55 | + @RequiresPermissions("config:filterConfigHeader:list") | |
56 | + @Log(title = "配置-订单分析过滤主表", operating="查看订单分析过滤主表", action = BusinessType.GRANT) | |
57 | + @PostMapping("/list") | |
58 | + @ResponseBody | |
59 | + public TableDataInfo list(FilterConfigHeader filterConfigHeader, String createdBegin, String createdEnd) | |
60 | + { | |
61 | + LambdaQueryWrapper<FilterConfigHeader> 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),FilterConfigHeader::getCreated, createdBegin) | |
67 | + .le(StringUtils.isNotEmpty(createdEnd), FilterConfigHeader::getCreated, createdEnd) | |
68 | + .eq(FilterConfigHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
69 | + .eq(StringUtils.isNotEmpty(filterConfigHeader.getModuleType() | |
70 | + ),FilterConfigHeader::getModuleType,filterConfigHeader.getModuleType()) | |
71 | + .eq(StringUtils.isNotEmpty(filterConfigHeader.getRecordType() | |
72 | + ),FilterConfigHeader::getRecordType,filterConfigHeader.getRecordType()) | |
73 | + .eq(StringUtils.isNotEmpty(filterConfigHeader.getFilterCode() | |
74 | + ),FilterConfigHeader::getFilterCode,filterConfigHeader.getFilterCode()) | |
75 | + .like(StringUtils.isNotEmpty(filterConfigHeader.getFilterName() | |
76 | + ),FilterConfigHeader::getFilterName,filterConfigHeader.getFilterName()); | |
77 | + | |
78 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
79 | + /** | |
80 | + * 使用分页查询 | |
81 | + */ | |
82 | + Page<FilterConfigHeader> page = new Page<>(pageNum, pageSize); | |
83 | + IPage<FilterConfigHeader> iPage = filterConfigHeaderService.page(page, lambdaQueryWrapper); | |
84 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
85 | + } else { | |
86 | + List<FilterConfigHeader> list = filterConfigHeaderService.list(lambdaQueryWrapper); | |
87 | + return getDataTable(list); | |
88 | + } | |
89 | + } | |
90 | + | |
91 | + | |
92 | +} | |
... | ... |
src/main/java/com/huaheng/pc/config/FilterConfigHeader/domain/FilterConfigHeader.java
... | ... | @@ -127,33 +127,6 @@ public class FilterConfigHeader implements Serializable { |
127 | 127 | @ApiModelProperty(value="自定义字段4") |
128 | 128 | private String userDef4; |
129 | 129 | |
130 | - /** | |
131 | - * 自定义字段5 | |
132 | - */ | |
133 | - @TableField(value = "userDef5") | |
134 | - @ApiModelProperty(value="自定义字段5") | |
135 | - private String userDef5; | |
136 | - | |
137 | - /** | |
138 | - * 自定义字段6 | |
139 | - */ | |
140 | - @TableField(value = "userDef6") | |
141 | - @ApiModelProperty(value="自定义字段6") | |
142 | - private String userDef6; | |
143 | - | |
144 | - /** | |
145 | - * 自定义字段7 | |
146 | - */ | |
147 | - @TableField(value = "userDef7") | |
148 | - @ApiModelProperty(value="自定义字段7") | |
149 | - private String userDef7; | |
150 | - | |
151 | - /** | |
152 | - * 自定义字段8 | |
153 | - */ | |
154 | - @TableField(value = "userDef8") | |
155 | - @ApiModelProperty(value="自定义字段8") | |
156 | - private String userDef8; | |
157 | 130 | |
158 | 131 | /** |
159 | 132 | * 处理标记 |
... | ... |
src/main/java/com/huaheng/pc/config/shipmentAnalyzeTemplate/controller/ShipmentAnalyzeTemplateController.java
... | ... | @@ -47,14 +47,14 @@ public class ShipmentAnalyzeTemplateController extends BaseController { |
47 | 47 | |
48 | 48 | @RequiresPermissions("config:shipmentAnalyzeTemplate:view") |
49 | 49 | @GetMapping() |
50 | - public String location() { | |
50 | + public String shipmentAnalyzeTemplate() { | |
51 | 51 | return prefix + "/shipmentAnalyzeTemplate"; |
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
55 | 55 | * 查询订单分析结果 |
56 | 56 | */ |
57 | - @RequiresPermissions("shipment:bill:list") | |
57 | + @RequiresPermissions("config:shipmentAnalyzeTemplate:list") | |
58 | 58 | @Log(title = "配置-订单分析结果", operating="查看订单分析结果", action = BusinessType.GRANT) |
59 | 59 | @PostMapping("/list") |
60 | 60 | @ResponseBody |
... | ... | @@ -84,4 +84,5 @@ public class ShipmentAnalyzeTemplateController extends BaseController { |
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | + | |
87 | 88 | } |
... | ... |