Commit 1d7e73d900b245bf55e4d5ac75331451962f65a8
Merge remote-tracking branch 'origin/master_0929' into master_0929
Showing
6 changed files
with
113 additions
and
8 deletions
| @@ -28,4 +28,10 @@ public class QueryCustomerVo extends SortPageVo implements BaseVo, Serializable | @@ -28,4 +28,10 @@ public class QueryCustomerVo extends SortPageVo implements BaseVo, Serializable | ||
| 28 | */ | 28 | */ |
| 29 | @ApiModelProperty("状态") | 29 | @ApiModelProperty("状态") |
| 30 | private Boolean available; | 30 | private Boolean available; |
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 来源 | ||
| 34 | + */ | ||
| 35 | + @ApiModelProperty("来源") | ||
| 36 | + private String source; | ||
| 31 | } | 37 | } |
| @@ -69,6 +69,27 @@ | @@ -69,6 +69,27 @@ | ||
| 69 | <if test="vo.available != null"> | 69 | <if test="vo.available != null"> |
| 70 | AND c.available = #{vo.available} | 70 | AND c.available = #{vo.available} |
| 71 | </if> | 71 | </if> |
| 72 | + <choose> | ||
| 73 | + <when test="vo.source == 'CUSTOMER_CREDIT'"> | ||
| 74 | + AND NOT EXISTS ( | ||
| 75 | + SELECT 1 | ||
| 76 | + FROM customer_credit cc | ||
| 77 | + WHERE cc.company_id = c.id | ||
| 78 | + AND cc.status != 'CANCEL' | ||
| 79 | + ) | ||
| 80 | + </when> | ||
| 81 | + <when test="vo.source == 'CUSTOMER_DEVELOP'"> | ||
| 82 | + AND NOT EXISTS ( | ||
| 83 | + SELECT 1 | ||
| 84 | + FROM customer_develop_plan cdp | ||
| 85 | + WHERE cdp.customer_id = c.id | ||
| 86 | + AND cdp.status != 'CANCEL' | ||
| 87 | + ) | ||
| 88 | + </when> | ||
| 89 | + <otherwise> | ||
| 90 | + AND 1 = 1 <!-- 确保查询到任何数据 --> | ||
| 91 | + </otherwise> | ||
| 92 | + </choose> | ||
| 72 | </if> | 93 | </if> |
| 73 | </where> | 94 | </where> |
| 74 | ORDER BY c.code | 95 | ORDER BY c.code |
| @@ -99,14 +120,27 @@ | @@ -99,14 +120,27 @@ | ||
| 99 | <if test="vo.available != null"> | 120 | <if test="vo.available != null"> |
| 100 | AND c.available = #{vo.available} | 121 | AND c.available = #{vo.available} |
| 101 | </if> | 122 | </if> |
| 102 | - <if test="vo.source == 'CUSTOMER_CREDIT'"> | ||
| 103 | - AND NOT EXISTS ( | ||
| 104 | - SELECT 1 | ||
| 105 | - FROM customer_credit cc | ||
| 106 | - WHERE cc.company_id = c.id | ||
| 107 | - AND cc.status != 'CANCEL' | ||
| 108 | - ) | ||
| 109 | - </if> | 123 | + <choose> |
| 124 | + <when test="vo.source == 'CUSTOMER_CREDIT'"> | ||
| 125 | + AND NOT EXISTS ( | ||
| 126 | + SELECT 1 | ||
| 127 | + FROM customer_credit cc | ||
| 128 | + WHERE cc.company_id = c.id | ||
| 129 | + AND cc.status != 'CANCEL' | ||
| 130 | + ) | ||
| 131 | + </when> | ||
| 132 | + <when test="vo.source == 'CUSTOMER_DEVELOP'"> | ||
| 133 | + AND NOT EXISTS ( | ||
| 134 | + SELECT 1 | ||
| 135 | + FROM customer_develop_plan cdp | ||
| 136 | + WHERE cdp.customer_id = c.id | ||
| 137 | + AND cdp.status != 'CANCEL' | ||
| 138 | + ) | ||
| 139 | + </when> | ||
| 140 | + <otherwise> | ||
| 141 | + AND 1 = 1 <!-- 确保查询到任何数据 --> | ||
| 142 | + </otherwise> | ||
| 143 | + </choose> | ||
| 110 | </if> | 144 | </if> |
| 111 | </where> | 145 | </where> |
| 112 | ORDER BY c.code | 146 | ORDER BY c.code |
| @@ -30,6 +30,11 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | @@ -30,6 +30,11 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | ||
| 30 | private String id; | 30 | private String id; |
| 31 | 31 | ||
| 32 | /** | 32 | /** |
| 33 | + * 规格变更后ID | ||
| 34 | + */ | ||
| 35 | + private String afterId; | ||
| 36 | + | ||
| 37 | + /** | ||
| 33 | * 订货单主表ID/订货单变更记录ID | 38 | * 订货单主表ID/订货单变更记录ID |
| 34 | */ | 39 | */ |
| 35 | private String purchaseOrderId; | 40 | private String purchaseOrderId; |
| @@ -50,11 +55,23 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | @@ -50,11 +55,23 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | ||
| 50 | private String brand; | 55 | private String brand; |
| 51 | 56 | ||
| 52 | /** | 57 | /** |
| 58 | + * 牌号是否变更 | ||
| 59 | + */ | ||
| 60 | + @TableField(exist = false) | ||
| 61 | + private Boolean brandChange; | ||
| 62 | + | ||
| 63 | + /** | ||
| 53 | * 厚度 | 64 | * 厚度 |
| 54 | */ | 65 | */ |
| 55 | private BigDecimal thickness; | 66 | private BigDecimal thickness; |
| 56 | 67 | ||
| 57 | /** | 68 | /** |
| 69 | + * 厚度是否变更 | ||
| 70 | + */ | ||
| 71 | + @TableField(exist = false) | ||
| 72 | + private Boolean thicknessChange; | ||
| 73 | + | ||
| 74 | + /** | ||
| 58 | * 厚度公差正 | 75 | * 厚度公差正 |
| 59 | */ | 76 | */ |
| 60 | private BigDecimal thicknessTolPos; | 77 | private BigDecimal thicknessTolPos; |
| @@ -70,6 +87,12 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | @@ -70,6 +87,12 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | ||
| 70 | private BigDecimal width; | 87 | private BigDecimal width; |
| 71 | 88 | ||
| 72 | /** | 89 | /** |
| 90 | + * 宽度是否变更 | ||
| 91 | + */ | ||
| 92 | + @TableField(exist = false) | ||
| 93 | + private Boolean widthChange; | ||
| 94 | + | ||
| 95 | + /** | ||
| 73 | * 宽度公差正 | 96 | * 宽度公差正 |
| 74 | */ | 97 | */ |
| 75 | private BigDecimal widthTolPos; | 98 | private BigDecimal widthTolPos; |
| @@ -85,6 +108,12 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | @@ -85,6 +108,12 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | ||
| 85 | private BigDecimal length; | 108 | private BigDecimal length; |
| 86 | 109 | ||
| 87 | /** | 110 | /** |
| 111 | + * 长度是否变更 | ||
| 112 | + */ | ||
| 113 | + @TableField(exist = false) | ||
| 114 | + private Boolean lengthChange; | ||
| 115 | + | ||
| 116 | + /** | ||
| 88 | * 长度公差正 | 117 | * 长度公差正 |
| 89 | */ | 118 | */ |
| 90 | private BigDecimal lengthTolPos; | 119 | private BigDecimal lengthTolPos; |
| @@ -100,11 +129,23 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | @@ -100,11 +129,23 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | ||
| 100 | private String status; | 129 | private String status; |
| 101 | 130 | ||
| 102 | /** | 131 | /** |
| 132 | + * 状态是否变更 | ||
| 133 | + */ | ||
| 134 | + @TableField(exist = false) | ||
| 135 | + private Boolean statusChange; | ||
| 136 | + | ||
| 137 | + /** | ||
| 103 | * 数量 | 138 | * 数量 |
| 104 | */ | 139 | */ |
| 105 | private BigDecimal quantity; | 140 | private BigDecimal quantity; |
| 106 | 141 | ||
| 107 | /** | 142 | /** |
| 143 | + * 数量是否变更 | ||
| 144 | + */ | ||
| 145 | + @TableField(exist = false) | ||
| 146 | + private Boolean quantityChange; | ||
| 147 | + | ||
| 148 | + /** | ||
| 108 | * 实发数 | 149 | * 实发数 |
| 109 | */ | 150 | */ |
| 110 | @TableField(exist = false) | 151 | @TableField(exist = false) |
| @@ -116,6 +157,12 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | @@ -116,6 +157,12 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | ||
| 116 | private BigDecimal salesPrice; | 157 | private BigDecimal salesPrice; |
| 117 | 158 | ||
| 118 | /** | 159 | /** |
| 160 | + * 销售价格是否变更 | ||
| 161 | + */ | ||
| 162 | + @TableField(exist = false) | ||
| 163 | + private Boolean salesPriceChange; | ||
| 164 | + | ||
| 165 | + /** | ||
| 119 | * 是否展示销售价格(非持久化字段) | 166 | * 是否展示销售价格(非持久化字段) |
| 120 | */ | 167 | */ |
| 121 | @TableField(exist = false) | 168 | @TableField(exist = false) |
| @@ -153,6 +200,12 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | @@ -153,6 +200,12 @@ public class PurchaseOrderLine extends BaseEntity implements BaseDto { | ||
| 153 | private Boolean delFlag; | 200 | private Boolean delFlag; |
| 154 | 201 | ||
| 155 | /** | 202 | /** |
| 203 | + * 新增/删除/变更 | ||
| 204 | + */ | ||
| 205 | + @TableField(exist = false) | ||
| 206 | + private String type; | ||
| 207 | + | ||
| 208 | + /** | ||
| 156 | * 创建人ID | 209 | * 创建人ID |
| 157 | */ | 210 | */ |
| 158 | @TableField(fill = FieldFill.INSERT) | 211 | @TableField(fill = FieldFill.INSERT) |
| @@ -67,6 +67,9 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde | @@ -67,6 +67,9 @@ public class PurchaseOrderLineServiceImpl extends BaseMpServiceImpl<PurchaseOrde | ||
| 67 | 67 | ||
| 68 | PurchaseOrderLine data = new PurchaseOrderLine(); | 68 | PurchaseOrderLine data = new PurchaseOrderLine(); |
| 69 | data.setId(IdUtil.getId()); | 69 | data.setId(IdUtil.getId()); |
| 70 | + if (!StringUtil.isBlank(vo.getAfterId())) { | ||
| 71 | + data.setAfterId(vo.getAfterId()); | ||
| 72 | + } | ||
| 70 | data.setPurchaseOrderId(vo.getPurchaseOrderId()); | 73 | data.setPurchaseOrderId(vo.getPurchaseOrderId()); |
| 71 | if (!StringUtil.isBlank(vo.getIndustry())) { | 74 | if (!StringUtil.isBlank(vo.getIndustry())) { |
| 72 | data.setIndustry(vo.getIndustry()); | 75 | data.setIndustry(vo.getIndustry()); |
| @@ -17,6 +17,13 @@ public class CreatePurchaseOrderLineVo implements BaseVo, Serializable { | @@ -17,6 +17,13 @@ public class CreatePurchaseOrderLineVo implements BaseVo, Serializable { | ||
| 17 | private static final long serialVersionUID = 1L; | 17 | private static final long serialVersionUID = 1L; |
| 18 | 18 | ||
| 19 | /** | 19 | /** |
| 20 | + * 变更后ID | ||
| 21 | + */ | ||
| 22 | + @ApiModelProperty("变更后ID") | ||
| 23 | + @Length(message = "变更后ID最多允许32个字符!") | ||
| 24 | + private String afterId; | ||
| 25 | + | ||
| 26 | + /** | ||
| 20 | * 订货单主表ID | 27 | * 订货单主表ID |
| 21 | */ | 28 | */ |
| 22 | @ApiModelProperty(value = "订货单主表ID", required = true) | 29 | @ApiModelProperty(value = "订货单主表ID", required = true) |
| @@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
| 4 | 4 | ||
| 5 | <resultMap id="PurchaseOrderLine" type="com.lframework.xingyun.sc.entity.PurchaseOrderLine"> | 5 | <resultMap id="PurchaseOrderLine" type="com.lframework.xingyun.sc.entity.PurchaseOrderLine"> |
| 6 | <id column="id" property="id"/> | 6 | <id column="id" property="id"/> |
| 7 | + <result column="after_id" property="afterId"/> | ||
| 7 | <result column="purchase_order_id" property="purchaseOrderId"/> | 8 | <result column="purchase_order_id" property="purchaseOrderId"/> |
| 8 | <result column="industry" property="industry"/> | 9 | <result column="industry" property="industry"/> |
| 9 | <result column="quality" property="quality"/> | 10 | <result column="quality" property="quality"/> |
| @@ -34,6 +35,7 @@ | @@ -34,6 +35,7 @@ | ||
| 34 | <sql id="PurchaseOrderLine_sql"> | 35 | <sql id="PurchaseOrderLine_sql"> |
| 35 | SELECT | 36 | SELECT |
| 36 | tb.id, | 37 | tb.id, |
| 38 | + tb.after_id, | ||
| 37 | tb.purchase_order_id, | 39 | tb.purchase_order_id, |
| 38 | tb.industry, | 40 | tb.industry, |
| 39 | tb.quality, | 41 | tb.quality, |