@ -174,43 +174,54 @@ namespace VOL.WMS.Services
// isaudit = "2";
// }
//}
if ( ! string . IsNullOrWhiteSpace ( AuditParam . isaudit ) ) {
if ( AuditParam . isaudit = = "仅需自己审核" )
{
isaudit = "3" ;
}
if ( AuditParam . isaudit = = "已审核" )
{
isaudit = "2" ;
}
}
//if (!string.IsNullOrWhiteSpace(AuditParam.isaudit)) {
// if (AuditParam.isaudit == "仅需自己审核")
// {
// isaudit = "3";
// }
// if (AuditParam.isaudit == "已审核")
// {
// isaudit = "2";
// }
//}
if ( AuditParam . wheres . Exists ( x = > x . name ! = "isaudit" ) ) {
foreach ( var item in AuditParam . wheres . Where ( x = > x . name ! = "isaudit" ) . ToList ( ) ) {
foreach ( var item in AuditParam . wheres . ToList ( ) ) {
if ( item . name = = "BILLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) ) {
addcondition ( $"cm.BILLNO like '%{item.value}'" ) ;
}
if ( item . name = = "APPLICANTNAME" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"cm.APPLICANT = '{item.value}'" ) ;
}
if ( item . name = = "MBLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $" EXISTS (select 1 from ch_fee_do d where d.BILLNO=i.BILLNO AND d.BSNO IN (SELECT BSNO FROM V_OP_BILL WHERE CUSTNO like '%{item.value}%' or MBLNO like '%{item.value}%' or HBLNO like '%{item.value}%' or CUSTOMNO like '%{item.value}%' or ORDERNO like '%{item.value}%'))" ) ;
}
if ( item . name = = "APPLYTIMEBgn" & & ! string . IsNullOrWhiteSpace ( item . value ) )
if ( item . name = = "isaudit" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
if ( item . value = = "仅需自己审核" )
{
addcondition( $"APPLYTIME >='{item.value}'" ) ;
isaudit = "3" ;
}
if ( item . name = = "APPLYTIMEEnd" & & ! string . IsNullOrWhiteSpace ( item . value ) )
if ( item . value = = "已审核" )
{
addcondition( $"APPLYTIME <='{item.value} 23:59:59'" ) ;
isaudit = "2" ;
}
}
if ( item . name = = "BILLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) ) {
addcondition ( $"cm.BILLNO like '%{item.value}'" ) ;
}
if ( item . name = = "APPLICANTNAME" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"cm.APPLICANT = '{item.value}'" ) ;
}
if ( item . name = = "MBLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $" EXISTS (select 1 from ch_fee_do d where d.BILLNO=i.BILLNO AND d.BSNO IN (SELECT BSNO FROM V_OP_BILL WHERE CUSTNO like '%{item.value}%' or MBLNO like '%{item.value}%' or HBLNO like '%{item.value}%' or CUSTOMNO like '%{item.value}%' or ORDERNO like '%{item.value}%'))" ) ;
}
if ( item . name = = "APPLYTIMEBgn" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"APPLYTIME >='{item.value}'" ) ;
}
if ( item . name = = "APPLYTIMEEnd" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"APPLYTIME <='{item.value} 23:59:59'" ) ;
}
}
JObject reqObj = new JObject
{
@ -345,6 +356,42 @@ namespace VOL.WMS.Services
}
}
if ( AuditParam . execution = = "查询业务" )
{
foreach ( var item in AuditParam . wheres )
{
if ( item . name = = "BSNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"{item.value}" ) ;
}
}
JObject reqObj = new JObject
{
{ "userid" , userid } ,
{ "formname" , AuditParam . execution } ,
{ "isaudit" , "" } ,
{ "condition" , condition }
} ;
try
{
var t_str = reqObj . ToString ( Newtonsoft . Json . Formatting . None ) ;
var rtn = SendHelper . DoPost ( url , t_str ) ;
var rtnresult = JsonConvert . DeserializeObject < DBResult > ( rtn ) ;
_webResponseContent = new WebResponseContent ( rtnresult ) ;
}
catch ( Exception e )
{
_webResponseContent . Error ( e . Message ) ;
}
}
}
if ( jp . TYPENAME = = "付费发票核销" )
@ -385,8 +432,34 @@ namespace VOL.WMS.Services
{
//执行查询 从ds7查询仅需自己审核
foreach ( var item in AuditParam . wheres . Where ( x = > x . name ! = "isaudit" ) . ToList ( ) )
var isaudit = "1" ;
//if (!string.IsNullOrWhiteSpace(AuditParam.isaudit))
//{
// if (AuditParam.isaudit == "仅需自己审核")
// {
// isaudit = "1";//提交审核
// }
// if (AuditParam.isaudit == "已审核")
// {
// isaudit = "2";//审核通过
// }
//}
foreach ( var item in AuditParam . wheres . ToList ( ) )
{
if ( item . name = = "isaudit" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
if ( item . value = = "仅需自己审核" )
isaudit = "1" ;
if ( item . value = = "已审核" )
isaudit = "2" ;
}
if ( item . name = = "APPLICANTNAME" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"i.APPLICANT = '{item.value}'" ) ;
@ -408,6 +481,11 @@ namespace VOL.WMS.Services
{
addcondition ( $"APPLYTIME <='{item.value} 23:59:59'" ) ;
}
if ( item . name = = "APPLYTIMEEnd" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"APPLYTIME <='{item.value} 23:59:59'" ) ;
}
}
@ -415,7 +493,7 @@ namespace VOL.WMS.Services
{
{ "userid" , userid } ,
{ "formname" , AuditParam . execution } ,
//{ "isaudit", isaudit } ,
{ "isaudit" , isaudit } ,
{ "condition" , condition }
} ;
try
@ -444,9 +522,9 @@ namespace VOL.WMS.Services
foreach ( var item in AuditParam . wheres )
{
if ( item . name = = " GID " & & ! string . IsNullOrWhiteSpace ( item . value ) )
if ( item . name = = " BILLNO " & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $" i.GID = '{item.value}' ") ;
addcondition ( $" c.BILLNO = '{item.value}' ") ;
}
}
@ -454,7 +532,7 @@ namespace VOL.WMS.Services
{
{ "userid" , userid } ,
{ "formname" , AuditParam . execution } ,
{ "isaudit" , "" } ,
//{ "isaudit", "" } ,
{ "condition" , condition }
} ;
@ -489,7 +567,7 @@ namespace VOL.WMS.Services
{
{ "userid" , userid } ,
{ "formname" , AuditParam . execution } ,
{ "isaudit" , "" } ,
//{ "isaudit", "" } ,
{ "condition" , condition }
} ;
@ -544,6 +622,43 @@ namespace VOL.WMS.Services
_webResponseContent . Error ( e . Message ) ;
}
}
if ( AuditParam . execution = = "查询业务" )
{
foreach ( var item in AuditParam . wheres )
{
if ( item . name = = "BSNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"{item.value}" ) ;
}
}
JObject reqObj = new JObject
{
{ "userid" , userid } ,
{ "formname" , AuditParam . execution } ,
//{ "isaudit", "" },
{ "condition" , condition }
} ;
try
{
var t_str = reqObj . ToString ( Newtonsoft . Json . Formatting . None ) ;
var rtn = SendHelper . DoPost ( url , t_str ) ;
var rtnresult = JsonConvert . DeserializeObject < DBResult > ( rtn ) ;
_webResponseContent = new WebResponseContent ( rtnresult ) ;
}
catch ( Exception e )
{
_webResponseContent . Error ( e . Message ) ;
}
}
}
if ( jp . TYPENAME = = "客户信息审批" )
@ -717,6 +832,9 @@ namespace VOL.WMS.Services
var dicnos3 = new string [ ] { "DS7url" } ;
var tUrlList = DictionaryManager . GetDictionaries ( dicnos3 ) . ToList ( ) ;
var urlhead = tUrlList [ 0 ] . Sys_DictionaryList [ 0 ] . DicValue ;
//测试地址
//urlhead = "http://localhost:10200";
var urlDetail = "/CommMng/DSWEBAPPInterface/InvApplicationAuditInterface" ;
var url = urlhead + urlDetail ;
@ -726,6 +844,7 @@ namespace VOL.WMS.Services
var username = UserContext . Current . UserInfo . UserName ;
var usercompanyid = UserContext . Current . UserInfo . CompanyId ;
var ds7publicurl = tUrlList [ 0 ] . Sys_DictionaryList . FirstOrDefault ( x = > x . DicName = = "DS7PulicUrl" ) . DicValue ;
var condition = "" ;
void addcondition ( string str )
@ -737,51 +856,58 @@ namespace VOL.WMS.Services
if ( AuditParam . execution = = "查询列表" )
{
var isaudit = " 2 ";
var isaudit = " 1 ";
if ( ! string . IsNullOrWhiteSpace ( AuditParam . isaudit ) )
//if (!string.IsNullOrWhiteSpace(AuditParam.isaudit))
//{
// if (AuditParam.isaudit == "仅需自己审核")
// {
// isaudit = "2";
// }
// if (AuditParam.isaudit == "已审核")
// {
// isaudit = "0";
// }
//}
//addcondition($"BILLSTATUS ='{isaudit}'");
foreach ( var item in AuditParam . wheres . ToList ( ) )
{
if ( item . name = = "isaudit" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
if ( item . value = = "仅需自己审核" )
isaudit = "1" ;
if ( item . value = = "已审核" )
isaudit = "2" ;
}
//addcondition($"BILLSTATUS ='{isaudit}'");
if ( AuditParam . isaudit = = "仅需自己审核" )
if ( item. name = = "BILLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
isaudit = "2" ;
addcondition( $" cm.BILLNO like '%{item.value}%' " ) ;
}
if ( AuditParam . isaudit = = "已审核" )
if ( item. name = = "MBLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
isaudit = "0" ;
addcondition( $" BILLNO IN (SELECT BILLNO FROM CH_FEE_DO WHERE BSNO IN (SELECT BSNO FROM V_OP_BILL b WHERE b.CUSTNO like '%{item.value}%' or b.MBLNO like '%{item.value}%' or b.HBLNO like '%{item.value}%' or b.CUSTOMNO like '%{item.value}%' or b.ORDERNO like '%{item.value}%')) " ) ;
}
}
addcondition ( $"BILLSTATUS ='{isaudit}'" ) ;
if ( AuditParam . wheres . Exists ( x = > x . name ! = "isaudit" ) )
{
foreach ( var item in AuditParam . wheres . Where ( x = > x . name ! = "isaudit" ) . ToList ( ) )
if ( item . name = = "CUSTOMERNAME" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"CUSTOMERNAME like '%{item.value}%'" ) ;
}
if ( item . name = = "BILLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $" cm.BILLNO like '%{item.value}%' " ) ;
}
if ( item . name = = "MBLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $" BILLNO IN (SELECT BILLNO FROM CH_FEE_DO WHERE BSNO IN (SELECT BSNO FROM V_OP_BILL b WHERE b.CUSTNO like '%{item.value}%' or b.MBLNO like '%{item.value}%' or b.HBLNO like '%{item.value}%' or b.CUSTOMNO like '%{item.value}%' or b.ORDERNO like '%{item.value}%')) " ) ;
}
if ( item . name = = "CUSTOMERNAME" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"CUSTOMERNAME like '%{item.value}%'" ) ;
}
if ( item . name = = "APPLYTIMEBgn" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"APPLYTIME >='{item.value}'" ) ;
}
if ( item . name = = "APPLYTIMEEnd" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"APPLYTIME <='{item.value} 23:59:59'" ) ;
}
if ( item . name = = "APPLYTIMEBgn" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"APPLYTIME >='{item.value}'" ) ;
}
if ( item . name = = "APPLYTIMEEnd" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"APPLYTIME <='{item.value} 23:59:59'" ) ;
}
}
JObject reqObj = new JObject
{
@ -815,9 +941,9 @@ namespace VOL.WMS.Services
foreach ( var item in AuditParam . wheres )
{
if ( item . name = = " GID " & & ! string . IsNullOrWhiteSpace ( item . value ) )
if ( item . name = = " BILLNO " & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $" PID = '{item.value}' ") ;
addcondition ( $" BILLNO = '{item.value}' ") ;
}
}
@ -846,6 +972,47 @@ namespace VOL.WMS.Services
}
}
if ( AuditParam . execution = = "查询附件" )
{
foreach ( var item in AuditParam . wheres )
{
if ( item . name = = "BILLNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"{item.value}" ) ;
}
}
JObject reqObj = new JObject
{
{ "userid" , userid } ,
{ "formname" , AuditParam . execution } ,
{ "isaudit" , "" } ,
{ "condition" , condition }
} ;
try
{
var t_str = reqObj . ToString ( Newtonsoft . Json . Formatting . None ) ;
var rtn = SendHelper . DoPost ( url , t_str ) ;
var rtnresult = JsonConvert . DeserializeObject < DBResult > ( rtn ) ;
var 附 件 list = JsonConvert . DeserializeObject < DS7 附 件 返 回 值 > ( rtn ) ;
附 件 list . SetUrl ( ds7publicurl ) ;
rtnresult . Data = 附 件 list . data ;
_webResponseContent = new WebResponseContent ( rtnresult ) ;
}
catch ( Exception e )
{
_webResponseContent . Error ( e . Message ) ;
}
}
if ( AuditParam . execution = = "审批通过" )
{
foreach ( var item in AuditParam . wheres )
@ -916,6 +1083,41 @@ namespace VOL.WMS.Services
}
}
if ( AuditParam . execution = = "查询业务" )
{
foreach ( var item in AuditParam . wheres )
{
if ( item . name = = "BSNO" & & ! string . IsNullOrWhiteSpace ( item . value ) )
{
addcondition ( $"{item.value}" ) ;
}
}
JObject reqObj = new JObject
{
{ "userid" , userid } ,
{ "formname" , AuditParam . execution } ,
{ "isaudit" , "" } ,
{ "condition" , condition }
} ;
try
{
var t_str = reqObj . ToString ( Newtonsoft . Json . Formatting . None ) ;
var rtn = SendHelper . DoPost ( url , t_str ) ;
var rtnresult = JsonConvert . DeserializeObject < DBResult > ( rtn ) ;
_webResponseContent = new WebResponseContent ( rtnresult ) ;
}
catch ( Exception e )
{
_webResponseContent . Error ( e . Message ) ;
}
}
}
return _webResponseContent ;
@ -1013,4 +1215,35 @@ namespace VOL.WMS.Services
}
}
public class DS7Result {
public bool? Success { get ; set ; }
public string Message { get ; set ; }
public object data { get ; set ; }
}
public class DS7 附 件 {
public string GID { get ; set ; }
public string BillNo { get ; set ; }
public string File_Type { get ; set ; }
public string UpdateTime { get ; set ; }
public string Operator { get ; set ; }
public string File_Path { get ; set ; }
public string File_Name { get ; set ; }
public string File_OriginalName { get ; set ; }
}
public class DS7 附 件 返 回 值 : DBResult
{
public List < DS7 附 件 > data { get ; set ; }
const string fileurl = "/Areas/Account/Files/" ;
public void SetUrl ( string url ) {
if ( data ! = null & & data . Count > 0 ) {
foreach ( var item in data ) {
item . File_Path = url + fileurl + item . BillNo + "/" + item . File_Name ;
}
}
}
}
}