|
|
@@ -1405,11 +1405,11 @@ public class ProductServiceImpl implements ProductService {
|
|
|
String sql = null;
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
if ((prIdLong != null) && (prIdLong.size() != 0)) {
|
|
|
- sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled, 0) = 1 and p.pr_id in (:ids) and p.pr_id not in (select DISTINCT go_productid from trade$goods where go_productid is not null);";
|
|
|
+ sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled, 0) = 1 and p.pr_id in (:ids) and p.pr_id not in (select DISTINCT go_productid from trade$goods where go_productid is not null and go_status != 612);";
|
|
|
map.put("ids", prIdLong);
|
|
|
} else {
|
|
|
// 暂时不会进入当前循环,速度比较低
|
|
|
- sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled,0) = 1 and if(p.pr_standard, 0) = (:standard) and p.pr_enuu = (:enuu) and p.pr_id not in (select DISTINCT go_productid from trade$goods where go_productid is not null);";
|
|
|
+ sql = "select p.pr_id from products p left join product$private pp on pp.pr_id = p.pr_id where ifnull(pp.pr_batchcount, 0) = 0 and p.pr_sourceapp = 'ERP' and p.pr_reserve <> 0 and ifnull(pp.pr_b2cenabled,0) = 1 and if(p.pr_standard, 0) = (:standard) and p.pr_enuu = (:enuu) and p.pr_id not in (select DISTINCT go_productid from trade$goods where go_productid is not null and go_status != 612);";
|
|
|
map.put("enuu", uu);
|
|
|
map.put("standard", standard);
|
|
|
}
|
|
|
@@ -1493,10 +1493,10 @@ public class ProductServiceImpl implements ProductService {
|
|
|
g.setImg(product.getCmpImg());
|
|
|
g.setUuid(product.getCmpUuId());
|
|
|
g.setCode(product.getPcmpcode());
|
|
|
- g.setBrandNameCn(product.getPbrand());
|
|
|
+ g.setBrandNameCn(product.getPbrand() == null ? product.getPbranden() : product.getPbrand());
|
|
|
g.setBrandid(product.getPbrandid());
|
|
|
g.setBranduuid(product.getPbranduuid());
|
|
|
- g.setBrandNameEn(product.getPbranden());
|
|
|
+ g.setBrandNameEn(product.getPbranden() == null ? product.getPbrand() : product.getPbranden());
|
|
|
g.setKindNameCn(product.getKind());
|
|
|
g.setKindUuid(product.getKindid());
|
|
|
g.setCurrencyName(currency);
|
|
|
@@ -1515,6 +1515,9 @@ public class ProductServiceImpl implements ProductService {
|
|
|
g.setBreakUp(Boolean.FALSE);
|
|
|
g.setReserve(product.getErpReserve());
|
|
|
String packaging = (detail == null || detail.getPackaging() == null) ? product.getPackaging(): detail.getPackaging();
|
|
|
+ if (packaging == null) {
|
|
|
+ packaging = StringConstant.DEFAULTPACKAGING;
|
|
|
+ }
|
|
|
g.setPackaging(packaging);
|
|
|
|
|
|
String produceDate = (detail == null || detail.getProduceDate() == null) ? product.getProduceDate() : detail.getProduceDate();
|