From 07d5d6b5897e3ef20bf4101d637126ee6e7f2fbd Mon Sep 17 00:00:00 2001 From: ddlucky Date: Mon, 16 Jan 2023 18:58:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=92=89=E9=92=89=E5=87=BA=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=AE=A1=E6=A0=B8=E8=B0=83=E8=AF=95=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DSWeb.Common/DB/Comm.cs | 9 + .../Controllers/WMSNewController.cs | 1 - .../Controllers/WMSOUT_GuiGeController.cs | 2 +- .../DAL/WMSOUT_GuiGe/WMSOUT_GuiGeDAL.cs | 41 +- .../MvcShipping/Helper/DingTalkHelper.cs | 388 ++++++++++++++++-- 5 files changed, 400 insertions(+), 41 deletions(-) diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index 83581e3a..284da720 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -2076,7 +2076,13 @@ namespace DSWeb.Common.DB public string GOODSMODEL { get; set; } public string GOODSSTANDARD { get; set; } public string GOODSPACK { get; set; } + /// + /// 计费单位 吨/千克/CBM/箱/件 + /// public string CHARGEUNIT { get; set; } + /// + /// 出库量 + /// public decimal? GOODSPFSL { get; set; } public decimal? GOODSOUTFEE { get; set; } public string TRUCKNO { get; set; } @@ -2084,6 +2090,9 @@ namespace DSWeb.Common.DB public DateTime? CREATETIME { get; set; } public string REMARK { get; set; } public string ASSOCIATEDNO { get; set; } + /// + /// 出库件数 + /// public decimal? GOODSPACKPFSL { get; set; } public decimal? ARFEE { get; set; } public decimal? APFEE { get; set; } diff --git a/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs b/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs index e2a9811f..b125320b 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs @@ -742,7 +742,6 @@ namespace DSWeb.MvcShipping.Controllers return new ContentResult() { Content = json }; } - public ContentResult modify(string data, string modifydata) { var bodyList = JsonConvert.Deserialize>(data); diff --git a/DSWeb/Areas/MvcShipping/Controllers/WMSOUT_GuiGeController.cs b/DSWeb/Areas/MvcShipping/Controllers/WMSOUT_GuiGeController.cs index 3f6c4eda..e4846104 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/WMSOUT_GuiGeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/WMSOUT_GuiGeController.cs @@ -948,7 +948,7 @@ namespace DSWeb.MvcShipping.Controllers } #endregion - #region 费用入账 + #region 出库费用入账 public ContentResult setislock(string sOUTGID,bool EIP,string outType) { if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") diff --git a/DSWeb/Areas/MvcShipping/DAL/WMSOUT_GuiGe/WMSOUT_GuiGeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/WMSOUT_GuiGe/WMSOUT_GuiGeDAL.cs index c74b456f..e617032d 100644 --- a/DSWeb/Areas/MvcShipping/DAL/WMSOUT_GuiGe/WMSOUT_GuiGeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/WMSOUT_GuiGe/WMSOUT_GuiGeDAL.cs @@ -20,6 +20,8 @@ using Ivony.Html; using DSWeb.MvcShipping.DAL.MsSysParamSet; using Ivony.Fluent; using DSWeb.MvcShipping.DAL.WMSStock; +using System.Configuration; +using DSWeb.Areas.MvcShipping.Helper; namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL { @@ -1879,7 +1881,7 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL } #endregion - #region 费用入账//需求编号:SR2017073000001 + #region 出库费用入账//需求编号:SR2017073000001 public static DBResult setislock(string gids,bool bEIP, string outType,string strUserID, string strCompanyID, string strDEPTNAME, string strSHOWNAME) { DBResult result = new DBResult(); @@ -1906,7 +1908,8 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL strSql.Append(" from wms_out o inner join wms_out_detail d on o.bsno = d.outbsno "); strSql.Append(" where o.gid in (" + gids + ") and o.ISLOCK=0"); - + var 需要发送给钉钉出库审核流程的业务编号List = new List(); + using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) { int i = 0; @@ -1939,20 +1942,20 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL { sSQL = "insert into ch_fee(GID,BSNO,FEETYPE,FEENAME,CUSTOMERNAME,UNIT,UNITPRICE,QUANTITY,AMOUNT,EXCHANGERATE,CURRENCY,COMMISSIONRATE,FEEFRT,REMARK,ISADVANCEDPAY,ENTEROPERATOR,ENTERDATE,FEESTATUS,WMSOUTBSNO,LINENUM,[TAXRATE],[NOTAXAMOUNT],[TAX],[ORDERSETTLEMENT],[TAXUNITPRICE],[ORDERINVSETTLEMENT],MODIFIEDUSER,MODIFIEDTIME,CARGO_GID) " - + " values(newid() ,'" + outFee.BSNO + "',1,'仓储费','" + outFee.ARCLIENTWMSOUT + "','单票','" + outFee.GOODSOUTFEE_OUT + "',1,'" + outFee.GOODSOUTFEE_OUT + "',1,'RMB',0,'PP','“出库明细单'+'" + outFee.OUTNO + "'+'”中的仓储费',0,'" + strUserID +"',getdate(),1,'" + outFee.OUTGID + "',0,0,'" + outFee.GOODSOUTFEE_OUT + "',0,0,'" + outFee.GOODSOUTFEE_OUT + "',0,'" + strUserID + "', getdate(),'"+ outFee.OUTDEGID + "')"; - + + " values(newid() ,'" + outFee.BSNO + "',1,'仓储费','" + outFee.ARCLIENTWMSOUT + "','单票','" + outFee.GOODSOUTFEE_OUT + "',1,'" + outFee.GOODSOUTFEE_OUT + "',1,'RMB',0,'PP','“出库明细单'+'" + outFee.OUTNO + "'+'”中的仓储费',0,'" + strUserID + "',getdate(),1,'" + outFee.OUTGID + "',0,0,'" + outFee.GOODSOUTFEE_OUT + "',0,0,'" + outFee.GOODSOUTFEE_OUT + "',0,'" + strUserID + "', getdate(),'" + outFee.OUTDEGID + "')"; + existVal = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, sSQL, null); } #endregion - + #region 插入 应付仓储费 GOODSOUTFEEAP_OUT if (outFee.GOODSOUTFEEAP_OUT > 0) { sSQL = "insert into ch_fee(GID,BSNO,FEETYPE,FEENAME,CUSTOMERNAME,UNIT,UNITPRICE,QUANTITY,AMOUNT,EXCHANGERATE,CURRENCY,COMMISSIONRATE,FEEFRT,REMARK,ISADVANCEDPAY,ENTEROPERATOR,ENTERDATE,FEESTATUS,WMSOUTBSNO,LINENUM,[TAXRATE],[NOTAXAMOUNT],[TAX],[ORDERSETTLEMENT],[TAXUNITPRICE],[ORDERINVSETTLEMENT],MODIFIEDUSER,MODIFIEDTIME,CARGO_GID) " - + " values(newid() ,'" + outFee.BSNO + "',2,'仓储费','" + outFee.TRUCKNAME_OUT + "','单票','" + outFee.GOODSOUTFEEAP_OUT + "',1,'" + outFee.GOODSOUTFEEAP_OUT + "',1,'RMB',0,'PP','“出库明细单'+'" + outFee.OUTNO + "'+'”中的仓储费',0,'" + strUserID +"',getdate(),1,'" + outFee.OUTGID + "',0,0,'" + outFee.GOODSOUTFEEAP_OUT + "',0,0,'" + outFee.GOODSOUTFEEAP_OUT + "',0,'" + strUserID + "', getdate(),'" + outFee.OUTDEGID + "')"; + + " values(newid() ,'" + outFee.BSNO + "',2,'仓储费','" + outFee.TRUCKNAME_OUT + "','单票','" + outFee.GOODSOUTFEEAP_OUT + "',1,'" + outFee.GOODSOUTFEEAP_OUT + "',1,'RMB',0,'PP','“出库明细单'+'" + outFee.OUTNO + "'+'”中的仓储费',0,'" + strUserID + "',getdate(),1,'" + outFee.OUTGID + "',0,0,'" + outFee.GOODSOUTFEEAP_OUT + "',0,0,'" + outFee.GOODSOUTFEEAP_OUT + "',0,'" + strUserID + "', getdate(),'" + outFee.OUTDEGID + "')"; existVal = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, sSQL, null); } @@ -1978,15 +1981,16 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL if (outFee.ARFEE_2_OUT > 0) { sSQL = "insert into ch_fee(GID,BSNO,FEETYPE,FEENAME,CUSTOMERNAME,UNIT,UNITPRICE,QUANTITY,AMOUNT,EXCHANGERATE,CURRENCY,COMMISSIONRATE,FEEFRT,REMARK,ISADVANCEDPAY,ENTEROPERATOR,ENTERDATE,FEESTATUS,WMSOUTBSNO,LINENUM,[TAXRATE],[NOTAXAMOUNT],[TAX],[ORDERSETTLEMENT],[TAXUNITPRICE],[ORDERINVSETTLEMENT],MODIFIEDUSER,MODIFIEDTIME) " - + " values(newid() ,'" + outFee.BSNO + "',1,'过磅费','" + outFee.ARCLIENTWMSOUT + "','单票','" + outFee.ARFEE_2_OUT + "',1,'" + outFee.ARFEE_2_OUT + "',1,'RMB',0,'PP','“出库明细单'+'" + outFee.OUTNO + "'+'”中的过磅费',0,'" + strUserID +"',getdate(),1,'" + outFee.OUTGID + "',0,0,'" + outFee.ARFEE_2_OUT + "',0,0,'" + outFee.ARFEE_2_OUT + "',0,'" + strUserID + "', getdate())"; + + " values(newid() ,'" + outFee.BSNO + "',1,'过磅费','" + outFee.ARCLIENTWMSOUT + "','单票','" + outFee.ARFEE_2_OUT + "',1,'" + outFee.ARFEE_2_OUT + "',1,'RMB',0,'PP','“出库明细单'+'" + outFee.OUTNO + "'+'”中的过磅费',0,'" + strUserID + "',getdate(),1,'" + outFee.OUTGID + "',0,0,'" + outFee.ARFEE_2_OUT + "',0,0,'" + outFee.ARFEE_2_OUT + "',0,'" + strUserID + "', getdate())"; existVal = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, sSQL, null); } #endregion - - + if (!需要发送给钉钉出库审核流程的业务编号List.Exists(x => x == outFee.OUTNO)) { + 需要发送给钉钉出库审核流程的业务编号List.Add(outFee.OUTNO); + } } @@ -2019,9 +2023,26 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL #endregion } + if (ConfigurationManager.AppSettings["DingTalkAuditWMSIN"] == "true" ) + {//向钉钉发送出库审批流程 + var _r0 = new DBResult(); + _r0.OK(); + //如果是费用入账动作 且配置了钉钉审批入库 则调用向钉钉发送新建审批实例方法 + foreach (var outbsno in 需要发送给钉钉出库审核流程的业务编号List) { + var _r = DingTalkHelper.Send_WMSOUT(strUserID, outbsno); + if (!_r.Success) { + _r0.SetErrorInfo(_r.Message); + } + } + //仅用于测试解析读取钉钉审批实例内容 + //result = TestReadDingtalkInstanceinfo(); + if (!_r0.Success) { + result.Success = false; + result.Message = "发送钉钉审批失败:"+_r0.Message; + } - + } } catch (Exception) { diff --git a/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs b/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs index d7659227..6df69cc2 100644 --- a/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs +++ b/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs @@ -30,6 +30,7 @@ using Newtonsoft.Json.Linq; using sun.tools.jar.resources; using System.Data.Entity.Migrations; using AlibabaCloud.SDK.Dingtalkworkflow_1_0.Models; +using NPOI.SS.Formula.Functions; namespace DSWeb.Areas.MvcShipping.Helper { @@ -139,7 +140,7 @@ namespace DSWeb.Areas.MvcShipping.Helper { var result = new DBResult(); - DingTalk_SendAuditWork dh = new DingTalk_SendAuditWork(uid); + DingTalk_WmsInAudit dh = new DingTalk_WmsInAudit(uid); if (dh.cansend(wmsno)) { @@ -166,10 +167,40 @@ namespace DSWeb.Areas.MvcShipping.Helper return result; } + public static DBResult Send_WMSOUT(string uid, string BSNO) + { + + var result = new DBResult(); + + DingTalk_WmsOutAudit dh = new DingTalk_WmsOutAudit(uid); + + if (dh.cansend(BSNO)) + { + + result = dh.MakeSendMessage(BSNO); + if (!result.Success) + { + return result; + } + + result = dh.DoSend(); + + if (result.Success) + { + + } + } + else + { + result.SetErrorInfo("该业务已发送"); + } + + return result; + } } - + public class DingTalkSendHelper { public DingTalkSendHelper() { } @@ -238,7 +269,9 @@ namespace DSWeb.Areas.MvcShipping.Helper if (jsonObj != null) { + BasicDataRefDAL.SaveLog("url:" + url+ "header:" +JsonConvert.SerializeObject(HeaderDic)+" body:"+ JsonConvert.SerializeObject(jsonObj),"","钉钉审核","发出"); resp=WebRequestHelper.DoPost_Header(url, HeaderDic, jsonObj); + BasicDataRefDAL.SaveLog(resp, "", "钉钉审核", "返回"); } else { resp=WebRequestHelper.DoPost_Header(url, HeaderDic); @@ -313,9 +346,11 @@ namespace DSWeb.Areas.MvcShipping.Helper public class DingTalk_SendAuditWork : DingTalkSendHelper { public string BSNO { get; set; } + public DingTalk_SendAuditWork() + { + } public DingTalk_SendAuditWork(string uid) { - this.uid = uid; getUser(); } @@ -366,7 +401,63 @@ namespace DSWeb.Areas.MvcShipping.Helper return true; } - public DBResult MakeSendMessage(string wmsno) + public virtual DBResult MakeSendMessage(string wmsno) + { + var result = new DBResult(); + + return result; + } + + public class DingTalk_SendAuditResult { + public string instanceId { get; set; } + } + + public DBResult DoSend() { + var result = base.DoSend_Header(); + + if (result.Success) { + try + { + var jo = new DingTalk_SendAuditResult(); + + jo = (DingTalk_SendAuditResult)JsonToObject(result.Data.ToString(), jo); + + var dic = new Dictionary(); + dic.Add("instanceId", jo.instanceId); + + BasicDataRefDAL.SaveLogicInfo(BSNO, "钉钉审批", dic); + }catch(Exception ex) + { + + } + } + + return result; + } + } + + public class DingTalk_WmsInAudit : DingTalk_SendAuditWork + { + + public DingTalk_WmsInAudit(string uid) + { + this.uid = uid; + getUser(); + } + //public bool cansend(string GID) + //{ + + // //看是否已发过 + // var logiclog = BasicDataRefDAL.GetLogicInfo(GID, "钉钉审批"); + + // if (logiclog.Count > 0) + // { + // return false; + // } + // return true; + //} + + public override DBResult MakeSendMessage(string wmsno) { var result = new DBResult(); @@ -394,8 +485,8 @@ namespace DSWeb.Areas.MvcShipping.Helper //获取用户的钉钉id var dtc = new DingTalkContext(); - - body.approvers.Add(new DingTalkForm_approvers("OR", new List { user.DingTalkAccount })); + //20230116 改为不指定审核人 完全依照审核流程自身的安排 + //body.approvers.Add(new DingTalkForm_approvers("OR", new List { "5620105362687730" })); body.microappAgentId = dp.agentid;// @@ -427,18 +518,28 @@ namespace DSWeb.Areas.MvcShipping.Helper 入库信息list.Add(newrk); - if (车队list != null && 车队list.Exists(x => x.GID == item.CHEDUIID)) - { + //if (车队list != null && 车队list.Exists(x => x.GID == item.CHEDUIID)) + //{ - var 车队 = 车队list.First(x => x.GID == item.CHEDUIID); - var newcl = new List{ - new DingTalkFormField("车队", 车队.SHORTNAME), - new DingTalkFormField("车牌号", item.TRUCKNO) - }; - 车队信息list.Add(newcl); - } + // var 车队 = 车队list.First(x => x.GID == item.CHEDUIID); + // var newcl = new List{ + // new DingTalkFormField("车队", 车队.SHORTNAME), + // new DingTalkFormField("车牌号", item.TRUCKNO) + // }; + // 车队信息list.Add(newcl); + //} } + + + + //var newcl = new List{ + // new DingTalkFormField("车队", "青岛众盈"), + // new DingTalkFormField("车牌号", "车牌号") + // }; + //车队信息list.Add(newcl); + + var 入库信息 = new DingTalkFormField("入库信息", JsonConvert.SerializeObject(入库信息list)); var 车队信息 = new DingTalkFormField("车队信息", JsonConvert.SerializeObject(车队信息list)); @@ -464,19 +565,209 @@ namespace DSWeb.Areas.MvcShipping.Helper result.OK(); return result; } - catch (Exception e) { - return result.SetErrorInfo(e.Message ); + catch (Exception e) + { + return result.SetErrorInfo(e.Message); } } - public class DingTalk_SendAuditResult { - public string instanceId { get; set; } + + + public DBResult DoSend() + { + var result = base.DoSend_Header(); + + if (result.Success) + { + try + { + var jo = new DingTalk_SendAuditResult(); + + jo = (DingTalk_SendAuditResult)JsonToObject(result.Data.ToString(), jo); + + var dic = new Dictionary(); + dic.Add("instanceId", jo.instanceId); + + BasicDataRefDAL.SaveLogicInfo(BSNO, "钉钉审批", dic); + } + catch (Exception ex) + { + + } + } + + return result; } + } + public class DingTalk_WmsOutAudit : DingTalk_SendAuditWork + { - public DBResult DoSend() { + public DingTalk_WmsOutAudit(string uid) + { + this.uid = uid; + getUser(); + } + + + public override DBResult MakeSendMessage(string bsno) + { + var result = new DBResult(); + + bsno = bsno.Replace("'", ""); + + try + { + + if (string.IsNullOrWhiteSpace(user.DingTalkAccount)) + { + return result.SetErrorInfo("请配置用户的钉钉id"); + } + + BSNO = bsno; + + + DingTalk_OAAuditBody body = new DingTalk_OAAuditBody(); + + var 诚锐app = DingTalkApp.GetDingTalkApp("诚锐东胜对接"); + + var dp = 诚锐app.GetProcess("诚锐出货通知"); + + body.deptId = dp.deptid;// + //获取用户的钉钉id + var dtc = new DingTalkContext(); + + + //body.approvers.Add(new DingTalkForm_approvers("OR", new List { user.DingTalkAccount })); + body.microappAgentId = dp.agentid;// + + + body.originatorUserId = user.DingTalkAccount; + body.processCode = dp.processCode; + + var cdc = new CommonDataContext(); + var wmsout = cdc.wms_out.First(p => p.BSNO == BSNO); + var wmsoutdetailList = cdc.wms_out_detail.Where(x => x.OUTBSNO == BSNO).ToList(); + + var 出库信息list = new List>(); + var 车辆信息list = new List>(); + + var 待添加车辆信息=new List(); + + var ingidlist= wmsoutdetailList.Select(s=>s.ASSOCIATEDNO).ToList(); + var 对应入库wmsList = cdc.wms.Where(x => ingidlist.Contains(x.GID)).ToList(); + var 对应入库wmsinList = cdc.wms_in.Where(x => ingidlist.Contains(x.ASSOCIATEDNO)).ToList(); + + + foreach (var item in wmsoutdetailList) + { + var 对应入库wms = 对应入库wmsList.First(x => x.GID == item.ASSOCIATEDNO); + + var 对应入库wmsin = new wms_in_md(); + + if (item.ASSOCIATEDNO == item.INBSNO) + { + //整体出库 明细取第一条即可 + 对应入库wmsin = 对应入库wmsinList.First(x => x.ASSOCIATEDNO == item.ASSOCIATEDNO); + } + else { + //明细出库 取具体条目 + 对应入库wmsin= 对应入库wmsinList.First(x => x.GID == item.INBSNO); + } + + //重量和尺码 都来自出库量字段GOODSPFSL 填充重量还是尺码 决定于chargeunit + + var 重量 = 0M; + var 尺码 = 0M; + + if (对应入库wms.CHARGEUNIT == "吨" || 对应入库wms.CHARGEUNIT == "千克") { + 重量 = item.GOODSPFSL == null?0M:(decimal)item.GOODSPFSL; + } + if (对应入库wms.CHARGEUNIT == "CBM") + { + 尺码 = item.GOODSPFSL == null ? 0M : (decimal)item.GOODSPFSL; + } + + var newrk = new List + { + + new DingTalkFormField("提单号", 对应入库wms.BLNO), + //new DingTalkFormField("箱号", 对应入库wmsin.CNTRNO), + new DingTalkFormField("品名", item.GOODSNAME), + new DingTalkFormField("重量", 重量.ToString()), + new DingTalkFormField("件数", item.GOODSPACKPFSL.ToString()), + new DingTalkFormField("尺码", 尺码.ToString()), + new DingTalkFormField("库位", string.IsNullOrWhiteSpace(对应入库wmsin.AREANAME.ToString())?"无":对应入库wmsin.AREANAME.ToString()) + }; + + 出库信息list.Add(newrk); + + if (待添加车辆信息.Exists(x => x.TRUCKNO == item.TRUCKNO)) { + if (待添加车辆信息.Exists(x => x.TRUCKNO == item.TRUCKNO && (x.DRIVERIDCARD != null && x.DRIVERIDCARD != ""))) + { + + } + else { + 待添加车辆信息.First(x => x.TRUCKNO == item.TRUCKNO).DRIVERIDCARD = item.DRIVERIDCARD; + } + } + else { + 待添加车辆信息.Add(item); + } + } + + if (待添加车辆信息!=null && 待添加车辆信息.Count>0) + { + foreach(var item in 待添加车辆信息) { + + var newcl = new List{ + + new DingTalkFormField("车牌号", item.TRUCKNO), + new DingTalkFormField("司机姓名", item.DRIVERIDCARD) + }; + 车辆信息list.Add(newcl); + } + } + + var 出库信息 = new DingTalkFormField("出库信息", JsonConvert.SerializeObject(出库信息list)); + var 车辆信息 = new DingTalkFormField("车辆信息", JsonConvert.SerializeObject(车辆信息list)); + + body.formComponentValues = new List + { + //new DingTalkFormField("提单号", "123123") + //增加字段内容 + new DingTalkFormField("客户名称", wmsout.CUSTOMERNAME), + new DingTalkFormField("出库日期", ((DateTime)wmsout.DODATE).ToString("yyyy-MM-dd")), + 出库信息, + 车辆信息 + }; + + + jsonObj = body; + + token = MemoryCache.Default[DingTalkTokenJob.DingTalkAccessTokenStoreKey].ToString(); + url = $"https://api.dingtalk.com/v1.0/workflow/processInstances"; + HeaderDic = new Dictionary + { + { "x-acs-dingtalk-access-token", token } + }; + + result.OK(); + return result; + } + catch (Exception e) + { + return result.SetErrorInfo(e.Message); + } + } + + + + public DBResult DoSend() + { var result = base.DoSend_Header(); - if (result.Success) { + if (result.Success) + { try { var jo = new DingTalk_SendAuditResult(); @@ -487,7 +778,8 @@ namespace DSWeb.Areas.MvcShipping.Helper dic.Add("instanceId", jo.instanceId); BasicDataRefDAL.SaveLogicInfo(BSNO, "钉钉审批", dic); - }catch(Exception ex) + } + catch (Exception ex) { } @@ -1011,6 +1303,14 @@ namespace DSWeb.Areas.MvcShipping.Helper { return new DingTalkProcess(); } + + public void Getappinfo(ref DingTalkProcess process) { + process.token = token; + process.aes_key = aes_key; + process.appkey = appkey; + process.agentid = agentid; + process.deptid = deptid; + } } @@ -1024,20 +1324,21 @@ namespace DSWeb.Areas.MvcShipping.Helper deptid = 809181118; } - public static DingTalkProcess GetDingTalkProcess(string processname) + public override DingTalkProcess GetProcess(string processname) { var result = new DingTalkProcess(); if (processname == "测试入货通知") { result = new DingTalkProcess_测试入货通知(processname); + Getappinfo(ref result); return result; } return result; } - public static DingTalkProcess GetDingTalkProcessByProcessCode(string processCode) + public override DingTalkProcess GetDingTalkProcessByProcessCode(string processCode) { var processdic = new Dictionary { { "PROC-0DC40EA2-E9D2-4917-A597-AD77EC055C49","测试入货通知"} @@ -1045,7 +1346,7 @@ namespace DSWeb.Areas.MvcShipping.Helper if (processdic.ContainsKey(processCode)) { - return GetDingTalkProcess(processdic[processCode]); + return GetProcess(processdic[processCode]); } else { return new DingTalkProcess(); } } @@ -1062,27 +1363,35 @@ namespace DSWeb.Areas.MvcShipping.Helper deptid = 432400353; } - public static DingTalkProcess GetDingTalkProcess(string processname) + public override DingTalkProcess GetProcess(string processname) { var result = new DingTalkProcess(); if (processname == "诚锐入货通知") { result = new DingTalkProcess_诚锐入库(processname); + Getappinfo(ref result); + return result; + } + if (processname == "诚锐出货通知") + { + result = new DingTalkProcess_诚锐出库(processname); + Getappinfo(ref result); return result; } return result; } - new public static DingTalkProcess GetDingTalkProcessByProcessCode(string processCode) + new public DingTalkProcess GetDingTalkProcessByProcessCode(string processCode) { var processdic = new Dictionary { - { "PROC-0888A19C-0562-42AC-A9C6-24E4C4398410","诚锐入货通知"} + { "PROC-0888A19C-0562-42AC-A9C6-24E4C4398410","诚锐入货通知"}, + { "PROC-7F3CA810-FB06-4E59-867F-49C42BFC25FB","诚锐出货通知"} }; if (processdic.ContainsKey(processCode)) { - return GetDingTalkProcess(processdic[processCode]); + return GetProcess(processdic[processCode]); } else { return new DingTalkProcess(); } } @@ -1163,6 +1472,27 @@ namespace DSWeb.Areas.MvcShipping.Helper return callbackinfo.ReadDingtalkInstanceinfo(); } } + public class DingTalkProcess_诚锐出库 : DingTalkProcess + { + public DingTalkProcess_诚锐出库(string processname) + { + this.processname = processname; + + //token = "CWhvNvfyuNf9D8halMs5PyHV70CrFx3E"; + //aes_key = "O5u6L8YnUaucnC8FyFNMeMeGE5uoYSAGFGdg3rOHftt"; + //appkey = "dingkt5caipnn4fbuqsf"; + //agentid = 2365401074; + + processCode = "PROC-7F3CA810-FB06-4E59-867F-49C42BFC25FB"; + + } + + //public override DBResult DoDeal() + //{ + // //return new DBResult(); + // //return callbackinfo.ReadDingtalkInstanceinfo(); + //} + } #endregion } \ No newline at end of file From 38a8dd87174427528cfa940c9fece3a196e13182 Mon Sep 17 00:00:00 2001 From: ddlucky Date: Tue, 17 Jan 2023 13:33:17 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=8D=A3=E5=9C=A3=E8=BE=BE=E6=B3=9B?= =?UTF-8?q?=E5=BE=AEOA=E5=AF=B9=E6=8E=A5=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9oa=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E5=A4=84=E7=90=86=EF=BC=9B=E5=8F=91=E9=80=81=E6=97=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8F=96=E9=83=A8=E9=97=A8id=E5=86=99=E9=81=93sqbm?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DSWeb.Common/DB/OtherDBModel.cs | 3 +- .../Chfee_PayapplicationDAL.cs | 2 +- DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs | 37 ++++++++++++++----- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/DSWeb.Common/DB/OtherDBModel.cs b/DSWeb.Common/DB/OtherDBModel.cs index 12f34b45..05ddd4fc 100644 --- a/DSWeb.Common/DB/OtherDBModel.cs +++ b/DSWeb.Common/DB/OtherDBModel.cs @@ -19,7 +19,8 @@ namespace DSWeb.Common.DB public int id { get; set; } public string loginid { get; set; } public string lastname { get; set; } - + public int departmentid { get; set; } + public int subcompanyid1 { get; set; } } /// diff --git a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs index fdcfec26..40779858 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs @@ -2459,7 +2459,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication } else { - var requestid = result.Data.ToString(); + var requestid = _r.Data.ToString(); var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO"); cmdupdate.Parameters.Clear(); diff --git a/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs b/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs index 3c9800dd..d833023a 100644 --- a/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs @@ -1068,11 +1068,11 @@ namespace DSWeb.Areas.CommMng.DAL public List fieldValue { get; set; } } - public static ArrayList GetMainData(ChPayapplication headdata, string userid, string username, string compoanyid) { + public static ArrayList GetMainData(ChPayapplication headdata, string userid, string username, string compoanyid,int deptid) { var result = new ArrayList(); result.add(new Field("sqr", headdata.APPLICANTNAME)); - result.add(new Field("sqbm", headdata.APPLICANTDEPT)); + result.add(new Field("sqbm", deptid.ToString()));//headdata.APPLICANTDEPT var applytimestr = headdata.APPLYTIME == null ? "" : ((DateTime)(headdata.APPLYTIME)).ToString("yyyy-MM-dd HH:mm:ss"); result.add(new Field("lcbh", headdata.BILLNO)); result.add(new Field("bz", headdata.REMARK)); @@ -1224,12 +1224,14 @@ namespace DSWeb.Areas.CommMng.DAL var FanWeidc = new OtherDB(fanweiconnstr); - var fwuser = FanWeidc.view_hrmresource.Where(x => x.lastname == _user.SHOWNAME).ToList(); + var oaname = _user.SHOWNAME.Trim().Replace(" ", ""); + + var fwuser = FanWeidc.view_hrmresource.Where(x => x.lastname == oaname).ToList(); if (fwuser == null || fwuser.Count <= 0) { - result.SetErrorInfo($"用户[{_user.SHOWNAME}]在OA系统中不存在"); + result.SetErrorInfo($"用户[{oaname}]在OA系统中不存在"); return result; } else @@ -1249,7 +1251,7 @@ namespace DSWeb.Areas.CommMng.DAL { "userid", _userid_m } }; - var maindata = GetMainData(headdata, userid, username, companyid); + var maindata = GetMainData(headdata, userid, username, companyid, fwuser[0].departmentid); var detaildata = GetDetailData(headdata); @@ -1274,15 +1276,27 @@ namespace DSWeb.Areas.CommMng.DAL }; //var jsonstr=JsonConvert.Serialize(sendobj).Replace("\r\n",""); - + BasicDataRefDAL.SaveLog("url:" + Url + ";dic:" + JsonConvert.Serialize(dic) + ";valuedic:" + JsonConvert.Serialize(valuedic) + ,"","泛微OA","发送" + ); var rtn = WebRequestHelper.DoPost_Header(Url, dic, valuedic); - + BasicDataRefDAL.SaveLog(rtn , "", "泛微OA", "返回" ); try { _res = JsonConvert.Deserialize(rtn); - result.Data = _res.data.requestid; - result.OK("发送成功"); + if (_res.code.Contains("ERROR")) { + + var bottom= Regex.Replace(_res.reqFailMsg.msgInfo.bottom, @"\<[^\<]*\>", ""); + var detail = Regex.Replace(_res.reqFailMsg.msgInfo.detail, @"\<[^\<]*\>", ""); + + result.SetErrorInfo(JsonConvert.Serialize( _res.reqFailMsg.msgInfo.title+":" + bottom + "\r\n\r\n" + detail)); + } + else + { + result.Data = _res.data.requestid; + result.OK("发送成功"); + } //要记录requestid @@ -1370,6 +1384,11 @@ namespace DSWeb.Areas.CommMng.DAL public class MsgInfo { + public string prompttype { get; set; } + public string bottom { get; set; } + public string detail { get; set; } + public string title { get; set; } + } public class OtherParams From 74c969f886171c60401d4b3fef3674c55d08e7ec Mon Sep 17 00:00:00 2001 From: ddlucky Date: Tue, 17 Jan 2023 16:32:39 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=8D=A3=E5=9C=A3=E8=BE=BE=E6=B3=9B?= =?UTF-8?q?=E5=BE=AEOA=E5=AF=B9=E6=8E=A5=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E4=BA=9B=E5=AD=97=E6=AE=B5=E7=9A=84=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=EF=BC=9B=E7=94=B3=E8=AF=B7=E4=BA=BA=E5=92=8C=E4=BB=98?= =?UTF-8?q?=E6=AC=BE=E5=AF=B9=E8=B1=A1=E6=94=B9=E4=B8=BA=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E5=AF=B9=E6=96=B9=E6=8F=90=E4=BE=9B=E7=9A=84=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E4=B8=AD=E7=9A=84ID=EF=BC=8C=E5=AF=B9=E5=BA=94=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E4=BE=9D=E7=85=A7user.showname=E5=92=8Cinfo=5Fclient.?= =?UTF-8?q?description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DSWeb.Common/DB/OtherDB.cs | 2 + DSWeb.Common/DB/OtherDBModel.cs | 24 +++++++++ DSWeb.Service.Output/JobFanWeiToDS7.cs | 1 + DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs | 69 +++++++++++++++---------- 4 files changed, 69 insertions(+), 27 deletions(-) diff --git a/DSWeb.Common/DB/OtherDB.cs b/DSWeb.Common/DB/OtherDB.cs index f58904cf..67160b30 100644 --- a/DSWeb.Common/DB/OtherDB.cs +++ b/DSWeb.Common/DB/OtherDB.cs @@ -22,6 +22,8 @@ namespace DSWeb.Common.DB public DbSet view_hrmresource { get; set; } public DbSet view_pjrequestbas { get; set; } + public DbSet view_xdf { get; set; } + } diff --git a/DSWeb.Common/DB/OtherDBModel.cs b/DSWeb.Common/DB/OtherDBModel.cs index 05ddd4fc..134622ab 100644 --- a/DSWeb.Common/DB/OtherDBModel.cs +++ b/DSWeb.Common/DB/OtherDBModel.cs @@ -40,4 +40,28 @@ namespace DSWeb.Common.DB public string lastoperatetime { get; set; } public string currentnodetype { get; set; } } + + + [Table("view_xdf")] + + public class view_xdf_md + { + [Key] + public int id { get; set; } + public int? requestId { get; set; } + public string yxzhmc { get; set; } + public string khx { get; set; } + public string yxzh { get; set; } + public string gyskhmc { get; set; } + public int? formmodeid { get; set; } + public int? modedatacreater { get; set; } + public int? modedatacreatertype { get; set; } + public string modedatacreatedate { get; set; } + public string modedatacreatetime { get; set; } + public int? modedatamodifier { get; set; } + public string modedatamodifydatetime { get; set; } + public string form_biz_id { get; set; } + public string MODEUUID { get; set; } + public string kjry { get; set; } + } } \ No newline at end of file diff --git a/DSWeb.Service.Output/JobFanWeiToDS7.cs b/DSWeb.Service.Output/JobFanWeiToDS7.cs index f1330267..e44b157b 100644 --- a/DSWeb.Service.Output/JobFanWeiToDS7.cs +++ b/DSWeb.Service.Output/JobFanWeiToDS7.cs @@ -48,6 +48,7 @@ namespace DSWeb.Service.Output var idList = 待审核付费申请List.Select(s => s.PAYAPPID).ToList(); + //从dc1中寻找这些id的业务的审核结果 var 审核结果List = dc1.view_pjrequestbas.Where(x => x.workflowid == 79 && x.currentnodetype == "3" && idList.Contains(x.requestid.ToString())).ToList(); diff --git a/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs b/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs index d833023a..8e0a969a 100644 --- a/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs @@ -1068,45 +1068,50 @@ namespace DSWeb.Areas.CommMng.DAL public List fieldValue { get; set; } } - public static ArrayList GetMainData(ChPayapplication headdata, string userid, string username, string compoanyid,int deptid) { + public static ArrayList GetMainData(ChPayapplication headdata, string userid,int deptid, view_xdf_md fkdx) { var result = new ArrayList(); - result.add(new Field("sqr", headdata.APPLICANTNAME)); - result.add(new Field("sqbm", deptid.ToString()));//headdata.APPLICANTDEPT - var applytimestr = headdata.APPLYTIME == null ? "" : ((DateTime)(headdata.APPLYTIME)).ToString("yyyy-MM-dd HH:mm:ss"); - result.add(new Field("lcbh", headdata.BILLNO)); - result.add(new Field("bz", headdata.REMARK)); - result.add(new Field("fkdx", headdata.CUSTOMERNAME)); + result.add(new Field("sqr", userid));//申请人 改用ID + result.add(new Field("sqbm", deptid.ToString()));//申请部门 改用申请人部门ID + var applytimestr = headdata.APPLYTIME == null ? DateTime.Now.ToString("yyyy-MM-dd") : ((DateTime)(headdata.APPLYTIME)).ToString("yyyy-MM-dd"); + result.add(new Field("sqrq", applytimestr));//申请日期 - var yxzh = ""; - var khx = ""; - var cdc = new CommonDataContext(); - if (!string.IsNullOrWhiteSpace(headdata.CUSTACCOUNTGID)) { - var custbank = cdc.info_client_bank.FirstOrDefault(x => x.GID == headdata.CUSTACCOUNTGID); + result.add(new Field("lcbh", headdata.BILLNO));//流程编号 用付费申请单号 + result.add(new Field("bz", headdata.REMARK));//备注 - yxzh = custbank.ACCOUNT; - khx = custbank.BANKNAME; + result.add(new Field("fkdx", fkdx.id.ToString()));//headdata.CUSTOMERNAME 付款对象 需使用泛微的一个ID号 - } + var cdc = new CommonDataContext(); - result.add(new Field("yxzh", yxzh)); - result.add(new Field("khx", khx)); - result.add(new Field("wtdw", headdata.BS_CUSTOMERNAME)); + //var yxzh = ""; + //var khx = ""; + //if (!string.IsNullOrWhiteSpace(headdata.CUSTACCOUNTGID)) { + // var custbank = cdc.info_client_bank.FirstOrDefault(x => x.GID == headdata.CUSTACCOUNTGID); + // yxzh = custbank.ACCOUNT; + // khx = custbank.BANKNAME; + //} + + result.add(new Field("yxzh", fkdx.yxzh));//银行账号 + result.add(new Field("khx", fkdx.khx));//开户行 + result.add(new Field("wtdw", headdata.BS_CUSTOMERNAME));//委托单位 文本 - result.add(new Field("jehj", Math.Round(headdata.AMOUNTRMB,2))); - result.add(new Field("jehjdx", Math.Round(headdata.AMOUNTRMB,2))); + result.add(new Field("jehj", Math.Round(headdata.AMOUNTRMB,2)));//金额合计 + result.add(new Field("jehjdx", Math.Round(headdata.AMOUNTRMB,2)));//金额合计大写 //result.add(new Field("jehjdx", BasicDataRefDAL.ConvertToChineseMoney2( (double)headdata.AMOUNTRMB))); - result.add(new Field("jehjmj", Math.Round(headdata.AMOUNTUSD,2))); - result.add(new Field("jehjdxmj", Math.Round(headdata.AMOUNTUSD,2))); + result.add(new Field("jehjmj", Math.Round(headdata.AMOUNTUSD,2)));//金额合计美金 + result.add(new Field("jehjdxmj", Math.Round(headdata.AMOUNTUSD,2)));//金额合计大写美金 //result.add(new Field("jehjmjdx", BasicDataRefDAL.ConvertToChineseMoney2((double)headdata.AMOUNTUSD))); - var bodymblnolist = cdc.ch_fee_do.Where(x=>x.BILLNO ==headdata.BILLNO).Select(s=>s.MBLNO).Distinct().ToList(); + 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 bodymblnostr = ""; - if (bodymblnolist != null && bodymblnolist.Count > 0) { - bodymblnostr = string.Join(" , ", bodymblnolist); + if (vopbsMblnoList != null && vopbsMblnoList.Count > 0) { + bodymblnostr = string.Join(" , ", vopbsMblnoList); } - result.add(new Field("tdh", bodymblnostr)); + result.add(new Field("tdh", bodymblnostr));//提单号 依据付款申请的ch_fee_do的bsno关联v_op_bs的MBLNO return result; } @@ -1251,7 +1256,17 @@ namespace DSWeb.Areas.CommMng.DAL { "userid", _userid_m } }; - var maindata = GetMainData(headdata, userid, username, companyid, fwuser[0].departmentid); + var 付费申请付款对象 = cdc.info_client.First(x => x.SHORTNAME == headdata.CUSTOMERNAME); + + var fxdxlist = FanWeidc.view_xdf.Where(x => x.gyskhmc == 付费申请付款对象.DESCRIPTION).ToList(); + if (fxdxlist == null || fxdxlist.Count <= 0) + { + result.SetErrorInfo($"客户[{付费申请付款对象.DESCRIPTION}]在OA系统中不存在"); + return result; + } + var fxdx = fxdxlist[0]; + + var maindata = GetMainData(headdata, _userid, fwuser[0].departmentid, fxdx); var detaildata = GetDetailData(headdata); From ca34cba5a00b1aab857895eacb480470181e3577 Mon Sep 17 00:00:00 2001 From: ddlucky Date: Tue, 17 Jan 2023 16:38:16 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B3=B0=E9=82=A6=E8=B5=84=E9=87=91?= =?UTF-8?q?=E5=8D=A0=E7=94=A8=EF=BC=8C=E6=A0=87=E5=87=86=E7=94=B1120?= =?UTF-8?q?=E5=A4=A9=E6=94=B9=E4=B8=BA90=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Areas/MvcShipping/DAL/MsRptZjTotal/MsRptZjTotalDAL.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DSWeb/Areas/MvcShipping/DAL/MsRptZjTotal/MsRptZjTotalDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsRptZjTotal/MsRptZjTotalDAL.cs index 4f21abe8..b1b727fb 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsRptZjTotal/MsRptZjTotalDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsRptZjTotal/MsRptZjTotalDAL.cs @@ -145,9 +145,7 @@ namespace DSWeb.MvcShipping.DAL.MsRptZjTotalDAL strSql.Append(",B.USDPROFIT,B.RMBPROFIT,B.OTPROFIT,B.TTLPROFIT,B.PROFITRATE,B.TAXPROFIT,B.RMBNODR,B.USDNODR,B.OTNODR,B.TTLNODR,B.RMBNOCR,B.USDNOCR,B.OTNOCR,B.TTLNOCR "); strSql.Append(",T.SETTLETIME,T.STLTTLDR MONTHSTLTTLDR");//,f.ISFEE - //该客户的 Info_Client_ACCDATE.BGNDATE (生效日期) 减 每票货的开船日期得出是否超过一年以内 - //一年以内则提成30% 一年之外为15% - //此处ACTUALDAY为ETD-帐期生效日期。大于1年则ACTUALDAY小于-365 + strSql.Append(",DATEDIFF([day],b.ETD,(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME)))+1 ACTUALDAY"); strSql.Append(",DATEDIFF([day],ISNULL(T.SETTLETIME,GETDATE()),(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME))) NODAY"); @@ -377,11 +375,11 @@ namespace DSWeb.MvcShipping.DAL.MsRptZjTotalDAL /// 向数据中加入资金占用的费用 /// /// 用于参数和返回的数据集 - /// 资金开始计算利息的天数,默认90 + /// 资金开始计算利息的天数,默认90 20230117 改为120天 /// 资金利率 默认12% /// 资金开始计算利息的天数,改为90 /// 资金利率 日利率改为万分之3 - public static void GetZJFee(ref List headList,int days=90,decimal feerate=0.12M) { + public static void GetZJFee(ref List headList,int days=120,decimal feerate=0.12M) { var cdc = new CommonDataContext(); var bsnolist = headList.Select(s => s.BSNO).Distinct().ToList();