Browse Source

上传质量给IOControlApply表,然后再上传给LCS

master
志铭 吕 2 months ago
parent
commit
365f4d96bb
  1. 6
      ControlMonitorClient/wcfControlMonitorClient.csproj
  2. 7
      WcfControlMonitorLib/CCallService.cs
  3. 6
      WcfControlMonitorLib/SControlMonitor.cs

6
ControlMonitorClient/wcfControlMonitorClient.csproj

@ -15,7 +15,7 @@
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>true</IsWebBootstrapper>
<PublishUrl>D:\项目\99-济宁时代后工序原料库\向导\</PublishUrl>
<PublishUrl>D:\WCSbf\</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
@ -25,7 +25,7 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<InstallUrl>http://127.0.0.1/ControlClient/</InstallUrl>
<InstallUrl>http://localhost:8080/</InstallUrl>
<SupportUrl>http://www.siasun.com</SupportUrl>
<TargetCulture>zh-Hans</TargetCulture>
<ProductName>智能物流调度系统WCS客户端</ProductName>
@ -40,7 +40,7 @@
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<BootstrapperComponentsLocation>Relative</BootstrapperComponentsLocation>
<BootstrapperComponentsUrl>http://192.168.0.219/WCFControlClient</BootstrapperComponentsUrl>
<BootstrapperComponentsUrl>C:\Program Files %28x86%29\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0</BootstrapperComponentsUrl>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>AnyCPU</PlatformTarget>

7
WcfControlMonitorLib/CCallService.cs

@ -1095,7 +1095,7 @@ namespace WcfControlMonitorLib
/// <param name="requestType">1: 入库申请2:请求库位</param>
/// <param name="resp_data">返回数据</param>
/// <returns></returns>
public static ResultMessage RequestToWMS(string barcode, string startNode,string requestType, out InboundApplyBack resp_data)
public static ResultMessage RequestToWMS(string barcode, string startNode,string weight,string requestType, out InboundApplyBack resp_data)
{
ResultMessage result = new ResultMessage();
//string bResult = string.Empty;
@ -1108,7 +1108,7 @@ namespace WcfControlMonitorLib
// InboundApplyBack inboundApplyBack = new InboundApplyBack();
inboundApply.msgTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
inboundApply.containerCode = barcode;
inboundApply.weight = 0;
inboundApply.weight =Convert.ToDouble(weight);
inboundApply.requestType = 1; //1 实物2 空托 / 空箱
inboundApply.startNode =startNode;
inboundApply.containerSize = null;
@ -1488,13 +1488,12 @@ namespace WcfControlMonitorLib
for (int i = 0; i < dataInRequest.Count; i++)
{
CommonClassLib.CCarryConvert.WriteDarkCasket("CallService", "inboundApply", "准备开始调用wms服务:", $"Barcode:{dataInRequest[i]["STOCK_BARCODE"]},站台{dataInRequest[i]["DEVICE_CODE"]}");
ResultMessage result = RequestToWMS(dataInRequest[i]["STOCK_BARCODE"].ToString(), dataInRequest[i]["DEVICE_CODE"].ToString(), "2", out InboundApplyBack resp_data);
ResultMessage result = RequestToWMS(dataInRequest[i]["STOCK_BARCODE"].ToString(), dataInRequest[i]["DEVICE_CODE"].ToString(), dataInRequest[i]["CONTROL_APPLY_PARA01"].ToString(), "2", out InboundApplyBack resp_data);
if (result.sResult)
{ //成功
IO_CONTROL iO_CONTROL = new IO_CONTROL(resp_data.data, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
iO_CONTROL.Insert_IOCONTROL();//暂不考虑插入失败的情况 写入IO入库任务
CommonClassLib.CCarryConvert.WriteDarkCasket("CallService", " ", "开始调用wms服务成功败:", $"返回信息{resp_data.data}:{resp_data.msg}");
}
else
{

6
WcfControlMonitorLib/SControlMonitor.cs

@ -5973,7 +5973,7 @@ namespace WcfControlMonitorLib
{
BarcodeReservedLength = BarcodeLength;
}
int Weight = devicestates[tempdb2addr + 5] + (devicestates[tempdb2addr + 4] << 8) + (devicestates[tempdb2addr + 3] << 16) + (devicestates[tempdb2addr + 2] << 32); ;//称重重量:1轻,2重 3 超重
int BarcodeTotalLength = BarcodeReservedLength * BoxQuality;
int PalletBarcodeLength = Convert.ToInt32(dvsp[0]["F_PalletBarcodeLength"]);//电力纸箱码垛机器人专用\普通条码申请
int PalletBarcodeReservedLength = Convert.ToInt32(dvsp[0]["F_PalletBarcodeReservedLength"]);//电力纸箱码垛机器人专用\普通条码申请
@ -6144,12 +6144,12 @@ namespace WcfControlMonitorLib
//int appid = dboMan.GetManageTableIndex("IO_CONTROL_APPLY", true);//CONTROL_APPLY_ID
//object[] ob = new object[9] { apptype, dcode, barcode, 0, dtime, "", warehouse.ToString(), appid, BoxQuality };
object[] ob = new object[7] { apptype, dcode, barcode, 0, dtime, "", warehouse.ToString() };
object[] ob = new object[8] { apptype, dcode, barcode, 0, dtime, "", warehouse.ToString(),Weight };
try
{
//dboMan.ExecuteSql(string.Format("INSERT INTO IO_CONTROL_APPLY(CONTROL_APPLY_ID, CONTROL_APPLY_TYPE,DEVICE_CODE, STOCK_BARCODE, APPLY_TASK_STATUS, CREATE_TIME,CONTROL_APPLY_REMARK,WAREHOUSE_CODE,BOX_QUANTITY)VALUES ({7},{0},'{1}','{2}',{3},'{4}','{5}','{6}',{8})", ob));
dboMan.ExecuteSql(string.Format("INSERT INTO IO_CONTROL_APPLY(CONTROL_APPLY_TYPE,DEVICE_CODE, STOCK_BARCODE, APPLY_TASK_STATUS, CREATE_TIME,CONTROL_APPLY_REMARK,WAREHOUSE_CODE)VALUES ({0},'{1}','{2}',{3},'{4}','{5}','{6}')", ob));
dboMan.ExecuteSql(string.Format("INSERT INTO IO_CONTROL_APPLY(CONTROL_APPLY_TYPE,DEVICE_CODE, STOCK_BARCODE, APPLY_TASK_STATUS, CREATE_TIME,CONTROL_APPLY_REMARK,WAREHOUSE_CODE,CONTROL_APPLY_PARA02)VALUES ({0},'{1}','{2}',{3},'{4}','{5}','{6}',{7})", ob));
CommonClassLib.CCarryConvert.WriteDarkCasket("OPCClient", "向管理条码申请任务:", devidx.ToString(), ",站台:" + dcode + ",条码:" + barcode.ToString().ToUpper() + ",申请类型:" + apptype.ToString());//20140218
}
catch (Exception ex)

Loading…
Cancel
Save