<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<appSettings>

		<!--<add key="MqttUrl" value="124.220.32.217:1883,MES/InstantMessaging/MisServer" />-->
		<add key="MqttUrl" value="124.220.15.242:1883,MES/InstantMessaging/SY/MisServer"/>
		<add key="MqttTargetTopic" value="MES/InstantMessaging/SY"/>
		<add key="MqttTargetTopicPLC" value="MES/InstantMessaging/SY/MisServer"/>
		<add key="MqttTargetTopicTagTypeCodeID" value="MES/TagTypeCodeID"/>
		<add key="Url_WebApi" value="http://localhost:41186"/>
		
		<add key="ConnectionString_MES" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>

		<!-- ERP数据库连接-->
		<add key="ConnectionString_ERP" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>
		<!-- 订单查询脚本-->
		<add key="ConnectionString_ERP_Sql_OrderForm" value="select a.fbillno'工单号',a.FID '工单内码',b.FENTRYID '工单分录',bt.FNAME '单据类型',a.fdate '单据日期',org.fname '生产组织',m.FNUMBER '物料代码',m1.FNAME '物料名称',m1.FSPECIFICATION '规格型号',de.FNAME  '生产车间',un.FNAME '单位',FBASEUNITQTY '数量',bom.FNUMBER 'BOM版本',b1.FSTATUS '业务状态',b.FPLANSTARTDATE '计划开工时间',b.FPLANFINISHDATE '计划完工时间',
b1.FSTARTDATE '开工时间',b1.FFINISHDATE'完工时间',b1.FREPQUAQTY '基本单位汇报合格数量',b1.FREPQUAAUXQTY '单据单位汇报合格数量 ',b1.FBASERPTFINISHQTY '基本单位汇报完成数量',b1.FRPTFINISHQTY'单据单位汇报完成数量' ,b2.FREMWORKSHOPID '产线'
from T_PRD_MO a
left join T_PRD_MOENTRY b on a.fid=b.fid  --生产订单表体
left join T_PRD_MOENTRY_A b1 on b.FID=b1.FID and b.FENTRYID=b1.FENTRYID  --生产订单表体
LEFT join T_PRD_MOENTRY_Q b2 on  b.FID=b2.FID and b.FENTRYID=b2.FENTRYID --生产订单明细数量表
left join T_ORG_ORGANIZATIONS_L org on org.FORGID=a.FPRDORGID  --组织
left join T_BD_MATERIAL m on m.FMATERIALID=b.FMATERIALID  --生产订单表体物料信息
left join T_BD_MATERIAL_L m1 on m.FMATERIALID=m1.FMATERIALID  
left join T_BD_DEPARTMENT_L de on de.FDEPTID=b.FWORKSHOPID  --部门：生产车间
left join T_BD_UNIT_L un on un.FUNITID=b.FBASEUNITID  --单位表
left join T_ENG_BOM bom on bom.FID=b.FBOMID --BOM信息
left join  T_BAS_BILLTYPE_L bt  on bt.FBILLTYPEID=a.FBILLTYPE  and bt.FLOCALEID=2052--单据类型"/>
		<!-- 配送物料查询脚本-->
		<add key="ConnectionString_ERP_Sql_DistributeMaterials" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>
		<!-- 补充物料查询脚本-->
		<add key="ConnectionString_ERP_Sql_SupplementaryMaterials" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>
		
		<add key="ConnectionString_MES0" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>
		<add key="ConnectionString_MES1" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>
		<add key="ConnectionString_MES2" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>
		<add key="ConnectionString_MES3" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>
		<add key="ConnectionString_MES4" value="server=124.220.15.242\MSSQLSERVER2012,1433;User ID=meswork;Password=126.com;database=MacroinfBasicDB_SY;Connection Reset=FALSE"/>
		<add key="OPName01" value="OP1010|1"/>
		<add key="OPName02" value="OP0050|2"/>
		<!--扫描枪COM口-->
		<add key="PortName" value="COM1"/>
		<!--读超时，即在1000内未读到数据就引起超时异常-->
		<add key="ReadTimeout" value="1000"/>
		<!--比特率-->
		<add key="BaudRate" value="115200"/>
		<!--祛除后尾乱码-->
		<add key="ScannerTrim" value="1"/>



	</appSettings>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
    </startup>
</configuration>
