change - 串读逻辑修改:将01、02合并为一个标签,读取逻辑修改:gettaglist函数结果返回次数Count>2的数据

master
wenjy 2 years ago
parent eff39b28f9
commit da3191daa1

@ -44,25 +44,39 @@ namespace MaterialTraceability.Business
public List<TagInfo> gettaglist(string equipid, out ProEquip eq)
{
LogHelper.Info("进入gettaglist函数" + equipid);
List<TagInfo> taglist = new List<TagInfo>();
foreach (var equip in _equipList)
try
{
if (equip.equipId.ToString() == equipid)
LogHelper.Info("进入gettaglist函数" + equipid);
List<TagInfo> taglist = new List<TagInfo>();
List<TagInfo> result = new List<TagInfo>();
foreach (var equip in _equipList)
{
taglist = equip.DeviceAdapter.Device_GetTagInfoList(DeviceType.Mesnac_GRUR445, waitTime * 1000);
if (taglist.Count < 1)
if (equip.equipId.ToString() == equipid)
{
taglist = equip.DeviceAdapter.Device_GetTagInfoList(DeviceType.Mesnac_GRUR445, waitTime * 1000);
if (taglist.Count < 1)
{
taglist = equip.DeviceAdapter.Device_GetTagInfoList(DeviceType.Mesnac_GRUR445, waitTime * 1000);
}
eq = equip;
LogHelper.RfidLog("gettaglist函数结果" + JsonChange.ModeToJson(taglist));
#region 读取结果过滤,返回读取次数大于两次的数据 Add By WenJY 2023-05-11
result = taglist.Where(x => x.Count > 2).ToList();
LogHelper.Info($"gettaglist函数结果过滤返回读取次数大于2的数据{JsonChange.ModeToJson(result)}");
#endregion
return result;
}
eq = equip;
LogHelper.RfidLog("gettaglist函数结果" + JsonChange.ModeToJson(taglist));
return taglist;
}
eq = null;
LogHelper.Info($"gettaglist函数结果{JsonChange.ModeToJson(taglist)},设备编号{equipid};未匹配到设备信息;");
return taglist;
}
catch(Exception ex)
{
LogHelper.Info($"gettaglist函数异常{ex.Message}");
eq = null;
return null;
}
eq = null;
LogHelper.Info("gettaglist函数结果" + JsonChange.ModeToJson(taglist));
return taglist;
}
/// <summary>

@ -637,64 +637,6 @@ namespace MaterialTraceability.Business.Impl
}
#endregion
#region delete by wenjy 20221103 账比实物多时添加比例判断,如果比例大于指定设置时不进行拆分直接报警下料
//if (mesEaValue > realEaValue)
//{
// //计算比例
// int proportion = Convert.ToInt32(decimal.Parse((((decimal)mesEaValue - (decimal)realEaValue) / (decimal)mesEaValue).ToString("0.00")) * 100);
// //获取设置比例,读取配置文件中的参数SplitUpProportion
// string SplitUpProportion = GetSysConfigList("SysConfig").Where(s => s.paramKey == "SplitUpProportion").FirstOrDefault().paramValue;
// if (proportion > StringChange.ParseToInt(SplitUpProportion))
// {
// LogRefreshEvent?.Invoke(LogType.AlarmLog, String.Format("最后一卷MES账目{0},实物账目{1},数量调整比例{2}%大于设定值{3}%,不进行拆分", mesEaValue, realEaValue, proportion, SplitUpProportion));
// LogHelper.Info(String.Format("最后一卷MES账目{0},实物账目{1},数量调整比例{2}%大于设定值{3}%,不进行拆分下发下料信号", mesEaValue, realEaValue, proportion, SplitUpProportion));
// this.sendSuccess(position);
// return;
// }
//}
#endregion
#region 冷压留帐逻辑 add by liuwf
//// 帐比实物多,按照实物拆分
//if (mesEaValue > realEaValue)
//{
// LogHelper.Info("完工最后一卷,账目数量:" + mesEaValue + " 大于实物数量:" + realEaValue + ",按照实物拆分,不调整数量");
// //按照实物拆分,不调整数量
// if (!SpiltAccount(position, x, realEaValue, upMaterialInfo.bindSfc, upRecord, downRecord).Result)
// {
// LogHelper.Info(logStr + "拆分MES账目数量异常");
// continue;
// }
// else
// {
// i = i + 1;
// }
//}
//else // 帐比实物少,先按帐拆分,再调整为实物数量
//{
// LogHelper.Info("完工最后一卷,账目数量:" + mesEaValue + " 小于实物数量:" + realEaValue + ",先按帐拆分,再调整为实物数量");
// //拆分
// if (!SpiltAccount(position, x, mesEaValue, upMaterialInfo.bindSfc, upRecord, downRecord).Result)
// {
// LogHelper.Info(logStr + "拆分MES账目数量异常");
// continue;
// }
// else
// {
// i = i + 1;
// }
// //获取绑定的SFC
// string bindSfc = GetBindSfcByMes(x.bindRfid);
// //调整数量
// if (!UpdateMesEaValue(position, bindSfc, x.bindRfid, realEaValue))
// {
// LogRefreshEvent?.Invoke(LogType.MesLog, bindSfc + "数量调整失败");
// }
//}
#endregion
// 最后一卷全部按照账目数量拆分
LogHelper.Info(String.Format("最后一卷MES账目{0},实物账目{1},全部按照账目拆分", mesEaValue, realEaValue));
if (!SpiltAccount(position, x, mesEaValue, upMaterialInfo.bindSfc, upRecord, downRecord).Result)
@ -896,8 +838,6 @@ namespace MaterialTraceability.Business.Impl
LogHelper.Info(logStr + "通过MES接口获取放卷物料的EA值");
MiSFCQueryQtyServiceServiceParam sFCQueryQtyServiceServiceParam = new MiSFCQueryQtyServiceServiceParam()
{
//url = "http://lymesa.catlbattery.com:8103/atlmeswebservice/MiSFCQueryQtyServiceService?wsdl",
//site = "2100",
url = inifile.IniReadValue("MiSFCQueryQtyServiceServiceParam", "url"),
site = inifile.IniReadValue("MiSFCQueryQtyServiceServiceParam", "site"),
sfc = bindSfc
@ -970,18 +910,6 @@ namespace MaterialTraceability.Business.Impl
#endregion
MiBatchCompleteSfcAndAdujustQtyServiceServiceParam requestParam = new MiBatchCompleteSfcAndAdujustQtyServiceServiceParam()
{
//url = "http://lymesa.catlbattery.com:8103/atlmeswebservice/MiBatchCompleteSfcAndAdujustQtyServiceService?wsdl",
//site = "2100",
//sfcPre = upMaterialSfc,
//processLotPre = "",
//operation = appConfig.operation, //阳极ANCAP1 //阴极CACAP1
//operationRevision = "A",
//resource = appConfig.resource,
//user = "SUP_LYA_RF01",
//activity = "Z_PR571",
////modeProcessSfc = WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_NONE,
//modeProcessSfc = modeProcessSfc,
//sfcList = miBatchCompleteSfcAndAdujustQtySfcEntities,
url = inifile.IniReadValue("SplitSfcParam","url"),
site = inifile.IniReadValue("SplitSfcParam", "site"),
sfcPre = upMaterialSfc,
@ -2111,6 +2039,7 @@ namespace MaterialTraceability.Business.Impl
dcGroup = inifile.IniReadValue("MachineIntegrationServiceParam", "dcGroup"),
dcGroupRevision = inifile.IniReadValue("MachineIntegrationServiceParam", "dcGroupRevision"),
parametricArray = data,
user = inifile.IniReadValue("MachineIntegrationServiceParam", "user"),
modeProcessSfc = WebService.MachineIntegrationServiceService.ModeProcessSfc.MODE_COMPLETE_SFC_POST_DC
};
LogHelper.Info("上传MES数据接口请求参数" + JsonChange.ModeToJson(machineIntegrationServiceParam));
@ -2168,6 +2097,10 @@ namespace MaterialTraceability.Business.Impl
double S_TARGETCW = 0.00; // 单面目标净重
string upMaterialSfc = upRecord.UpMaterialId;
//获取涂布下料EA
//string upMaterialEaValue = GetUpMaterialQty(position,upMaterialInfo.bindSfc, logStr);
LogHelper.Info($"收卷轴:{LY_SJZ}");
#region 横向膜区
@ -2257,21 +2190,6 @@ namespace MaterialTraceability.Business.Impl
LogHelper.Info(String.Format("涂布来料膜卷号:{0};冷压上料膜卷号:{1};下料拆分膜卷号:{2}", upMaterialSfc, upRecord.Sfc, x.shaftName));
#region 注释内容 add 2023-02-25
/* string downSplitSfc = x.bindSfc;
var df = downSplitSfc.Substring(downSplitSfc.IndexOf("-") + 1, 2);
int recordAmount = StringChange.ParseToInt(df);
var tag = Convert.ToInt32(ConfigHelper.GetConfig("tagAmount"));
var splitAmount = Math.Ceiling(Convert.ToDouble(recordAmount) / Convert.ToDouble(tag));
LogHelper.Info($"纵向膜区第几轮:{splitAmount}");
LY_ZXMQ = Convert.ToInt32(splitAmount); */
#endregion
LY_ZXMQ = upLoadBusiness.GetLengthwaysArea(upMaterialSfc);
LogHelper.Info(String.Format("纵向膜区第几轮:{0}", LY_ZXMQ));
#endregion
@ -2342,10 +2260,6 @@ namespace MaterialTraceability.Business.Impl
TBDataServiceParam tbServiceParam = new TBDataServiceParam()
{
//url = "http://lymesa.catlbattery.com:8103/atlmeswebservice/GetParametricValueServiceService?wsdl",
//site = "2100",
//sfc = upMaterialSfc, //使用涂布膜卷号获取涂布重量特征数据
//memberlist = t
url = inifile.IniReadValue("TBParametricValueParam","url"),
site = inifile.IniReadValue("TBParametricValueParam", "site"),
sfc = upMaterialSfc, //使用涂布膜卷号获取涂布重量特征数据
@ -2366,7 +2280,6 @@ namespace MaterialTraceability.Business.Impl
if (item.parameter == "S_EIGENVALUE_1_2") LY_S_X02 = Convert.ToDouble((item.value));
if (item.parameter == "B_EIGENVALUE_1_1") LY_B_X01 = Convert.ToDouble((item.value));
if (item.parameter == "B_EIGENVALUE_1_2") LY_B_X02 = Convert.ToDouble((item.value));
if (item.parameter == "B_EIGENVALUE_1_2") LY_B_X02 = Convert.ToDouble((item.value));
if (item.parameter == "S_TARGETCW") S_TARGETCW = Convert.ToDouble((item.value));
}
@ -2383,7 +2296,7 @@ namespace MaterialTraceability.Business.Impl
if (item.parameter == "S_EIGENVALUE_3_1") LY_S_X01 = Convert.ToDouble((item.value));
if (item.parameter == "S_EIGENVALUE_3_2") LY_S_X02 = Convert.ToDouble((item.value));
if (item.parameter == "B_EIGENVALUE_3_1") LY_B_X01 = Convert.ToDouble((item.value));
if (item.parameter == "B_EIGENVALUE_2_2") LY_B_X02 = Convert.ToDouble((item.value));
if (item.parameter == "B_EIGENVALUE_3_2") LY_B_X02 = Convert.ToDouble((item.value));
if (item.parameter == "S_TARGETCW") S_TARGETCW = Convert.ToDouble((item.value));
}
if (LY_HXMQ == "左" && LY_ZXMQ != 1)

