Просмотр исходного кода

加end_item_fld返回出货客户所属行业,入库类型不用添加

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@4020 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
yingp 10 лет назад
Родитель
Сommit
732bf6fdbf

+ 1 - 1
src/main/java/com/uas/platform/b2b/openapi/service/impl/UASCustDataService.java

@@ -118,7 +118,7 @@ public class UASCustDataService implements CustDataService {
 				// {@code startDate}所处期间
 				int month = DateUtils.getYearmonth(startDate);
 				StringBuffer sql = new StringBuffer(
-						"select cu_kind as end_item_fld,pr_brand as brand,nvl(pr_orispeccode,pr_spec) as org_item,pr_detail as item_desc,pr_spec as item_spec,pr_unit as item_unit,pi_date as \"DATE\",nvl(pd_inqty,0)+nvl(pd_outqty,0) as qty,case when nvl(pd_inqty,0)<>0 then 'in' else 'out' end as type,(select pm_beginqty from v$productmonth where pr_code=pm_prodcode and pm_yearmonth=?) as beginStock from prodinout left join prodiodetail on pi_id=pd_piid left join customer on pi_cardcode=cu_code left join product on pd_prodcode=pr_code where ");
+						"select case when nvl(pd_inqty,0)<>0 then null else cu_kind end as end_item_fld,pr_brand as brand,nvl(pr_orispeccode,pr_spec) as org_item,pr_detail as item_desc,pr_spec as item_spec,pr_unit as item_unit,pi_date as \"DATE\",nvl(pd_inqty,0)+nvl(pd_outqty,0) as qty,case when nvl(pd_inqty,0)<>0 then 'in' else 'out' end as type,(select pm_beginqty from v$productmonth where pr_code=pm_prodcode and pm_yearmonth=?) as beginStock from prodinout left join prodiodetail on pi_id=pd_piid left join customer on pi_cardcode=cu_code left join product on pd_prodcode=pr_code where ");
 				sql.append("pi_statuscode='POSTED' and pi_date > to_date('").append(startDate).append("','yyyy-mm-dd')");
 				if (StringUtils.hasText(code))
 					sql.append(" and pr_orispeccode='").append(code).append("'");