DS7_JinGang
dengyu 1 year ago
parent 95159f9b4e
commit b5ec18c95e

@ -440,7 +440,6 @@ namespace DSWeb.Areas.Account.Controllers
}
#endregion
#region 入帐申请
public ContentResult GetBalPayList(int start, int limit, string sort, string condition)

@ -241,11 +241,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoicehexiao
strSql.Append(",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE");
strSql.Append(",b.DOC,b.SALE,f.TaxUnitPrice,f.Quantity,f.taxrate,f.amount-f.notaxamount TAX");
strSql.Append(",f.UNIT UNIT");
strSql.Append(",b.DESTINATION,b.GOODSNAME");
strSql.Append(" FROM ch_fee_do_invoice c");
strSql.Append(" left join v_op_bill b on (b.bsno=c.bsno)");
strSql.Append(" left join ch_fee f on (f.gid=c.feeid) ");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" where (c.ISDELETED=0 or c.ISDELETED IS NULL) and " + strCondition);
@ -300,11 +300,15 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoicehexiao
data.VOYNO = Convert.ToString(reader["VOYNO"]);
data.PORTLOAD = Convert.ToString(reader["PORTLOAD"]);
data.PORTDISCHARGE = Convert.ToString(reader["PORTDISCHARGE"]);
data.DESTINATION = Convert.ToString(reader["DESTINATION"]);
data.INPUTBY = Convert.ToString(reader["INPUTBY"]);
data.OP = Convert.ToString(reader["OP"]);
data.CUSTSERVICE = Convert.ToString(reader["CUSTSERVICE"]);
data.DOC = Convert.ToString(reader["DOC"]);
data.SALE = Convert.ToString(reader["SALE"]);
data.GOODSNAME = Convert.ToString(reader["GOODSNAME"]);
if (reader["BSSTATUS"] != DBNull.Value)
data.BSSTATUS = Convert.ToBoolean(reader["BSSTATUS"]);

@ -2587,10 +2587,18 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
}
}
tran.Commit();
if (ConfigurationManager.AppSettings["FanWeiOAAPI"] == "true")
{
OAHelper.BILLDONE(bill);
}
}
catch (Exception e)
{
tran.Rollback();
if (ConfigurationManager.AppSettings["FanWeiOAAPI"] == "true")
{
OAHelper.BILLDONE(bill);
}
result.Success = false;
result.Message = "提交审核错误,请重试或联系系统管理员 "+e.Message;
@ -2756,18 +2764,20 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
tran.Rollback();
result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
OAHelper.BILLDONE(headdata.BILLNO);
return result;
}
else
{
var requestid = _r.Data.ToString();
OAHelper.BILLDONE(headdata.BILLNO);
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO");
cmdupdate.Parameters.Clear();
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, headdata.BILLNO);
db.ExecuteNonQuery(cmdupdate, tran);
}
}
}
@ -3139,7 +3149,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
//var usercode = Convert.ToString(Session["CODENAME"]);
//var companyid = Convert.ToString(Session["COMPANYID"]);
var _r= OAHelper.PostApplication(headdata, userid, usercode, companyid);
var _r = OAHelper.PostApplication(headdata, userid, usercode, companyid);
return _r;

@ -179,6 +179,11 @@ namespace DSWeb.Areas.Account.Models.Chfee_do_detail
/// </summary>
public string SALE { get { return _SALE; } set { _SALE = value; } }
/// <summary>
/// 商品名称
/// </summary>
public string GOODSNAME { get; set; }
/// <summary>

