Browse Source

006字段修改

master
shiqian.wang 20 hours ago
parent
commit
48cd5f338a
  1. 5
      ICSSoft.FromERP/SK/YERP_004.cs
  2. 88
      ICSSoft.FromERP/SK/YERP_006.cs
  3. 10
      ICSSoft.FromERP/SK/YERP_007.cs

5
ICSSoft.FromERP/SK/YERP_004.cs

@ -161,7 +161,10 @@ GROUP BY
SPTDOC,imonth,iday
select YYYY as Created_Year,MM as Created_Month,YYYY,MM,DD,A.SPTDOC,SMR,DBTO_AMT DBTO,CRDTO_AMT CRDTO,INVT,BLNC,WH_CST,TRNSF_CST,XBT_CST,NLD_CST,SMPL_CST,TRNSF_AGNC_CST,ADTV,NCLSN_CST,SVC_CST from #test5 a left join #test9 b on a.SPTDOC=b.SPTDOC and a.MM=b.imonth and a.DD=b.iday
select YYYY as Created_Year,MM as Created_Month,YYYY,MM,DD,A.SPTDOC,SMR,DBTO_AMT DBTO,CRDTO_AMT CRDTO,INVT,
BLNC,WH_CST,TRNSF_CST,XBT_CST,NLD_CST,SMPL_CST,TRNSF_AGNC_CST,ADTV,NCLSN_CST,SVC_CST
from #test5 a left join #test9 b on a.SPTDOC=b.SPTDOC and a.MM=b.imonth and a.DD=b.iday
where A.SPTDOC not in ('-0253','-0254')
rollback transaction
";

88
ICSSoft.FromERP/SK/YERP_006.cs

