|
|
@ -4965,6 +4965,7 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 逻辑信息子表操作
|
|
|
|
#region 逻辑信息子表操作
|
|
|
|
|
|
|
|
|
|
|
|
#region 将一个dictionary转化为用;;和::隔开的文本
|
|
|
|
#region 将一个dictionary转化为用;;和::隔开的文本
|
|
|
@ -5023,6 +5024,17 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static List<OP_LOGICINFO_md> GetLogicInfoList(string BSNOListStr, string PROPNAME)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Common.DB.CommonDataContext cdc = new Common.DB.CommonDataContext();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<string> BSNOList = BSNOListStr.Split(',').ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var infoList = cdc.OP_LOGICINFO.Where(x => BSNOList.Contains(x.BSNO) && x.PROPNAME == PROPNAME).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return infoList;
|
|
|
|
|
|
|
|
}
|
|
|
|
public static void SaveLogicInfo(string BSNO, string PROPNAME, Dictionary<string, string> InfoDic = null)
|
|
|
|
public static void SaveLogicInfo(string BSNO, string PROPNAME, Dictionary<string, string> InfoDic = null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -5052,6 +5064,42 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void SaveLogicInfo(string BSNO, string PROPNAME, string NAME, string VALUE)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
dic.Add(NAME, VALUE);
|
|
|
|
|
|
|
|
SaveLogicInfo(BSNO, PROPNAME, dic);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void SaveLogicSingleInfo(string BSNO, string PROPNAME, string VALUE)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CommonDataContext cdc = new CommonDataContext();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var result = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var infoList = cdc.OP_LOGICINFO.Where(x => x.BSNO == BSNO && x.PROPNAME == PROPNAME).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (infoList != null && infoList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var updrec = infoList[0];
|
|
|
|
|
|
|
|
updrec.PROPVALUE = VALUE;
|
|
|
|
|
|
|
|
cdc.OP_LOGICINFO.AddOrUpdate(updrec);
|
|
|
|
|
|
|
|
cdc.SaveChanges();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var newinfo = new OP_LOGICINFO_md();
|
|
|
|
|
|
|
|
newinfo.GID = Guid.NewGuid();
|
|
|
|
|
|
|
|
newinfo.BSNO = BSNO;
|
|
|
|
|
|
|
|
newinfo.PROPNAME = PROPNAME;
|
|
|
|
|
|
|
|
newinfo.PROPVALUE = VALUE;
|
|
|
|
|
|
|
|
cdc.OP_LOGICINFO.Add(newinfo);
|
|
|
|
|
|
|
|
cdc.SaveChanges();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static Dictionary<string, string> GetLogicHaveValue(string PROPNAME, string fieldname, string fieldvalue)
|
|
|
|
public static Dictionary<string, string> GetLogicHaveValue(string PROPNAME, string fieldname, string fieldvalue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
@ -5063,9 +5111,11 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
|
|
|
|
|
|
|
if (infoList != null && infoList.Count > 0)
|
|
|
|
if (infoList != null && infoList.Count > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach (var item in infoList) {
|
|
|
|
foreach (var item in infoList)
|
|
|
|
|
|
|
|
{
|
|
|
|
var lv = StrToDic(infoList[0].PROPVALUE);
|
|
|
|
var lv = StrToDic(infoList[0].PROPVALUE);
|
|
|
|
if (lv[fieldname] == fieldvalue) {
|
|
|
|
if (lv[fieldname] == fieldvalue)
|
|
|
|
|
|
|
|
{
|
|
|
|
result = lv;
|
|
|
|
result = lv;
|
|
|
|
result.Add("BSNO", item.BSNO);
|
|
|
|
result.Add("BSNO", item.BSNO);
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
@ -5098,8 +5148,52 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static string GetLogicSingleInfo(string BSNO, string PROPNAME)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CommonDataContext cdc = new CommonDataContext();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var result = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var infoList = cdc.OP_LOGICINFO.Where(x => x.BSNO == BSNO && x.PROPNAME == PROPNAME).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (infoList != null && infoList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
result = infoList[0].PROPVALUE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void SaveLogicDicInfo(string BSNO, string PROPNAME, Dictionary<string, string> paramdic ,string savevalue)
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 某模块 的fieldname字段取value值时 ,另一个recfield字段取recvalue值
|
|
|
|
|
|
|
|
/// 用于存储逻辑上关联的字段的最近一次取值
|
|
|
|
|
|
|
|
/// 例如:op_other(陆运模块) customername='往来单位A' 时: transtype运输类型='海运进口'
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="formname"></param>
|
|
|
|
|
|
|
|
/// <param name="fieldname"></param>
|
|
|
|
|
|
|
|
/// <param name="value"></param>
|
|
|
|
|
|
|
|
/// <param name="recvalue"></param>
|
|
|
|
|
|
|
|
public static void 存储模块字段值最近对应取值(string formname, string fieldname, string value, string recfield, string recvalue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
dic.Add("fieldname", fieldname);
|
|
|
|
|
|
|
|
dic.Add("fieldvalue", value);
|
|
|
|
|
|
|
|
dic.Add("recfield", recfield);
|
|
|
|
|
|
|
|
//dic.Add("recvalue", recvalue);
|
|
|
|
|
|
|
|
SaveLogicDicInfo("模块字段值最近取值", formname, dic, recvalue);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static string 获取模块字段值最近取值(string formname, string fieldname, string value, string recfield)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
dic.Add("fieldname", fieldname);
|
|
|
|
|
|
|
|
dic.Add("fieldvalue", value);
|
|
|
|
|
|
|
|
dic.Add("recfield", recfield);
|
|
|
|
|
|
|
|
return GetLogicDicValue(formname, "模块字段值最近取值", dic, "recvalue");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void SaveLogicDicInfo(string BSNO, string PROPNAME, Dictionary<string, string> paramdic, string savevalue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
CommonDataContext cdc = new CommonDataContext();
|
|
|
|
CommonDataContext cdc = new CommonDataContext();
|
|
|
@ -5153,7 +5247,7 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
|
|
|
|
|
|
|
if (值匹配)
|
|
|
|
if (值匹配)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -5175,14 +5269,14 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string GetLogicDicValue(string PROPNAME, string bsno, Dictionary<string, string> paramdic,string fieldname)
|
|
|
|
public static string GetLogicDicValue(string PROPNAME, string bsno, Dictionary<string, string> paramdic, string fieldname)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
CommonDataContext cdc = new CommonDataContext();
|
|
|
|
CommonDataContext cdc = new CommonDataContext();
|
|
|
|
|
|
|
|
|
|
|
|
var result = "";
|
|
|
|
var result = "";
|
|
|
|
|
|
|
|
|
|
|
|
var infoList = cdc.OP_LOGICINFO.Where(x =>x.BSNO==bsno && x.PROPNAME == PROPNAME ).ToList();
|
|
|
|
var infoList = cdc.OP_LOGICINFO.Where(x => x.BSNO == bsno && x.PROPNAME == PROPNAME).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
var resultdic = new List<Dictionary<string, string>>();
|
|
|
|
var resultdic = new List<Dictionary<string, string>>();
|
|
|
|
|
|
|
|
|
|
|
@ -5193,7 +5287,8 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
var lv = StrToDic(item.PROPVALUE);
|
|
|
|
var lv = StrToDic(item.PROPVALUE);
|
|
|
|
|
|
|
|
|
|
|
|
var 值匹配 = true;
|
|
|
|
var 值匹配 = true;
|
|
|
|
foreach (var ParamDicItem in paramdic) {
|
|
|
|
foreach (var ParamDicItem in paramdic)
|
|
|
|
|
|
|
|
{
|
|
|
|
if (lv.ContainsKey(ParamDicItem.Key))
|
|
|
|
if (lv.ContainsKey(ParamDicItem.Key))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (lv[ParamDicItem.Key] == ParamDicItem.Value)
|
|
|
|
if (lv[ParamDicItem.Key] == ParamDicItem.Value)
|
|
|
@ -5205,49 +5300,23 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
值匹配 = false;
|
|
|
|
值匹配 = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
值匹配 = false;
|
|
|
|
值匹配 = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(值匹配)
|
|
|
|
if (值匹配)
|
|
|
|
resultdic.Add(lv);
|
|
|
|
resultdic.Add(lv);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (resultdic.Count > 0) {
|
|
|
|
if (resultdic.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
result = resultdic[0][fieldname];
|
|
|
|
result = resultdic[0][fieldname];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 某模块 的fieldname字段取value值时 ,另一个recfield字段取recvalue值
|
|
|
|
|
|
|
|
/// 用于存储逻辑上关联的字段的最近一次取值
|
|
|
|
|
|
|
|
/// 例如:op_other(陆运模块) customername='往来单位A' 时: transtype运输类型='海运进口'
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="formname"></param>
|
|
|
|
|
|
|
|
/// <param name="fieldname"></param>
|
|
|
|
|
|
|
|
/// <param name="value"></param>
|
|
|
|
|
|
|
|
/// <param name="recvalue"></param>
|
|
|
|
|
|
|
|
public static void 存储模块字段值最近对应取值(string formname, string fieldname, string value, string recfield, string recvalue)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
dic.Add("fieldname", fieldname);
|
|
|
|
|
|
|
|
dic.Add("fieldvalue", value);
|
|
|
|
|
|
|
|
dic.Add("recfield", recfield);
|
|
|
|
|
|
|
|
//dic.Add("recvalue", recvalue);
|
|
|
|
|
|
|
|
SaveLogicDicInfo("模块字段值最近取值", formname, dic, recvalue);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static string 获取模块字段值最近取值(string formname, string fieldname, string value, string recfield)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var dic = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
dic.Add("fieldname", fieldname);
|
|
|
|
|
|
|
|
dic.Add("fieldvalue", value);
|
|
|
|
|
|
|
|
dic.Add("recfield", recfield);
|
|
|
|
|
|
|
|
return GetLogicDicValue(formname, "模块字段值最近取值", dic, "recvalue");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region SaveLog
|
|
|
|
#region SaveLog
|
|
|
|