@ -443,7 +443,27 @@ Ext.extend(Shipping.MsChInvoicehexiaoAudit, Ext.Panel, {
dataIndex: 'ORDERNO',
header: '订舱编号',
width: 80
}, {
}, {
sortable: true,
dataIndex: 'PORTLOAD',
header: '装货港',
width: 120
}, {
sortable: true,
dataIndex: 'PORTDISCHARGE',
header: '卸货港',
width: 120
}, {
sortable: true,
dataIndex: 'DESTINATION',
header: '目的港',
width: 120
}, {
sortable: true,
dataIndex: 'GOODSNAME',
header: '货物名称',
width: 140
}, {
sortable: true,
dataIndex: 'TaxUnitPrice',
header: '单价',

@ -59,6 +59,7 @@ using CommonTool.MailKit;
using System.Web.UI.WebControls;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
using DSWeb.SoftMng.Model;
using System.Configuration;
namespace DSWeb.Areas.CommMng.DAL
{
@ -7107,7 +7108,7 @@ namespace DSWeb.Areas.CommMng.DAL
}
#endregion
#region 枚举类型83000 综合业务的装货港卸货港 新增
#region 枚举类型83000 综合业务的装货港卸货港 新增
public static DBResult SaveOtherPort(string PORT) {
var result = new DBResult();
@ -7123,6 +7124,31 @@ namespace DSWeb.Areas.CommMng.DAL
}
#endregion
public static bool webconfig(string code)
{
if (ConfigurationManager.AppSettings["COMPANYCODE"] != null)
{
if (ConfigurationManager.AppSettings["COMPANYCODE"] == code)
{
return true;
}
}
return false;
}
public static bool webconfig(List<string> codeList)
{
if (ConfigurationManager.AppSettings["COMPANYCODE"] != null)
{
foreach (var item in codeList) {
if (webconfig(item)) {
return true;
}
}
}
return false;
}
}
public class BarCodeDrawing

@ -65,7 +65,8 @@ using DSWeb.Areas.Account.Models.Chfee_Payapplication;
using DSWeb.MvcShipping.DAL.MsSysThirdPartyAccount;
using DSWeb.Areas.Account.Models.Chfee_payapplication;
using DSWeb.Areas.Account.DAL.Chfee_payapplication;
using DSWeb.Areas.Account.Controllers;
using DSWeb.Areas.Account.DAL.Chfee_Payapplication;
namespace DSWeb.Areas.CommMng.DAL
{
@ -868,6 +869,14 @@ namespace DSWeb.Areas.CommMng.DAL
private static DateTime? tokenEndTime { get; set; } = null;
const string URLHead = "http://117.78.44.211";
public static List<string> INWORKBILL { get; set; }
public static void BILLDONE(string BILLNO)
{
if (INWORKBILL.Exists(x => x == BILLNO))
{
INWORKBILL.RemoveAll(x => x == BILLNO);
}
}
//获取secret
public static void GetRSAKEY()
@ -979,7 +988,37 @@ namespace DSWeb.Areas.CommMng.DAL
private static DBResult CanSend(ChPayapplication headdata) {
var result = new DBResult();
if (INWORKBILL == null) {
INWORKBILL = new List<string>();
}
if ( INWORKBILL.Exists(x => x == headdata.BILLNO))
{
result.SetErrorInfo("业务正在执行中");
return result;
}
else
{
}
if (!string.IsNullOrWhiteSpace(headdata.PAYAPPID))
{
result.SetErrorInfo("业务已经提交至泛微OA");
return result;
}
INWORKBILL.Add(headdata.BILLNO);
result.OK();
return result;
}
public static DBResult PostApplication( ChPayapplication headdata, string userid, string username, string companyid)
{
@ -988,9 +1027,11 @@ namespace DSWeb.Areas.CommMng.DAL
var result = new DBResult();
var hp = new GetResult();
try
{
var hp = new GetResult();
result = hp.DoGet(headdata, userid, username, companyid);
@ -999,7 +1040,7 @@ namespace DSWeb.Areas.CommMng.DAL
}
catch (Exception e)
{
BILLDONE(headdata.BILLNO);
}
return result;
@ -1129,6 +1170,8 @@ namespace DSWeb.Areas.CommMng.DAL
result.add(new Field("fkdx", fkdx.id.ToString()));//headdata.CUSTOMERNAME 付款对象 需使用泛微的一个ID号
var cdc = new CommonDataContext();
//var yxzh = "";
@ -1159,16 +1202,30 @@ namespace DSWeb.Areas.CommMng.DAL
var bsnolist = cdc.ch_fee_do.Where(x=>x.BILLNO ==headdata.BILLNO).Select(s=>s.BSNO).Distinct().ToList();
var vopbsMblnoList = cdc.v_op_bs.Where(x => bsnolist.Contains(x.BSNO)).Select(s => s.MBLNO).Distinct().ToList();
var vopbsList = cdc.v_op_bs.Where(x => bsnolist.Contains(x.BSNO)).ToList();
var bodymblnostr = "";
if (vopbsMblnoList != null && vopbsMblnoList.Count > 0) {
if (bsnolist != null && bsnolist.Count > 0) {
var vopbsMblnoList = vopbsList.Select(s => s.MBLNO).Distinct().ToList();
bodymblnostr = string.Join(" , ", vopbsMblnoList);
}
result.add(new Field("tdh", bodymblnostr));//提单号 依据付款申请的ch_fee_do的bsno关联v_op_bs的MBLNO
//20230817 荣圣达泛微OA对接 票结 增加 起运港 卸货港 目的地
//if (bsnolist != null && bsnolist.Count > 0)
//{
// var vopbsHead = vopbsList[0];
// result.add(new Field("起运港", vopbsHead.PORTLOAD));
// result.add(new Field("卸货港", vopbsHead.PORTDISCHARGE));
// result.add(new Field("目的港", vopbsHead.DESTINATION));
//}
return result;
}
@ -1412,6 +1469,12 @@ namespace DSWeb.Areas.CommMng.DAL
var _res2 = new FailResponse();
try
{
var cansend = CanSend(headdata);
if (!cansend.Success) {
return cansend;
}
GetUrl();
var cdc = new CommonDataContext();
@ -1604,6 +1667,8 @@ namespace DSWeb.Areas.CommMng.DAL
catch (Exception e) {
result.SetErrorInfo("发送失败:"+ rtn);
BILLDONE(headdata.BILLNO);
}
@ -1611,6 +1676,7 @@ namespace DSWeb.Areas.CommMng.DAL
return result;
}
catch (Exception e) {
BILLDONE(headdata.BILLNO);
return result.SetErrorInfo(e.Message);
}
finally { }

@ -118,6 +118,9 @@ namespace DSWeb.Areas.CommMng.DAL
}
}
APP(OP,WORKFLOWID);
return _Result;
}
@ -240,6 +243,9 @@ namespace DSWeb.Areas.CommMng.DAL
//SaveMessage(_Message);
}
}
APP(OP, WORKFLOWID);
return _Result;
}
@ -2590,8 +2596,6 @@ namespace DSWeb.Areas.CommMng.DAL
}
#endregion
#region 提交时通知审核人
static public int StartMessage(string WORKFLOWID, string OP, string RECEIVER, string BSNO,string BILLNO)
{
@ -2609,6 +2613,8 @@ namespace DSWeb.Areas.CommMng.DAL
var _message = SetInsertMessage(strSql);
if (SaveMessage(_message)) { _count = 1; }
}
return _count;
}
@ -2936,7 +2942,121 @@ namespace DSWeb.Areas.CommMng.DAL
}
#endregion
public class SendAppMessage {
public string title { get; set; }
public string content { get; set; }
public List<string> userIds { get; set; }
public SendAppMessage()
{
}
public SendAppMessage(string title,string content="")
{
this.title = title;
this.content = content;
}
public static SendAppMessage JGWLAPPHelp(string title, List<Auditormb> AuditorList, VW_user_md Sender, DSWeb.Areas.OA.Models.WorkFlow.WorkFlowmb workflow) {
var result = new SendAppMessage(title);
result.userIds = AuditorList.Select(s=>s.GID).ToList();
result.content = $"{Sender.SHOWNAME}提交了[{workflow.NAME}],请及时处理";
return result;
}
}
public static void APP(string SenderUserid, string WORKFLOWID, string GROUPID="1")
{
//目前只有金港物流使用此功能
var companylist = new List<string>
{
"JGWL"
};
if (BasicDataRefDAL.webconfig(companylist))
{
if (BasicDataRefDAL.webconfig("JGWL")) {
//目前根据工作流 判断哪些需要推送通知
var workflowidList = new List<string> {
"5061D587-E806-EE82-7A3E-9260130A32AD",
"00378522-EFCE-F2C1-2DCE-0D72812303AE",
"2963F1D8-3C4E-1A0E-6B68-B2982C188F3A",
"E4C0A0DB-A44E-376B-3C95-7D9A913A31B8", //付费申请
"832DA470-C827-A58C-AF47-7BB931FDF6AD",
"6E15C788-BE00-06AD-291A-420A96A951FF",
"1E2E0FF1-61B6-64A4-2139-43E66F6F7CC7",
"97B3A9F2-E8D2-D466-A15E-946FA2A5EFBD",
"E3682F86-8820-8A7C-6EC7-FFAB8E1E75FE",
"F346CF2B-F074-3349-1842-F28306360FF7",//付费发票核销
"45C43498-FBD8-D83A-6ED6-3420E97E0680",
"707BBC82-943F-1F3A-FA7A-2C13F278182A",
"818E31B5-FC5D-03BB-D0A8-1925BFCE6C2D",//发票申请
"4500D029-65F7-46FC-7F6A-F1746C59C85E" //往来单位审批
};
//var workflowid_dic = new Dictionary<string, string>
//{
// { "5061D587-E806-EE82-7A3E-9260130A32AD", "付费申请-货代部" }
// { "00378522-EFCE-F2C1-2DCE-0D72812303AE", "付费申请" }
// { "2963F1D8-3C4E-1A0E-6B68-B2982C188F3A", "付费申请" }
// { "E4C0A0DB-A44E-376B-3C95-7D9A913A31B8", "付费申请" } //付费申请
// { "832DA470-C827-A58C-AF47-7BB931FDF6AD", "付费发票核销" }
// { "6E15C788-BE00-06AD-291A-420A96A951FF", "付费发票核销" }
// { "1E2E0FF1-61B6-64A4-2139-43E66F6F7CC7", "付费发票核销" }
// { "97B3A9F2-E8D2-D466-A15E-946FA2A5EFBD", "付费发票核销" }
// { "E3682F86-8820-8A7C-6EC7-FFAB8E1E75FE", "付费发票核销" }
// { "F346CF2B-F074-3349-1842-F28306360FF7", "付费发票核销" }//付费发票核销
// { "45C43498-FBD8-D83A-6ED6-3420E97E0680", "发票申请" }
// { "707BBC82-943F-1F3A-FA7A-2C13F278182A", "发票申请" }
// { "818E31B5-FC5D-03BB-D0A8-1925BFCE6C2D", "发票申请" }//发票申请
// { "4500D029-65F7-46FC-7F6A-F1746C59C85E", "往来单位审批" } //往来单位审批
//};
if (workflowidList.Exists(x => x == WORKFLOWID)) {
var cdc = new CommonDataContext();
var Auditor = GetAuditor(WORKFLOWID, GROUPID);
//测试数据
//var testuser = cdc.VW_user.FirstOrDefault(x=>x.USERID== "1BEC90E1-9780-472F-90C2-0C6390C044A4");
//var auditor = new Auditormb();
//auditor.GID = "1BEC90E1-9780-472F-90C2-0C6390C044A4";
//Auditor.Add(auditor);
var workflowList= OA.DAL.WorkFlow.WorkFlowDAL.GetWorkFlowList($" wf.GID='{WORKFLOWID}'");
var workflow = workflowList[0];
var Sender = cdc.VW_user.FirstOrDefault(x => x.USERID == SenderUserid);
if (Auditor != null && Auditor.Count > 0) {
var sendinfo = SendAppMessage.JGWLAPPHelp($"[{workflow.NAME}]提交审核", Auditor, Sender, workflow);
DoSend(sendinfo);
}
}
}
}
void DoSend(SendAppMessage sendinfo) {
var SendAppInfoServiceURL = MsSysParamSetDAL.GetData("PARAMNAME='SendAppInfoServiceURL'");
if (SendAppInfoServiceURL.PARAMVALUE != "")
{
var url = SendAppInfoServiceURL.PARAMVALUE;
BasicDataRefDAL.SaveLog(sendinfo,"","发送APP提醒","发送");
string rtn = DSWeb.Areas.Dispatch.Helper.WebRequestHelper.DoPost_Json(url, sendinfo);
BasicDataRefDAL.SaveLog(rtn, "", "发送APP提醒", "返回");
}
}
}
#region 保存信息
public static Boolean SaveMessage(SYSMessagemb Message)

@ -18,6 +18,7 @@ using DSWeb.MvcShipping.Models.MsSysBillNoSet;
using DSWeb.MvcShipping.DAL.MsSysBillNoSet;
using DSWeb.MvcShipping.DAL.MsChFeeDAL;
using DSWeb.MvcShipping.Models.MsChFee;
using DSWeb.MvcShipping.DAL.MsSysParamSet;
namespace DSWeb.MvcShipping.DAL.MsOpOtherDAL
{
@ -49,7 +50,14 @@ namespace DSWeb.MvcShipping.DAL.MsOpOtherDAL
}
else
{
strSql.Append(" order by BSDATE desc");
var SeaeDefaultSort = MsSysParamSetDAL.GetData("PARAMNAME='OpOtherDefaultSort'");
if (SeaeDefaultSort.PARAMVALUE != "")
strSql.Append(" order by " + SeaeDefaultSort.PARAMVALUE);
else
strSql.Append(" order by BSDATE desc");
}
strSql.Append(@") as num , "); //

@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>配置文件1</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>H:\DS7_dev\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />

Loading…
Cancel
Save