@ -570,9 +570,19 @@ namespace MaterialTraceability.Business.Impl
}
}
//收卷结束MES逻辑处理
DownMaterialEndByMes(position, shaftInfo, qty);
//增加上下轴拆分防呆,拆分时判断是否下轴,下轴拆分时判断该膜卷号之前拆分数量(下料记录数量)的奇偶数
//偶数不能拆分,奇数可以拆分
if(await spiltPreventDaze(position, shaftInfo))
{
writeError(position, 2);
LogRefreshEvent?.Invoke(LogType.AlarmLog, string.Format("{0}拆分异常,不允许直接拆分下收卷轴",logStr));
LogRefreshEvent?.Invoke(LogType.RfidLog, string.Format("{0}拆分异常,不允许直接拆分下收卷轴,先拆分上轴再执行下轴拆分", logStr));
}
else
{
//收卷结束MES逻辑处理
DownMaterialEndByMes(position, shaftInfo, qty);
}
}
catch (Exception ex)
{
@ -1335,11 +1345,18 @@ namespace MaterialTraceability.Business.Impl
//upLoadBusiness.SaveLogRecord(StringChange.ParseToInt(shaftInfo.positionId), "调用MES自动拆分接口");
WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc modeProcessSfc = WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_COMPLETE_SFC_POST_DC;
machineIntegrationParametricData[] datas = GetCcdTreetopAmount(position);
//所有品种添加CCD打标数上传过账模式统一改为只拆分不完工
//2023-03-28 设置打标数配置是否开启上传
if (appConfig.isUploadFlag)
{
modeProcessSfc = WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_NONE;
}
#region 重量特征数据上传 Add By wenjy 2022-12-02 过账模式只拆分不完工
if (upLoadBusiness.JudgeResourceIsUplpadData())
{
LogHelper.Info("190品种获取重量特征数据");
modeProcessSfc = WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_NONE;
//modeProcessSfc = WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_NONE;
datas = GetMaterialWeight(shaftInfo, position, shaftInfo.bindSfc).Result;
}
@ -1398,31 +1415,29 @@ namespace MaterialTraceability.Business.Impl
LogRefreshEvent?.Invoke(LogType.RfidLog, "MES自动拆分接口调用成功");
//upLoadBusiness.SaveLogRecord(StringChange.ParseToInt(shaftInfo.positionId), "MES自动拆分接口调用成功");
#region 重量特征数据上传 Add By wenjy 2022-12-02
if (upLoadBusiness.JudgeResourceIsUplpadData())
//Add By wenjy 2022-12-02
//Delete By wenjy 2023-03-24所有品种添加CCD打标数上传
//Update By wenjy 2023-03-28 配置文件配置是否开启上传
#region 重量特征数据上传
if (appConfig.isUploadFlag)
{
//上传重量特征数据、CCD打标数
string splitMaterialSfc = GetSfcByRfid(shaftInfo.bindRfid);
downRecord.Sfc = splitMaterialSfc;
downRecord.eaValue = qty;
downRecord.endTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
downRecordServices.Update(downRecord);
// ccd单独上传数据收集组*Y
// UpMQMesData1(position, GetCcdTreetopAmount(position), splitMaterialSfc);
if (UpMQMesData(position, datas, splitMaterialSfc,downRecord))
if (UpMQMesData(position, datas, splitMaterialSfc, downRecord))
{
LogHelper.Info("模切数据上传成功");
LogRefreshEvent?.Invoke(LogType.MesLog, "模切数据上传成功");
//upLoadBusiness.SaveLogRecord(position, "模切数据上传成功");
boolFlag = true;
}
else
{
LogHelper.Info("模切数据上传失败");
LogRefreshEvent?.Invoke(LogType.MesLog, "模切数据上传失败");
//upLoadBusiness.SaveLogRecord(position, "模切数据上传失败");
boolFlag = false;
}
}
@ -1431,6 +1446,8 @@ namespace MaterialTraceability.Business.Impl
boolFlag = true;
}
#endregion
}
return boolFlag;
}
@ -1961,34 +1978,6 @@ namespace MaterialTraceability.Business.Impl
}
}
/// <summary>
/// 放卷位四通道读写器读取
/// </summary>
/// <param name="ant"></param>
/// <returns></returns>
private string ReadEpcByPosition(int position)
{
List<int> positionList = new List<int>();
positionList.Add(position);
List<TagMessage> positionTag = equipBusiness.ReadEPCByAntanaGroup(positionList);
string epc = "";
//add by wenjy 判断读取结果是否为null 20220825
if (positionTag != null)
{
foreach (var Tag in positionTag)
{
if (Tag.position == position)
{
epc = Tag.EPC;
break;
}
}
}
return epc;
}
/// <summary>
/// 放卷位物料是否结束生产
/// </summary>
@ -2131,7 +2120,8 @@ namespace MaterialTraceability.Business.Impl
}
//读取协议更换
List<TagInfo> tagInfos = equipBusiness.ReadEpcByProduction(proEquip.equipId);
LogHelper.Info(String.Format("生产过程中定时读取{0}RFID卷筒标签{1}", logStr,JsonChange.ModeToJson(tagInfos)));
//存储数据
ProShaftInfo shaftInfo = this.GetShaftInfoByPosition(item).Result;
@ -2141,7 +2131,7 @@ namespace MaterialTraceability.Business.Impl
Expression<Func<ProTagInfo, bool>> queryExp = s1 => true;
queryExp = queryExp.And(x => x.PositionId == shaftInfo.id.ToString());
List<ProTagInfo> bindInfos = await tagInfoServices.Query(queryExp);
if (bindInfos.Count >= 100)
if (bindInfos.Count >= 12)
{
if (timer.Enabled)
{
@ -2220,23 +2210,25 @@ namespace MaterialTraceability.Business.Impl
List<TagInfo> tagInfoList = new List<TagInfo>();
if(tagInfos != null)
if (tagInfos != null)
{
int tagInfosLength = tagInfos.Count;
for(int i = 0; i < tagInfosLength; i++)
LogHelperBusiness.LogInfo($"生产过程中读取的RFID标签{JsonChange.ModeToJson(tagInfos)}");
var info = tagInfos.GroupBy(x => x.Epcstring.Substring(0, x.Epcstring.Length - 2));
foreach (var item in info)
{
var epcStr = item.Key;
var ecpCount = tagInfos.Where(x => x.Epcstring.Contains(epcStr)).Sum(a => Convert.ToInt32(a.Count));
TagInfo tagInfo = new TagInfo()
{
Count = StringChange.ParseToInt(tagInfos[i].Count),
RSSI = StringChange.ParseToInt(tagInfos[i].Rssi),
Antana = StringChange.ParseToInt(tagInfos[i].Antana),
PCstring = tagInfos[i].Pcstring,
EPCstring = tagInfos[i].Epcstring
Count = ecpCount,
EPCstring = epcStr + "01"
};
tagInfoList.Add(tagInfo);
}
}
LogHelper.Info($"筛选{logStr}生产过程中读取的RFID标签{JsonChange.ModeToJson(tagInfoList)}");
string result = equipBusiness.FilterEpcByProductionEnd(tagInfoList);
LogHelper.Info("获取最终RFID条码为" + result);
@ -2552,17 +2544,6 @@ namespace MaterialTraceability.Business.Impl
{
MachineIntegrationServiceParam machineIntegrationServiceParam = new MachineIntegrationServiceParam()
{
//url = "http://lymesa.catlbattery.com:8103/atlmeswebservice/MachineIntegrationServiceService?wsdl",
//site = "2100",
//sfc = splitSfc, //将数据上传至拆分后的膜卷号
//operation = appConfig.operation,
//operationRevision = "#",
//activityId = "EAP_WS",
//resource = appConfig.resource,
//dcGroup = upLoadBusiness.GerDcGroupByResource(),
//dcGroupRevision = "#",
//parametricArray = data,
//modeProcessSfc = WebService.MachineIntegrationServiceService.ModeProcessSfc.MODE_COMPLETE_SFC_POST_DC
url = inifile.IniReadValue("MachineIntegrationServiceParam","url"),
site = inifile.IniReadValue("MachineIntegrationServiceParam", "site"),
sfc = splitSfc, //将数据上传至拆分后的膜卷号
@ -2573,6 +2554,7 @@ namespace MaterialTraceability.Business.Impl
dcGroup = inifile.IniReadValue("MachineIntegrationServiceParam", "dcGroup"),
dcGroupRevision = inifile.IniReadValue("MachineIntegrationServiceParam", "dcGroupRevision"),
parametricArray = data,
user = inifile.IniReadValue("MachineIntegrationServiceParam", "user"),
modeProcessSfc = WebService.MachineIntegrationServiceService.ModeProcessSfc.MODE_COMPLETE_SFC_POST_DC
};
@ -2627,7 +2609,7 @@ namespace MaterialTraceability.Business.Impl
operationRevision = inifile.IniReadValue("MachineIntegrationServiceParam", "operationRevision"),
activityId = inifile.IniReadValue("MachineIntegrationServiceParam", "activityId"),
resource = appConfig.resource,
dcGroup = "*Y",
dcGroup = inifile.IniReadValue("MachineIntegrationServiceParam", "dcGroup"),
dcGroupRevision = inifile.IniReadValue("MachineIntegrationServiceParam", "dcGroupRevision"),
parametricArray = data,
modeProcessSfc = WebService.MachineIntegrationServiceService.ModeProcessSfc.MODE_COMPLETE_SFC_POST_DC
@ -2855,5 +2837,38 @@ namespace MaterialTraceability.Business.Impl
LogHelper.Info("放卷结束,标识最后一卷收卷轴异常:"+ex.Message);
}
}
/// <summary>
/// 拆分顺序防呆,增加上下轴拆分防呆,拆分时判断是否下轴,下轴拆分时判断该膜卷号之前拆分数量(下料记录数量)的奇偶数
/// 偶数不能拆分,奇数可以拆分
/// Add by wenjy 2023-03-23
/// </summary>
/// <param name="positionId"></param>
/// <param name="shaftInfo"></param>
/// <returns>true:报警停机</returns>
private async Task<bool> spiltPreventDaze(int positionId,ProShaftInfo shaftInfo)
{
//判断卷轴位置上轴1、3奇数下轴2、4偶数
if (positionId % 2 == 0)
{
Expression<Func<ProDownRecord, bool>> exp = s1 => true;
exp = exp.And(x => x.Sfc.Contains(shaftInfo.bindSfc));
List<ProDownRecord> downRecords = await downRecordServices.Query(exp);
LogHelper.Info(string.Format("PositionId:{0};SFC:{1};下料记录:{2}", positionId, shaftInfo.bindSfc, downRecords.Count));
if (downRecords.Count % 2 == 0)
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
}
}

@ -12,6 +12,7 @@ namespace MaterialTraceability.Common
/// </summary>
public class INIFile
{
private string skey = "?S?)??[I";
public string path;
public INIFile(string INIPath)
@ -29,6 +30,8 @@ namespace MaterialTraceability.Common
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key, string defVal, Byte[] retVal, int size, string filePath);
[DllImport("kernel32", EntryPoint = "GetPrivateProfileString")]
private static extern uint GetPrivateProfileStringA(string section, string key, string def, Byte[] retVal, int size, string filePath);
/// <summary>
/// 写INI文件
@ -38,6 +41,11 @@ namespace MaterialTraceability.Common
/// <param name="Value"></param>
public void IniWriteValue(string Section, string Key, string Value)
{
if (Key == "password")
{
Value = MD5Helper.MD5Encrypt(Value, skey);
}
WritePrivateProfileString(Section, Key, Value, this.path);
}
@ -51,7 +59,14 @@ namespace MaterialTraceability.Common
{
StringBuilder temp = new StringBuilder(255);
int i = GetPrivateProfileString(Section, Key, "", temp, 255, this.path);
return temp.ToString();
//return temp.ToString();
string str = temp.ToString();
if (Key == "password" && !str.Contains("CA"))
{
str = MD5Helper.MD5Decrypt(str, skey);
}
return str;
}
public byte[] IniReadValues(string section, string key)
{
@ -77,5 +92,25 @@ namespace MaterialTraceability.Common
{
IniWriteValue(Section, null, null);
}
public List<string> ReadKeys(String SectionName)
{
return ReadKeys(SectionName, this.path);
}
public List<string> ReadKeys(string SectionName, string iniFilename)
{
List<string> result = new List<string>();
Byte[] buf = new Byte[65536];
uint len = GetPrivateProfileStringA(SectionName, null, null, buf, buf.Length, iniFilename);
int j = 0;
for (int i = 0; i < len; i++)
if (buf[i] == 0)
{
result.Add(Encoding.Default.GetString(buf, j, i - j));
j = i + 1;
}
return result;
}
}
}
}

