Commit 1ae0e30780dd949234e5da8ddfcc7fa76ac8e0cf

Authored by xqs
2 parents fedd4ab2 78382ae4

Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop

Showing 33 changed files with 802 additions and 753 deletions
src/main/java/com/huaheng/api/wcs/controller/EmptyOutHandle.java
@@ -21,7 +21,7 @@ import javax.annotation.Resource; @@ -21,7 +21,7 @@ import javax.annotation.Resource;
21 */ 21 */
22 22
23 @RestController 23 @RestController
24 -@RequestMapping("/WCS/v1") 24 +@RequestMapping("/WCS/v2")
25 @Api(tags = {"OverrideHandle"}, description = "wcs空出处理接口") 25 @Api(tags = {"OverrideHandle"}, description = "wcs空出处理接口")
26 public class EmptyOutHandle extends BaseController { 26 public class EmptyOutHandle extends BaseController {
27 27
src/main/java/com/huaheng/api/wcs/controller/OverrideHandle.java
1 package com.huaheng.api.wcs.controller; 1 package com.huaheng.api.wcs.controller;
2 2
3 -import com.huaheng.api.wcs.domain.WcsTask; 3 +import com.huaheng.api.wcs.domain.TaskFinishDomain;
4 import com.huaheng.api.wcs.service.overrideHandle.OverrideHandleService; 4 import com.huaheng.api.wcs.service.overrideHandle.OverrideHandleService;
5 -import com.huaheng.api.wcs.service.taskFinish.TaskFinishService;  
6 import com.huaheng.framework.aspectj.lang.annotation.Log; 5 import com.huaheng.framework.aspectj.lang.annotation.Log;
7 import com.huaheng.framework.aspectj.lang.constant.BusinessType; 6 import com.huaheng.framework.aspectj.lang.constant.BusinessType;
8 import com.huaheng.framework.web.controller.BaseController; 7 import com.huaheng.framework.web.controller.BaseController;
@@ -21,7 +20,7 @@ import javax.annotation.Resource; @@ -21,7 +20,7 @@ import javax.annotation.Resource;
21 */ 20 */
22 21
23 @RestController 22 @RestController
24 -@RequestMapping("/WCS/v1") 23 +@RequestMapping("/WCS/v2")
25 @Api(tags = {"OverrideHandle"}, description = "wcs重入处理接口") 24 @Api(tags = {"OverrideHandle"}, description = "wcs重入处理接口")
26 public class OverrideHandle extends BaseController { 25 public class OverrideHandle extends BaseController {
27 26
@@ -32,9 +31,9 @@ public class OverrideHandle extends BaseController { @@ -32,9 +31,9 @@ public class OverrideHandle extends BaseController {
32 @PostMapping("/OverrideHandle") 31 @PostMapping("/OverrideHandle")
33 @ApiOperation("wcs重入处理") 32 @ApiOperation("wcs重入处理")
34 @ResponseBody 33 @ResponseBody
35 - public AjaxResult OverrideHandle(@RequestBody WcsTask wcsTask) 34 + public AjaxResult OverrideHandle(@RequestBody TaskFinishDomain taskFinishDomain)
36 { 35 {
37 - AjaxResult ajaxResult =overrideHandleService.OverrideHandle(wcsTask) ; 36 + AjaxResult ajaxResult =overrideHandleService.OverrideHandle(taskFinishDomain) ;
38 return ajaxResult; 37 return ajaxResult;
39 } 38 }
40 39
src/main/java/com/huaheng/api/wcs/controller/TaskFinish.java
1 package com.huaheng.api.wcs.controller; 1 package com.huaheng.api.wcs.controller;
2 2
  3 +import com.huaheng.api.wcs.domain.TaskFinishDomain;
3 import com.huaheng.api.wcs.domain.WcsTask; 4 import com.huaheng.api.wcs.domain.WcsTask;
4 import com.huaheng.api.wcs.service.taskFinish.TaskFinishService; 5 import com.huaheng.api.wcs.service.taskFinish.TaskFinishService;
5 import com.huaheng.framework.aspectj.lang.annotation.Log; 6 import com.huaheng.framework.aspectj.lang.annotation.Log;
@@ -20,7 +21,7 @@ import javax.annotation.Resource; @@ -20,7 +21,7 @@ import javax.annotation.Resource;
20 */ 21 */
21 22
22 @RestController 23 @RestController
23 -@RequestMapping("/WCS/v1") 24 +@RequestMapping("/WCS/v2")
24 @Api(tags = {"TaskFinish"}, description = "wcs任务完成数据接口") 25 @Api(tags = {"TaskFinish"}, description = "wcs任务完成数据接口")
25 public class TaskFinish extends BaseController { 26 public class TaskFinish extends BaseController {
26 27
@@ -31,9 +32,9 @@ public class TaskFinish extends BaseController { @@ -31,9 +32,9 @@ public class TaskFinish extends BaseController {
31 @PostMapping("/TaskFinish") 32 @PostMapping("/TaskFinish")
32 @ApiOperation("wcs任务完成") 33 @ApiOperation("wcs任务完成")
33 @ResponseBody 34 @ResponseBody
34 - public AjaxResult TaskFinish(@RequestBody WcsTask wcsTask) 35 + public AjaxResult TaskFinish(@RequestBody TaskFinishDomain taskFinishDomain)
35 { 36 {
36 - AjaxResult ajaxResult =taskFinishService.completeTaskByWCS(wcsTask) ; 37 + AjaxResult ajaxResult =taskFinishService.completeTaskByWCS(taskFinishDomain) ;
37 return ajaxResult; 38 return ajaxResult;
38 } 39 }
39 40
src/main/java/com/huaheng/api/wcs/controller/WarecellAllocation.java
@@ -21,7 +21,7 @@ import javax.annotation.Resource; @@ -21,7 +21,7 @@ import javax.annotation.Resource;
21 */ 21 */
22 22
23 @RestController 23 @RestController
24 -@RequestMapping("/WCS/v1") 24 +@RequestMapping("/WCS/v2")
25 @Api(tags = {"WarecellAllocation"}, description = "wcs仓位分配接口") 25 @Api(tags = {"WarecellAllocation"}, description = "wcs仓位分配接口")
26 public class WarecellAllocation extends BaseController { 26 public class WarecellAllocation extends BaseController {
27 27
@@ -30,7 +30,7 @@ public class WarecellAllocation extends BaseController { @@ -30,7 +30,7 @@ public class WarecellAllocation extends BaseController {
30 30
31 @Log(title = "wcs仓位分配", action = BusinessType.INSERT) 31 @Log(title = "wcs仓位分配", action = BusinessType.INSERT)
32 @PostMapping("/WarecellAllocation") 32 @PostMapping("/WarecellAllocation")
33 - @ApiOperation("wcs仓位分配") 33 + @ApiOperation(value="wcs仓位分配", notes="wcs仓位分配", httpMethod = "POST")
34 @ResponseBody 34 @ResponseBody
35 public AjaxResult WarecellAllocation(@RequestBody WcsTask wcsTask) 35 public AjaxResult WarecellAllocation(@RequestBody WcsTask wcsTask)
36 { 36 {
src/main/java/com/huaheng/api/wcs/domain/TaskDetails.java 0 → 100644
  1 +package com.huaheng.api.wcs.domain;
  2 +
  3 +import lombok.Data;
  4 +
  5 +import java.math.BigDecimal;
  6 +
  7 +/**
  8 + * Created by Enzo Cotter on 2019/10/15.
  9 + */
  10 +@Data
  11 +public class TaskDetails {
  12 +
  13 + //关联行号,string (50),默认0 ",必填
  14 + private String referLineNo;
  15 +
  16 + //物料编码,string (50),默认0 ",必填
  17 + private String materialCode;
  18 +
  19 + //物料名称
  20 + private String materialName;
  21 +
  22 + //数量,float,默认“0” ,必填"
  23 + private BigDecimal qty;
  24 +
  25 + //单位,string(20),默认“PCS” ,必填"
  26 + private String unit;
  27 +}
src/main/java/com/huaheng/api/wcs/domain/TaskFinishDomain.java 0 → 100644
  1 +package com.huaheng.api.wcs.domain;
  2 +
  3 +import lombok.Data;
  4 +
  5 +/**
  6 + * 任务完成和重入实体类
  7 + * Created by Enzo Cotter on 2019/10/15.
  8 + */
  9 +@Data
  10 +public class TaskFinishDomain {
  11 +
  12 + //任务号
  13 + private String taskNo;
  14 +
  15 + //重入,int,1:重入 0:正常,必填
  16 + private Integer isDoubleIn;
  17 +
  18 + //空出,int,1:空出 0:正常,必填
  19 + private Integer isEmptyOut;
  20 +
  21 + //重入的库位编码,string (50),默认0,必填
  22 + private String redirectionLocationCode;
  23 +
  24 + //目的位置编码,string (50),默认0 ",必填
  25 + private String toLocationCode;
  26 +}
src/main/java/com/huaheng/api/wcs/domain/WcsTask.java
1 package com.huaheng.api.wcs.domain; 1 package com.huaheng.api.wcs.domain;
2 2
  3 +import lombok.Data;
  4 +
3 import java.io.Serializable; 5 import java.io.Serializable;
  6 +import java.util.List;
4 7
5 /** 8 /**
6 * wcs任务接口实体层 9 * wcs任务接口实体层
7 * @author ricard 10 * @author ricard
8 * @date 2019/10/11 11 * @date 2019/10/11
9 */ 12 */
  13 +
  14 +@Data
10 public class WcsTask implements Serializable { 15 public class WcsTask implements Serializable {
11 private static final long serialVersionUID = -8855840499538794854L; 16 private static final long serialVersionUID = -8855840499538794854L;
12 17
@@ -23,7 +28,13 @@ public class WcsTask implements Serializable { @@ -23,7 +28,13 @@ public class WcsTask implements Serializable {
23 private String platform; 28 private String platform;
24 29
25 //容器编码 30 //容器编码
26 - private String palletNo; 31 + private String containerCode;
  32 +
  33 + //来源口”,一般用于指定入库口,string (50),默认0,必填
  34 + private String fromPort;
  35 +
  36 + //目的口”,出库性质的任务必须填写,string (50),默认0,必填
  37 + private String toPort;
27 38
28 //源位置库位编码 39 //源位置库位编码
29 private String fromLocationCode; 40 private String fromLocationCode;
@@ -34,138 +45,26 @@ public class WcsTask implements Serializable { @@ -34,138 +45,26 @@ public class WcsTask implements Serializable {
34 //重入后再次分配的位置编码 45 //重入后再次分配的位置编码
35 private String locationCode; 46 private String locationCode;
36 47
37 - //取消任务  
38 - private String reason; 48 + //优先级,int,默认100 ,数字越小优先级越高",必填
  49 + private int priority;
  50 +
  51 + //巷道
  52 + private String roadWay;
39 53
40 //长 54 //长
41 - private Float length; 55 + private String length;
42 56
43 //宽 57 //宽
44 - private Float width; 58 + private String width;
45 59
46 //高 60 //高
47 - private Float height; 61 + private String height;
48 62
49 //重 63 //重
50 - private Float weight;  
51 -  
52 - public String getTaskNo() {  
53 - return taskNo;  
54 - }  
55 -  
56 - public void setTaskNo(String taskNo) {  
57 - this.taskNo = taskNo;  
58 - }  
59 -  
60 - public String getTaskType() {  
61 - return taskType;  
62 - }  
63 -  
64 - public void setTaskType(String taskType) {  
65 - this.taskType = taskType;  
66 - }  
67 -  
68 - public String getStation() {  
69 - return station;  
70 - }  
71 -  
72 - public void setStation(String station) {  
73 - this.station = station;  
74 - }  
75 -  
76 - public String getPlatform() {  
77 - return platform;  
78 - }  
79 -  
80 - public void setPlatform(String platform) {  
81 - this.platform = platform;  
82 - }  
83 -  
84 - public String getPalletNo() {  
85 - return palletNo;  
86 - }  
87 -  
88 - public void setPalletNo(String palletNo) {  
89 - this.palletNo = palletNo;  
90 - }  
91 -  
92 - public String getFromLocationCode() {  
93 - return fromLocationCode;  
94 - }  
95 -  
96 - public void setFromLocationCode(String fromLocationCode) {  
97 - this.fromLocationCode = fromLocationCode;  
98 - }  
99 -  
100 - public String getToLocationCode() {  
101 - return toLocationCode;  
102 - }  
103 -  
104 - public void setToLocationCode(String toLocationCode) {  
105 - this.toLocationCode = toLocationCode;  
106 - }  
107 -  
108 - public String getReason() {  
109 - return reason;  
110 - }  
111 -  
112 - public void setReason(String reason) {  
113 - this.reason = reason;  
114 - }  
115 -  
116 - public float getLength() {  
117 - return length;  
118 - }  
119 -  
120 - public void setLength(float length) {  
121 - this.length = length;  
122 - }  
123 -  
124 - public float getWidth() {  
125 - return width;  
126 - }  
127 -  
128 - public void setWidth(float width) {  
129 - this.width = width;  
130 - }  
131 -  
132 - public float getHeight() {  
133 - return height;  
134 - }  
135 -  
136 - public void setHeight(float height) {  
137 - this.height = height;  
138 - }  
139 -  
140 - public float getWeight() {  
141 - return weight;  
142 - }  
143 -  
144 - public void setWeight(float weight) {  
145 - this.weight = weight;  
146 - }  
147 -  
148 - public String getLocationCode() {  
149 - return locationCode;  
150 - }  
151 -  
152 - public void setLocationCode(String locationCode) {  
153 - this.locationCode = locationCode;  
154 - }  
155 -  
156 - public void setLength(Float length) {  
157 - this.length = length;  
158 - }  
159 -  
160 - public void setWidth(Float width) {  
161 - this.width = width;  
162 - } 64 + private String weight;
163 65
164 - public void setHeight(Float height) {  
165 - this.height = height;  
166 - } 66 + //备注
  67 + private String remark;
167 68
168 - public void setWeight(Float weight) {  
169 - this.weight = weight;  
170 - } 69 + private List<TaskDetails> taskDetails;
171 } 70 }
src/main/java/com/huaheng/api/wcs/service/emptyOutHandle/EmptyOutHandleServiceImpl.java
@@ -40,7 +40,7 @@ public class EmptyOutHandleServiceImpl implements EmptyOutHandleService { @@ -40,7 +40,7 @@ public class EmptyOutHandleServiceImpl implements EmptyOutHandleService {
40 } 40 }
41 41
42 //3、修改该任务为空出,过后处理 42 //3、修改该任务为空出,过后处理
43 - taskHeader.setUserDef1("空托出库"); 43 + taskHeader.setExceptionCode("空托出库");
44 Boolean flag = taskHeaderService.updateById(taskHeader); 44 Boolean flag = taskHeaderService.updateById(taskHeader);
45 if(flag == false){ 45 if(flag == false){
46 return AjaxResult.error("修改任务失败,空出处理失败"); 46 return AjaxResult.error("修改任务失败,空出处理失败");
src/main/java/com/huaheng/api/wcs/service/overrideHandle/OverrideHandleService.java
1 package com.huaheng.api.wcs.service.overrideHandle; 1 package com.huaheng.api.wcs.service.overrideHandle;
2 2
  3 +import com.huaheng.api.wcs.domain.TaskFinishDomain;
3 import com.huaheng.api.wcs.domain.WcsTask; 4 import com.huaheng.api.wcs.domain.WcsTask;
4 import com.huaheng.framework.web.domain.AjaxResult; 5 import com.huaheng.framework.web.domain.AjaxResult;
5 6
6 public interface OverrideHandleService { 7 public interface OverrideHandleService {
7 8
8 //重入处理 9 //重入处理
9 - AjaxResult OverrideHandle(WcsTask wcsTask); 10 + AjaxResult OverrideHandle(TaskFinishDomain taskFinishDomain);
10 } 11 }
src/main/java/com/huaheng/api/wcs/service/overrideHandle/OverrideHandleServiceImpl.java
@@ -2,6 +2,7 @@ package com.huaheng.api.wcs.service.overrideHandle; @@ -2,6 +2,7 @@ package com.huaheng.api.wcs.service.overrideHandle;
2 2
3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 import com.baomidou.mybatisplus.core.toolkit.Wrappers; 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.api.wcs.domain.TaskFinishDomain;
5 import com.huaheng.api.wcs.domain.WcsTask; 6 import com.huaheng.api.wcs.domain.WcsTask;
6 import com.huaheng.common.exception.service.ServiceException; 7 import com.huaheng.common.exception.service.ServiceException;
7 import com.huaheng.common.utils.StringUtils; 8 import com.huaheng.common.utils.StringUtils;
@@ -48,19 +49,24 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { @@ -48,19 +49,24 @@ public class OverrideHandleServiceImpl implements OverrideHandleService {
48 49
49 @Override 50 @Override
50 @Transactional 51 @Transactional
51 - public AjaxResult OverrideHandle(WcsTask wcsTask) { 52 + public AjaxResult OverrideHandle(TaskFinishDomain taskFinishDomain) {
52 Boolean flag = true; 53 Boolean flag = true;
53 54
54 //1、判断非空字段 55 //1、判断非空字段
55 - if(StringUtils.isEmpty(wcsTask.getTaskNo())){ 56 + if(StringUtils.isEmpty(taskFinishDomain.getTaskNo())){
56 return AjaxResult.error("任务号为空"); 57 return AjaxResult.error("任务号为空");
57 } 58 }
58 - if(StringUtils.isEmpty(wcsTask.getToLocationCode())){ 59 + if(StringUtils.isEmpty(taskFinishDomain.getToLocationCode())){
59 return AjaxResult.error("目的库位为空"); 60 return AjaxResult.error("目的库位为空");
60 } 61 }
  62 + if(StringUtils.isEmpty(taskFinishDomain.getRedirectionLocationCode())){
  63 + return AjaxResult.error("目的库位为空");
  64 + }
  65 +
  66 +
61 67
62 //2、根据任务号查找任务 68 //2、根据任务号查找任务
63 - TaskHeader taskHeader = taskHeaderService.getById(Integer.valueOf(wcsTask.getTaskNo())); 69 + TaskHeader taskHeader = taskHeaderService.getById(Integer.valueOf(taskFinishDomain.getTaskNo()));
64 if(taskHeader == null){ 70 if(taskHeader == null){
65 return AjaxResult.error("任务号错误,没有找到该任务"); 71 return AjaxResult.error("任务号错误,没有找到该任务");
66 } 72 }
@@ -80,16 +86,31 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { @@ -80,16 +86,31 @@ public class OverrideHandleServiceImpl implements OverrideHandleService {
80 return AjaxResult.error("修改此任务的原目的库位错误"); 86 return AjaxResult.error("修改此任务的原目的库位错误");
81 } 87 }
82 88
83 - //查看新库位  
84 - locationLam.eq(Location::getCode,wcsTask.getToLocationCode())  
85 - .eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode());  
86 - Location newlocation = locationService.getOne(locationLam);  
87 - if(newlocation == null){  
88 - throw new ServiceException("新目的库位在系统中不存在"); 89 +
  90 + /**
  91 + * 查看新库位有两种情况
  92 + * 1、重入的库位由wcs提供
  93 + * 2、重入的库位由wms提供
  94 + */
  95 +
  96 + Location newlocation =new Location();
  97 +
  98 + //重入的库位由wcs提供
  99 + if(!taskFinishDomain.getRedirectionLocationCode().equals("0")) {
  100 + locationLam.eq(Location::getCode, taskFinishDomain.getToLocationCode())
  101 + .eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode());
  102 + newlocation = locationService.getOne(locationLam);
  103 + if (newlocation == null) {
  104 + throw new ServiceException("新目的库位在系统中不存在");
  105 + }
  106 + }else {
  107 + //重入的库位由wms提供
  108 +
89 } 109 }
  110 +
90 //修改任务 111 //修改任务
91 - taskHeader.setToLocation(wcsTask.getToLocationCode());  
92 - taskHeader.setUserDef1("重入处理"); 112 + taskHeader.setToLocation(newlocation.getCode());
  113 + taskHeader.setExceptionCode("重入处理");
93 flag = taskHeaderService.updateById(taskHeader); 114 flag = taskHeaderService.updateById(taskHeader);
94 if(flag == false){ 115 if(flag == false){
95 throw new ServiceException("修改此任务错误"); 116 throw new ServiceException("修改此任务错误");
@@ -103,7 +124,7 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { @@ -103,7 +124,7 @@ public class OverrideHandleServiceImpl implements OverrideHandleService {
103 List<TaskDetail> taskDetailList = new ArrayList<>(); 124 List<TaskDetail> taskDetailList = new ArrayList<>();
104 if(taskDetails != null && taskDetails.size()> 0){ 125 if(taskDetails != null && taskDetails.size()> 0){
105 for(TaskDetail taskDetail : taskDetails){ 126 for(TaskDetail taskDetail : taskDetails){
106 - taskDetail.setToLocation(wcsTask.getToLocationCode()); 127 + taskDetail.setToLocation(newlocation.getCode());
107 taskDetailList.add(taskDetail); 128 taskDetailList.add(taskDetail);
108 } 129 }
109 flag = taskDetailService.updateBatchById(taskDetailList); 130 flag = taskDetailService.updateBatchById(taskDetailList);
@@ -120,7 +141,7 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { @@ -120,7 +141,7 @@ public class OverrideHandleServiceImpl implements OverrideHandleService {
120 if(receiptContainerHeader == null){ 141 if(receiptContainerHeader == null){
121 throw new ServiceException("找不到此任务的组盘头"); 142 throw new ServiceException("找不到此任务的组盘头");
122 } 143 }
123 - receiptContainerHeader.setToLocation(wcsTask.getToLocationCode()); 144 + receiptContainerHeader.setToLocation(newlocation.getCode());
124 flag = receiptContainerHeaderService.updateById(receiptContainerHeader); 145 flag = receiptContainerHeaderService.updateById(receiptContainerHeader);
125 if(flag == false){ 146 if(flag == false){
126 throw new ServiceException("修改此任务对应的组盘头错误"); 147 throw new ServiceException("修改此任务对应的组盘头错误");
@@ -131,10 +152,11 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { @@ -131,10 +152,11 @@ public class OverrideHandleServiceImpl implements OverrideHandleService {
131 lam.eq(ReceiptContainerDetail::getReceiptContainerId,receiptContainerHeader.getId()) 152 lam.eq(ReceiptContainerDetail::getReceiptContainerId,receiptContainerHeader.getId())
132 .eq(ReceiptContainerDetail::getWarehouseCode,ShiroUtils.getWarehouseCode()); 153 .eq(ReceiptContainerDetail::getWarehouseCode,ShiroUtils.getWarehouseCode());
133 List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lam); 154 List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lam);
  155 +
134 List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>(); 156 List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>();
135 if(receiptContainerDetails != null && receiptContainerDetails.size()> 0){ 157 if(receiptContainerDetails != null && receiptContainerDetails.size()> 0){
136 for(ReceiptContainerDetail receiptContainerDetail : receiptContainerDetails){ 158 for(ReceiptContainerDetail receiptContainerDetail : receiptContainerDetails){
137 - receiptContainerDetail.setLocationCode(wcsTask.getToLocationCode()); 159 + receiptContainerDetail.setLocationCode(newlocation.getCode());
138 receiptContainerDetailList.add(receiptContainerDetail); 160 receiptContainerDetailList.add(receiptContainerDetail);
139 } 161 }
140 flag = receiptContainerDetailService.updateBatchById(receiptContainerDetailList); 162 flag = receiptContainerDetailService.updateBatchById(receiptContainerDetailList);
src/main/java/com/huaheng/api/wcs/service/taskAssignService/TaskAssignServiceImpl.java
@@ -2,17 +2,25 @@ package com.huaheng.api.wcs.service.taskAssignService; @@ -2,17 +2,25 @@ package com.huaheng.api.wcs.service.taskAssignService;
2 2
3 3
4 import com.alibaba.fastjson.JSON; 4 import com.alibaba.fastjson.JSON;
  5 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  6 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  7 +import com.huaheng.api.wcs.domain.TaskDetails;
5 import com.huaheng.api.wcs.domain.WcsTask; 8 import com.huaheng.api.wcs.domain.WcsTask;
6 import com.huaheng.common.exception.service.ServiceException; 9 import com.huaheng.common.exception.service.ServiceException;
7 import com.huaheng.common.utils.StringUtils; 10 import com.huaheng.common.utils.StringUtils;
8 import com.huaheng.common.utils.http.HttpUtils; 11 import com.huaheng.common.utils.http.HttpUtils;
9 import com.huaheng.framework.web.domain.AjaxResult; 12 import com.huaheng.framework.web.domain.AjaxResult;
10 import com.huaheng.pc.config.address.service.AddressService; 13 import com.huaheng.pc.config.address.service.AddressService;
  14 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
  15 +import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
11 import com.huaheng.pc.task.taskHeader.domain.TaskHeader; 16 import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
12 import org.springframework.beans.factory.annotation.Autowired; 17 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Service; 18 import org.springframework.stereotype.Service;
14 import org.springframework.transaction.annotation.Transactional; 19 import org.springframework.transaction.annotation.Transactional;
15 20
  21 +import java.util.ArrayList;
  22 +import java.util.List;
  23 +
16 /** 24 /**
17 * 任务下发接口ServiceImpl层 25 * 任务下发接口ServiceImpl层
18 * @author ricard 26 * @author ricard
@@ -25,6 +33,8 @@ public class TaskAssignServiceImpl implements TaskAssignService { @@ -25,6 +33,8 @@ public class TaskAssignServiceImpl implements TaskAssignService {
25 33
26 @Autowired 34 @Autowired
27 private AddressService addressService; 35 private AddressService addressService;
  36 + @Autowired
  37 + private TaskDetailService taskDetailService;
28 38
29 39
30 public static String platform = "wms"; 40 public static String platform = "wms";
@@ -57,9 +67,7 @@ public class TaskAssignServiceImpl implements TaskAssignService { @@ -57,9 +67,7 @@ public class TaskAssignServiceImpl implements TaskAssignService {
57 if(StringUtils.isEmpty(taskHeader.getContainerCode())){ 67 if(StringUtils.isEmpty(taskHeader.getContainerCode())){
58 throw new ServiceException("wms任务中容器为空"); 68 throw new ServiceException("wms任务中容器为空");
59 } 69 }
60 -// if(StringUtils.isEmpty(taskHeader.getStation())){  
61 -// throw new ServiceException("wms站台为空");  
62 -// } 70 +
63 71
64 //入库性质的任务源库位不能为空 72 //入库性质的任务源库位不能为空
65 if(taskHeader.getTaskType()==100 || taskHeader.getTaskType()==200 73 if(taskHeader.getTaskType()==100 || taskHeader.getTaskType()==200
@@ -83,16 +91,40 @@ public class TaskAssignServiceImpl implements TaskAssignService { @@ -83,16 +91,40 @@ public class TaskAssignServiceImpl implements TaskAssignService {
83 WcsTask wcsTask = new WcsTask(); 91 WcsTask wcsTask = new WcsTask();
84 wcsTask.setTaskNo(taskHeader.getId().toString()); 92 wcsTask.setTaskNo(taskHeader.getId().toString());
85 wcsTask.setTaskType(taskHeader.getTaskType().toString()); 93 wcsTask.setTaskType(taskHeader.getTaskType().toString());
86 -// wcsTask.setStation(taskHeader.getStation);  
87 - wcsTask.setPalletNo(taskHeader.getContainerCode()); 94 + wcsTask.setFromPort("0");
  95 + wcsTask.setToPort("0");
  96 + wcsTask.setContainerCode(taskHeader.getContainerCode());
88 wcsTask.setFromLocationCode(taskHeader.getFromLocation()); 97 wcsTask.setFromLocationCode(taskHeader.getFromLocation());
89 wcsTask.setToLocationCode(taskHeader.getToLocation()); 98 wcsTask.setToLocationCode(taskHeader.getToLocation());
  99 + wcsTask.setPriority(100);
  100 + wcsTask.setRemark("0");
90 wcsTask.setPlatform(platform); 101 wcsTask.setPlatform(platform);
91 102
  103 + //找到任务明细
  104 + LambdaQueryWrapper<TaskDetail> taskDetailLam = Wrappers.lambdaQuery();
  105 + taskDetailLam.eq(TaskDetail::getTaskId,taskHeader.getId());
  106 + List<TaskDetail> taskDetailList = taskDetailService.list(taskDetailLam);
  107 + if(taskDetailList == null){
  108 + throw new ServiceException("没有子任务");
  109 + }
  110 + List<TaskDetails> taskDetails =new ArrayList<>();
  111 + for(TaskDetail item : taskDetailList){
  112 + TaskDetails details = new TaskDetails();
  113 + details.setMaterialCode(item.getMaterialCode());
  114 + details.setMaterialName(item.getMaterialName());
  115 + details.setUnit(item.getMaterialUnit());
  116 + details.setQty(item.getQty());
  117 + details.setReferLineNo(item.getId().toString());
  118 + taskDetails.add(details);
  119 + }
  120 +
  121 + wcsTask.setTaskDetails(taskDetails);
  122 +
92 //4、发送数据 123 //4、发送数据
93 String param="wcs"; 124 String param="wcs";
94 String url=addressService.selectAddress(param)+"TaskAssign"; 125 String url=addressService.selectAddress(param)+"TaskAssign";
95 String JsonParam = JSON.toJSONString(wcsTask); 126 String JsonParam = JSON.toJSONString(wcsTask);
  127 + System.out.println(JsonParam);
96 String result = HttpUtils.bodypost(url, JsonParam); 128 String result = HttpUtils.bodypost(url, JsonParam);
97 if(StringUtils.isEmpty(result)){ 129 if(StringUtils.isEmpty(result)){
98 throw new ServiceException("接口地址错误"); 130 throw new ServiceException("接口地址错误");
src/main/java/com/huaheng/api/wcs/service/taskCancel/TaskCancelService.java
@@ -6,5 +6,5 @@ import com.huaheng.framework.web.domain.AjaxResult; @@ -6,5 +6,5 @@ import com.huaheng.framework.web.domain.AjaxResult;
6 public interface TaskCancelService { 6 public interface TaskCancelService {
7 7
8 //取消任务 8 //取消任务
9 - AjaxResult TaskCance(Integer id,String reason); 9 + AjaxResult TaskCance(Integer id);
10 } 10 }
src/main/java/com/huaheng/api/wcs/service/taskCancel/TaskCancelServiceImpl.java
@@ -26,20 +26,17 @@ public class TaskCancelServiceImpl implements TaskCancelService { @@ -26,20 +26,17 @@ public class TaskCancelServiceImpl implements TaskCancelService {
26 * @return 26 * @return
27 */ 27 */
28 @Override 28 @Override
29 - public AjaxResult TaskCance(Integer id, String reason) { 29 + public AjaxResult TaskCance(Integer id) {
30 30
31 //1、判断参数是否为空 31 //1、判断参数是否为空
32 if(id == null){ 32 if(id == null){
33 throw new ServiceException("任务号为空"); 33 throw new ServiceException("任务号为空");
34 } 34 }
35 - if(StringUtils.isEmpty(reason)){  
36 - throw new ServiceException("取消原因");  
37 - } 35 +
38 36
39 //2、转换实体 37 //2、转换实体
40 WcsTask wcsTask = new WcsTask(); 38 WcsTask wcsTask = new WcsTask();
41 wcsTask.setTaskNo(id.toString()); 39 wcsTask.setTaskNo(id.toString());
42 - wcsTask.setReason(reason);  
43 40
44 //3、发送数据 41 //3、发送数据
45 String param="wcs"; 42 String param="wcs";
src/main/java/com/huaheng/api/wcs/service/taskFinish/TaskFinishService.java
1 package com.huaheng.api.wcs.service.taskFinish; 1 package com.huaheng.api.wcs.service.taskFinish;
2 2
3 -import com.huaheng.api.wcs.domain.WcsTask; 3 +import com.huaheng.api.wcs.domain.TaskFinishDomain;
4 import com.huaheng.framework.web.domain.AjaxResult; 4 import com.huaheng.framework.web.domain.AjaxResult;
5 5
6 public interface TaskFinishService { 6 public interface TaskFinishService {
7 7
8 //任务完成 8 //任务完成
9 - AjaxResult completeTaskByWCS(WcsTask wcsTask); 9 + AjaxResult completeTaskByWCS(TaskFinishDomain taskFinishDomain);
10 } 10 }
src/main/java/com/huaheng/api/wcs/service/taskFinish/TaskFinishServiceImpl.java
1 package com.huaheng.api.wcs.service.taskFinish; 1 package com.huaheng.api.wcs.service.taskFinish;
2 2
3 -import com.huaheng.api.wcs.domain.WcsTask; 3 +import com.huaheng.api.wcs.domain.TaskFinishDomain;
4 import com.huaheng.common.support.Convert; 4 import com.huaheng.common.support.Convert;
5 import com.huaheng.common.utils.StringUtils; 5 import com.huaheng.common.utils.StringUtils;
6 import com.huaheng.framework.web.domain.AjaxResult; 6 import com.huaheng.framework.web.domain.AjaxResult;
@@ -16,13 +16,13 @@ public class TaskFinishServiceImpl implements TaskFinishService { @@ -16,13 +16,13 @@ public class TaskFinishServiceImpl implements TaskFinishService {
16 16
17 //任务完成 17 //任务完成
18 @Override 18 @Override
19 - public AjaxResult completeTaskByWCS(WcsTask wcsTask) { 19 + public AjaxResult completeTaskByWCS(TaskFinishDomain taskFinishDomain) {
20 AjaxResult ajaxResult=new AjaxResult(); 20 AjaxResult ajaxResult=new AjaxResult();
21 - if(StringUtils.isEmpty(wcsTask.getTaskNo())){ 21 + if(StringUtils.isEmpty(taskFinishDomain.getTaskNo())){
22 return AjaxResult.error("任务号为空"); 22 return AjaxResult.error("任务号为空");
23 } 23 }
24 try{ 24 try{
25 - ajaxResult=taskHeaderService.completeTaskByWMS(Convert.toIntArray(wcsTask.getTaskNo())); 25 + ajaxResult=taskHeaderService.completeTaskByWMS(Convert.toIntArray(taskFinishDomain.getTaskNo()));
26 } catch (Exception e) { 26 } catch (Exception e) {
27 e.printStackTrace(); 27 e.printStackTrace();
28 } 28 }
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
1 package com.huaheng.api.wcs.service.warecellAllocation; 1 package com.huaheng.api.wcs.service.warecellAllocation;
2 2
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
3 import com.huaheng.api.wcs.domain.WcsTask; 5 import com.huaheng.api.wcs.domain.WcsTask;
  6 +import com.huaheng.common.exception.service.ServiceException;
4 import com.huaheng.common.utils.StringUtils; 7 import com.huaheng.common.utils.StringUtils;
  8 +import com.huaheng.common.utils.security.ShiroUtils;
  9 +import com.huaheng.framework.config.FilterConfig;
5 import com.huaheng.framework.web.domain.AjaxResult; 10 import com.huaheng.framework.web.domain.AjaxResult;
  11 +import com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail;
  12 +import com.huaheng.pc.config.FilterConfigDetail.service.FilterConfigDetailService;
  13 +import com.huaheng.pc.config.configValue.domain.ConfigValue;
  14 +import com.huaheng.pc.config.configValue.service.ConfigValueService;
  15 +import com.huaheng.pc.config.location.domain.Location;
  16 +import com.huaheng.pc.config.location.service.LocationService;
  17 +import com.huaheng.pc.config.locationType.domain.LocationType;
  18 +import com.huaheng.pc.config.locationType.service.LocationTypeService;
  19 +import com.huaheng.pc.config.material.domain.Material;
  20 +import com.huaheng.pc.config.material.service.MaterialService;
  21 +import com.huaheng.pc.config.material.service.MaterialServiceImpl;
  22 +import com.huaheng.pc.config.materialType.domain.MaterialType;
  23 +import com.huaheng.pc.config.materialType.service.MaterialTypeService;
  24 +import com.huaheng.pc.config.receiptPreference.domain.ReceiptPreference;
  25 +import com.huaheng.pc.config.receiptPreference.service.ReceiptPreferenceService;
  26 +import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail;
  27 +import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService;
  28 +import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader;
  29 +import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService;
  30 +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail;
  31 +import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService;
  32 +import com.huaheng.pc.system.config.domain.Config;
  33 +import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
  34 +import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
  35 +import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
  36 +import com.huaheng.pc.task.taskHeader.service.TaskHeaderService;
  37 +import com.jhlabs.image.LightFilter;
  38 +import io.swagger.annotations.ResponseHeader;
6 import org.springframework.stereotype.Service; 39 import org.springframework.stereotype.Service;
7 40
  41 +import javax.annotation.Resource;
  42 +import java.util.ArrayList;
  43 +import java.util.List;
  44 +import java.util.stream.Collectors;
  45 +
8 @Service 46 @Service
9 public class WarecellAllocationServiceImpl implements WarecellAllocationService { 47 public class WarecellAllocationServiceImpl implements WarecellAllocationService {
10 48
  49 + @Resource
  50 + private LocationTypeService locationTypeService;
  51 + @Resource
  52 + private LocationService locationService;
  53 + @Resource
  54 + private ConfigValueService configValueService;
  55 + @Resource
  56 + private ReceiptPreferenceService receiptPreferenceService;
  57 + @Resource
  58 + private FilterConfigDetailService filterConfigDetailService;
  59 + @Resource
  60 + private TaskDetailService taskDetailService;
  61 + @Resource
  62 + private TaskHeaderService taskHeaderService;
  63 + @Resource
  64 + private ReceiptContainerDetailService receiptContainerDetailService;
  65 + @Resource
  66 + private ReceiptContainerHeaderService receiptContainerHeaderService;
  67 + @Resource
  68 + private ReceiptDetailService receiptDetailService;
  69 + @Resource
  70 + private MaterialService materialService;
  71 + @Resource
  72 + private MaterialTypeService materialTypeService;
  73 +
11 /** 74 /**
12 * 仓位分配 75 * 仓位分配
13 * 1、判断非空字段 76 * 1、判断非空字段
14 * 2、实体转换 77 * 2、实体转换
15 - * 78 + * 3、查询满足条件的库位类型
16 * @param wcsTask 79 * @param wcsTask
17 * @return 80 * @return
18 */ 81 */
@@ -23,11 +86,8 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService @@ -23,11 +86,8 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
23 if(StringUtils.isEmpty(wcsTask.getTaskNo())){ 86 if(StringUtils.isEmpty(wcsTask.getTaskNo())){
24 return AjaxResult.error("任务号为空"); 87 return AjaxResult.error("任务号为空");
25 } 88 }
26 - if(StringUtils.isEmpty(wcsTask.getPalletNo())){  
27 - return AjaxResult.error("托盘编号为空");  
28 - }  
29 - if(StringUtils.isEmpty(wcsTask.getStation())){  
30 - return AjaxResult.error("站台编码为空"); 89 + if(StringUtils.isEmpty(wcsTask.getRoadWay())){
  90 + return AjaxResult.error("巷道为空");
31 } 91 }
32 if(StringUtils.isNull(wcsTask.getLength())){ 92 if(StringUtils.isNull(wcsTask.getLength())){
33 return AjaxResult.error("长为空"); 93 return AjaxResult.error("长为空");
@@ -42,7 +102,144 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService @@ -42,7 +102,144 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
42 return AjaxResult.error("重为空"); 102 return AjaxResult.error("重为空");
43 } 103 }
44 104
  105 + //查询满足条件的库位类型
  106 + LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery();
  107 + lambdaQueryWrapper.gt(LocationType::getLength,wcsTask.getLength())
  108 + .gt(LocationType::getWidth, wcsTask.getWidth())
  109 + .gt(LocationType::getHeight, wcsTask.getHeight())
  110 + .gt(LocationType::getMaxWeight, wcsTask.getWidth());
  111 + List<LocationType> locationTypeList = locationTypeService.list(lambdaQueryWrapper);
  112 + List<String> codeList = new ArrayList<>();
  113 + for (LocationType locationType: locationTypeList) {
  114 + codeList.add(locationType.getCode());
  115 + }
  116 +
  117 + String locationCode = null;
  118 + //查询任务明细
  119 + LambdaQueryWrapper<TaskDetail> taskDetailLambda = Wrappers.lambdaQuery();
  120 + taskDetailLambda.eq(TaskDetail::getTaskId, wcsTask.getTaskNo());
  121 + List<TaskDetail> taskDetailList = taskDetailService.list(taskDetailLambda);
  122 +
  123 + List<ReceiptContainerDetail> receiptContainerDetailList = new ArrayList<>();
  124 + for (TaskDetail taskDetail : taskDetailList) {
  125 + receiptContainerDetailList.add(receiptContainerDetailService.getById(taskDetail.getAllocationId()));
  126 + }
  127 + //去重
  128 + receiptContainerDetailList = receiptContainerDetailList.stream().distinct().collect(Collectors.toList());
  129 +
  130 + for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) {
  131 + ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId());
  132 + String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则
  133 + if (StringUtils.isEmpty(locatingRule)){
  134 + locatingRule = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule();
  135 + //入库单明细定位规则不为空时执行
  136 + if (StringUtils.isEmpty(locatingRule)){
  137 + //入库单明细为空时,查询物料表中是否含有定位规则
  138 + LambdaQueryWrapper<Material> materialLambda = Wrappers.lambdaQuery();
  139 + materialLambda.eq(Material::getCode, receiptContainerDetail.getMaterialCode());
  140 + Material material = materialService.getOne(materialLambda);
  141 + locatingRule = material.getLocatingRule();
  142 +
  143 + if (StringUtils.isEmpty(locatingRule)){
  144 + //物料表中定位规则为空时,查询物料类别
  145 + LambdaQueryWrapper<MaterialType> materialTypeLambda = Wrappers.lambdaQuery();
  146 + materialTypeLambda.eq(MaterialType::getCode, material.getType());
  147 + MaterialType materialType = materialTypeService.getOne(materialTypeLambda);
  148 + locatingRule = materialType.getLocatingRule();
  149 + if (StringUtils.isEmpty(locatingRule)){
  150 + //物料类别中定位规则为空时,查询入库首选项
  151 + LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery();
  152 + configValueLambda.eq(ConfigValue::getWarehouseCode, ShiroUtils.getWarehouseCode())
  153 + .eq(ConfigValue::getModuleType, "receipt")
  154 + .eq(ConfigValue::getRecordType, "入库首选项");
  155 + ConfigValue configValue = configValueService.getOne(configValueLambda);
  156 + LambdaQueryWrapper<ReceiptPreference> receiptPreferenceLambda = Wrappers.lambdaQuery();
  157 + receiptPreferenceLambda.eq(ReceiptPreference::getCode, configValue.getValue());
  158 + ReceiptPreference receiptPreference = receiptPreferenceService.getOne(receiptPreferenceLambda);
  159 + locatingRule = receiptPreferenceService.getOne(receiptPreferenceLambda).getLocationRule();
  160 + }
  161 + }
  162 + }
  163 +
  164 + }
  165 + //通过定位规则查找自定义sql
  166 + if (StringUtils.isEmpty(locatingRule)){
  167 + throw new ServiceException("未绑定定位规则");
  168 + }
  169 +
  170 + LambdaQueryWrapper<FilterConfigDetail> filterConfigDetailLambda = Wrappers.lambdaQuery();
  171 + filterConfigDetailLambda.eq(FilterConfigDetail::getCode, locatingRule);
  172 + FilterConfigDetail filterConfigDetail = filterConfigDetailService.getOne(filterConfigDetailLambda);
  173 +
  174 + String[] locatingRules = filterConfigDetail.getStatement().split("limit");
  175 +
  176 + //根据定位规则查询库位编码
  177 + LambdaQueryWrapper<Location> locationLambda = Wrappers.lambdaQuery();
  178 + locationLambda.last(locatingRules[0]);
  179 + List<Location> locationList = locationService.list(locationLambda);
  180 +// locationList.stream().filter(location -> location.getLocationType().equals(locationTypeList.get(0)));
  181 + locationCode = filter(locationList, locationTypeList);
  182 + if (StringUtils.isEmpty(locationCode)){
  183 + throw new ServiceException("没有库位可分配");
  184 + }
  185 +
  186 + if (StringUtils.isNotEmpty(locationCode)){
  187 + locationService.updateStatus(locationCode, "lock");
  188 + } else {
  189 + throw new ServiceException("定位失败,请检查定位规则是否正确");
  190 + }
45 191
  192 + //更新库位编码到组盘头表
  193 + receiptContainerHeader.setToLocation(locationCode);
  194 + if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){
  195 + throw new ServiceException("更新库位失败");
  196 + }
  197 +
  198 + //把库位编码赋到该入库组盘头表下的所有明细
  199 + LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery();
  200 + lambda.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerHeader.getId());
  201 + List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lambda);
  202 + for (ReceiptContainerDetail receiptContainerDetail2: receiptContainerDetails) {
  203 + receiptContainerDetail2.setLocationCode(locationCode);
  204 + if (!receiptContainerDetailService.updateById(receiptContainerDetail2)){throw new ServiceException("更新库位编码到入库组盘明细");}
  205 + }
  206 +
  207 + }
  208 + if (StringUtils.isNotEmpty(locationCode)){
  209 + //修改任务明细目标库位
  210 + for (TaskDetail taskDetail : taskDetailList) {
  211 + taskDetail.setToLocation(locationCode);
  212 + if (!taskDetailService.updateById(taskDetail)){ throw new ServiceException("更新任务明细目标库位失败");}
  213 + }
  214 +
  215 + TaskHeader taskHeader = taskHeaderService.getById(wcsTask.getTaskNo());
  216 +
  217 + taskHeader.setToLocation(locationCode);
  218 + if (!taskHeaderService.updateById(taskHeader)){throw new ServiceException("更新任务头表目标库位失败");}
  219 + WcsTask wcsTaskResult = new WcsTask();
  220 + wcsTaskResult.setToLocationCode(locationCode);
  221 + return AjaxResult.success(wcsTaskResult);
  222 + }
  223 +
  224 + return AjaxResult.error("错误");
  225 + }
  226 +
  227 + /**
  228 + * 库位筛选
  229 + * @param locationList
  230 + * @param locationTypeList
  231 + * @return
  232 + */
  233 + public String filter(List<Location> locationList, List<LocationType> locationTypeList){
  234 + String locationCode = null;
  235 + for (Location location: locationList){
  236 + for (LocationType locationType: locationTypeList) {
  237 + if (location.getLocationType().equals(locationType.getCode())){
  238 + locationCode = location.getCode();
  239 + return locationCode;
  240 + }
  241 + }
  242 + }
46 return null; 243 return null;
47 } 244 }
48 } 245 }
src/main/java/com/huaheng/pc/config/station/controller/stationController.java 0 → 100644
  1 +package com.huaheng.pc.config.station.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.metadata.IPage;
  5 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  6 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  7 +import com.huaheng.common.support.Convert;
  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.domain.AjaxResult;
  14 +import com.huaheng.framework.web.page.PageDomain;
  15 +import com.huaheng.framework.web.page.TableDataInfo;
  16 +import com.huaheng.framework.web.page.TableSupport;
  17 +import com.huaheng.pc.config.station.domain.Station;
  18 +import com.huaheng.pc.config.station.service.StationService;
  19 +import io.swagger.annotations.ApiParam;
  20 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  21 +import org.springframework.stereotype.Controller;
  22 +import org.springframework.ui.ModelMap;
  23 +import org.springframework.web.bind.annotation.*;
  24 +
  25 +import javax.annotation.Resource;
  26 +import java.util.ArrayList;
  27 +import java.util.Arrays;
  28 +import java.util.List;
  29 +
  30 +/**
  31 + * Created by Enzo Cotter on 2019/10/14.
  32 + */
  33 +@Controller
  34 +@RequestMapping("/config/station")
  35 +public class stationController extends BaseController {
  36 +
  37 + @Resource
  38 + private StationService stationService;
  39 +
  40 + private String prefix = "config/station";
  41 +
  42 + @RequiresPermissions("config:station:view")
  43 + @GetMapping()
  44 + public String station() {
  45 + return prefix + "/station";
  46 + }
  47 +
  48 + /**
  49 + * 查询出库类型
  50 + */
  51 + @RequiresPermissions("config:station:list")
  52 + @Log(title = "配置-站台",operating = "站台列表", action = BusinessType.GRANT)
  53 + @PostMapping("/list")
  54 + @ResponseBody
  55 + public TableDataInfo list(@ApiParam(name="shipmentType",value="编码、类型") Station station,
  56 + @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin,
  57 + @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) {
  58 + LambdaQueryWrapper<Station> lambdaQueryWrapper = Wrappers.lambdaQuery();
  59 + PageDomain pageDomain = TableSupport.buildPageRequest();
  60 + Integer pageNum = pageDomain.getPageNum();
  61 + Integer pageSize = pageDomain.getPageSize();
  62 + lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), Station::getCreated, createdBegin)
  63 + .lt(StringUtils.isNotEmpty(createdEnd), Station::getCreated, createdEnd)
  64 + .eq(StringUtils.isNotEmpty(station.getCode()), Station::getCode, station.getCode())
  65 + .eq(StringUtils.isNotEmpty(station.getType()), Station::getType, station.getType())
  66 + .eq(Station::getWarehouseCode, ShiroUtils.getWarehouseCode());
  67 +
  68 + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
  69 + /*使用分页查询*/
  70 + Page<Station> page = new Page<>(pageNum, pageSize);
  71 + IPage<Station> iPage = stationService.page(page, lambdaQueryWrapper);
  72 + return getMpDataTable(iPage.getRecords(), iPage.getTotal());
  73 + } else {
  74 + List<Station> list = stationService.list(lambdaQueryWrapper);
  75 + return getDataTable(list);
  76 + }
  77 + }
  78 +
  79 + /**
  80 + * 新增站台
  81 + */
  82 + @GetMapping("/add")
  83 + public String add() {
  84 + return prefix + "/add";
  85 + }
  86 +
  87 + /**
  88 + * 新增保存站台
  89 + */
  90 + @RequiresPermissions("config:station:add")
  91 + @Log(title = "配置-站台",operating = "新增站台", action = BusinessType.INSERT)
  92 + @PostMapping("/add")
  93 + @ResponseBody
  94 + public AjaxResult addSave(Station station) {
  95 + station.setWarehouseCode(ShiroUtils.getWarehouseCode());
  96 + return toAjax(stationService.save(station));
  97 + }
  98 +
  99 + /**
  100 + * 修改站台
  101 + */
  102 + @GetMapping("/edit/{id}")
  103 + public String edit(@PathVariable("id") Integer id, ModelMap mmap) {
  104 + Station station = stationService.getById(id);
  105 + mmap.put("station", station);
  106 + return prefix + "/edit";
  107 + }
  108 +
  109 + /**
  110 + * 修改保存站台
  111 + */
  112 + @RequiresPermissions("config:station:edit")
  113 + @Log(title = "配置-站台",operating = "修改站台", action = BusinessType.UPDATE)
  114 + @PostMapping("/edit")
  115 + @ResponseBody
  116 + public AjaxResult editSave(Station station) {
  117 + station.setLastUpdatedBy(ShiroUtils.getLoginName());
  118 + return toAjax(stationService.updateById(station));
  119 + }
  120 +
  121 + /**
  122 + * 删除出库
  123 + */
  124 + @RequiresPermissions("config:station:remove")
  125 + @Log(title = "配置-站台",operating = "删除站台", action = BusinessType.DELETE)
  126 + @PostMapping( "/remove")
  127 + @ResponseBody
  128 + public AjaxResult remove(String ids) {
  129 + if (StringUtils.isEmpty(ids)) {
  130 + return AjaxResult.error("id不能为空");
  131 + }
  132 + List<Integer> list = new ArrayList<>(Arrays.asList(Convert.toIntArray(ids)));
  133 + return toAjax(stationService.removeByIds(list));
  134 + }
  135 +
  136 +}
src/main/java/com/huaheng/pc/config/station/domain/Station.java
@@ -30,6 +30,13 @@ public class Station implements Serializable { @@ -30,6 +30,13 @@ public class Station implements Serializable {
30 private String code; 30 private String code;
31 31
32 /** 32 /**
  33 + * 类型
  34 + */
  35 + @TableField(value = "type")
  36 + @ApiModelProperty(value="类型")
  37 + private String type;
  38 +
  39 + /**
33 * 状态 40 * 状态
34 */ 41 */
35 @TableField(value = "status") 42 @TableField(value = "status")
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/domain/ReceiptContainerHeader.java
@@ -6,11 +6,14 @@ import com.baomidou.mybatisplus.annotation.TableId; @@ -6,11 +6,14 @@ import com.baomidou.mybatisplus.annotation.TableId;
6 import com.baomidou.mybatisplus.annotation.TableName; 6 import com.baomidou.mybatisplus.annotation.TableName;
7 import io.swagger.annotations.ApiModel; 7 import io.swagger.annotations.ApiModel;
8 import io.swagger.annotations.ApiModelProperty; 8 import io.swagger.annotations.ApiModelProperty;
  9 +import lombok.Data;
  10 +
9 import java.io.Serializable; 11 import java.io.Serializable;
10 import java.util.Date; 12 import java.util.Date;
11 13
12 @ApiModel(value="com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader") 14 @ApiModel(value="com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader")
13 @TableName(value = "receipt_container_header") 15 @TableName(value = "receipt_container_header")
  16 +@Data
14 public class ReceiptContainerHeader implements Serializable { 17 public class ReceiptContainerHeader implements Serializable {
15 /** 18 /**
16 * ID 19 * ID
@@ -208,563 +211,13 @@ public class ReceiptContainerHeader implements Serializable { @@ -208,563 +211,13 @@ public class ReceiptContainerHeader implements Serializable {
208 @ApiModelProperty(value="状态") 211 @ApiModelProperty(value="状态")
209 private Short status; 212 private Short status;
210 213
211 - private static final long serialVersionUID = 1L;  
212 -  
213 - public static final String COL_WAREHOUSECODE = "warehouseCode";  
214 -  
215 - public static final String COL_COMPANYCODE = "companyCode";  
216 -  
217 - public static final String COL_CONTAINERCODE = "containerCode";  
218 -  
219 - public static final String COL_CONTAINERTYPE = "containerType";  
220 -  
221 - public static final String COL_TASKTYPE = "taskType";  
222 -  
223 - public static final String COL_WEIGHT = "weight";  
224 -  
225 - public static final String COL_PROJECTNO = "projectNo";  
226 -  
227 - public static final String COL_LOCATINGRULE = "locatingRule";  
228 -  
229 - public static final String COL_FROMLOCATION = "fromLocation";  
230 -  
231 - public static final String COL_TOLOCATION = "toLocation";  
232 -  
233 - public static final String COL_WAVEID = "waveId";  
234 -  
235 - public static final String COL_TASKCREATED = "taskCreated";  
236 -  
237 - public static final String COL_CREATED = "created";  
238 -  
239 - public static final String COL_CREATEDBY = "createdBy";  
240 -  
241 - public static final String COL_LASTUPDATED = "lastUpdated";  
242 -  
243 - public static final String COL_LASTUPDATEDBY = "lastUpdatedBy";  
244 -  
245 - public static final String COL_VERSION = "version";  
246 -  
247 - public static final String COL_USERDEF1 = "userDef1";  
248 -  
249 - public static final String COL_USERDEF2 = "userDef2";  
250 -  
251 - public static final String COL_USERDEF3 = "userDef3";  
252 -  
253 - public static final String COL_USERDEF4 = "userDef4";  
254 -  
255 - public static final String COL_USERDEF5 = "userDef5";  
256 -  
257 - public static final String COL_USERDEF6 = "userDef6";  
258 -  
259 - public static final String COL_USERDEF7 = "userDef7";  
260 -  
261 - public static final String COL_USERDEF8 = "userDef8";  
262 -  
263 - public static final String COL_PROCESSSTAMP = "processStamp";  
264 -  
265 - public static final String COL_STATUS = "status";  
266 -  
267 - /**  
268 - * 获取ID  
269 - *  
270 - * @return id - ID  
271 - */  
272 - public Integer getId() {  
273 - return this.id;  
274 - }  
275 -  
276 - /**  
277 - * 设置ID  
278 - *  
279 - * @param id ID  
280 - */  
281 - public void setId(Integer id) {  
282 - this.id = id;  
283 - }  
284 -  
285 - /**  
286 - * 获取仓库  
287 - *  
288 - * @return warehouseCode - 仓库  
289 - */  
290 - public String getWarehouseCode() {  
291 - return warehouseCode;  
292 - }  
293 -  
294 - /**  
295 - * 设置仓库  
296 - *  
297 - * @param warehouseCode 仓库  
298 - */  
299 - public void setWarehouseCode(String warehouseCode) {  
300 - this.warehouseCode = warehouseCode;  
301 - }  
302 -  
303 - /**  
304 - * 获取货主  
305 - *  
306 - * @return companyCode - 货主  
307 - */  
308 - public String getCompanyCode() {  
309 - return companyCode;  
310 - }  
311 -  
312 - /**  
313 - * 设置货主  
314 - *  
315 - * @param companyCode 货主  
316 - */  
317 - public void setCompanyCode(String companyCode) {  
318 - this.companyCode = companyCode;  
319 - }  
320 -  
321 - /**  
322 - * 获取容器号  
323 - *  
324 - * @return containerCode - 容器号  
325 - */  
326 - public String getContainerCode() {  
327 - return containerCode;  
328 - }  
329 -  
330 - /**  
331 - * 设置容器号  
332 - *  
333 - * @param containerCode 容器号  
334 - */  
335 - public void setContainerCode(String containerCode) {  
336 - this.containerCode = containerCode;  
337 - }  
338 -  
339 - /**  
340 - * 获取容器类型  
341 - *  
342 - * @return containerType - 容器类型  
343 - */  
344 - public String getContainerType() {  
345 - return containerType;  
346 - }  
347 -  
348 - /**  
349 - * 设置容器类型  
350 - *  
351 - * @param containerType 容器类型  
352 - */  
353 - public void setContainerType(String containerType) {  
354 - this.containerType = containerType;  
355 - }  
356 -  
357 - /**  
358 - * 获取任务类型  
359 - *  
360 - * @return taskType - 任务类型  
361 - */  
362 - public String getTaskType() {  
363 - return taskType;  
364 - }  
365 -  
366 - /**  
367 - * 设置任务类型  
368 - *  
369 - * @param taskType 任务类型  
370 - */  
371 - public void setTaskType(String taskType) {  
372 - this.taskType = taskType;  
373 - }  
374 -  
375 - /**  
376 - * 获取重量  
377 - *  
378 - * @return weight - 重量  
379 - */  
380 - public String getWeight() {  
381 - return weight;  
382 - }  
383 -  
384 - /**  
385 - * 设置重量  
386 - *  
387 - * @param weight 重量  
388 - */  
389 - public void setWeight(String weight) {  
390 - this.weight = weight;  
391 - }  
392 -  
393 - /**  
394 - * 获取项目号  
395 - *  
396 - * @return projectNo - 项目号  
397 - */  
398 - public String getProjectNo() {  
399 - return projectNo;  
400 - }  
401 -  
402 - /**  
403 - * 设置项目号  
404 - *  
405 - * @param projectNo 项目号  
406 - */  
407 - public void setProjectNo(String projectNo) {  
408 - this.projectNo = projectNo;  
409 - }  
410 -  
411 - /**  
412 - * 获取定位规则  
413 - *  
414 - * @return locatingRule - 定位规则  
415 - */  
416 - public String getLocatingRule() {  
417 - return locatingRule;  
418 - }  
419 -  
420 - /**  
421 - * 设置定位规则  
422 - *  
423 - * @param locatingRule 定位规则  
424 - */  
425 - public void setLocatingRule(String locatingRule) {  
426 - this.locatingRule = locatingRule;  
427 - }  
428 -  
429 - /**  
430 - * 获取从库位  
431 - *  
432 - * @return fromLocation - 从库位  
433 - */  
434 - public String getFromLocation() {  
435 - return fromLocation;  
436 - }  
437 -  
438 - /**  
439 - * 设置从库位  
440 - *  
441 - * @param fromLocation 从库位  
442 - */  
443 - public void setFromLocation(String fromLocation) {  
444 - this.fromLocation = fromLocation;  
445 - }  
446 -  
447 - /**  
448 - * 获取目标库位  
449 - *  
450 - * @return toLocation - 目标库位  
451 - */  
452 - public String getToLocation() {  
453 - return toLocation;  
454 - }  
455 -  
456 - /**  
457 - * 设置目标库位  
458 - *  
459 - * @param toLocation 目标库位  
460 - */  
461 - public void setToLocation(String toLocation) {  
462 - this.toLocation = toLocation;  
463 - }  
464 -  
465 - /**  
466 - * 获取波次号  
467 - *  
468 - * @return waveId - 波次号  
469 - */  
470 - public Integer getWaveId() {  
471 - return waveId;  
472 - }  
473 -  
474 /** 214 /**
475 - * 设置波次号  
476 - *  
477 - * @param waveId 波次号 215 + * 站台
478 */ 216 */
479 - public void setWaveId(Integer waveId) {  
480 - this.waveId = waveId;  
481 - } 217 + @TableField(value = "recvDock")
  218 + @ApiModelProperty(value="站台")
  219 + private String recvDock;
482 220
483 - /**  
484 - * 获取任务已创建  
485 - *  
486 - * @return taskCreated - 任务已创建  
487 - */  
488 - public Integer getTaskCreated() {  
489 - return taskCreated;  
490 - }  
491 -  
492 - /**  
493 - * 设置任务已创建  
494 - *  
495 - * @param taskCreated 任务已创建  
496 - */  
497 - public void setTaskCreated(Integer taskCreated) {  
498 - this.taskCreated = taskCreated;  
499 - }  
500 -  
501 - /**  
502 - * 获取创建时间  
503 - *  
504 - * @return created - 创建时间  
505 - */  
506 - public Date getCreated() {  
507 - return created;  
508 - }  
509 -  
510 - /**  
511 - * 设置创建时间  
512 - *  
513 - * @param created 创建时间  
514 - */  
515 - public void setCreated(Date created) {  
516 - this.created = created;  
517 - }  
518 -  
519 - /**  
520 - * 获取创建用户  
521 - *  
522 - * @return createdBy - 创建用户  
523 - */  
524 - public String getCreatedBy() {  
525 - return createdBy;  
526 - }  
527 -  
528 - /**  
529 - * 设置创建用户  
530 - *  
531 - * @param createdBy 创建用户  
532 - */  
533 - public void setCreatedBy(String createdBy) {  
534 - this.createdBy = createdBy;  
535 - }  
536 -  
537 - /**  
538 - * 获取创建时间  
539 - *  
540 - * @return lastUpdated - 创建时间  
541 - */  
542 - public Date getLastUpdated() {  
543 - return lastUpdated;  
544 - }  
545 -  
546 - /**  
547 - * 设置创建时间  
548 - *  
549 - * @param lastUpdated 创建时间  
550 - */  
551 - public void setLastUpdated(Date lastUpdated) {  
552 - this.lastUpdated = lastUpdated;  
553 - }  
554 -  
555 - /**  
556 - * 获取更新用户  
557 - *  
558 - * @return lastUpdatedBy - 更新用户  
559 - */  
560 - public String getLastUpdatedBy() {  
561 - return lastUpdatedBy;  
562 - }  
563 -  
564 - /**  
565 - * 设置更新用户  
566 - *  
567 - * @param lastUpdatedBy 更新用户  
568 - */  
569 - public void setLastUpdatedBy(String lastUpdatedBy) {  
570 - this.lastUpdatedBy = lastUpdatedBy;  
571 - }  
572 -  
573 - /**  
574 - * 获取数据版本  
575 - *  
576 - * @return version - 数据版本  
577 - */  
578 - public Integer getVersion() {  
579 - return version;  
580 - }  
581 -  
582 - /**  
583 - * 设置数据版本  
584 - *  
585 - * @param version 数据版本  
586 - */  
587 - public void setVersion(Integer version) {  
588 - this.version = version;  
589 - }  
590 -  
591 - /**  
592 - * 获取自定义字段1  
593 - *  
594 - * @return userDef1 - 自定义字段1  
595 - */  
596 - public String getUserDef1() {  
597 - return userDef1;  
598 - }  
599 -  
600 - /**  
601 - * 设置自定义字段1  
602 - *  
603 - * @param userDef1 自定义字段1  
604 - */  
605 - public void setUserDef1(String userDef1) {  
606 - this.userDef1 = userDef1;  
607 - }  
608 -  
609 - /**  
610 - * 获取自定义字段2  
611 - *  
612 - * @return userDef2 - 自定义字段2  
613 - */  
614 - public String getUserDef2() {  
615 - return userDef2;  
616 - }  
617 -  
618 - /**  
619 - * 设置自定义字段2  
620 - *  
621 - * @param userDef2 自定义字段2  
622 - */  
623 - public void setUserDef2(String userDef2) {  
624 - this.userDef2 = userDef2;  
625 - }  
626 -  
627 - /**  
628 - * 获取自定义字段3  
629 - *  
630 - * @return userDef3 - 自定义字段3  
631 - */  
632 - public String getUserDef3() {  
633 - return userDef3;  
634 - }  
635 -  
636 - /**  
637 - * 设置自定义字段3  
638 - *  
639 - * @param userDef3 自定义字段3  
640 - */  
641 - public void setUserDef3(String userDef3) {  
642 - this.userDef3 = userDef3;  
643 - }  
644 -  
645 - /**  
646 - * 获取自定义字段4  
647 - *  
648 - * @return userDef4 - 自定义字段4  
649 - */  
650 - public String getUserDef4() {  
651 - return userDef4;  
652 - }  
653 -  
654 - /**  
655 - * 设置自定义字段4  
656 - *  
657 - * @param userDef4 自定义字段4  
658 - */  
659 - public void setUserDef4(String userDef4) {  
660 - this.userDef4 = userDef4;  
661 - }  
662 -  
663 - /**  
664 - * 获取自定义字段5  
665 - *  
666 - * @return userDef5 - 自定义字段5  
667 - */  
668 - public String getUserDef5() {  
669 - return userDef5;  
670 - }  
671 -  
672 - /**  
673 - * 设置自定义字段5  
674 - *  
675 - * @param userDef5 自定义字段5  
676 - */  
677 - public void setUserDef5(String userDef5) {  
678 - this.userDef5 = userDef5;  
679 - }  
680 -  
681 - /**  
682 - * 获取自定义字段6  
683 - *  
684 - * @return userDef6 - 自定义字段6  
685 - */  
686 - public String getUserDef6() {  
687 - return userDef6;  
688 - }  
689 -  
690 - /**  
691 - * 设置自定义字段6  
692 - *  
693 - * @param userDef6 自定义字段6  
694 - */  
695 - public void setUserDef6(String userDef6) {  
696 - this.userDef6 = userDef6;  
697 - }  
698 -  
699 - /**  
700 - * 获取自定义字段7  
701 - *  
702 - * @return userDef7 - 自定义字段7  
703 - */  
704 - public String getUserDef7() {  
705 - return userDef7;  
706 - }  
707 -  
708 - /**  
709 - * 设置自定义字段7  
710 - *  
711 - * @param userDef7 自定义字段7  
712 - */  
713 - public void setUserDef7(String userDef7) {  
714 - this.userDef7 = userDef7;  
715 - }  
716 -  
717 - /**  
718 - * 获取自定义字段8  
719 - *  
720 - * @return userDef8 - 自定义字段8  
721 - */  
722 - public String getUserDef8() {  
723 - return userDef8;  
724 - }  
725 -  
726 - /**  
727 - * 设置自定义字段8  
728 - *  
729 - * @param userDef8 自定义字段8  
730 - */  
731 - public void setUserDef8(String userDef8) {  
732 - this.userDef8 = userDef8;  
733 - }  
734 -  
735 - /**  
736 - * 获取处理标记  
737 - *  
738 - * @return processStamp - 处理标记  
739 - */  
740 - public String getProcessStamp() {  
741 - return processStamp;  
742 - }  
743 -  
744 - /**  
745 - * 设置处理标记  
746 - *  
747 - * @param processStamp 处理标记  
748 - */  
749 - public void setProcessStamp(String processStamp) {  
750 - this.processStamp = processStamp;  
751 - }  
752 -  
753 - /**  
754 - * 获取状态  
755 - *  
756 - * @return status - 状态  
757 - */  
758 - public Short getStatus() {  
759 - return status;  
760 - } 221 + private static final long serialVersionUID = 1L;
761 222
762 - /**  
763 - * 设置状态  
764 - *  
765 - * @param status 状态  
766 - */  
767 - public void setStatus(Short status) {  
768 - this.status = status;  
769 - }  
770 } 223 }
771 \ No newline at end of file 224 \ No newline at end of file
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
@@ -26,6 +26,7 @@ import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService; @@ -26,6 +26,7 @@ import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
26 import com.huaheng.pc.system.config.domain.Config; 26 import com.huaheng.pc.system.config.domain.Config;
27 import com.huaheng.pc.system.dict.domain.DictData; 27 import com.huaheng.pc.system.dict.domain.DictData;
28 import com.huaheng.pc.system.dict.service.IDictDataService; 28 import com.huaheng.pc.system.dict.service.IDictDataService;
  29 +import io.swagger.models.auth.In;
29 import org.aspectj.weaver.loadtime.Aj; 30 import org.aspectj.weaver.loadtime.Aj;
30 import org.springframework.stereotype.Service; 31 import org.springframework.stereotype.Service;
31 import javax.annotation.Resource; 32 import javax.annotation.Resource;
@@ -296,13 +297,18 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R @@ -296,13 +297,18 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
296 //查询出头表信息 297 //查询出头表信息
297 ReceiptHeader receiptHeader = receiptHeaderService.getById(id); 298 ReceiptHeader receiptHeader = receiptHeaderService.getById(id);
298 Integer minStatus = Integer.parseInt(receiptDetails.get(0).getProcessStamp()); 299 Integer minStatus = Integer.parseInt(receiptDetails.get(0).getProcessStamp());
  300 + Integer maxStatus = Integer.parseInt(receiptDetails.get(0).getProcessStamp());
299 //遍历明细状态得出最小状态值 301 //遍历明细状态得出最小状态值
300 for (int i = 1; i<receiptDetails.size(); i++){ 302 for (int i = 1; i<receiptDetails.size(); i++){
301 - if ( minStatus > Integer.parseInt(receiptDetails.get(1).getProcessStamp())) {  
302 - minStatus = Integer.parseInt(receiptDetails.get(1).getProcessStamp()); 303 + if ( minStatus > Integer.parseInt(receiptDetails.get(i).getProcessStamp())) {
  304 + minStatus = Integer.parseInt(receiptDetails.get(i).getProcessStamp());
  305 + }
  306 + if ( maxStatus < Integer.parseInt(receiptDetails.get(i).getProcessStamp())) {
  307 + maxStatus = Integer.parseInt(receiptDetails.get(i).getProcessStamp());
303 } 308 }
304 } 309 }
305 310
  311 +
306 //从数据字典中获取单据当前状态 312 //从数据字典中获取单据当前状态
307 List<DictData> dictData = dictDataService.selectDictDataByType("receiptHeaderStatus"); 313 List<DictData> dictData = dictDataService.selectDictDataByType("receiptHeaderStatus");
308 for (int i = 0; i<dictData.size(); i++){ 314 for (int i = 0; i<dictData.size(); i++){
@@ -314,8 +320,8 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R @@ -314,8 +320,8 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
314 //若更新状态值小于头状态,更新尾状态否则更新头尾状态 320 //若更新状态值小于头状态,更新尾状态否则更新头尾状态
315 if (minStatus < receiptHeader.getFirstStatus()){ 321 if (minStatus < receiptHeader.getFirstStatus()){
316 receiptHeader.setLastStatus(minStatus); 322 receiptHeader.setLastStatus(minStatus);
317 - } else {  
318 - receiptHeader.setFirstStatus(minStatus); 323 + } if (maxStatus > receiptHeader.getFirstStatus()){
  324 + receiptHeader.setFirstStatus(maxStatus);
319 receiptHeader.setLastStatus(minStatus); 325 receiptHeader.setLastStatus(minStatus);
320 receiptHeaderService.updateById(receiptHeader); 326 receiptHeaderService.updateById(receiptHeader);
321 } 327 }
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
@@ -90,9 +90,7 @@ public class ReceivingService { @@ -90,9 +90,7 @@ public class ReceivingService {
90 //如果入库组盘表中有目标库位说明已经指定 90 //如果入库组盘表中有目标库位说明已经指定
91 if (StringUtils.isNotEmpty(receiptContainerHeader.getToLocation())){return true;} 91 if (StringUtils.isNotEmpty(receiptContainerHeader.getToLocation())){return true;}
92 String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则 92 String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则
93 - if (StringUtils.isNotEmpty(locatingRule)){  
94 - //入库组盘头表中定位规则不为空时执行  
95 - } else if (locatingRule == null){ 93 + if (StringUtils.isEmpty(locatingRule)){
96 locatingRule = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule(); 94 locatingRule = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()).getLocatingRule();
97 //入库单明细定位规则不为空时执行 95 //入库单明细定位规则不为空时执行
98 if (StringUtils.isEmpty(locatingRule)){ 96 if (StringUtils.isEmpty(locatingRule)){
@@ -147,6 +145,7 @@ public class ReceivingService { @@ -147,6 +145,7 @@ public class ReceivingService {
147 145
148 //更新库位编码到组盘头表 146 //更新库位编码到组盘头表
149 receiptContainerHeader.setToLocation(locationCode); 147 receiptContainerHeader.setToLocation(locationCode);
  148 + receiptContainerHeader.setRecvDock("0");
150 if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){ 149 if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){
151 throw new ServiceException("更新库位失败"); 150 throw new ServiceException("更新库位失败");
152 } 151 }
src/main/java/com/huaheng/pc/task/taskHeader/domain/TaskHeader.java
@@ -294,5 +294,12 @@ public class TaskHeader implements Serializable { @@ -294,5 +294,12 @@ public class TaskHeader implements Serializable {
294 @ApiModelProperty(value="处理标记") 294 @ApiModelProperty(value="处理标记")
295 private String processStamp; 295 private String processStamp;
296 296
  297 + /**
  298 + * 站台
  299 + */
  300 + @TableField(value = "recvDock")
  301 + @ApiModelProperty(value="站台")
  302 + private String recvDock;
  303 +
297 private static final long serialVersionUID = 1L; 304 private static final long serialVersionUID = 1L;
298 } 305 }
299 \ No newline at end of file 306 \ No newline at end of file
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
@@ -407,8 +407,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -407,8 +407,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
407 // } 407 // }
408 // } 408 // }
409 409
410 - //给wcs传递任务  
411 -// taskAssignService.wcsTaskAssign(task); 410 +// 给wcs传递任务
  411 + taskAssignService.wcsTaskAssign(task);
412 } 412 }
413 return AjaxResult.success("执行下发任务成功", task); 413 return AjaxResult.success("执行下发任务成功", task);
414 } 414 }
@@ -1141,6 +1141,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1141,6 +1141,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1141 task.setFromLocation(receiptContainerHeader.getFromLocation()); 1141 task.setFromLocation(receiptContainerHeader.getFromLocation());
1142 task.setToLocation(receiptContainerHeader.getToLocation()); 1142 task.setToLocation(receiptContainerHeader.getToLocation());
1143 task.setContainerCode(receiptContainerHeader.getContainerCode()); 1143 task.setContainerCode(receiptContainerHeader.getContainerCode());
  1144 + task.setRecvDock(receiptContainerHeader.getRecvDock());
1144 task.setCreated(new Date()); 1145 task.setCreated(new Date());
1145 task.setCreatedBy(ShiroUtils.getLoginName()); 1146 task.setCreatedBy(ShiroUtils.getLoginName());
1146 if (this.save(task)){ 1147 if (this.save(task)){
@@ -1151,6 +1152,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1151,6 +1152,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1151 taskDetail.setTaskType(Integer.valueOf(receiptContainerHeaderService.getById(item.getReceiptContainerId()).getTaskType())); 1152 taskDetail.setTaskType(Integer.valueOf(receiptContainerHeaderService.getById(item.getReceiptContainerId()).getTaskType()));
1152 taskDetail.setInternalTaskType(100); 1153 taskDetail.setInternalTaskType(100);
1153 taskDetail.setWarehouseCode(task.getWarehouseCode()); 1154 taskDetail.setWarehouseCode(task.getWarehouseCode());
  1155 + taskDetail.setAllocationId(item.getReceiptId());
1154 taskDetail.setCompanyCode(task.getCompanyCode()); 1156 taskDetail.setCompanyCode(task.getCompanyCode());
1155 taskDetail.setCompanyCode(task.getCompanyCode()); 1157 taskDetail.setCompanyCode(task.getCompanyCode());
1156 taskDetail.setMaterialCode(item.getMaterialCode()); 1158 taskDetail.setMaterialCode(item.getMaterialCode());
@@ -1174,12 +1176,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1174,12 +1176,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1174 } 1176 }
1175 1177
1176 ReceiptDetail receiptDetail = receiptDetailService.getById(item.getReceiptDetailId()); 1178 ReceiptDetail receiptDetail = receiptDetailService.getById(item.getReceiptDetailId());
1177 - if ("300".equals(receiptDetail.getProcessStamp())){  
1178 - ReceiptDetail detail = receiptDetailService.queryflow(receiptDetail);  
1179 - if (!receiptDetailService.updateById(detail)){  
1180 - throw new ServiceException("更新入库单详情失败");  
1181 - } 1179 +
  1180 + ReceiptDetail detail = receiptDetailService.queryflow(receiptDetail);
  1181 + if (!receiptDetailService.updateById(detail)){
  1182 + throw new ServiceException("更新入库单详情失败");
1182 } 1183 }
  1184 + //更新头表状态
  1185 + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId());
  1186 +
1183 } 1187 }
1184 } else { 1188 } else {
1185 throw new ServiceException("生成任务头表失败"); 1189 throw new ServiceException("生成任务头表失败");
src/main/resources/mybatis/config/StationMapper.xml
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 <id column="id" jdbcType="INTEGER" property="id" /> 7 <id column="id" jdbcType="INTEGER" property="id" />
8 <result column="code" jdbcType="VARCHAR" property="code" /> 8 <result column="code" jdbcType="VARCHAR" property="code" />
9 <result column="status" jdbcType="INTEGER" property="status" /> 9 <result column="status" jdbcType="INTEGER" property="status" />
  10 + <result column="code" jdbcType="VARCHAR" property="code" />
10 <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> 11 <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
11 <result column="created" jdbcType="TIMESTAMP" property="created" /> 12 <result column="created" jdbcType="TIMESTAMP" property="created" />
12 <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> 13 <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
@@ -15,6 +16,6 @@ @@ -15,6 +16,6 @@
15 </resultMap> 16 </resultMap>
16 <sql id="Base_Column_List"> 17 <sql id="Base_Column_List">
17 <!--@mbg.generated--> 18 <!--@mbg.generated-->
18 - id, code, `status`, warehouseCode, created, createdBy, lastUpdated, lastUpdatedBy 19 + id, code, `status`, type, warehouseCode, created, createdBy, lastUpdated, lastUpdatedBy
19 </sql> 20 </sql>
20 </mapper> 21 </mapper>
21 \ No newline at end of file 22 \ No newline at end of file
src/main/resources/mybatis/receipt/ReceiptContainerHeaderMapper.xml
@@ -31,12 +31,13 @@ @@ -31,12 +31,13 @@
31 <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> 31 <result column="userDef8" jdbcType="VARCHAR" property="userDef8" />
32 <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> 32 <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
33 <result column="status" jdbcType="SMALLINT" property="status" /> 33 <result column="status" jdbcType="SMALLINT" property="status" />
  34 + <result column="recvDock" jdbcType="VARCHAR" property="recvDock" />
34 </resultMap> 35 </resultMap>
35 <sql id="Base_Column_List"> 36 <sql id="Base_Column_List">
36 <!--@mbg.generated--> 37 <!--@mbg.generated-->
37 id, warehouseCode, companyCode, containerCode, containerType, taskType, weight, projectNo, 38 id, warehouseCode, companyCode, containerCode, containerType, taskType, weight, projectNo,
38 locatingRule, fromLocation, toLocation, waveId, taskCreated, created, createdBy, 39 locatingRule, fromLocation, toLocation, waveId, taskCreated, created, createdBy,
39 lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5, 40 lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5,
40 - userDef6, userDef7, userDef8, processStamp, `status` 41 + userDef6, userDef7, userDef8, processStamp, `status`, recvDock
41 </sql> 42 </sql>
42 </mapper> 43 </mapper>
43 \ No newline at end of file 44 \ No newline at end of file
src/main/resources/mybatis/task/TaskHeaderMapper.xml
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
41 <result column="userDef2" jdbcType="VARCHAR" property="userDef2"/> 41 <result column="userDef2" jdbcType="VARCHAR" property="userDef2"/>
42 <result column="userDef3" jdbcType="VARCHAR" property="userDef3"/> 42 <result column="userDef3" jdbcType="VARCHAR" property="userDef3"/>
43 <result column="processStamp" jdbcType="VARCHAR" property="processStamp"/> 43 <result column="processStamp" jdbcType="VARCHAR" property="processStamp"/>
  44 + <result column="recvDock" jdbcType="VARCHAR" property="recvDock" />
44 </resultMap> 45 </resultMap>
45 <select id="getReceiptTask" resultType="java.util.Map"> 46 <select id="getReceiptTask" resultType="java.util.Map">
46 SELECT rd.id receiptDetailId,rd.receiptId,td.taskId, td.warehouseCode, td.id taskDetailId, td.status, 47 SELECT rd.id receiptDetailId,rd.receiptId,td.taskId, td.warehouseCode, td.id taskDetailId, td.status,
src/main/resources/templates/config/configValue/add.html
@@ -9,13 +9,17 @@ @@ -9,13 +9,17 @@
9 <div class="form-group"> 9 <div class="form-group">
10 <label class="col-sm-3 control-label">模块:</label> 10 <label class="col-sm-3 control-label">模块:</label>
11 <div class="col-sm-8"> 11 <div class="col-sm-8">
12 - <input id="moduleType" name="moduleType" class="form-control" type="text"> 12 + <select id="moduleType" name="moduleType" class="form-control" th:with="moduleTypeList=${@dict.getType('moduleType')}">
  13 + <option th:each="moduleType : ${moduleTypeList}" th:text="${moduleType['dictLabel']}" th:value="${moduleType['dictValue']}"></option>
  14 + </select>
13 </div> 15 </div>
14 </div> 16 </div>
15 <div class="form-group"> 17 <div class="form-group">
16 <label class="col-sm-3 control-label">类型:</label> 18 <label class="col-sm-3 control-label">类型:</label>
17 <div class="col-sm-8"> 19 <div class="col-sm-8">
18 - <input id="recordType" name="recordType" class="form-control" type="text"> 20 + <select id="recordType" name="recordType" class="form-control" th:with="moduleTypeList=${@dict.getType('recordType')}">
  21 + <option th:each="moduleType : ${moduleTypeList}" th:text="${moduleType['dictLabel']}" th:value="${moduleType['dictValue']}"></option>
  22 + </select>
19 </div> 23 </div>
20 </div> 24 </div>
21 <div class="form-group"> 25 <div class="form-group">
src/main/resources/templates/config/configValue/edit.html
@@ -9,13 +9,13 @@ @@ -9,13 +9,13 @@
9 <div class="form-group"> 9 <div class="form-group">
10 <label class="col-sm-3 control-label">模块:</label> 10 <label class="col-sm-3 control-label">模块:</label>
11 <div class="col-sm-8"> 11 <div class="col-sm-8">
12 - <input id="moduleType" name="moduleType" class="form-control" type="text" th:field="*{moduleType}"> 12 + <input id="moduleType" name="moduleType" class="form-control" type="text" th:field="*{moduleType}" readonly>
13 </div> 13 </div>
14 </div> 14 </div>
15 <div class="form-group"> 15 <div class="form-group">
16 <label class="col-sm-3 control-label">类型:</label> 16 <label class="col-sm-3 control-label">类型:</label>
17 <div class="col-sm-8"> 17 <div class="col-sm-8">
18 - <input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}"> 18 + <input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}" readonly>
19 </div> 19 </div>
20 </div> 20 </div>
21 <div class="form-group"> 21 <div class="form-group">
src/main/resources/templates/config/receiptPreference/edit.html
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <div class="form-group"> 21 <div class="form-group">
22 <label class="col-sm-3 control-label">入库流程:</label> 22 <label class="col-sm-3 control-label">入库流程:</label>
23 <div class="col-sm-8"> 23 <div class="col-sm-8">
24 - <select id="receivingFlow" name="receivingFlow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList('入库单')}" th:field="*{receivingFlow}"> 24 + <select id="receivingFlow" name="receivingFlow" class="form-control" th:with="statusFlowList=${@StatusFlow.flowList('receivingFlow')}" th:field="*{receivingFlow}">
25 <option th:each="flow : ${statusFlowList}" th:text="${flow['name']}" th:value="${flow['code']}"></option> 25 <option th:each="flow : ${statusFlowList}" th:text="${flow['name']}" th:value="${flow['code']}"></option>
26 </select> 26 </select>
27 </div> 27 </div>
src/main/resources/templates/config/station/add.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-station-add">
  8 + <div class="form-group">
  9 + <label class="col-sm-3 control-label">编码:</label>
  10 + <div class="col-sm-8">
  11 + <input id="code" name="code" class="form-control" type="text">
  12 + </div>
  13 + </div>
  14 + <div class="form-group">
  15 + <label class="col-sm-3 control-label">类型:</label>
  16 + <div class="col-sm-8">
  17 + <input id="type" name="type" class="form-control" type="text" >
  18 + </div>
  19 + </div>
  20 + <div class="form-group">
  21 + <label class="col-sm-3 control-label">状态:</label>
  22 + <div class="col-sm-8">
  23 + <input id="status" name="status" class="form-control" type="text" >
  24 + </div>
  25 + </div>
  26 + <div class="form-group">
  27 + <div class="form-control-static col-sm-offset-9">
  28 + <button type="submit" class="btn btn-primary">提交</button>
  29 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  30 + </div>
  31 + </div>
  32 + </form>
  33 +</div>
  34 +<div th:include="include::footer"></div>
  35 +<script type="text/javascript">
  36 + var prefix = ctx + "config/station"
  37 + $("#form-station-add").validate({
  38 + rules:{
  39 + code:{
  40 + required:true
  41 + },
  42 + type:{
  43 + required: true
  44 + }
  45 + },
  46 + submitHandler: function(form) {
  47 + // $.operate.save(prefix + "/add", $('#form-supplier-add').serialize());
  48 + var tableValue = $.common.getTableValue("#form-station-add");
  49 + $.operate.save(prefix + "/add", tableValue);
  50 + }
  51 + });
  52 +</script>
  53 +</body>
  54 +</html>
src/main/resources/templates/config/station/edit.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-station-add" th:object="${station}">
  8 + <div class="form-group">
  9 + <label class="col-sm-3 control-label">编码:</label>
  10 + <div class="col-sm-8">
  11 + <input id="code" name="code" class="form-control" type="text" th:field="*{code}">
  12 + </div>
  13 + </div>
  14 + <div class="form-group">
  15 + <label class="col-sm-3 control-label">类型:</label>
  16 + <div class="col-sm-8">
  17 + <input id="type" name="type" class="form-control" type="text" th:field="*{type}">
  18 + </div>
  19 + </div>
  20 + <div class="form-group">
  21 + <label class="col-sm-3 control-label">状态:</label>
  22 + <div class="col-sm-8">
  23 + <input id="status" name="status" class="form-control" type="text" th:field="*{status}">
  24 + </div>
  25 + </div>
  26 + <div class="form-group">
  27 + <div class="form-control-static col-sm-offset-9">
  28 + <button type="submit" class="btn btn-primary">提交</button>
  29 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  30 + </div>
  31 + </div>
  32 + </form>
  33 +</div>
  34 +<div th:include="include::footer"></div>
  35 +<script type="text/javascript">
  36 + var prefix = ctx + "config/station"
  37 + $("#form-station-add").validate({
  38 + rules:{
  39 + code:{
  40 + required:true
  41 + },
  42 + type:{
  43 + required: true
  44 + }
  45 + },
  46 + submitHandler: function(form) {
  47 + // $.operate.save(prefix + "/add", $('#form-supplier-add').serialize());
  48 + var tableValue = $.common.getTableValue("#form-station-add");
  49 + $.operate.save(prefix + "/edit", tableValue);
  50 + }
  51 + });
  52 +</script>
  53 +</body>
  54 +</html>
src/main/resources/templates/config/station/station.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="gray-bg">
  6 +<div class="container-div">
  7 + <div class="row">
  8 + <div class="col-sm-12 select-info">
  9 + <form id="supplier-form">
  10 + <div class="select-list">
  11 + <ul>
  12 + <li>
  13 + 编码:<input type="text" name="code"/>
  14 + </li>
  15 + <li class="time">
  16 + <label>创建时间: </label>
  17 + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/>
  18 + <span>-</span>
  19 + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/>
  20 + </li>
  21 + <li>
  22 + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  23 + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('supplier-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  24 + <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:supplier:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
  25 + </li>
  26 + </ul>
  27 + </div>
  28 + </form>
  29 + </div>
  30 +
  31 + <div class="btn-group hidden-xs" id="toolbar" role="group">
  32 + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:station:add">
  33 + <i class="fa fa-plus"></i> 新增
  34 + </a>
  35 + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:station:remove">
  36 + <i class="fa fa-trash-o"></i> 删除
  37 + </a>
  38 + </div>
  39 +
  40 + <div class="col-sm-12 select-info">
  41 + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
  42 + </div>
  43 + </div>
  44 +</div>
  45 +<div th:include="include :: footer"></div>
  46 +<script th:inline="javascript">
  47 + var editFlag = [[${@permission.hasPermi('config:station:edit')}]];
  48 + var removeFlag = [[${@permission.hasPermi('config:station:remove')}]];
  49 + var prefix = ctx + "config/station"
  50 + var datas = [[${@dict.getType('sys_normal_disable')}]];
  51 + $(function() {
  52 + var options = {
  53 + url: prefix + "/list",
  54 + createUrl: prefix + "/add",
  55 + updateUrl: prefix + "/edit/{id}",
  56 + removeUrl: prefix + "/remove",
  57 + modalName: "站台",
  58 + search: false,
  59 + sortName: "id",
  60 + sortOrder: "desc",
  61 + columns: [{
  62 + checkbox: true
  63 + },
  64 + {
  65 + field : 'id',
  66 + title : 'id'
  67 + },
  68 + {
  69 + field : 'warehouseCode',
  70 + title : '仓库'
  71 + },
  72 + {
  73 + field : 'code',
  74 + title : '编码'
  75 + },
  76 + {
  77 + field : 'type',
  78 + title : '类型'
  79 + },
  80 + {
  81 + field : 'status',
  82 + title : '状态'
  83 + },
  84 + {
  85 + field : 'created',
  86 + title : '创建时间'
  87 + },
  88 + {
  89 + field : 'createdBy',
  90 + title : '创建用户'
  91 + },
  92 + {
  93 + field : 'lastUpdated',
  94 + title : '更新时间'
  95 + },
  96 + {
  97 + field : 'lastUpdatedBy',
  98 + title : '更新用户'
  99 + },
  100 + {
  101 + title: '操作',
  102 + align: 'center',
  103 + formatter: function(value, row, index) {
  104 + var actions = [];
  105 + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  106 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
  107 + return actions.join('');
  108 + }
  109 + }]
  110 + };
  111 + $.table.init(options);
  112 + });
  113 +</script>
  114 +</body>
  115 +</html>
0 \ No newline at end of file 116 \ No newline at end of file
src/main/resources/templates/task/taskHeader/taskHeader.html
@@ -188,6 +188,11 @@ @@ -188,6 +188,11 @@
188 title : '容器号' , 188 title : '容器号' ,
189 sortable: true 189 sortable: true
190 }, 190 },
  191 + {
  192 + field : 'exceptionCode',
  193 + title : '异常原因',
  194 + sortable: true
  195 + },
191 196
192 { 197 {
193 field : 'startPickDateTime', 198 field : 'startPickDateTime',
@@ -218,7 +223,8 @@ @@ -218,7 +223,8 @@
218 }, 223 },
219 { 224 {
220 field : 'userDef1', 225 field : 'userDef1',
221 - title : '处理' , 226 + title : '自定义字段1' ,
  227 + visible:false
222 }, 228 },
223 { 229 {
224 field : 'userDef2', 230 field : 'userDef2',