Browse Source

修改

master
parent
commit
67c89aabb2
  1. 63
      ICS.CreateIssueIN/CreateIssue.cs
  2. 82
      ICS.CustCreateBFRTNSrvSub/CustCreateBFRTNSrvSub.cs
  3. 3
      ICS.CustCreateBFRTNSrvSub/ICS.CustCreateBFRTNSrvSub.csproj
  4. 39
      ICSSoft.U8.WebAPI/Web.config
  5. 8
      UFIDA.ISV.CreateMO/CustCreateMO.cs

63
ICS.CreateIssueIN/CreateIssue.cs

@ -16,7 +16,7 @@ namespace ICS.CreateIssueIN
{
public class CreateIssue
{
private static string ORGCode = ConfigurationManager.AppSettings["orgCode"].ToString();
//private static string ORGCode = ConfigurationManager.AppSettings["orgCode"].ToString();
public OperationResult CreateIssue1(List<IssueData> modellist)
{
OperationResult result = new OperationResult();
@ -28,7 +28,8 @@ namespace ICS.CreateIssueIN
beginstrlog.AppendLine("*****************************************************");
foreach (var model in modellist)
{
beginstrlog.AppendLine("生产订单:" + model.MOCODE);
beginstrlog.AppendLine("生产订单:" + model.MOCODE);
beginstrlog.AppendLine("组织:" + model.OrgCode);
foreach (var item in model.linelist)
{
@ -51,7 +52,7 @@ namespace ICS.CreateIssueIN
StringBuilder str = new StringBuilder();
string ORGCode = modellist[0].OrgCode;
string OrgID = "";
OrgID = Appconfig.IsExistsCode(ORGCode, "Base_Organization");
@ -149,13 +150,11 @@ namespace ICS.CreateIssueIN
foreach (IssueDatas line in model.linelist)
{
string ORGID = Appconfig.IsExistsCode(line.ORGCODE, "Base_Organization");
if (string.IsNullOrEmpty(ORGID))
{
throw new Exception("组织编码:" + line.ORGCODE + "在U9中不存在。");
}
//string ORGID = Appconfig.IsExistsCode(line.ORGCODE, "Base_Organization");
//if (string.IsNullOrEmpty(ORGID))
//{
// throw new Exception("组织编码:" + line.ORGCODE + "在U9中不存在。");
//}
pick.m_aCDType = 0;
@ -171,9 +170,9 @@ namespace ICS.CreateIssueIN
// 料品
string itemid = "";
orgsql = @"select id from CBO_ItemMaster where code=='{0}'";
orgsql = @"select id from CBO_ItemMaster where code='{0}'";
orgsql = string.Format(orgsql, line.ITEM);
orgdt = DBhlper.Query(orgsql, Appconfig.GetU9ConnStr());
orgdt = DBhlper.Query(orgsql, Appconfig.GetU9ConnStr());
if (orgdt.Rows.Count != 0)
itemid = orgdt.Rows[0]["ID"].ToString();
else
@ -198,13 +197,13 @@ namespace ICS.CreateIssueIN
// 应发数量
pick.m_issueQty = Convert.ToDecimal(line.ActualReqQty);
//存储地点
if (Appconfig.GetWhCodeByBinid(line.WH, ORGID) != "")
{
UFIDAU9CBOPubControllerCommonArchiveDataDTOData ww = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData();
mo.m_iD = Convert.ToInt64(Appconfig.GetWhCodeByBinid(line.WH, ORGID));
mo.m_code = line.WH;
pick.m_issueWh = ww;
}
//if (Appconfig.GetWhCodeByBinid(line.WH, ORGID) != "")
//{
// UFIDAU9CBOPubControllerCommonArchiveDataDTOData ww = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData();
// mo.m_iD = Convert.ToInt64(Appconfig.GetWhCodeByBinid(line.WH, ORGID));
// mo.m_code = line.WH;
// pick.m_issueWh = ww;
//}
// 批号
//弹性栏位:
//pickListDTO.DescFlexField = new DescFlexSegmentsData();
@ -213,21 +212,21 @@ namespace ICS.CreateIssueIN
//pickListDTO.MOPickList = moPickList.ID;
// 货主组织
UFIDAU9CBOPubControllerCommonArchiveDataDTOData org = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData();
mo.m_iD = Convert.ToInt64(ORGID);
mo.m_code = line.ORGCODE;
mo.m_iD =long.Parse( OrgID);
mo.m_code = ORGCode;// line.ORGCODE;
pick.m_ownerOrg = org;
//库位
//子料项目号
if (!string.IsNullOrEmpty(line.Project))
{
if (Appconfig.GetProjectid(line.Project, ORGID) != "")
{
UFIDAU9CBOPubControllerCommonArchiveDataDTOData project = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData();
mo.m_iD = Convert.ToInt64(Appconfig.GetProjectid(line.Project, ORGID));
mo.m_code = line.Project;
pick.m_project = project;
}
}
//if (!string.IsNullOrEmpty(line.Project))
//{
// if (Appconfig.GetProjectid(line.Project, ORGID) != "")
// {
// UFIDAU9CBOPubControllerCommonArchiveDataDTOData project = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData();
// mo.m_iD = Convert.ToInt64(Appconfig.GetProjectid(line.Project, ORGID));
// mo.m_code = line.Project;
// pick.m_project = project;
// }
//}
pick.m_issueDocLineID = 1;
picklst.Add(pick);
}
@ -341,7 +340,7 @@ namespace ICS.CreateIssueIN
public class IssueData {
public string MOCODE { get; set; }
public string DOCNO { get; set; }
public string OrgCode { get; set; }
public string memo { get; set; }
public List<IssueDatas> linelist { get; set; }

82
ICS.CustCreateBFRTNSrvSub/CustCreateBFRTNSrvSub.cs

@ -120,7 +120,7 @@ namespace UFIDA.ISV.CreateBFRTN
rCV.m_transQty.m_amount1 = line.ReqQty;
rCV.m_transQty.m_amount2 = decimal.Zero;
string sqlWH = @"select Code from CBO_Wh
WHERE Code='" + line.WhCode + "' ";
@ -143,6 +143,22 @@ namespace UFIDA.ISV.CreateBFRTN
rCV.m_rcvLineInfoDTO = new UFIDAU9ISVRCVDTORcvLineInfoDTOData();
rCV.m_rcvLineInfoDTO.m_whCode = WHCode;
string sqlOper = @"select id,a.dept from CBO_Operators a where code='adminck' ";
sqlOper = string.Format(sqlOper);
DataTable _dtOper = DBhlper.Query(sqlOper, Appconfig.GetU9ConnStr());
string operID = string.Empty;
string operDept = string.Empty;
if (_dtOper != null && _dtOper.Rows.Count > 0)
{
operID = _dtOper.Rows[0][0].ToString();
operDept = _dtOper.Rows[0][1].ToString();
rCV.m_rcvLineInfoDTO.WhMan =long.Parse( operID);
rCV.m_rcvLineInfoDTO.m_whManCode = "adminck";
}
//库位
rCV.m_rcvLineInfoDTO.m_lineLocations = new UFIDAU9ISVRCVDTOOBARcvLineLocationDTOData[] { };
@ -155,28 +171,52 @@ namespace UFIDA.ISV.CreateBFRTN
location.m_locationQtySU = line.ReqQty;
location.m_locationQtyTU = line.ReqQty;
if (!string.IsNullOrWhiteSpace(line.RcvLot))
{
strlog.AppendLine("开始调用创建批号接口------------");
string OrgID = string.Empty;
string OrgIDSQL = "SELECT a.Org FROM PM_PurchaseOrder a where DocNo='" + rCVhead.srcDocPONo + "'";
DataTable dtOrgID = DBhlper.Query(OrgIDSQL, Appconfig.GetU9ConnStr());
if (dtOrgID.Rows.Count > 0)
{
OrgID = dtOrgID.Rows[0][0].ToString();
}
string LotID = "";
//创建批号
//UFIDA.ISV.CreateLotMaster.CustCreateLotMaster createLot = new CreateLotMaster.CustCreateLotMaster();
//UFIDA.ISV.CreateLotMaster.CustCreateLotMaster.LotMaster lot = new CreateLotMaster.CustCreateLotMaster.LotMaster();
//lot.ItemCode = line.ItemCode;
//lot.LotCode = line.RcvLot;
//UFIDA.ISV.CreateLotMaster.CustCreateLotMaster.OperationResule result = createLot.CustCreateRCVLotMaster(lot);
UFIDA.ISV.CreateLotMaster.CustCreateLotMaster LotMasterCreate = new UFIDA.ISV.CreateLotMaster.CustCreateLotMaster();
string lotWHCode = line.WhCode;
string lotItemCode = line.ItemCode;
string LotCode = line.RcvLot;
LotMasterCreate.CustCreateRCVLotMaster(lotWHCode, lotItemCode, LotCode, DateTime.Now, OrgID, ref LotID);
if (LotID == "")
{
rtnRcvInfo rtnpo = new rtnRcvInfo();
rtnpo.IsSuccess = false;
rtnpo.Message = "批号创建失败";
rtnpos.Add(rtnpo);
return rtnpos;
}
//if (!string.IsNullOrWhiteSpace(line.RcvLot))
//{
// strlog.AppendLine("开始调用创建批号接口------------");
// //创建批号
// UFIDA.ISV.CreateLotMaster.CustCreateLotMaster createLot = new CreateLotMaster.CustCreateLotMaster();
// UFIDA.ISV.CreateLotMaster.CustCreateLotMaster.LotMaster lot = new CreateLotMaster.CustCreateLotMaster.LotMaster();
// lot.ItemCode = line.ItemCode;
// lot.LotCode = line.RcvLot;
// UFIDA.ISV.CreateLotMaster.CustCreateLotMaster.OperationResule result = createLot.CustCreateRCVLotMaster(lot);
// if (result.IsSuccess)
// {
// rCV.m_rcvLineInfoDTO.m_invLotCode = result.DocNo;
// strlog.AppendLine("创建批号接口成功------------");
// }
// else
// {
// strlog.AppendLine("创建批号接口失败------------");
// }
//}
if (!string.IsNullOrWhiteSpace(LotID))
{
//rCV.m_rcvLineInfoDTO.m_invLotCode = result.DocNo;
rCV.m_rcvLineInfoDTO.m_invLotCode = LotCode;
strlog.AppendLine("创建批号接口成功------------");
}
else
{
strlog.AppendLine("创建批号接口失败------------");
}
}
//rCV.m_rcvLineInfoDTO.m_invLotCode = line.RcvLot;
locationList.Add(location);
rCV.m_rcvLineInfoDTO.m_lineLocations = locationList.ToArray();
rCVList.Add(rCV);

3
ICS.CustCreateBFRTNSrvSub/ICS.CustCreateBFRTNSrvSub.csproj

@ -48,6 +48,9 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UFIDA.ISV.CreateLotMaster">
<HintPath>..\UFIDA.ISV.CreateLotMaster\bin\Debug\UFIDA.ISV.CreateLotMaster.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="CeateReceivementFromPOSRVStub.cs" />

39
ICSSoft.U8.WebAPI/Web.config

@ -68,7 +68,7 @@
<add key="userCode" value="admin"/>
<add key="cultureName" value="zh-CN"/>
<add key="enterpriseID" value="01"/>
<add key="logAdress" value="D:\圣珀集成\Log"/>
<add key="logAdress" value="E:\圣珀集成\Log"/>
<add key="IsFixedTypeControl" value="0"/>
<add key="ClientSettingsProvider.ServiceUri" value=""/>
<add key="acttype" value="8"/>
@ -529,8 +529,35 @@
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="BasicHttpBinding_ICreateRcvRestSV" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
<binding name="BasicHttpBinding_UFIDA.U9.ISV.MO.ICreateMO4External"
closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard" maxBufferSize="65536"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
@ -578,6 +605,12 @@
<endpoint address="http://172.16.1.2:3880/U9C/Services/UFIDA.U9.ISV.MO.ICreateIssue4External.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_UFIDA.U9.ISV.MO.ICreateIssue4External"
contract="UFIDAU9ISVMOICreateIssue4External" name="BasicHttpBinding_UFIDA.U9.ISV.MO.ICreateIssue4External" />
<endpoint address="http://172.16.1.2:3880/U9C/Services/UFIDA.U9.ISV.Rcv.ICreateRcvRestSV.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICreateRcvRestSV"
contract="ICreateRcvRestSV" name="BasicHttpBinding_ICreateRcvRestSV" />
<endpoint address="http://172.16.1.2:3880/U9C/Services/UFIDA.U9.ISV.MO.ICreateMO4External.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_UFIDA.U9.ISV.MO.ICreateMO4External"
contract="UFIDAU9ISVMOICreateMO4External" name="BasicHttpBinding_UFIDA.U9.ISV.MO.ICreateMO4External" />
</client>
<!--<client>
<endpoint address="http://172.16.1.2:3880/U9C/services/ufida.u9.isv.customer.ibatchcreatecustomerbydtosv.svc" binding="basicHttpBinding" bindingConfiguration="basichttpbinding_ufida.u9.isv.customer.ibatchcreatecustomerbydtosv" contract="ufidau9isvcustomeribatchcreatecustomerbydtosv" name="basichttpbinding_ufida.u9.isv.customer.ibatchcreatecustomerbydtosv" />

8
UFIDA.ISV.CreateMO/CustCreateMO.cs

@ -106,9 +106,9 @@ namespace UFIDA.ISV.CreateMO
//}
//BOM版本
moDtoData.m_bOMVersion = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData();
moDtoData.m_bOMVersion.m_code = "A1";
moDtoData.m_bOMEffDate = DateTime.Parse("2016-08-01");
//moDtoData.m_bOMVersion = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData();
//moDtoData.m_bOMVersion.m_code = "A1";
//moDtoData.m_bOMEffDate = DateTime.Parse("2016-08-01");
//生产数量
moDtoData.m_productQty = mo.MOQty;
@ -123,7 +123,7 @@ namespace UFIDA.ISV.CreateMO
//moDtoData.m_actualStartDate = mo.StartDate.Value;
moDtoData.m_startDate = mo.StartDate.Value;
//20190805新增完工日期
moDtoData.m_completeDate = mo.CompleteDate.Value;
//moDtoData.m_completeDate = mo.CompleteDate.Value;
//需求分类
moDtoData.m_demandCode = -1;

Loading…
Cancel
Save