Commit bdd94bd9565974b7424be87b6f6c990059978523
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
16 changed files
with
163 additions
and
58 deletions
src/main/java/com/huaheng/pc/check/checkHeader/controller/CheckHeaderController.java
... | ... | @@ -74,7 +74,8 @@ public class CheckHeaderController extends BaseController { |
74 | 74 | .eq(StringUtils.isNotNull(checkHeader.getCode()), CheckHeader::getCode, checkHeader.getCode()) |
75 | 75 | .eq(StringUtils.isNotEmpty(checkHeader.getReferCode()), CheckHeader::getReferCode, checkHeader.getReferCode()) |
76 | 76 | .eq(StringUtils.isNotEmpty(checkHeader.getStatus()), CheckHeader::getStatus, checkHeader.getStatus()) |
77 | - .in(StringUtils.isNotEmpty(checkHeader.getType()), CheckHeader::getType, types); | |
77 | + .in(StringUtils.isNotEmpty(checkHeader.getType()), CheckHeader::getType, types) | |
78 | + .orderByDesc(CheckHeader::getCreated); | |
78 | 79 | |
79 | 80 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
80 | 81 | // 使用分页查询 |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
... | ... | @@ -2,12 +2,15 @@ package com.huaheng.pc.inventory.cycleCountDetail.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
5 | 6 | import com.huaheng.common.exception.service.ServiceException; |
6 | 7 | import com.huaheng.common.utils.StringUtils; |
7 | 8 | import com.huaheng.common.utils.security.ShiroUtils; |
8 | 9 | import com.huaheng.framework.web.domain.AjaxResult; |
9 | 10 | import com.huaheng.pc.config.location.domain.Location; |
10 | 11 | import com.huaheng.pc.config.location.service.LocationService; |
12 | +import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
13 | +import com.huaheng.pc.inventory.cycleCountDetail.mapper.CycleCountDetailMapper; | |
11 | 14 | import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader; |
12 | 15 | import com.huaheng.pc.inventory.cycleCountHeader.service.CycleCountHeaderService; |
13 | 16 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
... | ... | @@ -16,15 +19,10 @@ import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
16 | 19 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
17 | 20 | import com.huaheng.pc.task.taskHeader.domain.TaskHeader; |
18 | 21 | import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; |
19 | -import javafx.concurrent.Task; | |
20 | 22 | import org.springframework.stereotype.Service; |
21 | -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
22 | -import com.huaheng.pc.inventory.cycleCountDetail.mapper.CycleCountDetailMapper; | |
23 | -import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; | |
24 | 23 | import org.springframework.transaction.annotation.Transactional; |
25 | 24 | |
26 | 25 | import javax.annotation.Resource; |
27 | -import java.math.BigDecimal; | |
28 | 26 | import java.util.ArrayList; |
29 | 27 | import java.util.Date; |
30 | 28 | import java.util.List; |
... | ... | @@ -174,6 +172,8 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
174 | 172 | @Override |
175 | 173 | @Transactional |
176 | 174 | public AjaxResult createCycleCoutTaskByDetailId(Integer cycleCoutdetailId) { |
175 | + /*任务主表中存在库位,在盘点明细中生成任务时,不同的库位需要生成不同的主任务*/ | |
176 | + | |
177 | 177 | |
178 | 178 | CycleCountDetail cycleCountDetail = this.getById(cycleCoutdetailId); |
179 | 179 | if(cycleCountDetail == null ){ |
... | ... | @@ -214,7 +214,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
214 | 214 | taskDetail.setTaskId(task.getId());//主单ID |
215 | 215 | taskDetail.setTaskType(task.getTaskType()); |
216 | 216 | taskDetail.setBillCode(cycleCountDetail.getCycleCountHeadCode()); |
217 | - taskDetail.setBillDetailId(taskDetail.getId()); | |
217 | + taskDetail.setBillDetailId(cycleCountDetail.getId()); | |
218 | 218 | taskDetail.setMaterialCode(cycleCountDetail.getMaterialCode()); |
219 | 219 | taskDetail.setMaterialName(cycleCountDetail.getMaterialName()); |
220 | 220 | taskDetail.setMaterialSpec(cycleCountDetail.getMaterialSpec()); |
... | ... | @@ -243,6 +243,15 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
243 | 243 | cycleCountDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); |
244 | 244 | cycleCountDetail.setEnableStatus(5); |
245 | 245 | this.saveOrUpdate(cycleCountDetail); |
246 | + //修改主单状态 | |
247 | + CycleCountHeader cycleCountHeader = new CycleCountHeader(); | |
248 | + cycleCountHeader.setMasterCode(cycleCountDetail.getCycleCountHeadCode()); | |
249 | + cycleCountHeader.setWarehouseCode(cycleCountDetail.getWarehouseCode()); | |
250 | + cycleCountHeader.setCompanyCode(cycleCountDetail.getCompanyCode()); | |
251 | + LambdaQueryWrapper<CycleCountHeader> lamb = Wrappers.lambdaQuery(cycleCountHeader); | |
252 | + cycleCountHeader = cycleCountHeaderService.getOne(lamb); | |
253 | + cycleCountHeader.setStatusCyc(10); | |
254 | + cycleCountHeaderService.saveOrUpdate(cycleCountHeader); | |
246 | 255 | return AjaxResult.success("盘点任务生成成功"); |
247 | 256 | } |
248 | 257 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/service/CycleCountHeaderService.java
... | ... | @@ -8,6 +8,9 @@ import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader; |
8 | 8 | public interface CycleCountHeaderService extends IService<CycleCountHeader> { |
9 | 9 | |
10 | 10 | |
11 | + | |
12 | + void updataHeaderStatus(String cycleCountHeaderCode); | |
13 | + | |
11 | 14 | String createCode(); |
12 | 15 | //生成调整单 |
13 | 16 | AjaxResult insertByAdjust(Integer headId); |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/service/CycleCountHeaderServiceImpl.java
... | ... | @@ -17,10 +17,8 @@ import javax.annotation.Resource; |
17 | 17 | import java.math.BigDecimal; |
18 | 18 | import java.security.SecureRandomSpi; |
19 | 19 | import java.text.SimpleDateFormat; |
20 | -import java.util.ArrayList; | |
21 | -import java.util.Date; | |
22 | -import java.util.List; | |
23 | -import java.util.WeakHashMap; | |
20 | +import java.util.*; | |
21 | +import java.util.stream.Collectors; | |
24 | 22 | |
25 | 23 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
26 | 24 | import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader; |
... | ... | @@ -43,9 +41,72 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
43 | 41 | |
44 | 42 | |
45 | 43 | |
44 | + /** | |
45 | + * 更新盘点主单状态 | |
46 | + * @param cycleCountHeaderCode | |
47 | + */ | |
48 | + @Transactional | |
49 | + @Override | |
50 | + public void updataHeaderStatus(String cycleCountHeaderCode) { | |
51 | + //查询明细单状态,然后更新主单状态 | |
52 | + //执行中时,对比主单状态,比主单数值小的不改变主单,明细单大于主单状态时改变主单状态到和明细单相同 | |
53 | + //完成时在全部单据都完成后才能修改主单状态为完成 | |
46 | 54 | |
55 | + CycleCountHeader cyclecountHeader = new CycleCountHeader(); | |
56 | + cyclecountHeader.setMasterCode(cycleCountHeaderCode); | |
57 | + cyclecountHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
58 | + LambdaQueryWrapper<CycleCountHeader> lamb = Wrappers.lambdaQuery(cyclecountHeader); | |
59 | + cyclecountHeader = this.getOne(lamb); | |
47 | 60 | |
61 | + CycleCountDetail temp = new CycleCountDetail(); | |
62 | + temp.setCycleCountHeadCode(cyclecountHeader.getMasterCode()); | |
63 | + temp.setWarehouseCode(cyclecountHeader.getWarehouseCode()); | |
64 | + temp.setCompanyCode(cyclecountHeader.getCompanyCode()); | |
65 | + LambdaQueryWrapper<CycleCountDetail> lam = Wrappers.lambdaQuery(temp); | |
66 | + List<CycleCountDetail> list = cycleCountDetailService.list(lam); | |
67 | + | |
68 | + //当有子单的状态为100时触发主单的完成状态 | |
69 | + //100状态只有全部完成才写入主单 | |
70 | + long count100 = list.stream().filter(t->t.getEnableStatus() == 100).count(); | |
71 | + if(count100 == list.size() ){ | |
72 | + cyclecountHeader.setStatusCyc(100); | |
73 | + this.saveOrUpdate(cyclecountHeader); | |
74 | + } | |
75 | + //有任何子单没有完成则主单不修改为100 | |
76 | + //有到100的子单时,主单的状态一定是100的前一个状态,所以状态不变 | |
77 | + if(count100 == 0){ | |
78 | + //所有子单状态比较主单状态,只有在明细单大于主单状态时才更改主单状态 | |
79 | + int headerStatus = cyclecountHeader.getStatusCyc(); | |
80 | + long count = list.stream().filter(t->t.getEnableStatus() > headerStatus).count(); | |
81 | + if(count > 0 ){ | |
82 | + //stream流取出明细状态中最大的值,赋给主单状态 | |
83 | + List<CycleCountDetail> cycleCountDetailList = list.stream().sorted( | |
84 | + Comparator.comparing(CycleCountDetail::getEnableStatus).reversed()).collect(Collectors.toList()); | |
85 | + cyclecountHeader.setStatusCyc(cycleCountDetailList.get(0).getEnableStatus()); | |
86 | + this.saveOrUpdate(cyclecountHeader); | |
87 | + } | |
48 | 88 | |
89 | + } | |
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 | + } | |
49 | 110 | |
50 | 111 | /** |
51 | 112 | * 生成盘点单主Code |
... | ... | @@ -60,7 +121,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
60 | 121 | //如果指定类型的最后的code存在,并且日期一致。那么 code = 单类型 + 年月日 + (排序号 + 1) |
61 | 122 | if (maxCode != null && maxCode.substring(maxCode.length() - 13, maxCode.length() - 5).equals(df.format(now))) |
62 | 123 | { |
63 | - Integer Count = Integer.valueOf(maxCode.substring(maxCode.length() - 5)); | |
124 | + Integer Count = Integer.valueOf(maxCode.substring(maxCode.length() - 5,maxCode.length())); | |
64 | 125 | code = "PD" + df.format(now) + String.format("%05d", Count + 1); |
65 | 126 | } |
66 | 127 | else |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailService.java
... | ... | @@ -3,7 +3,6 @@ package com.huaheng.pc.receipt.receiptContainerDetail.service; |
3 | 3 | import com.huaheng.framework.web.domain.AjaxResult; |
4 | 4 | import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; |
5 | 5 | import com.baomidou.mybatisplus.extension.service.IService; |
6 | -import com.sun.org.apache.xpath.internal.operations.Bool; | |
7 | 6 | |
8 | 7 | import java.util.List; |
9 | 8 | import java.util.Map; |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
... | ... | @@ -86,7 +86,8 @@ public class ReceiptContainerHeaderController extends BaseController { |
86 | 86 | .eq(StringUtils.isNotEmpty(receiptContainerHeader.getTaskType()),ReceiptContainerHeader::getTaskType, receiptContainerHeader.getTaskType()) |
87 | 87 | .eq(StringUtils.isNotNull(receiptContainerHeader.getStatus()),ReceiptContainerHeader::getStatus, receiptContainerHeader.getStatus()) |
88 | 88 | .eq(StringUtils.isNotEmpty(receiptContainerHeader.getCreatedBy()),ReceiptContainerHeader::getCreatedBy, receiptContainerHeader.getCreatedBy()) |
89 | - .inSql(StringUtils.isNotEmpty(receiptCode), ReceiptContainerHeader::getId, sql); | |
89 | + .inSql(StringUtils.isNotEmpty(receiptCode), ReceiptContainerHeader::getId, sql) | |
90 | + .orderByDesc(ReceiptContainerHeader::getId); | |
90 | 91 | |
91 | 92 | if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ |
92 | 93 | /** |
... | ... | @@ -127,6 +128,7 @@ public class ReceiptContainerHeaderController extends BaseController { |
127 | 128 | if (StringUtils.isEmpty(ids)){ |
128 | 129 | return AjaxResult.error("id不能为空"); |
129 | 130 | } |
131 | + this.position(ids); | |
130 | 132 | List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); |
131 | 133 | Integer maxId = idList.stream().max(Comparator.comparing(Integer::intValue)).orElse(null); |
132 | 134 | |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
... | ... | @@ -272,12 +272,15 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
272 | 272 | |
273 | 273 | } |
274 | 274 | |
275 | + /** | |
276 | + * 入库单审核 | |
277 | + * @param ids | |
278 | + * @param approval | |
279 | + * @return | |
280 | + */ | |
275 | 281 | @Override |
276 | 282 | public AjaxResult approval(String ids, Integer approval) { |
277 | 283 | ReceiptHeader receiptHeader = new ReceiptHeader(); |
278 | - if (approval != 10 || approval != 20 || approval != 100){ | |
279 | - return AjaxResult.error("传入参数错误"); | |
280 | - } | |
281 | 284 | if (StringUtils.isEmpty(ids)){ |
282 | 285 | return AjaxResult.error("id不能为空"); |
283 | 286 | } |
... | ... | @@ -294,12 +297,14 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
294 | 297 | lambda.eq(ReceiptDetail::getReceiptId, id); |
295 | 298 | List<ReceiptDetail> receiptDetails = this.list(lambda); |
296 | 299 | for (ReceiptDetail receiptDetail : receiptDetails){ |
300 | + receiptDetail.setProcessStamp("100"); | |
297 | 301 | receiptDetail = this.queryflow(receiptDetail); |
298 | 302 | if (!this.updateById(receiptDetail)){ |
299 | 303 | throw new ServiceException("更新入库明细表失败"); |
300 | 304 | } |
301 | 305 | } |
302 | 306 | } |
307 | + this.updateReceiptHeaderLastStatus(id); | |
303 | 308 | } |
304 | 309 | return AjaxResult.success("审核完成"); |
305 | 310 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
... | ... | @@ -137,6 +137,9 @@ public class ReceiptHeaderController extends BaseController { |
137 | 137 | @PostMapping("/edit") |
138 | 138 | @ResponseBody |
139 | 139 | public AjaxResult editSave(ReceiptHeader receiptHeader) { |
140 | + if (receiptHeader.getFirstStatus() >100 | receiptHeader.getLastStatus()>100){ | |
141 | + return AjaxResult.error("已进入订单池,不允许修改"); | |
142 | + } | |
140 | 143 | receiptHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); |
141 | 144 | return toAjax(receiptHeaderService.updateById(receiptHeader)); |
142 | 145 | } |
... | ... | @@ -250,7 +253,7 @@ public class ReceiptHeaderController extends BaseController { |
250 | 253 | } |
251 | 254 | |
252 | 255 | /** |
253 | - * 入库质检 | |
256 | + * 入库单打印 | |
254 | 257 | */ |
255 | 258 | @ApiOperation(value="打印入库单报表", notes="打印入库单报表", httpMethod = "POST") |
256 | 259 | @RequiresPermissions("receipt:receiptHeader:check") |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
src/main/java/com/huaheng/pc/receipt/receiptHeaderHistory/service/ReceiptHeaderHistoryService.java
... | ... | @@ -37,7 +37,8 @@ public class ReceiptHeaderHistoryService extends ServiceImpl<ReceiptHeaderHistor |
37 | 37 | public AjaxResult add(Integer id){ |
38 | 38 | ReceiptHeader receiptHeader = receiptHeaderService.getById(id); |
39 | 39 | if (receiptHeader == null) return AjaxResult.success(""); |
40 | - if(receiptHeader.getFirstStatus()>=800 && receiptHeader.getLastStatus()>=800){ | |
40 | + if((receiptHeader.getFirstStatus()>=800 && receiptHeader.getLastStatus()>=800)|| | |
41 | + (receiptHeader.getFirstStatus()<100 &receiptHeader.getLastStatus()<100)){ | |
41 | 42 | ReceiptHeaderHistory receiptHeaderHistory = new ReceiptHeaderHistory(); |
42 | 43 | List<ReceiptDetailHistory> receiptDetailHistoryList = new ArrayList<>(); |
43 | 44 | //查询入库单明细 |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -16,6 +16,7 @@ import com.huaheng.pc.config.location.service.LocationService; |
16 | 16 | import com.huaheng.pc.inventory.cycleCountDetail.domain.CycleCountDetail; |
17 | 17 | import com.huaheng.pc.inventory.cycleCountDetail.service.CycleCountDetailService; |
18 | 18 | import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader; |
19 | +import com.huaheng.pc.inventory.cycleCountHeader.service.CycleCountHeaderService; | |
19 | 20 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
20 | 21 | import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; |
21 | 22 | import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader; |
... | ... | @@ -94,6 +95,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
94 | 95 | @Resource |
95 | 96 | private CycleCountDetailService cycleCountDetailService; |
96 | 97 | @Resource |
98 | + private CycleCountHeaderService cycleCountHeaderService; | |
99 | + @Resource | |
97 | 100 | private ReceiptContainerHeaderService receiptContainerHeaderService; |
98 | 101 | @Resource |
99 | 102 | private TaskHeaderMapper taskHeaderMapper; |
... | ... | @@ -919,26 +922,41 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
919 | 922 | taskDetail.setTaskId(taskHeader.getId()); |
920 | 923 | LambdaQueryWrapper lambdaQueryWrapper = Wrappers.lambdaQuery(taskDetail); |
921 | 924 | List<TaskDetail> taskDetailList = taskDetailService.list(lambdaQueryWrapper);//查询子单 |
925 | + List<CycleCountDetail> cycleCountDetailList = new ArrayList<>(); | |
922 | 926 | for (TaskDetail item : taskDetailList) { |
923 | 927 | item.setStatus(100); |
924 | 928 | item.setLastUpdatedBy(ShiroUtils.getLoginName()); //更新用户 |
925 | 929 | item.setLastUpdated(new Date()); //更新时间 |
926 | 930 | taskDetailList.add(item); |
931 | + //盘点完成时,修改盘点详细中的状态为100,库存解锁 | |
932 | + if (taskDetail.getTaskType() == 700) { | |
933 | + //盘点明细的条目由任务明细的数值取出,修改盘点明细状态, | |
934 | + // 并判断主单的明细是否已全部完成,然后再修改主单状态 | |
935 | + CycleCountDetail cycleCountDetail = cycleCountDetailService.getById(item.getBillDetailId()); | |
936 | + cycleCountDetail.setEnableStatus(100); | |
937 | + cycleCountDetail.setCompletedAt(new Date()); | |
938 | + cycleCountDetail.setCompletedBy(ShiroUtils.getLoginName()); | |
939 | + cycleCountDetailList.add(cycleCountDetail); | |
940 | + //释放库位状态 | |
941 | + locationService.updateStatus(cycleCountDetail.getLocationCode(), "empty"); | |
942 | + //更新盘点主单状态 | |
943 | + if(taskHeader.getTaskType() == 700){ | |
944 | + cycleCountHeaderService.updataHeaderStatus(cycleCountDetail.getCycleCountHeadCode()); | |
945 | + } | |
946 | + } | |
947 | + | |
927 | 948 | } |
928 | 949 | if (taskDetailService.saveOrUpdateBatch(taskDetailList) == false || taskHeaderService.saveOrUpdate(taskHeader) == false) { |
929 | 950 | throw new ServiceException("任务单据状态更新失败!"); |
930 | 951 | } |
931 | - //盘点完成时,修改盘点详细中的状态为100,容器恢复为空,库存解锁 | |
932 | - if (taskHeader.getTaskType() == 700) { | |
933 | - /*CyclecountDetail cyclecountDetai = cyclecountDetailService.selectEntityById( | |
934 | - task.getAllocationHeadId()); | |
935 | - cyclecountDetai.setStatus(40); | |
936 | - cyclecountDetailService.updateByModel(cyclecountDetai); | |
937 | - containerService.updateStatus(task.getContainerCode(),"empty");*/ | |
952 | + if (cycleCountDetailService.saveOrUpdateBatch(cycleCountDetailList) == false){ | |
953 | + throw new ServiceException("盘点明细单状态更新失败!"); | |
954 | + } | |
938 | 955 | |
956 | + //出库查看释放库位状态 | |
957 | + if(taskHeader.getTaskType() == 900){ | |
958 | + locationService.updateStatus(taskHeader.getFromLocation(), "empty"); | |
939 | 959 | } |
940 | - //释放库位状态 | |
941 | - locationService.updateStatus(taskHeader.getFromLocation(), "empty"); | |
942 | 960 | return AjaxResult.success("完成出库查看任务"); |
943 | 961 | } |
944 | 962 | |
... | ... |
src/main/resources/templates/config/bomDetail/bomDetail.html
... | ... | @@ -5,10 +5,10 @@ |
5 | 5 | <body> |
6 | 6 | |
7 | 7 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
8 | - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="general:bomDetail:add"> | |
8 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:bomDetail:add"> | |
9 | 9 | <i class="fa fa-plus"></i> 新增 |
10 | 10 | </a> |
11 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="general:bomDetail:remove"> | |
11 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:bomDetail:remove"> | |
12 | 12 | <i class="fa fa-trash-o"></i> 删除 |
13 | 13 | </a> |
14 | 14 | </div> |
... | ... |
src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html
... | ... | @@ -144,11 +144,7 @@ |
144 | 144 | formatter: function(value, row, index) { |
145 | 145 | var actions = []; |
146 | 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 || row.toLocation == ""){ | |
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 | - } | |
147 | + actions.push('<a class="btn btn-success btn-xs ' + createTaskFlag + '" href="#" onclick="createTask(\'' + row.id + '\')"><i class="fa fa-edit"></i>生成任务</a> '); | |
152 | 148 | if (row.status == 0) { |
153 | 149 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>取消配盘</a>'); |
154 | 150 | } |
... | ... |
src/main/resources/templates/receipt/receiptDetail/add.html
... | ... | @@ -84,7 +84,10 @@ |
84 | 84 | <div class="form-group"> |
85 | 85 | <label class="col-sm-3 control-label">定位规则:</label> |
86 | 86 | <div class="col-sm-8"> |
87 | - <input id="locatingRule" name="locatingRule" class="form-control" type="text"> | |
87 | + <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail()}"> | |
88 | + <option value="">请选择</option> | |
89 | + <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option> | |
90 | + </select> | |
88 | 91 | </div> |
89 | 92 | </div> |
90 | 93 | <!-- <div class="form-group">--> |
... | ... |
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... | ... | @@ -72,7 +72,6 @@ |
72 | 72 | </li> |
73 | 73 | <li> |
74 | 74 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
75 | - <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i> 导出</a>--> | |
76 | 75 | </li> |
77 | 76 | </ul> |
78 | 77 | </div> |
... | ... | @@ -97,10 +96,6 @@ |
97 | 96 | <div class="tab-pane fade" id="tabDetail"> |
98 | 97 | <div class="col-sm-12 select-info"> |
99 | 98 | <form id = "shipmentHeadForm" > |
100 | - <ul id="tabHead" class="nav nav-tabs"> | |
101 | - <li class="active"><a href="#tabBase" data-toggle="tab">基础数据</a></li> | |
102 | - <li role="presentation" ><a href="#tabCustomer" data-toggle="tab">客户信息</a></li> | |
103 | - </ul> | |
104 | 99 | <div class="tab-content"> |
105 | 100 | <div class="tab-pane in active" id="tabBase"> |
106 | 101 | <div class="select-list"> |
... | ... | @@ -121,16 +116,7 @@ |
121 | 116 | </li> |
122 | 117 | <li>总数量:<input type="text" name="receiptTotalQty" id="receiptTotalQty"></li> |
123 | 118 | <li>总行数:<input type="text" name="receiptTotalLines" id="receiptTotalLines"></li> |
124 | - <li>单据头状态:<input type="text" name="receiptFirstStatus" id="receiptFirstStatus"></li> | |
125 | - <li>单据尾状态:<input type="text" name="receiptLastStatus" id="receiptLastStatus"></li> | |
126 | - </ul> | |
127 | - </div> | |
128 | - </div> | |
129 | - <div class="tab-pane fade" id="tabCustomer"> | |
130 | - <div class="select-list"> | |
131 | - <ul> | |
132 | 119 | <li>供应商编码:<input type="text" name="receiptSupplierCode" id="receiptSupplierCode"></li> |
133 | - <li>入库预约时间:<input type="text" name="receiptAppointmentTime" id="receiptAppointmentTime"></li> | |
134 | 120 | </ul> |
135 | 121 | </div> |
136 | 122 | </div> |
... | ... | @@ -352,7 +338,16 @@ |
352 | 338 | actions.push('<a style="background: #b5bdc0" class="btn btn-default btn-xs" onclick="Toreceiving(\''+ row.code + '\')"><i class="fa fa-list-ul"></i>列表</a> '); |
353 | 339 | if (row.firstStatus < 100) |
354 | 340 | actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> '); |
355 | - if (row.lastStatus < 200) | |
341 | + if (row.firstStatus == 120 || row.lastStatus ==120){ | |
342 | + actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="arrival(\'' + row.id + '\')" ><i class="fa fa-edit"></i>入库预约</a> '); | |
343 | + } | |
344 | + if (row.firstStatus ==150 || row.lastStatus == 150 ){ | |
345 | + actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>到货通知</a> '); | |
346 | + } | |
347 | + if (row.firstStatus ==180 || row.lastStatus == 180 ){ | |
348 | + actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="check(\'' + row.id + '\')" ><i class="fa fa-edit"></i>质检</a> '); | |
349 | + } | |
350 | + if (row.firstStatus == 200 && row.lastStatus == 200) | |
356 | 351 | actions.push('<a class="btn btn-primary btn-xs to-receive" ' +addFlag+ ' onclick="Toreceiving(\''+ row.code + '\')"><i class="fa fa-cart-plus"></i>收货</a> '); |
357 | 352 | if (row.firstStatus < 120) |
358 | 353 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); |
... | ... | @@ -629,7 +624,7 @@ |
629 | 624 | $.modal.confirm("确定删除该条入库单明细信息吗?", function() { |
630 | 625 | var url = $.common.isEmpty(id) ? detailRemoveUrl : detailRemoveUrl.replace("{id}", id); |
631 | 626 | var data = { "ids": id }; |
632 | - submit(url, "post", "json", data); | |
627 | + $.operate.submit(url, "post", "json", data); | |
633 | 628 | }); |
634 | 629 | } |
635 | 630 | |
... | ... | @@ -647,7 +642,7 @@ |
647 | 642 | ids = ids + rows[i].id + "," |
648 | 643 | } |
649 | 644 | var data = { "ids": ids.substring(0, ids.length-1) }; |
650 | - submit(url, "post", "json", data); | |
645 | + $.operate.submit(url, "post", "json", data); | |
651 | 646 | }); |
652 | 647 | } |
653 | 648 | |
... | ... | @@ -699,9 +694,6 @@ |
699 | 694 | |
700 | 695 | /* 点击明细面板 */ |
701 | 696 | $("#myTab li:eq(1)").click(function () { |
702 | - if (receiptId == '') { | |
703 | - receiptId = $("#bootstrap-table tr:eq(1) td:eq(1)").text(); | |
704 | - } | |
705 | 697 | detail(receiptId, ""); |
706 | 698 | }); |
707 | 699 | |
... | ... | @@ -732,6 +724,7 @@ |
732 | 724 | $.operate.submit(url, "post", "json", data); |
733 | 725 | } |
734 | 726 | |
727 | + //通过审核 | |
735 | 728 | function approval() { |
736 | 729 | var rows=$("#bootstrap-table").bootstrapTable('getSelections'); |
737 | 730 | if (rows.length == 0) { |
... | ... | @@ -746,6 +739,17 @@ |
746 | 739 | var data = { "ids": ids.substring(0, ids.length-1),"approval": 100 }; |
747 | 740 | $.operate.submit(url, "post", "json", data); |
748 | 741 | } |
742 | + | |
743 | + function arrival(id) { | |
744 | + var url = prefix+"/arrival/"+id; | |
745 | + $.modal.open("预约到货" + $.table._option.modalName, url); | |
746 | + } | |
747 | + | |
748 | + function check(id) { | |
749 | + var url = prefix+"/check"; | |
750 | + var data = { "id": id }; | |
751 | + $.operate.submit(url, "post", "json", data); | |
752 | + } | |
749 | 753 | </script> |
750 | 754 | </body> |
751 | 755 | </html> |
752 | 756 | \ No newline at end of file |
... | ... |
src/main/resources/templates/receipt/receiving/add.html
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | <div class="form-group"> |
71 | 71 | <label class="col-sm-3 control-label">定位规则:</label> |
72 | 72 | <div class="col-sm-8"> |
73 | - <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail()}"> | |
73 | + <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('入库')}"> | |
74 | 74 | <option value="">请选择</option> |
75 | 75 | <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option> |
76 | 76 | </select> |
... | ... |