Commit fdcf40a01fd8a58557d2b37e89c3f26bd16a53c7
Merge remote-tracking branch 'origin/develop' into develop
Showing
11 changed files
with
34 additions
and
35 deletions
src/main/java/com/huaheng/pc/config/configValue/controller/ConfigValueController.java
@@ -107,6 +107,9 @@ public class ConfigValueController extends BaseController { | @@ -107,6 +107,9 @@ public class ConfigValueController extends BaseController { | ||
107 | cycleCountPreferenceTemp.setWarehouseCode(configValue.getWarehouseCode()); | 107 | cycleCountPreferenceTemp.setWarehouseCode(configValue.getWarehouseCode()); |
108 | LambdaQueryWrapper<CycleCountPreference> preferenceLambdaQueryWrapper = Wrappers.lambdaQuery(cycleCountPreferenceTemp); | 108 | LambdaQueryWrapper<CycleCountPreference> preferenceLambdaQueryWrapper = Wrappers.lambdaQuery(cycleCountPreferenceTemp); |
109 | CycleCountPreference cycleCountPreference = cycleCountPreferenceService.getOne(preferenceLambdaQueryWrapper); | 109 | CycleCountPreference cycleCountPreference = cycleCountPreferenceService.getOne(preferenceLambdaQueryWrapper); |
110 | + if(cycleCountPreference == null){ | ||
111 | + return AjaxResult.error("盘点首选项编码错误,没有该条首选项!"); | ||
112 | + } | ||
110 | if(cycleCountPreference.getEnable() == false){ | 113 | if(cycleCountPreference.getEnable() == false){ |
111 | return AjaxResult.error("不能添加已停用的盘点首选项!"); | 114 | return AjaxResult.error("不能添加已停用的盘点首选项!"); |
112 | } | 115 | } |
src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java
@@ -161,6 +161,18 @@ public class cycleCountPreferenceController extends BaseController { | @@ -161,6 +161,18 @@ public class cycleCountPreferenceController extends BaseController { | ||
161 | } | 161 | } |
162 | List<Integer> list = new ArrayList<>(); | 162 | List<Integer> list = new ArrayList<>(); |
163 | for (Integer id : Convert.toIntArray(ids)) { | 163 | for (Integer id : Convert.toIntArray(ids)) { |
164 | + //校验该首选项是否在使用 | ||
165 | + CycleCountPreference cycleCountPreference = cycleCountPreferenceService.getById(id); | ||
166 | + ConfigValue configValueTemp = new ConfigValue(); | ||
167 | + configValueTemp.setModuleType("cyclecount"); | ||
168 | + configValueTemp.setWarehouseCode(cycleCountPreference.getWarehouseCode()); | ||
169 | + LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper = Wrappers.lambdaQuery(configValueTemp); | ||
170 | + ConfigValue configValue = configValueService.getOne(configValueLambdaQueryWrapper); | ||
171 | + if(configValue != null){ | ||
172 | + if(configValue.getIdentifier().equals(cycleCountPreference.getCode())){ | ||
173 | + return AjaxResult.error("该盘点首选项为系统配置默认选项,请删除系统配置中的选项再删除,删除失败!"); | ||
174 | + } | ||
175 | + } | ||
164 | list.add(id); | 176 | list.add(id); |
165 | } | 177 | } |
166 | return toAjax(cycleCountPreferenceService.removeByIds(list)); | 178 | return toAjax(cycleCountPreferenceService.removeByIds(list)); |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
@@ -480,8 +480,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | @@ -480,8 +480,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | ||
480 | @Override | 480 | @Override |
481 | public List<CycleCountDetail> preferenceRealize(List<CycleCountDetail> cycleCoutDetailList) { | 481 | public List<CycleCountDetail> preferenceRealize(List<CycleCountDetail> cycleCoutDetailList) { |
482 | List<CycleCountDetail> cycs = new ArrayList<>(); | 482 | List<CycleCountDetail> cycs = new ArrayList<>(); |
483 | - /* | ||
484 | - 根据当前明细条目的盘点首选Code,取出显示要求,再根据显示要求隐藏或显示字段*/ | 483 | + /*根据当前明细条目的盘点首选Code,取出显示要求,再根据显示要求隐藏或显示字段*/ |
485 | 484 | ||
486 | /*//配置表 | 485 | /*//配置表 |
487 | ConfigValue configValue = new ConfigValue(); | 486 | ConfigValue configValue = new ConfigValue(); |
@@ -518,6 +517,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | @@ -518,6 +517,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap | ||
518 | item.setMaterialCode(""); | 517 | item.setMaterialCode(""); |
519 | item.setMaterialName(""); | 518 | item.setMaterialName(""); |
520 | item.setMaterialUnit(""); | 519 | item.setMaterialUnit(""); |
520 | + item.setMaterialSpec(""); | ||
521 | } | 521 | } |
522 | if(cycleCountPreference.getPromptQuantity() == false){ | 522 | if(cycleCountPreference.getPromptQuantity() == false){ |
523 | //系统数量 | 523 | //系统数量 |
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/service/CycleCountHeaderServiceImpl.java
@@ -64,10 +64,9 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap | @@ -64,10 +64,9 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap | ||
64 | temp.setCompanyCode(cyclecountHeader.getCompanyCode()); | 64 | temp.setCompanyCode(cyclecountHeader.getCompanyCode()); |
65 | LambdaQueryWrapper<CycleCountDetail> lam = Wrappers.lambdaQuery(temp); | 65 | LambdaQueryWrapper<CycleCountDetail> lam = Wrappers.lambdaQuery(temp); |
66 | List<CycleCountDetail> list = cycleCountDetailService.list(lam); | 66 | List<CycleCountDetail> list = cycleCountDetailService.list(lam); |
67 | - | ||
68 | //当有子单的状态为100时触发主单的完成状态 | 67 | //当有子单的状态为100时触发主单的完成状态 |
69 | //100状态只有全部完成才写入主单 | 68 | //100状态只有全部完成才写入主单 |
70 | - long count100 = list.stream().filter(t->t.getEnableStatus() == 100).count(); | 69 | + long count100 = list.stream().filter(t->t.getEnableStatus() == 100).count(); //明细已完成的条数 |
71 | if(count100 == list.size() ){ | 70 | if(count100 == list.size() ){ |
72 | cyclecountHeader.setStatusCyc(100); | 71 | cyclecountHeader.setStatusCyc(100); |
73 | this.saveOrUpdate(cyclecountHeader); | 72 | this.saveOrUpdate(cyclecountHeader); |
@@ -87,25 +86,6 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap | @@ -87,25 +86,6 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap | ||
87 | } | 86 | } |
88 | 87 | ||
89 | } | 88 | } |
90 | - /* if( count ==0){ | ||
91 | - //说明子单据都还没有开始盘点 | ||
92 | - cyclecountHeader.setStatus(0); | ||
93 | - }else */ | ||
94 | - /* if(count == list.size()){ | ||
95 | - //说明盘点完成 | ||
96 | - long count2 = list.stream().filter(t->t.getGapQty().compareTo(BigDecimal.ZERO) != 0).count(); | ||
97 | - if(count2 > 0){ | ||
98 | - //说明有差异 | ||
99 | - cyclecountHeader.setStatusCyc(30); | ||
100 | - }else{ | ||
101 | - //说明无差异 | ||
102 | - cyclecountHeader.setStatusCyc(40); | ||
103 | - } | ||
104 | - }else{ | ||
105 | - //说明盘点中 | ||
106 | - cyclecountHeader.setStatusCyc(20); | ||
107 | - }*/ | ||
108 | - // this.saveOrUpdate(cyclecountHeader); | ||
109 | } | 89 | } |
110 | 90 | ||
111 | /** | 91 | /** |
@@ -150,8 +130,8 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap | @@ -150,8 +130,8 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap | ||
150 | CycleCountDetail temp = new CycleCountDetail(); | 130 | CycleCountDetail temp = new CycleCountDetail(); |
151 | temp.setWarehouseCode(ShiroUtils.getWarehouseCode()); | 131 | temp.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
152 | temp.setCycleCountHeadCode(cyclecountHeader.getCode()); | 132 | temp.setCycleCountHeadCode(cyclecountHeader.getCode()); |
153 | - LambdaQueryWrapper lm = Wrappers.lambdaQuery(temp); | ||
154 | - cycleCountDetailService.remove(lm); | 133 | + LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambdaQueryWrapper= Wrappers.lambdaQuery(temp); |
134 | + cycleCountDetailService.remove(cycleCountDetailLambdaQueryWrapper); | ||
155 | cycleCountHeaderMapper.deleteById(id); | 135 | cycleCountHeaderMapper.deleteById(id); |
156 | return AjaxResult.success("盘点主单和明细删除成功"); | 136 | return AjaxResult.success("盘点主单和明细删除成功"); |
157 | 137 |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
@@ -210,8 +210,8 @@ public class InventoryHeaderController extends BaseController | @@ -210,8 +210,8 @@ public class InventoryHeaderController extends BaseController | ||
210 | @ResponseBody | 210 | @ResponseBody |
211 | public TableDataInfo listEmptyContainer(String containerCode, String locationCode) | 211 | public TableDataInfo listEmptyContainer(String containerCode, String locationCode) |
212 | { | 212 | { |
213 | - containerCode = containerCode==null?"":containerCode.trim(); | ||
214 | - locationCode = locationCode==null?"":locationCode.trim(); | 213 | + containerCode = containerCode == null?"":containerCode.trim(); |
214 | + locationCode = locationCode == null?"":locationCode.trim(); | ||
215 | startPage(); | 215 | startPage(); |
216 | List<Location> list = containerService.getEmptyContainerInLocation(containerCode,locationCode,ShiroUtils.getWarehouseCode()); | 216 | List<Location> list = containerService.getEmptyContainerInLocation(containerCode,locationCode,ShiroUtils.getWarehouseCode()); |
217 | return getDataTable(list); | 217 | return getDataTable(list); |
src/main/java/com/huaheng/pc/task/taskDetail/service/TaskDetailServiceImpl.java
@@ -78,6 +78,7 @@ public class TaskDetailServiceImpl extends ServiceImpl<TaskDetailMapper, TaskDet | @@ -78,6 +78,7 @@ public class TaskDetailServiceImpl extends ServiceImpl<TaskDetailMapper, TaskDet | ||
78 | item.setMaterialCode(""); | 78 | item.setMaterialCode(""); |
79 | item.setMaterialName(""); | 79 | item.setMaterialName(""); |
80 | item.setMaterialUnit(""); | 80 | item.setMaterialUnit(""); |
81 | + item.setMaterialSpec(""); | ||
81 | } | 82 | } |
82 | if(cycleCountPreference.getPromptQuantity() == false){ | 83 | if(cycleCountPreference.getPromptQuantity() == false){ |
83 | //系统数量 | 84 | //系统数量 |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
@@ -106,6 +106,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -106,6 +106,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
106 | private TaskAssignService taskAssignService; | 106 | private TaskAssignService taskAssignService; |
107 | 107 | ||
108 | 108 | ||
109 | + | ||
110 | + | ||
111 | + | ||
109 | /** | 112 | /** |
110 | * 盘点任务首选项 | 113 | * 盘点任务首选项 |
111 | * @param taskHeaderList | 114 | * @param taskHeaderList |
@@ -114,7 +117,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -114,7 +117,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
114 | @Transactional | 117 | @Transactional |
115 | @Override | 118 | @Override |
116 | public List<TaskHeader> preferenceRealize(List<TaskHeader> taskHeaderList) { | 119 | public List<TaskHeader> preferenceRealize(List<TaskHeader> taskHeaderList) { |
117 | - //任务头,默认不显示库位,容器。 | 120 | + //盘点任务头,默认不显示库位,容器。 |
118 | List<TaskHeader> taskHeaders = new ArrayList<>(); | 121 | List<TaskHeader> taskHeaders = new ArrayList<>(); |
119 | for(TaskHeader item:taskHeaderList){ | 122 | for(TaskHeader item:taskHeaderList){ |
120 | item.setFromLocation(""); | 123 | item.setFromLocation(""); |
src/main/resources/templates/check/checkHeader/checkHeader.html
@@ -43,12 +43,12 @@ | @@ -43,12 +43,12 @@ | ||
43 | </div> | 43 | </div> |
44 | </form> | 44 | </form> |
45 | </div> | 45 | </div> |
46 | - <div class="btn-group hidden-xs" id="toolbar" role="group"> | 46 | + <!--<div class="btn-group hidden-xs" id="toolbar" role="group"> |
47 | <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | 47 | <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" |
48 | shiro:hasPermission="receipt:receiptHeader:remove"> | 48 | shiro:hasPermission="receipt:receiptHeader:remove"> |
49 | <i class="fa fa-trash-o"></i> 删除 | 49 | <i class="fa fa-trash-o"></i> 删除 |
50 | </a> | 50 | </a> |
51 | - </div> | 51 | + </div>--> |
52 | <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | 52 | <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> |
53 | </div> | 53 | </div> |
54 | 54 |
src/main/resources/templates/inventory/inventoryHeader/emptyCheckOut.html
@@ -12,14 +12,14 @@ | @@ -12,14 +12,14 @@ | ||
12 | </div> | 12 | </div> |
13 | </div> | 13 | </div> |
14 | <div class="form-group"> | 14 | <div class="form-group"> |
15 | - <label class="col-sm-3 control-label">源库位编码:</label> | 15 | + <label class="col-sm-3 control-label">库位编码:</label> |
16 | <div class="col-sm-8"> | 16 | <div class="col-sm-8"> |
17 | <input id="location" name="location" class="form-control" type="text"> | 17 | <input id="location" name="location" class="form-control" type="text"> |
18 | </div> | 18 | </div> |
19 | </div> | 19 | </div> |
20 | <div class="form-group"> | 20 | <div class="form-group"> |
21 | <div class="form-control-static col-sm-offset-9"> | 21 | <div class="form-control-static col-sm-offset-9"> |
22 | - <input type="button" class="btn-success btn" onclick="selectEmptyInOut()" value="选取" /> | 22 | + <!-- <input type="button" class="btn-success btn" onclick="selectEmptyInOut()" value="选取" />--> |
23 | <button type="submit" class="btn btn-primary">提交</button> | 23 | <button type="submit" class="btn btn-primary">提交</button> |
24 | <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | 24 | <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> |
25 | </div> | 25 | </div> |
src/main/resources/templates/inventory/inventoryHeader/emptyIn.html
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | 6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | <form class="form-horizontal m" id="form-task-emptyIn"> | 7 | <form class="form-horizontal m" id="form-task-emptyIn"> |
8 | <div class="form-group"> | 8 | <div class="form-group"> |
9 | - <label class="col-sm-3 control-label">容器编号:</label> | 9 | + <label class="col-sm-3 control-label">容器编码:</label> |
10 | <div class="col-sm-8"> | 10 | <div class="col-sm-8"> |
11 | <input id="containerCode" name="containerCode" class="form-control" type="text" > | 11 | <input id="containerCode" name="containerCode" class="form-control" type="text" > |
12 | </div> | 12 | </div> |
src/main/resources/templates/inventory/inventoryHeader/emptyOut.html
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | 6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | <form class="form-horizontal m" id="form-task-emptyOut"> | 7 | <form class="form-horizontal m" id="form-task-emptyOut"> |
8 | <div class="form-group"> | 8 | <div class="form-group"> |
9 | - <label class="col-sm-3 control-label">容器编号:</label> | 9 | + <label class="col-sm-3 control-label">容器编码:</label> |
10 | <div class="col-sm-8"> | 10 | <div class="col-sm-8"> |
11 | <input id="containerCode" name="containerCode" class="form-control" type="text"> | 11 | <input id="containerCode" name="containerCode" class="form-control" type="text"> |
12 | </div> | 12 | </div> |
@@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
19 | </div> | 19 | </div> |
20 | <div class="form-group"> | 20 | <div class="form-group"> |
21 | <div class="form-control-static col-sm-offset-9"> | 21 | <div class="form-control-static col-sm-offset-9"> |
22 | - <input type="button" class="btn-success btn" onclick="selectEmptyOut()" value="选取" /> | 22 | + <!--<input type="button" class="btn-success btn" onclick="selectEmptyOut()" value="选取" />--> |
23 | <button type="submit" class="btn btn-primary">提交</button> | 23 | <button type="submit" class="btn btn-primary">提交</button> |
24 | <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | 24 | <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> |
25 | </div> | 25 | </div> |