Showing
7 changed files
with
29 additions
and
4 deletions
| @@ -155,6 +155,12 @@ public class GetProcurementWeighingTicketBo extends BaseBo<ProcurementWeighingTi | @@ -155,6 +155,12 @@ public class GetProcurementWeighingTicketBo extends BaseBo<ProcurementWeighingTi | ||
| 155 | @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN) | 155 | @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN) |
| 156 | private LocalDateTime createTime; | 156 | private LocalDateTime createTime; |
| 157 | 157 | ||
| 158 | + @ApiModelProperty("计划编号集合(列表/详情展示用)") | ||
| 159 | + private List<String> planCode; | ||
| 160 | + | ||
| 161 | + @ApiModelProperty("计划ID集合(列表/详情展示用)") | ||
| 162 | + private List<String> planIds; | ||
| 163 | + | ||
| 158 | @ApiModelProperty("计划明细列表") | 164 | @ApiModelProperty("计划明细列表") |
| 159 | private List<GetProcurementWeighingTicketPlanBo> planLines; | 165 | private List<GetProcurementWeighingTicketPlanBo> planLines; |
| 160 | 166 |
| @@ -25,7 +25,7 @@ public class WeighingTicketPlanBo implements Serializable { | @@ -25,7 +25,7 @@ public class WeighingTicketPlanBo implements Serializable { | ||
| 25 | @ApiModelProperty("公司简称ID") | 25 | @ApiModelProperty("公司简称ID") |
| 26 | private String companyShortId; | 26 | private String companyShortId; |
| 27 | 27 | ||
| 28 | - @ApiModelProperty("公司名称") | 28 | + @ApiModelProperty("公司简称") |
| 29 | private String companyName; | 29 | private String companyName; |
| 30 | 30 | ||
| 31 | @ApiModelProperty("供应商ID") | 31 | @ApiModelProperty("供应商ID") |
| @@ -53,6 +53,7 @@ import java.time.LocalDate; | @@ -53,6 +53,7 @@ import java.time.LocalDate; | ||
| 53 | import java.time.LocalDateTime; | 53 | import java.time.LocalDateTime; |
| 54 | import java.time.format.DateTimeFormatter; | 54 | import java.time.format.DateTimeFormatter; |
| 55 | import java.util.ArrayList; | 55 | import java.util.ArrayList; |
| 56 | +import java.util.Arrays; | ||
| 56 | import java.util.Collections; | 57 | import java.util.Collections; |
| 57 | import java.util.Comparator; | 58 | import java.util.Comparator; |
| 58 | import java.util.HashMap; | 59 | import java.util.HashMap; |
| @@ -146,6 +147,10 @@ public class ProcurementWeighingTicketServiceImpl | @@ -146,6 +147,10 @@ public class ProcurementWeighingTicketServiceImpl | ||
| 146 | GetProcurementWeighingTicketBo bo = new GetProcurementWeighingTicketBo(entity); | 147 | GetProcurementWeighingTicketBo bo = new GetProcurementWeighingTicketBo(entity); |
| 147 | bo.convert(entity); | 148 | bo.convert(entity); |
| 148 | 149 | ||
| 150 | + // 聚合字段为 GROUP_CONCAT 分隔字符串,拆分为集合返回(兼容中英文逗号) | ||
| 151 | + bo.setPlanCode(splitToList(entity.getPlanCodes())); | ||
| 152 | + bo.setPlanIds(splitToList(entity.getPlanIds())); | ||
| 153 | + | ||
| 149 | // 收料单位 = 公司简称 + 分厂 | 154 | // 收料单位 = 公司简称 + 分厂 |
| 150 | String receiveUnitName = StringUtil.isBlank(entity.getCompanyShortName()) ? "" : entity.getCompanyShortName(); | 155 | String receiveUnitName = StringUtil.isBlank(entity.getCompanyShortName()) ? "" : entity.getCompanyShortName(); |
| 151 | if (StringUtil.isNotBlank(entity.getWorkshopName())) { | 156 | if (StringUtil.isNotBlank(entity.getWorkshopName())) { |
| @@ -423,6 +428,20 @@ public class ProcurementWeighingTicketServiceImpl | @@ -423,6 +428,20 @@ public class ProcurementWeighingTicketServiceImpl | ||
| 423 | } | 428 | } |
| 424 | 429 | ||
| 425 | /** | 430 | /** |
| 431 | + * 聚合字符串拆分为集合(GROUP_CONCAT 结果,兼容中英文逗号分隔,去空白去重) | ||
| 432 | + */ | ||
| 433 | + private List<String> splitToList(String joined) { | ||
| 434 | + if (StringUtil.isBlank(joined)) { | ||
| 435 | + return new ArrayList<>(); | ||
| 436 | + } | ||
| 437 | + return Arrays.stream(joined.split("[,,]")) | ||
| 438 | + .map(String::trim) | ||
| 439 | + .filter(StringUtil::isNotBlank) | ||
| 440 | + .distinct() | ||
| 441 | + .collect(Collectors.toList()); | ||
| 442 | + } | ||
| 443 | + | ||
| 444 | + /** | ||
| 426 | * 收集过磅码单关联的采购计划ID(去重去空白) | 445 | * 收集过磅码单关联的采购计划ID(去重去空白) |
| 427 | */ | 446 | */ |
| 428 | private List<String> collectPlanIdsByTicketId(String ticketId) { | 447 | private List<String> collectPlanIdsByTicketId(String ticketId) { |
| @@ -16,7 +16,7 @@ public class QueryWeighingTicketPlanVo extends SortPageVo implements Serializabl | @@ -16,7 +16,7 @@ public class QueryWeighingTicketPlanVo extends SortPageVo implements Serializabl | ||
| 16 | @ApiModelProperty("计划编号(模糊匹配)") | 16 | @ApiModelProperty("计划编号(模糊匹配)") |
| 17 | private String code; | 17 | private String code; |
| 18 | 18 | ||
| 19 | - @ApiModelProperty("公司名称(模糊匹配)") | 19 | + @ApiModelProperty("公司简称(模糊匹配)") |
| 20 | private String companyName; | 20 | private String companyName; |
| 21 | 21 | ||
| 22 | @ApiModelProperty("采购处ID") | 22 | @ApiModelProperty("采购处ID") |
| @@ -208,7 +208,7 @@ | @@ -208,7 +208,7 @@ | ||
| 208 | pp.id, | 208 | pp.id, |
| 209 | pp.code, | 209 | pp.code, |
| 210 | pp.company_short_id, | 210 | pp.company_short_id, |
| 211 | - bdcs.company_name AS company_name, | 211 | + bdcs.short_name AS company_name, |
| 212 | pp.supplier_id, | 212 | pp.supplier_id, |
| 213 | pdc.unit_name AS supplier_name, | 213 | pdc.unit_name AS supplier_name, |
| 214 | pp.purchase_department, | 214 | pp.purchase_department, |
| @@ -247,7 +247,7 @@ | @@ -247,7 +247,7 @@ | ||
| 247 | AND pp.code LIKE CONCAT('%', #{vo.code}, '%') | 247 | AND pp.code LIKE CONCAT('%', #{vo.code}, '%') |
| 248 | </if> | 248 | </if> |
| 249 | <if test="vo.companyName != null and vo.companyName != ''"> | 249 | <if test="vo.companyName != null and vo.companyName != ''"> |
| 250 | - AND bdcs.company_name LIKE CONCAT('%', #{vo.companyName}, '%') | 250 | + AND bdcs.short_name LIKE CONCAT('%', #{vo.companyName}, '%') |
| 251 | </if> | 251 | </if> |
| 252 | <if test="vo.purchaseDeptId != null and vo.purchaseDeptId != ''"> | 252 | <if test="vo.purchaseDeptId != null and vo.purchaseDeptId != ''"> |
| 253 | AND pp.purchase_department = #{vo.purchaseDeptId} | 253 | AND pp.purchase_department = #{vo.purchaseDeptId} |
No preview for this file type
No preview for this file type