Commit e2fb6e3dc0f0614ef8cfac61b51fd19df9b304a0
1 parent
3ea66fdf
合并代码--待测试2
Showing
5 changed files
with
46 additions
and
171 deletions
huaheng.iml
... | ... | @@ -114,7 +114,6 @@ |
114 | 114 | <orderEntry type="library" name="Maven: org.springframework.session:spring-session-core:2.0.4.RELEASE" level="project" /> |
115 | 115 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.0.3.RELEASE" level="project" /> |
116 | 116 | <orderEntry type="library" name="Maven: redis.clients:jedis:2.9.0" level="project" /> |
117 | - <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.5.0" level="project" /> | |
118 | 117 | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.5" level="project" /> |
119 | 118 | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.9" level="project" /> |
120 | 119 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-mail:2.0.3.RELEASE" level="project" /> |
... | ... | @@ -126,6 +125,8 @@ |
126 | 125 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.3.RELEASE" level="project" /> |
127 | 126 | <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" /> |
128 | 127 | <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.7.RELEASE" level="project" /> |
128 | + <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" /> | |
129 | + <orderEntry type="library" name="Maven: org.testng:testng:7.0.0" level="project" /> | |
129 | 130 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.3.RELEASE" level="project" /> |
130 | 131 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.3.RELEASE" level="project" /> |
131 | 132 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.3.RELEASE" level="project" /> |
... | ... | @@ -161,21 +162,25 @@ |
161 | 162 | <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.2" level="project" /> |
162 | 163 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.3.RELEASE" level="project" /> |
163 | 164 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.3.RELEASE" level="project" /> |
164 | - <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.8" level="project" /> | |
165 | - <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.8" level="project" /> | |
166 | 165 | <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8" level="project" /> |
167 | 166 | <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8" level="project" /> |
168 | 167 | <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.8" level="project" /> |
169 | - <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.3.RELEASE" level="project" /> | |
170 | - <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.16" level="project" /> | |
171 | - <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.16" level="project" /> | |
172 | - <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.16" level="project" /> | |
173 | 168 | <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.14.Final" level="project" /> |
174 | 169 | <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
175 | 170 | <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" /> |
176 | 171 | <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.5.RELEASE" level="project" /> |
177 | 172 | <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.5.RELEASE" level="project" /> |
178 | 173 | <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.5.RELEASE" level="project" /> |
174 | + <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-undertow:2.1.3.RELEASE" level="project" /> | |
175 | + <orderEntry type="library" name="Maven: io.undertow:undertow-core:2.0.17.Final" level="project" /> | |
176 | + <orderEntry type="library" name="Maven: org.jboss.xnio:xnio-api:3.3.8.Final" level="project" /> | |
177 | + <orderEntry type="library" scope="RUNTIME" name="Maven: org.jboss.xnio:xnio-nio:3.3.8.Final" level="project" /> | |
178 | + <orderEntry type="library" name="Maven: io.undertow:undertow-servlet:2.0.17.Final" level="project" /> | |
179 | + <orderEntry type="library" name="Maven: org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.2.Final" level="project" /> | |
180 | + <orderEntry type="library" name="Maven: io.undertow:undertow-websockets-jsr:2.0.17.Final" level="project" /> | |
181 | + <orderEntry type="library" name="Maven: org.jboss.spec.javax.websocket:jboss-websocket-api_1.1_spec:1.1.3.Final" level="project" /> | |
182 | + <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" /> | |
183 | + <orderEntry type="library" name="Maven: org.glassfish:javax.el:3.0.0" level="project" /> | |
179 | 184 | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.1.3.RELEASE" level="project" /> |
180 | 185 | <orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring5:3.0.11.RELEASE" level="project" /> |
181 | 186 | <orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:3.0.11.RELEASE" level="project" /> |
... | ... | @@ -194,8 +199,8 @@ |
194 | 199 | <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.12" level="project" /> |
195 | 200 | <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.10" level="project" /> |
196 | 201 | <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" /> |
197 | - <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.18" level="project" /> | |
198 | - <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.18" level="project" /> | |
202 | + <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.21" level="project" /> | |
203 | + <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.21" level="project" /> | |
199 | 204 | <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" /> |
200 | 205 | <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" /> |
201 | 206 | <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" /> |
... | ... | @@ -208,7 +213,6 @@ |
208 | 213 | <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.4.1" level="project" /> |
209 | 214 | <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.4.1" level="project" /> |
210 | 215 | <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.4.1" level="project" /> |
211 | - <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" /> | |
212 | 216 | <orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.4.1" level="project" /> |
213 | 217 | <orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.4.1" level="project" /> |
214 | 218 | <orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.4.1" level="project" /> |
... | ... | @@ -231,7 +235,6 @@ |
231 | 235 | <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" /> |
232 | 236 | <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" /> |
233 | 237 | <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" /> |
234 | - <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" /> | |
235 | 238 | <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" /> |
236 | 239 | <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" /> |
237 | 240 | <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" /> |
... | ... | @@ -246,11 +249,33 @@ |
246 | 249 | <orderEntry type="library" name="Maven: org.jsoup:jsoup:1.12.1" level="project" /> |
247 | 250 | <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:3.17" level="project" /> |
248 | 251 | <orderEntry type="library" name="Maven: org.apache.poi:poi:3.17" level="project" /> |
249 | - <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.1" level="project" /> | |
250 | 252 | <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:3.17" level="project" /> |
251 | 253 | <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.6.0" level="project" /> |
252 | 254 | <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" /> |
253 | 255 | <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" /> |
256 | + <orderEntry type="library" name="Maven: net.sf.jasperreports:jasperreports:6.10.0" level="project" /> | |
257 | + <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" /> | |
258 | + <orderEntry type="library" name="Maven: commons-digester:commons-digester:2.1" level="project" /> | |
259 | + <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" /> | |
260 | + <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" /> | |
261 | + <orderEntry type="library" name="Maven: com.lowagie:itext:2.1.7.js7" level="project" /> | |
262 | + <orderEntry type="library" name="Maven: org.jfree:jcommon:1.0.23" level="project" /> | |
263 | + <orderEntry type="library" name="Maven: org.jfree:jfreechart:1.0.19" level="project" /> | |
264 | + <orderEntry type="library" name="Maven: org.eclipse.jdt.core.compiler:ecj:4.4.2" level="project" /> | |
265 | + <orderEntry type="library" name="Maven: org.codehaus.castor:castor-xml:1.4.1" level="project" /> | |
266 | + <orderEntry type="library" name="Maven: org.codehaus.castor:castor-core:1.4.1" level="project" /> | |
267 | + <orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" /> | |
268 | + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.8" level="project" /> | |
269 | + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.8" level="project" /> | |
270 | + <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" /> | |
271 | + <orderEntry type="library" name="Maven: net.sf.jasperreports:jasperreports-fonts:6.10.0" level="project" /> | |
272 | + <orderEntry type="library" name="Maven: com.itextpdf:itextpdf:5.5.7" level="project" /> | |
273 | + <orderEntry type="library" name="Maven: com.itextpdf:itext-pdfa:5.5.7" level="project" /> | |
274 | + <orderEntry type="library" name="Maven: com.itextpdf:itext-asian:5.2.0" level="project" /> | |
275 | + <orderEntry type="library" name="Maven: cn.lesper:iTextAsian:3.0" level="project" /> | |
276 | + <orderEntry type="library" name="Maven: org.codehaus.groovy:groovy-all:2.4.11" level="project" /> | |
277 | + <orderEntry type="library" name="Maven: redis.clients:jedis:2.9.1" level="project" /> | |
278 | + <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.5.0" level="project" /> | |
254 | 279 | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.7" level="project" /> |
255 | 280 | <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" /> |
256 | 281 | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.11" level="project" /> |
... | ... | @@ -263,8 +288,10 @@ |
263 | 288 | <orderEntry type="library" name="Maven: org.apiguardian:apiguardian-api:1.0.0" level="project" /> |
264 | 289 | <orderEntry type="library" name="Maven: org.opentest4j:opentest4j:1.1.1" level="project" /> |
265 | 290 | <orderEntry type="library" name="Maven: org.junit.platform:junit-platform-commons:1.3.2" level="project" /> |
266 | - <orderEntry type="library" name="Maven: org.testng:testng:7.0.0" level="project" /> | |
291 | + <orderEntry type="library" name="Maven: org.testng:testng:7.1.0" level="project" /> | |
267 | 292 | <orderEntry type="library" name="Maven: com.beust:jcommander:1.72" level="project" /> |
293 | + <orderEntry type="library" name="Maven: com.google.inject:guice:no_aop:4.1.0" level="project" /> | |
294 | + <orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" /> | |
268 | 295 | <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" /> |
269 | 296 | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.1.2" level="project" /> |
270 | 297 | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.1.2" level="project" /> |
... | ... | @@ -278,5 +305,8 @@ |
278 | 305 | <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.1.2" level="project" /> |
279 | 306 | <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.1" level="project" /> |
280 | 307 | <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.23" level="project" /> |
308 | + <orderEntry type="library" name="Maven: com.google.zxing:core:3.3.0" level="project" /> | |
309 | + <orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.0" level="project" /> | |
310 | + <orderEntry type="library" name="Maven: com.github.jai-imageio:jai-imageio-core:1.3.1" level="project" /> | |
281 | 311 | </component> |
282 | 312 | </module> |
283 | 313 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/mobile/receipt/MobileBatchReceiptController.java
src/main/java/com/huaheng/pc/config/container/controller/ContainerController.java
src/main/java/com/huaheng/pc/shipment/shippingCombination/controller/ShippingCombinationController.java
... | ... | @@ -19,6 +19,7 @@ import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailServiceImpl; |
19 | 19 | import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; |
20 | 20 | import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService; |
21 | 21 | import com.huaheng.pc.shipment.shippingCombination.service.ShippingCombinationService; |
22 | +import com.huaheng.pc.task.taskHeader.service.TaskHeaderService; | |
22 | 23 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
23 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
24 | 25 | import org.springframework.stereotype.Controller; |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -1675,162 +1675,5 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1675 | 1675 | |
1676 | 1676 | } |
1677 | 1677 | |
1678 | - /** | |
1679 | - * 移动端根据容器编码获取盘点任务 | |
1680 | - * @param containerCode 容器编码 | |
1681 | - * @return | |
1682 | - */ | |
1683 | - @Override | |
1684 | - public List<MobileTask> mobileFindTransferTask(String containerCode) { | |
1685 | - /* 查询该容器未完成的盘点任务明细*/ | |
1686 | - LambdaQueryWrapper<TaskDetail> detailLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
1687 | - detailLambdaQueryWrapper.eq(TaskDetail::getContainerCode, containerCode) | |
1688 | - .eq(TaskDetail::getTaskType, QuantityConstant.TASK_TYPE_CYCLECOUNT) | |
1689 | - .ne(TaskDetail::getStatus, QuantityConstant.TASK_STATUS_COMPLETED); | |
1690 | - List<TaskDetail> taskDetailList = taskDetailService.list(detailLambdaQueryWrapper); | |
1691 | - | |
1692 | - /* 获取任务明细中的任务头id*/ | |
1693 | - List<Integer> headerIdList = taskDetailList.stream().map(TaskDetail::getTaskId).collect(Collectors.toList()); | |
1694 | - List<MobileTask> mobileTasks = new ArrayList<>(); | |
1695 | - | |
1696 | - /* 遍历id查询出盘点任务*/ | |
1697 | - for (Integer id : headerIdList) { | |
1698 | - TaskHeader taskHeader = taskHeaderService.getById(id); | |
1699 | - MobileTask mobileTask = new MobileTask(); | |
1700 | - mobileTask.setTaskHeader(taskHeader); | |
1701 | - LambdaQueryWrapper<TaskDetail> queryWrapper = Wrappers.lambdaQuery(); | |
1702 | - queryWrapper.eq(TaskDetail::getTaskId, id) | |
1703 | - .eq(TaskDetail::getContainerCode, containerCode); | |
1704 | - List<TaskDetail> taskDetails = taskDetailService.list(queryWrapper); | |
1705 | - mobileTask.setTaskDetail(taskDetails); | |
1706 | - mobileTasks.add(mobileTask); | |
1707 | - } | |
1708 | - return mobileTasks; | |
1709 | - } | |
1710 | - | |
1711 | - /** | |
1712 | - * 容器收货上架 | |
1713 | - * | |
1714 | - * @param containerCode | |
1715 | - * @return | |
1716 | - */ | |
1717 | - @Override | |
1718 | - public AjaxResult createQuickTask(String containerCode) { | |
1719 | - LambdaQueryWrapper<ReceiptContainerHeader> queryWrapper = Wrappers.lambdaQuery(); | |
1720 | - queryWrapper.eq(ReceiptContainerHeader::getContainerCode, containerCode) | |
1721 | - .eq(ReceiptContainerHeader::getStatus, QuantityConstant.RECEIPT_CONTAINER_BUILD) | |
1722 | - .eq(ReceiptContainerHeader::getWarehouseCode, ShiroUtils.getWarehouseCode()); | |
1723 | - ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getOne(queryWrapper); | |
1724 | - if (receiptContainerHeader == null) { | |
1725 | - throw new ServiceException("该容器没有任务!"); | |
1726 | - } | |
1727 | - | |
1728 | - LambdaQueryWrapper<ReceiptContainerDetail> containerDetailQueryWrapper = Wrappers.lambdaQuery(); | |
1729 | - containerDetailQueryWrapper.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerHeader.getId()) | |
1730 | - .eq(ReceiptContainerDetail::getStatus, QuantityConstant.RECEIPT_CONTAINER_BUILD) | |
1731 | - .eq(ReceiptContainerDetail::getContainerCode, containerCode); | |
1732 | - List<ReceiptContainerDetail> containerDetailList = receiptContainerDetailService.list(containerDetailQueryWrapper); | |
1733 | - if (containerDetailList.isEmpty()) { | |
1734 | - throw new SecurityException("没有组盘明细,请先组盘"); | |
1735 | - } | |
1736 | - if (receiptContainerHeader.getStatus().equals(QuantityConstant.RECEIPT_HEADER_BUILD)) { | |
1737 | - String ids = String.valueOf(receiptContainerHeader.getId()); | |
1738 | - if (StringUtils.isEmpty(ids)){ | |
1739 | - return AjaxResult.error("id不能为空"); | |
1740 | - } | |
1741 | - List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); | |
1742 | - for (int i = 0; i<idList.size(); i++){ | |
1743 | - LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery(); | |
1744 | - lambda.eq(ReceiptContainerDetail::getReceiptContainerId, idList.get(i)); | |
1745 | - List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lambda); | |
1746 | - for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetails){ | |
1747 | - receivingService.position(receiptContainerDetail); | |
1748 | - } | |
1749 | - | |
1750 | - } | |
1751 | - if (StringUtils.isEmpty(ids)){ | |
1752 | - return AjaxResult.error("id不能为空"); | |
1753 | - } | |
1754 | - for (int i = 0; i<idList.size(); i++){ | |
1755 | - LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery(); | |
1756 | - lambda.eq(ReceiptContainerDetail::getReceiptContainerId, idList.get(i)); | |
1757 | - List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lambda); | |
1758 | - for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetails){ | |
1759 | - receivingService.position(receiptContainerDetail); | |
1760 | - } | |
1761 | - | |
1762 | - } | |
1763 | - | |
1764 | - Integer maxId = idList.stream().max(Comparator.comparing(Integer::intValue)).orElse(null); | |
1765 | - | |
1766 | - LambdaQueryWrapper<ReceiptContainerHeader> lambda = Wrappers.lambdaQuery(); | |
1767 | - lambda.select(ReceiptContainerHeader::getId) | |
1768 | - .lt(ReceiptContainerHeader::getStatus, 10) | |
1769 | - .le(ReceiptContainerHeader::getId, maxId); | |
1770 | - return taskHeaderService.createReceiptTask(idList); | |
1771 | - } | |
1772 | - return null; | |
1773 | - } | |
1774 | - | |
1775 | - /** | |
1776 | - * 根据库位完成任务 | |
1777 | - * | |
1778 | - * @param locationCode | |
1779 | - * @return | |
1780 | - * @throws Exception | |
1781 | - */ | |
1782 | - @Override | |
1783 | - public AjaxResult completeTask(String locationCode) throws Exception { | |
1784 | - LambdaQueryWrapper<TaskHeader> taskQueryWrapper = Wrappers.lambdaQuery(); | |
1785 | - taskQueryWrapper.eq(TaskHeader::getToLocation, locationCode); | |
1786 | - List<TaskHeader> list = this.list(taskQueryWrapper); | |
1787 | - if (list.size() < 1) { | |
1788 | - throw new ServiceException("库位(" + locationCode + ")没有任务!"); | |
1789 | - } else if(list.get(0).getStatus() == 100) { | |
1790 | - //如果已完成则不管 | |
1791 | - throw new ServiceException("库位(" + locationCode + ")任务已经完成!"); | |
1792 | - } | |
1793 | - if(list.get(0).getTaskType()==100 || list.get(0).getTaskType()==200){ | |
1794 | - //入库任务 | |
1795 | - return completeReceiptTask((list.get(0))); | |
1796 | - } else { | |
1797 | - throw new ServiceException("库位(" + locationCode + ")的任务不是上架,不能完成!"); | |
1798 | - } | |
1799 | - } | |
1800 | - | |
1801 | - @Override | |
1802 | - public AjaxResult createReplenishTask(String containerCode, Short taskStatus) { | |
1803 | - LambdaQueryWrapper<ReceiptContainerHeader> headerQueryWrapper = Wrappers.lambdaQuery(); | |
1804 | - headerQueryWrapper.eq(ReceiptContainerHeader::getContainerCode, containerCode) | |
1805 | - .eq(ReceiptContainerHeader::getStatus, QuantityConstant.RECEIPT_CONTAINER_BUILD); | |
1806 | - | |
1807 | - List<ReceiptContainerHeader> receiptContainerHeaderList = receiptContainerHeaderService.list(headerQueryWrapper); | |
1808 | - if (receiptContainerHeaderList.isEmpty()) { | |
1809 | - throw new ServiceException("该容器没有任务!"); | |
1810 | - } | |
1811 | - if (receiptContainerHeaderList.size() > 1){ | |
1812 | - throw new ServiceException("该容器存在多条任务"); | |
1813 | - } | |
1814 | - if (receiptContainerHeaderList.get(0).getWarehouseCode() != ShiroUtils.getWarehouseCode()) { | |
1815 | - throw new ServiceException("容器不在当前仓库!"); | |
1816 | - } | |
1817 | - LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
1818 | - lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerHeaderList.get(0).getId()); | |
1819 | - List<ReceiptContainerDetail> containerDetailList = receiptContainerDetailService.list(lambdaQueryWrapper); | |
1820 | - ReceiptContainerHeader containerHeader = receiptContainerHeaderList.get(0); | |
1821 | - if (containerDetailList.isEmpty()){ | |
1822 | - throw new ServiceException("没有组盘明细,请先组盘!"); | |
1823 | - } | |
1824 | - if (containerHeader.getStatus().equals(QuantityConstant.TASK_STATUS_BUILD)) { | |
1825 | - if (containerHeader.getStatus().intValue() != taskStatus.intValue()) { | |
1826 | - containerHeader.setStatus(taskStatus); | |
1827 | - receiptContainerHeaderService.updateById(containerHeader); | |
1828 | - } | |
1829 | - } | |
1830 | - List<Integer> ids = new ArrayList<>(); | |
1831 | - ids.add(containerHeader.getId()); | |
1832 | - createReceiptTask(ids); | |
1833 | - return null; | |
1834 | - } | |
1835 | 1678 | |
1836 | 1679 | } |
1837 | 1680 | \ No newline at end of file |
... | ... |