Commit b43d7ebb155a82304760ff2abe7cc1b27d46980c
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # .idea/workspace.xml
Showing
30 changed files
with
1020 additions
and
251 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/shipment/FilterConfigDetail/domain/FilterConfigDetail.java renamed to src/main/java/com/huaheng/pc/config/FilterConfigDetail/domain/FilterConfigDetail.java
1 | -package com.huaheng.pc.shipment.FilterConfigDetail.domain; | |
1 | +package com.huaheng.pc.config.FilterConfigDetail.domain; | |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.annotation.IdType; |
4 | 4 | import com.baomidou.mybatisplus.annotation.TableField; |
... | ... | @@ -6,9 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableId; |
6 | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
7 | 7 | import io.swagger.annotations.ApiModel; |
8 | 8 | import io.swagger.annotations.ApiModelProperty; |
9 | +import lombok.Data; | |
10 | + | |
9 | 11 | import java.io.Serializable; |
10 | 12 | import java.util.Date; |
11 | -import lombok.Data; | |
12 | 13 | |
13 | 14 | @ApiModel(value="com.huaheng.pc.shipment.FilterConfigDetail.domain.FilterConfigDetail") |
14 | 15 | @Data |
... | ... | @@ -154,33 +155,6 @@ public class FilterConfigDetail implements Serializable { |
154 | 155 | @ApiModelProperty(value="自定义字段4") |
155 | 156 | private String userDef4; |
156 | 157 | |
157 | - /** | |
158 | - * 自定义字段5 | |
159 | - */ | |
160 | - @TableField(value = "userDef5") | |
161 | - @ApiModelProperty(value="自定义字段5") | |
162 | - private String userDef5; | |
163 | - | |
164 | - /** | |
165 | - * 自定义字段6 | |
166 | - */ | |
167 | - @TableField(value = "userDef6") | |
168 | - @ApiModelProperty(value="自定义字段6") | |
169 | - private String userDef6; | |
170 | - | |
171 | - /** | |
172 | - * 自定义字段7 | |
173 | - */ | |
174 | - @TableField(value = "userDef7") | |
175 | - @ApiModelProperty(value="自定义字段7") | |
176 | - private String userDef7; | |
177 | - | |
178 | - /** | |
179 | - * 自定义字段8 | |
180 | - */ | |
181 | - @TableField(value = "userDef8") | |
182 | - @ApiModelProperty(value="自定义字段8") | |
183 | - private String userDef8; | |
184 | 158 | |
185 | 159 | /** |
186 | 160 | * 处理标记 |
... | ... |
src/main/java/com/huaheng/pc/shipment/FilterConfigDetail/mapper/FilterConfigDetailMapper.java renamed to src/main/java/com/huaheng/pc/config/FilterConfigDetail/mapper/FilterConfigDetailMapper.java
1 | -package com.huaheng.pc.shipment.FilterConfigDetail.mapper; | |
1 | +package com.huaheng.pc.config.FilterConfigDetail.mapper; | |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | -import com.huaheng.pc.shipment.FilterConfigDetail.domain.FilterConfigDetail; | |
4 | +import com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail; | |
5 | 5 | |
6 | 6 | public interface FilterConfigDetailMapper extends BaseMapper<FilterConfigDetail> { |
7 | 7 | } |
8 | 8 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/shipment/FilterConfigDetail/service/FilterConfigDetailService.java renamed to src/main/java/com/huaheng/pc/config/FilterConfigDetail/service/FilterConfigDetailService.java
1 | -package com.huaheng.pc.shipment.FilterConfigDetail.service; | |
1 | +package com.huaheng.pc.config.FilterConfigDetail.service; | |
2 | 2 | |
3 | -import org.springframework.stereotype.Service; | |
4 | -import javax.annotation.Resource; | |
5 | -import java.util.List; | |
6 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | -import com.huaheng.pc.shipment.FilterConfigDetail.domain.FilterConfigDetail; | |
8 | -import com.huaheng.pc.shipment.FilterConfigDetail.mapper.FilterConfigDetailMapper; | |
4 | +import com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail; | |
5 | +import com.huaheng.pc.config.FilterConfigDetail.mapper.FilterConfigDetailMapper; | |
6 | +import org.springframework.stereotype.Service; | |
7 | + | |
9 | 8 | @Service |
10 | 9 | public class FilterConfigDetailService extends ServiceImpl<FilterConfigDetailMapper, FilterConfigDetail> { |
11 | 10 | |
... | ... |
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/shipment/FilterConfigHeader/domain/FilterConfigHeader.java renamed to src/main/java/com/huaheng/pc/config/FilterConfigHeader/domain/FilterConfigHeader.java
1 | -package com.huaheng.pc.shipment.FilterConfigHeader.domain; | |
1 | +package com.huaheng.pc.config.FilterConfigHeader.domain; | |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.annotation.IdType; |
4 | 4 | import com.baomidou.mybatisplus.annotation.TableField; |
... | ... | @@ -6,9 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableId; |
6 | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
7 | 7 | import io.swagger.annotations.ApiModel; |
8 | 8 | import io.swagger.annotations.ApiModelProperty; |
9 | +import lombok.Data; | |
10 | + | |
9 | 11 | import java.io.Serializable; |
10 | 12 | import java.util.Date; |
11 | -import lombok.Data; | |
12 | 13 | |
13 | 14 | @ApiModel(value="com.huaheng.pc.shipment.FilterConfigHeader.domain.FilterConfigHeader") |
14 | 15 | @Data |
... | ... | @@ -126,33 +127,6 @@ public class FilterConfigHeader implements Serializable { |
126 | 127 | @ApiModelProperty(value="自定义字段4") |
127 | 128 | private String userDef4; |
128 | 129 | |
129 | - /** | |
130 | - * 自定义字段5 | |
131 | - */ | |
132 | - @TableField(value = "userDef5") | |
133 | - @ApiModelProperty(value="自定义字段5") | |
134 | - private String userDef5; | |
135 | - | |
136 | - /** | |
137 | - * 自定义字段6 | |
138 | - */ | |
139 | - @TableField(value = "userDef6") | |
140 | - @ApiModelProperty(value="自定义字段6") | |
141 | - private String userDef6; | |
142 | - | |
143 | - /** | |
144 | - * 自定义字段7 | |
145 | - */ | |
146 | - @TableField(value = "userDef7") | |
147 | - @ApiModelProperty(value="自定义字段7") | |
148 | - private String userDef7; | |
149 | - | |
150 | - /** | |
151 | - * 自定义字段8 | |
152 | - */ | |
153 | - @TableField(value = "userDef8") | |
154 | - @ApiModelProperty(value="自定义字段8") | |
155 | - private String userDef8; | |
156 | 130 | |
157 | 131 | /** |
158 | 132 | * 处理标记 |
... | ... |
src/main/java/com/huaheng/pc/shipment/FilterConfigHeader/mapper/FilterConfigHeaderMapper.java renamed to src/main/java/com/huaheng/pc/config/FilterConfigHeader/mapper/FilterConfigHeaderMapper.java
1 | -package com.huaheng.pc.shipment.FilterConfigHeader.mapper; | |
1 | +package com.huaheng.pc.config.FilterConfigHeader.mapper; | |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | -import com.huaheng.pc.shipment.FilterConfigHeader.domain.FilterConfigHeader; | |
4 | +import com.huaheng.pc.config.FilterConfigHeader.domain.FilterConfigHeader; | |
5 | 5 | |
6 | 6 | public interface FilterConfigHeaderMapper extends BaseMapper<FilterConfigHeader> { |
7 | 7 | } |
8 | 8 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/shipment/FilterConfigHeader/service/FilterConfigHeaderService.java renamed to src/main/java/com/huaheng/pc/config/FilterConfigHeader/service/FilterConfigHeaderService.java
1 | -package com.huaheng.pc.shipment.FilterConfigHeader.service; | |
1 | +package com.huaheng.pc.config.FilterConfigHeader.service; | |
2 | 2 | |
3 | -import org.springframework.stereotype.Service; | |
4 | -import javax.annotation.Resource; | |
5 | -import java.util.List; | |
6 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | -import com.huaheng.pc.shipment.FilterConfigHeader.mapper.FilterConfigHeaderMapper; | |
8 | -import com.huaheng.pc.shipment.FilterConfigHeader.domain.FilterConfigHeader; | |
4 | +import com.huaheng.pc.config.FilterConfigHeader.domain.FilterConfigHeader; | |
5 | +import com.huaheng.pc.config.FilterConfigHeader.mapper.FilterConfigHeaderMapper; | |
6 | +import org.springframework.stereotype.Service; | |
7 | + | |
9 | 8 | @Service |
10 | 9 | public class FilterConfigHeaderService extends ServiceImpl<FilterConfigHeaderMapper, FilterConfigHeader> { |
11 | 10 | |
... | ... |
src/main/java/com/huaheng/pc/config/shipmentAnalyzeTemplate/controller/ShipmentAnalyzeTemplateController.java
0 → 100644
1 | +package com.huaheng.pc.config.shipmentAnalyzeTemplate.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.shipmentAnalyzeTemplate.domain.ShipmentAnalyzeTemplate; | |
17 | +import com.huaheng.pc.config.shipmentAnalyzeTemplate.service.ShipmentAnalyzeTemplateService; | |
18 | +import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; | |
19 | +import io.swagger.annotations.Api; | |
20 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
21 | +import org.springframework.beans.factory.annotation.Autowired; | |
22 | +import org.springframework.stereotype.Controller; | |
23 | +import org.springframework.web.bind.annotation.GetMapping; | |
24 | +import org.springframework.web.bind.annotation.PostMapping; | |
25 | +import org.springframework.web.bind.annotation.RequestMapping; | |
26 | +import org.springframework.web.bind.annotation.ResponseBody; | |
27 | + | |
28 | +import java.util.List; | |
29 | + | |
30 | +/** | |
31 | + * 订单分析结果 | |
32 | + * @author ricard | |
33 | + * @date 19.8.26 | |
34 | + * | |
35 | + */ | |
36 | + | |
37 | +@Api(tags={"订单分析结果"}) | |
38 | +@Controller | |
39 | +@RequestMapping("/config/shipmentAnalyzeTemplate") | |
40 | +public class ShipmentAnalyzeTemplateController extends BaseController { | |
41 | + | |
42 | + private String prefix = "config/shipmentAnalyzeTemplate"; | |
43 | + | |
44 | + @Autowired | |
45 | + private ShipmentAnalyzeTemplateService shipmentAnalyzeTemplateService; | |
46 | + | |
47 | + | |
48 | + @RequiresPermissions("config:shipmentAnalyzeTemplate:view") | |
49 | + @GetMapping() | |
50 | + public String shipmentAnalyzeTemplate() { | |
51 | + return prefix + "/shipmentAnalyzeTemplate"; | |
52 | + } | |
53 | + | |
54 | + /** | |
55 | + * 查询订单分析结果 | |
56 | + */ | |
57 | + @RequiresPermissions("config:shipmentAnalyzeTemplate:list") | |
58 | + @Log(title = "配置-订单分析结果", operating="查看订单分析结果", action = BusinessType.GRANT) | |
59 | + @PostMapping("/list") | |
60 | + @ResponseBody | |
61 | + public TableDataInfo list(ShipmentAnalyzeTemplate shipmentAnalyzeTemplate, String createdBegin, String createdEnd) | |
62 | + { | |
63 | + LambdaQueryWrapper<ShipmentAnalyzeTemplate> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
64 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
65 | + Integer pageNum = pageDomain.getPageNum(); | |
66 | + Integer pageSize = pageDomain.getPageSize(); | |
67 | + | |
68 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),ShipmentAnalyzeTemplate::getCreated, createdBegin) | |
69 | + .le(StringUtils.isNotEmpty(createdEnd), ShipmentAnalyzeTemplate::getCreated, createdEnd) | |
70 | + .eq(ShipmentAnalyzeTemplate::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
71 | + .eq(StringUtils.isNotEmpty(shipmentAnalyzeTemplate.getCriteriaCode() | |
72 | + ),ShipmentAnalyzeTemplate::getCriteriaCode,shipmentAnalyzeTemplate.getCriteriaCode()); | |
73 | + | |
74 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
75 | + /** | |
76 | + * 使用分页查询 | |
77 | + */ | |
78 | + Page<ShipmentAnalyzeTemplate> page = new Page<>(pageNum, pageSize); | |
79 | + IPage<ShipmentAnalyzeTemplate> iPage = shipmentAnalyzeTemplateService.page(page, lambdaQueryWrapper); | |
80 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
81 | + } else { | |
82 | + List<ShipmentAnalyzeTemplate> list = shipmentAnalyzeTemplateService.list(lambdaQueryWrapper); | |
83 | + return getDataTable(list); | |
84 | + } | |
85 | + } | |
86 | + | |
87 | + | |
88 | +} | |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentAnalyzeTemplate/domain/ShipmentAnalyzeTemplate.java renamed to src/main/java/com/huaheng/pc/config/shipmentAnalyzeTemplate/domain/ShipmentAnalyzeTemplate.java
1 | -package com.huaheng.pc.shipment.shipmentAnalyzeTemplate.domain; | |
1 | +package com.huaheng.pc.config.shipmentAnalyzeTemplate.domain; | |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.annotation.IdType; |
4 | 4 | import com.baomidou.mybatisplus.annotation.TableField; |
... | ... | @@ -6,9 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableId; |
6 | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
7 | 7 | import io.swagger.annotations.ApiModel; |
8 | 8 | import io.swagger.annotations.ApiModelProperty; |
9 | +import lombok.Data; | |
10 | + | |
9 | 11 | import java.io.Serializable; |
10 | 12 | import java.util.Date; |
11 | -import lombok.Data; | |
12 | 13 | |
13 | 14 | @ApiModel(value="com.huaheng.pc.shipment.shipmentAnalyzeTemplate.domain.ShipmentAnalyzeTemplate") |
14 | 15 | @Data |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentAnalyzeTemplate/mapper/ShipmentAnalyzeTemplateMapper.java renamed to src/main/java/com/huaheng/pc/config/shipmentAnalyzeTemplate/mapper/ShipmentAnalyzeTemplateMapper.java
1 | -package com.huaheng.pc.shipment.shipmentAnalyzeTemplate.mapper; | |
1 | +package com.huaheng.pc.config.shipmentAnalyzeTemplate.mapper; | |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | -import com.huaheng.pc.shipment.shipmentAnalyzeTemplate.domain.ShipmentAnalyzeTemplate; | |
4 | +import com.huaheng.pc.config.shipmentAnalyzeTemplate.domain.ShipmentAnalyzeTemplate; | |
5 | 5 | |
6 | 6 | public interface ShipmentAnalyzeTemplateMapper extends BaseMapper<ShipmentAnalyzeTemplate> { |
7 | 7 | } |
8 | 8 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentAnalyzeTemplate/service/ShipmentAnalyzeTemplateService.java renamed to src/main/java/com/huaheng/pc/config/shipmentAnalyzeTemplate/service/ShipmentAnalyzeTemplateService.java
1 | -package com.huaheng.pc.shipment.shipmentAnalyzeTemplate.service; | |
1 | +package com.huaheng.pc.config.shipmentAnalyzeTemplate.service; | |
2 | 2 | |
3 | -import org.springframework.stereotype.Service; | |
4 | -import javax.annotation.Resource; | |
5 | -import java.util.List; | |
6 | 3 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | -import com.huaheng.pc.shipment.shipmentAnalyzeTemplate.domain.ShipmentAnalyzeTemplate; | |
8 | -import com.huaheng.pc.shipment.shipmentAnalyzeTemplate.mapper.ShipmentAnalyzeTemplateMapper; | |
4 | +import com.huaheng.pc.config.shipmentAnalyzeTemplate.domain.ShipmentAnalyzeTemplate; | |
5 | +import com.huaheng.pc.config.shipmentAnalyzeTemplate.mapper.ShipmentAnalyzeTemplateMapper; | |
6 | +import org.springframework.stereotype.Service; | |
7 | + | |
9 | 8 | @Service |
10 | 9 | public class ShipmentAnalyzeTemplateService extends ServiceImpl<ShipmentAnalyzeTemplateMapper, ShipmentAnalyzeTemplate> { |
11 | 10 | |
... | ... |
src/main/java/com/huaheng/pc/shipment/wave/controller/WaveController.java
0 → 100644
1 | +package com.huaheng.pc.shipment.wave.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.wave.domain.Wave; | |
17 | +import com.huaheng.pc.shipment.wave.service.WaveService; | |
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/wave") | |
39 | +public class WaveController extends BaseController { | |
40 | + | |
41 | + private String prefix = "shipment/wave"; | |
42 | + | |
43 | + @Autowired | |
44 | + private WaveService waveService; | |
45 | + | |
46 | + @RequiresPermissions("shipment:wave:view") | |
47 | + @GetMapping() | |
48 | + public String wave() { | |
49 | + return prefix + "/wave"; | |
50 | + } | |
51 | + | |
52 | + /** | |
53 | + * 查询订单分析结果 | |
54 | + */ | |
55 | + @RequiresPermissions("shipment:wave:list") | |
56 | + @Log(title = "出库-波次", operating="查看波次", action = BusinessType.GRANT) | |
57 | + @PostMapping("/list") | |
58 | + @ResponseBody | |
59 | + public TableDataInfo list(Wave wave, String createdBegin, String createdEnd) | |
60 | + { | |
61 | + LambdaQueryWrapper<Wave> 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),Wave::getCreated, createdBegin) | |
67 | + .le(StringUtils.isNotEmpty(createdEnd), Wave::getCreated, createdEnd) | |
68 | + .eq(Wave::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
69 | + .eq(StringUtils.isNotEmpty(wave.getWaveMode() | |
70 | + ),Wave::getWaveMode,wave.getWaveMode()) | |
71 | + .eq(wave.getStatus()!=null,Wave::getStatus,wave.getStatus()) | |
72 | + .like(StringUtils.isNotEmpty(wave.getWaveName() | |
73 | + ),Wave::getWaveName,wave.getWaveName()); | |
74 | + | |
75 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
76 | + /** | |
77 | + * 使用分页查询 | |
78 | + */ | |
79 | + Page<Wave> page = new Page<>(pageNum, pageSize); | |
80 | + IPage<Wave> iPage = waveService.page(page, lambdaQueryWrapper); | |
81 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
82 | + } else { | |
83 | + List<Wave> list = waveService.list(lambdaQueryWrapper); | |
84 | + return getDataTable(list); | |
85 | + } | |
86 | + } | |
87 | + | |
88 | + | |
89 | +} | |
... | ... |
src/main/java/com/huaheng/pc/shipment/wave/domain/Wave.java
... | ... | @@ -45,9 +45,9 @@ public class Wave implements Serializable { |
45 | 45 | /** |
46 | 46 | * 状态 |
47 | 47 | */ |
48 | - @TableField(value = "enable") | |
48 | + @TableField(value = "status") | |
49 | 49 | @ApiModelProperty(value="状态") |
50 | - private Integer enable; | |
50 | + private Integer status; | |
51 | 51 | |
52 | 52 | /** |
53 | 53 | * 当前波次步骤 |
... | ... | @@ -217,33 +217,6 @@ public class Wave implements Serializable { |
217 | 217 | @ApiModelProperty(value="自定义字段4") |
218 | 218 | private String userDef4; |
219 | 219 | |
220 | - /** | |
221 | - * 自定义字段5 | |
222 | - */ | |
223 | - @TableField(value = "userDef5") | |
224 | - @ApiModelProperty(value="自定义字段5") | |
225 | - private String userDef5; | |
226 | - | |
227 | - /** | |
228 | - * 自定义字段6 | |
229 | - */ | |
230 | - @TableField(value = "userDef6") | |
231 | - @ApiModelProperty(value="自定义字段6") | |
232 | - private String userDef6; | |
233 | - | |
234 | - /** | |
235 | - * 自定义字段7 | |
236 | - */ | |
237 | - @TableField(value = "userDef7") | |
238 | - @ApiModelProperty(value="自定义字段7") | |
239 | - private String userDef7; | |
240 | - | |
241 | - /** | |
242 | - * 自定义字段8 | |
243 | - */ | |
244 | - @TableField(value = "userDef8") | |
245 | - @ApiModelProperty(value="自定义字段8") | |
246 | - private String userDef8; | |
247 | 220 | |
248 | 221 | /** |
249 | 222 | * 处理标记 |
... | ... |
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/waveFlowDetail/domain/WaveFlowDetail.java
... | ... | @@ -151,33 +151,6 @@ public class WaveFlowDetail implements Serializable { |
151 | 151 | @ApiModelProperty(value="自定义字段4") |
152 | 152 | private String userDef4; |
153 | 153 | |
154 | - /** | |
155 | - * 自定义字段5 | |
156 | - */ | |
157 | - @TableField(value = "userDef5") | |
158 | - @ApiModelProperty(value="自定义字段5") | |
159 | - private String userDef5; | |
160 | - | |
161 | - /** | |
162 | - * 自定义字段6 | |
163 | - */ | |
164 | - @TableField(value = "userDef6") | |
165 | - @ApiModelProperty(value="自定义字段6") | |
166 | - private String userDef6; | |
167 | - | |
168 | - /** | |
169 | - * 自定义字段7 | |
170 | - */ | |
171 | - @TableField(value = "userDef7") | |
172 | - @ApiModelProperty(value="自定义字段7") | |
173 | - private String userDef7; | |
174 | - | |
175 | - /** | |
176 | - * 自定义字段8 | |
177 | - */ | |
178 | - @TableField(value = "userDef8") | |
179 | - @ApiModelProperty(value="自定义字段8") | |
180 | - private String userDef8; | |
181 | 154 | |
182 | 155 | /** |
183 | 156 | * 处理标记 |
... | ... |
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 | +} | |
... | ... |
src/main/java/com/huaheng/pc/shipment/waveFlowHeader/domain/WaveFlowHeader.java
... | ... | @@ -98,33 +98,6 @@ public class WaveFlowHeader implements Serializable { |
98 | 98 | @ApiModelProperty(value="自定义字段4") |
99 | 99 | private String userDef4; |
100 | 100 | |
101 | - /** | |
102 | - * 自定义字段5 | |
103 | - */ | |
104 | - @TableField(value = "userDef5") | |
105 | - @ApiModelProperty(value="自定义字段5") | |
106 | - private String userDef5; | |
107 | - | |
108 | - /** | |
109 | - * 自定义字段6 | |
110 | - */ | |
111 | - @TableField(value = "userDef6") | |
112 | - @ApiModelProperty(value="自定义字段6") | |
113 | - private String userDef6; | |
114 | - | |
115 | - /** | |
116 | - * 自定义字段7 | |
117 | - */ | |
118 | - @TableField(value = "userDef7") | |
119 | - @ApiModelProperty(value="自定义字段7") | |
120 | - private String userDef7; | |
121 | - | |
122 | - /** | |
123 | - * 自定义字段8 | |
124 | - */ | |
125 | - @TableField(value = "userDef8") | |
126 | - @ApiModelProperty(value="自定义字段8") | |
127 | - private String userDef8; | |
128 | 101 | |
129 | 102 | /** |
130 | 103 | * 处理标记 |
... | ... |
src/main/java/com/huaheng/pc/shipment/waveMaster/controller/WaveMasterController.java
0 → 100644
1 | +package com.huaheng.pc.shipment.waveMaster.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.wave.domain.Wave; | |
17 | +import com.huaheng.pc.shipment.waveMaster.domain.WaveMaster; | |
18 | +import com.huaheng.pc.shipment.waveMaster.service.WaveMasterService; | |
19 | +import io.swagger.annotations.Api; | |
20 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
21 | +import org.springframework.beans.factory.annotation.Autowired; | |
22 | +import org.springframework.stereotype.Controller; | |
23 | +import org.springframework.web.bind.annotation.GetMapping; | |
24 | +import org.springframework.web.bind.annotation.PostMapping; | |
25 | +import org.springframework.web.bind.annotation.RequestMapping; | |
26 | +import org.springframework.web.bind.annotation.ResponseBody; | |
27 | + | |
28 | +import java.util.List; | |
29 | + | |
30 | +/** | |
31 | + * 波次主表 | |
32 | + * @author ricard | |
33 | + * @date 19.8.26 | |
34 | + * | |
35 | + */ | |
36 | + | |
37 | +@Api(tags={"波次主表"}) | |
38 | +@Controller | |
39 | +@RequestMapping("/shipment/waveMaster") | |
40 | +public class WaveMasterController extends BaseController { | |
41 | + | |
42 | + private String prefix = "shipment/waveMaster"; | |
43 | + | |
44 | + @Autowired | |
45 | + private WaveMasterService waveMasterService; | |
46 | + | |
47 | + @RequiresPermissions("shipment:waveMaster:view") | |
48 | + @GetMapping() | |
49 | + public String WaveMaster() { | |
50 | + return prefix + "/waveMaster"; | |
51 | + } | |
52 | + | |
53 | + /** | |
54 | + * 查询订单分析结果 | |
55 | + */ | |
56 | + @RequiresPermissions("shipment:waveMaster:list") | |
57 | + @Log(title = "出库-波次主表", operating="查看波次主表", action = BusinessType.GRANT) | |
58 | + @PostMapping("/list") | |
59 | + @ResponseBody | |
60 | + public TableDataInfo list(WaveMaster waveMaster, String createdBegin, String createdEnd) | |
61 | + { | |
62 | + LambdaQueryWrapper<WaveMaster> 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),WaveMaster::getCreated, createdBegin) | |
68 | + .le(StringUtils.isNotEmpty(createdEnd), WaveMaster::getCreated, createdEnd) | |
69 | + .eq(WaveMaster::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
70 | + .eq(StringUtils.isNotEmpty(waveMaster.getCode() | |
71 | + ),WaveMaster::getCode,waveMaster.getCode()) | |
72 | + .like(StringUtils.isNotEmpty(waveMaster.getShipmentFilterCode() | |
73 | + ),WaveMaster::getShipmentFilterCode,waveMaster.getShipmentFilterCode()); | |
74 | + | |
75 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
76 | + /** | |
77 | + * 使用分页查询 | |
78 | + */ | |
79 | + Page<WaveMaster> page = new Page<>(pageNum, pageSize); | |
80 | + IPage<WaveMaster> iPage = waveMasterService.page(page, lambdaQueryWrapper); | |
81 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
82 | + } else { | |
83 | + List<WaveMaster> list = waveMasterService.list(lambdaQueryWrapper); | |
84 | + return getDataTable(list); | |
85 | + } | |
86 | + } | |
87 | + | |
88 | + | |
89 | +} | |
... | ... |
src/main/java/com/huaheng/pc/shipment/waveMaster/domain/WaveMaster.java
... | ... | @@ -224,33 +224,6 @@ public class WaveMaster implements Serializable { |
224 | 224 | @ApiModelProperty(value="自定义字段4") |
225 | 225 | private String userDef4; |
226 | 226 | |
227 | - /** | |
228 | - * 自定义字段5 | |
229 | - */ | |
230 | - @TableField(value = "userDef5") | |
231 | - @ApiModelProperty(value="自定义字段5") | |
232 | - private String userDef5; | |
233 | - | |
234 | - /** | |
235 | - * 自定义字段6 | |
236 | - */ | |
237 | - @TableField(value = "userDef6") | |
238 | - @ApiModelProperty(value="自定义字段6") | |
239 | - private String userDef6; | |
240 | - | |
241 | - /** | |
242 | - * 自定义字段7 | |
243 | - */ | |
244 | - @TableField(value = "userDef7") | |
245 | - @ApiModelProperty(value="自定义字段7") | |
246 | - private String userDef7; | |
247 | - | |
248 | - /** | |
249 | - * 自定义字段8 | |
250 | - */ | |
251 | - @TableField(value = "userDef8") | |
252 | - @ApiModelProperty(value="自定义字段8") | |
253 | - private String userDef8; | |
254 | 227 | |
255 | 228 | /** |
256 | 229 | * 处理标记 |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java
... | ... | @@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
7 | +import com.huaheng.common.support.Convert; | |
7 | 8 | import com.huaheng.common.utils.StringUtils; |
8 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
9 | 10 | import com.huaheng.framework.aspectj.lang.annotation.Log; |
10 | 11 | import com.huaheng.framework.aspectj.lang.constant.BusinessType; |
11 | 12 | import com.huaheng.framework.web.controller.BaseController; |
13 | +import com.huaheng.framework.web.domain.AjaxResult; | |
12 | 14 | import com.huaheng.framework.web.page.PageDomain; |
13 | 15 | import com.huaheng.framework.web.page.TableDataInfo; |
14 | 16 | import com.huaheng.framework.web.page.TableSupport; |
... | ... | @@ -50,6 +52,7 @@ public class TaskHeaderController extends BaseController { |
50 | 52 | |
51 | 53 | |
52 | 54 | |
55 | + | |
53 | 56 | /** |
54 | 57 | * 查询任务列表 |
55 | 58 | */ |
... | ... | @@ -57,15 +60,19 @@ public class TaskHeaderController extends BaseController { |
57 | 60 | @Log(title = "任务-上架任务", operating = "查看任务列表", action = BusinessType.GRANT) |
58 | 61 | @PostMapping("/list") |
59 | 62 | @ResponseBody |
60 | - public TableDataInfo list(TaskHeader taskHeader,@ApiParam(name="InternalTaskType",value="类型") String InternalTaskType) { | |
63 | + public TableDataInfo list(TaskHeader taskHeader,@ApiParam(name="InternalTaskType",value="类型") Integer InternalTaskType, | |
64 | + @ApiParam(name="createdBegin",value="类型") String createdBegin,@ApiParam(name="createdEnd",value="类型") String createdEnd) { | |
61 | 65 | LambdaQueryWrapper<TaskHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
62 | 66 | lambdaQueryWrapper.eq(TaskHeader::getWarehouseCode,ShiroUtils.getWarehouseCode()) |
63 | 67 | .in(TaskHeader::getCompanyCode,ShiroUtils.getCompanyCodeList()) |
64 | - .eq(StringUtils.isNotEmpty(InternalTaskType),TaskHeader::getInternalTaskType,InternalTaskType) | |
65 | - .eq(StringUtils.isNotEmpty(taskHeader.getInternalTaskType()),TaskHeader::getInternalTaskType,taskHeader.getInternalTaskType()) | |
68 | + .eq(StringUtils.isNotNull(InternalTaskType),TaskHeader::getInternalTaskType,InternalTaskType) | |
69 | + .eq(StringUtils.isNotNull(taskHeader.getInternalTaskType()),TaskHeader::getInternalTaskType,taskHeader.getInternalTaskType()) | |
66 | 70 | .eq(StringUtils.isNotNull(taskHeader.getId()),TaskHeader::getId,taskHeader.getId()) |
67 | 71 | .eq(StringUtils.isNotEmpty(taskHeader.getContainerCode()),TaskHeader::getContainerCode,taskHeader.getContainerCode()) |
68 | - .eq(StringUtils.isNotEmpty(taskHeader.getLocationCode()),TaskHeader::getLocationCode,taskHeader.getLocationCode()); | |
72 | + .eq(StringUtils.isNotEmpty(taskHeader.getLocationCode()),TaskHeader::getLocationCode,taskHeader.getLocationCode()) | |
73 | + .gt(StringUtils.isNotEmpty(createdBegin),TaskHeader::getCreated,createdBegin) | |
74 | + .lt(StringUtils.isNotEmpty(createdEnd),TaskHeader::getCreated,createdEnd); | |
75 | + | |
69 | 76 | PageDomain pageDomain = TableSupport.buildPageRequest(); |
70 | 77 | Integer pageNum = pageDomain.getPageNum(); |
71 | 78 | Integer pageSize = pageDomain.getPageSize(); |
... | ... | @@ -83,5 +90,34 @@ public class TaskHeaderController extends BaseController { |
83 | 90 | } |
84 | 91 | |
85 | 92 | |
93 | + /** | |
94 | + * 下发任务 | |
95 | + */ | |
96 | + @RequiresPermissions("task:taskHeader:execute") | |
97 | + @Log(title = "任务-任务管理", operating = "下发立库任务", action = BusinessType.UPDATE) | |
98 | + @PostMapping( "/execute") | |
99 | + @ResponseBody | |
100 | + public AjaxResult execute(String taskId) | |
101 | + { | |
102 | + if (StringUtils.isEmpty(taskId)) | |
103 | + return AjaxResult.error("taskId不能为空"); | |
104 | + AjaxResult ajaxResult = taskHeaderService.sendTaskToWcs(Convert.toIntArray(taskId)); | |
105 | + return ajaxResult; | |
106 | + } | |
107 | + | |
108 | + /** | |
109 | + * 完成任务 | |
110 | + */ | |
111 | + @RequiresPermissions("task:task:complete") | |
112 | + @Log(title = "任务-任务管理", operating = "PC完成立库任务", action = BusinessType.UPDATE) | |
113 | + @PostMapping( "/completeTaskByWMS") | |
114 | + @ResponseBody | |
115 | + public AjaxResult completeTaskByWMS(String taskId) throws Exception { | |
116 | + if (StringUtils.isEmpty(taskId)) | |
117 | + return AjaxResult.error("taskId不能为空"); | |
118 | + return taskHeaderService.completeTaskByWMS(Convert.toIntArray(taskId)); | |
119 | + } | |
120 | + | |
121 | + | |
86 | 122 | |
87 | 123 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/domain/TaskHeader.java
src/main/java/com/huaheng/pc/task/taskHeader/mapper/TaskHeaderMapper.java
... | ... | @@ -2,6 +2,12 @@ package com.huaheng.pc.task.taskHeader.mapper; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | 4 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
5 | +import org.apache.ibatis.annotations.Param; | |
6 | + | |
7 | +import java.util.List; | |
8 | +import java.util.Map; | |
5 | 9 | |
6 | 10 | public interface TaskHeaderMapper extends BaseMapper<TaskHeader> { |
11 | + | |
12 | + List<Map<String, Object>> getReceiptTask(@Param("taskId") Integer taskId); | |
7 | 13 | } |
8 | 14 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java
... | ... | @@ -4,9 +4,22 @@ import com.huaheng.framework.web.domain.AjaxResult; |
4 | 4 | import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel; |
5 | 5 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
6 | 6 | import com.baomidou.mybatisplus.extension.service.IService; |
7 | +import org.apache.ibatis.annotations.Param; | |
8 | + | |
9 | +import java.util.List; | |
10 | +import java.util.Map; | |
11 | + | |
7 | 12 | public interface TaskHeaderService extends IService<TaskHeader>{ |
8 | 13 | |
9 | 14 | |
10 | 15 | AjaxResult createTaskFromShipmentContainers(ShipmentTaskCreateModel shipmentTaskCreateModel) ; |
11 | 16 | |
17 | + AjaxResult<TaskHeader> sendTaskToWcs(Integer[] taskIds); | |
18 | + | |
19 | + AjaxResult completeTaskByWMS(Integer[] taskIds) throws Exception; | |
20 | + | |
21 | + AjaxResult completeReceiptTask(TaskHeader task) throws Exception; | |
22 | + | |
23 | +// List<Map<String, Object>> getReceiptTask(@Param("taskId") Integer taskId); | |
24 | + | |
12 | 25 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
1 | 1 | package com.huaheng.pc.task.taskHeader.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |
4 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | +import com.huaheng.common.exception.service.ServiceException; | |
7 | +import com.huaheng.common.utils.DataUtils; | |
8 | +import com.huaheng.common.utils.StringUtils; | |
5 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
6 | 10 | import com.huaheng.framework.web.domain.AjaxResult; |
7 | 11 | import com.huaheng.pc.config.location.domain.Location; |
8 | 12 | import com.huaheng.pc.config.location.service.LocationService; |
9 | 13 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
10 | 14 | import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; |
15 | +import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction; | |
16 | +import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader; | |
11 | 17 | import com.huaheng.pc.shipment.shipmentContainerDetail.domain.ShipmentContainerDetail; |
12 | 18 | import com.huaheng.pc.shipment.shipmentContainerDetail.service.ShipmentContainerDetailService; |
13 | 19 | import com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentContainerHeader; |
14 | 20 | import com.huaheng.pc.shipment.shipmentContainerHeader.service.ShipmentContainerHeaderService; |
15 | 21 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
22 | +import com.huaheng.pc.task.taskDetail.mapper.TaskDetailMapper; | |
16 | 23 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
17 | 24 | import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel; |
25 | +import com.sun.jmx.snmp.tasks.Task; | |
18 | 26 | import org.springframework.beans.factory.annotation.Autowired; |
19 | 27 | import org.springframework.stereotype.Service; |
20 | 28 | import java.math.BigDecimal; |
21 | 29 | import java.util.Date; |
22 | 30 | import java.util.List; |
31 | +import java.util.Map; | |
32 | + | |
23 | 33 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
24 | 34 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
25 | 35 | import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper; |
26 | 36 | import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; |
27 | 37 | import org.springframework.transaction.annotation.Transactional; |
28 | 38 | |
39 | +import javax.annotation.Resource; | |
40 | + | |
29 | 41 | @Service |
30 | -public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHeader> implements TaskHeaderService{ | |
42 | +public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHeader> implements TaskHeaderService { | |
31 | 43 | |
32 | 44 | @Autowired |
33 | 45 | private ShipmentContainerHeaderService shipmentContainerHeaderService; |
... | ... | @@ -39,38 +51,44 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
39 | 51 | private InventoryDetailService inventoryDetailService; |
40 | 52 | @Autowired |
41 | 53 | private TaskDetailService taskDetailService; |
54 | + @Autowired | |
55 | + private TaskHeaderService taskHeaderService; | |
56 | + | |
57 | + @Resource | |
58 | + private TaskHeaderMapper taskHeaderMapper; | |
42 | 59 | |
43 | 60 | /** |
44 | 61 | * 生成出库任务 |
62 | + * | |
45 | 63 | * @param shipmentTaskCreateModel |
46 | 64 | * @return |
47 | 65 | */ |
48 | 66 | @Override |
49 | 67 | @Transactional |
50 | - public AjaxResult createTaskFromShipmentContainers(ShipmentTaskCreateModel shipmentTaskCreateModel) { | |
68 | + public AjaxResult createTaskFromShipmentContainers(ShipmentTaskCreateModel shipmentTaskCreateModel) { | |
51 | 69 | Integer shipmentContainerHeaderId = shipmentTaskCreateModel.getShipmentContainerHeaderIds(); |
52 | 70 | //获取表头 |
53 | 71 | ShipmentContainerHeader shipmentContainerHeader = shipmentContainerHeaderService.getById(shipmentContainerHeaderId); |
54 | - if(shipmentContainerHeader == null){ | |
72 | + if (shipmentContainerHeader == null) { | |
55 | 73 | return AjaxResult.error("出库货箱" + shipmentContainerHeaderId + "未找到,操作中止"); |
56 | 74 | } |
57 | - if(shipmentContainerHeader.getStatus() > 9){ | |
75 | + if (shipmentContainerHeader.getStatus() > 9) { | |
58 | 76 | return AjaxResult.error("出库货箱" + shipmentContainerHeader.getContainerCode() + "已经生成任务,请不要重复生成,操作中止"); |
59 | 77 | } |
60 | 78 | //获取所有子货箱 |
61 | - LambdaQueryWrapper<ShipmentContainerDetail> lambdaQueryWrapper= Wrappers.lambdaQuery(); | |
62 | - lambdaQueryWrapper.eq(ShipmentContainerDetail::getShippingContainerId,shipmentContainerHeader.getId()); | |
79 | + LambdaQueryWrapper<ShipmentContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
80 | + lambdaQueryWrapper.eq(ShipmentContainerDetail::getShippingContainerId, shipmentContainerHeader.getId()); | |
63 | 81 | List<ShipmentContainerDetail> shipmentContainerDetails = shipmentContainerDetailService.list(lambdaQueryWrapper); |
64 | - if(shipmentContainerDetails==null||shipmentContainerDetails.size()==0){ | |
82 | + if (shipmentContainerDetails == null || shipmentContainerDetails.size() == 0) { | |
65 | 83 | return AjaxResult.error("货箱" + shipmentContainerHeader.getContainerCode() + "没有子任务,操作中止"); |
66 | 84 | } |
67 | 85 | //检测库位 |
68 | - LambdaQueryWrapper<Location> locationLambdaQueryWrapper=Wrappers.lambdaQuery(); | |
69 | - locationLambdaQueryWrapper.eq(Location::getCode,shipmentContainerHeader.getLocationCode()) | |
70 | - .eq(Location::getWarehouseCode,ShiroUtils.getWarehouseCode()) | |
71 | - .eq(Location::getDeleted,false); | |
86 | + LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
87 | + locationLambdaQueryWrapper.eq(Location::getCode, shipmentContainerHeader.getLocationCode()) | |
88 | + .eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
89 | + .eq(Location::getDeleted, false); | |
72 | 90 | Location location = locationService.getOne(locationLambdaQueryWrapper); |
73 | - if (location == null) { | |
91 | + if (location == null) { | |
74 | 92 | return AjaxResult.error("库位禁用或不存在!"); |
75 | 93 | } |
76 | 94 | //创建任务头 |
... | ... | @@ -79,33 +97,33 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
79 | 97 | task.setTaskType(400); |
80 | 98 | task.setLocationCode(shipmentContainerHeader.getLocationCode()); |
81 | 99 | //判断是否整出任务,钱柜和AGV不能整出 |
82 | - if(shipmentContainerHeader.getStatus().intValue() == 300){ | |
100 | + if (shipmentContainerHeader.getStatus().intValue() == 300) { | |
83 | 101 | //表示整出优先 |
84 | 102 | //判断当前子货箱所有数量是否等于该托盘对应的所有库存的数量, |
85 | 103 | //这里必须与库存的在库数量对比,后期可能存在一个配盘在执行任务,后一个配盘又在配这个的情况(这个时候不能整出) |
86 | 104 | // 如果相等,则说明这个货箱包含了所有的数量,则可以整出,否则,创建拣选任务; |
87 | 105 | //查询所有库存 |
88 | 106 | InventoryDetail inventoryCondition = new InventoryDetail(); |
89 | - LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper=Wrappers.lambdaQuery(); | |
90 | - inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getLocationCode,shipmentContainerHeader.getLocationCode()) | |
91 | - .eq(InventoryDetail::getWarehouseCode,ShiroUtils.getWarehouseCode()); | |
107 | + LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
108 | + inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getLocationCode, shipmentContainerHeader.getLocationCode()) | |
109 | + .eq(InventoryDetail::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
92 | 110 | List<InventoryDetail> inventories = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); |
93 | - BigDecimal inventoryTotal=new BigDecimal("0"); | |
94 | - for(InventoryDetail item : inventories){ | |
111 | + BigDecimal inventoryTotal = new BigDecimal("0"); | |
112 | + for (InventoryDetail item : inventories) { | |
95 | 113 | inventoryTotal = inventoryTotal.add(item.getQty()); |
96 | 114 | } |
97 | 115 | BigDecimal containerTotal = new BigDecimal("0"); |
98 | - for(ShipmentContainerDetail item: shipmentContainerDetails){ | |
116 | + for (ShipmentContainerDetail item : shipmentContainerDetails) { | |
99 | 117 | containerTotal = containerTotal.add(item.getQty()); |
100 | 118 | } |
101 | - if(inventoryTotal.compareTo(containerTotal) == 0){ | |
119 | + if (inventoryTotal.compareTo(containerTotal) == 0) { | |
102 | 120 | task.setTaskType(300);//整盘出库 |
103 | 121 | task.setLocationCode(""); |
104 | 122 | } |
105 | 123 | } |
106 | 124 | task.setWarehouseCode(shipmentContainerHeader.getWarehouseCode()); |
107 | 125 | task.setCompanyCode(shipmentContainerHeader.getCompanyCode()); |
108 | - task.setInternalTaskType(""); | |
126 | + task.setInternalTaskType(null); | |
109 | 127 | task.setAssignedUser(ShiroUtils.getLoginName()); |
110 | 128 | task.setConfirmedBy(ShiroUtils.getLoginName()); |
111 | 129 | task.setStatus(1); |
... | ... | @@ -116,7 +134,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
116 | 134 | task.setLastUpdated(null); |
117 | 135 | this.save(task); |
118 | 136 | //遍历子货箱创建子任务 |
119 | - for(ShipmentContainerDetail shipmentContainerDetail : shipmentContainerDetails){ | |
137 | + for (ShipmentContainerDetail shipmentContainerDetail : shipmentContainerDetails) { | |
120 | 138 | TaskDetail taskDetail = new TaskDetail(); |
121 | 139 | taskDetail.setTaskId(task.getId()); |
122 | 140 | taskDetail.setWarehouseCode(task.getWarehouseCode()); |
... | ... | @@ -149,4 +167,246 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
149 | 167 | return AjaxResult.success(task.getId()); |
150 | 168 | |
151 | 169 | } |
170 | + | |
171 | + @Override | |
172 | + public AjaxResult<TaskHeader> sendTaskToWcs(Integer[] taskIds) { | |
173 | + TaskHeader task = null; | |
174 | + for (Integer taskId : taskIds) { | |
175 | + task = taskHeaderService.getById(taskId); | |
176 | + if (task.getStatus() > 9) { | |
177 | + return AjaxResult.error("任务" + taskId + "已经下发,请不要重复下发,操作中止"); | |
178 | + } | |
179 | + //修改任务头表 | |
180 | + task.setStatus(10); | |
181 | + task.setStartPickDateTime(new Date()); //生成时间 | |
182 | + task.setLastUpdated(new Date()); | |
183 | + task.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
184 | + LambdaUpdateWrapper<TaskHeader> HeaderUpdateWrapper = Wrappers.lambdaUpdate(); | |
185 | + HeaderUpdateWrapper.eq(TaskHeader::getId, taskId); | |
186 | + taskHeaderService.update(task, HeaderUpdateWrapper); | |
187 | + //修改任务明细状态 | |
188 | + TaskDetail record = new TaskDetail(); | |
189 | + record.setStatus(10); | |
190 | + record.setLastUpdated(new Date()); | |
191 | + record.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
192 | + LambdaUpdateWrapper<TaskDetail> lambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
193 | + lambdaUpdateWrapper.eq(TaskDetail::getTaskId, task.getId()); | |
194 | + taskDetailService.update(record, lambdaUpdateWrapper); | |
195 | + | |
196 | + | |
197 | +// if (task.getInternalTaskType().equals("100")) | |
198 | +// { | |
199 | +// List<Map<String, Object>> maps = taskDetailService.selectListMapByEqual("billId, billDetailId", condition); | |
200 | +// for (Map<String, Object> item : maps){ | |
201 | +// Integer billDetailId = DataUtils.getInteger(item.get("billDetailId")); | |
202 | +// receiptHeaderService.updateDetailStatus(billDetailId, (short)300); | |
203 | +// } | |
204 | +// maps.stream().map(X -> X.get("billId")).distinct().forEach(X -> receiptHeaderService.receiptStatusUpdate(DataUtils.getInteger(X), (short)300)); | |
205 | +// } | |
206 | +// //盘点单执行 | |
207 | +// if(task.getType() == 700){ | |
208 | +// CyclecountDetail cyclecountDetai = cyclecountDetailService.selectEntityById( | |
209 | +// task.getAllocationHeadId()); | |
210 | +// cyclecountDetai.setStatus(10); | |
211 | +// cyclecountDetailService.updateByModel(cyclecountDetai); | |
212 | +// } | |
213 | +//// //如果是单排人工库,那么出入库都是先完成,在下发AGV任务 | |
214 | +//// if (task.getType().intValue() == 300 || task.getType().intValue() == 600) { | |
215 | +//// if (task.getSourceLocation().startsWith("L03") == false ) { | |
216 | +//// taskAgvService.createTaskAgv(task); | |
217 | +//// } | |
218 | +//// } | |
219 | +//// else { | |
220 | +//// taskAgvService.createTaskAgv(task); | |
221 | +//// } | |
222 | +// //任务类型是出库,那就完成任务在叫agv | |
223 | +// if (task.getType().intValue() == 100 || task.getType().intValue() == 500) { | |
224 | +// taskAgvService.createTaskAgv(task); | |
225 | +// } | |
226 | + } | |
227 | + return AjaxResult.success("下发任务成功", task); | |
228 | + } | |
229 | + | |
230 | + @Override | |
231 | + public AjaxResult completeTaskByWMS(Integer[] taskIds) throws Exception { | |
232 | + for (int taskId : taskIds) { | |
233 | + TaskHeader task = taskHeaderService.getById(taskId); | |
234 | + if (task == null) { | |
235 | + throw new ServiceException("任务" + taskId + "未找到,执行中止"); | |
236 | + } | |
237 | + //如果已完成则不管 | |
238 | + if (task.getStatus() == 100) { | |
239 | + throw new ServiceException("任务(" + taskId + ")任务已经是完成的!"); | |
240 | + } | |
241 | + //如果没有库位不能完成 | |
242 | + if (StringUtils.isEmpty(task.getPickingCartPos())) { | |
243 | + throw new ServiceException("任务" + taskId + "没有库位,执行中止"); | |
244 | + } | |
245 | + this.completeTask(task); | |
246 | + } | |
247 | + | |
248 | + return AjaxResult.success("完成任务成功!"); | |
249 | + } | |
250 | + | |
251 | + /** | |
252 | + * 完成任务 | |
253 | + * | |
254 | + * @param task | |
255 | + * @throws Exception | |
256 | + */ | |
257 | + public void completeTask(TaskHeader task) throws Exception { | |
258 | + //区分任务类型 | |
259 | + if (task.getInternalTaskType() == 100 || task.getInternalTaskType() == 200) { | |
260 | + //入库任务 | |
261 | + completeReceiptTask(task); | |
262 | + } | |
263 | + if (task.getInternalTaskType() == 300 || task.getInternalTaskType() == 400) { | |
264 | +// //出库任务 | |
265 | +// completeShipmentTask(task); | |
266 | + } | |
267 | + //...其他任务类型暂时不处理 // 700 盘点 800 移库 900 出库查看 | |
268 | + if (task.getInternalTaskType() == 700 || task.getInternalTaskType() == 900) { | |
269 | +// completeCycleCountOrSeeOutTask(task); | |
270 | + } | |
271 | + if (task.getInternalTaskType() == 800) { | |
272 | +// //移库 | |
273 | +// completeTransferTask(task); | |
274 | + } | |
275 | + if (task.getInternalTaskType() == 500) { | |
276 | +// //空托盘入库 | |
277 | +// completeEmptyIn(task); | |
278 | + } | |
279 | + if (task.getInternalTaskType() == 600) { | |
280 | +// //空托盘出库 | |
281 | +// completeEmptyOut(task); | |
282 | + } | |
283 | + } | |
284 | + | |
285 | + @Override | |
286 | + public AjaxResult completeReceiptTask(TaskHeader task) throws Exception { | |
287 | +// String LocationCode = task.getIsDoubleIn().intValue() == 0 ? task.getDestinationLocation() : task.getSecondDestinationLocation(); | |
288 | + List<Map<String, Object>> taskReceiptContainerDetail =taskHeaderMapper.getReceiptTask(task.getId()); | |
289 | + for (Map<String, Object> map : taskReceiptContainerDetail) { | |
290 | + //将未完成的任务数量更新到库存表 | |
291 | + if (DataUtils.getInteger(map.get("status")) < 100) { | |
292 | +// //更新库存表 | |
293 | +// BigDecimal inventoryQty = new BigDecimal("0"); | |
294 | +// Inventory condition = new Inventory(); | |
295 | +// condition.setWarehouseId(ShiroUtils.getWarehouseId()); | |
296 | +// condition.setLocationCode(LocationCode); | |
297 | +// condition.setReceiptDetailId(DataUtils.getInteger(map.get("billDetailId"))); | |
298 | +// condition.setContainerCode(DataUtils.getString(map.get("containerCode"))); | |
299 | +// Inventory inventory = inventoryService.selectFirstEntity(condition); | |
300 | +// if (inventory == null) | |
301 | +// { | |
302 | +// inventory = new Inventory(); | |
303 | +// inventory.setWarehouseId(DataUtils.getInteger(map.get("warehouseId"))); | |
304 | +// inventory.setWarehouseCode(DataUtils.getString(map.get("warehouseCode"))); | |
305 | +// inventory.setLocationCode(LocationCode); | |
306 | +// inventory.setContainerCode(DataUtils.getString(map.get("containerCode"))); | |
307 | +// inventory.setSourceCode(DataUtils.getString(map.get("sourceCode"))); | |
308 | +// inventory.setSourceLine(DataUtils.getString(map.get("sourceLine"))); | |
309 | +// inventory.setCompanyId(task.getCompanyId()); | |
310 | +// inventory.setCompanyCode(task.getCompanyCode()); | |
311 | +// inventory.setMaterialCode(DataUtils.getString(map.get("materialCode"))); | |
312 | +// inventory.setMaterialName(DataUtils.getString(map.get("materialName"))); | |
313 | +// inventory.setReceiptCode(DataUtils.getString(map.get("billCode"))); | |
314 | +// inventory.setReceiptId(DataUtils.getInteger(map.get("billId"))); | |
315 | +// inventory.setReceiptDetailId(DataUtils.getInteger(map.get("billDetailId"))); | |
316 | +// inventory.setBatch(DataUtils.getString(map.get("batch"))); | |
317 | +// inventory.setLot(DataUtils.getString(map.get("lot"))); | |
318 | +// inventory.setProject(DataUtils.getString(map.get("project"))); | |
319 | +// inventory.setManufactureDate(DataUtils.getDateTime(map.get("manufactureDate"))); | |
320 | +// inventory.setExpirationDate(DataUtils.getDateTime(map.get("expirationDate"))); | |
321 | +// inventory.setStatus(DataUtils.getString((map.get("inventoryStatus")))); | |
322 | +// inventory.setQty(DataUtils.getBigDecimal(map.get("qty"))); | |
323 | +// inventory.setCostPrice(DataUtils.getBigDecimal(map.get("price"))); | |
324 | +// inventory.setCreatedBy(ShiroUtils.getLoginName()); | |
325 | +// inventory.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
326 | +// inventoryService.insert(inventory); | |
327 | +// } | |
328 | +// else | |
329 | +// { | |
330 | +// inventoryQty = inventory.getQty(); | |
331 | +// inventory.setQty(inventory.getQty().add(DataUtils.getBigDecimal(map.get("qty")))); | |
332 | +// inventory.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
333 | +// inventoryService.updateByModel(inventory); | |
334 | +// } | |
335 | +// //记录库存交易记录 | |
336 | +// InventoryTransaction inventoryTransaction = new InventoryTransaction(); | |
337 | +// inventoryTransaction.setType("receipt"); | |
338 | +// inventoryTransaction.setWarehouseId(DataUtils.getInteger(map.get("warehouseId"))); | |
339 | +// inventoryTransaction.setWarehouseCode(DataUtils.getString(map.get("warehouseCode"))); | |
340 | +// inventoryTransaction.setCompanyId(task.getCompanyId()); | |
341 | +// inventoryTransaction.setCompanyCode(task.getCompanyCode()); | |
342 | +// inventoryTransaction.setLocationCode(LocationCode); | |
343 | +// inventoryTransaction.setContainerCode(DataUtils.getString(map.get("containerCode"))); | |
344 | +// inventoryTransaction.setSourceCode(DataUtils.getString(map.get("sourceCode"))); | |
345 | +// inventoryTransaction.setSourceLine(DataUtils.getString(map.get("sourceLine"))); | |
346 | +// inventoryTransaction.setMaterialCode(DataUtils.getString(map.get("materialCode"))); | |
347 | +// inventoryTransaction.setMaterialName(DataUtils.getString(map.get("materialName"))); | |
348 | +// inventoryTransaction.setBillCode(DataUtils.getString(map.get("billCode"))); | |
349 | +// inventoryTransaction.setBillId(DataUtils.getInteger(map.get("billId"))); | |
350 | +// inventoryTransaction.setBillDetailId(DataUtils.getInteger(map.get("billDetailId"))); | |
351 | +// inventoryTransaction.setBatch(DataUtils.getString(map.get("batch"))); | |
352 | +// inventoryTransaction.setLot(DataUtils.getString(map.get("lot"))); | |
353 | +// inventoryTransaction.setProject(DataUtils.getString(map.get("project"))); | |
354 | +// inventoryTransaction.setManufactureDate(DataUtils.getDateTime(map.get("manufactureDate"))); | |
355 | +// inventoryTransaction.setExpirationDate(DataUtils.getDateTime(map.get("expirationDate"))); | |
356 | +// inventoryTransaction.setStatus(DataUtils.getString((map.get("inventoryStatus")))); | |
357 | +// inventoryTransaction.setQty(inventoryQty); | |
358 | +// inventoryTransaction.setTaskQty(DataUtils.getBigDecimal(map.get("qty"))); | |
359 | +// inventoryTransaction.setCostPrice(DataUtils.getBigDecimal(map.get("price"))); | |
360 | +// //inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); | |
361 | +// inventoryTransaction.setCreated(null); | |
362 | +// inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); | |
363 | +// inventoryTransaction.setLastUpdated(null); | |
364 | +// inventoryTransaction.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
365 | +// inventoryTransactionService.insert(inventoryTransaction); | |
366 | +// //修改任务明细的状态为完成 | |
367 | +// TaskDetail taskDetail = new TaskDetail(); | |
368 | +// taskDetail.setId(DataUtils.getInteger(map.get("taskDetailId"))); | |
369 | +// taskDetail.setStatus((short)100); | |
370 | +// taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
371 | +// taskDetail.setEndTime(new Date()); //完成时间 | |
372 | +// taskDetailService.updateByModel(taskDetail); | |
373 | +// //修改入库单明细的状态 | |
374 | +// receiptHeaderService.updateDetailStatus(DataUtils.getInteger(map.get("billDetailId")), (short)800); | |
375 | +// } | |
376 | +// } | |
377 | +// //更新收货单主表的首状态 | |
378 | +// taskReceiptContainerDetail.stream(). | |
379 | +// filter(X -> DataUtils.getInteger(X.get("status")) < 100). | |
380 | +// map(X -> X.get("billId")). | |
381 | +// distinct(). | |
382 | +// forEach(X -> receiptHeaderService.receiptStatusUpdate(DataUtils.getInteger(X), (short)800)); | |
383 | +// //修改任务主表状态,因为立库任务表单头只对应一个货箱,表单详情的任务会同时完成 | |
384 | +// task.setFirstStatus((short)100); | |
385 | +// task.setLastStatus((short)100); | |
386 | +// task.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
387 | +// task.setEndTime(new Date()); | |
388 | +// this.updateByModel(task); | |
389 | +// //修改库位状态和对应的容器 | |
390 | +// locationService.updateContainerCodeAndStatus(LocationCode, task.getContainerCode(),"empty"); | |
391 | +// if (task.getIsDoubleIn().intValue() != 0) { | |
392 | +// locationService.updateStatus(task.getDestinationLocation(), "empty"); | |
393 | +// } | |
394 | +// //修改容器状态和对应的库位 | |
395 | +// containerService.updateLocationCodeAndStatus(task.getContainerCode(), LocationCode, "some"); | |
396 | +// //修改组盘表状态为20 | |
397 | +// ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); | |
398 | +// receiptContainerHeader.setId(task.getAllocationHeadId()); | |
399 | +// receiptContainerHeader.setStatus((short)20); | |
400 | +// receiptContainerHeaderService.updateByModel(receiptContainerHeader); | |
401 | + } | |
402 | + } | |
403 | + return AjaxResult.success("完成入库任务"); | |
404 | + } | |
405 | + | |
406 | +// @Override | |
407 | +// public List<Map<String, Object>> getReceiptTask(Integer taskId) { | |
408 | +// return taskHeaderMapper.getReceiptTask(taskId) ; | |
409 | +// } | |
410 | + | |
411 | + | |
152 | 412 | } |
... | ... |
src/main/resources/mybatis/shipment/FilterConfigDetailMapper.xml renamed to src/main/resources/mybatis/config/FilterConfigDetailMapper.xml
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | 3 | <mapper namespace="com.huaheng.pc.shipment.FilterConfigDetail.mapper.FilterConfigDetailMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.huaheng.pc.shipment.FilterConfigDetail.domain.FilterConfigDetail"> | |
4 | + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail"> | |
5 | 5 | <!--@mbg.generated--> |
6 | 6 | <id column="id" jdbcType="INTEGER" property="id" /> |
7 | 7 | <result column="headerId" jdbcType="INTEGER" property="headerId" /> |
... | ... |
src/main/resources/mybatis/shipment/FilterConfigHeaderMapper.xml renamed to src/main/resources/mybatis/config/FilterConfigHeaderMapper.xml
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | 3 | <mapper namespace="com.huaheng.pc.shipment.FilterConfigHeader.mapper.FilterConfigHeaderMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.huaheng.pc.shipment.FilterConfigHeader.domain.FilterConfigHeader"> | |
4 | + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.FilterConfigHeader.domain.FilterConfigHeader"> | |
5 | 5 | <!--@mbg.generated--> |
6 | 6 | <id column="id" jdbcType="INTEGER" property="id" /> |
7 | 7 | <result column="moduleType" jdbcType="VARCHAR" property="moduleType" /> |
... | ... |
src/main/resources/mybatis/shipment/ShipmentAnalyzeTemplateMapper.xml renamed to src/main/resources/mybatis/config/ShipmentAnalyzeTemplateMapper.xml
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | 3 | <mapper namespace="com.huaheng.pc.shipment.shipmentAnalyzeTemplate.mapper.ShipmentAnalyzeTemplateMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.huaheng.pc.shipment.shipmentAnalyzeTemplate.domain.ShipmentAnalyzeTemplate"> | |
4 | + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.shipmentAnalyzeTemplate.domain.ShipmentAnalyzeTemplate"> | |
5 | 5 | <!--@mbg.generated--> |
6 | 6 | <id column="id" jdbcType="INTEGER" property="id" /> |
7 | 7 | <result column="code" jdbcType="VARCHAR" property="code" /> |
... | ... |
src/main/resources/mybatis/task/TaskHeaderMapper.xml
... | ... | @@ -47,6 +47,12 @@ |
47 | 47 | <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> |
48 | 48 | <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> |
49 | 49 | </resultMap> |
50 | +<select id="getReceiptTask" resultType="java.util.Map"> | |
51 | + SELECT * | |
52 | + FROM task_detail td | |
53 | + INNER JOIN receipt_detail rd ON rd.id = td.billDetailId AND td.taskId = #{taskId,jdbcType=INTEGER} | |
54 | +</select> | |
55 | + | |
50 | 56 | <sql id="Base_Column_List"> |
51 | 57 | <!--@mbg.generated--> |
52 | 58 | id, code, warehouseCode, companyCode, taskType, internalTaskType, referenceId, referenceCode, |
... | ... |
src/main/resources/templates/task/taskHeader/taskHeader.html
... | ... | @@ -36,12 +36,12 @@ |
36 | 36 | </li> |
37 | 37 | <li class="time" style="height: 30px"> |
38 | 38 | <label>创建时间: </label> |
39 | - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> | |
39 | + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/> | |
40 | 40 | <span>-</span> |
41 | - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> | |
41 | + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/> | |
42 | 42 | </li> |
43 | 43 | <li> |
44 | - 任务类型:<input type="hidden" name="internalTaskType" th:value="${InternalTaskType}"/> | |
44 | + <input type="hidden" name="internalTaskType" th:value="${InternalTaskType}"/> | |
45 | 45 | </li> |
46 | 46 | |
47 | 47 | <!--<li>--> |
... | ... | @@ -123,10 +123,10 @@ |
123 | 123 | </div> |
124 | 124 | <div th:include="include :: footer"></div> |
125 | 125 | <script th:inline="javascript"> |
126 | - var editFlag = [[${@permission.hasPermi('task:task:edit')}]]; | |
127 | - var removeFlag = [[${@permission.hasPermi('task:task:remove')}]]; | |
128 | - var executeFlag = [[${@permission.hasPermi('task:task:execute')}]]; | |
129 | - var completeFlag = [[${@permission.hasPermi('task:task:complete')}]]; | |
126 | + var editFlag = [[${@permission.hasPermi('task:taskHeader:edit')}]]; | |
127 | + var removeFlag = [[${@permission.hasPermi('task:taskHeader:remove')}]]; | |
128 | + var executeFlag = [[${@permission.hasPermi('task:taskHeader:execute')}]]; | |
129 | + var completeFlag = [[${@permission.hasPermi('task:taskHeader:complete')}]]; | |
130 | 130 | var agvFlag = [[${@permission.hasPermi('task:task:agvFlag')}]]; |
131 | 131 | var prefix = ctx + "task/taskHeader"; |
132 | 132 | var prefix1 = ctx + "task/taskDetail" |
... | ... | @@ -228,20 +228,15 @@ |
228 | 228 | align: 'center', |
229 | 229 | formatter: function(value, row, index) { |
230 | 230 | var actions = []; |
231 | - // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
232 | 231 | actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>明细</a> '); |
233 | - if (row.lastStatus < 10) { | |
234 | - if(row.zoneCode != "AGV"){ | |
235 | - actions.push('<a class="btn btn-success btn-xs ' + executeFlag + '" href="#" onclick="execute(\'' + row.id + '\')"><i class="fa fa-send" style="padding-right: 1px;"></i>执行</a> '); | |
236 | - } | |
232 | + if (row.status < 10) { | |
233 | + actions.push('<a class="btn btn-success btn-xs ' + executeFlag + '" href="#" onclick="execute(\'' + row.id + '\')"><i class="fa fa-send" style="padding-right: 1px;"></i>执行</a> '); | |
237 | 234 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消</a> '); |
238 | - if(row.zoneCode != "AGV"){ | |
239 | 235 | actions.push('<a class="btn btn-primary btn-xs ' + completeFlag + '" href="#" onclick="complete(\'' + row.id + '\')"><i class="fa fa-check"></i>完成</a>'); |
240 | - } | |
241 | - } | |
242 | - if(row.lastStatus < 10 && row.zoneCode == "AGV"){ | |
243 | - actions.push('<a style="background-color: #f59e00;border: #f59e00" class="btn btn-primary btn-xs ' + agvFlag + '" href="#" onclick="complete(\'' + row.id + '\')"><i class="fa fa-check"></i>AGV完成</a>'); | |
244 | 236 | } |
237 | + if (row.status >=10) { | |
238 | + actions.push('<a class="btn btn-primary btn-xs ' + completeFlag + '" href="#" onclick="complete(\'' + row.id + '\')"><i class="fa fa-check"></i>完成</a>'); | |
239 | + } | |
245 | 240 | return actions.join(''); |
246 | 241 | } |
247 | 242 | } |
... | ... | @@ -287,11 +282,6 @@ |
287 | 282 | title : '单据编码', |
288 | 283 | }, |
289 | 284 | { |
290 | - field : 'allocationId', | |
291 | - title : '容器物料表ID' , | |
292 | - sortable: true | |
293 | - }, | |
294 | - { | |
295 | 285 | field : 'materialCode', |
296 | 286 | title : '存货编码', |
297 | 287 | sortable: true |
... | ... | @@ -311,12 +301,12 @@ |
311 | 301 | sortable:true |
312 | 302 | }, |
313 | 303 | { |
314 | - field : 'sourceLocation', | |
304 | + field : 'fromLocation', | |
315 | 305 | title : '源库位', |
316 | 306 | sortable:true |
317 | 307 | }, |
318 | 308 | { |
319 | - field : 'destinationLocation', | |
309 | + field : 'toLocation', | |
320 | 310 | title : '目的库位', |
321 | 311 | sortable:true |
322 | 312 | }, |
... | ... | @@ -333,8 +323,8 @@ |
333 | 323 | } |
334 | 324 | }, |
335 | 325 | { |
336 | - field : 'endTime', | |
337 | - title : '子任务完成时间' , | |
326 | + field : 'created', | |
327 | + title : '创建时间' , | |
338 | 328 | visible:false, |
339 | 329 | sortable:true |
340 | 330 | }, |
... | ... | @@ -421,7 +411,7 @@ |
421 | 411 | /*任务列表-下发执行*/ |
422 | 412 | function execute(taskId) { |
423 | 413 | $.modal.confirm("确定执行任务?", function() { |
424 | - var url = ctx + 'task/task/execute'; | |
414 | + var url = ctx + 'task/taskHeader/execute'; | |
425 | 415 | var data = { "taskId" : taskId }; |
426 | 416 | $.operate.post(url, data); |
427 | 417 | }); |
... | ... |