@ -27,7 +27,6 @@ namespace MaterialTraceability.Common
/// <param name="ex"></param>
public static void Info(string msg)
{
Console.WriteLine(msg);
if (loginfo.IsInfoEnabled)
{
loginfo.Info(msg);
@ -40,10 +39,10 @@ namespace MaterialTraceability.Common
/// <param name="msg"></param>
public static void PlcLog(string msg)
{
if (logPlc.IsInfoEnabled)
/*if (logPlc.IsInfoEnabled)
{
logPlc.Info(msg);
}
}*/
}
/// <summary>
@ -52,10 +51,10 @@ namespace MaterialTraceability.Common
/// <param name="msg"></param>
public static void RfidLog(string msg)
{
if (logRfid.IsInfoEnabled)
/* if (logRfid.IsInfoEnabled)
{
logRfid.Info(msg);
}
}*/
}
/// <summary>
@ -64,10 +63,10 @@ namespace MaterialTraceability.Common
/// <param name="msg"></param>
public static void ViewLog(string msg)
{
if (logView.IsInfoEnabled)
/*if (logView.IsInfoEnabled)
{
logView.Info(msg);
}
}*/
}
public static void SqlLog(string msg)
@ -80,10 +79,10 @@ namespace MaterialTraceability.Common
public static void SemaphoreLog(string msg)
{
if (semaphorelog.IsInfoEnabled)
/*if (semaphorelog.IsInfoEnabled)
{
semaphorelog.Info(msg);
}
}*/
}
/// <summary>

@ -48,6 +48,8 @@ namespace MaterialTraceability.Entity.DTO
public string MesWebServiceTimeOut = iNIFile.IniReadValue("SystemConfig", "MesWebServiceTimeOut");
public bool isUploadFlag = iNIFile.IniReadValue("SystemConfig", "ccdUploadIsFlag") == "是" ? true : false;
public TbAddress TbAddress = TbAddress.Instance;
public LyAddress LyAddress = LyAddress.Instance;

@ -71,8 +71,7 @@ namespace MaterialTraceability.WebService
MiBatchCompleteSfcAndAdujustQty.MiBatchCompleteSfcAndAdujustQtyRequest.activity = miBatchCompleteSfcAndAdujustQtyServiceServiceParam.activity;
MiBatchCompleteSfcAndAdujustQty.MiBatchCompleteSfcAndAdujustQtyRequest.modeProcessSfc = miBatchCompleteSfcAndAdujustQtyServiceServiceParam.modeProcessSfc;
MiBatchCompleteSfcAndAdujustQty.MiBatchCompleteSfcAndAdujustQtyRequest.sfcList = miBatchCompleteSfcAndAdujustQtyServiceServiceParam.sfcList;
//MiBatchCompleteSfcAndAdujustQty.MiBatchCompleteSfcAndAdujustQtyRequest.taiMark = miBatchCompleteSfcAndAdujustQtyServiceServiceParam.tailmark;
MiBatchCompleteSfcAndAdujustQty.MiBatchCompleteSfcAndAdujustQtyRequest.tailMark = miBatchCompleteSfcAndAdujustQtyServiceServiceParam.tailmark;
DateTime beginTime = DateTime.Now;
@ -102,9 +101,10 @@ namespace MaterialTraceability.WebService
LogHelper.Error("mes接口调用异常", ex);
LogHelper.Info("mes接口调用异常" + ex.Message);
MessageBox.Show(" " + ex.Message+" ,请调大mes接口超时时间");
throw new Exception(" "+ex.Message);
}
throw new Exception(" " + ex.Message);
}
}
/// <summary>
/// 首工序获取SFC接口、自动入账接口、卷绕自动上料接口

