Commit b6f17d2bd1162f3369d046309287d8df8e6b98d9
Merge remote-tracking branch 'origin/develop' into develop
Showing
28 changed files
with
288 additions
and
107 deletions
src/main/java/com/huaheng/api/wcs/controller/EmptyOutHandle.java
... | ... | @@ -21,8 +21,7 @@ import javax.annotation.Resource; |
21 | 21 | */ |
22 | 22 | |
23 | 23 | @RestController |
24 | -@RequestMapping("/WCS/v2") | |
25 | -@Api(tags = {"OverrideHandle"}, description = "wcs空出处理接口") | |
24 | +@RequestMapping("/api/WCS/v2") | |
26 | 25 | public class EmptyOutHandle extends BaseController { |
27 | 26 | |
28 | 27 | @Resource |
... | ... |
src/main/java/com/huaheng/api/wcs/controller/OverrideHandle.java
... | ... | @@ -20,8 +20,7 @@ import javax.annotation.Resource; |
20 | 20 | */ |
21 | 21 | |
22 | 22 | @RestController |
23 | -@RequestMapping("/WCS/v2") | |
24 | -@Api(tags = {"OverrideHandle"}, description = "wcs重入处理接口") | |
23 | +@RequestMapping("/api/WCS/v2") | |
25 | 24 | public class OverrideHandle extends BaseController { |
26 | 25 | |
27 | 26 | @Resource |
... | ... |
src/main/java/com/huaheng/api/wcs/controller/TaskFinish.java
... | ... | @@ -21,8 +21,7 @@ import javax.annotation.Resource; |
21 | 21 | */ |
22 | 22 | |
23 | 23 | @RestController |
24 | -@RequestMapping("/WCS/v2") | |
25 | -@Api(tags = {"TaskFinish"}, description = "wcs任务完成数据接口") | |
24 | +@RequestMapping("/api/WCS/v2") | |
26 | 25 | public class TaskFinish extends BaseController { |
27 | 26 | |
28 | 27 | @Resource |
... | ... |
src/main/java/com/huaheng/api/wcs/controller/WarecellAllocation.java
... | ... | @@ -21,8 +21,7 @@ import javax.annotation.Resource; |
21 | 21 | */ |
22 | 22 | |
23 | 23 | @RestController |
24 | -@RequestMapping("/WCS/v2") | |
25 | -@Api(tags = {"WarecellAllocation"}, description = "wcs仓位分配接口") | |
24 | +@RequestMapping("/api/WCS/v2") | |
26 | 25 | public class WarecellAllocation extends BaseController { |
27 | 26 | |
28 | 27 | @Resource |
... | ... |
src/main/java/com/huaheng/api/wcs/service/emptyOutHandle/EmptyOutHandleServiceImpl.java
... | ... | @@ -38,6 +38,9 @@ public class EmptyOutHandleServiceImpl implements EmptyOutHandleService { |
38 | 38 | if(taskHeader == null){ |
39 | 39 | return AjaxResult.error("任务号错误,没有找到该任务"); |
40 | 40 | } |
41 | + if(taskHeader.getStatus() == 100){ | |
42 | + return AjaxResult.error("任务已完成"); | |
43 | + } | |
41 | 44 | |
42 | 45 | //3、修改该任务为空出,过后处理 |
43 | 46 | taskHeader.setExceptionCode("空托出库"); |
... | ... |
src/main/java/com/huaheng/api/wcs/service/overrideHandle/OverrideHandleServiceImpl.java
... | ... | @@ -78,6 +78,9 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { |
78 | 78 | if(taskHeader == null){ |
79 | 79 | return AjaxResult.error("任务号错误,没有找到该任务"); |
80 | 80 | } |
81 | + if(taskHeader.getStatus() == 100){ | |
82 | + return AjaxResult.error("任务已完成"); | |
83 | + } | |
81 | 84 | |
82 | 85 | //3、修改任务目的库位,修改入库组盘的库位,修改库位状态 |
83 | 86 | //修改原来目的库位的状态 |
... | ... | @@ -89,6 +92,7 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { |
89 | 92 | return AjaxResult.error("此任务的原目的库位在系统中不存在"); |
90 | 93 | } |
91 | 94 | location.setStatus("empty"); |
95 | + location.setContainerCode(""); | |
92 | 96 | flag = locationService.updateById(location); |
93 | 97 | if(flag == false){ |
94 | 98 | return AjaxResult.error("修改此任务的原目的库位错误"); |
... | ... | @@ -102,14 +106,19 @@ public class OverrideHandleServiceImpl implements OverrideHandleService { |
102 | 106 | */ |
103 | 107 | |
104 | 108 | Location newlocation =new Location(); |
105 | - | |
109 | + String code=ShiroUtils.getWarehouseCode(); | |
106 | 110 | //重入的库位由wcs提供 |
107 | 111 | if(!taskFinishDomain.getRedirectionLocationCode().equals("0")) { |
108 | - locationLam.eq(Location::getCode, taskFinishDomain.getToLocationCode()) | |
112 | + LambdaQueryWrapper<Location> locationLa = Wrappers.lambdaQuery(); | |
113 | + locationLa.eq(Location::getCode, taskFinishDomain.getRedirectionLocationCode()) | |
114 | + .eq(Location::getStatus,"empty") | |
109 | 115 | .eq(Location::getWarehouseCode, ShiroUtils.getWarehouseCode()); |
110 | - newlocation = locationService.getOne(locationLam); | |
116 | + newlocation = locationService.getOne(locationLa); | |
111 | 117 | if (newlocation == null) { |
112 | - throw new ServiceException("新目的库位在系统中不存在"); | |
118 | + throw new ServiceException("新目的库位在系统中不存在或非空闲"); | |
119 | + } | |
120 | + if(StringUtils.isNotEmpty(newlocation.getContainerCode())){ | |
121 | + throw new ServiceException("新目的库位在系统中已经有容器"); | |
113 | 122 | } |
114 | 123 | }else { |
115 | 124 | //重入的库位由wms提供 |
... | ... |
src/main/java/com/huaheng/pc/config/FilterConfigDetail/controller/FilterConfigDetailController.java
... | ... | @@ -123,6 +123,7 @@ public class FilterConfigDetailController extends BaseController { |
123 | 123 | } |
124 | 124 | filterConfigDetail.setModuleType(configHeader.getModuleType()); |
125 | 125 | filterConfigDetail.setRecordType(configHeader.getRecordType()); |
126 | + filterConfigDetail.setFilterCode(configHeader.getFilterCode()); | |
126 | 127 | filterConfigDetail.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
127 | 128 | filterConfigDetail.setCreatedBy(ShiroUtils.getLoginName()); |
128 | 129 | filterConfigDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); |
... | ... |
src/main/java/com/huaheng/pc/config/FilterConfigDetail/domain/FilterConfigDetail.java
... | ... | @@ -78,9 +78,9 @@ public class FilterConfigDetail implements Serializable { |
78 | 78 | @ApiModelProperty(value="全SQL") |
79 | 79 | private String statement; |
80 | 80 | |
81 | - @TableField(value = "sqll") | |
81 | + @TableField(value = "statements") | |
82 | 82 | @ApiModelProperty(value="后续分组排序") |
83 | - private String sqll; | |
83 | + private String statements; | |
84 | 84 | |
85 | 85 | /** |
86 | 86 | * 是否系统创建 |
... | ... |
src/main/java/com/huaheng/pc/config/configValue/controller/ConfigValueController.java
... | ... | @@ -16,6 +16,8 @@ import com.huaheng.framework.web.page.TableDataInfo; |
16 | 16 | import com.huaheng.framework.web.page.TableSupport; |
17 | 17 | import com.huaheng.pc.config.configValue.domain.ConfigValue; |
18 | 18 | import com.huaheng.pc.config.configValue.service.ConfigValueService; |
19 | +import com.huaheng.pc.config.cycleCountPreference.domain.CycleCountPreference; | |
20 | +import com.huaheng.pc.config.cycleCountPreference.service.CycleCountPreferenceService; | |
19 | 21 | import io.swagger.annotations.Api; |
20 | 22 | import io.swagger.annotations.ApiOperation; |
21 | 23 | import io.swagger.annotations.ApiParam; |
... | ... | @@ -35,6 +37,8 @@ public class ConfigValueController extends BaseController { |
35 | 37 | |
36 | 38 | @Resource |
37 | 39 | private ConfigValueService configValueService; |
40 | + @Resource | |
41 | + private CycleCountPreferenceService cycleCountPreferenceService; | |
38 | 42 | |
39 | 43 | private String prefix = "config/configValue"; |
40 | 44 | |
... | ... | @@ -96,6 +100,17 @@ public class ConfigValueController extends BaseController { |
96 | 100 | @PostMapping("/add") |
97 | 101 | @ResponseBody |
98 | 102 | public AjaxResult addSave(ConfigValue configValue) { |
103 | + //检测盘点首选项是否停用 | |
104 | + if(configValue.getRecordType().equals("cycleCountPreference")){ | |
105 | + CycleCountPreference cycleCountPreferenceTemp = new CycleCountPreference(); | |
106 | + cycleCountPreferenceTemp.setCode(configValue.getIdentifier()); | |
107 | + cycleCountPreferenceTemp.setWarehouseCode(configValue.getWarehouseCode()); | |
108 | + LambdaQueryWrapper<CycleCountPreference> preferenceLambdaQueryWrapper = Wrappers.lambdaQuery(cycleCountPreferenceTemp); | |
109 | + CycleCountPreference cycleCountPreference = cycleCountPreferenceService.getOne(preferenceLambdaQueryWrapper); | |
110 | + if(cycleCountPreference.getEnable() == false){ | |
111 | + return AjaxResult.error("不能添加已停用的盘点首选项!"); | |
112 | + } | |
113 | + } | |
99 | 114 | configValue.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
100 | 115 | configValue.setCreatedBy(ShiroUtils.getLoginName()); |
101 | 116 | configValue.setLastUpdatedBy(ShiroUtils.getLoginName()); |
... | ... |
src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java
... | ... | @@ -14,6 +14,8 @@ import com.huaheng.framework.web.domain.AjaxResult; |
14 | 14 | import com.huaheng.framework.web.page.PageDomain; |
15 | 15 | import com.huaheng.framework.web.page.TableDataInfo; |
16 | 16 | import com.huaheng.framework.web.page.TableSupport; |
17 | +import com.huaheng.pc.config.configValue.domain.ConfigValue; | |
18 | +import com.huaheng.pc.config.configValue.service.ConfigValueService; | |
17 | 19 | import com.huaheng.pc.config.cycleCountPreference.domain.CycleCountPreference; |
18 | 20 | import com.huaheng.pc.config.cycleCountPreference.service.CycleCountPreferenceService; |
19 | 21 | import com.huaheng.pc.config.receiptPreference.domain.ReceiptPreference; |
... | ... | @@ -36,6 +38,8 @@ public class cycleCountPreferenceController extends BaseController { |
36 | 38 | |
37 | 39 | @Resource |
38 | 40 | private CycleCountPreferenceService cycleCountPreferenceService; |
41 | + @Resource | |
42 | + private ConfigValueService configValueService; | |
39 | 43 | |
40 | 44 | |
41 | 45 | private String prefix = "config/cycleCountPreference"; |
... | ... | @@ -126,6 +130,19 @@ public class cycleCountPreferenceController extends BaseController { |
126 | 130 | @PostMapping("/edit") |
127 | 131 | @ResponseBody |
128 | 132 | public AjaxResult editSave(CycleCountPreference cycleCountPreference) { |
133 | + //不允许在被配置默认使用的情况先停用首选项 | |
134 | + if(cycleCountPreference.getEnable() == false){ | |
135 | + ConfigValue configValueTemp = new ConfigValue(); | |
136 | + configValueTemp.setModuleType("cyclecount"); | |
137 | + configValueTemp.setWarehouseCode(cycleCountPreference.getWarehouseCode()); | |
138 | + LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper = Wrappers.lambdaQuery(configValueTemp); | |
139 | + ConfigValue configValue = configValueService.getOne(configValueLambdaQueryWrapper); | |
140 | + if(configValue != null){ | |
141 | + if(configValue.getIdentifier().equals(cycleCountPreference.getCode())){ | |
142 | + return AjaxResult.error("该盘点首选项为系统配置默认选项,请删除系统配置中的选项再停用,修改失败!"); | |
143 | + } | |
144 | + } | |
145 | + } | |
129 | 146 | cycleCountPreference.setLastUpdatedBy(ShiroUtils.getLoginName()); |
130 | 147 | cycleCountPreference.setLastUpdated(new Date()); |
131 | 148 | return toAjax(cycleCountPreferenceService.updateById(cycleCountPreference)); |
... | ... |
src/main/java/com/huaheng/pc/config/cycleCountPreference/service/CycleCountPreferenceService.java
... | ... | @@ -21,8 +21,6 @@ import org.springframework.transaction.annotation.Transactional; |
21 | 21 | public class CycleCountPreferenceService extends ServiceImpl<CycleCountPreferenceMapper, CycleCountPreference> { |
22 | 22 | |
23 | 23 | |
24 | - @Resource | |
25 | - private CycleCountDetailService cycleCountDetailService; | |
26 | 24 | |
27 | 25 | |
28 | 26 | |
... | ... |
src/main/java/com/huaheng/pc/config/waveFlowDetail/controller/WaveFlowDetailController.java
... | ... | @@ -50,9 +50,9 @@ public class WaveFlowDetailController extends BaseController { |
50 | 50 | |
51 | 51 | |
52 | 52 | @RequiresPermissions("config:waveFlowDetail:view") |
53 | - @GetMapping("/list/{id}") | |
54 | - public String waveFlowDetail(@PathVariable("id")Integer id, ModelMap mmap) { | |
55 | - mmap.put("headerId",id); | |
53 | + @GetMapping("/list/{headerId}") | |
54 | + public String waveFlowDetail(@PathVariable("id")Integer headerId, ModelMap mmap) { | |
55 | + mmap.put("headerId",headerId); | |
56 | 56 | return prefix + "/waveFlowDetail"; |
57 | 57 | } |
58 | 58 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
... | ... | @@ -482,6 +482,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
482 | 482 | List<CycleCountDetail> cycs = new ArrayList<>(); |
483 | 483 | /* |
484 | 484 | 根据当前明细条目的盘点首选Code,取出显示要求,再根据显示要求隐藏或显示字段*/ |
485 | + | |
485 | 486 | /*//配置表 |
486 | 487 | ConfigValue configValue = new ConfigValue(); |
487 | 488 | configValue.setModuleType("cyclecount"); |
... | ... | @@ -503,9 +504,6 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
503 | 504 | if(cycleCountPreference == null){ |
504 | 505 | throw new SecurityException("没有对应的盘点首选项!"); |
505 | 506 | } |
506 | - if(cycleCountPreference.getEnable() == false){ | |
507 | - throw new SecurityException("当前默认选中盘点首选项已停用!"); | |
508 | - } | |
509 | 507 | //判断字段 |
510 | 508 | if(cycleCountPreference.getPromptLocation() == false){ |
511 | 509 | //库位 |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentHeader/service/ShipmentHeaderServiceImpl.java
... | ... | @@ -108,6 +108,7 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
108 | 108 | //说明没有货箱,则直接首位均为新建 |
109 | 109 | shipmentHeader.setFirstStatus(100); |
110 | 110 | shipmentHeader.setLastStatus(100); |
111 | + | |
111 | 112 | this.saveOrUpdate(shipmentHeader); |
112 | 113 | }else { |
113 | 114 | int firstStatus = map.get("maxStatus"); |
... | ... |
src/main/java/com/huaheng/pc/shipment/shippingCombination/service/ShippingCombinationService.java
... | ... | @@ -78,7 +78,7 @@ public class ShippingCombinationService { |
78 | 78 | |
79 | 79 | //根据sql查库存 |
80 | 80 | try { |
81 | - list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference); | |
81 | + list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getStatements(),shipmentPreference); | |
82 | 82 | }catch (Exception e){ |
83 | 83 | throw new ServiceException("sql错误"); |
84 | 84 | } |
... | ... | @@ -98,7 +98,7 @@ public class ShippingCombinationService { |
98 | 98 | } |
99 | 99 | |
100 | 100 | //根据sql查库存 |
101 | - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference); | |
101 | + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getStatements(),shipmentPreference); | |
102 | 102 | return list; |
103 | 103 | } |
104 | 104 | |
... | ... | @@ -112,7 +112,7 @@ public class ShippingCombinationService { |
112 | 112 | } |
113 | 113 | |
114 | 114 | //根据sql查库存 |
115 | - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference); | |
115 | + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getStatements(),shipmentPreference); | |
116 | 116 | return list; |
117 | 117 | } |
118 | 118 | |
... | ... |
src/main/java/com/huaheng/pc/task/taskDetail/controller/TaskDetailController.java
... | ... | @@ -9,6 +9,7 @@ import com.huaheng.common.utils.security.ShiroUtils; |
9 | 9 | import com.huaheng.framework.web.page.PageDomain; |
10 | 10 | import com.huaheng.framework.web.page.TableSupport; |
11 | 11 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
12 | +import com.huaheng.pc.task.taskHeader.domain.TaskHeader; | |
12 | 13 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
13 | 14 | import org.springframework.stereotype.Controller; |
14 | 15 | import org.springframework.ui.ModelMap; |
... | ... | @@ -41,6 +42,9 @@ public class TaskDetailController extends BaseController |
41 | 42 | @Resource |
42 | 43 | private TaskDetailService taskDetailService; |
43 | 44 | |
45 | + | |
46 | + | |
47 | + | |
44 | 48 | @RequiresPermissions("task:taskHeader:view") |
45 | 49 | @GetMapping("/{taskId}") |
46 | 50 | public String taskDetail(@PathVariable("taskId") String taskId, ModelMap mmap) |
... | ... | @@ -67,17 +71,32 @@ public class TaskDetailController extends BaseController |
67 | 71 | Integer pageSize = pageDomain.getPageSize(); |
68 | 72 | /** |
69 | 73 | * 使用分页查询 |
74 | + * 700盘点 | |
70 | 75 | */ |
71 | 76 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
72 | 77 | Page<TaskDetail> page = new Page<>(pageNum, pageSize); |
73 | 78 | IPage<TaskDetail> iPage = taskDetailService.page(page, lambdaQueryWrapper); |
74 | - return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | |
79 | + List<TaskDetail> iPages = iPage.getRecords(); | |
80 | + for(TaskDetail item:iPages){ | |
81 | + if(item.getTaskType() == 700){ | |
82 | + iPages = taskDetailService.preferenceRealize(iPages) ; | |
83 | + } | |
84 | + } | |
85 | + return getMpDataTable(iPages, iPage.getTotal()); | |
75 | 86 | } else { |
76 | 87 | List<TaskDetail> list = taskDetailService.list(lambdaQueryWrapper); |
88 | + for(TaskDetail items:list){ | |
89 | + if(items.getTaskType() == 700){ | |
90 | + list = taskDetailService.preferenceRealize(list); | |
91 | + } | |
92 | + } | |
77 | 93 | return getDataTable(list); |
78 | 94 | } |
79 | - | |
80 | 95 | } |
96 | + | |
97 | + | |
98 | + | |
99 | + | |
81 | 100 | // /** |
82 | 101 | // * 新增立库任务明细 |
83 | 102 | // */ |
... | ... |
src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailService.java
1 | 1 | package com.huaheng.pc.task.taskDetail.service; |
2 | 2 | |
3 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
3 | 4 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
4 | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
6 | + | |
7 | +import java.util.List; | |
8 | + | |
5 | 9 | public interface TaskDetailService extends IService<TaskDetail>{ |
6 | 10 | |
7 | 11 | |
12 | + List<TaskDetail> preferenceRealize (List<TaskDetail> cycleCoutDetailList); | |
13 | + | |
8 | 14 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailServiceImpl.java
1 | 1 | package com.huaheng.pc.task.taskDetail.service; |
2 | 2 | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
5 | +import com.huaheng.pc.config.configValue.domain.ConfigValue; | |
6 | +import com.huaheng.pc.config.configValue.service.ConfigValueService; | |
7 | +import com.huaheng.pc.config.cycleCountPreference.domain.CycleCountPreference; | |
8 | +import com.huaheng.pc.config.cycleCountPreference.service.CycleCountPreferenceService; | |
9 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
10 | +import com.huaheng.pc.inventory.cycleCountDetail.service.CycleCountDetailService; | |
3 | 11 | import org.springframework.stereotype.Service; |
4 | 12 | import javax.annotation.Resource; |
13 | +import java.util.ArrayList; | |
5 | 14 | import java.util.List; |
15 | +import java.util.WeakHashMap; | |
16 | + | |
6 | 17 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | 18 | import com.huaheng.pc.task.taskDetail.mapper.TaskDetailMapper; |
8 | 19 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
9 | 20 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
21 | +import org.springframework.transaction.annotation.Transactional; | |
22 | + | |
10 | 23 | @Service |
11 | 24 | public class TaskDetailServiceImpl extends ServiceImpl<TaskDetailMapper, TaskDetail> implements TaskDetailService{ |
12 | 25 | |
26 | + | |
27 | + @Resource | |
28 | + private CycleCountDetailService cycleCountDetailService; | |
29 | + @Resource | |
30 | + private CycleCountPreferenceService cycleCountPreferenceService; | |
31 | + | |
32 | + | |
33 | + | |
34 | + | |
35 | + | |
36 | + /** | |
37 | + * 盘点任务首选项 | |
38 | + * @param taskDetailList | |
39 | + * @return | |
40 | + */ | |
41 | + @Transactional | |
42 | + @Override | |
43 | + public List<TaskDetail> preferenceRealize(List<TaskDetail> taskDetailList) { | |
44 | + /*查出盘点明细,找出盘点首选项,根据首选项显示字段*/ | |
45 | + List<TaskDetail> taskDetails = new ArrayList<>(); | |
46 | + | |
47 | + for (TaskDetail item:taskDetailList){ | |
48 | + //盘点明细 | |
49 | + CycleCountDetail cycleCountDetailtemp = new CycleCountDetail(); | |
50 | + cycleCountDetailtemp.setCycleCountHeadCode(item.getBillCode()); | |
51 | + cycleCountDetailtemp.setId(item.getBillDetailId()); | |
52 | + LambdaQueryWrapper<CycleCountDetail> detailLambdaQueryWrapper = Wrappers.lambdaQuery(cycleCountDetailtemp); | |
53 | + CycleCountDetail cycleCountDetail = cycleCountDetailService.getOne(detailLambdaQueryWrapper); | |
54 | + if(cycleCountDetail == null){ | |
55 | + throw new SecurityException("没有找到子任务对应的盘点明细!"); | |
56 | + } | |
57 | + //找盘点首选项 | |
58 | + CycleCountPreference cycleCountPreferenceTemp = new CycleCountPreference(); | |
59 | + cycleCountPreferenceTemp.setCode(cycleCountDetail.getPreferenceCode()); | |
60 | + cycleCountPreferenceTemp.setWarehouseCode(cycleCountDetail.getWarehouseCode()); | |
61 | + LambdaQueryWrapper<CycleCountPreference> preferenceLambdaQueryWrapper = Wrappers.lambdaQuery(cycleCountPreferenceTemp); | |
62 | + CycleCountPreference cycleCountPreference = cycleCountPreferenceService.getOne(preferenceLambdaQueryWrapper); | |
63 | + if(cycleCountPreference == null){ | |
64 | + throw new SecurityException("没有找到盘点首选项!"); | |
65 | + } | |
66 | + //根据首选项判断数据 | |
67 | + if(cycleCountPreference.getPromptLocation() == false){ | |
68 | + //库位 | |
69 | + item.setFromLocation(""); | |
70 | + item.setToLocation(""); | |
71 | + } | |
72 | + if(cycleCountPreference.getPromptLpn() == false){ | |
73 | + //容器 | |
74 | + item.setContainerCode(""); | |
75 | + } | |
76 | + if(cycleCountPreference.getPromptItem() == false){ | |
77 | + //物料 | |
78 | + item.setMaterialCode(""); | |
79 | + item.setMaterialName(""); | |
80 | + item.setMaterialUnit(""); | |
81 | + } | |
82 | + if(cycleCountPreference.getPromptQuantity() == false){ | |
83 | + //系统数量 | |
84 | + item.setQty(null); | |
85 | + } | |
86 | + taskDetails.add(item); | |
87 | + } | |
88 | + return taskDetails; | |
89 | + } | |
90 | + | |
91 | + | |
92 | + | |
93 | + | |
94 | + | |
95 | + | |
96 | + | |
13 | 97 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/controller/TaskHeaderController.java
... | ... | @@ -16,6 +16,9 @@ import com.huaheng.framework.web.page.TableDataInfo; |
16 | 16 | import com.huaheng.framework.web.page.TableSupport; |
17 | 17 | import com.huaheng.pc.config.material.service.MaterialService; |
18 | 18 | import com.huaheng.pc.config.warehouse.domain.Warehouse; |
19 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
20 | +import com.huaheng.pc.task.taskDetail.domain.TaskDetail; | |
21 | +import com.huaheng.pc.task.taskDetail.service.TaskDetailService; | |
19 | 22 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
20 | 23 | import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper; |
21 | 24 | import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; |
... | ... | @@ -36,23 +39,23 @@ import java.util.List; |
36 | 39 | |
37 | 40 | public class TaskHeaderController extends BaseController { |
38 | 41 | |
42 | + | |
43 | + @Resource | |
44 | + private TaskHeaderService taskHeaderService; | |
45 | + | |
46 | + | |
47 | + | |
39 | 48 | private String prefix = "task/taskHeader"; |
40 | 49 | |
50 | + | |
41 | 51 | @RequiresPermissions("task:taskHeader:view") |
42 | 52 | @GetMapping() |
43 | 53 | public String taskHeader(HttpServletRequest request, ModelMap mmap) { |
44 | - String InternalTaskType= request.getParameter("InternalTaskType"); | |
54 | + String InternalTaskType= request.getParameter("InternalTaskType"); | |
45 | 55 | mmap.put("InternalTaskType",InternalTaskType); |
46 | 56 | return prefix + "/taskHeader"; |
47 | 57 | } |
48 | 58 | |
49 | - | |
50 | - @Resource | |
51 | - private TaskHeaderService taskHeaderService; | |
52 | - | |
53 | - | |
54 | - | |
55 | - | |
56 | 59 | /** |
57 | 60 | * 查询任务列表 |
58 | 61 | */ |
... | ... | @@ -83,14 +86,20 @@ public class TaskHeaderController extends BaseController { |
83 | 86 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
84 | 87 | Page<TaskHeader> page = new Page<>(pageNum, pageSize); |
85 | 88 | IPage<TaskHeader> iPage = taskHeaderService.page(page, lambdaQueryWrapper); |
86 | - return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | |
89 | + List<TaskHeader> iPages = iPage.getRecords(); | |
90 | + if(InternalTaskType == 700){ | |
91 | + iPages = taskHeaderService.preferenceRealize(iPages) ; | |
92 | + } | |
93 | + return getMpDataTable(iPages, iPage.getTotal()); | |
87 | 94 | } else { |
88 | 95 | List<TaskHeader> list = taskHeaderService.list(lambdaQueryWrapper); |
96 | + if(InternalTaskType == 700){ | |
97 | + list = taskHeaderService.preferenceRealize(list); | |
98 | + } | |
89 | 99 | return getDataTable(list); |
90 | 100 | } |
91 | 101 | } |
92 | 102 | |
93 | - | |
94 | 103 | /** |
95 | 104 | * 下发任务 |
96 | 105 | */ |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java
1 | 1 | package com.huaheng.pc.task.taskHeader.service; |
2 | 2 | |
3 | 3 | import com.huaheng.framework.web.domain.AjaxResult; |
4 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
4 | 5 | import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel; |
5 | 6 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
6 | 7 | import com.baomidou.mybatisplus.extension.service.IService; |
... | ... | @@ -24,7 +25,6 @@ public interface TaskHeaderService extends IService<TaskHeader>{ |
24 | 25 | |
25 | 26 | AjaxResult createTransferTask(String sourceLocation, String destinationLocation); |
26 | 27 | |
27 | - | |
28 | 28 | AjaxResult createCheckOutTask(String[] ids); |
29 | 29 | |
30 | 30 | AjaxResult completeSeeOutTask(TaskHeader taskHeader); |
... | ... | @@ -39,5 +39,7 @@ public interface TaskHeaderService extends IService<TaskHeader>{ |
39 | 39 | |
40 | 40 | AjaxResult cancelTask(Integer[] taskIds) ; |
41 | 41 | |
42 | + List<TaskHeader> preferenceRealize (List<TaskHeader> taskHeaderList); | |
43 | + | |
42 | 44 | |
43 | 45 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -106,6 +106,24 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
106 | 106 | private TaskAssignService taskAssignService; |
107 | 107 | |
108 | 108 | |
109 | + /** | |
110 | + * 盘点任务首选项 | |
111 | + * @param taskHeaderList | |
112 | + * @return | |
113 | + */ | |
114 | + @Transactional | |
115 | + @Override | |
116 | + public List<TaskHeader> preferenceRealize(List<TaskHeader> taskHeaderList) { | |
117 | + //任务头,默认不显示库位,容器。 | |
118 | + List<TaskHeader> taskHeaders = new ArrayList<>(); | |
119 | + for(TaskHeader item:taskHeaderList){ | |
120 | + item.setFromLocation(""); | |
121 | + item.setToLocation(""); | |
122 | + item.setContainerCode(""); | |
123 | + taskHeaders.add(item); | |
124 | + } | |
125 | + return taskHeaders; | |
126 | + } | |
109 | 127 | |
110 | 128 | /** |
111 | 129 | * 查询容器有无任务 |
... | ... | @@ -426,9 +444,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
426 | 444 | throw new ServiceException("任务(" + taskId + ")任务已经是完成的!"); |
427 | 445 | } |
428 | 446 | //如果没有库位不能完成 |
429 | - if (StringUtils.isEmpty(task.getFromLocation())) { | |
430 | - throw new ServiceException("任务" + taskId + "没有库位,执行中止"); | |
431 | - } | |
447 | +// if (StringUtils.isEmpty(task.getFromLocation())) { | |
448 | +// throw new ServiceException("任务" + taskId + "没有库位,执行中止"); | |
449 | +// } | |
432 | 450 | this.completeTask(task); |
433 | 451 | } |
434 | 452 | |
... | ... | @@ -1157,6 +1175,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1157 | 1175 | taskDetail.setCompanyCode(task.getCompanyCode()); |
1158 | 1176 | taskDetail.setMaterialCode(item.getMaterialCode()); |
1159 | 1177 | taskDetail.setMaterialName(item.getMaterialName()); |
1178 | + taskDetail.setMaterialSpec(item.getMaterialSpec()); | |
1179 | + taskDetail.setMaterialUnit(item.getMaterialUnit()); | |
1160 | 1180 | taskDetail.setBillCode(item.getReceiptCode()); |
1161 | 1181 | taskDetail.setBillDetailId(item.getReceiptDetailId()); |
1162 | 1182 | taskDetail.setBillCode(item.getReceiptCode()); |
... | ... |
src/main/resources/templates/config/filterConfigDetail/add.html
... | ... | @@ -24,12 +24,12 @@ |
24 | 24 | <!--<input id="recordType" name="recordType" class="form-control" type="text">--> |
25 | 25 | <!--</div>--> |
26 | 26 | <!--</div>--> |
27 | - <div class="form-group"> | |
28 | - <label class="col-sm-3 control-label">条件名:</label> | |
29 | - <div class="col-sm-8"> | |
30 | - <input id="filterCode" name="filterCode" class="form-control" type="text"> | |
31 | - </div> | |
32 | - </div> | |
27 | + <!--<div class="form-group">--> | |
28 | + <!--<label class="col-sm-3 control-label">条件名:</label>--> | |
29 | + <!--<div class="col-sm-8">--> | |
30 | + <!--<input id="filterCode" name="filterCode" class="form-control" type="text">--> | |
31 | + <!--</div>--> | |
32 | + <!--</div>--> | |
33 | 33 | <div class="form-group"> |
34 | 34 | <label class="col-sm-3 control-label">描述:</label> |
35 | 35 | <div class="col-sm-8"> |
... | ... | @@ -43,6 +43,12 @@ |
43 | 43 | </div> |
44 | 44 | </div> |
45 | 45 | <div class="form-group"> |
46 | + <label class="col-sm-3 control-label">后续分组排序:</label> | |
47 | + <div class="col-sm-8"> | |
48 | + <input id="statements" name="statements" class="form-control" type="text"> | |
49 | + </div> | |
50 | + </div> | |
51 | + <div class="form-group"> | |
46 | 52 | <label class="col-sm-3 control-label">是否系统创建:</label> |
47 | 53 | <div class="col-sm-8"> |
48 | 54 | <div class="onoffswitch"> |
... | ... | @@ -82,15 +88,6 @@ |
82 | 88 | code:{ |
83 | 89 | required:true, |
84 | 90 | }, |
85 | - // moduleType:{ | |
86 | - // required:true, | |
87 | - // }, | |
88 | - // recordType:{ | |
89 | - // required:true, | |
90 | - // }, | |
91 | - filterCode:{ | |
92 | - required:true, | |
93 | - }, | |
94 | 91 | }, |
95 | 92 | submitHandler: function(form) { |
96 | 93 | // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize()); |
... | ... |
src/main/resources/templates/config/filterConfigDetail/edit.html
... | ... | @@ -25,12 +25,7 @@ |
25 | 25 | <!--<input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}">--> |
26 | 26 | <!--</div>--> |
27 | 27 | <!--</div>--> |
28 | - <div class="form-group"> | |
29 | - <label class="col-sm-3 control-label">条件名:</label> | |
30 | - <div class="col-sm-8"> | |
31 | - <input id="filterCode" name="filterCode" class="form-control" type="text" th:field="*{filterCode}"> | |
32 | - </div> | |
33 | - </div> | |
28 | + | |
34 | 29 | <div class="form-group"> |
35 | 30 | <label class="col-sm-3 control-label">描述:</label> |
36 | 31 | <div class="col-sm-8"> |
... | ... | @@ -83,15 +78,6 @@ |
83 | 78 | code:{ |
84 | 79 | required:true, |
85 | 80 | }, |
86 | - // moduleType:{ | |
87 | - // required:true, | |
88 | - // }, | |
89 | - // recordType:{ | |
90 | - // required:true, | |
91 | - // }, | |
92 | - filterCode:{ | |
93 | - required:true, | |
94 | - }, | |
95 | 81 | }, |
96 | 82 | submitHandler: function(form) { |
97 | 83 | // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize()); |
... | ... |
src/main/resources/templates/config/filterConfigDetail/filterConfigDetail.html
src/main/resources/templates/config/waveMaster/add.html
... | ... | @@ -68,21 +68,25 @@ |
68 | 68 | <div class="form-group"> |
69 | 69 | <label class="col-sm-3 control-label">是否补货:</label> |
70 | 70 | <div class="col-sm-8"> |
71 | - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);"> | |
72 | - <input type="radio" id="needReplenishment1" name="needReplenishment" value="true" checked="checked" | |
73 | - class="radio_select"> | |
74 | - <label for="needReplenishment1">是</label> | |
75 | - </div> | |
76 | - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);"> | |
77 | - <input type="radio" id="needReplenishment2" name="needReplenishment" value="false"> | |
78 | - <label for="needReplenishment2">否</label> | |
71 | + <div class="onoffswitch"> | |
72 | + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="needReplenishment" name="needReplenishment"> | |
73 | + <label class="onoffswitch-label" for="needReplenishment"> | |
74 | + <span class="onoffswitch-inner"></span> | |
75 | + <span class="onoffswitch-switch"></span> | |
76 | + </label> | |
79 | 77 | </div> |
80 | 78 | </div> |
81 | 79 | </div> |
82 | 80 | <div class="form-group"> |
83 | 81 | <label class="col-sm-3 control-label">取消波次时保留补货任务:</label> |
84 | 82 | <div class="col-sm-8"> |
85 | - <input id="holdRplnTask" name="holdRplnTask" class="form-control" type="text"> | |
83 | + <div class="onoffswitch"> | |
84 | + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="holdRplnTask" name="holdRplnTask"> | |
85 | + <label class="onoffswitch-label" for="holdRplnTask"> | |
86 | + <span class="onoffswitch-inner"></span> | |
87 | + <span class="onoffswitch-switch"></span> | |
88 | + </label> | |
89 | + </div> | |
86 | 90 | </div> |
87 | 91 | </div> |
88 | 92 | <!--<div class="form-group"> |
... | ... |
src/main/resources/templates/config/waveMaster/edit.html
... | ... | @@ -69,23 +69,28 @@ |
69 | 69 | <div class="form-group"> |
70 | 70 | <label class="col-sm-3 control-label">是否补货:</label> |
71 | 71 | <div class="col-sm-8"> |
72 | - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);"> | |
73 | - <input type="radio" id="needReplenishment1" name="needReplenishment" value="true" th:field="*{needReplenishment}" | |
74 | - class="radio_select"> | |
75 | - <label for="needReplenishment1">是</label> | |
76 | - </div> | |
77 | - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);"> | |
78 | - <input type="radio" id="needReplenishment2" name="needReplenishment" value="false" th:field="*{needReplenishment}"> | |
79 | - <label for="needReplenishment2">否</label> | |
72 | + <div class="onoffswitch"> | |
73 | + <input type="checkbox" th:checked="*{needReplenishment}" class="onoffswitch-checkbox" id="needReplenishment" name="needReplenishment"> | |
74 | + <label class="onoffswitch-label" for="needReplenishment"> | |
75 | + <span class="onoffswitch-inner"></span> | |
76 | + <span class="onoffswitch-switch"></span> | |
77 | + </label> | |
80 | 78 | </div> |
81 | 79 | </div> |
82 | 80 | </div> |
83 | 81 | <div class="form-group"> |
84 | 82 | <label class="col-sm-3 control-label">取消波次时保留补货任务:</label> |
85 | 83 | <div class="col-sm-8"> |
86 | - <input id="holdRplnTask" name="holdRplnTask" class="form-control" type="text" th:field="*{holdRplnTask}"> | |
84 | + <div class="onoffswitch"> | |
85 | + <input type="checkbox" th:checked="*{holdRplnTask}" class="onoffswitch-checkbox" id="holdRplnTask" name="holdRplnTask"> | |
86 | + <label class="onoffswitch-label" for="holdRplnTask"> | |
87 | + <span class="onoffswitch-inner"></span> | |
88 | + <span class="onoffswitch-switch"></span> | |
89 | + </label> | |
90 | + </div> | |
87 | 91 | </div> |
88 | 92 | </div> |
93 | + | |
89 | 94 | <!--<div class="form-group"> |
90 | 95 | <label class="col-sm-3 control-label">数据版本:</label> |
91 | 96 | <div class="col-sm-8"> |
... | ... |
src/main/resources/templates/config/waveMaster/waveMaster.html
... | ... | @@ -104,8 +104,8 @@ |
104 | 104 | <div class="tab-pane fade" id="tabDetail"> |
105 | 105 | |
106 | 106 | <div class="btn-group hidden-xs" id="toolbar2" role="group"> |
107 | - <a class="btn btn-outline btn-success btn-rounded" onclick="detailAdd()" | |
108 | - shiro:hasPermission="config:waveFlowHeader:add"> | |
107 | + <a class="btn btn-outline btn-success btn-rounded" onclick="detailAdd()" style="display:none;" | |
108 | + id="detailAdd" shiro:hasPermission="config:waveFlowHeader:add"> | |
109 | 109 | <i class="fa fa-plus"></i> 新增 |
110 | 110 | </a> |
111 | 111 | <a class="btn btn-outline btn-danger btn-rounded" onclick="detailBatRemove()" |
... | ... | @@ -216,7 +216,15 @@ |
216 | 216 | }, |
217 | 217 | { |
218 | 218 | field : 'holdRplnTask', |
219 | - title : '取消波次时保留补货任务' | |
219 | + title : '取消波次时保留补货任务', | |
220 | + formatter: function (value, item, index) { | |
221 | + if (value==true) { | |
222 | + return '<span class="badge" style="background-color: #00B83F;color: white;width: 36px;">' + ' 是 ' + '</span>'; | |
223 | + } | |
224 | + else if (value==false) { | |
225 | + return '<span class="badge" style="background-color: #ff0000;color: white;width: 36px;">' + ' 否 ' + '</span>'; | |
226 | + } | |
227 | + } | |
220 | 228 | }, |
221 | 229 | { |
222 | 230 | field : 'created', |
... | ... | @@ -524,6 +532,7 @@ |
524 | 532 | |
525 | 533 | function detailReg(rowId){ |
526 | 534 | headerId = rowId; |
535 | + $("#detailAdd").css("display","block"); | |
527 | 536 | detail(); |
528 | 537 | } |
529 | 538 | |
... | ... | @@ -598,7 +607,7 @@ |
598 | 607 | } |
599 | 608 | |
600 | 609 | function detailAdd() { |
601 | - var url = prefix2+"/add"; | |
610 | + var url = prefix2+"/add/"+headerId; | |
602 | 611 | $.modal.open("添加明细", url); |
603 | 612 | } |
604 | 613 | |
... | ... |
src/main/resources/templates/task/taskHeader/taskHeader.html
... | ... | @@ -283,11 +283,11 @@ |
283 | 283 | }, |
284 | 284 | { |
285 | 285 | field : 'id', |
286 | - title : '明细Id' | |
286 | + title : '明细ID' | |
287 | 287 | }, |
288 | 288 | { |
289 | 289 | field : 'taskId', |
290 | - title : '任务Id', | |
290 | + title : '任务头ID', | |
291 | 291 | sortable: true |
292 | 292 | }, |
293 | 293 | { |
... | ... | @@ -295,17 +295,23 @@ |
295 | 295 | title : '单据编码', |
296 | 296 | }, |
297 | 297 | { |
298 | + field : 'billDetailId', | |
299 | + title : '单据明细ID', | |
300 | + sortable: true, | |
301 | + visible:true, | |
302 | + }, | |
303 | + { | |
298 | 304 | field : 'materialCode', |
299 | - title : '存货编码', | |
300 | - sortable: true | |
305 | + title : '物料编码', | |
306 | + | |
301 | 307 | }, |
302 | 308 | { |
303 | 309 | field : 'materialName', |
304 | 310 | title : '物料名称', |
305 | - sortable:true | |
311 | + | |
306 | 312 | }, |
307 | 313 | { |
308 | - field : 'project', | |
314 | + field : 'projectNo', | |
309 | 315 | title : '项目号', |
310 | 316 | }, |
311 | 317 | { |
... | ... | @@ -495,14 +501,6 @@ |
495 | 501 | $.operate.submit(url, "post", "json", data); |
496 | 502 | }) |
497 | 503 | } |
498 | - | |
499 | - function emptyIn() { | |
500 | - $.modal.open("空托盘入库",prefix+"/emptyIn") | |
501 | - } | |
502 | - | |
503 | - function emptyOut() { | |
504 | - $.modal.open("空托盘出库",prefix+"/emptyOut") | |
505 | - } | |
506 | 504 | |
507 | 505 | function queryParams(params) { |
508 | 506 | return { |
... | ... |