Commit 759061a76deead8a2469adfcd9d1abd2ea807dbf
1 parent
71df7cff
更新入库单数量、更新出库单数量
Showing
10 changed files
with
132 additions
and
15 deletions
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
@@ -292,10 +292,12 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | @@ -292,10 +292,12 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai | ||
292 | return false; | 292 | return false; |
293 | } | 293 | } |
294 | int receiptContainerStatus = receiptContainerHeader.getStatus(); | 294 | int receiptContainerStatus = receiptContainerHeader.getStatus(); |
295 | - if(receiptContainerStatus == QuantityConstant.RECEIPT_CONTAINER_TASK) { | ||
296 | - throw new ServiceException("取消入库任务时, "); | 295 | + if(receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_TASK) { |
296 | + throw new ServiceException("取消入库任务时, 任务状态不为生成任务状态"); | ||
297 | } | 297 | } |
298 | receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_BUILD); | 298 | receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_BUILD); |
299 | + // 取消任务后,不指定组盘库位 | ||
300 | + receiptContainerHeader.setToLocationCode(QuantityConstant.EMPTY_STRING); | ||
299 | boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader); | 301 | boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader); |
300 | if(!success) { | 302 | if(!success) { |
301 | throw new ServiceException("取消入库任务时, 更新入库组盘头失败"); | 303 | throw new ServiceException("取消入库任务时, 更新入库组盘头失败"); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/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; | ||
3 | import org.jeecg.common.system.query.QueryGenerator; | 4 | import org.jeecg.common.system.query.QueryGenerator; |
4 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 5 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
5 | import com.baomidou.mybatisplus.core.metadata.IPage; | 6 | import com.baomidou.mybatisplus.core.metadata.IPage; |
@@ -219,7 +220,25 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec | @@ -219,7 +220,25 @@ public class ReceiptHeaderController extends JeecgController<ReceiptHeader, IRec | ||
219 | @ApiOperation(value="入库单详情-通过id删除", notes="入库单详情-通过id删除") | 220 | @ApiOperation(value="入库单详情-通过id删除", notes="入库单详情-通过id删除") |
220 | @DeleteMapping(value = "/deleteReceiptDetail") | 221 | @DeleteMapping(value = "/deleteReceiptDetail") |
221 | public Result<String> deleteReceiptDetail(@RequestParam(name="id",required=true) String id) { | 222 | public Result<String> deleteReceiptDetail(@RequestParam(name="id",required=true) String id) { |
222 | - receiptDetailService.removeById(id); | 223 | + ReceiptDetail receiptDetail = receiptDetailService.getById(id); |
224 | + if(receiptDetail == null) { | ||
225 | + return Result.error("删除失败, 没有找到入库单详情"); | ||
226 | + } | ||
227 | + ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId()); | ||
228 | + if(receiptHeader == null) { | ||
229 | + return Result.error("删除失败, 没有找到入库单"); | ||
230 | + } | ||
231 | + if(receiptHeader.getFirstStatus().intValue() != QuantityConstant.RECEIPT_HEADER_BUILD) { | ||
232 | + return Result.error("删除失败, 入库单必须是新建状态才能删除详情"); | ||
233 | + } | ||
234 | + boolean success = receiptDetailService.removeById(id); | ||
235 | + if(!success) { | ||
236 | + throw new ServiceException("删除详情失败"); | ||
237 | + } | ||
238 | + success = receiptHeaderService.updateReceiptHeader(receiptDetail.getReceiptId()); | ||
239 | + if(!success) { | ||
240 | + throw new ServiceException("更新入库单头数量失败"); | ||
241 | + } | ||
223 | return Result.OK("删除成功!"); | 242 | return Result.OK("删除成功!"); |
224 | } | 243 | } |
225 | 244 |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/IReceiptHeaderService.java
@@ -31,4 +31,8 @@ public interface IReceiptHeaderService extends IService<ReceiptHeader> { | @@ -31,4 +31,8 @@ public interface IReceiptHeaderService extends IService<ReceiptHeader> { | ||
31 | public String createCode(String receiptType); | 31 | public String createCode(String receiptType); |
32 | 32 | ||
33 | public boolean updateReceiptHeaderStatus(Integer id); | 33 | public boolean updateReceiptHeaderStatus(Integer id); |
34 | + | ||
35 | + public boolean updateReceiptHeader(Integer id); | ||
36 | + | ||
37 | + | ||
34 | } | 38 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptDetailServiceImpl.java
1 | package org.jeecg.modules.wms.receipt.receiptHeader.service.impl; | 1 | package org.jeecg.modules.wms.receipt.receiptHeader.service.impl; |
2 | 2 | ||
3 | +import com.aliyun.oss.ServiceException; | ||
3 | import org.jeecg.common.api.vo.Result; | 4 | import org.jeecg.common.api.vo.Result; |
4 | import org.jeecg.modules.wms.config.material.entity.Material; | 5 | import org.jeecg.modules.wms.config.material.entity.Material; |
5 | import org.jeecg.modules.wms.config.material.service.IMaterialService; | 6 | import org.jeecg.modules.wms.config.material.service.IMaterialService; |
@@ -47,6 +48,9 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R | @@ -47,6 +48,9 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R | ||
47 | if(receiptHeader == null) { | 48 | if(receiptHeader == null) { |
48 | return Result.error("添加失败,没有找到入库单头"); | 49 | return Result.error("添加失败,没有找到入库单头"); |
49 | } | 50 | } |
51 | + if(receiptHeader.getFirstStatus().intValue() != QuantityConstant.RECEIPT_HEADER_BUILD) { | ||
52 | + return Result.error("添加失败,入库单非创建状态不能新增详情"); | ||
53 | + } | ||
50 | String receiptCode = receiptHeader.getCode(); | 54 | String receiptCode = receiptHeader.getCode(); |
51 | if(StringUtils.isEmpty(receiptCode)) { | 55 | if(StringUtils.isEmpty(receiptCode)) { |
52 | return Result.error("添加失败,没有找到入库单编码"); | 56 | return Result.error("添加失败,没有找到入库单编码"); |
@@ -68,9 +72,13 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R | @@ -68,9 +72,13 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R | ||
68 | receiptDetail.setMaterialSpec(materialSpec); | 72 | receiptDetail.setMaterialSpec(materialSpec); |
69 | receiptDetail.setMaterialUnit(materialUnit); | 73 | receiptDetail.setMaterialUnit(materialUnit); |
70 | receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD); | 74 | receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD); |
71 | - boolean result = receiptDetailService.save(receiptDetail); | ||
72 | - if(!result) { | ||
73 | - return Result.error("添加失败, 保存入库单详情的时候报错"); | 75 | + boolean success = receiptDetailService.save(receiptDetail); |
76 | + if(!success) { | ||
77 | + throw new ServiceException("添加失败, 保存入库单详情的时候报错"); | ||
78 | + } | ||
79 | + success = receiptHeaderService.updateReceiptHeader(receiptDetail.getReceiptId()); | ||
80 | + if(!success) { | ||
81 | + throw new ServiceException("添加失败, 保存入库单详失败"); | ||
74 | } | 82 | } |
75 | return Result.OK("添加成功!"); | 83 | return Result.OK("添加成功!"); |
76 | } | 84 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
@@ -23,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional; | @@ -23,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional; | ||
23 | 23 | ||
24 | import javax.annotation.Resource; | 24 | import javax.annotation.Resource; |
25 | import java.io.Serializable; | 25 | import java.io.Serializable; |
26 | +import java.math.BigDecimal; | ||
26 | import java.text.SimpleDateFormat; | 27 | import java.text.SimpleDateFormat; |
27 | import java.util.Date; | 28 | import java.util.Date; |
28 | import java.util.List; | 29 | import java.util.List; |
@@ -166,4 +167,28 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | @@ -166,4 +167,28 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R | ||
166 | boolean result = receiptHeaderService.updateById(receiptHeader); | 167 | boolean result = receiptHeaderService.updateById(receiptHeader); |
167 | return result; | 168 | return result; |
168 | } | 169 | } |
170 | + | ||
171 | + @Override | ||
172 | + public boolean updateReceiptHeader(Integer id) { | ||
173 | + LambdaQueryWrapper<ReceiptDetail> receiptDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
174 | + receiptDetailLambdaQueryWrapper.eq(ReceiptDetail::getReceiptId, id); | ||
175 | + List<ReceiptDetail> receiptDetailList = receiptDetailService.list(receiptDetailLambdaQueryWrapper); | ||
176 | + ReceiptHeader receiptHeader = receiptHeaderService.getById(id); | ||
177 | + if(receiptHeader == null) { | ||
178 | + return false; | ||
179 | + } | ||
180 | + BigDecimal totalQty = new BigDecimal(0); | ||
181 | + int totalLines = 0; | ||
182 | + for(ReceiptDetail receiptDetail : receiptDetailList) { | ||
183 | + totalLines++; | ||
184 | + totalQty = totalQty.add(receiptDetail.getQty()); | ||
185 | + } | ||
186 | + receiptHeader.setTotalqty(totalQty); | ||
187 | + receiptHeader.setTotallines(totalLines); | ||
188 | + if (!receiptHeaderService.updateById(receiptHeader)){ | ||
189 | + return false; | ||
190 | + } | ||
191 | + return true; | ||
192 | + } | ||
193 | + | ||
169 | } | 194 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/controller/ShipmentHeaderController.java
1 | package org.jeecg.modules.wms.shipment.shipmentHeader.controller; | 1 | package org.jeecg.modules.wms.shipment.shipmentHeader.controller; |
2 | 2 | ||
3 | +import com.aliyun.oss.ServiceException; | ||
3 | import org.jeecg.common.system.query.QueryGenerator; | 4 | import org.jeecg.common.system.query.QueryGenerator; |
4 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 5 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
5 | import com.baomidou.mybatisplus.core.metadata.IPage; | 6 | import com.baomidou.mybatisplus.core.metadata.IPage; |
@@ -8,11 +9,14 @@ import lombok.extern.slf4j.Slf4j; | @@ -8,11 +9,14 @@ import lombok.extern.slf4j.Slf4j; | ||
8 | import org.jeecg.common.system.base.controller.JeecgController; | 9 | import org.jeecg.common.system.base.controller.JeecgController; |
9 | import org.jeecg.common.api.vo.Result; | 10 | import org.jeecg.common.api.vo.Result; |
10 | import org.jeecg.common.system.util.JwtUtil; | 11 | import org.jeecg.common.system.util.JwtUtil; |
12 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; | ||
13 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | ||
11 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; | 14 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; |
12 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | 15 | import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; |
13 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; | 16 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; |
14 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; | 17 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; |
15 | import org.jeecg.utils.StringUtils; | 18 | import org.jeecg.utils.StringUtils; |
19 | +import org.jeecg.utils.constant.QuantityConstant; | ||
16 | import org.springframework.beans.factory.annotation.Autowired; | 20 | import org.springframework.beans.factory.annotation.Autowired; |
17 | import org.springframework.web.bind.annotation.*; | 21 | import org.springframework.web.bind.annotation.*; |
18 | import javax.servlet.http.HttpServletRequest; | 22 | import javax.servlet.http.HttpServletRequest; |
@@ -206,7 +210,25 @@ public class ShipmentHeaderController extends JeecgController<ShipmentHeader, IS | @@ -206,7 +210,25 @@ public class ShipmentHeaderController extends JeecgController<ShipmentHeader, IS | ||
206 | @ApiOperation(value="出库单详情-通过id删除", notes="出库单详情-通过id删除") | 210 | @ApiOperation(value="出库单详情-通过id删除", notes="出库单详情-通过id删除") |
207 | @DeleteMapping(value = "/deleteShipmentDetail") | 211 | @DeleteMapping(value = "/deleteShipmentDetail") |
208 | public Result<String> deleteShipmentDetail(@RequestParam(name="id",required=true) String id) { | 212 | public Result<String> deleteShipmentDetail(@RequestParam(name="id",required=true) String id) { |
209 | - shipmentDetailService.removeById(id); | 213 | + ShipmentDetail shipmentDetail = shipmentDetailService.getById(id); |
214 | + if(shipmentDetail == null) { | ||
215 | + return Result.error("删除失败, 没有找到出库单详情"); | ||
216 | + } | ||
217 | + ShipmentHeader shipmentHeader = shipmentHeaderService.getById(shipmentDetail.getShipmentId()); | ||
218 | + if(shipmentHeader == null) { | ||
219 | + return Result.error("删除失败, 没有找到出库单"); | ||
220 | + } | ||
221 | + if(shipmentHeader.getFirstStatus().intValue() != QuantityConstant.SHIPMENT_HEADER_BUILD) { | ||
222 | + return Result.error("删除失败, 出库单必须是新建状态才能删除详情"); | ||
223 | + } | ||
224 | + boolean success = shipmentDetailService.removeById(id); | ||
225 | + if(!success) { | ||
226 | + throw new ServiceException("删除详情失败"); | ||
227 | + } | ||
228 | + success = shipmentHeaderService.updateShipmentHeader(shipmentDetail.getShipmentId()); | ||
229 | + if(!success) { | ||
230 | + throw new ServiceException("更新出库单头数量失败"); | ||
231 | + } | ||
210 | return Result.OK("删除成功!"); | 232 | return Result.OK("删除成功!"); |
211 | } | 233 | } |
212 | 234 |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/IShipmentDetailService.java
@@ -18,4 +18,6 @@ public interface IShipmentDetailService extends IService<ShipmentDetail> { | @@ -18,4 +18,6 @@ public interface IShipmentDetailService extends IService<ShipmentDetail> { | ||
18 | public List<ShipmentDetail> selectByMainId(String mainId); | 18 | public List<ShipmentDetail> selectByMainId(String mainId); |
19 | 19 | ||
20 | public Result saveShipmentDetail(ShipmentDetail shipmentDetail); | 20 | public Result saveShipmentDetail(ShipmentDetail shipmentDetail); |
21 | + | ||
22 | + public List<ShipmentDetail> getShipmentDetailListByShipmentId(Integer id); | ||
21 | } | 23 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/IShipmentHeaderService.java
@@ -35,4 +35,5 @@ public interface IShipmentHeaderService extends IService<ShipmentHeader> { | @@ -35,4 +35,5 @@ public interface IShipmentHeaderService extends IService<ShipmentHeader> { | ||
35 | 35 | ||
36 | public boolean updateShipmentHeaderStatus(Integer id); | 36 | public boolean updateShipmentHeaderStatus(Integer id); |
37 | 37 | ||
38 | + public boolean updateShipmentHeader(Integer id); | ||
38 | } | 39 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentDetailServiceImpl.java
1 | package org.jeecg.modules.wms.shipment.shipmentHeader.service.impl; | 1 | package org.jeecg.modules.wms.shipment.shipmentHeader.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 org.jeecg.common.api.vo.Result; | 6 | import org.jeecg.common.api.vo.Result; |
4 | import org.jeecg.modules.wms.config.material.entity.Material; | 7 | import org.jeecg.modules.wms.config.material.entity.Material; |
5 | import org.jeecg.modules.wms.config.material.service.IMaterialService; | 8 | import org.jeecg.modules.wms.config.material.service.IMaterialService; |
@@ -69,10 +72,22 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, | @@ -69,10 +72,22 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, | ||
69 | shipmentDetail.setMaterialSpec(materialSpec); | 72 | shipmentDetail.setMaterialSpec(materialSpec); |
70 | shipmentDetail.setMaterialUnit(materialUnit); | 73 | shipmentDetail.setMaterialUnit(materialUnit); |
71 | shipmentDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD); | 74 | shipmentDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD); |
72 | - boolean result = shipmentDetailService.save(shipmentDetail); | ||
73 | - if(!result) { | ||
74 | - return Result.error("添加失败, 保存出库单详情的时候报错"); | 75 | + boolean success = shipmentDetailService.save(shipmentDetail); |
76 | + if(!success) { | ||
77 | + throw new ServiceException("添加失败, 保存出库单详情的时候报错"); | ||
78 | + } | ||
79 | + success = shipmentHeaderService.updateShipmentHeader(shipmentHeader.getId()); | ||
80 | + if(!success) { | ||
81 | + throw new ServiceException("添加失败, 更新出库单失败"); | ||
75 | } | 82 | } |
76 | return Result.OK("添加成功!"); | 83 | return Result.OK("添加成功!"); |
77 | } | 84 | } |
85 | + | ||
86 | + @Override | ||
87 | + public List<ShipmentDetail> getShipmentDetailListByShipmentId(Integer id) { | ||
88 | + LambdaQueryWrapper<ShipmentDetail> shipmentDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
89 | + shipmentDetailLambdaQueryWrapper.eq(ShipmentDetail::getShipmentId, id); | ||
90 | + List<ShipmentDetail> shipmentDetailList = shipmentDetailService.list(shipmentDetailLambdaQueryWrapper); | ||
91 | + return shipmentDetailList; | ||
92 | + } | ||
78 | } | 93 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
@@ -152,11 +152,9 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -152,11 +152,9 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
152 | } | 152 | } |
153 | 153 | ||
154 | @Override | 154 | @Override |
155 | - public boolean updateShipmentHeaderStatus(Integer id) { | ||
156 | - LambdaQueryWrapper<ShipmentDetail> shipmentDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
157 | - shipmentDetailLambdaQueryWrapper.eq(ShipmentDetail::getShipmentId, id); | ||
158 | - List<ShipmentDetail> shipmentDetailList = shipmentDetailService.list(shipmentDetailLambdaQueryWrapper); | ||
159 | - ShipmentHeader shipmentHeader = shipmentHeaderService.getById(id); | 155 | + public boolean updateShipmentHeaderStatus(Integer shipmentId) { |
156 | + List<ShipmentDetail> shipmentDetailList = shipmentDetailService.getShipmentDetailListByShipmentId(shipmentId); | ||
157 | + ShipmentHeader shipmentHeader = shipmentHeaderService.getById(shipmentId); | ||
160 | if(shipmentHeader == null) { | 158 | if(shipmentHeader == null) { |
161 | return false; | 159 | return false; |
162 | } | 160 | } |
@@ -185,4 +183,25 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | @@ -185,4 +183,25 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, | ||
185 | return result; | 183 | return result; |
186 | } | 184 | } |
187 | 185 | ||
186 | + @Override | ||
187 | + public boolean updateShipmentHeader(Integer shipmentId) { | ||
188 | + List<ShipmentDetail> shipmentDetailList = shipmentDetailService.getShipmentDetailListByShipmentId(shipmentId); | ||
189 | + ShipmentHeader shipmentHeader = shipmentHeaderService.getById(shipmentId); | ||
190 | + if(shipmentHeader == null) { | ||
191 | + return false; | ||
192 | + } | ||
193 | + BigDecimal totalQty = new BigDecimal(0); | ||
194 | + int totalLines = 0; | ||
195 | + for(ShipmentDetail shipmentDetail : shipmentDetailList) { | ||
196 | + totalLines++; | ||
197 | + totalQty = totalQty.add(shipmentDetail.getQty()); | ||
198 | + } | ||
199 | + shipmentHeader.setTotalQty(totalQty); | ||
200 | + shipmentHeader.setTotalLines(totalLines); | ||
201 | + if (!shipmentHeaderService.updateById(shipmentHeader)){ | ||
202 | + return false; | ||
203 | + } | ||
204 | + return true; | ||
205 | + } | ||
206 | + | ||
188 | } | 207 | } |