Showing
7 changed files
with
29 additions
and
4 deletions
| ... | ... | @@ -155,6 +155,12 @@ public class GetProcurementWeighingTicketBo extends BaseBo<ProcurementWeighingTi |
| 155 | 155 | @JsonFormat(pattern = StringPool.DATE_TIME_PATTERN) |
| 156 | 156 | private LocalDateTime createTime; |
| 157 | 157 | |
| 158 | + @ApiModelProperty("计划编号集合(列表/详情展示用)") | |
| 159 | + private List<String> planCode; | |
| 160 | + | |
| 161 | + @ApiModelProperty("计划ID集合(列表/详情展示用)") | |
| 162 | + private List<String> planIds; | |
| 163 | + | |
| 158 | 164 | @ApiModelProperty("计划明细列表") |
| 159 | 165 | private List<GetProcurementWeighingTicketPlanBo> planLines; |
| 160 | 166 | ... | ... |
| ... | ... | @@ -25,7 +25,7 @@ public class WeighingTicketPlanBo implements Serializable { |
| 25 | 25 | @ApiModelProperty("公司简称ID") |
| 26 | 26 | private String companyShortId; |
| 27 | 27 | |
| 28 | - @ApiModelProperty("公司名称") | |
| 28 | + @ApiModelProperty("公司简称") | |
| 29 | 29 | private String companyName; |
| 30 | 30 | |
| 31 | 31 | @ApiModelProperty("供应商ID") | ... | ... |
| ... | ... | @@ -53,6 +53,7 @@ import java.time.LocalDate; |
| 53 | 53 | import java.time.LocalDateTime; |
| 54 | 54 | import java.time.format.DateTimeFormatter; |
| 55 | 55 | import java.util.ArrayList; |
| 56 | +import java.util.Arrays; | |
| 56 | 57 | import java.util.Collections; |
| 57 | 58 | import java.util.Comparator; |
| 58 | 59 | import java.util.HashMap; |
| ... | ... | @@ -146,6 +147,10 @@ public class ProcurementWeighingTicketServiceImpl |
| 146 | 147 | GetProcurementWeighingTicketBo bo = new GetProcurementWeighingTicketBo(entity); |
| 147 | 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 | 155 | String receiveUnitName = StringUtil.isBlank(entity.getCompanyShortName()) ? "" : entity.getCompanyShortName(); |
| 151 | 156 | if (StringUtil.isNotBlank(entity.getWorkshopName())) { |
| ... | ... | @@ -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 | 445 | * 收集过磅码单关联的采购计划ID(去重去空白) |
| 427 | 446 | */ |
| 428 | 447 | private List<String> collectPlanIdsByTicketId(String ticketId) { | ... | ... |
| ... | ... | @@ -16,7 +16,7 @@ public class QueryWeighingTicketPlanVo extends SortPageVo implements Serializabl |
| 16 | 16 | @ApiModelProperty("计划编号(模糊匹配)") |
| 17 | 17 | private String code; |
| 18 | 18 | |
| 19 | - @ApiModelProperty("公司名称(模糊匹配)") | |
| 19 | + @ApiModelProperty("公司简称(模糊匹配)") | |
| 20 | 20 | private String companyName; |
| 21 | 21 | |
| 22 | 22 | @ApiModelProperty("采购处ID") | ... | ... |
| ... | ... | @@ -208,7 +208,7 @@ |
| 208 | 208 | pp.id, |
| 209 | 209 | pp.code, |
| 210 | 210 | pp.company_short_id, |
| 211 | - bdcs.company_name AS company_name, | |
| 211 | + bdcs.short_name AS company_name, | |
| 212 | 212 | pp.supplier_id, |
| 213 | 213 | pdc.unit_name AS supplier_name, |
| 214 | 214 | pp.purchase_department, |
| ... | ... | @@ -247,7 +247,7 @@ |
| 247 | 247 | AND pp.code LIKE CONCAT('%', #{vo.code}, '%') |
| 248 | 248 | </if> |
| 249 | 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 | 251 | </if> |
| 252 | 252 | <if test="vo.purchaseDeptId != null and vo.purchaseDeptId != ''"> |
| 253 | 253 | AND pp.purchase_department = #{vo.purchaseDeptId} | ... | ... |
No preview for this file type
No preview for this file type