|
|
@@ -45,7 +45,7 @@ public class ERPServiceImpl implements ERPService {
|
|
|
logger.info("sendProd-Begin:master {} ids {}",master,ids);
|
|
|
// SpObserver.putSp(master);//没有用
|
|
|
// 执行查询
|
|
|
- SqlRowList docMsg = baseDao.queryForRowSet(" select pr_id,pr_code,pr_ycxh,pr_detail,pr_orispeccode,pr_brand,pr_unit,pr_zxbzs,nvl(pr_sendwmsflag,0) pr_sendwmsflag " +
|
|
|
+ SqlRowList docMsg = baseDao.queryForRowSet(" select pr_id,pr_code,pr_ycxh,pr_ycxhin,pr_detail,pr_orispeccode,pr_brand,pr_unit,pr_zxbzs,nvl(pr_sendwmsflag,0) pr_sendwmsflag " +
|
|
|
" from "+master+".product left join "+master+".productbrand on pb_name = pr_brand where pr_id in ("+ids+") and pb_sendwms = -1 ");
|
|
|
if(!docMsg.hasNext()){
|
|
|
baseDao.execute("update "+master+".product set pr_sendwmsstatus='同步失败',pr_sendwmserr='没有需要同步的商品(品牌需设置对接MWS)。' where pr_id IN ("+ids+")");
|
|
|
@@ -102,10 +102,12 @@ public class ERPServiceImpl implements ERPService {
|
|
|
docCodes.add(map.get("pr_code"));
|
|
|
logger.info("sendProd-test: id {} code {}",map.get("pr_id"),map.get("pr_code"));
|
|
|
// 创建ProductReq对象
|
|
|
+ String ycxh = StringUtil.nvl(map.get("pr_ycxh"),"");
|
|
|
+ ycxh = (StringUtil.hasText(ycxh)?ycxh+";":"")+StringUtil.nvl(map.get("pr_ycxhin"),"");
|
|
|
ProductReq productReq = new ProductReq.Builder()
|
|
|
.itemId(map.get("pr_code").toString())
|
|
|
.itemCode(map.get("pr_code").toString())
|
|
|
- .barCode(StringUtil.nvl(map.get("pr_ycxh"),StringUtil.nvl(map.get("pr_orispeccode"),map.get("pr_code").toString())))
|
|
|
+ .barCode(ycxh)
|
|
|
.itemName(StringUtil.nvl(map.get("pr_detail")," "))
|
|
|
.goodsCode(StringUtil.nvl(map.get("pr_orispeccode")," "))
|
|
|
.brandName(StringUtil.nvl(map.get("pr_brand")," "))
|