Commit 99795bb18e22410b120dcd3301cc7c88ad3e403c
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms4.git into
develop Conflicts: huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/IReceiptContainerHeaderService.java
Showing
10 changed files
with
173 additions
and
112 deletions
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
@@ -69,8 +69,8 @@ | @@ -69,8 +69,8 @@ | ||
69 | <a-button type="primary" icon="import">导入</a-button> | 69 | <a-button type="primary" icon="import">导入</a-button> |
70 | </a-upload> | 70 | </a-upload> |
71 | <!-- 高级查询区域 --> | 71 | <!-- 高级查询区域 --> |
72 | - <j-super-query :fieldList="superFieldList" ref="superQueryModal" | ||
73 | - @handleSuperQuery="handleSuperQuery"></j-super-query> | 72 | +<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"--> |
73 | +<!-- @handleSuperQuery="handleSuperQuery"></j-super-query>--> | ||
74 | </div> | 74 | </div> |
75 | 75 | ||
76 | <!-- table区域-begin --> | 76 | <!-- table区域-begin --> |
@@ -118,19 +118,20 @@ | @@ -118,19 +118,20 @@ | ||
118 | </template> | 118 | </template> |
119 | 119 | ||
120 | <span slot="action" slot-scope="text, record"> | 120 | <span slot="action" slot-scope="text, record"> |
121 | - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)">编辑</a> | ||
122 | <a-divider type="vertical"/> | 121 | <a-divider type="vertical"/> |
123 | <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)">生成任务</a> | 122 | <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)">生成任务</a> |
124 | <a v-else-if="record.status == 0" @click="createTask(record)">生成任务</a> | 123 | <a v-else-if="record.status == 0" @click="createTask(record)">生成任务</a> |
125 | <a-divider type="vertical"/> | 124 | <a-divider type="vertical"/> |
125 | + <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> | ||
126 | + <a>取消配盘</a> | ||
127 | + </a-popconfirm> | ||
128 | + <a-divider type="vertical"/> | ||
126 | <a-dropdown> | 129 | <a-dropdown> |
127 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> | 130 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
128 | <a-menu slot="overlay"> | 131 | <a-menu slot="overlay"> |
129 | - <a-menu-item v-has="'receiptContainerHeader:delete'"> | ||
130 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | ||
131 | - <a>删除</a> | ||
132 | - </a-popconfirm> | ||
133 | - </a-menu-item> | 132 | + <a-menu-item> |
133 | + <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)">编辑</a> | ||
134 | + </a-menu-item> | ||
134 | </a-menu> | 135 | </a-menu> |
135 | </a-dropdown> | 136 | </a-dropdown> |
136 | </span> | 137 | </span> |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderHistoryList.vue
@@ -108,8 +108,8 @@ | @@ -108,8 +108,8 @@ | ||
108 | <!-- <a-button type="primary" icon="import">导入</a-button>--> | 108 | <!-- <a-button type="primary" icon="import">导入</a-button>--> |
109 | </a-upload> | 109 | </a-upload> |
110 | <!-- 高级查询区域 --> | 110 | <!-- 高级查询区域 --> |
111 | - <j-super-query :fieldList='superFieldList' ref='superQueryModal' | ||
112 | - @handleSuperQuery='handleSuperQuery'></j-super-query> | 111 | +<!-- <j-super-query :fieldList='superFieldList' ref='superQueryModal'--> |
112 | +<!-- @handleSuperQuery='handleSuperQuery'></j-super-query>--> | ||
113 | </div> | 113 | </div> |
114 | 114 | ||
115 | <!-- table区域-begin --> | 115 | <!-- table区域-begin --> |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
1 | package org.jeecg.modules.wms.receipt.receiptContainerHeader.controller; | 1 | package org.jeecg.modules.wms.receipt.receiptContainerHeader.controller; |
2 | 2 | ||
3 | +import java.io.IOException; | ||
4 | +import java.util.Arrays; | ||
5 | +import java.util.List; | ||
6 | +import java.util.Map; | ||
7 | +import java.util.stream.Collectors; | ||
8 | + | ||
9 | +import javax.annotation.Resource; | ||
10 | +import javax.servlet.http.HttpServletRequest; | ||
11 | +import javax.servlet.http.HttpServletResponse; | ||
12 | + | ||
13 | +import org.apache.shiro.SecurityUtils; | ||
3 | import org.apache.shiro.authz.annotation.RequiresPermissions; | 14 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
4 | -import org.jeecg.common.system.query.QueryGenerator; | ||
5 | -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
6 | -import com.baomidou.mybatisplus.core.metadata.IPage; | ||
7 | -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
8 | -import lombok.extern.slf4j.Slf4j; | ||
9 | -import org.jeecg.common.system.base.controller.JeecgController; | ||
10 | import org.jeecg.common.api.vo.Result; | 15 | import org.jeecg.common.api.vo.Result; |
11 | -import org.jeecg.utils.HuahengJwtUtil; | 16 | +import org.jeecg.common.aspect.annotation.AutoLog; |
17 | +import org.jeecg.common.system.base.controller.JeecgController; | ||
18 | +import org.jeecg.common.system.query.QueryGenerator; | ||
19 | +import org.jeecg.common.system.vo.LoginUser; | ||
20 | +import org.jeecg.common.util.oConvertUtils; | ||
12 | import org.jeecg.modules.wms.config.location.entity.Location; | 21 | import org.jeecg.modules.wms.config.location.entity.Location; |
13 | import org.jeecg.modules.wms.config.location.service.ILocationService; | 22 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
14 | import org.jeecg.modules.wms.config.port.entity.Port; | 23 | import org.jeecg.modules.wms.config.port.entity.Port; |
@@ -19,34 +28,27 @@ import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContai | @@ -19,34 +28,27 @@ import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContai | ||
19 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; | 28 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; |
20 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerDetailService; | 29 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerDetailService; |
21 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService; | 30 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService; |
22 | -import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; | 31 | +import org.jeecg.utils.HuahengJwtUtil; |
23 | import org.jeecg.utils.StringUtils; | 32 | import org.jeecg.utils.StringUtils; |
24 | import org.jeecg.utils.constant.QuantityConstant; | 33 | import org.jeecg.utils.constant.QuantityConstant; |
25 | -import org.springframework.beans.factory.annotation.Autowired; | ||
26 | -import org.springframework.web.bind.annotation.*; | ||
27 | - | ||
28 | -import javax.annotation.Resource; | ||
29 | -import javax.servlet.http.HttpServletRequest; | ||
30 | -import javax.servlet.http.HttpServletResponse; | ||
31 | -import org.springframework.web.servlet.ModelAndView; | ||
32 | -import java.util.Arrays; | ||
33 | -import org.jeecg.common.util.oConvertUtils; | ||
34 | -import io.swagger.annotations.Api; | ||
35 | -import io.swagger.annotations.ApiOperation; | ||
36 | -import org.jeecg.common.aspect.annotation.AutoLog; | ||
37 | -import org.apache.shiro.SecurityUtils; | ||
38 | -import org.jeecg.common.system.vo.LoginUser; | ||
39 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 34 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
40 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 35 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
41 | import org.jeecgframework.poi.excel.entity.ExportParams; | 36 | import org.jeecgframework.poi.excel.entity.ExportParams; |
42 | import org.jeecgframework.poi.excel.entity.ImportParams; | 37 | import org.jeecgframework.poi.excel.entity.ImportParams; |
43 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | 38 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
39 | +import org.springframework.beans.factory.annotation.Autowired; | ||
40 | +import org.springframework.web.bind.annotation.*; | ||
44 | import org.springframework.web.multipart.MultipartFile; | 41 | import org.springframework.web.multipart.MultipartFile; |
45 | import org.springframework.web.multipart.MultipartHttpServletRequest; | 42 | import org.springframework.web.multipart.MultipartHttpServletRequest; |
46 | -import java.io.IOException; | ||
47 | -import java.util.List; | ||
48 | -import java.util.Map; | ||
49 | -import java.util.stream.Collectors; | 43 | +import org.springframework.web.servlet.ModelAndView; |
44 | + | ||
45 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
46 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
47 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
48 | + | ||
49 | +import io.swagger.annotations.Api; | ||
50 | +import io.swagger.annotations.ApiOperation; | ||
51 | +import lombok.extern.slf4j.Slf4j; | ||
50 | 52 | ||
51 | /** | 53 | /** |
52 | * @Description: 入库组盘 | 54 | * @Description: 入库组盘 |
@@ -133,8 +135,9 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | @@ -133,8 +135,9 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | ||
133 | @DeleteMapping(value = "/delete") | 135 | @DeleteMapping(value = "/delete") |
134 | @RequiresPermissions("receiptContainerHeader:delete") | 136 | @RequiresPermissions("receiptContainerHeader:delete") |
135 | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { | 137 | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
136 | - receiptContainerHeaderService.delMain(id); | ||
137 | - return Result.OK("删除成功!"); | 138 | +// receiptContainerHeaderService.delMain(id); |
139 | + Result result = receiptContainerHeaderService.cancelReceiving(Integer.parseInt(id)); | ||
140 | + return result; | ||
138 | } | 141 | } |
139 | 142 | ||
140 | /** | 143 | /** |
@@ -147,8 +150,10 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | @@ -147,8 +150,10 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon | ||
147 | @DeleteMapping(value = "/deleteBatch") | 150 | @DeleteMapping(value = "/deleteBatch") |
148 | @RequiresPermissions("receiptContainerHeader:deleteBatch") | 151 | @RequiresPermissions("receiptContainerHeader:deleteBatch") |
149 | public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { | 152 | public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
150 | - this.receiptContainerHeaderService.delBatchMain(Arrays.asList(ids.split(","))); | ||
151 | - return Result.OK("批量删除成功!"); | 153 | + List<String> idList = Arrays.asList(ids.split(",")); |
154 | + List<Integer> idInterList = idList.stream().map(Integer::parseInt).collect(Collectors.toList()); | ||
155 | + Result result = receiptContainerHeaderService.cancelReceiving(idInterList); | ||
156 | + return result; | ||
152 | } | 157 | } |
153 | 158 | ||
154 | /** | 159 | /** |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/IReceiptContainerHeaderService.java
1 | package org.jeecg.modules.wms.receipt.receiptContainerHeader.service; | 1 | package org.jeecg.modules.wms.receipt.receiptContainerHeader.service; |
2 | 2 | ||
3 | -import com.baomidou.mybatisplus.extension.service.IService; | ||
4 | -import org.jeecg.common.api.vo.Result; | ||
5 | -import org.jeecg.modules.wms.config.container.entity.Container; | ||
6 | -import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; | ||
7 | -import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | ||
8 | -import org.springframework.beans.factory.annotation.Autowired; | ||
9 | import java.io.Serializable; | 3 | import java.io.Serializable; |
10 | import java.util.Collection; | 4 | import java.util.Collection; |
11 | import java.util.List; | 5 | import java.util.List; |
12 | 6 | ||
7 | +import org.jeecg.common.api.vo.Result; | ||
8 | +import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; | ||
9 | +import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | ||
10 | + | ||
11 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
12 | + | ||
13 | /** | 13 | /** |
14 | * @Description: 入库组盘 | 14 | * @Description: 入库组盘 |
15 | * @Author: jeecg-boot | 15 | * @Author: jeecg-boot |
@@ -50,4 +50,15 @@ public interface IReceiptContainerHeaderService extends IService<ReceiptContaine | @@ -50,4 +50,15 @@ public interface IReceiptContainerHeaderService extends IService<ReceiptContaine | ||
50 | * @return | 50 | * @return |
51 | */ | 51 | */ |
52 | boolean cancelReceiptTask(Integer receiptContainerHeaderId); | 52 | boolean cancelReceiptTask(Integer receiptContainerHeaderId); |
53 | + | ||
54 | + /** | ||
55 | + * 取消组盘 | ||
56 | + */ | ||
57 | + public Result cancelReceiving(Integer id); | ||
58 | + | ||
59 | + /** | ||
60 | + * 批量取消组盘 | ||
61 | + */ | ||
62 | + public Result cancelReceiving(List<Integer> ids); | ||
63 | + | ||
53 | } | 64 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
1 | package org.jeecg.modules.wms.receipt.receiptContainerHeader.service.impl; | 1 | package org.jeecg.modules.wms.receipt.receiptContainerHeader.service.impl; |
2 | 2 | ||
3 | -import com.aliyun.oss.ServiceException; | ||
4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 3 | +import java.io.Serializable; |
4 | +import java.util.ArrayList; | ||
5 | +import java.util.Collection; | ||
6 | +import java.util.List; | ||
7 | +import java.util.stream.Collectors; | ||
8 | + | ||
9 | +import javax.annotation.Resource; | ||
10 | + | ||
6 | import org.jeecg.common.api.vo.Result; | 11 | import org.jeecg.common.api.vo.Result; |
7 | import org.jeecg.modules.wms.config.container.entity.Container; | 12 | import org.jeecg.modules.wms.config.container.entity.Container; |
8 | import org.jeecg.modules.wms.config.container.service.IContainerService; | 13 | import org.jeecg.modules.wms.config.container.service.IContainerService; |
@@ -23,17 +28,14 @@ import org.jeecg.modules.wms.task.taskHeader.service.ITaskDetailService; | @@ -23,17 +28,14 @@ import org.jeecg.modules.wms.task.taskHeader.service.ITaskDetailService; | ||
23 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; | 28 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; |
24 | import org.jeecg.utils.StringUtils; | 29 | import org.jeecg.utils.StringUtils; |
25 | import org.jeecg.utils.constant.QuantityConstant; | 30 | import org.jeecg.utils.constant.QuantityConstant; |
26 | -import org.springframework.stereotype.Service; | ||
27 | -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
28 | import org.springframework.beans.factory.annotation.Autowired; | 31 | import org.springframework.beans.factory.annotation.Autowired; |
32 | +import org.springframework.stereotype.Service; | ||
29 | import org.springframework.transaction.annotation.Transactional; | 33 | import org.springframework.transaction.annotation.Transactional; |
30 | 34 | ||
31 | -import javax.annotation.Resource; | ||
32 | -import java.io.Serializable; | ||
33 | -import java.util.ArrayList; | ||
34 | -import java.util.List; | ||
35 | -import java.util.Collection; | ||
36 | -import java.util.stream.Collectors; | 35 | +import com.aliyun.oss.ServiceException; |
36 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
37 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
38 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
37 | 39 | ||
38 | /** | 40 | /** |
39 | * @Description: 入库组盘 | 41 | * @Description: 入库组盘 |
@@ -322,4 +324,48 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -322,4 +324,48 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
322 | return true; | 324 | return true; |
323 | } | 325 | } |
324 | 326 | ||
327 | + @Override | ||
328 | + @Transactional(rollbackFor = ServiceException.class) | ||
329 | + public Result cancelReceiving(Integer id) { | ||
330 | + ReceiptContainerHeader receiptContainerHeader = getById(id); | ||
331 | + if (receiptContainerHeader == null) { | ||
332 | + return Result.error("取消组盘失败,没有找到入库组盘头id是" + id); | ||
333 | + } | ||
334 | + int status = receiptContainerHeader.getStatus(); | ||
335 | + if (status >= QuantityConstant.RECEIPT_CONTAINER_TASK) { | ||
336 | + return Result.error("取消组盘失败,已经生成入库任务"); | ||
337 | + } | ||
338 | + List<ReceiptContainerDetail> receiptContainerDetailList = receiptContainerDetailService.getReceiptContainerDetailListByHeaderId(id); | ||
339 | + for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) { | ||
340 | + ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()); | ||
341 | + if (receiptDetail != null) { | ||
342 | + receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD); | ||
343 | + receiptDetail.setTaskQty(receiptDetail.getTaskQty().subtract(receiptContainerDetail.getQty())); | ||
344 | + if (!receiptDetailService.updateById(receiptDetail)) { | ||
345 | + throw new ServiceException("取消组盘失败, 更新入库明细失败id是" + receiptContainerDetail.getReceiptDetailId()); | ||
346 | + } | ||
347 | + } | ||
348 | + if (!receiptContainerDetailService.removeById(receiptContainerDetail.getId())) { | ||
349 | + throw new ServiceException("取消组盘失败, 删除入库组盘明细表失败id是" + receiptContainerDetail.getId()); | ||
350 | + } | ||
351 | + if (!receiptHeaderService.updateReceiptHeaderStatus(receiptDetail.getReceiptId())) { | ||
352 | + throw new ServiceException("取消组盘失败, 更新入库单头失败"); | ||
353 | + } | ||
354 | + } | ||
355 | + if (!this.removeById(id)) { | ||
356 | + throw new ServiceException("取消组盘失败, 删除入库组盘头表失败id是" + id); | ||
357 | + } | ||
358 | + | ||
359 | + return Result.ok("取消组盘成功"); | ||
360 | + } | ||
361 | + | ||
362 | + @Override | ||
363 | + public Result cancelReceiving(List<Integer> ids) { | ||
364 | + Result result = null; | ||
365 | + for (Integer id : ids) { | ||
366 | + result = cancelReceiving(id); | ||
367 | + } | ||
368 | + return result; | ||
369 | + } | ||
370 | + | ||
325 | } | 371 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/controller/ReceiptHeaderController.java
1 | package org.jeecg.modules.wms.receipt.receiptHeader.controller; | 1 | package org.jeecg.modules.wms.receipt.receiptHeader.controller; |
2 | 2 | ||
3 | -import com.aliyun.oss.ServiceException; | ||
4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
5 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 3 | +import java.io.IOException; |
4 | +import java.util.Arrays; | ||
5 | +import java.util.List; | ||
6 | +import java.util.Map; | ||
7 | +import java.util.stream.Collectors; | ||
8 | + | ||
9 | +import javax.annotation.Resource; | ||
10 | +import javax.servlet.http.HttpServletRequest; | ||
11 | +import javax.servlet.http.HttpServletResponse; | ||
12 | + | ||
13 | +import org.apache.shiro.SecurityUtils; | ||
6 | import org.apache.shiro.authz.annotation.RequiresPermissions; | 14 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
7 | -import org.jeecg.common.system.query.QueryGenerator; | ||
8 | -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
9 | -import com.baomidou.mybatisplus.core.metadata.IPage; | ||
10 | -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
11 | -import lombok.extern.slf4j.Slf4j; | ||
12 | -import org.jeecg.common.system.base.controller.JeecgController; | ||
13 | import org.jeecg.common.api.vo.Result; | 15 | import org.jeecg.common.api.vo.Result; |
16 | +import org.jeecg.common.aspect.annotation.AutoLog; | ||
17 | +import org.jeecg.common.system.base.controller.JeecgController; | ||
18 | +import org.jeecg.common.system.query.QueryGenerator; | ||
19 | +import org.jeecg.common.system.vo.LoginUser; | ||
20 | +import org.jeecg.common.util.oConvertUtils; | ||
21 | +import org.jeecg.modules.wms.api.erp.service.IErpService; | ||
14 | import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean; | 22 | import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean; |
15 | import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean; | 23 | import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean; |
16 | import org.jeecg.modules.wms.api.mobile.service.IMobileService; | 24 | import org.jeecg.modules.wms.api.mobile.service.IMobileService; |
17 | -import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger; | ||
18 | -import org.jeecg.modules.wms.framework.controller.HuahengBaseController; | ||
19 | -import org.jeecg.utils.HuahengJwtUtil; | ||
20 | -import org.jeecg.modules.wms.api.erp.service.IErpService; | ||
21 | -import org.jeecg.modules.wms.config.material.entity.Material; | ||
22 | import org.jeecg.modules.wms.config.material.service.IMaterialService; | 25 | import org.jeecg.modules.wms.config.material.service.IMaterialService; |
26 | +import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger; | ||
23 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; | 27 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; |
24 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | 28 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
25 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; | 29 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; |
26 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; | 30 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; |
27 | -import org.jeecg.modules.wms.receipt.receiving.domain.Receive; | 31 | +import org.jeecg.utils.HuahengJwtUtil; |
28 | import org.jeecg.utils.StringUtils; | 32 | import org.jeecg.utils.StringUtils; |
29 | import org.jeecg.utils.constant.QuantityConstant; | 33 | import org.jeecg.utils.constant.QuantityConstant; |
30 | -import org.springframework.beans.factory.annotation.Autowired; | ||
31 | -import org.springframework.web.bind.annotation.*; | ||
32 | - | ||
33 | -import javax.annotation.Resource; | ||
34 | -import javax.servlet.http.HttpServletRequest; | ||
35 | -import javax.servlet.http.HttpServletResponse; | ||
36 | -import org.springframework.web.servlet.ModelAndView; | ||
37 | - | ||
38 | -import java.math.BigDecimal; | ||
39 | -import java.util.ArrayList; | ||
40 | -import java.util.Arrays; | ||
41 | -import org.jeecg.common.util.oConvertUtils; | ||
42 | -import io.swagger.annotations.Api; | ||
43 | -import io.swagger.annotations.ApiOperation; | ||
44 | -import org.jeecg.common.aspect.annotation.AutoLog; | ||
45 | -import org.apache.shiro.SecurityUtils; | ||
46 | -import org.jeecg.common.system.vo.LoginUser; | ||
47 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 34 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
48 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 35 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
49 | import org.jeecgframework.poi.excel.entity.ExportParams; | 36 | import org.jeecgframework.poi.excel.entity.ExportParams; |
50 | import org.jeecgframework.poi.excel.entity.ImportParams; | 37 | import org.jeecgframework.poi.excel.entity.ImportParams; |
51 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; | 38 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
39 | +import org.springframework.beans.factory.annotation.Autowired; | ||
40 | +import org.springframework.web.bind.annotation.*; | ||
52 | import org.springframework.web.multipart.MultipartFile; | 41 | import org.springframework.web.multipart.MultipartFile; |
53 | import org.springframework.web.multipart.MultipartHttpServletRequest; | 42 | import org.springframework.web.multipart.MultipartHttpServletRequest; |
54 | -import java.io.IOException; | ||
55 | -import java.util.List; | ||
56 | -import java.util.Map; | ||
57 | -import java.util.stream.Collectors; | 43 | +import org.springframework.web.servlet.ModelAndView; |
44 | + | ||
45 | +import com.aliyun.oss.ServiceException; | ||
46 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
47 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||
48 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
49 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
50 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
51 | + | ||
52 | +import io.swagger.annotations.Api; | ||
53 | +import io.swagger.annotations.ApiOperation; | ||
54 | +import lombok.extern.slf4j.Slf4j; | ||
58 | 55 | ||
59 | /** | 56 | /** |
60 | * @Description: 入库表主表 | 57 | * @Description: 入库表主表 |
@@ -143,7 +140,8 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec | @@ -143,7 +140,8 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec | ||
143 | @RequiresPermissions("receiptHeader:delete") | 140 | @RequiresPermissions("receiptHeader:delete") |
144 | @DeleteMapping(value = "/delete") | 141 | @DeleteMapping(value = "/delete") |
145 | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { | 142 | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
146 | - receiptHeaderService.delMain(id,QuantityConstant.WMS_DELETE_RECEIPT); | 143 | + receiptHeaderService.delMain(id, QuantityConstant.WMS_DELETE_RECEIPT); |
144 | + | ||
147 | return Result.OK("删除成功!"); | 145 | return Result.OK("删除成功!"); |
148 | } | 146 | } |
149 | 147 | ||
@@ -198,18 +196,17 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec | @@ -198,18 +196,17 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec | ||
198 | 196 | ||
199 | @ApiOperation(value = "入库单详情-通过多个明细id查询", notes = "入库单详情-通过多个明细id查询") | 197 | @ApiOperation(value = "入库单详情-通过多个明细id查询", notes = "入库单详情-通过多个明细id查询") |
200 | @PostMapping(value = "/listReceiptDetailByIds") | 198 | @PostMapping(value = "/listReceiptDetailByIds") |
201 | - public Result<List<ReceiptDetail>> listReceiptDetailByIds(@RequestBody List<Integer> ids ) { | 199 | + public Result<List<ReceiptDetail>> listReceiptDetailByIds(@RequestBody List<Integer> ids) { |
202 | return Result.ok(receiptDetailService.listByIds(ids)); | 200 | return Result.ok(receiptDetailService.listByIds(ids)); |
203 | } | 201 | } |
204 | 202 | ||
205 | @ApiOperation(value = "入库单详情-查询未收完的明细", notes = "入库单详情-查询未收完的明细") | 203 | @ApiOperation(value = "入库单详情-查询未收完的明细", notes = "入库单详情-查询未收完的明细") |
206 | @GetMapping(value = "/listReceiptDetailByCode") | 204 | @GetMapping(value = "/listReceiptDetailByCode") |
207 | - public Result<IPage<ReceiptDetail>> listReceiptDetailByCode(String code, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
208 | - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | 205 | + public Result<IPage<ReceiptDetail>> listReceiptDetailByCode(String code, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
206 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | ||
209 | LambdaQueryWrapper<ReceiptDetail> query = Wrappers.lambdaQuery(); | 207 | LambdaQueryWrapper<ReceiptDetail> query = Wrappers.lambdaQuery(); |
210 | - query.eq(StringUtils.isNotEmpty(code), ReceiptDetail::getReceiptCode, code) | ||
211 | - .lt(ReceiptDetail::getStatus, QuantityConstant.RECEIPT_HEADER_COMPLETED) | ||
212 | - .last(" and qty-task_qty>0"); | 208 | + query.eq(StringUtils.isNotEmpty(code), ReceiptDetail::getReceiptCode, code).lt(ReceiptDetail::getStatus, QuantityConstant.RECEIPT_HEADER_COMPLETED) |
209 | + .last(" and qty-task_qty>0"); | ||
213 | Page<ReceiptDetail> page = new Page<ReceiptDetail>(pageNo, pageSize); | 210 | Page<ReceiptDetail> page = new Page<ReceiptDetail>(pageNo, pageSize); |
214 | IPage<ReceiptDetail> pageList = receiptDetailService.page(page, query); | 211 | IPage<ReceiptDetail> pageList = receiptDetailService.page(page, query); |
215 | return Result.ok(pageList); | 212 | return Result.ok(pageList); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/IReceiptHeaderService.java
1 | package org.jeecg.modules.wms.receipt.receiptHeader.service; | 1 | package org.jeecg.modules.wms.receipt.receiptHeader.service; |
2 | 2 | ||
3 | -import com.baomidou.mybatisplus.extension.service.IService; | ||
4 | -import org.jeecg.common.api.vo.Result; | ||
5 | -import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | ||
6 | -import org.springframework.beans.factory.annotation.Autowired; | ||
7 | import java.io.Serializable; | 3 | import java.io.Serializable; |
8 | import java.util.Collection; | 4 | import java.util.Collection; |
9 | -import java.util.List; | 5 | + |
6 | +import org.jeecg.common.api.vo.Result; | ||
7 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | ||
8 | + | ||
9 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
10 | 10 | ||
11 | /** | 11 | /** |
12 | * @Description: 入库表主表 | 12 | * @Description: 入库表主表 |
@@ -19,7 +19,7 @@ public interface IReceiptHeaderService extends IService<ReceiptHeader> { | @@ -19,7 +19,7 @@ public interface IReceiptHeaderService extends IService<ReceiptHeader> { | ||
19 | /** | 19 | /** |
20 | * 删除一对多 reason进入历史单据的原因 | 20 | * 删除一对多 reason进入历史单据的原因 |
21 | */ | 21 | */ |
22 | - public boolean delMain(String id,String reason); | 22 | + public boolean delMain(String id, String reason); |
23 | 23 | ||
24 | /** | 24 | /** |
25 | * 批量删除一对多 | 25 | * 批量删除一对多 |
@@ -40,4 +40,5 @@ public interface IReceiptHeaderService extends IService<ReceiptHeader> { | @@ -40,4 +40,5 @@ public interface IReceiptHeaderService extends IService<ReceiptHeader> { | ||
40 | public ReceiptHeader getReceiptHeaderByCode(String code, String warehouseCode); | 40 | public ReceiptHeader getReceiptHeaderByCode(String code, String warehouseCode); |
41 | 41 | ||
42 | public ReceiptHeader getReceiptHeaderByReferCode(String referCode, String warehouseCode); | 42 | public ReceiptHeader getReceiptHeaderByReferCode(String referCode, String warehouseCode); |
43 | + | ||
43 | } | 44 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
@@ -20,6 +20,8 @@ import org.jeecg.utils.StringUtils; | @@ -20,6 +20,8 @@ import org.jeecg.utils.StringUtils; | ||
20 | import org.jeecg.utils.constant.QuantityConstant; | 20 | import org.jeecg.utils.constant.QuantityConstant; |
21 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
22 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 22 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
23 | +import org.springframework.beans.factory.annotation.Autowired; | ||
24 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
23 | 25 | ||
24 | import cn.monitor4all.logRecord.annotation.OperationLog; | 26 | import cn.monitor4all.logRecord.annotation.OperationLog; |
25 | import cn.monitor4all.logRecord.context.LogRecordContext; | 27 | import cn.monitor4all.logRecord.context.LogRecordContext; |
@@ -122,6 +124,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | @@ -122,6 +124,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | ||
122 | @Override | 124 | @Override |
123 | @Transactional | 125 | @Transactional |
124 | public String createCode(String receiptType) { | 126 | public String createCode(String receiptType) { |
127 | + int i = 0; | ||
125 | String code = null; | 128 | String code = null; |
126 | Date now = new Date(); | 129 | Date now = new Date(); |
127 | SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd"); | 130 | SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd"); |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java
@@ -85,7 +85,7 @@ public class ReceiveController { | @@ -85,7 +85,7 @@ public class ReceiveController { | ||
85 | } | 85 | } |
86 | 86 | ||
87 | /** | 87 | /** |
88 | - * 收货 | 88 | + * 生成任务 |
89 | * @return | 89 | * @return |
90 | */ | 90 | */ |
91 | @AutoLog("入库单-生成任务") | 91 | @AutoLog("入库单-生成任务") |
@@ -96,4 +96,5 @@ public class ReceiveController { | @@ -96,4 +96,5 @@ public class ReceiveController { | ||
96 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); | 96 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); |
97 | return receiveService.receivingAndCreateTask(receiveList, warehouseCode); | 97 | return receiveService.receivingAndCreateTask(receiveList, warehouseCode); |
98 | } | 98 | } |
99 | + | ||
99 | } | 100 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentDetail.java
@@ -107,11 +107,7 @@ public class ShipmentDetail implements Serializable { | @@ -107,11 +107,7 @@ public class ShipmentDetail implements Serializable { | ||
107 | /** 上游行号 */ | 107 | /** 上游行号 */ |
108 | @Excel(name = "上游行号", width = 15) | 108 | @Excel(name = "上游行号", width = 15) |
109 | @ApiModelProperty(value = "上游行号") | 109 | @ApiModelProperty(value = "上游行号") |
110 | - private String referLineNum; | ||
111 | - @Excel(name = "唯一号", width = 15) | ||
112 | - @ApiModelProperty(value = "唯一号") | ||
113 | - private String uniqueCode; | ||
114 | - /** 备用字段1 */ | 110 | + private String referLineNum; /** 备用字段1 */ |
115 | @Excel(name = "备用字段1", width = 15) | 111 | @Excel(name = "备用字段1", width = 15) |
116 | @ApiModelProperty(value = "备用字段1") | 112 | @ApiModelProperty(value = "备用字段1") |
117 | private String userdef1; | 113 | private String userdef1; |