Commit 4f323b3547bbb8980b5f945629a155f1d2f27500
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
11 changed files
with
196 additions
and
32 deletions
src/main/java/com/huaheng/pc/config/configValue/controller/ConfigValueController.java
@@ -16,6 +16,8 @@ import com.huaheng.framework.web.page.TableDataInfo; | @@ -16,6 +16,8 @@ import com.huaheng.framework.web.page.TableDataInfo; | ||
16 | import com.huaheng.framework.web.page.TableSupport; | 16 | import com.huaheng.framework.web.page.TableSupport; |
17 | import com.huaheng.pc.config.configValue.domain.ConfigValue; | 17 | import com.huaheng.pc.config.configValue.domain.ConfigValue; |
18 | import com.huaheng.pc.config.configValue.service.ConfigValueService; | 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 | import io.swagger.annotations.Api; | 21 | import io.swagger.annotations.Api; |
20 | import io.swagger.annotations.ApiOperation; | 22 | import io.swagger.annotations.ApiOperation; |
21 | import io.swagger.annotations.ApiParam; | 23 | import io.swagger.annotations.ApiParam; |
@@ -35,6 +37,8 @@ public class ConfigValueController extends BaseController { | @@ -35,6 +37,8 @@ public class ConfigValueController extends BaseController { | ||
35 | 37 | ||
36 | @Resource | 38 | @Resource |
37 | private ConfigValueService configValueService; | 39 | private ConfigValueService configValueService; |
40 | + @Resource | ||
41 | + private CycleCountPreferenceService cycleCountPreferenceService; | ||
38 | 42 | ||
39 | private String prefix = "config/configValue"; | 43 | private String prefix = "config/configValue"; |
40 | 44 | ||
@@ -96,6 +100,17 @@ public class ConfigValueController extends BaseController { | @@ -96,6 +100,17 @@ public class ConfigValueController extends BaseController { | ||
96 | @PostMapping("/add") | 100 | @PostMapping("/add") |
97 | @ResponseBody | 101 | @ResponseBody |
98 | public AjaxResult addSave(ConfigValue configValue) { | 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 | configValue.setWarehouseCode(ShiroUtils.getWarehouseCode()); | 114 | configValue.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
100 | configValue.setCreatedBy(ShiroUtils.getLoginName()); | 115 | configValue.setCreatedBy(ShiroUtils.getLoginName()); |
101 | configValue.setLastUpdatedBy(ShiroUtils.getLoginName()); | 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,6 +14,8 @@ import com.huaheng.framework.web.domain.AjaxResult; | ||
14 | import com.huaheng.framework.web.page.PageDomain; | 14 | import com.huaheng.framework.web.page.PageDomain; |
15 | import com.huaheng.framework.web.page.TableDataInfo; | 15 | import com.huaheng.framework.web.page.TableDataInfo; |
16 | import com.huaheng.framework.web.page.TableSupport; | 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 | import com.huaheng.pc.config.cycleCountPreference.domain.CycleCountPreference; | 19 | import com.huaheng.pc.config.cycleCountPreference.domain.CycleCountPreference; |
18 | import com.huaheng.pc.config.cycleCountPreference.service.CycleCountPreferenceService; | 20 | import com.huaheng.pc.config.cycleCountPreference.service.CycleCountPreferenceService; |
19 | import com.huaheng.pc.config.receiptPreference.domain.ReceiptPreference; | 21 | import com.huaheng.pc.config.receiptPreference.domain.ReceiptPreference; |
@@ -36,6 +38,8 @@ public class cycleCountPreferenceController extends BaseController { | @@ -36,6 +38,8 @@ public class cycleCountPreferenceController extends BaseController { | ||
36 | 38 | ||
37 | @Resource | 39 | @Resource |
38 | private CycleCountPreferenceService cycleCountPreferenceService; | 40 | private CycleCountPreferenceService cycleCountPreferenceService; |
41 | + @Resource | ||
42 | + private ConfigValueService configValueService; | ||
39 | 43 | ||
40 | 44 | ||
41 | private String prefix = "config/cycleCountPreference"; | 45 | private String prefix = "config/cycleCountPreference"; |
@@ -126,6 +130,19 @@ public class cycleCountPreferenceController extends BaseController { | @@ -126,6 +130,19 @@ public class cycleCountPreferenceController extends BaseController { | ||
126 | @PostMapping("/edit") | 130 | @PostMapping("/edit") |
127 | @ResponseBody | 131 | @ResponseBody |
128 | public AjaxResult editSave(CycleCountPreference cycleCountPreference) { | 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 | cycleCountPreference.setLastUpdatedBy(ShiroUtils.getLoginName()); | 146 | cycleCountPreference.setLastUpdatedBy(ShiroUtils.getLoginName()); |
130 | cycleCountPreference.setLastUpdated(new Date()); | 147 | cycleCountPreference.setLastUpdated(new Date()); |
131 | return toAjax(cycleCountPreferenceService.updateById(cycleCountPreference)); | 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,8 +21,6 @@ import org.springframework.transaction.annotation.Transactional; | ||
21 | public class CycleCountPreferenceService extends ServiceImpl<CycleCountPreferenceMapper, CycleCountPreference> { | 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/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
@@ -482,6 +482,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | @@ -482,6 +482,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | ||
482 | List<CycleCountDetail> cycs = new ArrayList<>(); | 482 | List<CycleCountDetail> cycs = new ArrayList<>(); |
483 | /* | 483 | /* |
484 | 根据当前明细条目的盘点首选Code,取出显示要求,再根据显示要求隐藏或显示字段*/ | 484 | 根据当前明细条目的盘点首选Code,取出显示要求,再根据显示要求隐藏或显示字段*/ |
485 | + | ||
485 | /*//配置表 | 486 | /*//配置表 |
486 | ConfigValue configValue = new ConfigValue(); | 487 | ConfigValue configValue = new ConfigValue(); |
487 | configValue.setModuleType("cyclecount"); | 488 | configValue.setModuleType("cyclecount"); |
@@ -503,9 +504,6 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | @@ -503,9 +504,6 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | ||
503 | if(cycleCountPreference == null){ | 504 | if(cycleCountPreference == null){ |
504 | throw new SecurityException("没有对应的盘点首选项!"); | 505 | throw new SecurityException("没有对应的盘点首选项!"); |
505 | } | 506 | } |
506 | - if(cycleCountPreference.getEnable() == false){ | ||
507 | - throw new SecurityException("当前默认选中盘点首选项已停用!"); | ||
508 | - } | ||
509 | //判断字段 | 507 | //判断字段 |
510 | if(cycleCountPreference.getPromptLocation() == false){ | 508 | if(cycleCountPreference.getPromptLocation() == false){ |
511 | //库位 | 509 | //库位 |
src/main/java/com/huaheng/pc/task/taskDetail/controller/TaskDetailController.java
@@ -9,6 +9,7 @@ import com.huaheng.common.utils.security.ShiroUtils; | @@ -9,6 +9,7 @@ import com.huaheng.common.utils.security.ShiroUtils; | ||
9 | import com.huaheng.framework.web.page.PageDomain; | 9 | import com.huaheng.framework.web.page.PageDomain; |
10 | import com.huaheng.framework.web.page.TableSupport; | 10 | import com.huaheng.framework.web.page.TableSupport; |
11 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; | 11 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
12 | +import com.huaheng.pc.task.taskHeader.domain.TaskHeader; | ||
12 | import org.apache.shiro.authz.annotation.RequiresPermissions; | 13 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
13 | import org.springframework.stereotype.Controller; | 14 | import org.springframework.stereotype.Controller; |
14 | import org.springframework.ui.ModelMap; | 15 | import org.springframework.ui.ModelMap; |
@@ -41,6 +42,9 @@ public class TaskDetailController extends BaseController | @@ -41,6 +42,9 @@ public class TaskDetailController extends BaseController | ||
41 | @Resource | 42 | @Resource |
42 | private TaskDetailService taskDetailService; | 43 | private TaskDetailService taskDetailService; |
43 | 44 | ||
45 | + | ||
46 | + | ||
47 | + | ||
44 | @RequiresPermissions("task:taskHeader:view") | 48 | @RequiresPermissions("task:taskHeader:view") |
45 | @GetMapping("/{taskId}") | 49 | @GetMapping("/{taskId}") |
46 | public String taskDetail(@PathVariable("taskId") String taskId, ModelMap mmap) | 50 | public String taskDetail(@PathVariable("taskId") String taskId, ModelMap mmap) |
@@ -67,17 +71,32 @@ public class TaskDetailController extends BaseController | @@ -67,17 +71,32 @@ public class TaskDetailController extends BaseController | ||
67 | Integer pageSize = pageDomain.getPageSize(); | 71 | Integer pageSize = pageDomain.getPageSize(); |
68 | /** | 72 | /** |
69 | * 使用分页查询 | 73 | * 使用分页查询 |
74 | + * 700盘点 | ||
70 | */ | 75 | */ |
71 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | 76 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
72 | Page<TaskDetail> page = new Page<>(pageNum, pageSize); | 77 | Page<TaskDetail> page = new Page<>(pageNum, pageSize); |
73 | IPage<TaskDetail> iPage = taskDetailService.page(page, lambdaQueryWrapper); | 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 | } else { | 86 | } else { |
76 | List<TaskDetail> list = taskDetailService.list(lambdaQueryWrapper); | 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 | return getDataTable(list); | 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 | package com.huaheng.pc.task.taskDetail.service; | 1 | package com.huaheng.pc.task.taskDetail.service; |
2 | 2 | ||
3 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | ||
3 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; | 4 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
6 | + | ||
7 | +import java.util.List; | ||
8 | + | ||
5 | public interface TaskDetailService extends IService<TaskDetail>{ | 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 | package com.huaheng.pc.task.taskDetail.service; | 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 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
4 | import javax.annotation.Resource; | 12 | import javax.annotation.Resource; |
13 | +import java.util.ArrayList; | ||
5 | import java.util.List; | 14 | import java.util.List; |
15 | +import java.util.WeakHashMap; | ||
16 | + | ||
6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 17 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | import com.huaheng.pc.task.taskDetail.mapper.TaskDetailMapper; | 18 | import com.huaheng.pc.task.taskDetail.mapper.TaskDetailMapper; |
8 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; | 19 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
9 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; | 20 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
21 | +import org.springframework.transaction.annotation.Transactional; | ||
22 | + | ||
10 | @Service | 23 | @Service |
11 | public class TaskDetailServiceImpl extends ServiceImpl<TaskDetailMapper, TaskDetail> implements TaskDetailService{ | 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,6 +16,9 @@ import com.huaheng.framework.web.page.TableDataInfo; | ||
16 | import com.huaheng.framework.web.page.TableSupport; | 16 | import com.huaheng.framework.web.page.TableSupport; |
17 | import com.huaheng.pc.config.material.service.MaterialService; | 17 | import com.huaheng.pc.config.material.service.MaterialService; |
18 | import com.huaheng.pc.config.warehouse.domain.Warehouse; | 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 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; | 22 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
20 | import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper; | 23 | import com.huaheng.pc.task.taskHeader.mapper.TaskHeaderMapper; |
21 | import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; | 24 | import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; |
@@ -36,23 +39,23 @@ import java.util.List; | @@ -36,23 +39,23 @@ import java.util.List; | ||
36 | 39 | ||
37 | public class TaskHeaderController extends BaseController { | 40 | public class TaskHeaderController extends BaseController { |
38 | 41 | ||
42 | + | ||
43 | + @Resource | ||
44 | + private TaskHeaderService taskHeaderService; | ||
45 | + | ||
46 | + | ||
47 | + | ||
39 | private String prefix = "task/taskHeader"; | 48 | private String prefix = "task/taskHeader"; |
40 | 49 | ||
50 | + | ||
41 | @RequiresPermissions("task:taskHeader:view") | 51 | @RequiresPermissions("task:taskHeader:view") |
42 | @GetMapping() | 52 | @GetMapping() |
43 | public String taskHeader(HttpServletRequest request, ModelMap mmap) { | 53 | public String taskHeader(HttpServletRequest request, ModelMap mmap) { |
44 | - String InternalTaskType= request.getParameter("InternalTaskType"); | 54 | + String InternalTaskType= request.getParameter("InternalTaskType"); |
45 | mmap.put("InternalTaskType",InternalTaskType); | 55 | mmap.put("InternalTaskType",InternalTaskType); |
46 | return prefix + "/taskHeader"; | 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,14 +86,20 @@ public class TaskHeaderController extends BaseController { | ||
83 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | 86 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
84 | Page<TaskHeader> page = new Page<>(pageNum, pageSize); | 87 | Page<TaskHeader> page = new Page<>(pageNum, pageSize); |
85 | IPage<TaskHeader> iPage = taskHeaderService.page(page, lambdaQueryWrapper); | 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 | } else { | 94 | } else { |
88 | List<TaskHeader> list = taskHeaderService.list(lambdaQueryWrapper); | 95 | List<TaskHeader> list = taskHeaderService.list(lambdaQueryWrapper); |
96 | + if(InternalTaskType == 700){ | ||
97 | + list = taskHeaderService.preferenceRealize(list); | ||
98 | + } | ||
89 | return getDataTable(list); | 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 | package com.huaheng.pc.task.taskHeader.service; | 1 | package com.huaheng.pc.task.taskHeader.service; |
2 | 2 | ||
3 | import com.huaheng.framework.web.domain.AjaxResult; | 3 | import com.huaheng.framework.web.domain.AjaxResult; |
4 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | ||
4 | import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel; | 5 | import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel; |
5 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; | 6 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
6 | import com.baomidou.mybatisplus.extension.service.IService; | 7 | import com.baomidou.mybatisplus.extension.service.IService; |
@@ -24,7 +25,6 @@ public interface TaskHeaderService extends IService<TaskHeader>{ | @@ -24,7 +25,6 @@ public interface TaskHeaderService extends IService<TaskHeader>{ | ||
24 | 25 | ||
25 | AjaxResult createTransferTask(String sourceLocation, String destinationLocation); | 26 | AjaxResult createTransferTask(String sourceLocation, String destinationLocation); |
26 | 27 | ||
27 | - | ||
28 | AjaxResult createCheckOutTask(String[] ids); | 28 | AjaxResult createCheckOutTask(String[] ids); |
29 | 29 | ||
30 | AjaxResult completeSeeOutTask(TaskHeader taskHeader); | 30 | AjaxResult completeSeeOutTask(TaskHeader taskHeader); |
@@ -39,5 +39,7 @@ public interface TaskHeaderService extends IService<TaskHeader>{ | @@ -39,5 +39,7 @@ public interface TaskHeaderService extends IService<TaskHeader>{ | ||
39 | 39 | ||
40 | AjaxResult cancelTask(Integer[] taskIds) ; | 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,6 +106,24 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
106 | private TaskAssignService taskAssignService; | 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 | * 查询容器有无任务 |
src/main/resources/templates/task/taskHeader/taskHeader.html
@@ -283,11 +283,11 @@ | @@ -283,11 +283,11 @@ | ||
283 | }, | 283 | }, |
284 | { | 284 | { |
285 | field : 'id', | 285 | field : 'id', |
286 | - title : '明细Id' | 286 | + title : '明细ID' |
287 | }, | 287 | }, |
288 | { | 288 | { |
289 | field : 'taskId', | 289 | field : 'taskId', |
290 | - title : '任务Id', | 290 | + title : '任务头ID', |
291 | sortable: true | 291 | sortable: true |
292 | }, | 292 | }, |
293 | { | 293 | { |
@@ -295,17 +295,23 @@ | @@ -295,17 +295,23 @@ | ||
295 | title : '单据编码', | 295 | title : '单据编码', |
296 | }, | 296 | }, |
297 | { | 297 | { |
298 | + field : 'billDetailId', | ||
299 | + title : '单据明细ID', | ||
300 | + sortable: true, | ||
301 | + visible:true, | ||
302 | + }, | ||
303 | + { | ||
298 | field : 'materialCode', | 304 | field : 'materialCode', |
299 | - title : '存货编码', | ||
300 | - sortable: true | 305 | + title : '物料编码', |
306 | + | ||
301 | }, | 307 | }, |
302 | { | 308 | { |
303 | field : 'materialName', | 309 | field : 'materialName', |
304 | title : '物料名称', | 310 | title : '物料名称', |
305 | - sortable:true | 311 | + |
306 | }, | 312 | }, |
307 | { | 313 | { |
308 | - field : 'project', | 314 | + field : 'projectNo', |
309 | title : '项目号', | 315 | title : '项目号', |
310 | }, | 316 | }, |
311 | { | 317 | { |
@@ -495,14 +501,6 @@ | @@ -495,14 +501,6 @@ | ||
495 | $.operate.submit(url, "post", "json", data); | 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 | function queryParams(params) { | 505 | function queryParams(params) { |
508 | return { | 506 | return { |