Commit c4effb2a4aa5f28fb5641c1b8b02f1555a9d3018
1 parent
c062b7a1
增加 取消组盘功能
Showing
10 changed files
with
186 additions
and
126 deletions
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... | ... | @@ -69,8 +69,8 @@ |
69 | 69 | <a-button type="primary" icon="import">导入</a-button> |
70 | 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 | 74 | </div> |
75 | 75 | |
76 | 76 | <!-- table区域-begin --> |
... | ... | @@ -118,19 +118,20 @@ |
118 | 118 | </template> |
119 | 119 | |
120 | 120 | <span slot="action" slot-scope="text, record"> |
121 | - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)">编辑</a> | |
122 | 121 | <a-divider type="vertical"/> |
123 | 122 | <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)">生成任务</a> |
124 | 123 | <a v-else-if="record.status == 0" @click="createTask(record)">生成任务</a> |
125 | 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 | 129 | <a-dropdown> |
127 | 130 | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
128 | 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 | 135 | </a-menu> |
135 | 136 | </a-dropdown> |
136 | 137 | </span> |
... | ... |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderHistoryList.vue
... | ... | @@ -108,8 +108,8 @@ |
108 | 108 | <!-- <a-button type="primary" icon="import">导入</a-button>--> |
109 | 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 | 113 | </div> |
114 | 114 | |
115 | 115 | <!-- table区域-begin --> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
1 | 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 | 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 | 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 | 21 | import org.jeecg.modules.wms.config.location.entity.Location; |
13 | 22 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
14 | 23 | import org.jeecg.modules.wms.config.port.entity.Port; |
... | ... | @@ -19,34 +28,27 @@ import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContai |
19 | 28 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; |
20 | 29 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerDetailService; |
21 | 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 | 32 | import org.jeecg.utils.StringUtils; |
24 | 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 | 34 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
40 | 35 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
41 | 36 | import org.jeecgframework.poi.excel.entity.ExportParams; |
42 | 37 | import org.jeecgframework.poi.excel.entity.ImportParams; |
43 | 38 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
39 | +import org.springframework.beans.factory.annotation.Autowired; | |
40 | +import org.springframework.web.bind.annotation.*; | |
44 | 41 | import org.springframework.web.multipart.MultipartFile; |
45 | 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 | 54 | * @Description: 入库组盘 |
... | ... | @@ -133,8 +135,9 @@ public class ReceiptContainerHeaderController extends JeecgController<ReceiptCon |
133 | 135 | @DeleteMapping(value = "/delete") |
134 | 136 | @RequiresPermissions("receiptContainerHeader:delete") |
135 | 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 | 150 | @DeleteMapping(value = "/deleteBatch") |
148 | 151 | @RequiresPermissions("receiptContainerHeader:deleteBatch") |
149 | 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 | 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.springframework.beans.factory.annotation.Autowired; | |
8 | 3 | import java.io.Serializable; |
9 | 4 | import java.util.Collection; |
10 | 5 | import java.util.List; |
11 | 6 | |
7 | +import org.jeecg.common.api.vo.Result; | |
8 | +import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; | |
9 | + | |
10 | +import com.baomidou.mybatisplus.extension.service.IService; | |
11 | + | |
12 | 12 | /** |
13 | 13 | * @Description: 入库组盘 |
14 | 14 | * @Author: jeecg-boot |
... | ... | @@ -49,4 +49,15 @@ public interface IReceiptContainerHeaderService extends IService<ReceiptContaine |
49 | 49 | * @return |
50 | 50 | */ |
51 | 51 | boolean cancelReceiptTask(Integer receiptContainerHeaderId); |
52 | + | |
53 | + /** | |
54 | + * 取消组盘 | |
55 | + */ | |
56 | + public Result cancelReceiving(Integer id); | |
57 | + | |
58 | + /** | |
59 | + * 批量取消组盘 | |
60 | + */ | |
61 | + public Result cancelReceiving(List<Integer> ids); | |
62 | + | |
52 | 63 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
1 | 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 | 11 | import org.jeecg.common.api.vo.Result; |
7 | 12 | import org.jeecg.modules.wms.config.container.entity.Container; |
8 | 13 | import org.jeecg.modules.wms.config.container.service.IContainerService; |
... | ... | @@ -23,17 +28,14 @@ import org.jeecg.modules.wms.task.taskHeader.service.ITaskDetailService; |
23 | 28 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; |
24 | 29 | import org.jeecg.utils.StringUtils; |
25 | 30 | import org.jeecg.utils.constant.QuantityConstant; |
26 | -import org.springframework.stereotype.Service; | |
27 | -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
28 | 31 | import org.springframework.beans.factory.annotation.Autowired; |
32 | +import org.springframework.stereotype.Service; | |
29 | 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 | 41 | * @Description: 入库组盘 |
... | ... | @@ -322,4 +324,48 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
322 | 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 | 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 | 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 | 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 | 22 | import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean; |
15 | 23 | import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean; |
16 | 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 | 25 | import org.jeecg.modules.wms.config.material.service.IMaterialService; |
26 | +import org.jeecg.modules.wms.framework.aspectj.lang.annotation.ApiLogger; | |
23 | 27 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; |
24 | 28 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
25 | 29 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; |
26 | 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 | 32 | import org.jeecg.utils.StringUtils; |
29 | 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 | 34 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
48 | 35 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
49 | 36 | import org.jeecgframework.poi.excel.entity.ExportParams; |
50 | 37 | import org.jeecgframework.poi.excel.entity.ImportParams; |
51 | 38 | import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; |
39 | +import org.springframework.beans.factory.annotation.Autowired; | |
40 | +import org.springframework.web.bind.annotation.*; | |
52 | 41 | import org.springframework.web.multipart.MultipartFile; |
53 | 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 | 57 | * @Description: 入库表主表 |
... | ... | @@ -144,7 +141,8 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec |
144 | 141 | @RequiresPermissions("receiptHeader:delete") |
145 | 142 | @DeleteMapping(value = "/delete") |
146 | 143 | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
147 | - receiptHeaderService.delMain(id,QuantityConstant.WMS_DELETE_RECEIPT); | |
144 | + receiptHeaderService.delMain(id, QuantityConstant.WMS_DELETE_RECEIPT); | |
145 | + | |
148 | 146 | return Result.OK("删除成功!"); |
149 | 147 | } |
150 | 148 | |
... | ... | @@ -199,18 +197,17 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec |
199 | 197 | |
200 | 198 | @ApiOperation(value = "入库单详情-通过多个明细id查询", notes = "入库单详情-通过多个明细id查询") |
201 | 199 | @PostMapping(value = "/listReceiptDetailByIds") |
202 | - public Result<List<ReceiptDetail>> listReceiptDetailByIds(@RequestBody List<Integer> ids ) { | |
200 | + public Result<List<ReceiptDetail>> listReceiptDetailByIds(@RequestBody List<Integer> ids) { | |
203 | 201 | return Result.ok(receiptDetailService.listByIds(ids)); |
204 | 202 | } |
205 | 203 | |
206 | 204 | @ApiOperation(value = "入库单详情-查询未收完的明细", notes = "入库单详情-查询未收完的明细") |
207 | 205 | @GetMapping(value = "/listReceiptDetailByCode") |
208 | - public Result<IPage<ReceiptDetail>> listReceiptDetailByCode(String code, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | |
209 | - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | |
206 | + public Result<IPage<ReceiptDetail>> listReceiptDetailByCode(String code, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | |
207 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | |
210 | 208 | LambdaQueryWrapper<ReceiptDetail> query = Wrappers.lambdaQuery(); |
211 | - query.eq(StringUtils.isNotEmpty(code), ReceiptDetail::getReceiptCode, code) | |
212 | - .lt(ReceiptDetail::getStatus, QuantityConstant.RECEIPT_HEADER_COMPLETED) | |
213 | - .last(" and qty-task_qty>0"); | |
209 | + query.eq(StringUtils.isNotEmpty(code), ReceiptDetail::getReceiptCode, code).lt(ReceiptDetail::getStatus, QuantityConstant.RECEIPT_HEADER_COMPLETED) | |
210 | + .last(" and qty-task_qty>0"); | |
214 | 211 | Page<ReceiptDetail> page = new Page<ReceiptDetail>(pageNo, pageSize); |
215 | 212 | IPage<ReceiptDetail> pageList = receiptDetailService.page(page, query); |
216 | 213 | return Result.ok(pageList); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/IReceiptHeaderService.java
1 | 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 | 3 | import java.io.Serializable; |
8 | 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 | 12 | * @Description: 入库表主表 |
... | ... | @@ -19,7 +19,7 @@ public interface IReceiptHeaderService extends IService<ReceiptHeader> { |
19 | 19 | /** |
20 | 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 | 40 | public ReceiptHeader getReceiptHeaderByCode(String code, String warehouseCode); |
41 | 41 | |
42 | 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
1 | 1 | package org.jeecg.modules.wms.receipt.receiptHeader.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.math.BigDecimal; | |
5 | +import java.text.SimpleDateFormat; | |
6 | +import java.util.Collection; | |
7 | +import java.util.Date; | |
8 | +import java.util.List; | |
9 | + | |
10 | +import javax.annotation.Resource; | |
11 | + | |
6 | 12 | import org.jeecg.common.api.vo.Result; |
7 | -import org.jeecg.common.util.DateUtils; | |
8 | 13 | import org.jeecg.modules.wms.config.receiptType.entity.ReceiptType; |
9 | 14 | import org.jeecg.modules.wms.config.receiptType.service.IReceiptTypeService; |
10 | -import org.jeecg.modules.wms.config.receiptType.service.impl.ReceiptTypeServiceImpl; | |
11 | 15 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; |
12 | 16 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
13 | 17 | import org.jeecg.modules.wms.receipt.receiptHeader.mapper.ReceiptDetailMapper; |
... | ... | @@ -17,18 +21,14 @@ import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService |
17 | 21 | import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptHeaderHistoryService; |
18 | 22 | import org.jeecg.utils.StringUtils; |
19 | 23 | import org.jeecg.utils.constant.QuantityConstant; |
20 | -import org.springframework.stereotype.Service; | |
21 | -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
22 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
25 | +import org.springframework.stereotype.Service; | |
23 | 26 | import org.springframework.transaction.annotation.Transactional; |
24 | 27 | |
25 | -import javax.annotation.Resource; | |
26 | -import java.io.Serializable; | |
27 | -import java.math.BigDecimal; | |
28 | -import java.text.SimpleDateFormat; | |
29 | -import java.util.Date; | |
30 | -import java.util.List; | |
31 | -import java.util.Collection; | |
28 | +import com.aliyun.oss.ServiceException; | |
29 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
30 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
31 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @Description: 入库表主表 |
... | ... | @@ -53,18 +53,18 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
53 | 53 | private IReceiptHeaderHistoryService receiptHeaderHistoryService; |
54 | 54 | |
55 | 55 | /** |
56 | - * @param id 入库单主表id | |
57 | - * @param reason 进入历史单据的原因 | |
56 | + * @param id 入库单主表id | |
57 | + * @param reason 进入历史单据的原因 | |
58 | 58 | * @return |
59 | 59 | */ |
60 | 60 | @Override |
61 | 61 | @Transactional |
62 | - public boolean delMain(String id,String reason) { | |
62 | + public boolean delMain(String id, String reason) { | |
63 | 63 | ReceiptHeader receiptHeader = getById(id); |
64 | 64 | if (receiptHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) { |
65 | 65 | throw new ServiceException("不能删除非新建状态单据"); |
66 | 66 | } |
67 | - receiptHeaderHistoryService.saveById(id,reason); | |
67 | + receiptHeaderHistoryService.saveById(id, reason); | |
68 | 68 | boolean success = receiptDetailMapper.deleteByMainId(id); |
69 | 69 | |
70 | 70 | if (!success) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java
... | ... | @@ -85,7 +85,7 @@ public class ReceiveController { |
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * 收货 | |
88 | + * 生成任务 | |
89 | 89 | * @return |
90 | 90 | */ |
91 | 91 | @AutoLog("入库单-生成任务") |
... | ... | @@ -96,4 +96,5 @@ public class ReceiveController { |
96 | 96 | String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); |
97 | 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
... | ... | @@ -108,8 +108,6 @@ public class ShipmentDetail implements Serializable { |
108 | 108 | @Excel(name = "上游行号", width = 15) |
109 | 109 | @ApiModelProperty(value = "上游行号") |
110 | 110 | private String referLineNum; |
111 | - @ApiModelProperty(value = "唯一号") | |
112 | - private String uniqueCode; | |
113 | 111 | /** 备用字段1 */ |
114 | 112 | @Excel(name = "备用字段1", width = 15) |
115 | 113 | @ApiModelProperty(value = "备用字段1") |
... | ... |