@ -368,22 +368,22 @@ GROUP BY
--where SMR =''
--order by MM
if exists(select 1 from tempdb..sysobjects with(nolock) where name='tmpuf_63Code' and xtype='u')
drop table tempdb..tmpuf_63Code
select bbank,bcash,bCashItem,bcDefine1,bcDefine10,bcDefine11,bcDefine12,bcDefine13,bcDefine14,bcDefine15
,bcDefine16,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,bclose,bcus
,bd_c,bdept,be,bend,bexchange,bGCJS,bitem,bparacc,bpardiff,bperson,bproperty,br,bReport,bsup,bused
,cass_item,cbook_type,cbook_type_engl,cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_engl
,ccode_name,cexch_name,cgather,chelp,cmeasure,cother,cUserDefineType,dbegin,dend,dModifyDate
,igrade,iotherused,itrans,iViewItem,iyear
into tempdb..tmpuf_63Code from code with(nolock) where 1=1 and iyear={2}
exec GL_Ledger @tblname=N'tmpuf_63',@KmCode=N'6801',@beginPeriod={3},@endPeriod={4},@bVouch=0,@bequal=0,@sum=0,@bMJ=0,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0
--if exists(select 1 from tempdb..sysobjects with(nolock) where name='tmpuf_63Code' and xtype='u')
--drop table tempdb..tmpuf_63Code
--select bbank,bcash,bCashItem,bcDefine1,bcDefine10,bcDefine11,bcDefine12,bcDefine13,bcDefine14,bcDefine15
--,bcDefine16,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,bclose,bcus
--,bd_c,bdept,be,bend,bexchange,bGCJS,bitem,bparacc,bpardiff,bperson,bproperty,br,bReport,bsup,bused
--,cass_item,cbook_type,cbook_type_engl,cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_engl
--,ccode_name,cexch_name,cgather,chelp,cmeasure,cother,cUserDefineType,dbegin,dend,dModifyDate
--,igrade,iotherused,itrans,iViewItem,iyear
--into tempdb..tmpuf_63Code from code with(nolock) where 1=1 and iyear={2}
-- exec GL_Ledger @tblname=N'tmpuf_63',@KmCode=N'6801',@beginPeriod={3},@endPeriod={4},@bVouch=0,@bequal=0,@sum=0,@bMJ=0,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0
select A.SPTDOC as SPTDOC_NO,YYYY as Created_Year,MM as Created_Month,YYYY,MM,SMR,DBTO_AMT DBTO,c.tmpme as INCOME_TAX
select A.SPTDOC as SPTDOC_NO,YYYY as Created_Year,MM as Created_Month,YYYY,MM,SMR,DBTO_AMT DBTO -- + ISNULL(c.tmpme,0)
from #test5 a
left join #test9 b on a.SPTDOC=b.SPTDOC and a.MM=b.imonth and a.DD=b.iday
left join tempdb..tmpuf_63 c on a.YYYY = c.iyear and a.MM = c.imonth and c.cdcode = '(2221)'
--left join tempdb..tmpuf_63 c on a.YYYY = c.iyear and a.MM = c.imonth and c.cdcode = '(2221)'
where SMR =''
order by MM
@ -606,22 +606,22 @@ GROUP BY
--where SMR =''
--order by MM
if exists(select 1 from tempdb..sysobjects with(nolock) where name='tmpuf_63Code' and xtype='u')
drop table tempdb..tmpuf_63Code
select bbank,bcash,bCashItem,bcDefine1,bcDefine10,bcDefine11,bcDefine12,bcDefine13,bcDefine14,bcDefine15
,bcDefine16,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,bclose,bcus
,bd_c,bdept,be,bend,bexchange,bGCJS,bitem,bparacc,bpardiff,bperson,bproperty,br,bReport,bsup,bused
,cass_item,cbook_type,cbook_type_engl,cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_engl
,ccode_name,cexch_name,cgather,chelp,cmeasure,cother,cUserDefineType,dbegin,dend,dModifyDate
,igrade,iotherused,itrans,iViewItem,iyear
into tempdb..tmpuf_63Code from code with(nolock) where 1=1 and iyear={2}
exec GL_Ledger @tblname=N'tmpuf_63',@KmCode=N'5801',@beginPeriod={3},@endPeriod={4},@bVouch=0,@bequal=0,@sum=0,@bMJ=0,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0
--if exists(select 1 from tempdb..sysobjects with(nolock) where name='tmpuf_63Code' and xtype='u')
--drop table tempdb..tmpuf_63Code
--select bbank,bcash,bCashItem,bcDefine1,bcDefine10,bcDefine11,bcDefine12,bcDefine13,bcDefine14,bcDefine15
--,bcDefine16,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,bclose,bcus
--,bd_c,bdept,be,bend,bexchange,bGCJS,bitem,bparacc,bpardiff,bperson,bproperty,br,bReport,bsup,bused
--,cass_item,cbook_type,cbook_type_engl,cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_engl
--,ccode_name,cexch_name,cgather,chelp,cmeasure,cother,cUserDefineType,dbegin,dend,dModifyDate
--,igrade,iotherused,itrans,iViewItem,iyear
--into tempdb..tmpuf_63Code from code with(nolock) where 1=1 and iyear={2}
-- exec GL_Ledger @tblname=N'tmpuf_63',@KmCode=N'5801',@beginPeriod={3},@endPeriod={4},@bVouch=0,@bequal=0,@sum=0,@bMJ=0,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0
select A.SPTDOC as SPTDOC_NO,YYYY as Created_Year,MM as Created_Month,YYYY,MM,SMR,DBTO_AMT DBTO,c.tmpme as INCOME_TAX
select A.SPTDOC as SPTDOC_NO,YYYY as Created_Year,MM as Created_Month,YYYY,MM,SMR,DBTO_AMT DBTO -- + ISNULL(c.tmpme,0)
from #test5 a
left join #test9 b on a.SPTDOC=b.SPTDOC and a.MM=b.imonth and a.DD=b.iday
left join tempdb..tmpuf_63 c on a.YYYY = c.iyear and a.MM = c.imonth and c.cdcode = '(2221)'
--left join tempdb..tmpuf_63 c on a.YYYY = c.iyear and a.MM = c.imonth and c.cdcode = '(2221)'
where SMR =''
order by MM
@ -656,7 +656,7 @@ rollback transaction
//soapRequestData.Append(itemRow["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + itemRow["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(itemRow["SMR"] != null ? "<SMR>" + 100 + "</SMR>" : "<SMR>" + "</SMR>");
soapRequestData.Append(itemRow["DBTO"] != null ? "<DBTO>" + itemRow["DBTO"].ToString() + "</DBTO>" : "<DBTO>" + "</DBTO>");
soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "<INCOME_TAX>" + itemRow["INCOME_TAX"].ToString() + "</INCOME_TAX>" : "<INCOME_TAX>" + "</INCOME_TAX>");
//soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "<INCOME_TAX>" + itemRow["INCOME_TAX"].ToString() + "</INCOME_TAX>" : "<INCOME_TAX>" + "</INCOME_TAX>");
//soapRequestData.Append(itemRow["CRDTO"] != null ? "<CRDTO>" + itemRow["CRDTO"].ToString() + "</CRDTO>" : "<CRDTO>" + "</CRDTO>");
//soapRequestData.Append(itemRow["DBTO_CRDTO_DVSN"] != null ? "<DBTO_CRDTO_DVSN>" + itemRow["DBTO_CRDTO_DVSN"].ToString() + "</DBTO_CRDTO_DVSN>" : "<DBTO_CRDTO_DVSN>" + "</DBTO_CRDTO_DVSN>");
//soapRequestData.Append(itemRow["BLNC"] != null ? "<BLNC>" + itemRow["BLNC"].ToString() + "</BLNC>" : "<BLNC>" + "</BLNC>");
@ -729,10 +729,10 @@ rollback transaction
if (!exists)
{
soapRequestData.Append("<MGMT_CST>");
soapRequestData.Append(item["YYYY"] != null ? "<YYYY>" + item["YYYY"].ToString() + "</YYYY>" : "<YYYY>" + "</YYYY>");
soapRequestData.Append(item["MM"] != null ? "<MM>" + item["MM"].ToString() + "</MM>" : "<MM>" + "</MM>");
soapRequestData.Append(item["DD"] != null ? "<DD>" + item["DD"].ToString() + "</DD>" : "<DD>" + "</DD>");
soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(item["YYYY"] != null ? "<Created_Year>" + item["YYYY"].ToString() + "</Created_Year>" : "<Created_Year>" + "</Created_Year>");
soapRequestData.Append(item["MM"] != null ? "<Created_Month>" + item["MM"].ToString() + "</Created_Month>" : "<Created_Month>" + "</Created_Month>");
//soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append("<SMR>" + 100 + "</SMR>");
soapRequestData.Append(item["SMPL_CST"] != null ? "<SMPL_CST>" + item["SMPL_CST"].ToString() + "</SMPL_CST>" : "<SMPL_CST>" + "</SMPL_CST>");
soapRequestData.Append("</MGMT_CST>");
}
@ -740,10 +740,10 @@ rollback transaction
else
{
soapRequestData.Append("<MGMT_CST>");
soapRequestData.Append(item["YYYY"] != null ? "<YYYY>" + item["YYYY"].ToString() + "</YYYY>" : "<YYYY>" + "</YYYY>");
soapRequestData.Append(item["MM"] != null ? "<MM>" + item["MM"].ToString() + "</MM>" : "<MM>" + "</MM>");
soapRequestData.Append(item["DD"] != null ? "<DD>" + item["DD"].ToString() + "</DD>" : "<DD>" + "</DD>");
soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(item["YYYY"] != null ? "<Created_Year>" + item["YYYY"].ToString() + "</Created_Year>" : "<Created_Year>" + "</Created_Year>");
soapRequestData.Append(item["MM"] != null ? "<Created_Month>" + item["MM"].ToString() + "</Created_Month>" : "<Created_Month>" + "</Created_Month>");
soapRequestData.Append("<SMR>" + 100 + "</SMR>");
//soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(item["SMPL_CST"] != null ? "<SMPL_CST>" + item["SMPL_CST"].ToString() + "</SMPL_CST>" : "<SMPL_CST>" + "</SMPL_CST>");
soapRequestData.Append("</MGMT_CST>");
}
@ -766,7 +766,7 @@ rollback transaction
//soapRequestData.Append(itemRow["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + itemRow["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(itemRow["SMR"] != null ? "<SMR>" + 200 + "</SMR>" : "<SMR>" + "</SMR>");
soapRequestData.Append(itemRow["DBTO"] != null ? "<DBTO>" + itemRow["DBTO"].ToString() + "</DBTO>" : "<DBTO>" + "</DBTO>");
soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "<INCOME_TAX>" + itemRow["INCOME_TAX"].ToString() + "</INCOME_TAX>" : "<INCOME_TAX>" + "</INCOME_TAX>");
//soapRequestData.Append(itemRow["INCOME_TAX"] != null ? "<INCOME_TAX>" + itemRow["INCOME_TAX"].ToString() + "</INCOME_TAX>" : "<INCOME_TAX>" + "</INCOME_TAX>");
//soapRequestData.Append(itemRow["CRDTO"] != null ? "<CRDTO>" + itemRow["CRDTO"].ToString() + "</CRDTO>" : "<CRDTO>" + "</CRDTO>");
//soapRequestData.Append(itemRow["DBTO_CRDTO_DVSN"] != null ? "<DBTO_CRDTO_DVSN>" + itemRow["DBTO_CRDTO_DVSN"].ToString() + "</DBTO_CRDTO_DVSN>" : "<DBTO_CRDTO_DVSN>" + "</DBTO_CRDTO_DVSN>");
//soapRequestData.Append(itemRow["BLNC"] != null ? "<BLNC>" + itemRow["BLNC"].ToString() + "</BLNC>" : "<BLNC>" + "</BLNC>");
@ -839,10 +839,10 @@ rollback transaction
if (!exists)
{
soapRequestData.Append("<MGMT_CST>");
soapRequestData.Append(item["YYYY"] != null ? "<YYYY>" + item["YYYY"].ToString() + "</YYYY>" : "<YYYY>" + "</YYYY>");
soapRequestData.Append(item["MM"] != null ? "<MM>" + item["MM"].ToString() + "</MM>" : "<MM>" + "</MM>");
soapRequestData.Append(item["DD"] != null ? "<DD>" + item["DD"].ToString() + "</DD>" : "<DD>" + "</DD>");
soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(item["YYYY"] != null ? "<Created_Year>" + item["YYYY"].ToString() + "</Created_Year>" : "<Created_Year>" + "</Created_Year>");
soapRequestData.Append(item["MM"] != null ? "<Created_Month>" + item["MM"].ToString() + "</Created_Month>" : "<Created_Month>" + "</Created_Month>");
soapRequestData.Append("<SMR>" + 200 + "</SMR>");
//soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(item["SMPL_CST"] != null ? "<SMPL_CST>" + item["SMPL_CST"].ToString() + "</SMPL_CST>" : "<SMPL_CST>" + "</SMPL_CST>");
soapRequestData.Append("</MGMT_CST>");
}
@ -850,10 +850,10 @@ rollback transaction
else
{
soapRequestData.Append("<MGMT_CST>");
soapRequestData.Append(item["YYYY"] != null ? "<YYYY>" + item["YYYY"].ToString() + "</YYYY>" : "<YYYY>" + "</YYYY>");
soapRequestData.Append(item["MM"] != null ? "<MM>" + item["MM"].ToString() + "</MM>" : "<MM>" + "</MM>");
soapRequestData.Append(item["DD"] != null ? "<DD>" + item["DD"].ToString() + "</DD>" : "<DD>" + "</DD>");
soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(item["YYYY"] != null ? "<Created_Year>" + item["YYYY"].ToString() + "</Created_Year>" : "<Created_Year>" + "</Created_Year>");
soapRequestData.Append(item["MM"] != null ? "<Created_Month>" + item["MM"].ToString() + "</Created_Month>" : "<Created_Month>" + "</Created_Month>");
soapRequestData.Append("<SMR>" + 200 + "</SMR>");
//soapRequestData.Append(item["SPTDOC_NO"] != null ? "<SPTDOC_NO>" + item["SPTDOC_NO"].ToString() + "</SPTDOC_NO>" : "<SPTDOC_NO>" + "</SPTDOC_NO>");
soapRequestData.Append(item["SMPL_CST"] != null ? "<SMPL_CST>" + item["SMPL_CST"].ToString() + "</SMPL_CST>" : "<SMPL_CST>" + "</SMPL_CST>");
soapRequestData.Append("</MGMT_CST>");
}

