Showing
11 changed files
with
147 additions
and
4 deletions
| @@ -269,7 +269,7 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | @@ -269,7 +269,7 @@ public class GetPurchaseOrderInfoBo extends BaseBo<PurchaseOrderInfo> { | ||
| 269 | /** | 269 | /** |
| 270 | * 是否展示审核按钮(非持久化字段) | 270 | * 是否展示审核按钮(非持久化字段) |
| 271 | */ | 271 | */ |
| 272 | - @TableField(exist = false) | 272 | + @ApiModelProperty("是否展示审核按钮") |
| 273 | private Boolean showExamine; | 273 | private Boolean showExamine; |
| 274 | 274 | ||
| 275 | 275 |
| @@ -3,6 +3,8 @@ package com.lframework.xingyun.sc.bo.order; | @@ -3,6 +3,8 @@ package com.lframework.xingyun.sc.bo.order; | ||
| 3 | import com.fasterxml.jackson.annotation.JsonFormat; | 3 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 4 | import com.lframework.starter.common.constants.StringPool; | 4 | import com.lframework.starter.common.constants.StringPool; |
| 5 | import com.lframework.starter.web.core.bo.BaseBo; | 5 | import com.lframework.starter.web.core.bo.BaseBo; |
| 6 | + | ||
| 7 | +import java.math.BigDecimal; | ||
| 6 | import java.time.LocalDate; | 8 | import java.time.LocalDate; |
| 7 | import java.util.List; | 9 | import java.util.List; |
| 8 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevoke; | 10 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevoke; |
| @@ -96,12 +98,36 @@ public class GetPurchaseOrderRevokeBo extends BaseBo<PurchaseOrderRevoke> { | @@ -96,12 +98,36 @@ public class GetPurchaseOrderRevokeBo extends BaseBo<PurchaseOrderRevoke> { | ||
| 96 | private String confirmationVoucherFileName; | 98 | private String confirmationVoucherFileName; |
| 97 | 99 | ||
| 98 | /** | 100 | /** |
| 101 | + * 原总数量 | ||
| 102 | + */ | ||
| 103 | + @ApiModelProperty("原总数量") | ||
| 104 | + private BigDecimal totalQuantity; | ||
| 105 | + | ||
| 106 | + /** | ||
| 107 | + * 撤销总数量 | ||
| 108 | + */ | ||
| 109 | + @ApiModelProperty("撤销总数量") | ||
| 110 | + private BigDecimal totalRevokeQuantity; | ||
| 111 | + | ||
| 112 | + /** | ||
| 99 | * 创建人(制单人) | 113 | * 创建人(制单人) |
| 100 | */ | 114 | */ |
| 101 | @ApiModelProperty("创建人") | 115 | @ApiModelProperty("创建人") |
| 102 | private String createBy; | 116 | private String createBy; |
| 103 | 117 | ||
| 104 | /** | 118 | /** |
| 119 | + * 是否为撤销单创建人 | ||
| 120 | + */ | ||
| 121 | + @ApiModelProperty("创建人") | ||
| 122 | + private boolean revokeCreateBy; | ||
| 123 | + | ||
| 124 | + /** | ||
| 125 | + * 是否展示审核按钮(非持久化字段) | ||
| 126 | + */ | ||
| 127 | + @ApiModelProperty("是否展示审核按钮") | ||
| 128 | + private Boolean showExamine; | ||
| 129 | + | ||
| 130 | + /** | ||
| 105 | * 订货单撤销表物料行 | 131 | * 订货单撤销表物料行 |
| 106 | */ | 132 | */ |
| 107 | @ApiModelProperty("订货单撤销表物料行") | 133 | @ApiModelProperty("订货单撤销表物料行") |
| @@ -2,12 +2,15 @@ package com.lframework.xingyun.sc.controller.order; | @@ -2,12 +2,15 @@ package com.lframework.xingyun.sc.controller.order; | ||
| 2 | 2 | ||
| 3 | import com.lframework.starter.common.utils.StringUtil; | 3 | import com.lframework.starter.common.utils.StringUtil; |
| 4 | import com.lframework.starter.web.core.annotations.security.HasPermission; | 4 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 5 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | ||
| 5 | import com.lframework.starter.web.core.controller.DefaultBaseController; | 6 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 6 | import com.lframework.starter.web.core.utils.PageResultUtil; | 7 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 7 | import com.lframework.starter.web.core.components.resp.PageResult; | 8 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 8 | import com.lframework.starter.web.core.components.resp.InvokeResult; | 9 | import com.lframework.starter.web.core.components.resp.InvokeResult; |
| 9 | import javax.annotation.Resource; | 10 | import javax.annotation.Resource; |
| 10 | import javax.validation.constraints.NotBlank; | 11 | import javax.validation.constraints.NotBlank; |
| 12 | + | ||
| 13 | +import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderInfoBo; | ||
| 11 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderRevokeBo; | 14 | import com.lframework.xingyun.sc.bo.order.GetPurchaseOrderRevokeBo; |
| 12 | import com.lframework.xingyun.sc.entity.*; | 15 | import com.lframework.xingyun.sc.entity.*; |
| 13 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | 16 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| @@ -64,7 +67,18 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | @@ -64,7 +67,18 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | ||
| 64 | List<GetPurchaseOrderRevokeBo> results = null; | 67 | List<GetPurchaseOrderRevokeBo> results = null; |
| 65 | 68 | ||
| 66 | if (!CollectionUtil.isEmpty(datas)) { | 69 | if (!CollectionUtil.isEmpty(datas)) { |
| 67 | - results = datas.stream().map(GetPurchaseOrderRevokeBo::new).collect(Collectors.toList()); | 70 | + String currentUserId = SecurityUtil.getCurrentUser().getId(); |
| 71 | + | ||
| 72 | + results = datas.stream().map(purchaseOrderRevoke -> { | ||
| 73 | + GetPurchaseOrderRevokeBo bo = new GetPurchaseOrderRevokeBo(purchaseOrderRevoke); | ||
| 74 | + // 判断 createById 是否等于当前用户 ID | ||
| 75 | + boolean isCreateBy = false; | ||
| 76 | + if (currentUserId.equals(purchaseOrderRevoke.getCreateById())) { | ||
| 77 | + isCreateBy = true; | ||
| 78 | + } | ||
| 79 | + bo.setRevokeCreateBy(isCreateBy); | ||
| 80 | + return bo; | ||
| 81 | + }).collect(Collectors.toList()); | ||
| 68 | } | 82 | } |
| 69 | 83 | ||
| 70 | return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results)); | 84 | return InvokeResultBuilder.success(PageResultUtil.rebuild(pageResult, results)); |
| @@ -87,6 +87,16 @@ public class PurchaseOrderRevoke extends BaseEntity implements BaseDto { | @@ -87,6 +87,16 @@ public class PurchaseOrderRevoke extends BaseEntity implements BaseDto { | ||
| 87 | private String confirmationVoucherFileName; | 87 | private String confirmationVoucherFileName; |
| 88 | 88 | ||
| 89 | /** | 89 | /** |
| 90 | + * 原总数量 | ||
| 91 | + */ | ||
| 92 | + private BigDecimal totalQuantity; | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 撤销总数量 | ||
| 96 | + */ | ||
| 97 | + private BigDecimal totalRevokeQuantity; | ||
| 98 | + | ||
| 99 | + /** | ||
| 90 | * 撤销撤销数量总和(吨)(非持久化字段) | 100 | * 撤销撤销数量总和(吨)(非持久化字段) |
| 91 | */ | 101 | */ |
| 92 | @TableField(exist = false) | 102 | @TableField(exist = false) |
| @@ -99,6 +109,12 @@ public class PurchaseOrderRevoke extends BaseEntity implements BaseDto { | @@ -99,6 +109,12 @@ public class PurchaseOrderRevoke extends BaseEntity implements BaseDto { | ||
| 99 | private String userId; | 109 | private String userId; |
| 100 | 110 | ||
| 101 | /** | 111 | /** |
| 112 | + * 是否展示审核字段(非持久化字段) | ||
| 113 | + */ | ||
| 114 | + @TableField(exist = false) | ||
| 115 | + private boolean showExamine; | ||
| 116 | + | ||
| 117 | + /** | ||
| 102 | * 创建人ID | 118 | * 创建人ID |
| 103 | */ | 119 | */ |
| 104 | @TableField(fill = FieldFill.INSERT) | 120 | @TableField(fill = FieldFill.INSERT) |
| @@ -234,6 +234,7 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -234,6 +234,7 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 234 | if (query.size() < query1.size()) { | 234 | if (query.size() < query1.size()) { |
| 235 | b = false; | 235 | b = false; |
| 236 | } | 236 | } |
| 237 | + BigDecimal totalQuantity = BigDecimal.ZERO; | ||
| 237 | for (PurchaseOrderRevokeLine purchaseOrderRevokeLine : query) { | 238 | for (PurchaseOrderRevokeLine purchaseOrderRevokeLine : query) { |
| 238 | //原数量 | 239 | //原数量 |
| 239 | BigDecimal quantity = purchaseOrderRevokeLine.getQuantity(); | 240 | BigDecimal quantity = purchaseOrderRevokeLine.getQuantity(); |
| @@ -247,9 +248,12 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -247,9 +248,12 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 247 | } | 248 | } |
| 248 | if (quantity != null) { | 249 | if (quantity != null) { |
| 249 | BigDecimal result = quantity.subtract(revokeQuantity); | 250 | BigDecimal result = quantity.subtract(revokeQuantity); |
| 251 | + totalQuantity = totalQuantity.add(result); | ||
| 250 | purchaseOrderLineService.updateQuantity(purchaseOrderRevokeLine.getPurchaseOrderLineId(), result); | 252 | purchaseOrderLineService.updateQuantity(purchaseOrderRevokeLine.getPurchaseOrderLineId(), result); |
| 251 | } | 253 | } |
| 252 | } | 254 | } |
| 255 | + //更新总数量 | ||
| 256 | + purchaseOrderInfoService.updateTotalQuantity(revoke.getPurchaseOrderId(), totalQuantity); | ||
| 253 | //更新订货单撤销状态(部分撤销、全部撤销) | 257 | //更新订货单撤销状态(部分撤销、全部撤销) |
| 254 | if (b) { | 258 | if (b) { |
| 255 | //全部撤销 | 259 | //全部撤销 |
| @@ -37,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional; | @@ -37,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional; | ||
| 37 | import org.springframework.stereotype.Service; | 37 | import org.springframework.stereotype.Service; |
| 38 | 38 | ||
| 39 | import javax.annotation.Resource; | 39 | import javax.annotation.Resource; |
| 40 | +import java.math.BigDecimal; | ||
| 40 | import java.util.ArrayList; | 41 | import java.util.ArrayList; |
| 41 | import java.util.HashMap; | 42 | import java.util.HashMap; |
| 42 | import java.util.List; | 43 | import java.util.List; |
| @@ -373,6 +374,19 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -373,6 +374,19 @@ public class PurchaseOrderInfoServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 373 | getBaseMapper().update(updateWrapper); | 374 | getBaseMapper().update(updateWrapper); |
| 374 | } | 375 | } |
| 375 | 376 | ||
| 377 | + @OpLog(type = OtherOpLogType.class, name = "更新总数量,ID:{}", params = {"#id"}) | ||
| 378 | + @Transactional(rollbackFor = Exception.class) | ||
| 379 | + @Override | ||
| 380 | + public void updateTotalQuantity(String id, BigDecimal totalQuantity) { | ||
| 381 | + if (StringUtils.isBlank(id) || totalQuantity == null) { | ||
| 382 | + return; | ||
| 383 | + } | ||
| 384 | + LambdaUpdateWrapper<PurchaseOrderInfo> updateWrapper = Wrappers.lambdaUpdate(PurchaseOrderInfo.class) | ||
| 385 | + .set(PurchaseOrderInfo::getTotalQuantity, totalQuantity) | ||
| 386 | + .eq(PurchaseOrderInfo::getId, id); | ||
| 387 | + getBaseMapper().update(updateWrapper); | ||
| 388 | + } | ||
| 389 | + | ||
| 376 | /** | 390 | /** |
| 377 | * 更新规格变更状态 | 391 | * 更新规格变更状态 |
| 378 | * | 392 | * |
| @@ -3,7 +3,10 @@ package com.lframework.xingyun.sc.impl.order; | @@ -3,7 +3,10 @@ package com.lframework.xingyun.sc.impl.order; | ||
| 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | import com.github.pagehelper.PageInfo; | 5 | import com.github.pagehelper.PageInfo; |
| 6 | +import com.lframework.starter.bpm.dto.FlowTaskDto; | ||
| 7 | +import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | ||
| 6 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | 8 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; |
| 9 | +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | ||
| 7 | import com.lframework.starter.common.utils.CollectionUtil; | 10 | import com.lframework.starter.common.utils.CollectionUtil; |
| 8 | import com.lframework.starter.web.core.components.security.SecurityUtil; | 11 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 9 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; | 12 | import com.lframework.starter.web.core.impl.BaseMpServiceImpl; |
| @@ -19,6 +22,7 @@ import com.lframework.starter.web.core.annotations.oplog.OpLog; | @@ -19,6 +22,7 @@ import com.lframework.starter.web.core.annotations.oplog.OpLog; | ||
| 19 | import com.lframework.starter.web.core.utils.PageHelperUtil; | 22 | import com.lframework.starter.web.core.utils.PageHelperUtil; |
| 20 | import com.lframework.starter.common.utils.Assert; | 23 | import com.lframework.starter.common.utils.Assert; |
| 21 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | 24 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 25 | +import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | ||
| 22 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevoke; | 26 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevoke; |
| 23 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; | 27 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; |
| 24 | import com.lframework.xingyun.sc.mappers.PurchaseOrderRevokeMapper; | 28 | import com.lframework.xingyun.sc.mappers.PurchaseOrderRevokeMapper; |
| @@ -26,6 +30,7 @@ import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | @@ -26,6 +30,7 @@ import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | ||
| 26 | import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeLineService; | 30 | import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeLineService; |
| 27 | import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeService; | 31 | import com.lframework.xingyun.sc.service.order.PurchaseOrderRevokeService; |
| 28 | import com.lframework.xingyun.sc.vo.order.*; | 32 | import com.lframework.xingyun.sc.vo.order.*; |
| 33 | +import org.apache.commons.collections.CollectionUtils; | ||
| 29 | import org.apache.commons.lang3.StringUtils; | 34 | import org.apache.commons.lang3.StringUtils; |
| 30 | import org.springframework.transaction.annotation.Transactional; | 35 | import org.springframework.transaction.annotation.Transactional; |
| 31 | import org.springframework.stereotype.Service; | 36 | import org.springframework.stereotype.Service; |
| @@ -35,6 +40,7 @@ import java.math.BigDecimal; | @@ -35,6 +40,7 @@ import java.math.BigDecimal; | ||
| 35 | import java.math.RoundingMode; | 40 | import java.math.RoundingMode; |
| 36 | import java.time.LocalDate; | 41 | import java.time.LocalDate; |
| 37 | import java.util.List; | 42 | import java.util.List; |
| 43 | +import java.util.stream.Collectors; | ||
| 38 | 44 | ||
| 39 | @Service | 45 | @Service |
| 40 | public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOrderRevokeMapper, PurchaseOrderRevoke> implements PurchaseOrderRevokeService { | 46 | public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOrderRevokeMapper, PurchaseOrderRevoke> implements PurchaseOrderRevokeService { |
| @@ -46,7 +52,8 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | @@ -46,7 +52,8 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | ||
| 46 | private PurchaseOrderInfoService purchaseOrderInfoService; | 52 | private PurchaseOrderInfoService purchaseOrderInfoService; |
| 47 | @Resource | 53 | @Resource |
| 48 | private FlowInstanceWrapperService flowInstanceWrapperService; | 54 | private FlowInstanceWrapperService flowInstanceWrapperService; |
| 49 | - | 55 | + @Resource |
| 56 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | ||
| 50 | 57 | ||
| 51 | @Override | 58 | @Override |
| 52 | public PageResult<PurchaseOrderRevoke> query(Integer pageIndex, Integer pageSize, QueryPurchaseOrderRevokeVo vo) { | 59 | public PageResult<PurchaseOrderRevoke> query(Integer pageIndex, Integer pageSize, QueryPurchaseOrderRevokeVo vo) { |
| @@ -56,6 +63,21 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | @@ -56,6 +63,21 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | ||
| 56 | 63 | ||
| 57 | PageHelperUtil.startPage(pageIndex, pageSize); | 64 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 58 | List<PurchaseOrderRevoke> datas = this.query(vo); | 65 | List<PurchaseOrderRevoke> datas = this.query(vo); |
| 66 | + if (CollectionUtils.isNotEmpty(datas)) { | ||
| 67 | + // 获取当前人员的待办任务数据 | ||
| 68 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | ||
| 69 | + if (CollectionUtils.isEmpty(flowTaskList)) { | ||
| 70 | + return new PageResult<>(); | ||
| 71 | + } | ||
| 72 | + List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | ||
| 73 | + for (PurchaseOrderRevoke purchaseOrderRevoke : datas) { | ||
| 74 | + if (ids.contains(purchaseOrderRevoke.getId())) { | ||
| 75 | + purchaseOrderRevoke.setShowExamine(true); | ||
| 76 | + } else { | ||
| 77 | + purchaseOrderRevoke.setShowExamine(false); | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + } | ||
| 59 | 81 | ||
| 60 | return PageResultUtil.convert(new PageInfo<>(datas)); | 82 | return PageResultUtil.convert(new PageInfo<>(datas)); |
| 61 | } | 83 | } |
| @@ -108,6 +130,12 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | @@ -108,6 +130,12 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | ||
| 108 | if (!StringUtil.isBlank(vo.getConfirmationVoucherFileName())) { | 130 | if (!StringUtil.isBlank(vo.getConfirmationVoucherFileName())) { |
| 109 | data.setConfirmationVoucherFileName(vo.getConfirmationVoucherFileName()); | 131 | data.setConfirmationVoucherFileName(vo.getConfirmationVoucherFileName()); |
| 110 | } | 132 | } |
| 133 | + if (vo.getTotalQuantity() != null) { | ||
| 134 | + data.setTotalQuantity(vo.getTotalQuantity()); | ||
| 135 | + } | ||
| 136 | + if (vo.getTotalRevokeQuantity() != null) { | ||
| 137 | + data.setTotalRevokeQuantity(vo.getTotalRevokeQuantity()); | ||
| 138 | + } | ||
| 111 | 139 | ||
| 112 | getBaseMapper().insert(data); | 140 | getBaseMapper().insert(data); |
| 113 | 141 | ||
| @@ -176,6 +204,8 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | @@ -176,6 +204,8 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | ||
| 176 | .set(PurchaseOrderRevoke::getRevokeReason, StringUtil.isBlank(vo.getRevokeReason()) ? null : vo.getRevokeReason()) | 204 | .set(PurchaseOrderRevoke::getRevokeReason, StringUtil.isBlank(vo.getRevokeReason()) ? null : vo.getRevokeReason()) |
| 177 | .set(PurchaseOrderRevoke::getConfirmationVoucherFileId, StringUtil.isBlank(vo.getConfirmationVoucherFileId()) ? null : vo.getConfirmationVoucherFileId()) | 205 | .set(PurchaseOrderRevoke::getConfirmationVoucherFileId, StringUtil.isBlank(vo.getConfirmationVoucherFileId()) ? null : vo.getConfirmationVoucherFileId()) |
| 178 | .set(PurchaseOrderRevoke::getConfirmationVoucherFileName, StringUtil.isBlank(vo.getConfirmationVoucherFileName()) ? null : vo.getConfirmationVoucherFileName()) | 206 | .set(PurchaseOrderRevoke::getConfirmationVoucherFileName, StringUtil.isBlank(vo.getConfirmationVoucherFileName()) ? null : vo.getConfirmationVoucherFileName()) |
| 207 | + .set(PurchaseOrderRevoke::getTotalQuantity, vo.getTotalQuantity() == null ? null : vo.getTotalQuantity()) | ||
| 208 | + .set(PurchaseOrderRevoke::getTotalRevokeQuantity, vo.getTotalRevokeQuantity() == null ? null : vo.getTotalRevokeQuantity()) | ||
| 179 | .eq(PurchaseOrderRevoke::getId, vo.getId()); | 209 | .eq(PurchaseOrderRevoke::getId, vo.getId()); |
| 180 | 210 | ||
| 181 | getBaseMapper().update(updateWrapper); | 211 | getBaseMapper().update(updateWrapper); |
| @@ -6,6 +6,8 @@ import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | @@ -6,6 +6,8 @@ import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | ||
| 6 | import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderInfoVo; | 6 | import com.lframework.xingyun.sc.vo.order.CreatePurchaseOrderInfoVo; |
| 7 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderInfoVo; | 7 | import com.lframework.xingyun.sc.vo.order.QueryPurchaseOrderInfoVo; |
| 8 | import com.lframework.xingyun.sc.vo.order.UpdatePurchaseOrderInfoVo; | 8 | import com.lframework.xingyun.sc.vo.order.UpdatePurchaseOrderInfoVo; |
| 9 | + | ||
| 10 | +import java.math.BigDecimal; | ||
| 9 | import java.util.List; | 11 | import java.util.List; |
| 10 | 12 | ||
| 11 | /** | 13 | /** |
| @@ -90,6 +92,14 @@ public interface PurchaseOrderInfoService extends BaseMpService<PurchaseOrderInf | @@ -90,6 +92,14 @@ public interface PurchaseOrderInfoService extends BaseMpService<PurchaseOrderInf | ||
| 90 | void updateRevokeStatus(String id, String status); | 92 | void updateRevokeStatus(String id, String status); |
| 91 | 93 | ||
| 92 | /** | 94 | /** |
| 95 | + * 更新总数量 | ||
| 96 | + * | ||
| 97 | + * @param id 主键ID | ||
| 98 | + * @param totalQuantity 总数量 | ||
| 99 | + */ | ||
| 100 | + void updateTotalQuantity(String id, BigDecimal totalQuantity); | ||
| 101 | + | ||
| 102 | + /** | ||
| 93 | * 更新规格变更状态 | 103 | * 更新规格变更状态 |
| 94 | * | 104 | * |
| 95 | * @param id 主键ID | 105 | * @param id 主键ID |
| 1 | package com.lframework.xingyun.sc.vo.order; | 1 | package com.lframework.xingyun.sc.vo.order; |
| 2 | 2 | ||
| 3 | import javax.validation.constraints.NotBlank; | 3 | import javax.validation.constraints.NotBlank; |
| 4 | +import java.math.BigDecimal; | ||
| 4 | import java.time.LocalDate; | 5 | import java.time.LocalDate; |
| 5 | import com.lframework.starter.web.core.vo.BaseVo; | 6 | import com.lframework.starter.web.core.vo.BaseVo; |
| 6 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; | 7 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; |
| @@ -94,4 +95,16 @@ public class CreatePurchaseOrderRevokeVo implements BaseVo, Serializable { | @@ -94,4 +95,16 @@ public class CreatePurchaseOrderRevokeVo implements BaseVo, Serializable { | ||
| 94 | @ApiModelProperty("订货单撤销表物料行") | 95 | @ApiModelProperty("订货单撤销表物料行") |
| 95 | private List<PurchaseOrderRevokeLine> purchaseOrderRevokeLineList; | 96 | private List<PurchaseOrderRevokeLine> purchaseOrderRevokeLineList; |
| 96 | 97 | ||
| 98 | + /** | ||
| 99 | + * 原总数量 | ||
| 100 | + */ | ||
| 101 | + @ApiModelProperty("原总数量") | ||
| 102 | + private BigDecimal totalQuantity; | ||
| 103 | + | ||
| 104 | + /** | ||
| 105 | + * 撤销总数量 | ||
| 106 | + */ | ||
| 107 | + @ApiModelProperty("撤销总数量") | ||
| 108 | + private BigDecimal totalRevokeQuantity; | ||
| 109 | + | ||
| 97 | } | 110 | } |
| @@ -2,6 +2,7 @@ package com.lframework.xingyun.sc.vo.order; | @@ -2,6 +2,7 @@ package com.lframework.xingyun.sc.vo.order; | ||
| 2 | 2 | ||
| 3 | import lombok.Data; | 3 | import lombok.Data; |
| 4 | import javax.validation.constraints.NotBlank; | 4 | import javax.validation.constraints.NotBlank; |
| 5 | +import java.math.BigDecimal; | ||
| 5 | import java.time.LocalDate; | 6 | import java.time.LocalDate; |
| 6 | import com.lframework.starter.web.core.vo.BaseVo; | 7 | import com.lframework.starter.web.core.vo.BaseVo; |
| 7 | import com.lframework.starter.web.core.components.validation.TypeMismatch; | 8 | import com.lframework.starter.web.core.components.validation.TypeMismatch; |
| @@ -57,4 +58,16 @@ public class UpdatePurchaseOrderRevokeVo implements BaseVo, Serializable { | @@ -57,4 +58,16 @@ public class UpdatePurchaseOrderRevokeVo implements BaseVo, Serializable { | ||
| 57 | @ApiModelProperty("订货单撤销单物料行") | 58 | @ApiModelProperty("订货单撤销单物料行") |
| 58 | List<UpdatePurchaseOrderRevokeLineVo> updatePurchaseOrderRevokeLineVoList; | 59 | List<UpdatePurchaseOrderRevokeLineVo> updatePurchaseOrderRevokeLineVoList; |
| 59 | 60 | ||
| 61 | + /** | ||
| 62 | + * 原总数量 | ||
| 63 | + */ | ||
| 64 | + @ApiModelProperty("原总数量") | ||
| 65 | + private BigDecimal totalQuantity; | ||
| 66 | + | ||
| 67 | + /** | ||
| 68 | + * 撤销总数量 | ||
| 69 | + */ | ||
| 70 | + @ApiModelProperty("撤销总数量") | ||
| 71 | + private BigDecimal totalRevokeQuantity; | ||
| 72 | + | ||
| 60 | } | 73 | } |
| @@ -13,7 +13,8 @@ | @@ -13,7 +13,8 @@ | ||
| 13 | <result column="status" property="status"/> | 13 | <result column="status" property="status"/> |
| 14 | <result column="revoke_reason" property="revokeReason"/> | 14 | <result column="revoke_reason" property="revokeReason"/> |
| 15 | <result column="confirmation_voucher_file_id" property="confirmationVoucherFileId"/> | 15 | <result column="confirmation_voucher_file_id" property="confirmationVoucherFileId"/> |
| 16 | - <result column="confirmation_voucher_file_name" property="confirmationVoucherFileName"/> | 16 | + <result column="total_quantity" property="totalQuantity"/> |
| 17 | + <result column="total_revoke_quantity" property="totalRevokeQuantity"/> | ||
| 17 | <result column="create_by_id" property="createById"/> | 18 | <result column="create_by_id" property="createById"/> |
| 18 | <result column="create_by" property="createBy"/> | 19 | <result column="create_by" property="createBy"/> |
| 19 | <result column="update_by_id" property="updateById"/> | 20 | <result column="update_by_id" property="updateById"/> |
| @@ -36,6 +37,8 @@ | @@ -36,6 +37,8 @@ | ||
| 36 | tb.revoke_reason, | 37 | tb.revoke_reason, |
| 37 | tb.confirmation_voucher_file_id, | 38 | tb.confirmation_voucher_file_id, |
| 38 | tb.confirmation_voucher_file_name, | 39 | tb.confirmation_voucher_file_name, |
| 40 | + tb.total_quantity, | ||
| 41 | + tb.total_revoke_quantity, | ||
| 39 | tb.create_by_id, | 42 | tb.create_by_id, |
| 40 | tb.create_by, | 43 | tb.create_by, |
| 41 | tb.update_by_id, | 44 | tb.update_by_id, |