@ -12,7 +12,7 @@ namespace MaterialTraceability.WebService.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -38,7 +38,7 @@ namespace MaterialTraceability.WebService.Properties {
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
[global::System.Configuration.DefaultSettingValueAttribute("http://lymesap224.catlbattery.com:50100/atlmeswebservice/MiBatchCompleteSfcAndAdu" +
[global::System.Configuration.DefaultSettingValueAttribute("http://lymesap226.catlbattery.com:50300/atlmeswebservice/MiBatchCompleteSfcAndAdu" +
"justQtyServiceService")]
public string MaterialTraceability_WebService_MiBatchCompleteSfcAndAdujustQtyServiceService_MiBatchCompleteSfcAndAdujustQtyServiceService {
get {

@ -6,7 +6,7 @@
<Value Profile="(Default)">http://lymesap227.catlbattery.com:50400/atlmeswebservice/MiSFCQueryQtyServiceService</Value>
</Setting>
<Setting Name="MaterialTraceability_WebService_MiBatchCompleteSfcAndAdujustQtyServiceService_MiBatchCompleteSfcAndAdujustQtyServiceService" Type="(Web Service URL)" Scope="Application">
<Value Profile="(Default)">http://lymesap224.catlbattery.com:50100/atlmeswebservice/MiBatchCompleteSfcAndAdujustQtyServiceService</Value>
<Value Profile="(Default)">http://lymesap226.catlbattery.com:50300/atlmeswebservice/MiBatchCompleteSfcAndAdujustQtyServiceService</Value>
</Setting>
<Setting Name="MaterialTraceability_WebService_WarehouseIntegrationServiceService_WarehouseIntegrationServiceService" Type="(Web Service URL)" Scope="Application">
<Value Profile="(Default)">http://lymesap225.catlbattery.com:50200/atlmeswebservice/WarehouseIntegrationServiceService</Value>

@ -5,7 +5,9 @@
<xs:element name="MiBatchCompleteSfcAndAdujustQty" type="tns:MiBatchCompleteSfcAndAdujustQty" />
<xs:element name="MiBatchCompleteSfcAndAdujustQtyResponse" type="tns:MiBatchCompleteSfcAndAdujustQtyResponse" />
<xs:element name="miBatchCompleteSfcAndAdujustQtyRequest" type="tns:miBatchCompleteSfcAndAdujustQtyRequest" />
<xs:element name="miBatchCompleteSfcAndAdujustQtyResponse" type="tns:miBatchCompleteSfcAndAdujustQtyResponse" />
<xs:element name="miBatchCompleteSfcAndAdujustQtySfcEntity" type="tns:miBatchCompleteSfcAndAdujustQtySfcEntity" />
<xs:element name="sfcAndProcessLotEntity" type="tns:sfcAndProcessLotEntity" />
<xs:complexType name="MiBatchCompleteSfcAndAdujustQty">
<xs:sequence>
<xs:element minOccurs="0" name="MiBatchCompleteSfcAndAdujustQtyRequest" type="tns:miBatchCompleteSfcAndAdujustQtyRequest" />
@ -23,6 +25,7 @@
<xs:element name="activity" type="xs:string" />
<xs:element name="modeProcessSfc" type="tns:ModeProcessSfc" />
<xs:element maxOccurs="unbounded" name="sfcList" type="tns:miBatchCompleteSfcAndAdujustQtySfcEntity" />
<xs:element minOccurs="0" name="tailMark" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="miBatchCompleteSfcAndAdujustQtySfcEntity">
@ -42,6 +45,11 @@
<xs:sequence>
<xs:element minOccurs="0" name="code" type="xs:int" />
<xs:element minOccurs="0" name="message" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded" name="entity" type="tns:sfcAndProcessLotEntity" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sfcAndProcessLotEntity">
<xs:sequence>
<xs:element minOccurs="0" name="processLot" type="xs:string" />
<xs:element minOccurs="0" name="sfc" type="xs:string" />
</xs:sequence>
@ -84,7 +92,7 @@
</wsdl:binding>
<wsdl:service name="MiBatchCompleteSfcAndAdujustQtyServiceService">
<wsdl:port name="MiBatchCompleteSfcAndAdujustQtyServicePort" binding="tns:MiBatchCompleteSfcAndAdujustQtyServiceBinding">
<address location="http://lymesap224.catlbattery.com:50100/atlmeswebservice/MiBatchCompleteSfcAndAdujustQtyServiceService" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" />
<address location="http://lymesap226.catlbattery.com:50300/atlmeswebservice/MiBatchCompleteSfcAndAdujustQtyServiceService" xmlns="http://schemas.xmlsoap.org/wsdl/soap/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

@ -23,7 +23,7 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3761.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="MiBatchCompleteSfcAndAdujustQtyServiceBinding", Namespace="http://machineintegration.ws.atlmes.com/")]
@ -122,7 +122,7 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
@ -144,7 +144,7 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
@ -171,6 +171,8 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
private miBatchCompleteSfcAndAdujustQtySfcEntity[] sfcListField;
private string tailMarkField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string site {
@ -280,10 +282,21 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
this.sfcListField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string tailMark {
get {
return this.tailMarkField;
}
set {
this.tailMarkField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://machineintegration.ws.atlmes.com/")]
public enum ModeProcessSfc {
@ -308,7 +321,7 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
@ -369,7 +382,42 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://machineintegration.ws.atlmes.com/")]
public partial class sfcAndProcessLotEntity {
private string processLotField;
private string sfcField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string processLot {
get {
return this.processLotField;
}
set {
this.processLotField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string sfc {
get {
return this.sfcField;
}
set {
this.sfcField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
@ -382,9 +430,7 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
private string messageField;
private string processLotField;
private string sfcField;
private sfcAndProcessLotEntity[] entityField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
@ -420,30 +466,19 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string processLot {
[System.Xml.Serialization.XmlElementAttribute("entity", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public sfcAndProcessLotEntity[] entity {
get {
return this.processLotField;
return this.entityField;
}
set {
this.processLotField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string sfc {
get {
return this.sfcField;
}
set {
this.sfcField = value;
this.entityField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
@ -465,11 +500,11 @@ namespace MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyService
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3761.0")]
public delegate void MiBatchCompleteSfcAndAdujustQtyCompletedEventHandler(object sender, MiBatchCompleteSfcAndAdujustQtyCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.7.3190.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3761.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class MiBatchCompleteSfcAndAdujustQtyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {

@ -65,7 +65,8 @@ namespace MaterialTraceability.WebService
DataRow dtRow7 = dt.NewRow();
dtRow7[0] = "返回SFC";
dtRow7[1] =responseParam != null ? responseParam.@return.sfc : "";
//dtRow7[1] =responseParam != null ? responseParam.@return.sfc : "";
dtRow7[1] = "";
dt.Rows.Add(dtRow7);
DataRow dtRow8 = dt.NewRow();

@ -13,7 +13,7 @@
</setting>
<setting name="MaterialTraceability_WebService_MiBatchCompleteSfcAndAdujustQtyServiceService_MiBatchCompleteSfcAndAdujustQtyServiceService"
serializeAs="String">
<value>http://lymesap224.catlbattery.com:50100/atlmeswebservice/MiBatchCompleteSfcAndAdujustQtyServiceService</value>
<value>http://lymesap226.catlbattery.com:50300/atlmeswebservice/MiBatchCompleteSfcAndAdujustQtyServiceService</value>
</setting>
<setting name="MaterialTraceability_WebService_WarehouseIntegrationServiceService_WarehouseIntegrationServiceService"
serializeAs="String">

@ -12,6 +12,7 @@ namespace MaterialTraceabilityUI.Common
/// </summary>
public class IniFileHelper
{
private string skey = "?S?)??[I";
public string path;
public IniFileHelper(string INIPath)
@ -40,6 +41,11 @@ namespace MaterialTraceabilityUI.Common
/// <param name="Value"></param>
public void IniWriteValue(string Section, string Key, string Value)
{
if(Key == "password")
{
Value = MD5Helper.MD5Encrypt(Value, skey);
}
WritePrivateProfileString(Section, Key, Value, this.path);
}
@ -53,7 +59,14 @@ namespace MaterialTraceabilityUI.Common
{
StringBuilder temp = new StringBuilder(255);
int i = GetPrivateProfileString(Section, Key, "", temp, 255, this.path);
return temp.ToString();
//return temp.ToString();
string str = temp.ToString();
if (Key == "password" && !str.Contains("CA"))
{
str = MD5Helper.MD5Decrypt(str, skey);
}
return str;
}
public byte[] IniReadValues(string section, string key)
{

@ -38,9 +38,11 @@
<Label Content="operationRevision" Height="30" FontSize="18" Foreground="#007DFA" Width="185" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="16,140,0,206.667"/>
<TextBox Height="26" FontSize="18" x:Name="AdujustQtyParamOperationRevision" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,144,0,206.334"/>
<Label Content="User" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="131,200,0,146.667"/>
<TextBox Height="26" FontSize="18" x:Name="AdujustQtyParamUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,199,0,151.334"/>
<TextBox Height="26" FontSize="18" x:Name="AdujustQtyParamUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="155" Margin="206,198,0,151.333"/>
<Label Content="activity" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="113,255,0,91"/>
<TextBox Height="26" FontSize="18" x:Name="AdujustQtyParamActivity" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="208,260,0,90"/>
<Label Content="PassWord" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="396,199,0,146.333"/>
<TextBox Height="26" FontSize="18" x:Name="AdujustQtyParamPassword" HorizontalAlignment="Left" VerticalAlignment="Center" Width="155" Margin="501,198,0,151.333"/>
</Grid>
</TabItem>
@ -55,13 +57,15 @@
<Label Content="operationRevision" Height="30" FontSize="18" Foreground="#007DFA" Width="185" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="11,140,0,206.334"/>
<TextBox Height="26" FontSize="18" x:Name="SplitSfcParamOperationRevision" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,144,0,206.334"/>
<Label Content="User" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="136,195,0,151.334"/>
<TextBox Height="26" FontSize="18" x:Name="SplitSfcParamUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,199,0,151.334"/>
<TextBox Height="26" FontSize="18" x:Name="SplitSfcParamUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="146" Margin="206,198,0,151.333"/>
<Label Content="activity" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="113,255,0,91"/>
<TextBox Height="26" FontSize="18" x:Name="SplitSfcParamActivity" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="208,260,0,90"/>
<Label Content="手动拆分用户:" Height="30" FontSize="18" Foreground="#007DFA" Width="147" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="61,316,0,29.333"/>
<TextBox Height="26" FontSize="18" x:Name="HandSplitSfcParamUser" HorizontalAlignment="Left" VerticalAlignment="Top" Width="144" Margin="208,320,0,0"/>
<Label Content="手动拆分密码:" Height="30" FontSize="18" Foreground="#007DFA" Width="126" VerticalAlignment="Top" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="375,316,0,0"/>
<TextBox Height="26" FontSize="18" x:Name="HandSplitSfcParamPwd" HorizontalAlignment="Left" VerticalAlignment="Top" Width="143" Margin="513,320,0,0" RenderTransformOrigin="0.281,0.692"/>
<Label Content="Password" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="386,194,0,151.333"/>
<TextBox Height="26" FontSize="18" x:Name="SplitSfcParamPassword" HorizontalAlignment="Left" VerticalAlignment="Center" Width="165" Margin="491,198,0,151.333" RenderTransformOrigin="0.509,0.5"/>
</Grid>
</Grid>
@ -69,18 +73,24 @@
<TabItem Header="自动入账">
<Grid Background="Transparent">
<Label Content="Url" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="146,35,0,311.667"/>
<TextBox Height="26" FontSize="18" Name="MiFirstOperationForsfcServiceServiceParamUrl" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,34,0,316.667" Grid.ColumnSpan="2"/>
<Label Content="Site" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="141,75,0,271.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamSite" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,79,0,271.667" Grid.ColumnSpan="2"/>
<Label Content="operationRevision" Height="35" FontSize="18" Foreground="#007DFA" Width="185" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="16,130,0,211.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamOperationRevision" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,134,0,216.667" Grid.ColumnSpan="2"/>
<Label Content="User" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="131,185,0,161.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,190,0,160.667" Grid.ColumnSpan="2"/>
<Label Content="activity" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="111,240,0,106.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamActivity" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,244,0,106.667" Grid.ColumnSpan="2"/>
<Label Content="modeProcessSfc" Height="35" FontSize="18" Foreground="#007DFA" Width="165" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="31,295,0,46.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamModeProcessSfc" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,299,0,51.667" Grid.ColumnSpan="2"/>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="276*"/>
<ColumnDefinition Width="473*"/>
</Grid.ColumnDefinitions>
<Label Content="Url" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="146,34,0,311.333"/>
<TextBox Height="26" FontSize="18" Name="MiFirstOperationForsfcServiceServiceParamUrl" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,33,0,316.333" Grid.ColumnSpan="2"/>
<Label Content="Site" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="141,74,0,271.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamSite" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,78,0,271.333" Grid.ColumnSpan="2"/>
<Label Content="operationRevision" Height="35" FontSize="18" Foreground="#007DFA" Width="185" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="16,129,0,211.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamOperationRevision" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,133,0,216.333" Grid.ColumnSpan="2"/>
<Label Content="User" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="131,184,0,161.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="167" Margin="206,189,0,160.333" Grid.ColumnSpan="2"/>
<Label Content="activity" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="111,239,0,106.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamActivity" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,243,0,106.333" Grid.ColumnSpan="2"/>
<Label Content="modeProcessSfc" Height="35" FontSize="18" Foreground="#007DFA" Width="165" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="31,294,0,46.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamModeProcessSfc" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,298,0,51.333" Grid.ColumnSpan="2"/>
<Label Content="Password" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="122.667,185,0,160.333" Grid.Column="1"/>
<TextBox Height="26" FontSize="18" x:Name="MiFirstOperationForsfcServiceServiceParamPassword" HorizontalAlignment="Left" VerticalAlignment="Center" Width="157" Margin="222.667,189,0,160.333" Grid.Column="1"/>
</Grid>
</TabItem>
@ -98,13 +108,14 @@
<Label Content="operationRevision" Height="30" FontSize="18" Foreground="#007DFA" Width="185" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="16,125,0,221.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiReleaseSfcWithActivityServiceServiceParamOperationRevision" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,134,0,216.667" Grid.ColumnSpan="2"/>
<Label Content="User" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="131,185,0,161.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiReleaseSfcWithActivityServiceServiceParamUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,190,0,160.667" Grid.ColumnSpan="2"/>
<TextBox Height="26" FontSize="18" x:Name="MiReleaseSfcWithActivityServiceServiceParamUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,189,0,160.333" Grid.ColumnSpan="2"/>
<Label Content="activity" Height="30" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="111,240,0,106.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiReleaseSfcWithActivityServiceServiceParamActivity" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,244,0,106.667" Grid.ColumnSpan="2"/>
<Label Content="loginUser" Height="35" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="91,295,0,46.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiReleaseSfcWithActivityServiceServiceParamLoginUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,299,0,51.667" Grid.ColumnSpan="2"/>
<Label Content="password" Height="40" FontSize="18" Foreground="#007DFA" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="91,340,0,-3.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiReleaseSfcWithActivityServiceServiceParamPassword" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,344,0,6.667" Grid.ColumnSpan="2"/>
</Grid>
</TabItem>
@ -114,6 +125,10 @@
<TextBox Height="26" FontSize="18" x:Name="MiSFCQueryQtyServiceServiceParamUrl" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="106,54,0,296.667"/>
<Label Content="site" Height="40" FontSize="18" Foreground="#007DFA" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="41,100,0,236.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiSFCQueryQtyServiceServiceParamSite" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="106,109,0,241.667"/>
<Label Content="user" Height="40" FontSize="18" Foreground="#007DFA" Width="98" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="41,157,0,178.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiSFCQueryQtyServiceServiceParamloginUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="149" Margin="106,165,0,184.333"/>
<Label Content="password" Height="40" FontSize="18" Foreground="#007DFA" Width="94" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="273,157,0,178.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiSFCQueryQtyServiceServiceParamPassword" HorizontalAlignment="Left" VerticalAlignment="Center" Width="184" Margin="372,165,0,184.333"/>
</Grid>
</TabItem>
@ -130,7 +145,11 @@
<Label Content="activityId" Height="35" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="91,235,0,106.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiSignOffSFCsServiceServiceParamActivityId" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,244,0,106.667"/>
<Label Content="amount" Height="35" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="101,295,0,46.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiSignOffSFCsServiceServiceParamAmount" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,299,0,51.667"/>
<TextBox Height="26" FontSize="18" x:Name="MiSignOffSFCsServiceServiceParamAmount" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="206,298,0,51.333"/>
<Label Content="loginUser" Height="35" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="101,336,0,4.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiSignOffSFCsServiceServiceParamloginUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="147" Margin="206,339,0,10.333"/>
<Label Content="password" Height="35" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="373,333,0,7.333"/>
<TextBox Height="26" FontSize="18" x:Name="MiSignOffSFCsServiceServiceParampassword" HorizontalAlignment="Left" VerticalAlignment="Center" Width="178" Margin="478,336,0,13.333"/>
</Grid>
</TabItem>
@ -141,6 +160,10 @@
<TextBox Height="26" FontSize="18" x:Name="FindShopRequestParamUrl" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="106,54,0,296.667"/>
<Label Content="site" Height="40" FontSize="18" Foreground="#007DFA" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="41,105,0,231.667"/>
<TextBox Height="26" FontSize="18" x:Name="FindShopRequestParamSite" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="106,109,0,241.667"/>
<Label Content="loginUser" Height="40" FontSize="18" Foreground="#007DFA" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="41,145,0,190.333"/>
<TextBox Height="26" FontSize="18" x:Name="FindShopRequestParamloginUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="117" Margin="146,145,0,204.333"/>
<Label Content="password" Height="40" FontSize="18" Foreground="#007DFA" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="297,145,0,190.333"/>
<TextBox Height="26" FontSize="18" x:Name="FindShopRequestParampassword" HorizontalAlignment="Left" VerticalAlignment="Center" Width="154" Margin="402,145,0,204.333"/>
</Grid>
</TabItem>
@ -158,6 +181,15 @@
<TextBox Height="26" FontSize="18" x:Name="MachineIntegrationServiceParamDcGroupRevision" HorizontalAlignment="Left" VerticalAlignment="Top" Width="93" Margin="562,235,0,0"/>
<Label Content="dcGroup" Height="30" FontSize="18" Foreground="#007DFA" Width="90" VerticalAlignment="Top" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="96,233,0,0"/>
<TextBox Height="26" FontSize="18" x:Name="MachineIntegrationServiceParamDcGroup" HorizontalAlignment="Left" VerticalAlignment="Top" Width="181" Margin="206,235,0,0"/>
<Label Content="password" Height="40" FontSize="18" Foreground="#007DFA" Width="100" VerticalAlignment="Top" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="418,276,0,0"/>
<TextBox Height="26" FontSize="18" x:Name="MachineIntegrationServiceParampassword" HorizontalAlignment="Left" VerticalAlignment="Top" Width="132" Margin="523,278,0,0"/>
<Label Content="loginUser" Height="40" FontSize="18" Foreground="#007DFA" Width="101" VerticalAlignment="Top" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="85,276,0,0"/>
<TextBox Height="26" FontSize="18" x:Name="MachineIntegrationServiceParamloginUser" HorizontalAlignment="Left" VerticalAlignment="Top" Width="181" Margin="206,278,0,0"/>
<Label Content="是否启用:" Height="40" FontSize="18" Foreground="#007DFA" Width="101" VerticalAlignment="Top" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="96,316,0,0"/>
<ComboBox Height="26" FontSize="18" x:Name="ccdUploadIsFlagCombox" HorizontalAlignment="Left" VerticalAlignment="Top" Width="181" Margin="206,316,0,0">
<ComboBoxItem Content="否"/>
<ComboBoxItem Content="是"/>
</ComboBox>
</Grid>
</TabItem>
@ -167,6 +199,10 @@
<TextBox Height="26" FontSize="18" x:Name="TBParametricValueParamUrl" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="106,54,0,296.667"/>
<Label Content="site" Height="40" FontSize="18" Foreground="#007DFA" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="41,100,0,236.667"/>
<TextBox Height="26" FontSize="18" x:Name="TBParametricValueParamSite" HorizontalAlignment="Left" VerticalAlignment="Center" Width="450" Margin="106,109,0,241.667"/>
<Label Content="loginUser" Height="40" FontSize="18" Foreground="#007DFA" Width="114" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="10,157,0,178.333"/>
<TextBox Height="26" FontSize="18" x:Name="TBParametricValueParamloginUser" HorizontalAlignment="Left" VerticalAlignment="Center" Width="171" Margin="106,166,0,183.333"/>
<Label Content="password" Height="40" FontSize="18" Foreground="#007DFA" Width="105" VerticalAlignment="Center" HorizontalAlignment="Left" RenderTransformOrigin="1.347,-4.605" Margin="282,157,0,178.333"/>
<TextBox Height="26" FontSize="18" x:Name="TBParametricValueParampassword" HorizontalAlignment="Left" VerticalAlignment="Center" Width="171" Margin="385,166,0,183.333"/>
</Grid>
</TabItem>
</TabControl>

@ -67,11 +67,13 @@ namespace MaterialTraceabilityUI
inifile.IniWriteValue("AdujustQtyParam", "operationRevision", this.AdujustQtyParamOperationRevision.Text);
inifile.IniWriteValue("AdujustQtyParam", "user", this.AdujustQtyParamUser.Text);
inifile.IniWriteValue("AdujustQtyParam", "activity", this.AdujustQtyParamActivity.Text);
inifile.IniWriteValue("AdujustQtyParam", "password", this.AdujustQtyParamPassword.Text);
// 新自动完工接口,Z_PR571拆分, SplitSfcParam节点
inifile.IniWriteValue("SplitSfcParam", "url", this.SplitSfcParamUrl.Text);
inifile.IniWriteValue("SplitSfcParam", "site", this.SplitSfcParamSite.Text);
inifile.IniWriteValue("SplitSfcParam", "operationRevision", this.SplitSfcParamOperationRevision.Text);
inifile.IniWriteValue("SplitSfcParam", "user", this.SplitSfcParamUser.Text);
inifile.IniWriteValue("SplitSfcParam", "password", this.SplitSfcParamPassword.Text);
inifile.IniWriteValue("SplitSfcParam", "activity", this.SplitSfcParamActivity.Text);
inifile.IniWriteValue("HandSplitSfcParam", "user", this.HandSplitSfcParamUser.Text);
inifile.IniWriteValue("HandSplitSfcParam", "password", this.HandSplitSfcParamPwd.Text);
@ -80,6 +82,7 @@ namespace MaterialTraceabilityUI
inifile.IniWriteValue("MiFirstOperationForsfcServiceServiceParam", "site", this.MiFirstOperationForsfcServiceServiceParamSite.Text);
inifile.IniWriteValue("MiFirstOperationForsfcServiceServiceParam", "operationRevision", this.MiFirstOperationForsfcServiceServiceParamOperationRevision.Text);
inifile.IniWriteValue("MiFirstOperationForsfcServiceServiceParam", "user", this.MiFirstOperationForsfcServiceServiceParamUser.Text);
inifile.IniWriteValue("MiFirstOperationForsfcServiceServiceParam", "password", this.MiFirstOperationForsfcServiceServiceParamPassword.Text);
inifile.IniWriteValue("MiFirstOperationForsfcServiceServiceParam", "activity", this.MiFirstOperationForsfcServiceServiceParamActivity.Text);
inifile.IniWriteValue("MiFirstOperationForsfcServiceServiceParam", "modeProcessSfc", this.MiFirstOperationForsfcServiceServiceParamModeProcessSfc.Text);
// 涂布工单下达MiReleaseSfcWithActivityServiceServiceParam节点
@ -93,6 +96,8 @@ namespace MaterialTraceabilityUI
// 获取SFC数量 MiSFCQueryQtyServiceServiceParam节点
inifile.IniWriteValue("MiSFCQueryQtyServiceServiceParam", "url", this.MiSFCQueryQtyServiceServiceParamUrl.Text);
inifile.IniWriteValue("MiSFCQueryQtyServiceServiceParam", "site", this.MiSFCQueryQtyServiceServiceParamSite.Text);
inifile.IniWriteValue("MiSFCQueryQtyServiceServiceParam", "loginUser", this.MiSFCQueryQtyServiceServiceParamloginUser.Text);
inifile.IniWriteValue("MiSFCQueryQtyServiceServiceParam", "password", this.MiSFCQueryQtyServiceServiceParamPassword.Text);
// 注销接口, MiSignOffSFCsServiceServiceParam节点
inifile.IniWriteValue("MiSignOffSFCsServiceServiceParam", "url", this.MiSignOffSFCsServiceServiceParamUrl.Text);
inifile.IniWriteValue("MiSignOffSFCsServiceServiceParam", "site", this.MiSignOffSFCsServiceServiceParamSite.Text);
@ -100,9 +105,13 @@ namespace MaterialTraceabilityUI
inifile.IniWriteValue("MiSignOffSFCsServiceServiceParam", "user", this.MiSignOffSFCsServiceServiceParamUser.Text);
inifile.IniWriteValue("MiSignOffSFCsServiceServiceParam", "activityId", this.MiSignOffSFCsServiceServiceParamActivityId.Text);
inifile.IniWriteValue("MiSignOffSFCsServiceServiceParam", "amount", this.MiSignOffSFCsServiceServiceParamAmount.Text);
inifile.IniWriteValue("MiSignOffSFCsServiceServiceParam", "loginUser", this.MiSignOffSFCsServiceServiceParamloginUser.Text);
inifile.IniWriteValue("MiSignOffSFCsServiceServiceParam", "password", this.MiSignOffSFCsServiceServiceParampassword.Text);
// 获取工单数量FindShopRequestParam节点
inifile.IniWriteValue("FindShopRequestParam", "url", this.FindShopRequestParamUrl.Text);
inifile.IniWriteValue("FindShopRequestParam", "site", this.FindShopRequestParamSite.Text);
inifile.IniWriteValue("FindShopRequestParam", "loginUser", this.FindShopRequestParamloginUser.Text);
inifile.IniWriteValue("FindShopRequestParam", "password", this.FindShopRequestParampassword.Text);
// 物料特征数据上传接口,MachineIntegrationServiceParam接口
inifile.IniWriteValue("MachineIntegrationServiceParam", "url", this.MachineIntegrationServiceParamUrl.Text);
inifile.IniWriteValue("MachineIntegrationServiceParam", "site", this.MachineIntegrationServiceParamSite.Text);
@ -110,9 +119,13 @@ namespace MaterialTraceabilityUI
inifile.IniWriteValue("MachineIntegrationServiceParam", "activityId", this.MachineIntegrationServiceParamActivityId.Text);
inifile.IniWriteValue("MachineIntegrationServiceParam", "dcGroupRevision", this.MachineIntegrationServiceParamDcGroupRevision.Text);
inifile.IniWriteValue("MachineIntegrationServiceParam", "dcGroup", this.MachineIntegrationServiceParamDcGroup.Text);
inifile.IniWriteValue("MachineIntegrationServiceParam", "loginUser", this.MachineIntegrationServiceParamloginUser.Text);
inifile.IniWriteValue("MachineIntegrationServiceParam", "password", this.MachineIntegrationServiceParampassword.Text);
// 获取Mes数据TBParametricValueParam节点
inifile.IniWriteValue("TBParametricValueParam", "url", this.TBParametricValueParamUrl.Text);
inifile.IniWriteValue("TBParametricValueParam", "site", this.TBParametricValueParamSite.Text);
inifile.IniWriteValue("TBParametricValueParam", "loginUser", this.TBParametricValueParamloginUser.Text);
inifile.IniWriteValue("TBParametricValueParam", "password", this.TBParametricValueParampassword.Text);
// 系统参数配置SystemConfig节点
inifile2.IniWriteValue("SystemConfig", "plcAddress", this.AppConfigParamPlcAddress.Text);
@ -125,8 +138,18 @@ namespace MaterialTraceabilityUI
inifile2.IniWriteValue("SystemConfig", "isMesFlag", this.AppConfigParamIsMesFlag.Text);
inifile2.IniWriteValue("SystemConfig", "plcSingalReadTime", this.AppConfigParamPlcSingalReadTime.Text);
inifile2.IniWriteValue("SystemConfig", "MesWebServiceTimeOut", this.AppConfigParamMesWebServiceTimeOut.Text);
ComboBoxItem ccdUploadIsFlag = (ComboBoxItem)this.ccdUploadIsFlagCombox.SelectedItem;
if(ccdUploadIsFlag != null)
{
inifile2.IniWriteValue("SystemConfig", "ccdUploadIsFlag", ccdUploadIsFlag.Content.ToString());
}
else
{
inifile2.IniWriteValue("SystemConfig", "ccdUploadIsFlag", "否");
}
List<ParamValueDto> plcParamValues = this.PlcParamValue.ItemsSource as List<ParamValueDto>;
foreach(ParamValueDto item in plcParamValues)
@ -157,11 +180,13 @@ namespace MaterialTraceabilityUI
this.AdujustQtyParamOperationRevision.Text = inifile.IniReadValue("AdujustQtyParam", "operationRevision");
this.AdujustQtyParamUser.Text = inifile.IniReadValue("AdujustQtyParam", "user");
this.AdujustQtyParamActivity.Text = inifile.IniReadValue("AdujustQtyParam", "activity");
this.AdujustQtyParamPassword.Text = inifile.IniReadValue("AdujustQtyParam", "password");
// 新自动完工接口,Z_PR571拆分, SplitSfcParam节点
this.SplitSfcParamUrl.Text = inifile.IniReadValue("SplitSfcParam", "url");
this.SplitSfcParamSite.Text = inifile.IniReadValue("SplitSfcParam", "site");
this.SplitSfcParamOperationRevision.Text = inifile.IniReadValue("SplitSfcParam", "operationRevision");
this.SplitSfcParamUser.Text = inifile.IniReadValue("SplitSfcParam", "user");
this.SplitSfcParamPassword.Text = inifile.IniReadValue("SplitSfcParam", "password");
this.SplitSfcParamActivity.Text = inifile.IniReadValue("SplitSfcParam", "activity");
this.HandSplitSfcParamUser.Text = inifile.IniReadValue("HandSplitSfcParam", "user");
this.HandSplitSfcParamPwd.Text = inifile.IniReadValue("HandSplitSfcParam", "password");
@ -170,6 +195,7 @@ namespace MaterialTraceabilityUI
this.MiFirstOperationForsfcServiceServiceParamSite.Text = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "site");
this.MiFirstOperationForsfcServiceServiceParamOperationRevision.Text = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "operationRevision");
this.MiFirstOperationForsfcServiceServiceParamUser.Text = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "user");
this.MiFirstOperationForsfcServiceServiceParamPassword.Text = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "password");
this.MiFirstOperationForsfcServiceServiceParamActivity.Text = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "activity");
this.MiFirstOperationForsfcServiceServiceParamModeProcessSfc.Text = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "modeProcessSfc");
// 涂布工单下达MiReleaseSfcWithActivityServiceServiceParam节点
@ -183,6 +209,8 @@ namespace MaterialTraceabilityUI
// 获取SFC数量 MiSFCQueryQtyServiceServiceParam节点
this.MiSFCQueryQtyServiceServiceParamUrl.Text = inifile.IniReadValue("MiSFCQueryQtyServiceServiceParam", "url");
this.MiSFCQueryQtyServiceServiceParamSite.Text = inifile.IniReadValue("MiSFCQueryQtyServiceServiceParam", "site");
this.MiSFCQueryQtyServiceServiceParamloginUser.Text = inifile.IniReadValue("MiSFCQueryQtyServiceServiceParam", "loginUser");
this.MiSFCQueryQtyServiceServiceParamPassword.Text = inifile.IniReadValue("MiSFCQueryQtyServiceServiceParam", "password");
// 注销接口, MiSignOffSFCsServiceServiceParam节点
this.MiSignOffSFCsServiceServiceParamUrl.Text = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "url");
this.MiSignOffSFCsServiceServiceParamSite.Text = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "site");
@ -190,9 +218,14 @@ namespace MaterialTraceabilityUI
this.MiSignOffSFCsServiceServiceParamUser.Text = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "user");
this.MiSignOffSFCsServiceServiceParamActivityId.Text = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "activityId");
this.MiSignOffSFCsServiceServiceParamAmount.Text = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "amount");
this.MiSignOffSFCsServiceServiceParamloginUser.Text = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "loginUser");
this.MiSignOffSFCsServiceServiceParampassword.Text = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "password");
// 获取工单数量FindShopRequestParam节点
this.FindShopRequestParamUrl.Text = inifile.IniReadValue("FindShopRequestParam", "url");
this.FindShopRequestParamSite.Text = inifile.IniReadValue("FindShopRequestParam", "site");
this.FindShopRequestParamloginUser.Text = inifile.IniReadValue("FindShopRequestParam", "loginUser");
this.FindShopRequestParampassword.Text = inifile.IniReadValue("FindShopRequestParam", "password");
// 物料特征数据上传接口,MachineIntegrationServiceParam接口
this.MachineIntegrationServiceParamUrl.Text = inifile.IniReadValue("MachineIntegrationServiceParam", "url");
this.MachineIntegrationServiceParamSite.Text = inifile.IniReadValue("MachineIntegrationServiceParam", "site");
@ -200,9 +233,13 @@ namespace MaterialTraceabilityUI
this.MachineIntegrationServiceParamActivityId.Text = inifile.IniReadValue("MachineIntegrationServiceParam", "activityId");
this.MachineIntegrationServiceParamDcGroupRevision.Text = inifile.IniReadValue("MachineIntegrationServiceParam", "dcGroupRevision");
this.MachineIntegrationServiceParamDcGroup.Text = inifile.IniReadValue("MachineIntegrationServiceParam", "dcGroup");
this.MachineIntegrationServiceParamloginUser.Text = inifile.IniReadValue("MachineIntegrationServiceParam", "loginUser");
this.MachineIntegrationServiceParampassword.Text = inifile.IniReadValue("MachineIntegrationServiceParam", "password");
// 获取Mes数据TBParametricValueParam节点
this.TBParametricValueParamUrl.Text = inifile.IniReadValue("TBParametricValueParam", "url");
this.TBParametricValueParamSite.Text = inifile.IniReadValue("TBParametricValueParam", "site");
this.TBParametricValueParamloginUser.Text = inifile.IniReadValue("TBParametricValueParam", "loginUser");
this.TBParametricValueParampassword.Text = inifile.IniReadValue("TBParametricValueParam", "password");
// 系统参数配置SystemConfig节点
this.AppConfigParamPlcAddress.Text = inifile2.IniReadValue("SystemConfig", "plcAddress");
this.AppConfigParamMachineID.Text = inifile2.IniReadValue("SystemConfig", "machineId");
@ -214,7 +251,7 @@ namespace MaterialTraceabilityUI
this.AppConfigParamOperationByA.Text = inifile2.IniReadValue("SystemConfig", "operationByA");
this.AppConfigParamOperationByB.Text = inifile2.IniReadValue("SystemConfig", "operationByB");
this.AppConfigParamMesWebServiceTimeOut.Text = inifile2.IniReadValue("SystemConfig", "MesWebServiceTimeOut");
this.ccdUploadIsFlagCombox.Text = inifile2.IniReadValue("SystemConfig", "ccdUploadIsFlag");
//获取PLC配置
List<string> plcParamValues = plcIniFile.ReadKeys(iniSection);
List<ParamValueDto> paramValues = new List<ParamValueDto>();

@ -1,4 +1,5 @@
using AutoUpdaterDotNET;
using GRreader;
using MaterialTraceability.Business;
using MaterialTraceability.Entity.DAO;
using MaterialTraceability.Entity.DTO;
@ -13,11 +14,13 @@ using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Media.Imaging;
using static System.Net.Mime.MediaTypeNames;
namespace MaterialTraceabilityUI
{
@ -51,6 +54,7 @@ namespace MaterialTraceabilityUI
{
try
{
test();
InitializeComponent();
AutoUpdater.Start("file://172.21.19.24/temp每天凌晨2点清理/临时文件/BHL/RFID物料追溯系统-现场更新/溧阳五程序/update.xml");
LogHelperBusiness.LogInfo("版本获取地址file://172.21.19.24/temp每天凌晨2点清理/临时文件/BHL/RFID物料追溯系统-现场更新/溧阳五程序/update.xml");
@ -74,7 +78,7 @@ namespace MaterialTraceabilityUI
DataContext = this;
MainBusiness.ViewModelRefreshEvent += PlcStatus;
WriteIniByConfig();
//WriteIniByConfig();
new MainBusiness();
} catch (Exception ex)
{
@ -82,6 +86,47 @@ namespace MaterialTraceabilityUI
}
}
/// <summary>
/// 串读过滤方法测试
/// </summary>
private async void test()
{
IBaseServices<ProTagInfo> tagInfoServices = new BaseServices<ProTagInfo>();
Expression<Func<ProTagInfo, bool>> exp = s1 => true;
exp = exp.And(x => x.PositionId == "4");
List<ProTagInfo> tagInfos = await tagInfoServices.Query(exp);
if (tagInfos == null)
{
return;
}
List<TagInfo> tagInfoList = new List<TagInfo>();
if (tagInfos != null)
{
LogHelperBusiness.LogInfo($"生产过程中读取的RFID标签{JsonChange.ModeToJson(tagInfos)}");
var info = tagInfos.GroupBy(x => x.Epcstring.Substring(0,x.Epcstring.Length-2));
foreach (var item in info)
{
var epcStr = item.Key;
var ecpCount = tagInfos.Where(x => x.Epcstring.Contains(epcStr)).Sum(a => Convert.ToInt32(a.Count));
TagInfo tagInfo = new TagInfo()
{
Count = ecpCount,
EPCstring = epcStr+"01"
};
tagInfoList.Add(tagInfo);
}
}
LogHelperBusiness.LogInfo($"筛选生产过程中读取的RFID标签{JsonChange.ModeToJson(tagInfoList)}");
string result = new EquipBusiness().FilterEpcByProductionEnd(tagInfoList);
LogHelperBusiness.LogInfo("获取最终RFID条码为" + result);
}
private void WriteIniByConfig()
{
//initFlag

@ -45,6 +45,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\dll\AutoUpdater.NET.dll</HintPath>
</Reference>
<Reference Include="GRreader, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\UnitTestProject\bin\Debug\GRreader.dll</HintPath>
</Reference>
<Reference Include="Lierda.WPFHelper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cbb49eab16984ff2, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\dll\Lierda.WPFHelper.dll</HintPath>

@ -51,5 +51,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.5.7")]
[assembly: AssemblyVersion("1.0.6.6")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -8,6 +8,8 @@ using MaterialTraceability.SqlSugar.ServiceImpl;
using MaterialTraceability.WebService;
using MaterialTraceability.WebService.MachineIntegrationServiceService;
using MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyServiceService;
using MaterialTraceability.WebService.MiFirstOperationForsfcServiceService;
using MaterialTraceability.WebService.MiSignOffSFCsServiceService;
using MaterialTraceability.WebService.Param;
using MaterialTraceabilityUI.Common;
using SqlSugar;
@ -47,14 +49,24 @@ namespace MaterialTraceabilityUI
InitializeComponent();
}
private void Split(string rfidStr,string eaStr,string sfcStr,int positionId)
private async void Split(string rfidStr, string eaStr, string sfcStr, int positionId)
{
LogHelperBusiness.LogInfo(String.Format("进入手动拆分处理RFID条码{0};放卷位膜卷号:{1};ea值{2};位置编号:{3}", rfidStr, sfcStr, eaStr, positionId));
MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc modeProcessSfc = MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_COMPLETE_SFC_POST_DC;
if (upLoadBusiness.JudgeResourceIsUplpadData())
{
modeProcessSfc = MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_NONE;
if (appConfig.processId == "LY_A")
{
if (upLoadBusiness.JudgeResourceIsUplpadData())
{
modeProcessSfc = MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_NONE;
}
}
else
{
if (appConfig.isUploadFlag)
{
modeProcessSfc = MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_NONE;
}
}
miBatchCompleteSfcAndAdujustQtySfcEntity[] miBatchCompleteSfcAndAdujustQtySfcEntities = new miBatchCompleteSfcAndAdujustQtySfcEntity[]
@ -85,19 +97,41 @@ namespace MaterialTraceabilityUI
//判断是否为模切工序,上传最后一卷标识
if (appConfig.processId == "MQ_A")
{
ComboBoxItem endFlag = (ComboBoxItem)this.endFlagCombox.SelectedItem;
if (endFlag.Content.ToString() != null && endFlag.Content.ToString() != "")
{
if (endFlag.Content.ToString() == "是")
{
requestParam.tailmark = "X";
}
if (await spiltPreventDaze(positionId, sfcStr))
{
MessageBox.Show("手动拆分异常,不允许直接拆分下收卷轴");
return;
}
else
{
MessageBox.Show("请选择是否为最后一卷");
#region 注释代码
/*ComboBoxItem endFlag = (ComboBoxItem)this.endFlagCombox.SelectedItem;
if (endFlag.Content.ToString() != null && endFlag.Content.ToString() != "")
{
if (endFlag.Content.ToString() == "是")
{
requestParam.tailmark = "X";
}
}
else
{
MessageBox.Show("请选择是否为最后一卷");
return;
}*/
#endregion
//通过数据库获取最后一卷标记
string tailmark = await GetTailmark(rfidStr,positionId,0);
if (!string.IsNullOrEmpty(tailmark))
{
requestParam.tailmark = tailmark;
}
}
}
LogHelperBusiness.LogInfo("MES自动拆分接口请求参数" + JsonChange.ModeToJson(requestParam));
@ -115,16 +149,35 @@ namespace MaterialTraceabilityUI
else
{
string splitSfc = GetSfcByRfid(rfidStr);
if (upLoadBusiness.JudgeResourceIsUplpadData())
if(appConfig.processId == "LY_A")
{
MessageBox.Show("手动拆分成功完工处理ea:" + eaStr);
//获取拆分后的膜卷号
Complete(sfcStr, splitSfc, rfidStr,positionId, eaStr);
if (upLoadBusiness.JudgeResourceIsUplpadData())
{
MessageBox.Show("手动拆分成功完工处理ea:" + eaStr);
//获取拆分后的膜卷号
Complete(sfcStr, splitSfc, rfidStr, positionId, eaStr);
}
else
{
MessageBox.Show("手动拆分成功ea:" + eaStr);
UpdateDownRecord(positionId, rfidStr, splitSfc, eaStr);
}
}
else
{
MessageBox.Show("手动拆分成功ea:"+ eaStr);
UpdateDownRecord(positionId, rfidStr, splitSfc, eaStr);
if (appConfig.isUploadFlag)
{
MessageBox.Show("手动拆分成功完工处理ea:" + eaStr);
//获取拆分后的膜卷号
Complete(sfcStr, splitSfc, rfidStr, positionId, eaStr);
}
else
{
MessageBox.Show("手动拆分成功ea:" + eaStr);
UpdateDownRecord(positionId, rfidStr, splitSfc, eaStr);
}
}
}
@ -151,7 +204,17 @@ namespace MaterialTraceabilityUI
MessageBox.Show("请输入CCD打标数");
return;
}
data = GetMqMaterialFeature(sfcStr, positionId);
if (upLoadBusiness.JudgeResourceIsUplpadData())
{
data = GetMqMaterialFeature(sfcStr, positionId);
}
else
{
data = new machineIntegrationParametricData[]
{
new machineIntegrationParametricData() { name = "CCD", dataType = ParameterDataType.TEXT, value = StringExtension.IsBlank(ccdLableAmount) ? "0" : ccdLableAmount }
};
}
LogHelperBusiness.LogInfo("模切物料特征数据:" + JsonChange.ModeToJson(data));
}
else if (appConfig.processId.Contains("LY"))
@ -415,7 +478,7 @@ namespace MaterialTraceabilityUI
lyUpLoad.recordTime = dataRow["recordTime"].ToString();
}
}
LogHelperBusiness.LogInfo(string.Format("收卷轴Id{0},收卷轴:{1}",positionId, shaftName));
if (lyUpLoad != null)
{
machineIntegrationParametricData[] data = {
@ -431,6 +494,7 @@ namespace MaterialTraceabilityUI
new machineIntegrationParametricData() {name ="LY_B_X02",dataType=ParameterDataType.TEXT, value=string.IsNullOrEmpty(lyUpLoad.bx02)?"0":lyUpLoad.bx02},
new machineIntegrationParametricData() {name ="S_TARGETCW",dataType=ParameterDataType.TEXT, value=string.IsNullOrEmpty(lyUpLoad.s_targetcws)?"0":lyUpLoad.s_targetcws},
};
LogHelperBusiness.LogInfo(string.Format("收卷轴:{0}", shaftName));
return data;
}
else
@ -453,7 +517,6 @@ namespace MaterialTraceabilityUI
new machineIntegrationParametricData() {name ="S_TARGETCW",dataType=ParameterDataType.TEXT, value="0"},
};
return data;
}
else
@ -643,6 +706,12 @@ namespace MaterialTraceabilityUI
return;
}
if (!string.IsNullOrEmpty(downRecord.Sfc))
{
MessageBox.Show($"该物料已经拆分不允许再次拆分,如需完工请点击完工按钮,对应膜卷号为:{downRecord.Sfc}");
return;
}
if (StringExtension.IsBlank(sfcTextBox.Text))
{
MessageBox.Show("请输入放卷位SFC");
@ -659,23 +728,41 @@ namespace MaterialTraceabilityUI
eaStr = eaTextBox.Text;
}
//判断是否为冷压工序是否为最后一卷最后一卷按照MES EA进行拆分
if (appConfig.processId == "LY_A")
if (Convert.ToString(this.endFlagCombox.SelectedItem) != "")
{
if (Convert.ToString(this.endFlagCombox.SelectedItem) != "")
ComboBoxItem endFlag = (ComboBoxItem)this.endFlagCombox.SelectedItem;
if (endFlag.Content.ToString() != null && endFlag.Content.ToString() != "")
{
ComboBoxItem endFlag = (ComboBoxItem)this.endFlagCombox.SelectedItem;
if (endFlag.Content.ToString() != null && endFlag.Content.ToString() != "")
if (endFlag.Content.ToString() == "")
{
if (endFlag.Content.ToString() == "是")
if (appConfig.processId == "LY_A")
{
eaStr = GetUpMaterialQty(sfcTextBox.Text);
}
else if (appConfig.processId == "MQ_A")
{
eaStr = GetUpMaterialQty(downRecord.PositionId, sfcTextBox.Text);
var mesEa = GetUpMaterialQty(sfcTextBox.Text);
if (Convert.ToInt32(eaStr) > Convert.ToInt32(mesEa))
{
#region MES注销SFC接口
if (!SignOffSFCs(sfcTextBox.Text)) return;
#endregion
#region MES调整数量接口
if (!AdujustQtySfcByMes(sfcTextBox.Text, Convert.ToInt32(eaStr))) return;
#endregion
#region MES入账开始接口
if (!SFCBegin(sfcTextBox.Text)) return;
#endregion
}
}
}
}
}
Split(downRecord.Rfid, eaStr, sfcTextBox.Text, downRecord.PositionId);
}
@ -720,10 +807,14 @@ namespace MaterialTraceabilityUI
private string GetLyShaftName(int positionId)
{
string shaftName = "";
if (positionId == 1) shaftName = "1A轴";
if (positionId == 2) shaftName = "1B轴";
if (positionId == 3) shaftName = "2A轴";
if (positionId == 4) shaftName = "2B轴";
if (positionId == 1) shaftName = "1A轴内侧";
if (positionId == 2) shaftName = "1A轴外侧";
if (positionId == 3) shaftName = "1B轴外侧";
if (positionId == 4) shaftName = "1B轴内侧";
if (positionId == 5) shaftName = "2A轴内侧";
if (positionId == 6) shaftName = "2A轴外侧";
if (positionId == 7) shaftName = "2B轴外侧";
if (positionId == 8) shaftName = "2B轴内侧";
return shaftName;
}
@ -732,7 +823,7 @@ namespace MaterialTraceabilityUI
/// </summary>
/// <param name="bindSfc"></param>
/// <returns></returns>
private string GetUpMaterialQty(int position, string bindSfc)
private string GetUpMaterialQty(string bindSfc)
{
MiSFCQueryQtyServiceServiceParam sFCQueryQtyServiceServiceParam = new MiSFCQueryQtyServiceServiceParam()
{
@ -765,6 +856,223 @@ namespace MaterialTraceabilityUI
return "";
}
}
/// <summary>
/// 注销SFC
/// </summary>
/// <param name="sfcStr"></param>
/// <returns></returns>
private bool SignOffSFCs(string sfcStr)
{
MiSignOffSFCsServiceServiceParam miSignOffSFCsServiceServiceParam = new MiSignOffSFCsServiceServiceParam()
{
url = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "url"),
site = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "site"),
user = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "user"),
operation = appConfig.operation,
operationRevision = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "operationRevision"),
activityId = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "activityId"),
Resource = appConfig.resource,
amount = inifile.IniReadValue("MiSignOffSFCsServiceServiceParam", "amount"),
sfcDataArray = null,
sfc = sfcStr,
};
DateTime beginTime = DateTime.Now;
try
{
LogHelperBusiness.LogInfo("调用MES注销SFC接口请求参数" + JsonChange.ModeToJson(miSignOffSFCsServiceServiceParam));
if (appConfig.isMesFlag == 1)
{
miSignOffSFCsResponse signOffSFCsResponse = MesWebServices.iMiSignOffSFCsServiceService(miSignOffSFCsServiceServiceParam);
LogHelperBusiness.LogInfo("调用MES注销SFC接口返回参数" + JsonChange.ModeToJson(signOffSFCsResponse));
if (signOffSFCsResponse == null || signOffSFCsResponse.@return.code > 0)
{
LogHelperBusiness.LogInfo("注销SFC接口调用失败" + signOffSFCsResponse.@return.message);
MessageBox.Show("注销SFC接口调用失败" + signOffSFCsResponse.@return.message);
return false;
}
}
}
catch (Exception ex)
{
LogHelperBusiness.LogInfo("注销SFC接口调用异常" + ex.Message);
MessageBox.Show("注销SFC接口调用异常" + ex.Message);
return false;
}
return true;
}
/// <summary>
/// 调整SFC MES账目数量
/// </summary>
/// <param name="sfcStr"></param>
/// <param name="PLCqty"></param>
/// <returns></returns>
private bool AdujustQtySfcByMes(string sfcStr, int PLCqty)
{
bool boolFlag = false;
try
{
MiBatchCompleteSfcAndAdujustQtyServiceServiceParam miBatchCompleteSfcAndAdujustQtyServiceServiceParam = new MiBatchCompleteSfcAndAdujustQtyServiceServiceParam()
{
url = inifile.IniReadValue("AdujustQtyParam", "url"),
site = inifile.IniReadValue("AdujustQtyParam", "site"),
sfcPre = sfcStr,
processLotPre = "",
operation = appConfig.operation,
operationRevision = inifile.IniReadValue("AdujustQtyParam", "operationRevision"),
resource = appConfig.resource,
user = inifile.IniReadValue("AdujustQtyParam", "user"),
activity = inifile.IniReadValue("AdujustQtyParam", "activity"),
modeProcessSfc = MaterialTraceability.WebService.MiBatchCompleteSfcAndAdujustQtyServiceService.ModeProcessSfc.MODE_NONE,
sfcList = new miBatchCompleteSfcAndAdujustQtySfcEntity[]
{
new miBatchCompleteSfcAndAdujustQtySfcEntity()
{
processLot = "",
sfc = sfcStr,
qty = PLCqty.ToString(),
unit = "EA"
}
}
};
LogHelperBusiness.LogInfo("MES调整数量接口请求参数" + JsonChange.ModeToJson(miBatchCompleteSfcAndAdujustQtyServiceServiceParam));
if (appConfig.isMesFlag == 1)
{
var requestResult = MesWebServices.iMiBatchCompleteSfcAndAdujustQtyServiceService(miBatchCompleteSfcAndAdujustQtyServiceServiceParam);
LogHelperBusiness.LogInfo("MES调整数量接口返回参数" + JsonChange.ModeToJson(requestResult));
if (requestResult.@return.code > 0)
{
LogHelperBusiness.LogInfo("MES调整数量接口调用失败" + upLoadBusiness.GetMesMessage(requestResult.@return.code, requestResult.@return.message));
MessageBox.Show("MES调整数量接口调用失败:" + upLoadBusiness.GetMesMessage(requestResult.@return.code, requestResult.@return.message));
}
else
{
boolFlag = true;
}
}
}
catch (Exception ex)
{
MessageBox.Show("MES调整数量接口调用异常:" + ex.Message);
}
return boolFlag;
}
/// <summary>
/// 自动入账开始SFC
/// </summary>
/// <param name="sfcStr"></param>
/// <returns></returns>
private bool SFCBegin(string sfcStr)
{
MiFirstOperationForsfcServiceServiceParam miFirstOperationForsfcServiceServiceParam = new MiFirstOperationForsfcServiceServiceParam()
{
url = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "url"),
site = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "site"),
sfc = sfcStr,
processLot = "",
operation = appConfig.operation,
operationRevision = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "operationRevision"),
resource = appConfig.resource,
user = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "user"),
activity = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "activity"),
modeProcessSfc = inifile.IniReadValue("MiFirstOperationForsfcServiceServiceParam", "modeProcessSfc"),
};
try
{
LogHelperBusiness.LogInfo("调用A面自动入账接口请求参数" + JsonChange.ModeToJson(miFirstOperationForsfcServiceServiceParam));
if (appConfig.isMesFlag == 1)
{
miFirstOperationForsfcResponse firstOperationForsfcResponse = MesWebServices.iMiFirstOperationForsfcServiceService(miFirstOperationForsfcServiceServiceParam);
LogHelperBusiness.LogInfo("调用A面自动入账接口返回参数" + JsonChange.ModeToJson(firstOperationForsfcResponse));
if (firstOperationForsfcResponse.@return.code > 0)
{
MessageBox.Show("MES自动入账开始接口调用失败" + firstOperationForsfcResponse.@return.message);
LogHelperBusiness.LogInfo("MES自动入账开始接口调用失败" + firstOperationForsfcResponse.@return.message);
return false;
}
}
}
catch (Exception ex)
{
MessageBox.Show("调用MES自动入账接口异常" + ex.Message);
LogHelperBusiness.LogInfo("调用MES自动入账接口异常" + ex.Message);
return false;
}
return true;
}
/// <summary>
/// 模切最后一卷防呆
/// </summary>
/// <param name="positionId"></param>
/// <param name="shaftInfo"></param>
/// <returns></returns>
private async Task<bool> spiltPreventDaze(int positionId, string bindSfc)
{
//判断卷轴位置上轴1、3奇数下轴2、4偶数
if (positionId % 2 == 0)
{
Expression<Func<ProDownRecord, bool>> exp = s1 => true;
exp = exp.And(x => x.Sfc.Contains(bindSfc));
List<ProDownRecord> downRecords = await baseServices.Query(exp);
LogHelperBusiness.LogInfo(string.Format("PositionId:{0};SFC:{1};下料记录:{2}", positionId, bindSfc, downRecords.Count));
if (downRecords.Count % 2 == 0)
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
/// <summary>
/// 通过数据库获取Tailmark标识
/// </summary>
/// <param name="rfid"></param>
/// <param name="positionId"></param>
/// <param name="is_production"></param>
/// <returns></returns>
private async Task<string> GetTailmark(string rfid,int positionId,int is_production)
{
try
{
Expression<Func<ProDownRecord, bool>> exp = s1 => true;
exp = exp.And(x => x.Rfid == rfid && x.PositionId == positionId && x.IsProduction == is_production);
Expression<Func<ProDownRecord, object>> order = s1 => s1.RecordTime;
ProDownRecord downRecord = await baseServices.QueryFirst(exp, order, false);
if (downRecord != null)
{
return downRecord.shaftNumber;
}
else
{
return "";
}
}catch (Exception)
{
return "";
}
}
}
}

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.0.4.5</version>
<version>1.0.6.5</version>
<url>file://172.21.19.24/temp每天凌晨2点清理/临时文件/BHL/RFID物料追溯系统-现场更新/溧阳五程序/Debug.zip</url>
<mandatory>false</mandatory>
</item>

