# Conflicts:
#	DSWeb/DSWeb.csproj.user
DS7_JinGang
hanxuntao 2 years ago
commit 779f5f1259

@ -0,0 +1,109 @@
using log4net;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Net;
using MailAnalyzeTools.Common;
namespace D7MqClient
{
public class JFtoDjyBackNo
{
private static string COMPANYID = ConfigurationManager.AppSettings["COMPANYID"];
private static string MQURL = ConfigurationManager.AppSettings["DJYMQURL"];
private static string connStr = ConfigurationManager.AppSettings["ConnectionString"];
private const string ExchangeName = "booking";
private const string QueueName = "djy.booking.feedback.";
private static IConnection mqConn;
private static ILog logger = LogManager.GetLogger("D7MqClient");
public static void DoProcess()
{
logger.Debug($"启动接收大简云订舱数据回推");
var CompanyQueueName = QueueName + COMPANYID;
ConnectionFactory factory = new ConnectionFactory();
factory.Uri = new Uri(MQURL);
mqConn = factory.CreateConnection();
IModel model = mqConn.CreateModel();
model.ExchangeDeclare(ExchangeName, ExchangeType.Direct);
model.QueueDeclare(CompanyQueueName, false, false, false, null);
var consumer = new EventingBasicConsumer(model);
consumer.Received += (ch, ea) =>
{
var body = ea.Body;
var strBody = Encoding.UTF8.GetString(body.ToArray());
logger.Debug($"收到简云订舱数据回推消息:{strBody}");
try
{
//回写数据
var feeback = JsonConvert.DeserializeAnonymousType(strBody, new { FeedbackType = string.Empty, FeedbackData = new { MBLNO = string.Empty, BSNO = string.Empty, IRCode = string.Empty } });
using (SqlConnection dbcon = new SqlConnection(connStr))
{
dbcon.Open();
if (feeback.FeedbackType == "IRCode") {
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO) && !string.IsNullOrEmpty(feeback.FeedbackData.IRCode)) {
var strSql = new StringBuilder();
strSql.Append("update t_op_seae set IRCODE='"+ feeback.FeedbackData.IRCode + "' where 业务编号='" + feeback.FeedbackData.BSNO + "'");
SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon);
cmd.ExecuteNonQuery();
}
}
else if (feeback.FeedbackType == "MBLNO")
{
if (!string.IsNullOrEmpty(feeback.FeedbackData.BSNO) && !string.IsNullOrEmpty(feeback.FeedbackData.MBLNO))
{
var strSql = new StringBuilder();
strSql.Append("update t_op_seae set 主提单号='" + feeback.FeedbackData.MBLNO + "' where 业务编号='" + feeback.FeedbackData.BSNO + "' AND ISNULL(主提单号,'')='' ");
SqlCommand cmd = new SqlCommand(strSql.ToString(), dbcon);
cmd.ExecuteNonQuery();
}
}
}
}
catch (Exception ex)
{
logger.Error($"处理简云订舱数据回推时出错:" +ex.Message);
logger.Error(ex.Message);
logger.Error(ex.StackTrace);
}
};
model.BasicConsume(CompanyQueueName, true, consumer);
}
public static void StopProcess()
{
if (mqConn != null && mqConn.IsOpen)
{
mqConn.Close();
mqConn = null;
}
}
}
}

@ -507,6 +507,116 @@ namespace DSWeb.Common.DB
}
[Table("v_op_bill")]
public partial class v_op_bill_mb
{
[Key]
public string BSNO { get; set; }
public string MASTERNO { get; set; }
public string PARENTID { get; set; }
public string OPTYPE { get; set; }
public string OPLB { get; set; }
public string OPLBNAME { get; set; }
public string BSTYPE { get; set; }
public string CUSTOMERNAME { get; set; }
public string CUSTNO { get; set; }
public string ORDERNO { get; set; }
public string MBLNO { get; set; }
public string HBLNO { get; set; }
public string ETD { get; set; }
public DateTime? ETA { get; set; }
public DateTime? STLDATE { get; set; }
public string STLNAME { get; set; }
public string VESSEL { get; set; }
public string VOYNO { get; set; }
public string INPUTBY { get; set; }
public DateTime? CREATETIME { get; set; }
public int? BSSTATUS { get; set; }
public string SALE { get; set; }
public string OP { get; set; }
public string DOC { get; set; }
public string CUSTSERVICE { get; set; }
public string PORTLOAD { get; set; }
public string PORTDISCHARGE { get; set; }
public string CUSTOMNO { get; set; }
public string ACCDATE { get; set; }
public string CARRIER { get; set; }
public string BSSOURCE { get; set; }
public string BSSOURCEDETAIL { get; set; }
public string LANE { get; set; }
public string FORWARDER { get; set; }
public decimal? NETWEIGHT { get; set; }
public decimal? KGS { get; set; }
public int? TEU { get; set; }
public string CNTRTOTAL { get; set; }
public string CORPID { get; set; }
public int? CNTR1 { get; set; }
public int? CNTR2 { get; set; }
public int? CNTR3 { get; set; }
public int? CNTR4 { get; set; }
public int? CNTR5 { get; set; }
public int? CNTR6 { get; set; }
public int? CNTR7 { get; set; }
public int? CNTR8 { get; set; }
public int? CNTR9 { get; set; }
public int? CNTR10 { get; set; }
public int? OTCNTR { get; set; }
public string TRADETYPE { get; set; }
public string GOODSNAME { get; set; }
public int? FEESTATUS { get; set; }
public DateTime? OPDATE { get; set; }
public DateTime? CUSTOMDATE { get; set; }
public string ENTERP { get; set; }
public decimal? PKGS { get; set; }
public decimal? CBM { get; set; }
public string BLFRT { get; set; }
public string SALEDEPT { get; set; }
public int? CUSTOMSNUM { get; set; }
public string INVNO { get; set; }
public string BSCUSTOMNO { get; set; }
public DateTime? INSPECTIONDATE { get; set; }
public string INSPECTIONNO { get; set; }
public string CONTRACTNO { get; set; }
public string BOOKNO { get; set; }
public string AGENTID { get; set; }
public string ISPRINTPR { get; set; }
public string NUMBERPLATE { get; set; }
public decimal? FEEKGS { get; set; }
public string OPERATOR { get; set; }
public string SERVICECONTRACTNO { get; set; }
public string BLTYPE { get; set; }
public int? ISCANCEL { get; set; }
public string APPLYNO { get; set; }
public string ISSUETYPE { get; set; }
public string BLISSUESTATUS { get; set; }
public string REMARK { get; set; }
public string TRADETERM { get; set; }
public string REASON { get; set; }
public string PLACERECEIPT { get; set; }
public string DESTINATION { get; set; }
public string CNTRSEALNO { get; set; }
public int? BillFeeStatus { get; set; }
public int? ISVOU { get; set; }
public string VOUNO { get; set; }
public string SALECORPID { get; set; }
public string YARD { get; set; }
public DateTime? DELIVERYDATE { get; set; }
public string FRCUSTSERVICE { get; set; }
public string SERVICE { get; set; }
public string REMARK2 { get; set; }
public DateTime? BILLFEESTATUSTIME { get; set; }
public string TRUCKER { get; set; }
public string CUSTOMSER { get; set; }
public DateTime? CLOSINGDATE { get; set; }
public string KINDPKGS { get; set; }
public string CARGOID { get; set; }
public string DCLASS { get; set; }
public DateTime? ATD { get; set; }
public string ALLBILLNO { get; set; }
}
[Table("code_fee")]
public class code_fee_md {
@ -2133,6 +2243,20 @@ namespace DSWeb.Common.DB
public string GOODSCKQSTOCK { get; set; }
}
/// <summary>
/// 暂时只用于查询出库相关库存在入库单和入库单明细中的提单号箱号
/// </summary>
[Table("VW_WMS_OUT_DETAIL")]
public partial class VW_WMS_OUT_DETAIL_md
{
[Key]
public string GID_OUT { get; set; }
public string BLNO { get; set; }
public string CNTRNO { get; set; }
public string GOODSNAME_OUT { get; set; }
}
public static class StrHelper
{
#region 将一个dictionary转化为用;;和::隔开的文本

@ -52,8 +52,8 @@ namespace DSWeb.Common.DB
public DbSet<company_md> company { get; set; }
public DbSet<v_op_bs_mb> v_op_bs { get; set; }
public DbSet<v_op_bill_mb> v_op_bill { get; set; }
public DbSet<v_fee_do_settlement_md> v_fee_do_settlement{ get; set; }
public DbSet<v_ch_fee_settlementinfo_md> v_ch_fee_settlementinfo { get; set; }
@ -73,6 +73,7 @@ namespace DSWeb.Common.DB
public DbSet<wms_in_md> wms_in { get; set; }
public DbSet<wms_out_md> wms_out { get; set; }
public DbSet<wms_out_detail_md> wms_out_detail { get; set; }
public DbSet<VW_WMS_OUT_DETAIL_md> VW_WMS_OUT_DETAIL { get; set; }
}

@ -34,8 +34,8 @@ namespace DSWeb.Common.DB
public int requestid { get; set; }
public int workflowid { get; set; }
public string requestname { get; set; }
public int creater { get; set; }
public int lastoperator { get; set; }
public int? creater { get; set; }
public int? lastoperator { get; set; }
public string lastoperatedate { get; set; }
public string lastoperatetime { get; set; }
public string currentnodetype { get; set; }

