|
@@ -327,11 +327,11 @@
|
|
|
update CRM_U8_SA_QuoMain set issyu8='1' where id=#{id}
|
|
|
</update>
|
|
|
<update id="UpdateKSDDKOrder">
|
|
|
- update CRM_U8_Deduction set issyu8='1' where DLID=#{id}
|
|
|
+ update CRM_U8_Deduction set issyu8='1' where id=#{id}
|
|
|
|
|
|
</update>
|
|
|
<update id="UpdateKSDTHOrder">
|
|
|
- update CRM_U8_DispatchList set issyu8='1' where DLID=#{id}
|
|
|
+ update CRM_U8_DispatchList set issyu8='1' where id=#{id}
|
|
|
</update>
|
|
|
<update id="UpdateKSDTKOrder">
|
|
|
update CRM_U8_Refund set issyu8='1' where cVouchID=#{id}
|
|
@@ -347,8 +347,8 @@
|
|
|
|
|
|
|
|
|
<select id="SaleOrderBJList" resultType="net.chenlin.dp.modules.api.vo.SaleOrderBJ">
|
|
|
- select ID,dDate,cCode,cCusCode,cDepCode,cPersonCode,cexch_name as 'cexchName',iExchRate,(iTaxRate*100) as 'iTaxRate',cMemo,cMaker,cVerifier,cCloser,cBusType
|
|
|
- from CRM_U8_SA_QuoMain
|
|
|
+ select ID,convert(varchar(10),ddate,120) as 'dDate',cCode,cCusCode,cDepCode,cPersonCode,cexch_name as 'cexchName',iExchRate,(iTaxRate*100) as 'iTaxRate',cMemo,cMaker,cVerifier,cCloser,cBusType
|
|
|
+ from CRM_U8_SA_QuoMain where issyu8 =0 or issyu8 is null
|
|
|
|
|
|
</select>
|
|
|
|
|
@@ -412,45 +412,45 @@
|
|
|
|
|
|
</select>
|
|
|
<select id="CrmKSOrderTHList" resultType="net.chenlin.dp.modules.api.vo.SaleOrderFTH">
|
|
|
- select cVouchID,dlid,
|
|
|
+ select cVouchID,id as 'dlid',
|
|
|
cdlcode,cvouchtype,cstcode,ddate,crdcode,cdepcode,cpersoncode,ccuscode,csccode,cshipaddress,cexch_name as 'cexchname',iexchrate,
|
|
|
itaxrate,breturnflag, cmaker,ccusname,cbustype from crm_u8_DispatchList
|
|
|
</select>
|
|
|
<select id="CrmKSOrderTHMinList" resultType="net.chenlin.dp.modules.api.vo.SaleOrderFTHMin">
|
|
|
select a.autoid,a.dlid,a.icorid,a.cwhcode,a.cinvcode,a.iquantity,a.inum,a.iunitprice,a.itaxunitprice,a.imoney,a.itax,a.isum, a.inatunitprice,a.inatmoney,a.inattax,a.inatsum,a.isosid,a.cinvname,a.itaxrate,b.citemcode,b.citem_class citemclass,a.iinvexchrate,a.cunitid,a.csocode,a.ccusinvcode,a.ccusinvname
|
|
|
from CRM_U8_DispatchItem a
|
|
|
- left join CRM_U8_DispatchList b on a.dlid=a.dlid
|
|
|
- where a.dlid=#{id}
|
|
|
+ left join CRM_U8_DispatchList b on a.mid=b.id
|
|
|
+ where a.Mid=#{id}
|
|
|
|
|
|
</select>
|
|
|
<select id="CrmKSDOrderFHList" resultType="net.chenlin.dp.modules.api.vo.SaleOrderFTH">
|
|
|
- select dlid,cVouchID,
|
|
|
+ select id as 'dlid',cVouchID,
|
|
|
cdlcode,cvouchtype,cstcode,ddate,crdcode,cdepcode,cpersoncode,ccuscode,csccode,cshipaddress,cexch_name as 'cexchname',iexchrate,
|
|
|
- itaxrate,breturnflag, cmaker,ccusname,cbustype from CRM_U8_Deduction
|
|
|
+ (itaxrate*100) as 'itaxrate' ,breturnflag, cmaker,ccusname,cbustype from CRM_U8_Deduction where issyu8 =0 or issyu8 is null
|
|
|
</select>
|
|
|
<select id="CrmKSDOrderFHMin" resultType="net.chenlin.dp.modules.api.vo.SaleOrderFTHMin">
|
|
|
select a.autoid,a.dlid,a.cinvcode,a.iquantity, a.iunitprice,a.itaxunitprice,a.imoney,a.itax,a.isum,
|
|
|
- a.inatunitprice,a.inatmoney,a.inattax,a.inatsum,a.cinvname,a.itaxrate,b.citemcode,b.citem_class as 'citemclass',a.citemname,
|
|
|
+ a.inatunitprice,a.inatmoney,a.inattax,a.inatsum,a.cinvname,(a.itaxrate *100) as 'itaxrate',b.citemcode,b.citem_class as 'citemclass',a.citemname,
|
|
|
a.citem_cname as 'citemcname', a.cunitid,a.cdefine33
|
|
|
from CRM_U8_DeductionItem a left join CRM_U8_Deduction b
|
|
|
- on a.dlid=b.dlid
|
|
|
+ on a.mid=b.id
|
|
|
|
|
|
- where a.dlid=#{id}
|
|
|
+ where a.mid=#{id}
|
|
|
</select>
|
|
|
<select id="CrmSaleOrderCode" resultType="java.lang.String">
|
|
|
select max( iDLsID)
|
|
|
from DispatchLists
|
|
|
</select>
|
|
|
- <select id="CrmIKSDOrder" resultMap="FH">
|
|
|
+ <select id="CrmIKSDOrder" resultMap="TH">
|
|
|
select
|
|
|
cdlcode ,convert(varchar(10),ddate,120) as 'ddate',crdcode,cdepcode,cpersoncode,ccuscode,csccode,cshipaddress,
|
|
|
- ccusname,dlid from CRM_U8_Deduction
|
|
|
+ ccusname,id as 'dlid' from CRM_U8_Deduction where issyu8 =0 or issyu8 is null
|
|
|
</select>
|
|
|
- <select id="CrmIKSDOrderMin" resultMap="FHMin">
|
|
|
+ <select id="CrmIKSDOrderMin" resultMap="THMin">
|
|
|
select cinvcode,iquantity, iunitprice, itaxunitprice,imoney,itax,isum,
|
|
|
inatunitprice,inatmoney,inattax,inatsum,cinvname,(itaxrate*100) as 'itaxrate',citemcode,citem_class as 'citemclass',citemname,
|
|
|
citem_cname as 'citemcname', cunitid
|
|
|
- from CRM_U8_DeductionItem where dlid=#{id}
|
|
|
+ from CRM_U8_DeductionItem where mid=#{id}
|
|
|
</select>
|
|
|
<select id="CrmSaleOrderMinCode" resultType="java.lang.String">
|
|
|
select max(iSOsID)
|
|
@@ -467,10 +467,10 @@
|
|
|
where a.id=#{id}
|
|
|
</select>
|
|
|
<select id="CrmSYDOrder" resultType="net.chenlin.dp.modules.api.vo.SaleOrderFTH">
|
|
|
- select id as 'dlid', ddate as 'ddate',csocode as 'cdlcode',ccuscode as 'ccuscode',cdepcode as 'cdepcode',
|
|
|
- cpersoncode as 'cpersoncode',ccusoaddress as 'cshipaddress',itaxrate as 'itaxrate',cmemo as 'bz',cmaker as 'cmaker',
|
|
|
- ccusname as 'ccusname',cbustype as 'cbustype' from CRM_U8_customEntity12__c
|
|
|
- </select>
|
|
|
+ select id as 'closer',convert(varchar(10),ddate,120) as 'date',csocode as 'code',ccuscode as 'custcode',cdepcode as 'deptcode',cpersoncode as 'personcode',
|
|
|
+ ccusoaddress as 'sendaddress',(itaxrate*100) as 'taxrate',cmemo as 'memo',cmaker as 'maker',ccusname as 'cusname'
|
|
|
+ from CRM_U8_customEntity12__c
|
|
|
+ </select>
|
|
|
<select id="CrmSYDOrderMin" resultType="net.chenlin.dp.modules.api.vo.SaleOrderFTHMin">
|
|
|
select a.id as 'dlid',a.cinvname as 'cinvname',a.cinvcode as'cinvcode',a.iquantity as 'iquantity'
|
|
|
,b.citemcode,b.citem_class as 'citemclass' from CRM_U8_customEntity13__c a left join CRM_U8_customEntity12__c b on a.id=b.id
|
|
@@ -485,20 +485,19 @@
|
|
|
<select id="SaleOrderFTHMaxId" resultType="java.lang.String">
|
|
|
select max(DLID) from DispatchList
|
|
|
</select>
|
|
|
- <select id="CrmISYDOrder" resultMap="FH">
|
|
|
- select id as 'dlid', convert(varchar(10),ddate,120) as 'ddate' ,csocode as 'cdlcode',ccuscode ,cdepcode ,
|
|
|
- cpersoncode ,ccusoaddress as 'cshipaddress',
|
|
|
- cmaker as 'maker',
|
|
|
- ccusname from CRM_U8_customEntity12__c
|
|
|
+ <select id="CrmISYDOrder" resultType="net.chenlin.dp.modules.api.vo.ISaleOrder">
|
|
|
+ select id as 'closer',convert(varchar(10),ddate,120) as 'date',csocode as 'code',ccuscode as 'custcode',cdepcode as 'deptcode',cpersoncode as 'personcode',
|
|
|
+ ccusoaddress as 'sendaddress',(itaxrate*100) as 'taxrate',cmemo as 'memo',cmaker as 'maker',ccusname as 'cusname'
|
|
|
+ from CRM_U8_customEntity12__c where issyu8 =0 or issyu8 is null
|
|
|
</select>
|
|
|
- <select id="CrmISYDOrderMin" resultMap="FHMin">
|
|
|
- select a.id as 'dlid',a.cinvname as 'cinvname',a.cinvcode as'cinvcode',a.iquantity as 'iquantity'
|
|
|
- ,b.citemcode,b.citem_class as 'citemclass' from CRM_U8_customEntity13__c a left join CRM_U8_customEntity12__c b on a.id=b.id
|
|
|
+ <select id="CrmISYDOrderMin" resultType="net.chenlin.dp.modules.api.vo.ISaleOrderMin">
|
|
|
+ select a.cinvname as 'inventoryname',a.cinvcode as'inventorycode',a.iquantity as 'quantity'
|
|
|
+ from CRM_U8_customEntity13__c a
|
|
|
where a.id=#{id}
|
|
|
</select>
|
|
|
<select id="CrmIKSDOrderTH" resultMap="TH">
|
|
|
- select cVouchID as 'cdlcode',dlid
|
|
|
- ,cstcode,convert(varchar(10),ddate,120) as 'ddate',cdepcode,cpersoncode,ccuscode,ccusname from crm_u8_DispatchList
|
|
|
+ select cVouchID as 'cdlcode',id as 'dlid'
|
|
|
+ ,cstcode,convert(varchar(10),ddate,120) as 'ddate',cdepcode,cpersoncode,ccuscode,ccusname from crm_u8_DispatchList where issyu8 =0 or issyu8 is null
|
|
|
</select>
|
|
|
<select id="CrmIKSDOrderTHMin" resultMap="THMin">
|
|
|
select a.cwhcode,a.cinvcode,a.iquantity,a.iunitprice,a.itaxunitprice,a.imoney,
|
|
@@ -506,13 +505,13 @@
|
|
|
a.cunitid
|
|
|
from CRM_U8_DispatchItem a
|
|
|
|
|
|
- where a.dlid=#{id}
|
|
|
+ where a.mid=#{id}
|
|
|
</select>
|
|
|
<select id="ISaleOrderList" resultType="net.chenlin.dp.modules.api.vo.ISaleOrder">
|
|
|
select id as 'closer', convert(varchar(10),ddate,120) as 'date',csocode as 'code',ccuscode as 'custcode',cdepcode as 'deptcode',
|
|
|
|
|
|
(iTaxRate*100) as 'taxrate', cmaker as 'maker',ccusname as 'cusname'
|
|
|
- from CRM_U8_SO_SOMain
|
|
|
+ from CRM_U8_SO_SOMain where issyu8 =0 or issyu8 is null
|
|
|
</select>
|
|
|
<select id="ISaleOrderMin" resultType="net.chenlin.dp.modules.api.vo.ISaleOrderMin">
|
|
|
|
|
@@ -537,7 +536,7 @@
|
|
|
<select id="IDYDOrder" resultType="net.chenlin.dp.modules.api.vo.ISaleOrder">
|
|
|
select id as 'closer',convert(varchar(10),ddate,120) as 'date',csocode as 'code',ccuscode as 'custcode',cdepcode as 'deptcode',cpersoncode as 'personcode',
|
|
|
ccusoaddress as 'sendaddress',(itaxrate*100) as 'taxrate',cmemo as 'memo',cmaker as 'maker',ccusname as 'cusname'
|
|
|
- from crm_u8_customentity4__c
|
|
|
+ from crm_u8_customentity4__c where issyu8 =0 or issyu8 is null
|
|
|
</select>
|
|
|
<select id="IDYDOrderMin" resultType="net.chenlin.dp.modules.api.vo.ISaleOrderMin">
|
|
|
select a.cinvname as 'inventoryname',a.cinvcode as'inventorycode',a.iquantity as 'quantity'
|