10
ICSSoft.FromERP/SK/YERP_007.cs

@ -95,8 +95,8 @@ namespace ICSSoft.FromERP
string Date = Dates.ToString("yyyy");
string beginMuoth = Dates.AddMonths(-1).ToString("MM");
string endMuoth = Dates.AddMonths(-1).ToString("MM");
var beginPeriod = Date + beginMuoth; //"202407";//Date + beginMuoth;
var endPeriod = Date + endMuoth;// "202407";// Date + endMuoth;
var beginPeriod = Date + beginMuoth; //"202409";
var endPeriod = Date + endMuoth; //"202409";
string sqls = @"
begin transaction
@ -420,7 +420,7 @@ namespace ICSSoft.FromERP
string sqlsgz = @"
begin transaction
exec GL_Ledger @tblname=N'cwfymxz',@KmCode=N'6603',@beginPeriod='{0}',@endPeriod='{1}',@bVouch=0,@bequal=1,@sum=0,@bMJ=1,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0
exec GL_Ledger @tblname=N'cwfymxz',@KmCode=N'5603',@beginPeriod='{0}',@endPeriod='{1}',@bVouch=0,@bequal=1,@sum=0,@bMJ=1,@swhere=N'',@sAuth=N'',@ReportID=N'GL13',@ReportType=0,@iUnite=0
--select * from tempdb..cwfymxz
@ -872,7 +872,7 @@ namespace ICSSoft.FromERP
var datatemp = new TempDatas
{
YYYY = itemRow["Created_Year"].ToString(),
MM = itemRow["MM"].ToString(),
MM = itemRow["Created_Month"].ToString(),
};
datasrrows_gz.Add(datatemp);
}
@ -888,7 +888,7 @@ namespace ICSSoft.FromERP
var datatemp = new TempDatas
{
YYYY = itemRow["Created_Year"].ToString(),
MM = itemRow["MM"].ToString(),
MM = itemRow["Created_Month"].ToString(),
};
datazcrows_gz.Add(datatemp);
}

Loading…
Cancel
Save