Commit 1e4dd8128a0471f923d02c35ab7f8ce9f942f4e1
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # .idea/workspace.xml # src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java # src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java # src/main/resources/mybatis/task/TaskHeaderMapper.xml
Showing
17 changed files
with
345 additions
and
14123 deletions
Too many changes to show.
To preserve performance only 16 of 17 files are displayed.
.idea/dataSources.xml
... | ... | @@ -16,5 +16,19 @@ |
16 | 16 | <property name="serverTimezone" value="UTC" /> |
17 | 17 | </driver-properties> |
18 | 18 | </data-source> |
19 | + <data-source source="LOCAL" name="@172.16.29.45" uuid="36263653-e7b2-4ebc-9140-76794bfbbc6f"> | |
20 | + <driver-ref>mysql.8</driver-ref> | |
21 | + <synchronize>true</synchronize> | |
22 | + <jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver> | |
23 | + <jdbc-url>jdbc:mysql://172.16.29.45:3306</jdbc-url> | |
24 | + <driver-properties> | |
25 | + <property name="autoReconnect" value="true" /> | |
26 | + <property name="zeroDateTimeBehavior" value="CONVERT_TO_NULL" /> | |
27 | + <property name="tinyInt1isBit" value="false" /> | |
28 | + <property name="characterEncoding" value="utf8" /> | |
29 | + <property name="characterSetResults" value="utf8" /> | |
30 | + <property name="yearIsDateType" value="false" /> | |
31 | + </driver-properties> | |
32 | + </data-source> | |
19 | 33 | </component> |
20 | 34 | </project> |
21 | 35 | \ No newline at end of file |
... | ... |
.idea/misc.xml
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | </list> |
12 | 12 | </option> |
13 | 13 | </component> |
14 | - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |
14 | + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | |
15 | 15 | <output url="file://$PROJECT_DIR$/out" /> |
16 | 16 | </component> |
17 | 17 | </project> |
18 | 18 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/controller/ReceiptContainerDetailController.java
0 → 100644
1 | +package com.huaheng.pc.receipt.receiptContainerDetail.controller; | |
2 | + | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | |
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |
7 | +import com.huaheng.common.utils.StringUtils; | |
8 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | |
9 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | |
10 | +import com.huaheng.framework.web.controller.BaseController; | |
11 | +import com.huaheng.framework.web.page.PageDomain; | |
12 | +import com.huaheng.framework.web.page.TableDataInfo; | |
13 | +import com.huaheng.framework.web.page.TableSupport; | |
14 | +import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; | |
15 | +import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService; | |
16 | +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; | |
17 | +import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; | |
18 | +import io.swagger.annotations.ApiOperation; | |
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.List; | |
27 | + | |
28 | +@Controller | |
29 | +@RequestMapping("/receipt/receiptContainerDetail") | |
30 | +public class ReceiptContainerDetailController extends BaseController { | |
31 | + | |
32 | + @Resource | |
33 | + private ReceiptContainerDetailService receiptContainerDetailService; | |
34 | + | |
35 | + private String prefix = "receipt/receiptContainerDetail"; | |
36 | + | |
37 | + @RequiresPermissions("receipt:receiptContainerDetail:view") | |
38 | + @Log(title = "入库-入库详情列表", operating = "入库详情列表", action = BusinessType.GRANT) | |
39 | + @GetMapping("/list/{id}") | |
40 | + public String list(@PathVariable("id")Integer id, ModelMap mmap) { | |
41 | + mmap.put("receiptId", id); | |
42 | + return prefix+"/receiptDetail"; | |
43 | + } | |
44 | + | |
45 | + /** | |
46 | + * 查询入库详情 | |
47 | + */ | |
48 | + @ApiOperation(value="查看入库详情", notes="根据头表id获取入库单明细信息", httpMethod = "POST") | |
49 | + @RequiresPermissions("receipt:receiptDetail:list") | |
50 | + @Log(title = "入库-入库单明细管理", operating = "查看入库单明细", action = BusinessType.GRANT) | |
51 | + @PostMapping("/list") | |
52 | + @ResponseBody | |
53 | + public TableDataInfo list(@ApiParam(name="receiptDetail",value="入库详情") Integer receiptDetailId) { | |
54 | + LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
55 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
56 | + Integer pageNum = pageDomain.getPageNum(); | |
57 | + Integer pageSize = pageDomain.getPageSize(); | |
58 | + lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptDetailId, receiptDetailId); | |
59 | + | |
60 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
61 | + /*使用分页查询*/ | |
62 | + Page<ReceiptContainerDetail> page = new Page<>(pageNum, pageSize); | |
63 | + IPage<ReceiptContainerDetail> iPage = receiptContainerDetailService.page(page, lambdaQueryWrapper); | |
64 | + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | |
65 | + } else { | |
66 | + List<ReceiptContainerDetail> list = receiptContainerDetailService.list(lambdaQueryWrapper); | |
67 | + return getDataTable(list); | |
68 | + } | |
69 | + } | |
70 | +} | |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
0 → 100644
1 | +package com.huaheng.pc.receipt.receiptContainerHeader.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.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; | |
18 | +import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService; | |
19 | +import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader; | |
20 | +import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService; | |
21 | +import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; | |
22 | +import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService; | |
23 | +import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; | |
24 | +import com.huaheng.pc.receipt.receiving.service.ReceivingService; | |
25 | +import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; | |
26 | +import io.swagger.annotations.ApiOperation; | |
27 | +import io.swagger.annotations.ApiParam; | |
28 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
29 | +import org.springframework.stereotype.Controller; | |
30 | +import org.springframework.web.bind.annotation.GetMapping; | |
31 | +import org.springframework.web.bind.annotation.PostMapping; | |
32 | +import org.springframework.web.bind.annotation.RequestMapping; | |
33 | +import org.springframework.web.bind.annotation.ResponseBody; | |
34 | + | |
35 | +import javax.annotation.Resource; | |
36 | +import java.util.Arrays; | |
37 | +import java.util.Comparator; | |
38 | +import java.util.List; | |
39 | + | |
40 | +@Controller | |
41 | +@RequestMapping("/receipt/receiptContainerHeader") | |
42 | +public class ReceiptContainerHeaderController extends BaseController { | |
43 | + | |
44 | + @Resource | |
45 | + private ReceiptContainerHeaderService receiptContainerHeaderService; | |
46 | + @Resource | |
47 | + private TaskHeaderService taskHeaderService; | |
48 | + @Resource | |
49 | + private ReceivingService receivingService; | |
50 | + @Resource | |
51 | + private ReceiptContainerDetailService receiptContainerDetailService; | |
52 | + | |
53 | + private String prefix = "receipt/receiptContainerHeader"; | |
54 | + | |
55 | + @RequiresPermissions("receipt:receiptContainer:view") | |
56 | + @GetMapping() | |
57 | + public String containerCapacity() | |
58 | + { | |
59 | + return prefix + "/receiptContainerHeader"; | |
60 | + } | |
61 | + | |
62 | + /** | |
63 | + * 查询入库组盘 | |
64 | + */ | |
65 | + @RequiresPermissions("receipt:receiptContainer:list") | |
66 | + @Log(title = "入库-入库单组盘", operating = "查看入库组盘列表", action = BusinessType.GRANT) | |
67 | + @PostMapping("/list") | |
68 | + @ResponseBody | |
69 | + public TableDataInfo list(@ApiParam(name="receiptDetail",value="入库组盘头表") ReceiptContainerHeader receiptContainerHeader, | |
70 | + @ApiParam(name = "receiptCode",value = "入库单号")String receiptCode, | |
71 | + @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin, | |
72 | + @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) { | |
73 | + LambdaQueryWrapper<ReceiptContainerHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
74 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
75 | + Integer pageNum = pageDomain.getPageNum(); | |
76 | + Integer pageSize = pageDomain.getPageSize(); | |
77 | + String sql = null; | |
78 | + if (StringUtils.isNotEmpty(receiptCode)){ | |
79 | + sql = "select receiptContainerId from receipt_container_detail where receiptCode = \'"+receiptCode+"\'"; | |
80 | + } | |
81 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin), ReceiptContainerHeader::getCreated, createdBegin) | |
82 | + .le(StringUtils.isNotEmpty(createdEnd), ReceiptContainerHeader::getCreated, createdEnd) | |
83 | + .eq(ReceiptContainerHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()) | |
84 | + .eq(StringUtils.isNotEmpty(receiptContainerHeader.getContainerCode()),ReceiptContainerHeader::getContainerCode, receiptContainerHeader.getContainerCode()) | |
85 | + .eq(StringUtils.isNotEmpty(receiptContainerHeader.getToLocation()),ReceiptContainerHeader::getToLocation, receiptContainerHeader.getToLocation()) | |
86 | + .eq(StringUtils.isNotEmpty(receiptContainerHeader.getTaskType()),ReceiptContainerHeader::getTaskType, receiptContainerHeader.getTaskType()) | |
87 | + .eq(StringUtils.isNotNull(receiptContainerHeader.getStatus()),ReceiptContainerHeader::getStatus, receiptContainerHeader.getStatus()) | |
88 | + .eq(StringUtils.isNotEmpty(receiptContainerHeader.getCreatedBy()),ReceiptContainerHeader::getCreatedBy, receiptContainerHeader.getCreatedBy()) | |
89 | + .inSql(StringUtils.isNotEmpty(receiptCode), ReceiptContainerHeader::getId, sql); | |
90 | + | |
91 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | |
92 | + /** | |
93 | + * 使用分页查询 | |
94 | + */ | |
95 | + Page<ReceiptContainerHeader> page = new Page<>(pageNum, pageSize); | |
96 | + IPage<ReceiptContainerHeader> iPage = receiptContainerHeaderService.page(page, lambdaQueryWrapper); | |
97 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | |
98 | + } else { | |
99 | + List<ReceiptContainerHeader> list = receiptContainerHeaderService.list(lambdaQueryWrapper); | |
100 | + return getDataTable(list); | |
101 | + } | |
102 | + } | |
103 | + | |
104 | + /** | |
105 | + * 删除入库单 | |
106 | + */ | |
107 | + @ApiOperation(value="取消", notes="取消入库组盘", httpMethod = "POST") | |
108 | + @RequiresPermissions("receipt:receiptContainer:remove") | |
109 | + @Log(title = "入库-入库单 ",operating = "取消入库组盘", action = BusinessType.UPDATE) | |
110 | + @PostMapping("/remove") | |
111 | + @ResponseBody | |
112 | + public AjaxResult remove(@ApiParam(name = "id", value = "入库头表id字符串")String ids){ | |
113 | + if (StringUtils.isNull(ids)){ | |
114 | + return AjaxResult.error("id为空"); | |
115 | + } | |
116 | + List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); | |
117 | + return toAjax(receiptContainerHeaderService.removeByIds(idList)); | |
118 | + } | |
119 | + /** | |
120 | + * 生成任务 | |
121 | + */ | |
122 | + @RequiresPermissions("receipt:receiptContainer:createTask") | |
123 | + @Log(title = "入库-任务生成", operating = "生成入库任务", action = BusinessType.INSERT) | |
124 | + @PostMapping( "/createTask") | |
125 | + @ResponseBody | |
126 | + public AjaxResult addTask(String ids){ | |
127 | + if (StringUtils.isEmpty(ids)){ | |
128 | + return AjaxResult.error("id不能为空"); | |
129 | + } | |
130 | + List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); | |
131 | + Integer maxId = idList.stream().max(Comparator.comparing(Integer::intValue)).orElse(null); | |
132 | + | |
133 | + LambdaQueryWrapper<ReceiptContainerHeader> lambda = Wrappers.lambdaQuery(); | |
134 | + lambda.select(ReceiptContainerHeader::getId) | |
135 | + .lt(ReceiptContainerHeader::getStatus, 10) | |
136 | + .le(ReceiptContainerHeader::getId, maxId); | |
137 | + List<Object> ContainerIdList = receiptContainerHeaderService.listObjs(lambda); | |
138 | + return taskHeaderService.createReceiptTask(idList); | |
139 | + } | |
140 | + | |
141 | + /** | |
142 | + * 定位 | |
143 | + */ | |
144 | + @RequiresPermissions("receipt:receiptContainer:createTask") | |
145 | + @Log(title = "入库-定位", operating = "定位", action = BusinessType.INSERT) | |
146 | + @PostMapping( "/position") | |
147 | + @ResponseBody | |
148 | + public AjaxResult position(String ids){ | |
149 | + if (StringUtils.isEmpty(ids)){ | |
150 | + return AjaxResult.error("id不能为空"); | |
151 | + } | |
152 | + List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); | |
153 | + for (int i = 0; i<idList.size(); i++){ | |
154 | + ReceiptContainerDetail receiptContainerDetail = receiptContainerDetailService.getById(idList.get(i)); | |
155 | + receivingService.position(receiptContainerDetail); | |
156 | + } | |
157 | + return AjaxResult.success(""); | |
158 | + } | |
159 | +} | |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
... | ... | @@ -214,6 +214,9 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
214 | 214 | //获取配置流程中下一状态 |
215 | 215 | public String nextStatusFlow(List<StatusFlowDetail> statusFlowDetails, String status){ |
216 | 216 | //判断当前状态是否为最后状态,若为最后状态返回当前状态 |
217 | + if (status == null){ | |
218 | + status = "0"; | |
219 | + } | |
217 | 220 | if (status.equals(statusFlowDetails.get(statusFlowDetails.size()-1).getFlowCode())){ |
218 | 221 | return status; |
219 | 222 | } else { |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
... | ... | @@ -8,6 +8,7 @@ import com.huaheng.common.utils.security.ShiroUtils; |
8 | 8 | import com.huaheng.framework.web.domain.AjaxResult; |
9 | 9 | import com.huaheng.pc.config.configValue.domain.ConfigValue; |
10 | 10 | import com.huaheng.pc.config.configValue.service.ConfigValueService; |
11 | +import com.huaheng.pc.config.location.domain.Location; | |
11 | 12 | import com.huaheng.pc.config.location.service.LocationService; |
12 | 13 | import com.huaheng.pc.config.material.domain.Material; |
13 | 14 | import com.huaheng.pc.config.material.service.MaterialService; |
... | ... | @@ -106,6 +107,9 @@ public class ReceivingService { |
106 | 107 | } |
107 | 108 | //根据定位规则查询库位编码 |
108 | 109 | String locationCode = locationService.position(locatingRule); |
110 | + | |
111 | + locationService.updateStatus(locationCode, "lock"); | |
112 | + | |
109 | 113 | receiptContainerHeader.setToLocation(locationCode); |
110 | 114 | |
111 | 115 | if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){ |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -187,6 +187,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
187 | 187 | //赋值u8仓库 |
188 | 188 | shipmentContainerHeader.setCompanyCode(shipmentDetail.getCompanyCode()); |
189 | 189 | shipmentContainerHeader.setStatus(0); |
190 | + shipmentContainerHeader.setTaskCreated(0); | |
190 | 191 | shipmentContainerHeader.setCreatedBy(ShiroUtils.getLoginName()); |
191 | 192 | shipmentContainerHeader.setCreated(null); |
192 | 193 | // Material material=new Material(); |
... | ... | @@ -397,7 +398,7 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
397 | 398 | if(num==shipmentDetailList.size()){ |
398 | 399 | throw new ServiceException("单据物料在此库区没有库存,无法出库"); |
399 | 400 | } |
400 | - return AjaxResult.success(""); | |
401 | + return AjaxResult.success("成功"); | |
401 | 402 | } |
402 | 403 | |
403 | 404 | /** |
... | ... | @@ -423,10 +424,10 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
423 | 424 | ShipmentTaskCreateModel shipmentTask = new ShipmentTaskCreateModel(); |
424 | 425 | for (Integer id : idList) { |
425 | 426 | shipmentTask.setShipmentContainerHeaderIds(id); |
426 | -// AjaxResult ajaxResult = taskHeaderService.createTaskFromShipmentContainers(shipmentTask); | |
427 | -// if(ajaxResult.hasErr()){ | |
428 | -// return ajaxResult; | |
429 | -// } | |
427 | + AjaxResult ajaxResult = taskHeaderService.createTaskFromShipmentContainers(shipmentTask); | |
428 | + if(ajaxResult.hasErr()){ | |
429 | + return ajaxResult; | |
430 | + } | |
430 | 431 | } |
431 | 432 | return AjaxResult.success("全部生成完毕"); |
432 | 433 | } |
... | ... |
src/main/java/com/huaheng/pc/shipment/shippingCombination/service/ShippingCombinationService.java
... | ... | @@ -18,8 +18,8 @@ public class ShippingCombinationService { |
18 | 18 | |
19 | 19 | |
20 | 20 | public List<InventoryDetail> getInventorys(ShippingSearch search) { |
21 | - // List<InventoryDetail> list = shippingCombinationMapper.getInventorys(search); | |
22 | - return null; | |
21 | + List<InventoryDetail> list = shippingCombinationMapper.getInventorys(search); | |
22 | + return list; | |
23 | 23 | } |
24 | 24 | |
25 | 25 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java
... | ... | @@ -69,7 +69,7 @@ public class TaskHeaderController extends BaseController { |
69 | 69 | .eq(StringUtils.isNotNull(taskHeader.getInternalTaskType()),TaskHeader::getInternalTaskType,taskHeader.getInternalTaskType()) |
70 | 70 | .eq(StringUtils.isNotNull(taskHeader.getId()),TaskHeader::getId,taskHeader.getId()) |
71 | 71 | .eq(StringUtils.isNotEmpty(taskHeader.getContainerCode()),TaskHeader::getContainerCode,taskHeader.getContainerCode()) |
72 | - //.eq(StringUtils.isNotEmpty(taskHeader.getLocationCode()),TaskHeader::getLocationCode,taskHeader.getLocationCode()) | |
72 | + .eq(StringUtils.isNotEmpty(taskHeader.getToLocation()),TaskHeader::getToLocation,taskHeader.getToLocation()) | |
73 | 73 | .gt(StringUtils.isNotEmpty(createdBegin),TaskHeader::getCreated,createdBegin) |
74 | 74 | .lt(StringUtils.isNotEmpty(createdEnd),TaskHeader::getCreated,createdEnd); |
75 | 75 | |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/domain/TaskHeader.java
... | ... | @@ -10,7 +10,7 @@ import java.io.Serializable; |
10 | 10 | import java.util.Date; |
11 | 11 | import lombok.Data; |
12 | 12 | |
13 | -@ApiModel(value="com.huaheng.pc.task.taskHeader.domain.TaskHeader") | |
13 | +@ApiModel(value="com.huaheng.pc.task.taskHeader.TaskHeader") | |
14 | 14 | @Data |
15 | 15 | @TableName(value = "task_header") |
16 | 16 | public class TaskHeader implements Serializable { |
... | ... | @@ -50,7 +50,14 @@ public class TaskHeader implements Serializable { |
50 | 50 | private Integer internalTaskType; |
51 | 51 | |
52 | 52 | /** |
53 | - *从货位,源库位 | |
53 | + * 容器号 | |
54 | + */ | |
55 | + @TableField(value = "containerCode") | |
56 | + @ApiModelProperty(value="容器号") | |
57 | + private String containerCode; | |
58 | + | |
59 | + /** | |
60 | + * 从货位,源库位 | |
54 | 61 | */ |
55 | 62 | @TableField(value = "fromLocation") |
56 | 63 | @ApiModelProperty(value="从货位,源库位") |
... | ... | @@ -120,13 +127,6 @@ public class TaskHeader implements Serializable { |
120 | 127 | private String pickingCartPos; |
121 | 128 | |
122 | 129 | /** |
123 | - * 容器号 | |
124 | - */ | |
125 | - @TableField(value = "containerCode") | |
126 | - @ApiModelProperty(value="容器号") | |
127 | - private String containerCode; | |
128 | - | |
129 | - /** | |
130 | 130 | * 开始拣货时间 |
131 | 131 | */ |
132 | 132 | @TableField(value = "startPickDateTime") |
... | ... | @@ -280,7 +280,6 @@ public class TaskHeader implements Serializable { |
280 | 280 | @ApiModelProperty(value="同步标志 0:需要同步 10:同步成功 20:同步失败") |
281 | 281 | private String userDef3; |
282 | 282 | |
283 | - | |
284 | 283 | /** |
285 | 284 | * 处理标记 |
286 | 285 | */ |
... | ... | @@ -289,78 +288,4 @@ public class TaskHeader implements Serializable { |
289 | 288 | private String processStamp; |
290 | 289 | |
291 | 290 | private static final long serialVersionUID = 1L; |
292 | - | |
293 | - public static final String COL_ID = "id"; | |
294 | - | |
295 | - public static final String COL_WAREHOUSECODE = "warehouseCode"; | |
296 | - | |
297 | - public static final String COL_COMPANYCODE = "companyCode"; | |
298 | - | |
299 | - public static final String COL_TASKTYPE = "taskType"; | |
300 | - | |
301 | - public static final String COL_INTERNALTASKTYPE = "internalTaskType"; | |
302 | - | |
303 | - public static final String COL_REFERENCEID = "referenceId"; | |
304 | - | |
305 | - public static final String COL_REFERENCECODE = "referenceCode"; | |
306 | - | |
307 | - public static final String COL_ASSIGNEDUSER = "assignedUser"; | |
308 | - | |
309 | - public static final String COL_CONFIRMEDBY = "confirmedBy"; | |
310 | - | |
311 | - public static final String COL_STATUS = "status"; | |
312 | - | |
313 | - public static final String COL_WAVEID = "waveId"; | |
314 | - | |
315 | - public static final String COL_PICKINGCARTCODE = "pickingCartCode"; | |
316 | - | |
317 | - public static final String COL_PICKINGCARTPOS = "pickingCartPos"; | |
318 | - | |
319 | - public static final String COL_CONTAINERCODE = "containerCode"; | |
320 | - | |
321 | - public static final String COL_STARTPICKDATETIME = "startPickDateTime"; | |
322 | - | |
323 | - public static final String COL_ENDPICKDATETIME = "endPickDateTime"; | |
324 | - | |
325 | - public static final String COL_REBATCHLOC = "rebatchLoc"; | |
326 | - | |
327 | - public static final String COL_FINISHREBATCH = "finishRebatch"; | |
328 | - | |
329 | - public static final String COL_REBATCHGROUPCODE = "rebatchGroupCode"; | |
330 | - | |
331 | - public static final String COL_ALLOWREBATCH = "allowRebatch"; | |
332 | - | |
333 | - public static final String COL_TASKPROCESSTYPE = "taskProcessType"; | |
334 | - | |
335 | - public static final String COL_REBINBENCH = "rebinBench"; | |
336 | - | |
337 | - public static final String COL_REBINED = "rebined"; | |
338 | - | |
339 | - public static final String COL_STARTREBINDATETIME = "startRebinDateTime"; | |
340 | - | |
341 | - public static final String COL_ENDREBINDATETIME = "endRebinDateTime"; | |
342 | - | |
343 | - public static final String COL_REBINEDBY = "rebinedBy"; | |
344 | - | |
345 | - public static final String COL_EXCEPTIONCODE = "exceptionCode"; | |
346 | - | |
347 | - public static final String COL_EXCEPTIONHANDLEDBY = "exceptionHandledBy"; | |
348 | - | |
349 | - public static final String COL_CREATED = "created"; | |
350 | - | |
351 | - public static final String COL_CREATEDBY = "createdBy"; | |
352 | - | |
353 | - public static final String COL_LASTUPDATED = "lastUpdated"; | |
354 | - | |
355 | - public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; | |
356 | - | |
357 | - public static final String COL_VERSION = "version"; | |
358 | - | |
359 | - public static final String COL_USERDEF1 = "userDef1"; | |
360 | - | |
361 | - public static final String COL_USERDEF2 = "userDef2"; | |
362 | - | |
363 | - public static final String COL_USERDEF3 = "userDef3"; | |
364 | - | |
365 | - public static final String COL_PROCESSSTAMP = "processStamp"; | |
366 | 291 | } |
367 | 292 | \ No newline at end of file |
... | ... |
src/main/resources/mybatis/shipment/ShipmentCombinationMapper.xml
... | ... | @@ -20,31 +20,26 @@ |
20 | 20 | </sql> |
21 | 21 | |
22 | 22 | <select id="getInventorys" resultType="com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail"> |
23 | - SELECT i.id, i.warehouseId, i.warehouseCode, i.locationId, i.locationCode, i.containerCode, | |
24 | - i.sourceCode, i.sourceLine, i.companyId, i.companyCode, i.materialId, i.materialCode, | |
25 | - i.receiptId, i.receiptCode, i.receiptDetailId, i.batch, i.lot, i.project, i.manufactureDate, | |
26 | - i.expirationDate, i.status, i.qty, i.taskQty, i.costPrice, i.listPrice, i.netPrice, i.created, | |
27 | - i.createdBy, i.lastUpdated, i.lastUpdatedBy, i.userDef1, i.userDef2, i.userDef3, i.deleted, | |
28 | - m.name materialName, m.userDef1 materialOldCode ,i.zoneCode | |
29 | - FROM inventory i | |
30 | - INNER JOIN material m ON i.materialCode = m.code | |
23 | + SELECT i.id, i.warehouseCode, i.locationCode, i.containerCode, | |
24 | + i.companyCode, i.materialCode,i.materialName,i.materialSpec,i.materialUnit, | |
25 | + i.receiptCode, i.receiptDetailId, i.batch, i.lot, i.projectNo, | |
26 | + i.qty, i.taskQty, i.created,i.inventorySts, | |
27 | + i.createdBy, i.lastUpdated, i.lastUpdatedBy, i.userDef1, i.userDef2, i.userDef3 | |
28 | + FROM inventory_detail i | |
29 | + INNER JOIN location l ON i.locationCode = l.code | |
31 | 30 | AND i.companyCode=#{companyCode} |
32 | 31 | AND i.warehouseCode=#{warehouseCode} |
33 | - AND m.warehouseCode=#{warehouseCode} | |
34 | 32 | AND i.qty > i.taskQty |
35 | - AND i.materialCode=#{materialCode} | |
36 | - | |
37 | - INNER JOIN location l ON i.locationCode = l.code | |
38 | 33 | AND l.warehouseCode=#{warehouseCode} |
39 | 34 | LEFT JOIN shipment_container_header s ON i.locationCode = s.locationCode |
40 | 35 | AND s.status=0 |
41 | 36 | AND s.warehouseCode=#{warehouseCode} |
42 | 37 | <where> |
43 | - <if test="project != null and project != ''"> | |
44 | - AND i.project = #{project} | |
38 | + <if test="project!= null and project!= ''"> | |
39 | + AND i.projectNo = #{project} | |
45 | 40 | </if> |
46 | - <if test="inventoryStatus != null and inventoryStatus != '' "> | |
47 | - AND i.status = #{inventoryStatus} | |
41 | + <if test="inventorySts != null and inventorySts != '' "> | |
42 | + AND i.inventorySts = #{inventorySts} | |
48 | 43 | </if> |
49 | 44 | <if test="locationCode != null and locationCode != '' "> |
50 | 45 | AND i.locationCode = #{locationCode} |
... | ... |
src/main/resources/mybatis/shipment/ShipmentContainerDetailMapper.xml
... | ... | @@ -21,12 +21,10 @@ |
21 | 21 | <result column="itemLength" jdbcType="DECIMAL" property="itemLength" /> |
22 | 22 | <result column="itemWidth" jdbcType="DECIMAL" property="itemWidth" /> |
23 | 23 | <result column="itemHeight" jdbcType="DECIMAL" property="itemHeight" /> |
24 | - <result column="itemValue" jdbcType="DECIMAL" property="itemValue" /> | |
25 | 24 | <result column="qty" jdbcType="INTEGER" property="qty" /> |
26 | 25 | <result column="waveId" jdbcType="INTEGER" property="waveId" /> |
27 | 26 | <result column="taskCreated" jdbcType="INTEGER" property="taskCreated" /> |
28 | 27 | <result column="attributeId" jdbcType="INTEGER" property="attributeId" /> |
29 | - <result column="originalPickLoc" jdbcType="VARCHAR" property="originalPickLoc" /> | |
30 | 28 | <result column="attribute1" jdbcType="VARCHAR" property="attribute1" /> |
31 | 29 | <result column="attribute2" jdbcType="VARCHAR" property="attribute2" /> |
32 | 30 | <result column="attribute3" jdbcType="VARCHAR" property="attribute3" /> |
... | ... | @@ -39,8 +37,6 @@ |
39 | 37 | <result column="agingDate" jdbcType="DATE" property="agingDate" /> |
40 | 38 | <result column="inventorySts" jdbcType="VARCHAR" property="inventorySts" /> |
41 | 39 | <result column="packingClass" jdbcType="VARCHAR" property="packingClass" /> |
42 | - <result column="transContCode" jdbcType="VARCHAR" property="transContCode" /> | |
43 | - <result column="scannedQty" jdbcType="INTEGER" property="scannedQty" /> | |
44 | 40 | <result column="created" jdbcType="TIMESTAMP" property="created" /> |
45 | 41 | <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> |
46 | 42 | <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> |
... | ... | @@ -49,22 +45,17 @@ |
49 | 45 | <result column="userDef1" jdbcType="VARCHAR" property="userDef1" /> |
50 | 46 | <result column="userDef2" jdbcType="VARCHAR" property="userDef2" /> |
51 | 47 | <result column="userDef3" jdbcType="VARCHAR" property="userDef3" /> |
52 | - <result column="userDef4" jdbcType="VARCHAR" property="userDef4" /> | |
53 | - <result column="userDef5" jdbcType="VARCHAR" property="userDef5" /> | |
54 | - <result column="userDef6" jdbcType="VARCHAR" property="userDef6" /> | |
55 | - <result column="userDef7" jdbcType="VARCHAR" property="userDef7" /> | |
56 | - <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> | |
57 | 48 | <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> |
58 | 49 | </resultMap> |
59 | 50 | <sql id="Base_Column_List"> |
60 | 51 | <!--@mbg.generated--> |
61 | 52 | id, containerCode, shippingContainerId, shipmentCode, warehouseCode, shipmentId, |
62 | 53 | shipmentDetailId, companyCode, materialCode, materialName, materialSpec, materialUnit, |
63 | - `enable`, itemWeight, itemVolume, itemLength, itemWidth, itemHeight, itemValue, qty, | |
54 | + `enable`, itemWeight, itemVolume, itemLength, itemWidth, itemHeight, qty, | |
64 | 55 | waveId, taskCreated, attributeId, originalPickLoc, attribute1, attribute2, attribute3, |
65 | 56 | attribute4, batch, lot, projectNo, manufactureDate, expirationDate, agingDate, inventorySts, |
66 | - packingClass, transContCode, scannedQty, created, createdBy, lastUpdated, lastUpdatedBy, | |
67 | - version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8, | |
57 | + packingClass, created, createdBy, lastUpdated, lastUpdatedBy, | |
58 | + version, userDef1, userDef2, userDef3, | |
68 | 59 | processStamp |
69 | 60 | </sql> |
70 | 61 | |
... | ... | @@ -74,14 +65,14 @@ |
74 | 65 | <if test="condition.id != null"> |
75 | 66 | AND id = #{condition.id} |
76 | 67 | </if> |
77 | - <if test="condition.headerId != null"> | |
78 | - AND headerId = #{condition.headerId} | |
68 | + <if test="condition.shippingContainerId != null"> | |
69 | + AND shippingContainerId = #{condition.shippingContainerId} | |
79 | 70 | </if> |
80 | 71 | <if test="condition.shipmentCode != null"> |
81 | 72 | AND shipmentCode = #{condition.shipmentCode} |
82 | 73 | </if> |
83 | - <if test="condition.shipmentHeaderId != null"> | |
84 | - AND shipmentHeaderId = #{condition.shipmentHeaderId} | |
74 | + <if test="condition.shipmentId != null"> | |
75 | + AND shipmentId = #{condition.shipmentId} | |
85 | 76 | </if> |
86 | 77 | <if test="condition.shipmentDetailId != null"> |
87 | 78 | AND shipmentDetailId = #{condition.shipmentDetailId} |
... | ... | @@ -104,8 +95,8 @@ |
104 | 95 | <if test="condition.createdBy != null"> |
105 | 96 | AND createdBy = #{condition.createdBy} |
106 | 97 | </if> |
107 | - <if test="condition.project != null"> | |
108 | - AND project = #{condition.project} | |
98 | + <if test="condition.projectNo != null"> | |
99 | + AND projectNo = #{condition.projectNo} | |
109 | 100 | </if> |
110 | 101 | </where> |
111 | 102 | </select> |
... | ... |
src/main/resources/templates/receipt/receiptContainerDetail/receiptContainerDetail.html
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | <script th:inline="javascript"> |
25 | 25 | // var editFlag = [[${@permission.hasPermi('receipt:receiptContainer:edit')}]]; |
26 | 26 | var removeFlag = [[${@permission.hasPermi('receipt:receiptContainer:remove')}]]; |
27 | - var prefix = ctx + "receipt/receiptContainerDetail" | |
27 | + var prefix = ctx + "receipt/receiptContainerDetail"; | |
28 | 28 | |
29 | 29 | $(function() { |
30 | 30 | var options = { |
... | ... |
src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html
... | ... | @@ -27,7 +27,8 @@ |
27 | 27 | 库位编号:<input type="text" name="locationCode"/> |
28 | 28 | </li> |
29 | 29 | <li> |
30 | - <!--入库类型:<input type="text" name="sourceCode"/>--> | |
30 | + <!--入库类型:<input type="text" name="sourceCode"/> | |
31 | + --> | |
31 | 32 | 任务类型:<select name="taskType" th:with="type=${@dict.getType('receiptTaskType')}"> |
32 | 33 | <option value="">所有</option> |
33 | 34 | <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option></select> |
... | ... | @@ -102,12 +103,12 @@ |
102 | 103 | sortable:true |
103 | 104 | }, |
104 | 105 | { |
105 | - field : 'receiptContainerCode', | |
106 | + field : 'containerCode', | |
106 | 107 | title : '容器编号' , |
107 | 108 | sortable:true |
108 | 109 | }, |
109 | 110 | { |
110 | - field : 'locationCode', | |
111 | + field : 'toLocation', | |
111 | 112 | title : '库位编号' , |
112 | 113 | sortable:true |
113 | 114 | }, |
... | ... | @@ -143,8 +144,12 @@ |
143 | 144 | formatter: function(value, row, index) { |
144 | 145 | var actions = []; |
145 | 146 | actions.push('<a class="btn btn-info btn-xs " href="#" onclick="detail(\'' + row.id + '\')"><i class="fa fa-list-ul"></i>明细</a> '); |
147 | + if (row.toLocation != null){ | |
148 | + actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="position(\'' + row.id + '\')"><i class="fa fa-edit"></i>定位</a> '); | |
149 | + } else { | |
150 | + actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
151 | + } | |
146 | 152 | if (row.status == 0) { |
147 | - actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
148 | 153 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消配盘</a>'); |
149 | 154 | } |
150 | 155 | return actions.join(''); |
... | ... | @@ -308,8 +313,8 @@ |
308 | 313 | /* 单个生成任务 */ |
309 | 314 | function createTask(id) { |
310 | 315 | var url = prefix + "/createTask"; |
311 | - var data = { "ids" : id }; | |
312 | - $.operate.post(url, data); | |
316 | + var data = { "ids" : id }; | |
317 | + $.operate.post(url, data); | |
313 | 318 | } |
314 | 319 | |
315 | 320 | /* 批量生成任务 */ |
... | ... | @@ -330,6 +335,12 @@ |
330 | 335 | // submit(url, "post", "json", data); |
331 | 336 | }); |
332 | 337 | } |
338 | + | |
339 | + function position(id){ | |
340 | + var url = prefix + "/position"; | |
341 | + var data = { "ids" : id }; | |
342 | + $.operate.post(url, data); | |
343 | + } | |
333 | 344 | </script> |
334 | 345 | </body> |
335 | 346 | </html> |
336 | 347 | \ No newline at end of file |
... | ... |
src/main/resources/templates/shipment/shipmentContainerDetail/shipmentContainerDetail.html
src/main/resources/templates/shipment/shipmentContainerHeader/shipmentContainerHeader.html
... | ... | @@ -71,6 +71,11 @@ |
71 | 71 | |
72 | 72 | </div> |
73 | 73 | <div class="tab-pane fade" id="tabDetail"> |
74 | + <div class="btn-group hidden-xs" id="toolbar1" role="group"> | |
75 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="detailBatRemove()" > | |
76 | + <i class="fa fa-trash-o"></i> 删除 | |
77 | + </a> | |
78 | + </div> | |
74 | 79 | <table id="bootstrap-table1" data-mobile-responsive="true" class="table table-bordered table-hover"></table> |
75 | 80 | </div> |
76 | 81 | </div> |
... | ... | @@ -129,20 +134,20 @@ |
129 | 134 | title : '仓库编号' , |
130 | 135 | visible:false |
131 | 136 | }, |
132 | - { | |
133 | - field : 'taskType', | |
134 | - title : '下发任务类型' , | |
135 | - formatter: function(value, row, index) { | |
136 | - return $.table.selectDictLabel(shipmentTaskType, value); | |
137 | - },sortable:true | |
138 | - }, | |
139 | - { | |
140 | - field : 'taskTypeReal', | |
141 | - title : '实际任务类型' , | |
142 | - formatter: function(value, row, index) { | |
143 | - return $.table.selectDictLabel(shipmentTaskType, value); | |
144 | - },sortable:true | |
145 | - }, | |
137 | + // { | |
138 | + // field : 'taskType', | |
139 | + // title : '下发任务类型' , | |
140 | + // formatter: function(value, row, index) { | |
141 | + // return $.table.selectDictLabel(shipmentTaskType, value); | |
142 | + // },sortable:true | |
143 | + // }, | |
144 | + // { | |
145 | + // field : 'taskTypeReal', | |
146 | + // title : '实际任务类型' , | |
147 | + // formatter: function(value, row, index) { | |
148 | + // return $.table.selectDictLabel(shipmentTaskType, value); | |
149 | + // },sortable:true | |
150 | + // }, | |
146 | 151 | { |
147 | 152 | field : 'status', |
148 | 153 | title : '容器任务状态' , |
... | ... | @@ -426,6 +431,24 @@ |
426 | 431 | |
427 | 432 | } |
428 | 433 | |
434 | + function detailBatRemove() { | |
435 | + var rows=$("#bootstrap-table1").bootstrapTable('getSelections'); | |
436 | + if (rows.length == 0) { | |
437 | + $.modal.alertWarning("请至少选择一条记录"); | |
438 | + return; | |
439 | + } | |
440 | + $.modal.confirm("确认要撤销选中的" + rows.length + "条组盘吗?", function() { | |
441 | + var url = detailPrefix + "/remove"; | |
442 | + var ids = ""; | |
443 | + for(var i=0; i<rows.length; i++) { | |
444 | + ids = ids + rows[i].id + "," | |
445 | + } | |
446 | + var data = { "ids": ids.substring(0, ids.length-1) }; | |
447 | + $.operate.post(url, data); | |
448 | + // submit(url, "post", "json", data); | |
449 | + }); | |
450 | + } | |
451 | + | |
429 | 452 | |
430 | 453 | |
431 | 454 | </script> |
... | ... |