@ -31,6 +31,8 @@ namespace JobCreateFee
string CustName = context . JobDetail . JobDataMap . GetString ( "CustName" ) ;
string companySecret = context . JobDetail . JobDataMap . GetString ( "DjyCompanySecret" ) ;
string bsType = context . JobDetail . JobDataMap . GetString ( "DjybsType" ) ;
string COSCOAUTOCREATEFEE = context . JobDetail . JobDataMap . GetString ( "COSCOAUTOCREATEFEE" ) ;
string CoscoCustName = context . JobDetail . JobDataMap . GetString ( "COSCOCustName" ) ;
string ENTEROPERATOR = context . JobDetail . JobDataMap . GetString ( "ENTEROPERATOR" ) ;
int reqTimeout = Convert . ToInt32 ( context . JobDetail . JobDataMap . GetString ( "RequestTimeout" ) ) ;
long ts = DataTableToJsonHelper . ConvertDateTimeToInt ( DateTime . Now ) ;
@ -84,6 +86,12 @@ namespace JobCreateFee
if ( returndata . price = = "" | | returndata . price = = null ) returndata . price = "0" ;
if ( returndata . ctnrCount = = "" | | returndata . ctnrCount = = null ) returndata . ctnrCount = "0" ;
var feecustname = CustName ;
if ( COSCOAUTOCREATEFEE = = "1" & & returndata . forwarder = = "中远海运" ) {
if ( Convert . ToDecimal ( returndata . price ) = = 0 ) returndata . price = "30" ;
feecustname = CoscoCustName ;
}
string sql = " if (select GID from t_op_txxp_log where GID='" + returndata . gid + "') is null INSERT INTO t_op_txxp_log([编号],[GID],[beizhu],[mblno],[bsstatus],[bstype],[createtime]" ;
sql = sql + ",[price],[sendtype],[ctnrCount],[ctnrInfo]) values ('" + BS . BSNO + "','" + returndata . gid + "'" ;
sql = sql + ",'" + returndata . beizhu + "','" + returndata . mblno + "','" + returndata . bsstatus + "','" + returndata . bstype + "','" + returndata . createtime + "'" ;
@ -92,14 +100,14 @@ namespace JobCreateFee
cmd . ExecuteNonQuery ( ) ;
if ( ! string . IsNullOrEmpty ( BS . BSNO ) & & BS . FEESTATUS ! = "提交财务" & & BS . FEESTATUS ! = "费用封帐" & & BS . BSSTATUS ! = "应付完毕" )
{
if ( Convert . ToDecimal ( returndata . price ) ! = 0 & & ! string . IsNullOrEmpty ( CustN ame) & & ! string . IsNullOrEmpty ( FeeName ) )
if ( Convert . ToDecimal ( returndata . price ) ! = 0 & & ! string . IsNullOrEmpty ( feecustn ame) & & ! string . IsNullOrEmpty ( FeeName ) )
{
sql = "INSERT INTO [t_ch_fee] ([类型],[费用状态],[编号],[费用名称],[结算单位],[客户名称],[标准]" ;
sql = sql + ",[单价],[数量],[金额],[币别],[汇率],[备注],[结算金额],[开票金额]" ;
sql = sql + ",[录入人],[录入日期],[是否对帐],[顺序],[冲抵金额]" ;
sql = sql + ",[机密],[是否垫付],[申请金额],[不开发票],[费用英文名称]" ;
sql = sql + ",[申请开票],[提交],[不含税价],[税率],[税额],PROJECTFEEID) VALUES " ;
sql = sql + "('付','审核通过','" + BS . BSNO + "','" + FeeName + "','','" + CustN ame + "','票'" ;
sql = sql + "('付','审核通过','" + BS . BSNO + "','" + FeeName + "','','" + feecustn ame + "','票'" ;
sql = sql + "," + returndata . price + ",1," + returndata . price + ",'RMB',1,'',0,0" ;
sql = sql + ",'" + ENTEROPERATOR + "',GETDATE(),0,0,0" ;
sql = sql + ",0,0,0,0,'" + FeeName + "'" ;