commit by yzf

master
Yang 3 years ago
parent 3c0d93c8ba
commit a957d510dd

@ -94,6 +94,22 @@ namespace FactorySystemApi.Controllers
}
else
{
if (inParam.ContainsKey("SP")&&!inParam.ContainsKey("FPlmCode"))
{
inParam.Add("FPlmCode", inParam["SP"].ToString());
}
if (inParam.ContainsKey("SP_VERSION")&& !inParam.ContainsKey("FVersionCode"))
{
inParam.Add("FVersionCode", inParam["SP_VERSION"].ToString());
}
if (inParam.ContainsKey("SP_VALUE")&&!inParam.ContainsKey("FTestCode"))
{
inParam.Add("FTestCode", inParam["SP_VALUE"].ToString());
}
List<TFS_FieldInfo> fieldList = BaseBll.GetFileInfoList((int)Constant.FieldInfoType.);
TFS_Formula formula = new TFS_Formula();
List<PropertyInfo> propertys = formula.GetType().GetProperties().ToList();
@ -102,6 +118,7 @@ namespace FactorySystemApi.Controllers
PropertyInfo temp = propertys.Find(s => s.Name == field.FColumnFIeld);
if (temp != null) temp.SetValue(formula, GetValueByName(inParam, field.FFieldName, field.FDefault));
}
if (string.IsNullOrEmpty(formula.FPlmCode))
{
apiResult.Error("FPlmCode不能为空");

@ -605,6 +605,10 @@ namespace FactorySystemApi.Controllers
OAService oAService = new OAService();
specifList[0].Code = formula.FTestCode;
specifList[0].Version = formula.FVersionCode;
specifList[0].SP = formula.FPlmCode;
specifList[0].SP_Version = formula.FVersionCode;
RestResult restResult = oAService.GetSpecificationsList(specifList.ToArray());
string bomStr = restResult.data == null ? "[]" : restResult.data.ToString();
ExceptionHelper.AddSystemJournal(Request, specifList[0], restResult,user.FID, "DockGetBomData");
@ -675,6 +679,11 @@ namespace FactorySystemApi.Controllers
OAService oAService = new OAService();
specifList[0].Code = teamwork.FNewTestCode;
specifList[0].Version = formula.FVersionCode;
specifList[0].SP = formula.FPlmCode;
specifList[0].SP_Version = formula.FVersionCode;
RestResult restResult = oAService.GetSpecificationsList(specifList.ToArray());
string bomStr = restResult.data == null ? "[]" : restResult.data.ToString();
ExceptionHelper.AddSystemJournal(Request, specifList[0], restResult, userId, "DockGetBomData");

@ -448,6 +448,11 @@ namespace FactorySystemApi.Controllers
OAService oAService = new OAService();
specifList[0].Code = formula.FTestCode;
specifList[0].Version = formula.FVersionCode;
//修改
specifList[0].SP = formula.FPlmCode;
specifList[0].SP_Version = formula.FVersionCode;
RestResult restResult = oAService.GetSpecificationsList(specifList.ToArray());
string bomStr = restResult.data == null ? "[]" : restResult.data.ToString();
ExceptionHelper.AddSystemJournal(Request, specifList[0], restResult,user.FID, "DockGetBomData");
@ -516,8 +521,14 @@ namespace FactorySystemApi.Controllers
{
TFS_Formula formula = BaseBll.GetTempModel<TFS_Formula>(teamwork.FFormulaID);
OAService oAService = new OAService();
specifList[0].Code = formula.FTestCode;
specifList[0].Version = formula.FVersionCode;
//修改
specifList[0].SP= formula.FPlmCode;
specifList[0].SP_Version= formula.FVersionCode;
RestResult restResult = oAService.GetSpecificationsList(specifList.ToArray());
string bomStr = restResult.data == null ? "[]" : restResult.data.ToString();
ExceptionHelper.AddSystemJournal(Request, specifList[0], restResult, userId, "DockGetBomData");
@ -622,6 +633,19 @@ namespace FactorySystemApi.Controllers
{
foreach (BomModel item in dataList)
{
if (!string.IsNullOrWhiteSpace(item.SP))
{
item.Code = item.SP;
}
if (!string.IsNullOrWhiteSpace(item.SP_Version))
{
item.Version=item.SP_Version;
}
if (!string.IsNullOrWhiteSpace(item.SP_VALUE))
{
item.TestNO = item.SP_VALUE;
}
int dataId = random.Next(1, 99) * random.Next(1, 99);
dataId += random.Next(10, 99) * random.Next(10, 99) * 2;
dataId += random.Next(1, 99) * random.Next(1, 99) * 10;

@ -186,6 +186,11 @@
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="App_Start\SwaggerConfig.cs" />
<Compile Include="App_Start\WebApiConfig.cs" />
<Compile Include="Connected Services\Sap_ViewMaterial\Reference.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="Controllers\CommonController.cs" />
<Compile Include="Controllers\BaseController.cs" />
<Compile Include="Controllers\HalfMaterialTaskController.cs" />
@ -243,6 +248,18 @@
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="Connected Services\Sap_ViewMaterial\configuration91.svcinfo" />
<None Include="Connected Services\Sap_ViewMaterial\configuration.svcinfo" />
<Content Include="Connected Services\Sap_ViewMaterial\FactorySystemApi.Sap_ViewMaterial.dt_pp079_resHEAD.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</Content>
<Content Include="Connected Services\Sap_ViewMaterial\FactorySystemApi.Sap_ViewMaterial.si_pp079_mcs_senderResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</Content>
<None Include="Connected Services\Sap_ViewMaterial\Reference.svcmap">
<Generator>WCF Proxy Generator</Generator>
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="Scripts\bootstrap.js" />
@ -252,6 +269,7 @@
<Content Include="File\Material\副产物导入模板.xlsx" />
<Content Include="File\Material\替代料导入模板.xlsx" />
<Content Include="File\Material\物料信息补全导入模板.xlsx" />
<None Include="Connected Services\Sap_ViewMaterial\si_pp079_mcs_sender.wsdl" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -396,6 +414,9 @@
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<WCFMetadataStorage Include="Connected Services\Sap_ViewMaterial\" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

@ -636,6 +636,10 @@ namespace FactorySystemApi.Plm_Formula {
private string versionField;
public string SP { get; set; }
public string SP_Version { get; set; }
/// <remarks/>
public string Code {
get {

@ -9,13 +9,33 @@ namespace FactorySystemModel.BusinessModel
Code = Name = Version = Type = Quantity = TestNO = "";
Specifications = new List<BomModel>();
}
public string Code { get; set; }
/// <summary>
/// PLM规格内码
/// </summary>
public string SP { get; set; }
public string Name { get; set; }
public string Version { get; set; }
/// <summary>
/// 规格英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string SP_Version { get; set; }
public string Type { get; set; }
/// <summary>
/// 实验号
/// </summary>
public string SP_VALUE { get; set; }
public string Code { get; set; }
public string Version { get; set; }
public string Quantity { get; set; }
public string TestNO { get; set; }
public List<BomModel> Specifications { get; set; }
}
/// <summary>

Loading…
Cancel
Save