Showing
7 changed files
with
60 additions
and
2 deletions
| @@ -53,6 +53,18 @@ public class GetPurchaseOrderRevokeBo extends BaseBo<PurchaseOrderRevoke> { | @@ -53,6 +53,18 @@ public class GetPurchaseOrderRevokeBo extends BaseBo<PurchaseOrderRevoke> { | ||
| 53 | private String orderingUnitName; | 53 | private String orderingUnitName; |
| 54 | 54 | ||
| 55 | /** | 55 | /** |
| 56 | + * 办事处 | ||
| 57 | + */ | ||
| 58 | + @ApiModelProperty("办事处") | ||
| 59 | + private String deptId; | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 办事处名称(非持久化字段) | ||
| 63 | + */ | ||
| 64 | + @ApiModelProperty("办事处名称") | ||
| 65 | + private String deptName; | ||
| 66 | + | ||
| 67 | + /** | ||
| 56 | * 原订货日期 | 68 | * 原订货日期 |
| 57 | */ | 69 | */ |
| 58 | @ApiModelProperty("原订货日期") | 70 | @ApiModelProperty("原订货日期") |
| @@ -9,6 +9,7 @@ import java.time.LocalDateTime; | @@ -9,6 +9,7 @@ import java.time.LocalDateTime; | ||
| 9 | import com.baomidou.mybatisplus.annotation.FieldFill; | 9 | import com.baomidou.mybatisplus.annotation.FieldFill; |
| 10 | import com.lframework.starter.web.core.entity.BaseEntity; | 10 | import com.lframework.starter.web.core.entity.BaseEntity; |
| 11 | import com.baomidou.mybatisplus.annotation.TableField; | 11 | import com.baomidou.mybatisplus.annotation.TableField; |
| 12 | +import io.swagger.annotations.ApiModelProperty; | ||
| 12 | import lombok.Data; | 13 | import lombok.Data; |
| 13 | 14 | ||
| 14 | /** | 15 | /** |
| @@ -52,6 +53,17 @@ public class PurchaseOrderRevoke extends BaseEntity implements BaseDto { | @@ -52,6 +53,17 @@ public class PurchaseOrderRevoke extends BaseEntity implements BaseDto { | ||
| 52 | private String orderingUnitName; | 53 | private String orderingUnitName; |
| 53 | 54 | ||
| 54 | /** | 55 | /** |
| 56 | + * 办事处 | ||
| 57 | + */ | ||
| 58 | + private String deptId; | ||
| 59 | + | ||
| 60 | + /** | ||
| 61 | + * 办事处名称(非持久化字段) | ||
| 62 | + */ | ||
| 63 | + @TableField(exist = false) | ||
| 64 | + private String deptName; | ||
| 65 | + | ||
| 66 | + /** | ||
| 55 | * 原订货日期 | 67 | * 原订货日期 |
| 56 | */ | 68 | */ |
| 57 | private LocalDate orderDate; | 69 | private LocalDate orderDate; |
| @@ -108,6 +108,9 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | @@ -108,6 +108,9 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | ||
| 108 | if (!StringUtil.isBlank(vo.getOrderingUnit())) { | 108 | if (!StringUtil.isBlank(vo.getOrderingUnit())) { |
| 109 | data.setOrderingUnit(vo.getOrderingUnit()); | 109 | data.setOrderingUnit(vo.getOrderingUnit()); |
| 110 | } | 110 | } |
| 111 | + if (!StringUtil.isBlank(vo.getDeptId())) { | ||
| 112 | + data.setDeptId(vo.getDeptId()); | ||
| 113 | + } | ||
| 111 | if (vo.getOrderDate() != null) { | 114 | if (vo.getOrderDate() != null) { |
| 112 | data.setOrderDate(vo.getOrderDate()); | 115 | data.setOrderDate(vo.getOrderDate()); |
| 113 | } | 116 | } |
| @@ -212,7 +215,7 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | @@ -212,7 +215,7 @@ public class PurchaseOrderRevokeServiceImpl extends BaseMpServiceImpl<PurchaseOr | ||
| 212 | 215 | ||
| 213 | //撤销单物料行修改 | 216 | //撤销单物料行修改 |
| 214 | BigDecimal sumRevokeQuantity = BigDecimal.ZERO; | 217 | BigDecimal sumRevokeQuantity = BigDecimal.ZERO; |
| 215 | - List<UpdatePurchaseOrderRevokeLineVo> voList = vo.getUpdatePurchaseOrderRevokeLineVoList(); | 218 | + List<UpdatePurchaseOrderRevokeLineVo> voList = vo.getPurchaseOrderRevokeLineList(); |
| 216 | if (CollectionUtil.isNotEmpty(voList)) { | 219 | if (CollectionUtil.isNotEmpty(voList)) { |
| 217 | for (UpdatePurchaseOrderRevokeLineVo vo1 : voList) { | 220 | for (UpdatePurchaseOrderRevokeLineVo vo1 : voList) { |
| 218 | if (vo1.getRevokeQuantity() != null) { | 221 | if (vo1.getRevokeQuantity() != null) { |
| @@ -3,6 +3,8 @@ package com.lframework.xingyun.sc.vo.order; | @@ -3,6 +3,8 @@ package com.lframework.xingyun.sc.vo.order; | ||
| 3 | import javax.validation.constraints.NotBlank; | 3 | import javax.validation.constraints.NotBlank; |
| 4 | import java.math.BigDecimal; | 4 | import java.math.BigDecimal; |
| 5 | import java.time.LocalDate; | 5 | import java.time.LocalDate; |
| 6 | + | ||
| 7 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 6 | import com.lframework.starter.web.core.vo.BaseVo; | 8 | import com.lframework.starter.web.core.vo.BaseVo; |
| 7 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; | 9 | import com.lframework.xingyun.sc.entity.PurchaseOrderRevokeLine; |
| 8 | import io.swagger.annotations.ApiModelProperty; | 10 | import io.swagger.annotations.ApiModelProperty; |
| @@ -41,6 +43,12 @@ public class CreatePurchaseOrderRevokeVo implements BaseVo, Serializable { | @@ -41,6 +43,12 @@ public class CreatePurchaseOrderRevokeVo implements BaseVo, Serializable { | ||
| 41 | private String orderingUnit; | 43 | private String orderingUnit; |
| 42 | 44 | ||
| 43 | /** | 45 | /** |
| 46 | + * 办事处 | ||
| 47 | + */ | ||
| 48 | + @ApiModelProperty("办事处") | ||
| 49 | + private String deptId; | ||
| 50 | + | ||
| 51 | + /** | ||
| 44 | * 原订货日期 | 52 | * 原订货日期 |
| 45 | */ | 53 | */ |
| 46 | @ApiModelProperty("原订货日期") | 54 | @ApiModelProperty("原订货日期") |
| @@ -32,6 +32,18 @@ public class QueryPurchaseOrderRevokeVo extends PageVo implements BaseVo, Serial | @@ -32,6 +32,18 @@ public class QueryPurchaseOrderRevokeVo extends PageVo implements BaseVo, Serial | ||
| 32 | private String orderingUnitName; | 32 | private String orderingUnitName; |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
| 35 | + * 办事处 | ||
| 36 | + */ | ||
| 37 | + @ApiModelProperty("办事处") | ||
| 38 | + private String deptId; | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 办事处名称(非持久化字段) | ||
| 42 | + */ | ||
| 43 | + @ApiModelProperty("办事处名称") | ||
| 44 | + private String deptName; | ||
| 45 | + | ||
| 46 | + /** | ||
| 35 | * 制单日期 | 47 | * 制单日期 |
| 36 | */ | 48 | */ |
| 37 | @ApiModelProperty("制单日期") | 49 | @ApiModelProperty("制单日期") |
| @@ -56,7 +56,7 @@ public class UpdatePurchaseOrderRevokeVo implements BaseVo, Serializable { | @@ -56,7 +56,7 @@ public class UpdatePurchaseOrderRevokeVo implements BaseVo, Serializable { | ||
| 56 | * 订货单撤销单物料行 | 56 | * 订货单撤销单物料行 |
| 57 | */ | 57 | */ |
| 58 | @ApiModelProperty("订货单撤销单物料行") | 58 | @ApiModelProperty("订货单撤销单物料行") |
| 59 | - List<UpdatePurchaseOrderRevokeLineVo> updatePurchaseOrderRevokeLineVoList; | 59 | + List<UpdatePurchaseOrderRevokeLineVo> purchaseOrderRevokeLineList; |
| 60 | 60 | ||
| 61 | /** | 61 | /** |
| 62 | * 原总数量 | 62 | * 原总数量 |
| @@ -7,6 +7,8 @@ | @@ -7,6 +7,8 @@ | ||
| 7 | <result column="purchase_order_id" property="purchaseOrderId"/> | 7 | <result column="purchase_order_id" property="purchaseOrderId"/> |
| 8 | <result column="order_no" property="orderNo"/> | 8 | <result column="order_no" property="orderNo"/> |
| 9 | <result column="ordering_unit" property="orderingUnit"/> | 9 | <result column="ordering_unit" property="orderingUnit"/> |
| 10 | + <result column="dept_id" property="deptId"/> | ||
| 11 | + <result column="dept_name" property="deptName"/> | ||
| 10 | <result column="order_date" property="orderDate"/> | 12 | <result column="order_date" property="orderDate"/> |
| 11 | <result column="delivery_date" property="deliveryDate"/> | 13 | <result column="delivery_date" property="deliveryDate"/> |
| 12 | <result column="document_preparation_date" property="documentPreparationDate"/> | 14 | <result column="document_preparation_date" property="documentPreparationDate"/> |
| @@ -30,6 +32,8 @@ | @@ -30,6 +32,8 @@ | ||
| 30 | tb.order_no, | 32 | tb.order_no, |
| 31 | tb.ordering_unit, | 33 | tb.ordering_unit, |
| 32 | cu.name AS ordering_unit_name, | 34 | cu.name AS ordering_unit_name, |
| 35 | + tb.dept_id, | ||
| 36 | + sd.name AS dept_name, | ||
| 33 | tb.order_date, | 37 | tb.order_date, |
| 34 | tb.delivery_date, | 38 | tb.delivery_date, |
| 35 | tb.document_preparation_date, | 39 | tb.document_preparation_date, |
| @@ -47,6 +51,7 @@ | @@ -47,6 +51,7 @@ | ||
| 47 | tb.update_time | 51 | tb.update_time |
| 48 | FROM purchase_order_revoke AS tb | 52 | FROM purchase_order_revoke AS tb |
| 49 | left join base_data_customer as cu on cu.id = tb.ordering_unit | 53 | left join base_data_customer as cu on cu.id = tb.ordering_unit |
| 54 | + left join sys_dept as sd on sd.id = tb.dept_id | ||
| 50 | </sql> | 55 | </sql> |
| 51 | 56 | ||
| 52 | <select id="query" resultMap="PurchaseOrderRevoke"> | 57 | <select id="query" resultMap="PurchaseOrderRevoke"> |
| @@ -58,6 +63,12 @@ | @@ -58,6 +63,12 @@ | ||
| 58 | <if test="vo.orderingUnit != null and vo.orderingUnit != ''"> | 63 | <if test="vo.orderingUnit != null and vo.orderingUnit != ''"> |
| 59 | AND tb.ordering_unit = #{vo.orderingUnit} | 64 | AND tb.ordering_unit = #{vo.orderingUnit} |
| 60 | </if> | 65 | </if> |
| 66 | + <if test="vo.deptId != null and vo.deptId != ''"> | ||
| 67 | + AND tb.dept_id = #{vo.deptId} | ||
| 68 | + </if> | ||
| 69 | + <if test="vo.deptName != null and vo.deptName != ''"> | ||
| 70 | + AND sd.name LIKE CONCAT('%', #{vo.deptName},'%') | ||
| 71 | + </if> | ||
| 61 | <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''"> | 72 | <if test="vo.orderingUnitName != null and vo.orderingUnitName != ''"> |
| 62 | AND cu.name LIKE CONCAT('%', #{vo.orderingUnitName},'%') | 73 | AND cu.name LIKE CONCAT('%', #{vo.orderingUnitName},'%') |
| 63 | </if> | 74 | </if> |