|
@@ -1119,16 +1119,38 @@ namespace IMCS.CCS.Service.Impl
|
|
if (freeActionAdress != null)
|
|
if (freeActionAdress != null)
|
|
{*/
|
|
{*/
|
|
//根据sort顺序,查询左中右可取位置,写入地址列表
|
|
//根据sort顺序,查询左中右可取位置,写入地址列表
|
|
- CcsActionAddress actionAddressGet = new CcsActionAddress();
|
|
|
|
- actionAddressGet.Type = "CALLBACK_GET_COOR";
|
|
|
|
- actionAddressGet.Sort = key;
|
|
|
|
- List<CcsActionAddress> GetCcsActionAddresses = _ccsActionAddressService.GetList(actionAddressGet);
|
|
|
|
-
|
|
|
|
- //赋值测量结果
|
|
|
|
- requestData.result = tagValue2.TagValue;
|
|
|
|
- //赋值工位id
|
|
|
|
- requestData.stationId = "";// freeActionAdress.Address;
|
|
|
|
- foreach (CcsActionAddress actionAddress in GetCcsActionAddresses)
|
|
|
|
|
|
+ CcsActionAddress actionAddressGet = new CcsActionAddress();
|
|
|
|
+ actionAddressGet.Type = "CALLBACK_GET_COOR";
|
|
|
|
+ actionAddressGet.Sort = key;
|
|
|
|
+ List<CcsActionAddress> GetCcsActionAddresses = _ccsActionAddressService.GetList(actionAddressGet);
|
|
|
|
+
|
|
|
|
+ //赋值测量结果
|
|
|
|
+ requestData.result = tagValue2.TagValue;
|
|
|
|
+ //根据工件id确认哪个位置已测量,赋值工位id
|
|
|
|
+ string srcWorkId = task.CallbackFailValue3; //原工件id
|
|
|
|
+ var workIdResult = s7.ReadString(EnumHelper.GetDescription(ThreeCoordinatesFinishedWrokIdEnum.L));
|
|
|
|
+ if(workIdResult.ToString() == srcWorkId)
|
|
|
|
+ {
|
|
|
|
+ requestData.stationId = "L";
|
|
|
|
+ }
|
|
|
|
+ if (string.IsNullOrEmpty(requestData.stationId))
|
|
|
|
+ {
|
|
|
|
+ workIdResult = s7.ReadString(EnumHelper.GetDescription(ThreeCoordinatesFinishedWrokIdEnum.M));
|
|
|
|
+ if (workIdResult.ToString() == srcWorkId)
|
|
|
|
+ {
|
|
|
|
+ requestData.stationId = "M";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (string.IsNullOrEmpty(requestData.stationId))
|
|
|
|
+ {
|
|
|
|
+ workIdResult = s7.ReadString(EnumHelper.GetDescription(ThreeCoordinatesFinishedWrokIdEnum.R));
|
|
|
|
+ if (workIdResult.ToString() == srcWorkId)
|
|
|
|
+ {
|
|
|
|
+ requestData.stationId = "R";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ foreach (CcsActionAddress actionAddress in GetCcsActionAddresses)
|
|
{
|
|
{
|
|
if (!string.IsNullOrEmpty(actionAddress.Address))
|
|
if (!string.IsNullOrEmpty(actionAddress.Address))
|
|
{
|
|
{
|