|
@@ -194,10 +194,10 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
public Page<ProductInfoVo> getPageByEhsd(ProductInfoSelectDto dto, IWrapper<ProductInfo> wrapper) {
|
|
public Page<ProductInfoVo> getPageByEhsd(ProductInfoSelectDto dto, IWrapper<ProductInfo> wrapper) {
|
|
//根据产品名称/产品编号过滤
|
|
//根据产品名称/产品编号过滤
|
|
if (ObjectUtil.isNotEmpty(dto.getKeyword())) {
|
|
if (ObjectUtil.isNotEmpty(dto.getKeyword())) {
|
|
- wrapper.and(q -> q.like("pi", ProductInfo::getName, dto.getKeyword()))
|
|
|
|
|
|
+ wrapper.and(q -> q.like("pi", ProductInfo::getName, dto.getKeyword())
|
|
.or().like("json_unquote(pi.ehsd_json -> '$.nameEnglish')", dto.getKeyword())
|
|
.or().like("json_unquote(pi.ehsd_json -> '$.nameEnglish')", dto.getKeyword())
|
|
.or().like("pi", ProductInfo::getCode, dto.getKeyword())//产品编号
|
|
.or().like("pi", ProductInfo::getCode, dto.getKeyword())//产品编号
|
|
- .or().like("c.name", dto.getKeyword());//客户名称
|
|
|
|
|
|
+ .or().like("c.name", dto.getKeyword()));//客户名称
|
|
}
|
|
}
|
|
//根据产品分类id过滤
|
|
//根据产品分类id过滤
|
|
wrapper.eq("pi", ProductInfo::getProductClassifyId, dto.getProductClassifyId());
|
|
wrapper.eq("pi", ProductInfo::getProductClassifyId, dto.getProductClassifyId());
|
|
@@ -214,7 +214,7 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
Map<Long, String> customerMap = customerService.mapKV(Customer::getId, Customer::getName, q -> q.in(Customer::getId, customerIds));
|
|
Map<Long, String> customerMap = customerService.mapKV(Customer::getId, Customer::getName, q -> q.in(Customer::getId, customerIds));
|
|
for (ProductInfoVo record : records) {
|
|
for (ProductInfoVo record : records) {
|
|
ProductInfoEhsdJson productInfoEhsdJson = JSONObject.parseObject(record.getEhsdJson(), ProductInfoEhsdJson.class);
|
|
ProductInfoEhsdJson productInfoEhsdJson = JSONObject.parseObject(record.getEhsdJson(), ProductInfoEhsdJson.class);
|
|
- String customerName = customerMap.get(productInfoEhsdJson.getCustomerId());
|
|
|
|
|
|
+ String customerName = customerMap.get(Long.parseLong(productInfoEhsdJson.getCustomerId()));
|
|
productInfoEhsdJson.setCustomerName(customerName);
|
|
productInfoEhsdJson.setCustomerName(customerName);
|
|
record.setEhsdJson(JSONObject.toJSONString(productInfoEhsdJson));
|
|
record.setEhsdJson(JSONObject.toJSONString(productInfoEhsdJson));
|
|
}
|
|
}
|