@ -12,9 +12,9 @@
<add key="ServiceDisplayName" value="荣圣达泛微审核结果回写DS7服务" />
<!-- 服务器地址 -->
<add key="DS7connStr" value="Data Source=60.209.125.238,26600;Initial Catalog=shippingwebTEST;Persist Security Info=True;User ID=sa;Password=Ds20040201" />
<add key="DS7connStr" value="Data Source=115.29.138.217,18866;Initial Catalog=ShippingWeb;Persist Security Info=True;User ID=sa;Password=Asde875621" />
<add key="OAconnStr" value="Data Source=117.78.44.211,1433;Initial Catalog=ecology;Persist Security Info=True;User ID=OA01;Password=oa123456@" />
<add key="DS7URL" value="http://localhost:10202/Account/Chfee_payapplication/AuditListAcceptOA" />
<add key="DS7URL" value="http://115.29.138.217:8090/Account/Chfee_payapplication/AuditListAcceptOA" />
</appSettings>
<connectionStrings>

@ -2,12 +2,14 @@
using DSWeb.Common.DB;
using DSWeb.Common.Helper;
using log4net;
using log4net.Repository.Hierarchy;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Quartz;
using RabbitMQ.Client;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Linq;
using System.Runtime.Caching;
@ -32,10 +34,14 @@ namespace DSWeb.Service.Output
public void Execute(IJobExecutionContext context)
{
//int reqTimeout = Convert.ToInt32(context.JobDetail.JobDataMap.GetString("RequestTimeout"));
try
{
log.Debug("Execute start");
//int reqTimeout = Convert.ToInt32(context.JobDetail.JobDataMap.GetString("RequestTimeout"));
int reqTimeout = Convert.ToInt32(context.JobDetail.JobDataMap.GetString("RequestTimeout"));
var dc1 = new OtherDB(OAconnStr);
@ -48,7 +54,7 @@ namespace DSWeb.Service.Output
var idList = List.Select(s => s.PAYAPPID).ToList();
log.Info(idList.ToList());
//从dc1中寻找这些id的业务的审核结果
var List = dc1.view_pjrequestbas.Where(x => x.workflowid == 79 && x.currentnodetype == "3" && idList.Contains(x.requestid.ToString())).ToList();
@ -59,8 +65,10 @@ namespace DSWeb.Service.Output
SetAudit(dc1, cdc, DS7URL, item);
}
//将审核完成的更新至cdc中的业务中
//update ch_fee_payapplication set BILLSTATUS=0,AUDITUSER='" + USERID + "',AUDITTIME='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' where BILLNO=@BILLNO");
log.Debug("Execute end");
}
catch (Exception ex)
{
@ -70,29 +78,62 @@ namespace DSWeb.Service.Output
}
}
private void SetAudit(OtherDB dc1, CommonDataContext cdc, string DS7URL, view_pjrequestbas_md Audititem)
public void DoWork()
{
//根据oa系统的userid查找ds7系统的userid
var dc1 = new OtherDB(OAconnStr);
var cdc = new CommonDataContext(DS7connStr);
var OAUser = dc1.view_hrmresource.FirstOrDefault(x => x.id == Audititem.lastoperator);
//从cdc中寻找待读取审核结果的业务
var List = cdc.ch_fee_payapplication.Where(x => x.BILLSTATUS == 2 && x.PAYAPPID != null && x.PAYAPPID != "").ToList();
var ds7user = cdc.VW_user.Where(x => x.SHOWNAME == OAUser.lastname).ToList();
if (List == null || List.Count <= 0) return;
//var ds7user = cdc.VW_user.Where(x => x.SHOWNAME == "系统管理员").ToList();
var idList = List.Select(s => s.PAYAPPID).ToList();
if (ds7user != null && ds7user.Count > 0)
log.Debug(idList.ToList());
//从dc1中寻找这些id的业务的审核结果
var List = dc1.view_pjrequestbas.Where(x => x.workflowid == 79 && x.currentnodetype == "3" && idList.Contains(x.requestid.ToString())).ToList();
//var AuditGidlistStr = "";
foreach (var item in List)
{
var userid = ds7user[0].USERID;
SetAudit(dc1, cdc, DS7URL, item);
}
var dic = new Dictionary<string, string> {
}
private void SetAudit(OtherDB dc1, CommonDataContext cdc, string DS7URL, view_pjrequestbas_md Audititem)
{
try
{
//根据oa系统的userid查找ds7系统的userid
log.Debug("audit start");
var OAUser = dc1.view_hrmresource.FirstOrDefault(x => x.id == Audititem.lastoperator);
var ds7user = cdc.VW_user.Where(x => x.SHOWNAME.Replace(" ","") == OAUser.lastname).ToList();
//var ds7user = cdc.VW_user.Where(x => x.SHOWNAME == "系统管理员").ToList();
if (ds7user != null && ds7user.Count > 0)
{
var userid = ds7user[0].USERID;
var dic = new Dictionary<string, string> {
{ "requestid",Audititem.requestid.ToString()},
{ "userid",userid}
};
log.Debug("url=" + DS7URL+";dic="+JsonConvert.SerializeObject(dic));
string rtn = WebRequestHelper.DoPost(DS7URL, dic, 12000);
string rtn = WebRequestHelper.DoPost(DS7URL, dic, 12000);
log.Debug("rtn=" + rtn);
log.Debug("rtn=" + rtn);
}
log.Debug("audit end");
}
catch (Exception e) {
log.Error(e.Message);
}
}

@ -717,7 +717,7 @@ namespace DSWeb.Areas.Account.Controllers
var bodyList = ChpayapplicationDAL.GetDataList(0, 9999, " cm.payappid in("+ requestid + ")", userid);
DBResult result = ChpayapplicationDAL.AuditList(bodyList, Convert.ToString(Session["USERID"]));
DBResult result = ChpayapplicationDAL.AuditList(bodyList, userid);
if (result.Message2 == "1")
{
var PAYAUDITAUTOCLOSEDR = MsSysParamSetDAL.GetData("PARAMNAME='PAYAUDITAUTOCLOSEDR'");

@ -2372,6 +2372,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
{
var result = new DBResult();
T_ALL_DA T_ALL_DA = new T_ALL_DA();
Database db = DatabaseFactory.CreateDatabase();
using (var conn = db.CreateConnection())
@ -2412,7 +2413,36 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
Resultmb WorkResult = WorkFlowDAL.WorkFlowStart(WorkFlowName, bill, USERID,bill, bill,"", WorkFlowid);
#region 测试逻辑
/*
if (true)
{
if (ConfigurationManager.AppSettings["FanWeiOAAPI"] == "true")
{
var _r = FanWeiOA_Submit(headdata, USERID, usercode, companyid);
if (!_r.Success)
{
tran.Rollback();
result.Success = false;
result.Message = $"提交审核错误[{_r.Message}],请重试或联系系统管理员";
return result;
}
else
{
var requestid = _r.Data.ToString();
var cmdupdate = db.GetSqlStringCommand("update ch_fee_payapplication set PAYAPPID='" + requestid + "' where BILLNO=@BILLNO");
cmdupdate.Parameters.Clear();
db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill);
db.ExecuteNonQuery(cmdupdate, tran);
}
}
}
return result;
*/
#endregion
if (WorkResult.Success == true)
{
@ -3137,6 +3167,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
result.Success = false;
result.Message = "审核出现错误,请重试或联系系统管理员"+e.Message;
BasicDataRefDAL.SaveLog(result.Message, "", "付费申请审核", "错误");
return result;
}

@ -20,6 +20,8 @@ using DSWeb.Areas.MvcShipping.Models.Message.VGM;
using DSWeb.Areas.MvcShipping.Helper;
using HcUtility.Comm;
using DSWeb.MvcShipping.DAL.MsSysParamSet;
using NPOI.SS.Formula.Functions;
using sun.security.krb5.@internal.crypto;
namespace DSWeb.Areas.CommMng.Controllers
{
@ -324,22 +326,31 @@ namespace DSWeb.Areas.CommMng.Controllers
public string Test_DingdingCallback(string text)
{
var result = "";
try {
var _r = new DBResult();
var = DingTalkApp.GetDingTalkApp("诚锐东胜对接");
var appname = MsSysParamSetDAL.GetSysParamValue("DingTalkAppName");
//var 钉钉应用 = DingTalkApp.GetDingTalkApp("诚锐东胜对接");
var = DingTalkApp.GetDingTalkApp(appname);
//钉钉应用=DingTalkProcess.GetDingTalkProcessByProcessCode(callbackinfo.processCode);
//实例化钉钉解密类构造参数为对应的 应用中的token、aes_key、AppKey值
DingTalkEncryptor dingTalkEncryptor = new DingTalkEncryptor(.token, .aes_key, .appkey);
//定义字符串接收解密后的值
//JeffSoft.Logger.Error("dingTalkEncryptor.getDecryptMsg:" + text + "");
BasicDataRefDAL.SaveLog(text, "admin", "钉钉回调", "测试1");
var callbackinfo = JsonConvert.Deserialize<CallBackInfo>(text);
var = .GetDingTalkProcessByProcessCode(callbackinfo.processCode);
.SaveCallBack(callbackinfo);
//var objRtn2 = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(text.ToString(), new { EventType = "" });
//var _jsstr = JsonConvert.Serialize(objRtn2);
.SaveCallBack(callbackinfo);
//BasicDataRefDAL.SaveLog(_jsstr, "admin", "钉钉回调", "保存2");
//取出事件类型字段
//JeffSoft.Logger.Error("DingdingCallback Success,EventType:" + EventType + "");
//第二部分
// { //判断事件类型是否是日程事件
if ("bpms_instance_change" == callbackinfo.EventType)
{
@ -361,8 +372,14 @@ namespace DSWeb.Areas.CommMng.Controllers
var data = Newtonsoft.Json.JsonConvert.SerializeObject(_r);
return data;
}
catch(Exception ex)
{
return data;
return ex.Message;
}
}
public class CallBackInfo

@ -44,7 +44,7 @@ using DSWeb.MvcShipping.Models.MsOpSeae;
using DSWeb.MvcShipping.DAL.MsOpSeaeDAL;
using Aspose.Cells.Drawing;
using DSWeb.MvcShipping.Models.MsOp_BLISSUE;
using System.Data.Entity.Migrations;
namespace DSWeb.Areas.CommMng.DAL
{
@ -4925,7 +4925,11 @@ namespace DSWeb.Areas.CommMng.DAL
if (infoList != null && infoList.Count > 0)
{
infoList[0].PROPVALUE = DicToStr(InfoDic);
var updrec = infoList[0];
updrec.PROPVALUE = DicToStr(InfoDic);
cdc.OP_LOGICINFO.AddOrUpdate(updrec);
cdc.SaveChanges();
}
else
{
@ -6395,10 +6399,11 @@ namespace DSWeb.Areas.CommMng.DAL
var ruleresult = JsonConvert.Deserialize<RulesEngineResult_Root>(rtn);
var msg = "";
foreach (var detail in ruleresult.extra.detailList) {
msg += detail.resultName+"\r\n";
}
//var msg = "";
//foreach (var detail in ruleresult.extra.detailList) {
// msg += detail.resultName+"\r\n";
//}
result.Data = ruleresult;
result.OK("校验完成");
return result;
@ -6493,7 +6498,7 @@ namespace DSWeb.Areas.CommMng.DAL
bi.service = head.SERVICE;
bi.marks = head.MARKS;
bi.hsCode = head.HSCODE;
bi.goodsDescription = head.GOODSNAME;
bi.goodsDescription = head.DESCRIPTION;
bi.pkGs = GetInt(head.PKGS);
bi.kindPKGs = head.KINDPKGS;
bi.kGs = GetInt(head.KGS);
@ -6622,7 +6627,8 @@ namespace DSWeb.Areas.CommMng.DAL
if (!string.IsNullOrWhiteSpace(head.PORTDISCHARGEID)) {
bi.portDischargeCountryNo = head.PORTDISCHARGEID.Substring(0, 2);
if (head.PORTDISCHARGEID.Length >= 2)
bi.portDischargeCountryNo = head.PORTDISCHARGEID.Substring(0, 2);
var dischargecountry = cdc.code_country.FirstOrDefault(x => x.COUNTRYID == bi.portDischargeCountryNo);
if (dischargecountry != null) {
@ -6634,8 +6640,8 @@ namespace DSWeb.Areas.CommMng.DAL
if (!string.IsNullOrWhiteSpace(head.TRANSPORT))
{
bi.transportCountryNo = head.TRANSPORT.Substring(0, 2);
if(head.TRANSPORT.Length>=2)
bi.transportCountryNo = head.TRANSPORT.Substring(0, 2);
var transportcountry = cdc.code_country.FirstOrDefault(x => x.COUNTRYID == bi.transportCountryNo);
if (transportcountry != null)

@ -63,6 +63,9 @@ using System.ServiceModel.Configuration;
using java.util;
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;
namespace DSWeb.Areas.CommMng.DAL
{
@ -1044,7 +1047,41 @@ namespace DSWeb.Areas.CommMng.DAL
public string token { get; set; }
}
public class fj {
public string filePath { get; set; }
public string fileName { get; set; }
public fj() { }
public fj(ChfeeFile chfeefile) {
//系统参数
var paramset = MsSysParamSetDAL.GetDataByName("DS7URL");
if (!string.IsNullOrWhiteSpace(chfeefile.File_Path) && chfeefile.File_Path.IndexOf("\\Areas\\") >= 0) {
var oldfilePath = chfeefile.File_Path.Substring(chfeefile.File_Path.IndexOf("\\Areas\\"), chfeefile.File_Path.Length - chfeefile.File_Path.IndexOf("\\Areas\\")).Replace("\\","/");
filePath = (paramset.PARAMVALUE + "/" + oldfilePath).Replace("//Areas", "/Areas");
filePath = filePath.Replace("//Areas", "/Areas");
fileName = chfeefile.File_Name;
}
}
}
public static List<fj> GetFileList(string billno) {
var filelist= ChfeeFileDal.GetFileList(billno);
var result=new List<fj>();
if (filelist != null && filelist.Count > 0) {
foreach (var item in filelist) {
result.Add(new fj(item));
}
}
return result;
}
public class Field {
public string fieldName { get; set; }
@ -1064,8 +1101,16 @@ namespace DSWeb.Areas.CommMng.DAL
}
}
public class FileField : Field {
public List<Field> fieldValue { get; set; }
public class FileField {
public string fieldName { get; set; }
public List<fj> fieldValue { get; set; }
public FileField(string _fieldname, List<fj> _fieldvalue)
{
fieldName = _fieldname;
fieldValue = _fieldvalue;
}
}
public static ArrayList GetMainData(ChPayapplication headdata, string userid,int deptid, view_xdf_md fkdx) {
@ -1103,10 +1148,19 @@ namespace DSWeb.Areas.CommMng.DAL
result.add(new Field("jehjdxmj", Math.Round(headdata.AMOUNTUSD,2)));//金额合计大写美金
//result.add(new Field("jehjmjdx", BasicDataRefDAL.ConvertToChineseMoney2((double)headdata.AMOUNTUSD)));
//附件fj字段的值 [{ "filePath":"上传的附件地址或者base64","fileName":"附件名称(包含附件类型)"}]
var fjlist = GetFileList(headdata.BILLNO);
//var fjliststr = JsonConvert.Serialize(fjlist);
result.add(new FileField("fj", fjlist));//金额合计大写美金
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 (vopbsMblnoList != null && vopbsMblnoList.Count > 0) {
bodymblnostr = string.Join(" , ", vopbsMblnoList);
@ -1230,8 +1284,9 @@ namespace DSWeb.Areas.CommMng.DAL
var FanWeidc = new OtherDB(fanweiconnstr);
var oaname = _user.SHOWNAME.Trim().Replace(" ", "");
var fwuser = FanWeidc.view_hrmresource.Where(x => x.lastname == oaname).ToList();
//var fwuser = FanWeidc.view_hrmresource.Where(x => x.lastname == "宫喜芬").ToList();
if (fwuser == null || fwuser.Count <= 0)
{

@ -207,8 +207,7 @@ namespace DSWeb.MvcShipping.Controllers
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", Data = dataListStr });
return new ContentResult() { Content = json };
}
public ContentResult Save ( string opstatus, string data,
string CargoBody, string CargoDelBody )
public ContentResult Save ( string opstatus, string data, string CargoBody, string CargoDelBody )
{
var head = JsonConvert.Deserialize<MsChFeeAutoDuimb>(data);
@ -260,8 +259,7 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
public ContentResult CFSave(string data,
string CargoBody, string CargoDelBody)
public ContentResult CFSave(string data, string CargoBody, string CargoDelBody)
{
var head = JsonConvert.Deserialize<MsChFeeAutoDuimb>(data);

@ -665,6 +665,14 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL
}
}
/// <summary>
/// 生成自动对账单内容
/// </summary>
/// <param name="_head"></param>
/// <param name="userid"></param>
/// <param name="username"></param>
/// <param name="companyid"></param>
/// <returns></returns>
public static DBResult ReMake ( MsChFeeAutoDuimb _head, string userid, string username, string companyid )
{
var head = GetData("GID='" + _head.GID + "'");
@ -715,7 +723,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL
var _localDetail=new CH_FEE_AutoDuiDetailmb();
var get = false;
foreach (var _L in LocalDetailList) {
if (_L.MBLNO == _D.MBLNO) {
if (_L.MBLNO.ToUpper() == _D.MBLNO.ToUpper()) {
_localDetail = _L;
get = true;
continue;

@ -22,12 +22,14 @@ using Ivony.Fluent;
using DSWeb.MvcShipping.DAL.WMSStock;
using System.Configuration;
using DSWeb.Areas.MvcShipping.Helper;
using NPOI.HSSF.Record;
using Quartz.Util;
namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL
{
public class WMSOUT_GuiGeDAL
{
#region 查询主表
#region 出库管理(规格) 查询主表
static public List<WMSOUT_GuiGe> GetDataListHJ(string strCondition, string userid, string usercode, string companyid, int start=0, int limit=10000, string sort = null)
{
@ -66,6 +68,7 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL
+ ",(SELECT distinct wi.PICIHAO+'/' FROM wms_in wi where wi.GID in (select inbsno from wms_out_detail where BSNO=wms_out.bsno) and ISNULL(wi.PICIHAO,'')<>'' FOR XML PATH(''))as PICIHAO "
+ " ,isnull(CNTRTOTAL,'')CNTRTOTAL_2 ,isnull(KGS_OUT,0)KGS_OUT_2 ,isnull(PKGS_OUT,0)PKGS_OUT_2 ,isnull(CBM_OUT,0)CBM_OUT_2 "
+ " , dbo.F_WMSOUTCOUNTRY_CN(BSNO) COUNTRYOFORIGIN_2 "
+ " ,case when exists(select 1 from OP_LOGICINFO where bsno=wms_out.BSNO) then '已提交钉钉' else '' end DingTalkAudit " //2023-1-28 增加对钉钉审核的op_logicinfo数据的支持 如果存在OP_LOGICINFO.bsno=wms_out.bsno 则显示“已提交钉钉”
+ " from wms_out WITH(NOLOCK) where (ISDELETE=0 or ISDELETE is null)");
if (!string.IsNullOrEmpty(strCondition))
{
@ -258,6 +261,9 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL
data.CBM_OUT = (reader["CBM_OUT"] == DBNull.Value ? 0 : Convert.ToDecimal(reader["CBM_OUT"]));//KGS_OUT
if (BasicDataRefDAL.ReadFieldExist(reader, "COUNTRYOFORIGIN_2"))
data.COUNTRYOFORIGIN = reader["COUNTRYOFORIGIN"].ToString();
if (BasicDataRefDAL.ReadFieldExist(reader, "DingTalkAudit"))
data.DingTalkAudit = reader["DingTalkAudit"].ToString();
#endregion
headList.Add(data);
}
@ -1890,12 +1896,106 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL
result.Success = false;
result.Message = "没有输入任何需要修改的数据";
}
Database db = DatabaseFactory.CreateDatabase();
gids = "'" + gids.Trim().Replace(",", "','") + "'";
#region 费用入账
//20230128 改为
if (ConfigurationManager.AppSettings["DingTalkAuditWMSIN"] == "true")
{//向钉钉发送出库审批流程
var _r0 = new DBResult();
_r0.OK();
//如果是费用入账动作 且配置了钉钉审批入库 则调用向钉钉发送新建审批实例方法
var strSql = new StringBuilder();
strSql.Append("select o.IsDetail AS ISDETAIL,d.inbsno as INBSNO,o.gid as OUTGID,o.bsno as OUTNO,o.ASSOCIATEDNO AS ASSOCIATEDNO, ");
strSql.Append(" o.ARCLIENTWMSOUT as ARCLIENTWMSOUT,isnull(d.GOODSOUTFEE,0) AS GOODSOUTFEE_OUT,");
strSql.Append(" o.TRUCKNAME as TRUCKNAME_OUT,isnull(d.GOODSOUTFEEAP,0) AS GOODSOUTFEEAP_OUT,");
strSql.Append(" isnull(d.ARFEE,0) AS ARFEE_OUT,isnull(d.ARFEE_2,0) AS ARFEE_2_OUT,d.GID OUTDEGID");
strSql.Append(" ,ol.PROPVALUE");
strSql.Append(" from wms_out o inner join wms_out_detail d on o.bsno = d.outbsno ");
strSql.Append(" left join OP_LOGICINFO ol on ol.BSNO=o.bsno ");
strSql.Append(" where o.gid in (" + gids + ") and o.ISLOCK=0");
//var 需要发送给钉钉出库审核流程的业务编号List = new List<string>();
var outbsnodic = new Dictionary<string, string>();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
while (reader.Read())
{
var outbsno = Convert.ToString(reader["OUTNO"]);
if(!outbsnodic.ContainsKey(outbsno))
{
var instanceId = Convert.ToString(reader["PROPVALUE"]);
outbsnodic.Add(outbsno, instanceId);
}
}
}
foreach(var item in outbsnodic)
{
//if (!string.IsNullOrWhiteSpace(item.Value)) continue;
var _r = DingTalkHelper.Send_WMSOUT(strUserID, item.Key);
if (!_r.Success)
{
_r0.SetErrorInfo(_r.Message);
}
//仅用于测试解析读取钉钉审批实例内容
//result = TestReadDingtalkInstanceinfo();
if (!_r0.Success)
{
result.Success = false;
result.Message = "发送钉钉审批失败:" + _r0.Message;
return result;
}
else
{
//增加一条钉钉审批记录
}
}
result.SetErrorInfo("钉钉提交成功");
return result;
}
else {
return DoSetislock(gids, bEIP, outType, strUserID, strCompanyID, strDEPTNAME, strSHOWNAME);
}
}
/// <summary>
/// 实际执行费用入账操作
/// </summary>
/// <param name="gids">wms_out.GID 用逗号,隔开</param>
/// <param name="bEIP">bool型 wms_out.EIP</param>
/// <param name="outType">StockOut、StockOutDetail,来自wms_out.ISDETAIL true=StockOutDetail false=StockOut</param>
/// <param name="strUserID">调用时可使用wms_out.CREATEUSER</param>
/// <param name="strCompanyID">未使用 不填</param>
/// <param name="strDEPTNAME">未使用 不填</param>
/// <param name="strSHOWNAME">未使用 不填</param>
/// <returns></returns>
public static DBResult DoSetislock(string gids, bool bEIP, string outType, string strUserID, string strCompanyID = "", string strDEPTNAME = "", string strSHOWNAME = "")
{
DBResult result = new DBResult();
if (gids.Trim() == "")
{
result.Success = false;
result.Message = "没有输入任何需要修改的数据";
}
Database db = DatabaseFactory.CreateDatabase();
gids = "'" + gids.Trim().Replace(",", "','") + "'";
#region 费用入账
using (SqlTransaction sqlTran = SqlHelper.BeginTransaction(SqlHelper.ConnectionStringLocalTransaction))
{
try
@ -1908,8 +2008,6 @@ 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<string>();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString()))
{
int i = 0;
@ -1988,9 +2086,7 @@ namespace DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL
#endregion
if (!List.Exists(x => x == outFee.OUTNO)) {
List.Add(outFee.OUTNO);
}
}
@ -2023,26 +2119,7 @@ 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)
{

@ -392,12 +392,14 @@ namespace DSWeb.Areas.MvcShipping.Helper
public bool cansend(string GID) {
//看是否已发过
var logiclog = BasicDataRefDAL.GetLogicInfo(GID, "钉钉审批");
//var logiclog = BasicDataRefDAL.GetLogicInfo(GID, "钉钉审批");
if (logiclog.Count > 0)
{
return false;
}
//if (logiclog.Count > 0)
//{
// return false;
//}
//20230129 改为任何时候都可以发 但是重发的话会覆盖op_logicinfo.propvalue中已存在的instanceid
return true;
}
@ -422,8 +424,10 @@ namespace DSWeb.Areas.MvcShipping.Helper
jo = (DingTalk_SendAuditResult)JsonToObject(result.Data.ToString(), jo);
var dic = new Dictionary<string, string>();
dic.Add("instanceId", jo.instanceId);
var dic = new Dictionary<string, string>
{
{ "instanceId", jo.instanceId }
};
BasicDataRefDAL.SaveLogicInfo(BSNO, "钉钉审批", dic);
}catch(Exception ex)
@ -505,6 +509,16 @@ namespace DSWeb.Areas.MvcShipping.Helper
foreach (var item in wmsinList)
{
var = "无";
if(!string.IsNullOrWhiteSpace(item.CHEDUIID))
= list.First(x => x.GID == item.CHEDUIID).SHORTNAME;
var = "无";
if (!string.IsNullOrWhiteSpace(item.TRUCKNO))
= item.TRUCKNO;
var newrk = new List<DingTalkFormField>
{
new DingTalkFormField("提单号", item.BLNO),
@ -513,7 +527,9 @@ namespace DSWeb.Areas.MvcShipping.Helper
new DingTalkFormField("重量", item.GOODSRKSL.ToString()),
new DingTalkFormField("件数", item.GOODSPACK.ToString()),
new DingTalkFormField("尺码", item.CHIMA1.ToString()),
new DingTalkFormField("库位", item.AREANAME.ToString())
new DingTalkFormField("库位", item.AREANAME.ToString()),
new DingTalkFormField("车队", ),
new DingTalkFormField("车牌号", )
};
list.Add(newrk);
@ -541,7 +557,9 @@ namespace DSWeb.Areas.MvcShipping.Helper
var = new DingTalkFormField("入库信息", JsonConvert.SerializeObject(list));
var = new DingTalkFormField("车队信息", JsonConvert.SerializeObject(list));
//20230130 取消入库审核的车队信息
//var 车队信息 = new DingTalkFormField("车队信息", JsonConvert.SerializeObject(车队信息list));
body.formComponentValues = new List<DingTalkFormField>
{
@ -549,8 +567,7 @@ namespace DSWeb.Areas.MvcShipping.Helper
//增加字段内容
new DingTalkFormField("客户名称", wms.CUSTOMERNAME),
new DingTalkFormField("入库日期", ((DateTime)wms.WMSDATE).ToString("yyyy-MM-dd")),
,
};
jsonObj = body;
@ -687,11 +704,16 @@ namespace DSWeb.Areas.MvcShipping.Helper
= item.GOODSPFSL == null ? 0M : (decimal)item.GOODSPFSL;
}
var cntrno = item.CntrNo;
if (string.IsNullOrWhiteSpace(cntrno)) {
cntrno = wmsin.CNTRNO;
}
var newrk = new List<DingTalkFormField>
{
new DingTalkFormField("提单号", wms.BLNO),
//new DingTalkFormField("箱号", 对应入库wmsin.CNTRNO),
new DingTalkFormField("箱号", cntrno),
new DingTalkFormField("品名", item.GOODSNAME),
new DingTalkFormField("重量", .ToString()),
new DingTalkFormField("件数", item.GOODSPACKPFSL.ToString()),
@ -774,8 +796,10 @@ namespace DSWeb.Areas.MvcShipping.Helper
jo = (DingTalk_SendAuditResult)JsonToObject(result.Data.ToString(), jo);
var dic = new Dictionary<string, string>();
dic.Add("instanceId", jo.instanceId);
var dic = new Dictionary<string, string>
{
{ "instanceId", jo.instanceId }
};
BasicDataRefDAL.SaveLogicInfo(BSNO, "钉钉审批", dic);
}
@ -863,6 +887,10 @@ namespace DSWeb.Areas.MvcShipping.Helper
type = callbackinfo.type;
}
/// <summary>
/// 已不使用 改为在子类内各自实现
/// </summary>
/// <returns></returns>
public DBResult ReadDingtalkInstanceinfo()
{
@ -878,7 +906,7 @@ namespace DSWeb.Areas.MvcShipping.Helper
//根据内容修改wms和wmsin值
var cdc = new CommonDataContext();
var lv = BasicDataRefDAL.GetLogicHaveValue("钉钉审批", "instanceId", "Wnr2YHcmSD-PjBWkTDkqIg05361673511300");
var lv = BasicDataRefDAL.GetLogicHaveValue("钉钉审批", "instanceId", processInstanceId);
if (lv != null && lv.ContainsKey("instanceId"))
{
var wmsno = lv["BSNO"];
@ -1045,7 +1073,7 @@ namespace DSWeb.Areas.MvcShipping.Helper
cdc.SaveChanges();
//然后执行入库的费用入账原逻辑
DSWeb.MvcShipping.DAL.WMSNewDAL.WMSNewDAL.DoWMSLOCK(wmsno);
DSWeb.MvcShipping.DAL.WMSNewDAL.WMSNewDAL.DoWMSLOCK("'"+wmsno+"'");
}
}
catch (Exception e)
@ -1382,7 +1410,7 @@ namespace DSWeb.Areas.MvcShipping.Helper
return result;
}
new public DingTalkProcess GetDingTalkProcessByProcessCode(string processCode)
public override DingTalkProcess GetDingTalkProcessByProcessCode(string processCode)
{
var processdic = new Dictionary<string, string> {
{ "PROC-0888A19C-0562-42AC-A9C6-24E4C4398410","诚锐入货通知"},
@ -1444,8 +1472,10 @@ namespace DSWeb.Areas.MvcShipping.Helper
public override DBResult DoDeal() {
var result = new DBResult();
//根据processinstancid 读取审批实例信息
var Str = DingTalkHelper.DingTalk_Instanceinfo(callbackinfo.processInstanceId);
var Str = DingTalkHelper.DingTalk_Instanceinfo(callbackinfo.processInstanceId);
//解析返回结果
@ -1469,7 +1499,226 @@ namespace DSWeb.Areas.MvcShipping.Helper
public override DBResult DoDeal()
{
//return new DBResult();
return callbackinfo.ReadDingtalkInstanceinfo();
if (callbackinfo.type == "finish")
{
return ReadDingtalkInstanceinfo(callbackinfo.processInstanceId);
}
else {
return new DBResult();
}
}
public DBResult ReadDingtalkInstanceinfo(string processInstanceId)
{
var result = new DBResult();
//var userid=
try
{
//如果是费用入账动作 且配置了钉钉审批入库 则调用
result = DingTalkHelper.DingTalk_Instanceinfo(processInstanceId);
DingTalkInstanceinfo di = DSWeb.MvcShipping.Helper.JsonConvert.Deserialize<DingTalkInstanceinfo>(result.Data.ToString());
//根据内容修改wms和wmsin值
var cdc = new CommonDataContext();
var lv = BasicDataRefDAL.GetLogicHaveValue("钉钉审批", "instanceId", processInstanceId);
if (lv != null && lv.ContainsKey("instanceId"))
{
var wmsno = lv["BSNO"];
var wmsold = new DSWeb.MvcShipping.Models.WMS.WMS_IN_OLD(wmsno);
var wms = wmsold.wms;
var wmslist = wmsold.wms_in;
//var wms = cdc.wms.FirstOrDefault(x => x.WMSNO == wmsno);
//var wmslist = new List<wms_in_md>();
//if (wms != null) {
// wmslist = cdc.wms_in.Where(x => x.ASSOCIATEDNO == wms.GID).ToList();
//}
var updwmsinlist = new List<wms_in_md>();
var newwmsinlist = new List<wms_in_md>();
var = new wms_in_md();
foreach (var item in di.result.formComponentValues)
{
//从其中查找货物信息 并更新至当前
if (item.name == "客户名称")
{
//var cust=cdc.info_client.Where(x=>x.SHORTNAME==item.value || x.DESCRIPTION==item.value)
}
if (item.name == "入库日期")
{
wms.WMSDATE = Convert.ToDateTime(item.value);
}
if (item.name == "入库信息")
{
var list = FormComponentValues.GetRowValues(item.value);
if (list != null)
{
foreach (var DingWmsin in list)
{
var = DingWmsin.getValue("提单号");
var = DingWmsin.getValue("箱号");
if (wmslist.Exists(x => x.BLNO == && x.CNTRNO == ))
{
var updrec = wmslist.First(x => x.BLNO == && x.CNTRNO == );
//new DingTalkFormField("提单号", item.BLNO),
//new DingTalkFormField("箱号", item.CNTRNO),
//new DingTalkFormField("品名", item.GOODSNAME),
//new DingTalkFormField("重量", item.GOODSRKSL.ToString()),
//new DingTalkFormField("件数", item.GOODSPACK.ToString()),
//new DingTalkFormField("尺码", item.CHIMA1.ToString()),
//new DingTalkFormField("库位", item.CHIMA1.ToString())
updrec.GOODSNAME = DingWmsin.getValue("品名");
if (wms.CHARGEUNIT == "吨" || wms.CHARGEUNIT == "千克")
{
updrec.GOODSRKSL = Convert.ToDecimal(DingWmsin.getValue("重量"));
updrec.GOODSSTOCK = Convert.ToDecimal(DingWmsin.getValue("重量"));
updrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
updrec.SHIJIZHONGLIANG = Convert.ToDouble(DingWmsin.getValue("重量"));
updrec.CHIMA1 = Convert.ToDouble(DingWmsin.getValue("尺码"));
updrec.SHIJICHIMA = Convert.ToDouble(DingWmsin.getValue("尺码"));
}
if (wms.CHARGEUNIT == "CBM")
{
updrec.GOODSRKSL = Convert.ToDecimal(DingWmsin.getValue("尺码"));
updrec.GOODSSTOCK = Convert.ToDecimal(DingWmsin.getValue("重量"));
updrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
updrec.SHIJIZHONGLIANG = Convert.ToDouble(DingWmsin.getValue("重量"));
updrec.CHIMA1 = Convert.ToDouble(DingWmsin.getValue("尺码"));
updrec.SHIJICHIMA = Convert.ToDouble(DingWmsin.getValue("尺码"));
}
updrec.GOODSPACK = Convert.ToDecimal(DingWmsin.getValue("件数"));
updrec.AREANAME = DingWmsin.getValue("库位");
updrec.DODATE = wms.WMSDATE;
//if(string.IsNullOrWhiteSpace(DingWmsin.getValue("车牌号")))
updrec.TRUCKNO = DingWmsin.getValue("车牌号");
var name= DingWmsin.getValue("车队");
var infoclient = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == name);
if(infoclient!=null && !string.IsNullOrWhiteSpace( infoclient.SHORTNAME))
updrec.CHEDUIID = infoclient.GID;
updwmsinlist.Add(updrec);
}
else
{
var newrec = new wms_in_md();
newrec.ASSOCIATEDNO = wms.GID;
newrec.GID = Guid.NewGuid().ToString();
newrec.BLNO = DingWmsin.getValue("提单号");
newrec.CNTRNO = DingWmsin.getValue("箱号");
newrec.CLIENTNAME = wms.CUSTOMERNAME;
newrec.DODATE = wms.WMSDATE;
newrec.GOODSNAME = DingWmsin.getValue("品名");
if (wms.CHARGEUNIT == "吨" || wms.CHARGEUNIT == "千克")
{
newrec.GOODSRKSL = Convert.ToDecimal(DingWmsin.getValue("重量"));
newrec.GOODSSTOCK = Convert.ToDecimal(DingWmsin.getValue("重量"));
newrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
newrec.SHIJIZHONGLIANG = Convert.ToDouble(DingWmsin.getValue("重量"));
newrec.CHIMA1 = Convert.ToDouble(DingWmsin.getValue("尺码"));
newrec.SHIJICHIMA = Convert.ToDouble(DingWmsin.getValue("尺码"));
}
if (wms.CHARGEUNIT == "CBM")
{
newrec.GOODSRKSL = Convert.ToDecimal(DingWmsin.getValue("尺码"));
newrec.GOODSSTOCK = Convert.ToDecimal(DingWmsin.getValue("重量"));
newrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
newrec.SHIJIZHONGLIANG = Convert.ToDouble(DingWmsin.getValue("重量"));
newrec.CHIMA1 = Convert.ToDouble(DingWmsin.getValue("尺码"));
newrec.SHIJICHIMA = Convert.ToDouble(DingWmsin.getValue("尺码"));
}
newrec.GOODSPACK = Convert.ToDecimal(DingWmsin.getValue("件数"));
newrec.AREANAME = DingWmsin.getValue("库位");
newrec.CREATETIME = DateTime.Now;
newrec.CHARGEUNIT = wms.CHARGEUNIT;
newrec.CORPID = wms.CORPID;
newrec.TRUCKNO = DingWmsin.getValue("车牌号");
var name = DingWmsin.getValue("车队");
var infoclient = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == name);
if (infoclient != null && string.IsNullOrWhiteSpace(infoclient.SHORTNAME))
newrec.CHEDUIID = infoclient.SHORTNAME;
newwmsinlist.Add(newrec);
}
}
}
}
//if (item.name == "车队信息")
//{
// var 车队信息list = FormComponentValues.GetRowValues(item.value);
// if (车队信息list != null && 车队信息list.Count > 0)
// {
// var 车队name = 车队信息list[0].getValue("车队");
// var 车队 = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == 车队name);
// if (车队 != null && 车队.SHORTNAME != null && 车队.SHORTNAME != "")
// {
// 车辆信息.CHEDUIID = 车队.GID;
// 车辆信息.TRUCKNO = 车队信息list[0].getValue("车牌号");
// }
// }
//}
}
cdc.wms.AddOrUpdate(wms);
if (updwmsinlist != null && updwmsinlist.Count > 0)
{
foreach (var item in updwmsinlist)
{
cdc.wms_in.AddOrUpdate(item);
}
}
if (newwmsinlist != null && newwmsinlist.Count > 0)
{
foreach (var item in newwmsinlist)
{
item.CHEDUIID = .CHEDUIID;
item.TRUCKNO = .TRUCKNO;
cdc.wms_in.AddOrUpdate(item);
}
}
wms.ISLOCK2 = false;
cdc.wms.AddOrUpdate(wms);
cdc.SaveChanges();
//然后执行入库的费用入账原逻辑
DSWeb.MvcShipping.DAL.WMSNewDAL.WMSNewDAL.DoWMSLOCK("'" + wmsno + "'");
}
}
catch (Exception e)
{
result.SetErrorInfo(e.Message);
}
return result;
}
}
public class DingTalkProcess_ : DingTalkProcess
@ -1487,11 +1736,152 @@ namespace DSWeb.Areas.MvcShipping.Helper
}
//public override DBResult DoDeal()
//{
// //return new DBResult();
// //return callbackinfo.ReadDingtalkInstanceinfo();
//}
public override DBResult DoDeal()
{
//return new DBResult();
if (callbackinfo.type == "finish")
{
return ReadDingtalkInstanceinfo(callbackinfo.processInstanceId);
}
else
{
return new DBResult();
}
}
public DBResult ReadDingtalkInstanceinfo(string processInstanceId)
{
var result = new DBResult();
//var userid=
try
{
result = DingTalkHelper.DingTalk_Instanceinfo(processInstanceId);
DingTalkInstanceinfo di = DSWeb.MvcShipping.Helper.JsonConvert.Deserialize<DingTalkInstanceinfo>(result.Data.ToString());
//根据内容修改wms_out_detail的值
var cdc = new CommonDataContext();
var lv = BasicDataRefDAL.GetLogicHaveValue("钉钉审批", "instanceId", processInstanceId);
if (lv != null && lv.ContainsKey("instanceId"))
{
var BSNO = lv["BSNO"];
var wmsold = new DSWeb.MvcShipping.Models.WMS.WMS_OUT_OLD(BSNO);
var wms_out = wmsold.wms_out;
var wms_out_detaillist = wmsold.wms_out_detail;
List<wms_out_detail_md> updwmslist = new List<wms_out_detail_md>();
var = new wms_in_md();
foreach (var item in di.result.formComponentValues)
{
//从其中查找货物信息 并更新至当前
//if (item.name == "客户名称")
//{
// //var cust=cdc.info_client.Where(x=>x.SHORTNAME==item.value || x.DESCRIPTION==item.value)
//}
//if (item.name == "入库日期")
//{
// wms.WMSDATE = Convert.ToDateTime(item.value);
//}
if (item.name == "出库信息")
{
var list = FormComponentValues.GetRowValues(item.value);
if (list != null)
{
foreach (var DingWmsin in list)
{
var = DingWmsin.getValue("提单号");
var = DingWmsin.getValue("箱号");
var = DingWmsin.getValue("品名");
if (wmsold.VW_WMS_OUT_DETAIL.Exists(x => x.BLNO == && x.CNTRNO == && x.GOODSNAME_OUT == ))
{
var _outrec= wmsold.VW_WMS_OUT_DETAIL.First(x => x.BLNO == && x.CNTRNO == && x.GOODSNAME_OUT == );
var updrec = wms_out_detaillist.First(x => x.GID== _outrec.GID_OUT);
//new DingTalkFormField("提单号", item.BLNO),
//new DingTalkFormField("箱号", item.CNTRNO),
//new DingTalkFormField("品名", item.GOODSNAME),
//new DingTalkFormField("重量", item.GOODSRKSL.ToString()),
//new DingTalkFormField("件数", item.GOODSPACK.ToString()),
//new DingTalkFormField("尺码", item.CHIMA1.ToString()),
//new DingTalkFormField("库位", item.CHIMA1.ToString())
updrec.GOODSNAME = DingWmsin.getValue("品名");
if (wms_out.CHARGEUNIT == "吨" || wms_out.CHARGEUNIT == "千克")
{
updrec.GOODSPFSL = Convert.ToDecimal(DingWmsin.getValue("重量"));
updrec.GOODSKGS = Convert.ToDecimal(DingWmsin.getValue("重量"));
}
if (wms_out.CHARGEUNIT == "CBM")
{
updrec.GOODSPFSL = Convert.ToDecimal(DingWmsin.getValue("尺码"));
updrec.GOODSKGS =0;
}
updrec.GOODSPACK = DingWmsin.getValue("件数");
//updrec.AREANAME = DingWmsin.getValue("库位");
//updrec.DODATE = wms_out.DODATE;
updwmslist.Add(updrec);
}
else
{
}
}
}
}
if (item.name == "车辆信息")
{
var list = FormComponentValues.GetRowValues(item.value);
if (list != null && list.Count > 0)
{
.TRUCKNO = list[0].getValue("车牌号");
}
}
}
//cdc.wms.AddOrUpdate(wms);
if (updwmslist != null && updwmslist.Count > 0)
{
foreach (var item in updwmslist)
{
//item.CHEDUIID = 车辆信息.CHEDUIID;
item.TRUCKNO = .TRUCKNO;
cdc.wms_out_detail.AddOrUpdate(item);
}
}
cdc.SaveChanges();
//然后执行出库的费用入账原逻辑
var outtype = wms_out.IsDetail == "1" ? "StockOutDetail" : "StockOut";
DSWeb.MvcShipping.DAL.WMSOUT_GuiGeDAL.WMSOUT_GuiGeDAL.DoSetislock(wms_out.GID, (bool)wms_out.EIP, outtype,wms_out.CREATEUSER);
}
}
catch (Exception e)
{
result.SetErrorInfo(e.Message);
}
return result;
}
}
#endregion

@ -3010,6 +3010,32 @@ namespace DSWeb.MvcShipping.Models.WMS
}
}
public class WMS_OUT_OLD
{
public wms_out_md wms_out { get; set; }
public List<wms_out_detail_md> wms_out_detail { get; set; }
public List<VW_WMS_OUT_DETAIL_md> VW_WMS_OUT_DETAIL { get; set; }
public WMS_OUT_OLD() { }
public WMS_OUT_OLD(string bsno)
{
var cdc = new CommonDataContext();
wms_out = cdc.wms_out.FirstOrDefault(x => x.BSNO == bsno);
if (wms_out != null)
{
wms_out_detail = cdc.wms_out_detail.Where(x => x.OUTBSNO == wms_out.BSNO).ToList();
var gids = wms_out_detail.Select(s => s.GID).ToList();
VW_WMS_OUT_DETAIL = cdc.VW_WMS_OUT_DETAIL.Where(x => gids.Contains(x.GID_OUT)).ToList();
}
}
}
#region 新的仓储数据结构
public class WMSIN_mb { }

@ -876,7 +876,17 @@ namespace DSWeb.MvcShipping.Models.WMSOUT_GuiGe
set { _countryoforigin = value; }
}
/// <summary>
/// 钉钉审批状态
///
/// </summary>
private string _DingTalkAudit;
public string DingTalkAudit
{
get { return _DingTalkAudit; }
set { _DingTalkAudit = value; }
}
#endregion
public WMSOUT_GuiGe()

@ -19774,21 +19774,47 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
if (checkresult.length > 0) {
var store = Ext.data.Store({
var store = Ext.create('Ext.data.Store', {
autoLoad: true,
fields: [{
name: 'errorType', type: "string"
}, {
name: 'resultName', type: "string"
}],
data: this.ruleCheckNameArr_2,
autoLoad: true
data: []
});
var grid = Ext.create('Ext.grid.Panel', {
var rulegrid = Ext.create('Ext.grid.Panel', {
id:"RuleResultGrid",
store: store,
viewConfig: {
enableTextSelection: true, //允许复制数据
},
columns: [
//{ text: "校验提醒", flex: 1, dataIndex: 'errorType', sortable: true },
{ text: "校验内容", flex: 1, dataIndex: 'resultName', sortable: true }
{
text: " ",
flex: 1,
dataIndex: 'errorType',
sortable: true,
align: 'center',
renderer: function (value, meta, record) {
meta.tdCls = 'middle';
if (value == "Error" ) {
return "<img src='../../../../TruckMng/Content/Images/upload-stop.gif' />";
}
if (value == "Warning") {
return "<img src='../../../../TruckMng/Content/Images/btn-warning.png' />";
}
}
},
{
text: "校验内容", flex: 11, dataIndex: 'resultName', sortable: true,
renderer: function (value, meta, record) {
meta.style = 'overflow:auto;padding: 1px 6px;text-overflow: ellipsis;white-space: nowrap;white-space:normal;line-height:20px;';
return value;
}
}
],
forceFit: true,
split: true,
@ -19809,7 +19835,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:0 0 0 0",
items: [grid],
items: [rulegrid],
buttons: [{
text: Zi.LAN.GuanBi, //"关闭",
minWidth: 70,
@ -19819,6 +19845,32 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, {
}]
});
//function setTdCls() {
// var gridJglb = document.getElementById("RuleResultGrid");
// var tables = gridJglb.getElementsByTagName("table");//找到每个表格
// for (var k = 0; k < tables.length; k++) {
// var tableV = tables[k];
// if (tableV.className == "x-grid3-row-table") {
// var trs = tables[k].getElementsByTagName("tr");//找到每个tr
// for (var i = 0; i < trs.length; i++) {
// var tds = trs[i].getElementsByTagName("td");//找到每个TD
// for (var j = 1; j < tds.length; j++) {
// tds[j].style.cssText = "202px;text-align:center;line-height:130px;vertical-align:center;";
// }
// }
// };
// }
//}
//Ext.getCmp("RuleResultGrid").getStore().on('load', setTdCls);//设置表格加载数据完毕后更改表格TD样式为垂直居中
//rulegrid.getStore().on('load', setTdCls );
store.loadData(this.ruleCheckNameArr_2);
//var gridJglb = Ext.getCmp("RuleResultGrid");
//setTdCls();
this.winCheckRuleListShow.show();
} else {

@ -605,6 +605,9 @@ Ext.extend(Shipping.MsRptNoFeeCrDetailIndex, Ext.Panel, {
disableSelection: false,
columns: this.girdcolumsdr,
selModel: this.GridCheckBoxModel,
viewConfig: {
enableTextSelection: true //允许复制数据
},
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeListDr,
@ -876,6 +879,9 @@ Ext.extend(Shipping.MsRptNoFeeCrDetailIndex, Ext.Panel, {
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsfeedr,
viewConfig: {
enableTextSelection: true //允许复制数据
},
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeFeeListDr,
@ -1058,6 +1064,9 @@ Ext.extend(Shipping.MsRptNoFeeCrDetailIndex, Ext.Panel, {
trackMouseOver: true,
disableSelection: false,
selModel: this.CUSTGridCheckBoxModel,
viewConfig: {
enableTextSelection: true //允许复制数据
},
columns: this.girdcolumscust,
// features: [{
// ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
@ -1217,6 +1226,9 @@ Ext.extend(Shipping.MsRptNoFeeCrDetailIndex, Ext.Panel, {
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
viewConfig: {
enableTextSelection: true //允许复制数据
},
columns: this.girdcolumssum
});

@ -612,6 +612,9 @@ Ext.extend(Shipping.MsRptNoFeeDetailIndex, Ext.Panel, {
disableSelection: false,
columns: this.girdcolumsdr,
selModel: this.GridCheckBoxModel,
viewConfig: {
enableTextSelection: true //允许复制数据
},
// paging bar on the bottom
bbar: [Ext.create('Ext.PagingToolbar', {
store: this.storeListDr,
@ -867,6 +870,9 @@ Ext.extend(Shipping.MsRptNoFeeDetailIndex, Ext.Panel, {
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumsfeedr,
viewConfig: {
enableTextSelection: true //允许复制数据
},
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeFeeListDr,
@ -1050,6 +1056,9 @@ Ext.extend(Shipping.MsRptNoFeeDetailIndex, Ext.Panel, {
trackMouseOver: true,
disableSelection: false,
selModel: this.CUSTGridCheckBoxModel,
viewConfig: {
enableTextSelection: true //允许复制数据
},
columns: this.girdcolumscust,
// features: [{
// ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性
@ -1208,6 +1217,9 @@ Ext.extend(Shipping.MsRptNoFeeDetailIndex, Ext.Panel, {
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
viewConfig: {
enableTextSelection: true //允许复制数据
},
columns: this.girdcolumssum
});

@ -489,6 +489,12 @@ Ext.extend(Shipping.WMSOUT_GuiGeIndex, Ext.Panel, {
header: '原产国',
width: 120
},
{
sortable: true,
dataIndex: 'DingTalkAudit',
header: '钉钉审批',
width: 120
},
{
sortable: true,
dataIndex: 'STORAGENAME',
@ -696,7 +702,6 @@ Ext.extend(Shipping.WMSOUT_GuiGeIndex, Ext.Panel, {
} else {
this.outType = "StockOut";
DsOpenEditWin('/MvcShipping/WMSOUT_GuiGe/Edit', "货权转移-出库单");
}
}

@ -83,7 +83,8 @@
, { name: 'KGS_OUT', type: 'string' } //重量
, { name: 'PKGS_OUT', type: 'string' } //件数
, { name: 'CBM_OUT', type: 'string' } //尺码
, { name: 'COUNTRYOFORIGIN', type: 'string' } //原产国
, { name: 'COUNTRYOFORIGIN', type: 'string' } //原产国
, { name: 'DingTalkAudit', type: 'string' } //钉钉审批
]
});

@ -52,9 +52,10 @@ namespace DSWeb.EntityDA
//读取
public string getCookie(string strName)
{
HttpCookie Cookie= new HttpCookie(strName);
try
{
HttpCookie Cookie = new HttpCookie(strName);
Cookie.Value = System.Web.HttpContext.Current.Request.Cookies[strName].Value.ToString();
if (Cookie != null)
{

@ -284,4 +284,10 @@
/*货权转移Owenr Ship Tuansfer*/
background-color: #F86868;
}
/*End*/
/*End*/
/*grid单元格内容垂直居中*/
.x-grid-cell.middle {
vertical-align: middle;
}

@ -10,6 +10,12 @@
<appSettings>
<add key="MQURL" value="amqp://status_resp:djystatusresp2022@60.209.125.238:33666/status_resp" />
<add key="DJYCORPID:662145ea-ab74-44e0-9d31-d27369121c3c" value="Server=60.209.125.238,26600;Database=shippingwebTEST;User ID=sa;Password=Ds20040201;Connect Timeout=120000;" />
<add key="DS7connStr" value="Data Source=115.29.138.217,18866;Initial Catalog=ShippingWeb;Persist Security Info=True;User ID=sa;Password=Asde875621" />
<add key="OAconnStr" value="Data Source=117.78.44.211,1433;Initial Catalog=ecology;Persist Security Info=True;User ID=OA01;Password=oa123456@" />
<add key="DS7URL" value="http://115.29.138.217:8090/Account/Chfee_payapplication/AuditListAcceptOA" />
</appSettings>
<entityFramework>
<providers>

@ -32,6 +32,7 @@
this.button2 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button3 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
@ -70,11 +71,22 @@
this.textBox1.Size = new System.Drawing.Size(96, 21);
this.textBox1.TabIndex = 3;
//
// button3
//
this.button3.Location = new System.Drawing.Point(114, 82);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 4;
this.button3.Text = "button3";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(294, 181);
this.Controls.Add(this.button3);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
@ -92,6 +104,7 @@
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button3;
}
}

@ -1,4 +1,5 @@
using D7MqClient;

using DSWeb.Service.Output;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -8,6 +9,8 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//using D7MqClient;
namespace TestForm
{
@ -20,7 +23,7 @@ namespace TestForm
private void button1_Click(object sender, EventArgs e)
{
DJYtoD7_OPSTATUS dj = new DJYtoD7_OPSTATUS();
//DJYtoD7_OPSTATUS dj = new DJYtoD7_OPSTATUS();
}
private void button2_Click(object sender, EventArgs e)
@ -36,5 +39,13 @@ namespace TestForm
}
label1.Text = newint.ToString();
}
private void button3_Click(object sender, EventArgs e)
{
//触发荣圣达读取泛微审核结果逻辑
JobFanWeiToDS7 jd = new JobFanWeiToDS7();
jd.DoWork();
}
}
}

@ -36,12 +36,21 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Common.Logging, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Common.Logging.3.3.1\lib\net40\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="Common.Logging.Core, Version=3.3.1.0, Culture=neutral, PublicKeyToken=af08829b84f0328e, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Common.Logging.Core.3.3.1\lib\net40\Common.Logging.Core.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Quartz, Version=2.6.2.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Quartz.2.6.2\lib\net40\Quartz.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
@ -76,6 +85,9 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="job_scheduling_data_2_0.xsd">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
@ -91,9 +103,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\D7MqClient\D7MqClient\D7MqClient.csproj">
<Project>{f3096387-37a2-403b-b147-64a8b4fc1077}</Project>
<Name>D7MqClient</Name>
<ProjectReference Include="..\..\..\DSWeb.Service.Output\DSWeb.Service.Output.csproj">
<Project>{fb5f0a53-8aa0-4993-8fb9-2b6c5fac0482}</Project>
<Name>DSWeb.Service.Output</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

@ -0,0 +1,364 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://quartznet.sourceforge.net/JobSchedulingData"
targetNamespace="http://quartznet.sourceforge.net/JobSchedulingData"
elementFormDefault="qualified"
version="2.0">
<xs:element name="job-scheduling-data">
<xs:annotation>
<xs:documentation>Root level node</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="pre-processing-commands" type="pre-processing-commandsType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Commands to be executed before scheduling the jobs and triggers in this file.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="processing-directives" type="processing-directivesType" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Directives to be followed while scheduling the jobs and triggers in this file.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="schedule" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="job" type="job-detailType" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="trigger" type="triggerType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:string">
<xs:annotation>
<xs:documentation>Version of the XML Schema instance</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:complexType name="pre-processing-commandsType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="delete-jobs-in-group" type="xs:string" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Delete all jobs, if any, in the identified group. "*" can be used to identify all groups. Will also result in deleting all triggers related to the jobs.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="delete-triggers-in-group" type="xs:string" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Delete all triggers, if any, in the identified group. "*" can be used to identify all groups. Will also result in deletion of related jobs that are non-durable.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="delete-job" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Delete the identified job if it exists (will also result in deleting all triggers related to it).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="group" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="delete-trigger" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Delete the identified trigger if it exists (will also result in deletion of related jobs that are non-durable).</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="group" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="processing-directivesType">
<xs:sequence>
<xs:element name="overwrite-existing-data" type="xs:boolean" minOccurs="0" default="true">
<xs:annotation>
<xs:documentation>Whether the existing scheduling data (with same identifiers) will be overwritten. If false, and ignore-duplicates is not false, and jobs or triggers with the same names already exist as those in the file, an error will occur.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ignore-duplicates" type="xs:boolean" minOccurs="0" default="false">
<xs:annotation>
<xs:documentation>If true (and overwrite-existing-data is false) then any job/triggers encountered in this file that have names that already exist in the scheduler will be ignored, and no error will be produced.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="schedule-trigger-relative-to-replaced-trigger" type="xs:boolean" minOccurs="0" default="false">
<xs:annotation>
<xs:documentation>If true trigger's start time is calculated based on earlier run time instead of fixed value. Trigger's start time must be undefined for this to work.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="job-detailType">
<xs:annotation>
<xs:documentation>Define a JobDetail</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="group" type="xs:string" minOccurs="0" />
<xs:element name="description" type="xs:string" minOccurs="0" />
<xs:element name="job-type" type="xs:string" />
<xs:sequence minOccurs="0">
<xs:element name="durable" type="xs:boolean" />
<xs:element name="recover" type="xs:boolean" />
</xs:sequence>
<xs:element name="job-data-map" type="job-data-mapType" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="job-data-mapType">
<xs:annotation>
<xs:documentation>Define a JobDataMap</xs:documentation>
</xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="entry" type="entryType" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="entryType">
<xs:annotation>
<xs:documentation>Define a JobDataMap entry</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="key" type="xs:string" />
<xs:element name="value" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="triggerType">
<xs:annotation>
<xs:documentation>Define a Trigger</xs:documentation>
</xs:annotation>
<xs:choice>
<xs:element name="simple" type="simpleTriggerType" />
<xs:element name="cron" type="cronTriggerType" />
<xs:element name="calendar-interval" type="calendarIntervalTriggerType" />
</xs:choice>
</xs:complexType>
<xs:complexType name="abstractTriggerType" abstract="true">
<xs:annotation>
<xs:documentation>Common Trigger definitions</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="group" type="xs:string" minOccurs="0" />
<xs:element name="description" type="xs:string" minOccurs="0" />
<xs:element name="job-name" type="xs:string" />
<xs:element name="job-group" type="xs:string" minOccurs="0" />
<xs:element name="priority" type="xs:nonNegativeInteger" minOccurs="0" />
<xs:element name="calendar-name" type="xs:string" minOccurs="0" />
<xs:element name="job-data-map" type="job-data-mapType" minOccurs="0" />
<xs:sequence minOccurs="0">
<xs:choice>
<xs:element name="start-time" type="xs:dateTime" />
<xs:element name="start-time-seconds-in-future" type="xs:nonNegativeInteger" />
</xs:choice>
<xs:element name="end-time" type="xs:dateTime" minOccurs="0" />
</xs:sequence>
</xs:sequence>
</xs:complexType>
<xs:complexType name="simpleTriggerType">
<xs:annotation>
<xs:documentation>Define a SimpleTrigger</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="abstractTriggerType">
<xs:sequence>
<xs:element name="misfire-instruction" type="simple-trigger-misfire-instructionType" minOccurs="0" />
<xs:sequence minOccurs="0">
<xs:element name="repeat-count" type="repeat-countType" />
<xs:element name="repeat-interval" type="xs:nonNegativeInteger" />
</xs:sequence>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="cronTriggerType">
<xs:annotation>
<xs:documentation>Define a CronTrigger</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="abstractTriggerType">
<xs:sequence>
<xs:element name="misfire-instruction" type="cron-trigger-misfire-instructionType" minOccurs="0" />
<xs:element name="cron-expression" type="cron-expressionType" />
<xs:element name="time-zone" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="calendarIntervalTriggerType">
<xs:annotation>
<xs:documentation>Define a DateIntervalTrigger</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="abstractTriggerType">
<xs:sequence>
<xs:element name="misfire-instruction" type="date-interval-trigger-misfire-instructionType" minOccurs="0" />
<xs:element name="repeat-interval" type="xs:nonNegativeInteger" />
<xs:element name="repeat-interval-unit" type="interval-unitType" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="cron-expressionType">
<xs:annotation>
<xs:documentation>
Cron expression (see JavaDoc for examples)
Special thanks to Chris Thatcher (thatcher@butterfly.net) for the regular expression!
Regular expressions are not my strong point but I believe this is complete,
with the caveat that order for expressions like 3-0 is not legal but will pass,
and month and day names must be capitalized.
If you want to examine the correctness look for the [\s] to denote the
seperation of individual regular expressions. This is how I break them up visually
to examine them:
SECONDS:
(
((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
| (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
| ([\?])
| ([\*])
) [\s]
MINUTES:
(
((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)
| (([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))
| ([\?])
| ([\*])
) [\s]
HOURS:
(
((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)
| (([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))
| ([\?])
| ([\*])
) [\s]
DAY OF MONTH:
(
((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)
| (([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)
| (L(-[0-9])?)
| (L(-[1-2][0-9])?)
| (L(-[3][0-1])?)
| (LW)
| ([1-9]W)
| ([1-3][0-9]W)
| ([\?])
| ([\*])
)[\s]
MONTH:
(
((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)
| (([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))
| (((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)
| ((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))
| ([\?])
| ([\*])
)[\s]
DAY OF WEEK:
(
(([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)
| ([1-7]/([1-7]))
| (((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)
| ((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)
| (([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))(L|LW)?)
| (([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)
| ([\?])
| ([\*])
)
YEAR (OPTIONAL):
(
[\s]?
([\*])?
| ((19[7-9][0-9])|(20[0-9][0-9]))?
| (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?
| ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?
)
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern
value="(((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)|(([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))|([\?])|([\*]))[\s](((([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?,)*([0-9]|[0-5][0-9])(-([0-9]|[0-5][0-9]))?)|(([\*]|[0-9]|[0-5][0-9])/([0-9]|[0-5][0-9]))|([\?])|([\*]))[\s](((([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?,)*([0-9]|[0-1][0-9]|[2][0-3])(-([0-9]|[0-1][0-9]|[2][0-3]))?)|(([\*]|[0-9]|[0-1][0-9]|[2][0-3])/([0-9]|[0-1][0-9]|[2][0-3]))|([\?])|([\*]))[\s](((([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?,)*([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(-([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1]))?(C)?)|(([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])/([1-9]|[0][1-9]|[1-2][0-9]|[3][0-1])(C)?)|(L(-[0-9])?)|(L(-[1-2][0-9])?)|(L(-[3][0-1])?)|(LW)|([1-9]W)|([1-3][0-9]W)|([\?])|([\*]))[\s](((([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?,)*([1-9]|0[1-9]|1[0-2])(-([1-9]|0[1-9]|1[0-2]))?)|(([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|1[0-2]))|(((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?,)*(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?)|((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)/(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))|([\?])|([\*]))[\s]((([1-7](-([1-7]))?,)*([1-7])(-([1-7]))?)|([1-7]/([1-7]))|(((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?,)*(MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?(C)?)|((MON|TUE|WED|THU|FRI|SAT|SUN)/(MON|TUE|WED|THU|FRI|SAT|SUN)(C)?)|(([1-7]|(MON|TUE|WED|THU|FRI|SAT|SUN))?(L|LW)?)|(([1-7]|MON|TUE|WED|THU|FRI|SAT|SUN)#([1-7])?)|([\?])|([\*]))([\s]?(([\*])?|(19[7-9][0-9])|(20[0-9][0-9]))?| (((19[7-9][0-9])|(20[0-9][0-9]))/((19[7-9][0-9])|(20[0-9][0-9])))?| ((((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?,)*((19[7-9][0-9])|(20[0-9][0-9]))(-((19[7-9][0-9])|(20[0-9][0-9])))?)?)" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="repeat-countType">
<xs:annotation>
<xs:documentation>Number of times to repeat the Trigger (-1 for indefinite)</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
<xs:minInclusive value="-1" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="simple-trigger-misfire-instructionType">
<xs:annotation>
<xs:documentation>Simple Trigger Misfire Instructions</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="SmartPolicy" />
<xs:pattern value="RescheduleNextWithExistingCount" />
<xs:pattern value="RescheduleNextWithRemainingCount" />
<xs:pattern value="RescheduleNowWithExistingRepeatCount" />
<xs:pattern value="RescheduleNowWithRemainingRepeatCount" />
<xs:pattern value="FireNow" />
<xs:pattern value="IgnoreMisfirePolicy" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="cron-trigger-misfire-instructionType">
<xs:annotation>
<xs:documentation>Cron Trigger Misfire Instructions</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="SmartPolicy" />
<xs:pattern value="DoNothing" />
<xs:pattern value="FireOnceNow" />
<xs:pattern value="IgnoreMisfirePolicy" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="date-interval-trigger-misfire-instructionType">
<xs:annotation>
<xs:documentation>Date Interval Trigger Misfire Instructions</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="SmartPolicy" />
<xs:pattern value="DoNothing" />
<xs:pattern value="FireOnceNow" />
<xs:pattern value="IgnoreMisfirePolicy" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="interval-unitType">
<xs:annotation>
<xs:documentation>Interval Units</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:pattern value="Day" />
<xs:pattern value="Hour" />
<xs:pattern value="Minute" />
<xs:pattern value="Month" />
<xs:pattern value="Second" />
<xs:pattern value="Week" />
<xs:pattern value="Year" />
</xs:restriction>
</xs:simpleType>
</xs:schema>

@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Common.Logging" version="3.3.1" targetFramework="net472" />
<package id="Common.Logging.Core" version="3.3.1" targetFramework="net472" />
<package id="EntityFramework" version="6.4.4" targetFramework="net472" />
<package id="Quartz" version="2.6.2" targetFramework="net472" />
</packages>
Loading…
Cancel
Save