@ -14,6 +14,7 @@ using System.Linq.Expressions;
using MaterialTraceability.Business;
using GRreader;
using System.Web.Services;
using MaterialTraceability.Entity.UpLoad;
namespace UnitTestProject
{
@ -29,7 +30,7 @@ namespace UnitTestProject
public void TestMesthodl1()
{
// string binSfc = "L22221110A0160"; LYLAPC022302150114 LYLAPA032302230128 LYLAPA032302230059-06
string binSfc = "LYLAPA032302230059-06";
string binSfc = "LYLAPC022303250141";
string LY_SJFX = "逆时针";//收卷轴方向
string LY_FJFX = "逆时针";//放卷轴方向
string LY_HXMQ = "左";//横向膜区方向
@ -541,55 +542,78 @@ namespace UnitTestProject
}
}
private EquipBusiness equipBusiness = new EquipBusiness();
private IBaseServices<ProTagInfo> tagInfoServices = new BaseServices<ProTagInfo>();
//------------------------------------------------------------------
[TestMethod]
public void MQTest1()
{
// 测试ccd上传
machineIntegrationParametricData[] data = {
new machineIntegrationParametricData() {name ="CCD",dataType=ParameterDataType.TEXT, value="1"}
};
MachineIntegrationServiceParam machineIntegrationServiceParam = new MachineIntegrationServiceParam()
{
url = "http://lymesa.catlbattery.com:8103/atlmeswebservice/MachineIntegrationServiceService?wsdl",
site = "2100",
sfc = "LYLAPC032302240101-05-01", //将数据上传至拆分后的膜卷号 LYLAPA032302240045-02-01
dcGroup = "*E",
operation = "CAEFS1",
parametricArray = data,
operationRevision = "#",
dcGroupRevision="#",
resource= "FTJIA068",
activityId = "EAP_WS",
};
LogHelper.Info("上传MES数据接口请求参数" + JsonChange.ModeToJson(machineIntegrationServiceParam));
var dataCollectForSfcExResponse = webService.machineIntegration(machineIntegrationServiceParam);
var dataCollectForSfcExResponseResult = dataCollectForSfcExResponse.@return;
test();
}
if (dataCollectForSfcExResponseResult.code > 0)
private async void test()
{
Expression<Func<ProTagInfo, bool>> exp = s1 => true;
exp = exp.And(x => x.PositionId == "12");
List<ProTagInfo> tagInfos = await tagInfoServices.Query(exp);
if (tagInfos == null)
{
LogHelper.Info("模切数据上传MES失败" + dataCollectForSfcExResponseResult.message);
return;
}
else
{
LogHelper.Info("模切数据上传MES成功");
List<TagInfo> tagInfoList = new List<TagInfo>();
if (tagInfos != null)
{
int tagInfosLength = tagInfos.Count;
for (int i = 0; i < tagInfosLength; i++)
{
TagInfo tagInfo = new TagInfo()
{
Count = StringChange.ParseToInt(tagInfos[i].Count),
RSSI = StringChange.ParseToInt(tagInfos[i].Rssi),
Antana = StringChange.ParseToInt(tagInfos[i].Antana),
PCstring = tagInfos[i].Pcstring,
EPCstring = tagInfos[i].Epcstring
};
tagInfoList.Add(tagInfo);
}
}
string result = equipBusiness.FilterEpcByProductionEnd(tagInfoList);
LogHelper.Info("获取最终RFID条码为" + result);
}
//-----------------------------------------------------------
[TestMethod]
public void getLyDataTest()
{
GetParametricValueRequestData[] parametricValueRequestDatas = new GetParametricValueRequestData[] {
/*GetParametricValueRequestData[] parametricValueRequestDatas = new GetParametricValueRequestData[] {
new GetParametricValueRequestData { parameter= "LY_WLMX" },
new GetParametricValueRequestData { parameter= "LY_S_X01" },
new GetParametricValueRequestData { parameter= "LY_S_X02" },
new GetParametricValueRequestData { parameter= "LY_B_X01" },
new GetParametricValueRequestData { parameter= "LY_B_X02" },
};
var lyMaterialCharacter = GetLyMaterialCharacter("L32221114A0071-02", parametricValueRequestDatas); //获取冷压特征数据
var lyMaterialCharacter = GetLyMaterialCharacter("L32221114A0071-02", parametricValueRequestDatas); //获取冷压特征数据*/
string info = "";
Dictionary<int, string> keyValuePairs = new Dictionary<int, string>();
for(int i = 0; i < 10; i++)
{
if (i % 2 == 0)
{
info = "偶数";
}
else
{
info = "奇数";
}
keyValuePairs.Add(i, info);
}
var result = keyValuePairs;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save