@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="poi/okhttp-2.7.4.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="poi/okio-1.13.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-8.0.12.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/ojdbc7.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/commons-beanutils-1.7.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/commons-collections-3.2.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/commons-lang-2.4.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/commons-logging-1.1.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/ezmorph-1.0.4.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/jdom.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/json-lib-2.2.2-jdk15.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/json-lib-2.2.3-jdk13.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/sqljdbc4-2.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/axis.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/commons-discovery-0.2.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/classes12.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/javax.wsdl_1.6.2.v201012040545.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/jaxrpc.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/org.apache.commons.logging_1.1.1.v201101211721.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/saaj.jar"/>
|
||||||
|
<classpathentry kind="lib" path="json_lib/jackson-databind-2.1.3-sources.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/httpclient-4.5.2.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/httpcore-4.4.11.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/httpmime-4.5.2.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/S8SoaCustServerStrong_11000.2.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/S8SoaBypassStrong_11000.2.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/S8SoaBypassLoose_11000.2.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/S8SoaBypassTypes_11000.2.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/S8SoaCustServerLoose_11000.2.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/S8SoaCustServerTypes_11000.2.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/json-org.jar" sourcepath="C:/Users/86183/AppData/Local/Temp/.org.sf.feeling.decompiler1655087337931/source/json-20160212-sources.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/TcSoaCoreStrong_10000.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/TcSoaCoreTypes_10000.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/TcSoaClient_10000.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/TcSoaStrongModel_10000.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/TcSoaStructureManagementStrong_10000.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/TcSoaStructureManagementTypes_10000.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/TcSoaBomStrong_10000.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="soalib/TcSoaBomTypes_10000.1.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="poi/spire.pdf-3.4.2.jar"/>
|
||||||
|
<classpathentry kind="lib" path="mybatis/mybatis-3.5.6.jar"/>
|
||||||
|
<classpathentry kind="lib" path="poi/jacob.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/jna-5.5.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/commons-dbcp2-2.8.0.jar"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
|
||||||
|
<classpathentry kind="lib" path="lib/org.apache.commons.logging_1.2.0.v20180409-1502.jar"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry kind="lib" path="lib/fastjson2-2.0.15.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/guava-31.1-jre.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/hutool-all-5.8.8.jar"/>
|
||||||
|
<classpathentry kind="lib" path="lib/swingx-1.6.1.jar"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.connor.chint.sap2</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
|
<nature>org.eclipse.pde.PluginNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
|
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
@ -0,0 +1,8 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.release=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.8
|
@ -0,0 +1,107 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0" targetNamespace="http://msg.chintwebservices.itf.nc/ISendMsgServices" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:ns0="http://msg.chintwebservices.itf.nc/ISendMsgServices" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<wsdl:types>
|
||||||
|
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" jaxb:version="2.0" targetNamespace="http://msg.chintwebservices.itf.nc/ISendMsgServices" xmlns:ns="http://msg.chintwebservices.itf.nc/ISendMsgServices">
|
||||||
|
<xsd:annotation>
|
||||||
|
<xsd:appinfo>
|
||||||
|
<jaxb:schemaBindings>
|
||||||
|
<jaxb:package name="nc.itf.chintwebservices.msg" />
|
||||||
|
</jaxb:schemaBindings>
|
||||||
|
</xsd:appinfo>
|
||||||
|
</xsd:annotation>
|
||||||
|
<xsd:element name="chintSendMsgServices">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element minOccurs="0" name="string" nillable="true" type="xsd:string" />
|
||||||
|
<xsd:element minOccurs="0" name="string1" nillable="true" type="xsd:string" />
|
||||||
|
<xsd:element minOccurs="0" name="string2" nillable="true" type="xsd:string" />
|
||||||
|
<xsd:element minOccurs="0" name="string3" nillable="true" type="xsd:string" />
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="chintSendMsgServicesResponse">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element minOccurs="0" name="return" nillable="true" type="xsd:string" />
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="chintSendUrlMsgServices">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element minOccurs="0" name="string" nillable="true" type="xsd:string" />
|
||||||
|
<xsd:element minOccurs="0" name="string1" nillable="true" type="xsd:string" />
|
||||||
|
<xsd:element minOccurs="0" name="string2" nillable="true" type="xsd:string" />
|
||||||
|
<xsd:element minOccurs="0" name="string3" nillable="true" type="xsd:string" />
|
||||||
|
<xsd:element minOccurs="0" name="string4" nillable="true" type="xsd:string" />
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="chintSendUrlMsgServicesResponse">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element minOccurs="0" name="return" nillable="true" type="xsd:string" />
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
</wsdl:types>
|
||||||
|
<wsdl:message name="chintSendUrlMsgServicesRequest">
|
||||||
|
<wsdl:part element="ns0:chintSendUrlMsgServices" name="parameters">
|
||||||
|
</wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="chintSendMsgServicesRequest">
|
||||||
|
<wsdl:part element="ns0:chintSendMsgServices" name="parameters">
|
||||||
|
</wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="chintSendUrlMsgServicesResponse">
|
||||||
|
<wsdl:part element="ns0:chintSendUrlMsgServicesResponse" name="parameters">
|
||||||
|
</wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="chintSendMsgServicesResponse">
|
||||||
|
<wsdl:part element="ns0:chintSendMsgServicesResponse" name="parameters">
|
||||||
|
</wsdl:part>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:portType name="ISendMsgServicesPortType">
|
||||||
|
<wsdl:operation name="chintSendMsgServices">
|
||||||
|
<wsdl:input message="ns0:chintSendMsgServicesRequest" wsaw:Action="urn:chintSendMsgServices">
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="ns0:chintSendMsgServicesResponse" wsaw:Action="urn:chintSendMsgServicesResponse">
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="chintSendUrlMsgServices">
|
||||||
|
<wsdl:input message="ns0:chintSendUrlMsgServicesRequest" wsaw:Action="urn:chintSendUrlMsgServices">
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output message="ns0:chintSendUrlMsgServicesResponse" wsaw:Action="urn:chintSendUrlMsgServicesResponse">
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:portType>
|
||||||
|
<wsdl:binding name="ISendMsgServicesSOAP11Binding" type="ns0:ISendMsgServicesPortType">
|
||||||
|
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
|
||||||
|
<wsdl:operation name="chintSendMsgServices">
|
||||||
|
<soap:operation soapAction="urn:chintSendMsgServices" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="chintSendUrlMsgServices">
|
||||||
|
<soap:operation soapAction="urn:chintSendUrlMsgServices" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:service name="ISendMsgServices">
|
||||||
|
<wsdl:port binding="ns0:ISendMsgServicesSOAP11Binding" name="ISendMsgServicesSOAP11port_http">
|
||||||
|
<soap:address location="http://10.128.10.10/uapws/service/ChintSendMessage" />
|
||||||
|
</wsdl:port>
|
||||||
|
</wsdl:service>
|
||||||
|
<jaxws:bindings>
|
||||||
|
<jaxws:package name="nc.itf.chintwebservices.msg" />
|
||||||
|
</jaxws:bindings>
|
||||||
|
</wsdl:definitions>
|
@ -0,0 +1,131 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: Sap2
|
||||||
|
Bundle-SymbolicName: com.connor.chint.sap2;singleton:=true
|
||||||
|
Bundle-Version: 1.0.0
|
||||||
|
Bundle-Activator: com.connor.chint.sap2.Activator
|
||||||
|
Bundle-Vendor: CONNOR
|
||||||
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
org.eclipse.core.runtime,
|
||||||
|
com.teamcenter.rac.aifrcp;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.common,
|
||||||
|
com.teamcenter.rac.kernel;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.tcapps;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.ui;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.ui.commands;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.external;bundle-version="11000.2.0",
|
||||||
|
org.apache.commons.discovery;bundle-version="0.2.0",
|
||||||
|
org.apache.commons.logging;bundle-version="1.0.4",
|
||||||
|
javax.wsdl;bundle-version="1.6.2",
|
||||||
|
javax.xml.rpc;bundle-version="1.1.0",
|
||||||
|
TcSoaCoreRac;bundle-version="11000.2.0",
|
||||||
|
TcSoaCoreTypes;bundle-version="11000.2.0",
|
||||||
|
TcSoaCommon;bundle-version="11000.2.0",
|
||||||
|
TcSoaStructureManagementRac;bundle-version="11000.2.0",
|
||||||
|
TcSoaStructureManagementTypes;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.workflow;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.workflow.processdesigner;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.workflow.processviewer;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.classification.icadmin;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.classification.icm;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.commonclient;bundle-version="11000.2.0",
|
||||||
|
TcSoaWorkflowRac;bundle-version="11000.2.0",
|
||||||
|
cn.net.connor.socket;bundle-version="1.0.0",
|
||||||
|
org.apache.poi.39;bundle-version="3.9.0",
|
||||||
|
TcSoaProjectManagementLoose;bundle-version="11000.2.0",
|
||||||
|
TcSoaProjectManagementRac;bundle-version="11000.2.0",
|
||||||
|
TcSoaProjectManagementTypes;bundle-version="11000.2.0",
|
||||||
|
org.apache.commons.httpclient;bundle-version="3.1.0",
|
||||||
|
TcSoaAdministrationLoose;bundle-version="11000.2.0",
|
||||||
|
TcSoaAdministrationRac;bundle-version="11000.2.0",
|
||||||
|
TcSoaAdministrationTypes;bundle-version="11000.2.0",
|
||||||
|
TcSoaCoreLoose;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.schedule;bundle-version="11000.2.0",
|
||||||
|
org.eclipse.ui.navigator;bundle-version="3.5.200",
|
||||||
|
TcSoaCadRac;bundle-version="11000.2.0",
|
||||||
|
TcSoaCadTypes;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.bom;bundle-version="11000.2.0",
|
||||||
|
TcSoaBomRac;bundle-version="11000.2.0",
|
||||||
|
TcSoaBomTypes;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.util;bundle-version="11000.2.0",
|
||||||
|
org.eclipse.osgi.services;bundle-version="3.3.100",
|
||||||
|
TcSoaCaeRac;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.project;bundle-version="11000.2.0"
|
||||||
|
Automatic-Module-Name: com.connor.chint.sap2
|
||||||
|
Bundle-ActivationPolicy: lazy
|
||||||
|
Bundle-ClassPath: .,
|
||||||
|
lib/sqljdbc4-2.0.jar,
|
||||||
|
json_lib/commons-beanutils-1.7.0.jar,
|
||||||
|
json_lib/commons-collections-3.2.jar,
|
||||||
|
json_lib/commons-lang-2.4.jar,
|
||||||
|
json_lib/commons-logging-1.1.jar,
|
||||||
|
json_lib/ezmorph-1.0.4.jar,
|
||||||
|
json_lib/jdom.jar,
|
||||||
|
json_lib/json-lib-2.2.2-jdk15.jar,
|
||||||
|
json_lib/json-lib-2.2.3-jdk13.jar,
|
||||||
|
lib/ojdbc7.jar,
|
||||||
|
lib/httpclient-4.5.2.jar,
|
||||||
|
lib/httpcore-4.4.11.jar,
|
||||||
|
lib/httpmime-4.5.2.jar,
|
||||||
|
mybatis/mybatis-3.5.6.jar,
|
||||||
|
poi/itextpdf-5.5.11.jar,
|
||||||
|
poi/jacob.jar,
|
||||||
|
lib/fastjson2-2.0.15.jar,
|
||||||
|
lib/guava-31.1-jre.jar,
|
||||||
|
lib/hutool-all-5.8.8.jar,
|
||||||
|
lib/swingx-1.6.1.jar,
|
||||||
|
lib/mysql-connector-java-8.0.12.jar,
|
||||||
|
poi/okhttp-2.7.4.jar,
|
||||||
|
poi/okio-1.13.0.jar
|
||||||
|
Export-Package: com.connor.chint.sap2,
|
||||||
|
com.connor.chint.sap2.assignfactoryno,
|
||||||
|
com.connor.chint.sap2.bombuilder,
|
||||||
|
com.connor.chint.sap2.checkDesign,
|
||||||
|
com.connor.chint.sap2.commands,
|
||||||
|
com.connor.chint.sap2.createECN,
|
||||||
|
com.connor.chint.sap2.dialogs,
|
||||||
|
com.connor.chint.sap2.downloadFiles,
|
||||||
|
com.connor.chint.sap2.general,
|
||||||
|
com.connor.chint.sap2.gykg.commands,
|
||||||
|
com.connor.chint.sap2.material_m,
|
||||||
|
com.connor.chint.sap2.material_query,
|
||||||
|
com.connor.chint.sap2.material_spec,
|
||||||
|
com.connor.chint.sap2.materialno,
|
||||||
|
com.connor.chint.sap2.materialno.bean,
|
||||||
|
com.connor.chint.sap2.mes_meop,
|
||||||
|
com.connor.chint.sap2.mybatis,
|
||||||
|
com.connor.chint.sap2.mybatis.dao,
|
||||||
|
com.connor.chint.sap2.operation,
|
||||||
|
com.connor.chint.sap2.partDownload,
|
||||||
|
com.connor.chint.sap2.proc,
|
||||||
|
com.connor.chint.sap2.proc_by,
|
||||||
|
com.connor.chint.sap2.proc_dycc,
|
||||||
|
com.connor.chint.sap2.proc_gy,
|
||||||
|
com.connor.chint.sap2.proc_jyz,
|
||||||
|
com.connor.chint.sap2.proc_zy,
|
||||||
|
com.connor.chint.sap2.proc_zykg,
|
||||||
|
com.connor.chint.sap2.projcreate_formal,
|
||||||
|
com.connor.chint.sap2.projcreate_temp,
|
||||||
|
com.connor.chint.sap2.projectTest,
|
||||||
|
com.connor.chint.sap2.project_product,
|
||||||
|
com.connor.chint.sap2.replace,
|
||||||
|
com.connor.chint.sap2.report,
|
||||||
|
com.connor.chint.sap2.sap_by,
|
||||||
|
com.connor.chint.sap2.sap_dy,
|
||||||
|
com.connor.chint.sap2.sap_gy,
|
||||||
|
com.connor.chint.sap2.sap_jyz,
|
||||||
|
com.connor.chint.sap2.sap_zy,
|
||||||
|
com.connor.chint.sap2.sap_zykg,
|
||||||
|
com.connor.chint.sap2.setProperty,
|
||||||
|
com.connor.chint.sap2.stylesheet,
|
||||||
|
com.connor.chint.sap2.task_by,
|
||||||
|
com.connor.chint.sap2.util,
|
||||||
|
com.connor.chint.sap2.zykg.CreateProductionChange,
|
||||||
|
com.connor.chint.sap2.zykg.command,
|
||||||
|
com.microsoft.sqlserver.jdbc,
|
||||||
|
com.xinhua.mes.intf.core.webservice,
|
||||||
|
nc.itf.chintwebservices.msg.ISendMsgServices,
|
||||||
|
plm.xi.com.chintelectric
|
||||||
|
Import-Package: org.apache.commons.httpclient
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8,
|
||||||
|
JavaSE-1.7
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" id="WebApp_ID">
|
||||||
|
<display-name>com.connor.chint.sap2</display-name>
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>index.html</welcome-file>
|
||||||
|
<welcome-file>index.htm</welcome-file>
|
||||||
|
<welcome-file>index.jsp</welcome-file>
|
||||||
|
<welcome-file>default.html</welcome-file>
|
||||||
|
<welcome-file>default.htm</welcome-file>
|
||||||
|
<welcome-file>default.jsp</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
</web-app>
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace=""></mapper>
|
||||||
|
<!--
|
||||||
|
<mapper namespace="CHINTMaterial">
|
||||||
|
|
||||||
|
<select id="selectUsers" resultType="CHINTMaterial">
|
||||||
|
SELECT * FROM CHINT_ECN_FLOW
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
-->
|
||||||
|
|
@ -0,0 +1,485 @@
|
|||||||
|
package com.connor.chint.sap2.assignfactoryno;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.Statement;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Vector;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
|
import org.apache.commons.collections.map.HashedMap;
|
||||||
|
|
||||||
|
import com.connor.chint.sap2.bean.FactoryNoBean;
|
||||||
|
import com.connor.chint.sap2.bean.FlowNoBean;
|
||||||
|
import com.connor.chint.sap2.bombuilder.BomBuildDialogController;
|
||||||
|
import com.connor.chint.sap2.sap_zy.FlowBean;
|
||||||
|
import com.connor.chint.sap2.util.ChintPreferenceUtil;
|
||||||
|
import com.connor.chint.sap2.util.KUtil;
|
||||||
|
import com.connor.chint.sap2.util.POIUtil;
|
||||||
|
import com.connor.chint.sap2.util.ProgressBar;
|
||||||
|
import com.connor.chint.sap2.util.SqlUtil;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
||||||
|
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
|
||||||
|
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponent;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentContextList;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentFolder;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItem;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
||||||
|
import com.teamcenter.rac.kernel.TCException;
|
||||||
|
import com.teamcenter.rac.kernel.TCPreferenceService;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
import plm.xi.com.chintelectric.DT_FACTORY_NUMBER_REQ;
|
||||||
|
import plm.xi.com.chintelectric.DT_FACTORY_NUMBER_REQBASEINFO;
|
||||||
|
import plm.xi.com.chintelectric.DT_FACTORY_NUMBER_REQITEMSITEM;
|
||||||
|
import plm.xi.com.chintelectric.DT_FACTORY_NUMBER_RSP;
|
||||||
|
import plm.xi.com.chintelectric.DT_FACTORY_NUMBER_RSPRSP_BASEINFO;
|
||||||
|
import plm.xi.com.chintelectric.DT_FACTORY_NUMBER_RSPZTABLE_RETURN;
|
||||||
|
import plm.xi.com.chintelectric.SI_FACTORY_NUMBER_PLM_OUT_SYN;
|
||||||
|
import plm.xi.com.chintelectric.SI_FACTORY_NUMBER_PLM_OUT_SYNService;
|
||||||
|
import plm.xi.com.chintelectric.SI_FACTORY_NUMBER_PLM_OUT_SYNServiceLocator;
|
||||||
|
|
||||||
|
public class FactoryCCController {
|
||||||
|
|
||||||
|
private FactoryCCDialog dialog;
|
||||||
|
private AbstractAIFApplication app;
|
||||||
|
|
||||||
|
private List<String> factoryNos = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
public FactoryCCController(AbstractAIFApplication app,FactoryCCDialog dialog) {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
this.dialog = dialog;
|
||||||
|
this.app = app;
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取产成品型号对应的前缀集合
|
||||||
|
public Map<String, String> getFactoryTypes(String preference,TCSession session)
|
||||||
|
{
|
||||||
|
Map<String, String> map = new HashedMap(16);
|
||||||
|
String[] prefs = ChintPreferenceUtil.getPreferences(preference, session);
|
||||||
|
String[] values = null;
|
||||||
|
String[] types = null;
|
||||||
|
String value = "";
|
||||||
|
for(int i=0,len = prefs.length;i<len;i++)
|
||||||
|
{
|
||||||
|
values = prefs[i].split(":");
|
||||||
|
if(values.length!=2)
|
||||||
|
continue;
|
||||||
|
value = values[0];
|
||||||
|
types = values[1].split(";");
|
||||||
|
for(int j=0,len2 = types.length;j<len2;j++)
|
||||||
|
{
|
||||||
|
map.put(types[j], value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//System.out.println("map:"+map);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<FactoryNoBean> getCCPList(TCComponent ccp_Folder,Map<String, String> map,
|
||||||
|
Map<String, FlowNoBean> map_FlowNos) throws Exception
|
||||||
|
{
|
||||||
|
List<FactoryNoBean> list = new ArrayList<>(32);
|
||||||
|
AIFComponentContext[] childs = ccp_Folder.getChildren();
|
||||||
|
TCComponent[] contexts = null;
|
||||||
|
FactoryNoBean bean = null;
|
||||||
|
int index = 1;
|
||||||
|
String zt2_Site = "";
|
||||||
|
String zt2_MaterialNo ="";
|
||||||
|
String object_name = "";
|
||||||
|
String prefix = "";
|
||||||
|
String zt2_TankNo ="";
|
||||||
|
List<TCComponent> factoryNos = null; //出厂编号对象集合
|
||||||
|
List<String> factoryIDs = null; //出厂编号ID集合
|
||||||
|
TCComponentItemRevision rev = null;
|
||||||
|
List<String> types = new ArrayList<>(map.keySet());
|
||||||
|
String type = "";
|
||||||
|
String factoryID = "";
|
||||||
|
String flowNo ="";
|
||||||
|
FlowNoBean flowBean = null;
|
||||||
|
String time = new Date().getYear()%100 + String.format("%02d",new Date().getMonth()+1);
|
||||||
|
String temp = "";
|
||||||
|
for(int i=0,len = childs.length;i<len;i++)
|
||||||
|
{
|
||||||
|
flowNo = "";
|
||||||
|
temp ="";
|
||||||
|
if(childs[i].getComponent().getType().equals("Part"))
|
||||||
|
{
|
||||||
|
rev = ((TCComponentItem)childs[i].getComponent()).getLatestItemRevision();
|
||||||
|
zt2_Site = rev.getProperty("zt2_Site");
|
||||||
|
zt2_MaterialNo = rev.getProperty("zt2_MaterialNo");
|
||||||
|
object_name = rev.getProperty("object_name");
|
||||||
|
zt2_TankNo = rev.getProperty("zt2_TankNo");
|
||||||
|
type = KUtil.inArray2(object_name, types);
|
||||||
|
if(!KUtil.isEmpty(type))
|
||||||
|
{
|
||||||
|
prefix = map.get(type);
|
||||||
|
System.out.println("prefix:"+prefix);
|
||||||
|
if(map_FlowNos.containsKey(prefix))
|
||||||
|
{
|
||||||
|
flowBean = map_FlowNos.get(prefix);
|
||||||
|
flowBean.addSize();;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
flowBean = new FlowNoBean(prefix);
|
||||||
|
map_FlowNos.put(prefix, flowBean);
|
||||||
|
}
|
||||||
|
contexts = rev.getRelatedComponents("ZT2_FactoryNumber");
|
||||||
|
if(contexts.length>0)
|
||||||
|
{
|
||||||
|
factoryID = contexts[0].getProperty("item_id");
|
||||||
|
temp = factoryID;
|
||||||
|
flowNo = factoryID.substring(factoryID.length()-4, factoryID.length());
|
||||||
|
temp = temp.substring(factoryID.length()-8, factoryID.length()-4);
|
||||||
|
prefix = factoryID.replaceAll(temp, "").replaceAll(flowNo, "");
|
||||||
|
flowBean.addIDs(factoryID);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
if(prefix.endsWith("DX"))
|
||||||
|
dialog.isHave = true;
|
||||||
|
temp = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(contexts.length>0 && contexts[0].getProperty("item_id").contains(prefix))
|
||||||
|
{
|
||||||
|
factoryID = contexts[0].getProperty("item_id");
|
||||||
|
temp = factoryID.replaceAll(prefix, "");
|
||||||
|
temp = temp.substring(temp.length()-8, temp.length()-4);
|
||||||
|
flowNo = factoryID.substring(factoryID.length()-4, factoryID.length());
|
||||||
|
flowBean.addIDs(factoryID);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
temp = time;
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
|
||||||
|
throw new Exception("产成品["+rev+"]未能匹配出厂编号规则。");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("rev:"+rev+";flowNo:"+flowNo);
|
||||||
|
factoryNos = new ArrayList<>(8);
|
||||||
|
factoryIDs = new ArrayList<>(8);
|
||||||
|
bean = new FactoryNoBean(rev, factoryNos, factoryIDs,
|
||||||
|
zt2_MaterialNo, object_name, zt2_Site, zt2_TankNo,
|
||||||
|
"", i+1, prefix, flowNo);
|
||||||
|
bean.time = temp;
|
||||||
|
list.add(bean);
|
||||||
|
}
|
||||||
|
System.out.println("map_FlowNos:"+map_FlowNos);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, TCComponentItemRevision> factoryNo_Products = new HashedMap();
|
||||||
|
public List<FactoryNoBean> getCCPList2(TCComponent ccp_Folder,Map<String, String> map,
|
||||||
|
Map<String, FlowNoBean> map_FlowNos) throws Exception
|
||||||
|
{
|
||||||
|
List<FactoryNoBean> list = new ArrayList<>(32);
|
||||||
|
AIFComponentContext[] childs = ccp_Folder.getChildren();
|
||||||
|
TCComponent[] contexts = null;
|
||||||
|
FactoryNoBean bean = null;
|
||||||
|
int index = 1;
|
||||||
|
String zt2_Site = "";
|
||||||
|
String zt2_MaterialNo ="";
|
||||||
|
String object_name = "";
|
||||||
|
String prefix = "";
|
||||||
|
String zt2_TankNo ="";
|
||||||
|
List<TCComponent> factoryNos = null; //出厂编号对象集合
|
||||||
|
List<String> factoryIDs = null; //出厂编号ID集合
|
||||||
|
TCComponentItemRevision rev = null;
|
||||||
|
List<String> types = new ArrayList<>(map.keySet());
|
||||||
|
String type = "";
|
||||||
|
String factoryID = "";
|
||||||
|
String flowNo ="";
|
||||||
|
FlowNoBean flowBean = null;
|
||||||
|
String time = new Date().getYear()%100 + String.format("%02d",new Date().getMonth()+1);
|
||||||
|
String temp = "";
|
||||||
|
String zt2_Quantity = "";
|
||||||
|
TCComponent[] factorys;
|
||||||
|
int[] indexs;
|
||||||
|
for(int i=0,len = childs.length;i<len;i++)
|
||||||
|
{
|
||||||
|
flowNo = "";
|
||||||
|
temp ="";
|
||||||
|
if(childs[i].getComponent().getType().equals("Part"))
|
||||||
|
{
|
||||||
|
rev = ((TCComponentItem)childs[i].getComponent()).getLatestItemRevision();
|
||||||
|
zt2_Site = rev.getProperty("zt2_Site");
|
||||||
|
zt2_MaterialNo = rev.getProperty("zt2_MaterialNo");
|
||||||
|
object_name = rev.getProperty("object_name");
|
||||||
|
zt2_TankNo = rev.getProperty("zt2_TankNo");
|
||||||
|
type = KUtil.inArray2(object_name, types);
|
||||||
|
zt2_Quantity = rev.getStringProperty("zt2_Quantity");
|
||||||
|
if (KUtil.isEmpty(zt2_Quantity)) {
|
||||||
|
zt2_Quantity = "1";
|
||||||
|
indexs = new int[] { 1 };
|
||||||
|
} else {
|
||||||
|
int size = POIUtil.getIntValue(zt2_Quantity)==0?1:POIUtil.getIntValue(zt2_Quantity);
|
||||||
|
indexs = new int[size];
|
||||||
|
}
|
||||||
|
|
||||||
|
factorys = rev.getRelatedComponents(BomBuildDialogController.REL_FACTORYNO);
|
||||||
|
factoryNos = new ArrayList<>();
|
||||||
|
factoryIDs = new ArrayList<String>();
|
||||||
|
//ZT2_FactoryNumber
|
||||||
|
if (factorys != null && factorys.length > 0) {
|
||||||
|
|
||||||
|
for (int j = 0; j < factorys.length; j++) {
|
||||||
|
factoryID = factorys[j].getProperty("item_id");
|
||||||
|
factoryNos.add(factorys[j]);
|
||||||
|
factoryIDs.add(factoryID);
|
||||||
|
factoryNo_Products.put(factoryID, rev);
|
||||||
|
}
|
||||||
|
//isHaveFactoryNo = true;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
if(!KUtil.isEmpty(type))
|
||||||
|
{
|
||||||
|
prefix = map.get(type);
|
||||||
|
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
throw new Exception("产成品"+rev+"未能匹配出厂编号分配规则");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
Collections.sort(list, new Comparator<FactoryNoBean>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compare(FactoryNoBean o1, FactoryNoBean o2) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return o1.getZt2_MaterialNo().compareTo(o2.getZt2_MaterialNo());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据前缀获得流水码
|
||||||
|
* DX类型特殊处理
|
||||||
|
* @param beans
|
||||||
|
* @param session
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void getFlowNo(Map<String, FlowNoBean> beans,TCSession session) throws Exception
|
||||||
|
{
|
||||||
|
String[] prefs = ChintPreferenceUtil.getPreferences("database_tc", session);
|
||||||
|
if(SqlUtil.getTCDataConnection(prefs)==null)
|
||||||
|
{
|
||||||
|
throw new Exception("无法连接数据库,请检查首选项<database_tc>配置。");
|
||||||
|
}
|
||||||
|
|
||||||
|
String time = new Date().getYear()%100 + String.format("%02d",new Date().getMonth()+1);
|
||||||
|
FlowNoBean bean = null;
|
||||||
|
FlowNoBean clone = null;
|
||||||
|
if(beans.containsKey("DX"))
|
||||||
|
{
|
||||||
|
System.out.println("包含");
|
||||||
|
bean = beans.get("DX");
|
||||||
|
clone = (FlowNoBean) bean.clone();
|
||||||
|
clone.setPrefix("DX1");
|
||||||
|
beans.put("DX1", clone);
|
||||||
|
clone = (FlowNoBean) bean.clone();
|
||||||
|
clone.setPrefix("DX3");
|
||||||
|
beans.put("DX3", clone);
|
||||||
|
beans.remove("DX");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> types = new ArrayList<>(beans.keySet());
|
||||||
|
|
||||||
|
StringBuffer buff = new StringBuffer(64);
|
||||||
|
buff.append("(");
|
||||||
|
int len = types.size();
|
||||||
|
for(int i=0;i<len-1;i++)
|
||||||
|
{
|
||||||
|
buff.append("?").append(",");
|
||||||
|
}
|
||||||
|
buff.append("?").append(")");
|
||||||
|
types.add(time);
|
||||||
|
String sql = "select type,time,flow from \"CHINT_M008_FactoryNo\" where 1=1 ";
|
||||||
|
sql+=" and type in "+buff.toString() +" and time = ?";
|
||||||
|
System.out.println("sql:"+sql);
|
||||||
|
ResultSet rs = SqlUtil.read(sql,types.toArray(new Object[types.size()]));
|
||||||
|
String type = "";
|
||||||
|
String flow = "";
|
||||||
|
while(rs.next())
|
||||||
|
{
|
||||||
|
type = rs.getString(1);
|
||||||
|
flow = rs.getString(3);
|
||||||
|
bean = beans.get(type);
|
||||||
|
bean.isInsert = false;
|
||||||
|
bean.setStart(POIUtil.getIntValue(flow));
|
||||||
|
}
|
||||||
|
SqlUtil.free();
|
||||||
|
System.out.println("beans:"+beans);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void autoAssign(Map<String, FlowNoBean> beans)
|
||||||
|
{
|
||||||
|
factoryNos.clear();
|
||||||
|
int rowCount = dialog.t_bom.getRowCount();
|
||||||
|
FactoryNoBean bean = null;
|
||||||
|
FlowNoBean flowBean = null;
|
||||||
|
String type = "";
|
||||||
|
int flow = 0;
|
||||||
|
System.out.println("beans:"+beans);
|
||||||
|
String item_id = "";
|
||||||
|
for(int i=0;i<rowCount;i++)
|
||||||
|
{
|
||||||
|
bean = (FactoryNoBean) dialog.t_bom.getValueAt(i, 3);
|
||||||
|
String val = (String) dialog.t_bom.getValueAt(i, 6);
|
||||||
|
if(KUtil.isEmpty(val))
|
||||||
|
{
|
||||||
|
type = bean.getPrefix();
|
||||||
|
System.out.println("type:"+type);
|
||||||
|
flowBean = beans.get(type);
|
||||||
|
flow = flowBean.getStart();
|
||||||
|
flowBean.setStart(flow+1);
|
||||||
|
|
||||||
|
dialog.t_bom.setValueAt(bean.getPrefix()+bean.time, i, 5);
|
||||||
|
dialog.t_bom.setValueAt(String.format("%04d", flow), i, 6);
|
||||||
|
item_id = bean.getPrefix()+bean.time+String.format("%04d", flow);
|
||||||
|
flowBean.addIDs(item_id);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
item_id = bean.getPrefix()+bean.time+val;
|
||||||
|
}
|
||||||
|
factoryNos.add(item_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void assign(Map<String, FlowNoBean> beans,TCSession session,TCComponent ccbh_Folder) throws Exception
|
||||||
|
{
|
||||||
|
int rowCount = dialog.t_bom.getRowCount();
|
||||||
|
FactoryNoBean bean = null;
|
||||||
|
FlowNoBean flowBean = null;
|
||||||
|
Map<String, TCComponent> maps = new HashedMap(16);
|
||||||
|
StringBuffer buff = new StringBuffer();
|
||||||
|
String item_id = "";
|
||||||
|
String prefix = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for(int i=0;i<rowCount;i++)
|
||||||
|
{
|
||||||
|
bean = (FactoryNoBean) dialog.t_bom.getValueAt(i, 3);
|
||||||
|
String val = (String) dialog.t_bom.getValueAt(i, 6);
|
||||||
|
if(KUtil.isEmpty(val))
|
||||||
|
{
|
||||||
|
buff.append("第"+(i+1)+"行未分配出厂编号");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
item_id = bean.getPrefix()+bean.time+val;
|
||||||
|
if(maps.containsKey(item_id))
|
||||||
|
{
|
||||||
|
buff.append("第"+(i+1)+"行重复分配出厂编号");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
maps.put(item_id, null);
|
||||||
|
if(!factoryNos.contains(item_id))
|
||||||
|
{
|
||||||
|
prefix = bean.getPrefix();
|
||||||
|
flowBean = beans.get(prefix);
|
||||||
|
if(!flowBean.getIds().contains(item_id))
|
||||||
|
{
|
||||||
|
buff.append("第"+(i+1)+"行出厂编号不在可分配范围");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(buff.toString().length()>0)
|
||||||
|
{
|
||||||
|
throw new Exception(buff.toString());
|
||||||
|
}
|
||||||
|
for(String id:maps.keySet())
|
||||||
|
{
|
||||||
|
TCComponent[] items = session.search("零组件 ID", new String[] { "零组件 ID" }, new String[] { id });
|
||||||
|
if (items == null || items.length == 0) {
|
||||||
|
TCComponentItem item = KUtil.newItem(session, BomBuildDialogController.TYPE_FACTORYNO, id, "出厂编号");
|
||||||
|
ccbh_Folder.add("contents", item);
|
||||||
|
maps.put(id, item);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
maps.put(id, items[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String type="";
|
||||||
|
String flowNo = "";
|
||||||
|
String sql_update = "update \"CHINT_M008_FactoryNo\" set flow =? where type =? and time = ?";
|
||||||
|
String sql_insert = "insert into \"CHINT_M008_FactoryNo\"(flow,type,time) values(?,?,?) ";
|
||||||
|
Object[] obj = new Object[3];
|
||||||
|
String time = new Date().getYear()%100 + String.format("%02d",new Date().getMonth()+1);
|
||||||
|
TCComponentItemRevision rev = null;
|
||||||
|
|
||||||
|
for(int i=0;i<rowCount;i++)
|
||||||
|
{
|
||||||
|
bean = (FactoryNoBean) dialog.t_bom.getValueAt(i, 3);
|
||||||
|
String val = (String) dialog.t_bom.getValueAt(i, 6);
|
||||||
|
item_id = bean.getPrefix()+bean.time+val;
|
||||||
|
rev = bean.getRev();
|
||||||
|
TCComponent[] comps = rev.getRelatedComponents(BomBuildDialogController.REL_FACTORYNO);
|
||||||
|
rev.cutOperation(BomBuildDialogController.REL_FACTORYNO, comps);
|
||||||
|
rev.add(BomBuildDialogController.REL_FACTORYNO, maps.get(item_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for(String key:beans.keySet())
|
||||||
|
{
|
||||||
|
flowBean = beans.get(key);
|
||||||
|
type = key;
|
||||||
|
flowNo = flowBean.getStart()+"";
|
||||||
|
obj[0] = flowNo;
|
||||||
|
obj[1] = type;
|
||||||
|
obj[2] = time;
|
||||||
|
if(flowBean.isInsert)
|
||||||
|
{
|
||||||
|
SqlUtil.write(obj, sql_insert);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
SqlUtil.write(obj, sql_update);
|
||||||
|
}
|
||||||
|
SqlUtil.free();
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.post("出厂编号分配完成","",2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,8 @@
|
|||||||
|
Class1=CommandTest.CommandTest1@Excute
|
||||||
|
Class2=CommandTest.CommandTest2@Excute
|
||||||
|
Class3=CommandTest.CommandTest3@Suspend
|
||||||
|
Class4=CommandTest.CommandTest4@Skip
|
||||||
|
Class5=CommandTest.CommandTest5@Excute
|
||||||
|
Class6=CommandTest.CommandTest6@Excute
|
||||||
|
Class7=CommandTest.CommandTest7@Excute
|
||||||
|
BOMSQL=INSERT INTO Z888M_BOM_D (PITMID_NEW,PITMID_OLD,BOMVER,PQTY,ITMID_NEW,ITMID_OLD,QTY,EMPID) VALUES([\u7236\u7269\u6599\u7F16\u7801],[\u539F\u7236\u7269\u6599\u7F16\u7801],[\u7248\u672C],[\u6BCD\u4EF6\u57FA\u6570],[\u5B50\u7269\u6599\u7F16\u7801],[\u539F\u5B50\u7269\u6599\u7F16\u7801],[\u6570\u91CF],[\u7528\u6237\u7F16\u7801])
|
@ -0,0 +1,8 @@
|
|||||||
|
Class1=com.connor.chint.sap2.bom.CommandTest.CommandTest1@Excute
|
||||||
|
Class2=com.connor.chint.sap2.bom.CommandTest.CommandTest2@Excute
|
||||||
|
Class3=com.connor.chint.sap2.bom.CommandTest.CommandTest3@Suspend
|
||||||
|
Class4=com.connor.chint.sap2.bom.CommandTest.CommandTest4@Skip
|
||||||
|
Class5=com.connor.chint.sap2.bom.CommandTest.CommandTest5@Excute
|
||||||
|
Class6=com.connor.chint.sap2.bom.CommandTest.CommandTest6@Excute
|
||||||
|
Class7=com.connor.chint.sap2.bom.CommandTest.CommandTest7@Excute
|
||||||
|
BOMSQL=INSERT INTO Z888M_BOM_D (PITMID_NEW,PITMID_OLD,BOMVER,PQTY,ITMID_NEW,ITMID_OLD,QTY,EMPID) VALUES([\u7236\u7269\u6599\u7F16\u7801],[\u539F\u7236\u7269\u6599\u7F16\u7801],[\u7248\u672C],[\u6BCD\u4EF6\u57FA\u6570],[\u5B50\u7269\u6599\u7F16\u7801],[\u539F\u5B50\u7269\u6599\u7F16\u7801],[\u6570\u91CF],[\u7528\u6237\u7F16\u7801])
|
@ -0,0 +1,6 @@
|
|||||||
|
DBDriver=oracle.jdbc.driver.OracleDriver
|
||||||
|
Connection=jdbc:oracle:thin:@192.168.1.221:1521:TC10
|
||||||
|
User=admin
|
||||||
|
Password=admin
|
||||||
|
TableName=BOMCHECKINFO
|
||||||
|
TableName1=BOMCOMPLETEINFO
|
@ -0,0 +1,8 @@
|
|||||||
|
log4j.rootLogger=DEBUG,A1,R
|
||||||
|
log4j.appender.A1=org.apache.log4j.ConsoleAppender
|
||||||
|
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH\:mm\:ss} [%c]-[%p] %m%n
|
||||||
|
log4j.appender.R=org.apache.log4j.RollingFileAppender
|
||||||
|
log4j.appender.R.MaxFileSize=200KB log4j.appender.R.MaxBackupIndex=1
|
||||||
|
log4j.appender.R.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
|
@ -0,0 +1,8 @@
|
|||||||
|
DBDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
Connection=jdbc:sqlserver://192.168.1.252:1433; DatabaseName=AErp_RTDQ
|
||||||
|
User=sa
|
||||||
|
Password=pushi
|
||||||
|
switchImportFlagMaterial=10
|
||||||
|
switchImportFlagBOMs=10
|
||||||
|
PartTableName=Z888M_ITMINFO_D
|
||||||
|
BomTableName=Z888M_BOM_D
|
@ -0,0 +1,4 @@
|
|||||||
|
CHINT_ECRTemplete=CHINT_ECRTemplete
|
||||||
|
ID_QUERY=select flow,time from chint_ecn_flow WHERE TYPE='KGS'
|
||||||
|
ID_UPDATE=UPDATE CHINT_ECN_FLOW SET FLOW=? WHERE TYPE='KGS'
|
||||||
|
ID_INSERT=insert into chint_ecn_flow(type,flow,time) values(?,?,?)
|
@ -0,0 +1,120 @@
|
|||||||
|
package com.connor.chint.sap2.general;
|
||||||
|
|
||||||
|
public class GenPartBean {
|
||||||
|
private int index;
|
||||||
|
private String companyCode;
|
||||||
|
private String goodsCode;
|
||||||
|
private String name;
|
||||||
|
private String bpNo;
|
||||||
|
private String goodsFullInfo;
|
||||||
|
private String teRe;
|
||||||
|
private String unitCode;
|
||||||
|
private String pmpcCode;
|
||||||
|
private String spec;
|
||||||
|
|
||||||
|
public int getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
public void setIndex(int index) {
|
||||||
|
this.index = index;
|
||||||
|
}
|
||||||
|
public String getCompanyCode() {
|
||||||
|
return companyCode;
|
||||||
|
}
|
||||||
|
public void setCompanyCode(String companyCode) {
|
||||||
|
this.companyCode = companyCode;
|
||||||
|
}
|
||||||
|
public String getGoodsCode() {
|
||||||
|
return goodsCode;
|
||||||
|
}
|
||||||
|
public void setGoodsCode(String goodsCode) {
|
||||||
|
this.goodsCode = goodsCode;
|
||||||
|
}
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
public String getBpNo() {
|
||||||
|
return bpNo;
|
||||||
|
}
|
||||||
|
public void setBpNo(String bpNo) {
|
||||||
|
this.bpNo = bpNo;
|
||||||
|
}
|
||||||
|
public String getGoodsFullInfo() {
|
||||||
|
return goodsFullInfo;
|
||||||
|
}
|
||||||
|
public void setGoodsFullInfo(String goodsFullInfo) {
|
||||||
|
this.goodsFullInfo = goodsFullInfo;
|
||||||
|
}
|
||||||
|
public String getTeRe() {
|
||||||
|
return teRe;
|
||||||
|
}
|
||||||
|
public void setTeRe(String teRe) {
|
||||||
|
this.teRe = teRe;
|
||||||
|
}
|
||||||
|
public String getUnitCode() {
|
||||||
|
return unitCode;
|
||||||
|
}
|
||||||
|
public void setUnitCode(String unitCode) {
|
||||||
|
this.unitCode = unitCode;
|
||||||
|
}
|
||||||
|
public String getPmpcCode() {
|
||||||
|
return pmpcCode;
|
||||||
|
}
|
||||||
|
public void setPmpcCode(String pmpcCode) {
|
||||||
|
this.pmpcCode = pmpcCode;
|
||||||
|
}
|
||||||
|
public GenPartBean(int index, String companyCode, String goodsCode, String name, String bpNo,
|
||||||
|
String goodsFullInfo, String teRe, String unitCode, String pmpcCode) {
|
||||||
|
super();
|
||||||
|
this.index = index;
|
||||||
|
this.companyCode = companyCode;
|
||||||
|
this.goodsCode = goodsCode;
|
||||||
|
this.name = name;
|
||||||
|
this.bpNo = bpNo;
|
||||||
|
this.goodsFullInfo = goodsFullInfo;
|
||||||
|
this.teRe = teRe;
|
||||||
|
this.unitCode = unitCode;
|
||||||
|
this.pmpcCode = pmpcCode;
|
||||||
|
|
||||||
|
spec="";
|
||||||
|
String strs[] = goodsFullInfo.split(" ");
|
||||||
|
if(strs.length==3)
|
||||||
|
{
|
||||||
|
spec=strs[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return ""+this.index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object[] readData()
|
||||||
|
{
|
||||||
|
|
||||||
|
return new Object[] {this,name,bpNo,spec};
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object[] datas()
|
||||||
|
{
|
||||||
|
return new Object[] {companyCode,goodsCode,name,pmpcCode};
|
||||||
|
}
|
||||||
|
public String getSpec() {
|
||||||
|
return spec;
|
||||||
|
}
|
||||||
|
public void setSpec(String spec) {
|
||||||
|
this.spec = spec;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,223 @@
|
|||||||
|
package com.connor.chint.sap2.general;
|
||||||
|
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.swing.JComboBox;
|
||||||
|
|
||||||
|
import com.connor.chint.sap2.util.SqlUtil;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
public class GeneralManagementController {
|
||||||
|
|
||||||
|
private GeneralManagementDialog dialog;
|
||||||
|
//private List<String> names =new ArrayList<String>();
|
||||||
|
//private List<String> bpNos =new ArrayList<String>();
|
||||||
|
|
||||||
|
protected Map<String, List<String>> name_BpNos = new HashMap<String, List<String>>();
|
||||||
|
|
||||||
|
|
||||||
|
// t.cgdpmpccode like '990101%'
|
||||||
|
private static String SQL_QUERY_ALL="select t.GoodsName,t.GoodsBpNo from ccemvw_cgd t where 1=1 and t.Goodspmpccode like '220103001'";
|
||||||
|
private static String SQL_QUERY="select t.CompanyCodeStr,t.GoodsCode,t.GoodsName,t.GoodsBpNo,t.GoodsFullInfo,t.GoodsTeRe,t.GoodsUnitCode,t.GoodsPmpcCode from ccemvw_cgd t where 1=1 and t.Goodspmpccode like '220103001'";
|
||||||
|
public GeneralManagementController(GeneralManagementDialog dialog) {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
this.dialog = dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkConn()
|
||||||
|
{
|
||||||
|
return SqlUtil.getConnection()==null?false:true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String sss = "7ZDB002-TJSJ001";
|
||||||
|
int index =-1;
|
||||||
|
for(int i=sss.length()-1;i>=0;i--)
|
||||||
|
{
|
||||||
|
if(sss.charAt(i)>'9'||sss.charAt(i)<'0')
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println("ss1:"+sss.substring(0,index+1));
|
||||||
|
|
||||||
|
System.out.println("流水码:"+sss.substring(index+1));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public void queryAll() throws SQLException
|
||||||
|
{
|
||||||
|
ResultSet rs = SqlUtil.read(SQL_QUERY_ALL);
|
||||||
|
List<String> names = new ArrayList<String>();
|
||||||
|
while(rs.next())
|
||||||
|
{
|
||||||
|
String name= rs.getString(1);
|
||||||
|
String bpNo= rs.getString(2);
|
||||||
|
if(!names.contains(name))
|
||||||
|
{
|
||||||
|
names.add(name);
|
||||||
|
List<String> lists = new ArrayList<String>();
|
||||||
|
lists.add(bpNo);
|
||||||
|
name_BpNos.put(name, lists);
|
||||||
|
lists = null;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
if(!name_BpNos.get(name).contains(bpNo))
|
||||||
|
{
|
||||||
|
name_BpNos.get(name).add(bpNo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//GenPartBean bean =new GenPartBean(dialog.gp_lists.size()+1, companyCode, goodsCode, name, bpNo, goodsFullInfo, teRe, unitCode, pmpcCode);
|
||||||
|
//dialog.gp_lists.add(bean);
|
||||||
|
}
|
||||||
|
if(!name_BpNos.isEmpty())
|
||||||
|
{
|
||||||
|
String name_s[] = new String[names.size()];
|
||||||
|
names.toArray(name_s);
|
||||||
|
dialog.j_Name = new JComboBox<String>(name_s);
|
||||||
|
dialog.j_Name.setBounds(new Rectangle(119, 43, 95, 22));
|
||||||
|
dialog.j_Name.setEditable(true);
|
||||||
|
System.out.println("锁定值:"+dialog.j_Name.getSelectedItem());
|
||||||
|
System.out.println("name_s[0]:"+name_s[0]);
|
||||||
|
List<String> bpNos = name_BpNos.get(name_s[0]);
|
||||||
|
String bpNo_s[] = new String[bpNos.size()];
|
||||||
|
bpNos.toArray(bpNo_s);
|
||||||
|
dialog.j_BpNo = new JComboBox<String>(bpNo_s);
|
||||||
|
dialog.j_BpNo.setBounds(new Rectangle(119, 43, 95, 22));
|
||||||
|
dialog.j_BpNo.setEditable(true);
|
||||||
|
System.out.println("存在通用件");
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
dialog.j_Name = new JComboBox<String>();
|
||||||
|
dialog.j_Name.setBounds(new Rectangle(119, 43, 95, 22));
|
||||||
|
dialog.j_Name.setEditable(true);
|
||||||
|
dialog.j_BpNo = new JComboBox<String>();
|
||||||
|
dialog.j_BpNo.setBounds(new Rectangle(119, 43, 95, 22));
|
||||||
|
dialog.j_BpNo.setEditable(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//刷新表格
|
||||||
|
public void refreshData(List<GenPartBean> beans) {
|
||||||
|
|
||||||
|
dialog.tm_part.getDataVector().clear();
|
||||||
|
dialog.t_part.clearSelection();
|
||||||
|
dialog.t_part.revalidate();
|
||||||
|
dialog.t_part.repaint();
|
||||||
|
//beans.clear();
|
||||||
|
for (GenPartBean b : beans) {
|
||||||
|
dialog.tm_part.addRow(b.readData());
|
||||||
|
}
|
||||||
|
dialog.t_part.revalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addRow(GenPartBean bean)
|
||||||
|
{
|
||||||
|
String bpNo = bean.getBpNo();
|
||||||
|
if(bpNo.trim().length()==0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int index = -1;
|
||||||
|
for(int i=bpNo.length()-1;i>=0;i--)
|
||||||
|
{
|
||||||
|
if(bpNo.charAt(i)>'9'||bpNo.charAt(i)<'0')
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(index ==-1)
|
||||||
|
{
|
||||||
|
MessageBox.post("","",MessageBox.WARNING);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
String qz = bpNo.substring(0,index+1);
|
||||||
|
String num = bpNo.substring(index+1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void doQuery() throws SQLException
|
||||||
|
{
|
||||||
|
String bpno = (String) dialog.j_BpNo.getSelectedItem();
|
||||||
|
String name = (String) dialog.j_Name.getSelectedItem();
|
||||||
|
String spec = dialog.j_spec.getText();
|
||||||
|
StringBuilder sql = new StringBuilder(SQL_QUERY);
|
||||||
|
List<String> objs = new ArrayList<String>();
|
||||||
|
if(bpno!=null && !bpno.equals(""))
|
||||||
|
{
|
||||||
|
sql.append(" and t.GoodsBpNo = ? ");
|
||||||
|
objs.add(bpno);
|
||||||
|
}
|
||||||
|
if(name!=null && !name.equals(""))
|
||||||
|
{
|
||||||
|
sql.append(" and t.GoodsName = ? ");
|
||||||
|
objs.add(name);
|
||||||
|
}
|
||||||
|
if(spec!=null && !spec.equals("") && !spec.equals("*"))
|
||||||
|
{
|
||||||
|
sql.append(" and t.GoodsFullInfo like ? ");
|
||||||
|
objs.add(getRep(spec,true));
|
||||||
|
}
|
||||||
|
System.out.println("query_SQL:"+sql.toString());
|
||||||
|
System.out.println(objs);
|
||||||
|
ResultSet rs = SqlUtil.read(objs.toArray(), sql.toString());
|
||||||
|
dialog.gp_lists.clear();
|
||||||
|
while(rs.next())
|
||||||
|
{
|
||||||
|
String companyCode = rs.getString(1);
|
||||||
|
String goodsCode= rs.getString(2);
|
||||||
|
String name2= rs.getString(3);
|
||||||
|
String bpNo= rs.getString(4);
|
||||||
|
String goodsFullInfo= rs.getString(5);
|
||||||
|
String teRe= rs.getString(6);
|
||||||
|
String unitCode= rs.getString(7);
|
||||||
|
String pmpcCode= rs.getString(8);
|
||||||
|
GenPartBean bean =new GenPartBean(dialog.gp_lists.size()+1, companyCode, goodsCode, name2, bpNo, goodsFullInfo, teRe, unitCode, pmpcCode);
|
||||||
|
System.out.println("查到一个结果");
|
||||||
|
dialog.gp_lists.add(bean);
|
||||||
|
}
|
||||||
|
refreshData(dialog.gp_lists);
|
||||||
|
objs=null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRep(String str,boolean flag)
|
||||||
|
{
|
||||||
|
StringBuilder stb = new StringBuilder();
|
||||||
|
if(!flag)
|
||||||
|
{
|
||||||
|
return str.replace("*", "%");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!str.startsWith("*"))
|
||||||
|
{
|
||||||
|
stb.append("%");
|
||||||
|
|
||||||
|
}
|
||||||
|
stb.append(str.trim());
|
||||||
|
if(!str.endsWith("*"))
|
||||||
|
{
|
||||||
|
stb.append("%");
|
||||||
|
}
|
||||||
|
str = (stb.toString()).replace("*", "%");
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,340 @@
|
|||||||
|
package com.connor.chint.sap2.general;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.FlowLayout;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.ItemEvent;
|
||||||
|
import java.awt.event.ItemListener;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.awt.event.KeyListener;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Vector;
|
||||||
|
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.Box;
|
||||||
|
import javax.swing.BoxLayout;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JComboBox;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTable;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.table.DefaultTableModel;
|
||||||
|
import javax.swing.table.TableColumnModel;
|
||||||
|
|
||||||
|
import com.connor.chint.sap2.util.KUtil;
|
||||||
|
import com.connor.chint.sap2.util.ProgressBar;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFDialog;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
public class GeneralManagementDialog extends AbstractAIFDialog {
|
||||||
|
|
||||||
|
private AbstractAIFApplication app;
|
||||||
|
private TCSession session;
|
||||||
|
|
||||||
|
private GeneralManagementController controller;
|
||||||
|
|
||||||
|
protected DefaultTableModel tm_part;
|
||||||
|
protected JTable t_part;
|
||||||
|
public static final String[] HEADER = new String[] { "序号", "图样代号","图样名称","规格","申请人" ,"申请时间"};
|
||||||
|
public static final int[] HEADERWIDTH = new int[] { 50, 60, 100,100,100,60,60};
|
||||||
|
|
||||||
|
protected JComboBox<String> j_Name;
|
||||||
|
protected JComboBox<String> j_BpNo;
|
||||||
|
protected JTextField j_spec;
|
||||||
|
private JButton b_add;
|
||||||
|
private JButton b_remove;
|
||||||
|
private JButton b_apply;
|
||||||
|
private JButton b_copy;
|
||||||
|
private JButton b_query;
|
||||||
|
|
||||||
|
protected List<GenPartBean> gp_lists =new ArrayList<GenPartBean>();
|
||||||
|
public GeneralManagementDialog(AbstractAIFApplication app) {
|
||||||
|
super(false);
|
||||||
|
this.app = app;
|
||||||
|
this.session = (TCSession) app.getSession();
|
||||||
|
this.controller = new GeneralManagementController(this);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
if(!controller.checkConn())
|
||||||
|
{
|
||||||
|
KUtil.error(this, "连接数据库失败:\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
controller.queryAll();
|
||||||
|
initUI();
|
||||||
|
//controller.refreshData(gp_lists);
|
||||||
|
|
||||||
|
addListener();
|
||||||
|
showDialog();
|
||||||
|
} catch (SQLException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
private void initUI()
|
||||||
|
{
|
||||||
|
//setBounds(100, 100, 450, 300);
|
||||||
|
this.setPreferredSize(new Dimension(800, 600));
|
||||||
|
this.setMinimumSize(new Dimension(750, 480));
|
||||||
|
this.setTitle("通用件管理");
|
||||||
|
this.getContentPane().setLayout(new BorderLayout());
|
||||||
|
this.add(BorderLayout.EAST,getSRightPanel());
|
||||||
|
this.add(BorderLayout.CENTER,getCenterPanel());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel getNorthPanel()
|
||||||
|
{
|
||||||
|
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 10));
|
||||||
|
JLabel kl =new JLabel(" ");
|
||||||
|
JLabel l_Name = new JLabel("通用件名称: ");
|
||||||
|
j_Name.setPreferredSize(new Dimension(120,25));
|
||||||
|
JLabel l_BpNo = new JLabel("图样代号: ");
|
||||||
|
j_BpNo.setPreferredSize(new Dimension(120,25));
|
||||||
|
j_spec = new JTextField();
|
||||||
|
j_spec.setPreferredSize(new Dimension(120,25));
|
||||||
|
panel.add(l_Name);
|
||||||
|
panel.add(j_Name);
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(l_BpNo);
|
||||||
|
panel.add(j_BpNo);
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(new JLabel("规格:"));
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(j_spec);
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel getCenterPanel()
|
||||||
|
{
|
||||||
|
JPanel panel = new JPanel(new BorderLayout());
|
||||||
|
panel.add(BorderLayout.CENTER,getTablePanel());
|
||||||
|
panel.add(BorderLayout.NORTH,getNorthPanel());
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void addListener()
|
||||||
|
{
|
||||||
|
b_add.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
int rowConut = t_part.getRowCount();
|
||||||
|
if(rowConut!=1)
|
||||||
|
return;
|
||||||
|
GenPartBean bean = (GenPartBean) tm_part.getValueAt(0, 0);
|
||||||
|
String bpno = bean.getBpNo();
|
||||||
|
tm_part.addRow(new Vector<String>());
|
||||||
|
//System.out.println("新增行");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
b_remove.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
setCompEnabled(false);
|
||||||
|
int rows[]=t_part.getSelectedRows();
|
||||||
|
System.out.println("删除行'");
|
||||||
|
if(rows.length==0)
|
||||||
|
{
|
||||||
|
setCompEnabled(true);
|
||||||
|
MessageBox.post(GeneralManagementDialog.this, "请选择要删除的行" , "", MessageBox.WARNING);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ProgressBar pb = new ProgressBar(GeneralManagementDialog.this, new Dimension(250, 50));
|
||||||
|
pb.setText("数据删除...");
|
||||||
|
pb.showDialog();
|
||||||
|
for(int i=rows.length-1;i>=0;i--)
|
||||||
|
{
|
||||||
|
pb.setText("正在删除第"+rows[i]+"行数据");
|
||||||
|
System.out.println("删除记录");
|
||||||
|
tm_part.removeRow(rows[i]);
|
||||||
|
}
|
||||||
|
pb.disposeDialog();
|
||||||
|
setCompEnabled(true);
|
||||||
|
MessageBox.post(GeneralManagementDialog.this, "数据删除成功" , "", MessageBox.INFORMATION);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
b_query.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
ProgressBar pb = new ProgressBar(GeneralManagementDialog.this, new Dimension(250, 50));
|
||||||
|
setCompEnabled(false);
|
||||||
|
try {
|
||||||
|
pb.setText("通用件查询...");
|
||||||
|
pb.showDialog();
|
||||||
|
controller.doQuery();
|
||||||
|
pb.disposeDialog();
|
||||||
|
setCompEnabled(true);
|
||||||
|
MessageBox.post(GeneralManagementDialog.this, "查询结束" , "", MessageBox.INFORMATION);
|
||||||
|
} catch (SQLException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
pb.disposeDialog();
|
||||||
|
setCompEnabled(true);
|
||||||
|
MessageBox.post(GeneralManagementDialog.this, "查询时时发生异常:" , "", MessageBox.ERROR);
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
j_spec.addKeyListener(new KeyListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyTyped(KeyEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyReleased(KeyEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyPressed(KeyEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
if(e.getKeyChar()==KeyEvent.VK_ENTER ) //按回车键执行相应操作;
|
||||||
|
{
|
||||||
|
ProgressBar pb = new ProgressBar(GeneralManagementDialog.this, new Dimension(250, 50));
|
||||||
|
setCompEnabled(false);
|
||||||
|
try {
|
||||||
|
pb.setText("通用件查询...");
|
||||||
|
pb.showDialog();
|
||||||
|
controller.doQuery();
|
||||||
|
pb.disposeDialog();
|
||||||
|
setCompEnabled(true);
|
||||||
|
MessageBox.post(GeneralManagementDialog.this, "查询结束" , "", MessageBox.INFORMATION);
|
||||||
|
} catch (SQLException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
pb.disposeDialog();
|
||||||
|
setCompEnabled(true);
|
||||||
|
MessageBox.post(GeneralManagementDialog.this, "查询时时发生异常:" , "", MessageBox.ERROR);
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
j_Name.addItemListener(new ItemListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void itemStateChanged(ItemEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
if(e.getStateChange() == ItemEvent.SELECTED)
|
||||||
|
{
|
||||||
|
String name = (String) j_Name.getSelectedItem();
|
||||||
|
List<String> bpNos = controller.name_BpNos.get(name);
|
||||||
|
String bpNo_s[] = new String[bpNos.size()];
|
||||||
|
bpNos.toArray(bpNo_s);
|
||||||
|
//j_BpNo.removeAll();
|
||||||
|
j_BpNo.removeAllItems();
|
||||||
|
for(int i=0;i<bpNo_s.length;i++)
|
||||||
|
{
|
||||||
|
j_BpNo.addItem(bpNo_s[i]);
|
||||||
|
}
|
||||||
|
//j_BpNo.setModel(aModel);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setCompEnabled(boolean b) {
|
||||||
|
this.b_add.setEnabled(b);
|
||||||
|
this.b_apply.setEnabled(b);
|
||||||
|
this.b_copy.setEnabled(b);
|
||||||
|
this.b_query.setEnabled(b);
|
||||||
|
this.b_remove.setEnabled(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private JPanel getSRightPanel()
|
||||||
|
{
|
||||||
|
JPanel panel = new JPanel();
|
||||||
|
//panel.setLayout(new GridLayout(2, 1, 10, 30));
|
||||||
|
panel.setPreferredSize(new Dimension(100, 470));
|
||||||
|
BoxLayout layout=new BoxLayout(panel, BoxLayout.Y_AXIS);
|
||||||
|
panel.setLayout(layout);
|
||||||
|
//panel.setLayout(null);
|
||||||
|
b_add = new JButton("新增");
|
||||||
|
b_remove = new JButton("删除");
|
||||||
|
b_apply = new JButton("申请");
|
||||||
|
b_copy= new JButton("复制");
|
||||||
|
b_query = new JButton("查询");
|
||||||
|
panel.add(Box.createRigidArea(new Dimension(15, 5)));
|
||||||
|
panel.add(b_query);
|
||||||
|
panel.add(Box.createRigidArea(new Dimension(15, 65)));
|
||||||
|
panel.add(b_add);
|
||||||
|
panel.add(Box.createRigidArea(new Dimension(15, 20)));
|
||||||
|
panel.add(b_remove);
|
||||||
|
panel.add(Box.createRigidArea(new Dimension(15, 20))); //单纯的空白区域隔开
|
||||||
|
panel.add(b_apply);
|
||||||
|
panel.add(Box.createRigidArea(new Dimension(15, 20)));
|
||||||
|
panel.add(b_copy);
|
||||||
|
return panel;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel getTablePanel()
|
||||||
|
{
|
||||||
|
JPanel panel = new JPanel(new BorderLayout());
|
||||||
|
tm_part = new DefaultTableModel();
|
||||||
|
t_part = new JTable(tm_part) {
|
||||||
|
@Override
|
||||||
|
public boolean isCellEditable(int row, int column) { // 选择列(第三列)设置可编辑
|
||||||
|
if (column == 3)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
tm_part.setDataVector(null, HEADER);
|
||||||
|
t_part.getTableHeader().setReorderingAllowed(false); // 设置列不可移动,否则会发生类型转换错误(第三列)
|
||||||
|
this.t_part.setRowHeight(23);
|
||||||
|
TableColumnModel colModel = this.t_part.getColumnModel();
|
||||||
|
int colCnt = HEADERWIDTH.length;
|
||||||
|
colModel.getColumn(0).setMaxWidth(HEADERWIDTH[0]);
|
||||||
|
for (int i = 0; i < colCnt; i++) {
|
||||||
|
colModel.getColumn(i).setPreferredWidth(HEADERWIDTH[i]);
|
||||||
|
}
|
||||||
|
//this.t_part.getTableHeader().setBackground(Color.blue);
|
||||||
|
JScrollPane scroll = new JScrollPane(t_part);
|
||||||
|
panel.add(BorderLayout.CENTER, scroll);
|
||||||
|
panel.setBorder(BorderFactory.createLoweredBevelBorder());
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
BOM.PATH=
|
||||||
|
BOM.GENERAL.PATH=
|
After Width: | Height: | Size: 405 B |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 735 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 636 B |
After Width: | Height: | Size: 506 B |
After Width: | Height: | Size: 782 B |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 522 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 660 B |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 680 B |
After Width: | Height: | Size: 577 B |
After Width: | Height: | Size: 560 B |
After Width: | Height: | Size: 730 B |
After Width: | Height: | Size: 738 B |
After Width: | Height: | Size: 759 B |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 750 B |
After Width: | Height: | Size: 450 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 213 B |
After Width: | Height: | Size: 566 B |
After Width: | Height: | Size: 595 B |
After Width: | Height: | Size: 687 B |
After Width: | Height: | Size: 542 B |
@ -0,0 +1,422 @@
|
|||||||
|
package com.connor.chint.sap2.modelAudit;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.GridBagConstraints;
|
||||||
|
import java.awt.GridBagLayout;
|
||||||
|
import java.awt.Insets;
|
||||||
|
import java.awt.Point;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.ItemEvent;
|
||||||
|
import java.awt.event.ItemListener;
|
||||||
|
import java.awt.event.WindowEvent;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JCheckBox;
|
||||||
|
import javax.swing.JDialog;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTable;
|
||||||
|
import javax.swing.RowFilter;
|
||||||
|
import javax.swing.table.DefaultTableModel;
|
||||||
|
import javax.swing.table.TableRowSorter;
|
||||||
|
|
||||||
|
import org.apache.commons.collections.map.HashedMap;
|
||||||
|
|
||||||
|
import com.connor.chint.sap2.bean.ModelAuditBean;
|
||||||
|
import com.connor.chint.sap2.proc_zy.CreateProcZYDialog;
|
||||||
|
import com.connor.chint.sap2.util.ConfirmDialogUtil;
|
||||||
|
import com.connor.chint.sap2.util.KUtil;
|
||||||
|
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
|
||||||
|
import com.teamcenter.rac.kernel.TCException;
|
||||||
|
|
||||||
|
public class ModelSelectDialog extends JDialog {
|
||||||
|
|
||||||
|
private List<JCheckBox> checks= new ArrayList<JCheckBox>();
|
||||||
|
private JCheckBox jcom_all;
|
||||||
|
private JButton ok_btn;
|
||||||
|
private JButton cel_btn;
|
||||||
|
private int colnum=-1;
|
||||||
|
private JTable t_part;
|
||||||
|
private DefaultTableModel tm_part;
|
||||||
|
private String colName;
|
||||||
|
private Map<String, ModelSelectDialog> selectedDialogs=null;
|
||||||
|
private TableRowSorter<DefaultTableModel> sorter;
|
||||||
|
private JScrollPane checkPanel;
|
||||||
|
private JPanel panel2;
|
||||||
|
|
||||||
|
public JPanel getPanel2() {
|
||||||
|
return panel2;
|
||||||
|
}
|
||||||
|
public void setPanel2(JPanel panel2) {
|
||||||
|
this.panel2 = panel2;
|
||||||
|
}
|
||||||
|
public String getColName() {
|
||||||
|
return colName;
|
||||||
|
}
|
||||||
|
public void setColName(String colName) {
|
||||||
|
this.colName = colName;
|
||||||
|
}
|
||||||
|
public JScrollPane getCheckPanel() {
|
||||||
|
return checkPanel;
|
||||||
|
}
|
||||||
|
public void setCheckPanel(JScrollPane checkPanel) {
|
||||||
|
this.checkPanel = checkPanel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//是否第一个按下的
|
||||||
|
private boolean isFirst = false;
|
||||||
|
public boolean isFirst() {
|
||||||
|
return isFirst;
|
||||||
|
}
|
||||||
|
public void setFirst(boolean isFirst) {
|
||||||
|
this.isFirst = isFirst;
|
||||||
|
}
|
||||||
|
public TableRowSorter<DefaultTableModel> getSorter() {
|
||||||
|
return sorter;
|
||||||
|
}
|
||||||
|
public void setSorter(TableRowSorter<DefaultTableModel> sorter) {
|
||||||
|
this.sorter = sorter;
|
||||||
|
}
|
||||||
|
public Map<String, ModelSelectDialog> getSelectedDialogs() {
|
||||||
|
return selectedDialogs;
|
||||||
|
}
|
||||||
|
public void setSelectedDialogs(Map<String, ModelSelectDialog> selectedDialogs) {
|
||||||
|
this.selectedDialogs = selectedDialogs;
|
||||||
|
}
|
||||||
|
public int getColnum() {
|
||||||
|
return colnum;
|
||||||
|
}
|
||||||
|
public void setColnum(int colnum) {
|
||||||
|
this.colnum = colnum;
|
||||||
|
}
|
||||||
|
public JButton getOk_btn() {
|
||||||
|
return ok_btn;
|
||||||
|
}
|
||||||
|
public void setOk_btn(JButton ok_btn) {
|
||||||
|
this.ok_btn = ok_btn;
|
||||||
|
}
|
||||||
|
public List<JCheckBox> getChecks() {
|
||||||
|
return checks;
|
||||||
|
}
|
||||||
|
public void setChecks(List<JCheckBox> checks) {
|
||||||
|
this.checks = checks;
|
||||||
|
}
|
||||||
|
public JCheckBox getJcom_all() {
|
||||||
|
return jcom_all;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJcom_all(JCheckBox jcom_all) {
|
||||||
|
this.jcom_all = jcom_all;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void repaintChecks()
|
||||||
|
{
|
||||||
|
if(isFirst)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
this.setSize(400,400);
|
||||||
|
if(!jcom_all.isSelected())
|
||||||
|
jcom_all.doClick();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processWindowEvent(WindowEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
if(e.getID()==WindowEvent.WINDOW_CLOSING )
|
||||||
|
{
|
||||||
|
repaintChecks();
|
||||||
|
}
|
||||||
|
|
||||||
|
super.processWindowEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ModelSelectDialog(String colName,DefaultTableModel table_model,List<String> values,
|
||||||
|
JTable table,TableRowSorter<DefaultTableModel> sort)
|
||||||
|
{
|
||||||
|
this.colName = colName;
|
||||||
|
this.t_part = table;
|
||||||
|
this.tm_part = table_model;
|
||||||
|
this.sorter = sort;
|
||||||
|
this.setTitle(colName);
|
||||||
|
Collections.sort(values);
|
||||||
|
checks.clear();
|
||||||
|
jcom_all = new JCheckBox("全部");
|
||||||
|
GridBagConstraints s = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(4, 5, 4, 5), 0, 0);
|
||||||
|
jcom_all.addActionListener(new ActionListener() {
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
boolean flag = jcom_all.isSelected();
|
||||||
|
if(flag)
|
||||||
|
{
|
||||||
|
ok_btn.setEnabled(true);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
ok_btn.setEnabled(false);
|
||||||
|
}
|
||||||
|
for(JCheckBox j:checks)
|
||||||
|
{
|
||||||
|
j.setSelected(flag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
panel2 = new JPanel(new GridBagLayout());
|
||||||
|
panel2.setBorder(BorderFactory.createEmptyBorder(11, 5, 12, 5));
|
||||||
|
KUtil.newRow(panel2, new JLabel(""), s, 1);
|
||||||
|
KUtil.newRow(panel2, new JLabel(""), s, 1);
|
||||||
|
ok_btn = new JButton("确定");
|
||||||
|
cel_btn = new JButton("取消");
|
||||||
|
KUtil.addCol(panel2, ok_btn, s,1, 1);
|
||||||
|
KUtil.addCol(panel2, cel_btn, s,1, 1);
|
||||||
|
KUtil.addCol(panel2, new JLabel(""), s,0, 1);
|
||||||
|
|
||||||
|
cel_btn.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
repaintChecks();
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ok_btn.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
|
||||||
|
boolean select_all = false;
|
||||||
|
select_all = isFirst;
|
||||||
|
if(isFirst)
|
||||||
|
{
|
||||||
|
if(jcom_all.isSelected())
|
||||||
|
{
|
||||||
|
isFirst = false;
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
boolean flag = true;
|
||||||
|
if(selectedDialogs!=null)
|
||||||
|
{
|
||||||
|
for(String key:selectedDialogs.keySet())
|
||||||
|
{
|
||||||
|
if(selectedDialogs.get(key).isFirst())
|
||||||
|
{
|
||||||
|
flag = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//selectedDialogs.get(key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag)
|
||||||
|
isFirst = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(selectedDialogs!=null)
|
||||||
|
{
|
||||||
|
List<RowFilter<Object,Object>> filters = new ArrayList<RowFilter<Object,Object>>(2);
|
||||||
|
for(String key:selectedDialogs.keySet())
|
||||||
|
{
|
||||||
|
ModelSelectDialog dialog = selectedDialogs.get(key);
|
||||||
|
int index = dialog.getColnum();
|
||||||
|
|
||||||
|
if(index==colnum)
|
||||||
|
{
|
||||||
|
//System.out.println("列【"+index+"】全选");
|
||||||
|
//filters.add(RowFilter.regexFilter(null, index));
|
||||||
|
List<JCheckBox> chs = dialog.getChecks();
|
||||||
|
List<RowFilter<Object,Object>> filters2 = new ArrayList<RowFilter<Object,Object>>(2);
|
||||||
|
|
||||||
|
for(JCheckBox ch:chs)
|
||||||
|
{
|
||||||
|
if(ch.isSelected() )
|
||||||
|
{
|
||||||
|
filters2.add(RowFilter.regexFilter(ch.getText(), index));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(filters2.size()>0)
|
||||||
|
{
|
||||||
|
filters.add(RowFilter.orFilter(filters2));
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
if(!dialog.getJcom_all().isSelected())
|
||||||
|
{
|
||||||
|
List<JCheckBox> chs = dialog.getChecks();
|
||||||
|
List<RowFilter<Object,Object>> filters2 = new ArrayList<RowFilter<Object,Object>>(2);
|
||||||
|
|
||||||
|
for(JCheckBox ch:chs)
|
||||||
|
{
|
||||||
|
if(ch.isSelected() )
|
||||||
|
{
|
||||||
|
filters2.add(RowFilter.regexFilter(ch.getText(), index));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(filters2.size()>0)
|
||||||
|
{
|
||||||
|
filters.add(RowFilter.orFilter(filters2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(filters.size()>0)
|
||||||
|
{
|
||||||
|
RowFilter rf =RowFilter.andFilter(filters);
|
||||||
|
//TableRowSorter<DefaultTableModel> sorter = new TableRowSorter<DefaultTableModel>(tm_part);
|
||||||
|
t_part.setRowSorter(sorter);
|
||||||
|
sorter.setRowFilter(rf);
|
||||||
|
repaintCheckPanel(t_part, tm_part, selectedDialogs,sorter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
JPanel panel = new JPanel(new GridBagLayout());
|
||||||
|
panel.setBorder(BorderFactory.createEmptyBorder(11, 5, 12, 5));
|
||||||
|
this.setSize(400,400);
|
||||||
|
//GridBagConstraints s = new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(4, 5, 4, 5), 0, 0);
|
||||||
|
jcom_all.setSelected(true);
|
||||||
|
System.out.println(jcom_all.getText()+"---");
|
||||||
|
KUtil.newRow(panel, new JLabel(""), s, 1);
|
||||||
|
KUtil.addCol(panel, jcom_all, s,0, 1);
|
||||||
|
|
||||||
|
for(int i=0;i<values.size();i++)
|
||||||
|
{
|
||||||
|
KUtil.newRow(panel, new JLabel(""), s, 1);
|
||||||
|
JCheckBox jcom = new JCheckBox(values.get(i));
|
||||||
|
jcom.setSelected(true);
|
||||||
|
KUtil.addCol(panel, jcom, s,0, 1);
|
||||||
|
checks.add(jcom);
|
||||||
|
}
|
||||||
|
for (JCheckBox jcom : checks) {
|
||||||
|
jcom.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
//jcom_all.setSelected(true);
|
||||||
|
int index = 0;
|
||||||
|
for (JCheckBox j : checks) {
|
||||||
|
if (!j.isSelected()) {
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//System.out.println("index:"+index+";checks:"+checks.size());
|
||||||
|
if(index==0)
|
||||||
|
{
|
||||||
|
ok_btn.setEnabled(true);
|
||||||
|
jcom_all.setSelected(true);
|
||||||
|
}else if(index == checks.size())
|
||||||
|
{
|
||||||
|
ok_btn.setEnabled(false);
|
||||||
|
jcom_all.setSelected(false);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
ok_btn.setEnabled(true);
|
||||||
|
jcom_all.setSelected(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
JScrollPane scrol = new JScrollPane(panel);
|
||||||
|
scrol.getVerticalScrollBar().setUnitIncrement(20);
|
||||||
|
this.add(BorderLayout.CENTER,scrol);
|
||||||
|
this.add(BorderLayout.SOUTH,panel2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//筛选后重置界面
|
||||||
|
public void repaintCheckPanel(JTable table,DefaultTableModel tm_part,Map<String, ModelSelectDialog> dialogs,TableRowSorter<DefaultTableModel> sorter)
|
||||||
|
{
|
||||||
|
int rowCout = table.getRowCount();
|
||||||
|
Map<String, List<String>> newChecksValues = new HashedMap();
|
||||||
|
for(int i=1;i<table.getColumnCount();i++)
|
||||||
|
{
|
||||||
|
List<String> values = new ArrayList<>();
|
||||||
|
newChecksValues.put(table.getColumnName(i), values);
|
||||||
|
}
|
||||||
|
System.out.println("newChecksValues:"+newChecksValues);
|
||||||
|
if(rowCout>0)
|
||||||
|
{
|
||||||
|
for(int i=0;i<rowCout;i++)
|
||||||
|
{
|
||||||
|
ModelAuditBean bean = (ModelAuditBean) table.getValueAt(i, 2);
|
||||||
|
Object[] objs = bean.RowData();
|
||||||
|
for(int j=1;j<objs.length;j++)
|
||||||
|
{
|
||||||
|
List<String> list = newChecksValues.get(GYModelAuditDialog.HEADER[j]);
|
||||||
|
if(!list.contains(objs[j]))
|
||||||
|
{
|
||||||
|
list.add((String) objs[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(String key:dialogs.keySet())
|
||||||
|
{
|
||||||
|
ModelSelectDialog dialog = dialogs.get(key);
|
||||||
|
//System.out.println("dialog colName:"+dialog.getColName()+";是否第一个:"+dialog.isFirst());
|
||||||
|
if(dialog.isFirst())
|
||||||
|
{
|
||||||
|
dialogs.put(key, dialog);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<String> values = new ArrayList<>();
|
||||||
|
if(newChecksValues.containsKey(key))
|
||||||
|
values= newChecksValues.get(key);
|
||||||
|
//System.out.println("dialog colName:"+dialog.getColName()+";重置:"+values);
|
||||||
|
ModelSelectDialog dialog_new = new ModelSelectDialog(key, tm_part, values, table,sorter);
|
||||||
|
int index = tm_part.findColumn(key);
|
||||||
|
if(index!=-1)
|
||||||
|
dialog.setColnum(index);
|
||||||
|
//dialog.setSorter(sorter);
|
||||||
|
dialogs.put(key, dialog_new);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setLocal(int x,int y,JTable table,JDialog dialog)
|
||||||
|
{
|
||||||
|
Point invokerOrigin;
|
||||||
|
invokerOrigin = table.getLocationOnScreen();
|
||||||
|
long lx, ly;
|
||||||
|
lx = ((long) invokerOrigin.x) + ((long) x);
|
||||||
|
ly = ((long) invokerOrigin.y) + ((long) y);
|
||||||
|
if (lx > Integer.MAX_VALUE)
|
||||||
|
lx = Integer.MAX_VALUE;
|
||||||
|
if (lx < Integer.MIN_VALUE)
|
||||||
|
lx = Integer.MIN_VALUE;
|
||||||
|
if (ly > Integer.MAX_VALUE)
|
||||||
|
ly = Integer.MAX_VALUE;
|
||||||
|
if (ly < Integer.MIN_VALUE)
|
||||||
|
ly = Integer.MIN_VALUE;
|
||||||
|
|
||||||
|
dialog.setLocation((int) lx, (int) ly);
|
||||||
|
dialog.setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
#\u8BB0\u5F55\u5DE5\u827A\u3001\u5DE5\u5E8F\u4FE1\u606F
|
||||||
|
|
||||||
|
#\u53D8\u538B\u5668 M005
|
||||||
|
M005.GX=ICM060201
|
||||||
|
M005.GY=ICM060202
|
||||||
|
#\u4E2D\u538B\u8BBE\u5907 M008
|
||||||
|
M008.GX=ICM060101
|
||||||
|
M008.GY=ICM060102
|
||||||
|
#\u4E2D\u538B\u5F00\u5173 MO10
|
||||||
|
M010.GX=ICM090101
|
||||||
|
M010.GY=ICM090102
|
||||||
|
#\u9AD8\u538B\u5F00\u5173 M006
|
||||||
|
M006.GX=ICM060301
|
||||||
|
M006.GY=ICM060302
|
||||||
|
#\u7EDD\u7F18\u5B50\u4E0E\u907F\u96F7\u5668 M011
|
||||||
|
M011.GX=ICM100101
|
||||||
|
M011.GY=ICM100102
|
||||||
|
#\u4F4E\u538B\u8BDA\u521B M030
|
||||||
|
M030.GX=ICM110101
|
||||||
|
M030.GY=ICM110102
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.connor.chint.sap2.proc_zy;
|
||||||
|
|
||||||
|
public class CHINT_ClassificationCode {
|
||||||
|
private String productModel; //²úÆ·ÐͺÅ
|
||||||
|
private String classificationCode; //ÎïÁÏ·ÖÀàÂë
|
||||||
|
private String ZT2_ClassificationCode; //ͶÁϹ¤Ðò
|
||||||
|
private String classificationName; //ͶÁϹ¤ÐòÃû³Æ
|
||||||
|
public String getProductModel() {
|
||||||
|
return productModel;
|
||||||
|
}
|
||||||
|
public void setProductModel(String productModel) {
|
||||||
|
this.productModel = productModel;
|
||||||
|
}
|
||||||
|
public String getClassificationCode() {
|
||||||
|
return classificationCode;
|
||||||
|
}
|
||||||
|
public void setClassificationCode(String classificationCode) {
|
||||||
|
this.classificationCode = classificationCode;
|
||||||
|
}
|
||||||
|
public String getZT2_ClassificationCode() {
|
||||||
|
return ZT2_ClassificationCode;
|
||||||
|
}
|
||||||
|
public void setZT2_ClassificationCode(String zT2_ClassificationCode) {
|
||||||
|
ZT2_ClassificationCode = zT2_ClassificationCode;
|
||||||
|
}
|
||||||
|
public String getClassificationName() {
|
||||||
|
return classificationName;
|
||||||
|
}
|
||||||
|
public void setClassificationName(String classificationName) {
|
||||||
|
this.classificationName = classificationName;
|
||||||
|
}
|
||||||
|
public CHINT_ClassificationCode(String classificationCode, String zT2_ClassificationCode,
|
||||||
|
String classificationName) {
|
||||||
|
super();
|
||||||
|
this.classificationCode = classificationCode;
|
||||||
|
ZT2_ClassificationCode = zT2_ClassificationCode;
|
||||||
|
this.classificationName = classificationName;
|
||||||
|
}
|
||||||
|
public CHINT_ClassificationCode() {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,66 @@
|
|||||||
|
# @<COPYRIGHT>@
|
||||||
|
# ==================================================
|
||||||
|
# Copyright 2007.
|
||||||
|
# Siemens Product Lifecycle Management Software Inc.
|
||||||
|
# All Rights Reserved.
|
||||||
|
# ==================================================
|
||||||
|
# @<COPYRIGHT>@
|
||||||
|
|
||||||
|
#*==================================================================================================
|
||||||
|
# File description: Properties for the substitute command / operation
|
||||||
|
#===================================================================================================
|
||||||
|
# Date Name Description of Change
|
||||||
|
#14-May-1999 Nigel Morse Brought into existance
|
||||||
|
#08-Jun-1999 nigelm remove properties to item panel
|
||||||
|
#09-Jun-1999 nigelm created
|
||||||
|
#15-Jun-1999 nigelm add properties for notes dialog
|
||||||
|
#01-Jul-1999 nigelm add revision effectivity
|
||||||
|
#04-Aug-1999 nigelm add findinbill
|
||||||
|
#05-Aug-1999 nigelm make read only pse
|
||||||
|
#08-Sep-1999 nigelm merge back from readonly fixes
|
||||||
|
#08-Oct-1999 israeli bomCompare entries
|
||||||
|
#08-Oct-1999 nigelm add values
|
||||||
|
#28-Oct-1999 israeli Merging from israeli_v60_bom
|
||||||
|
#02-Nov-1999 nigelm merge out ziv's stuff from sdldev_cs
|
||||||
|
#12-Nov-1999 pracilio Merge from claudio_cs to tc_v60_cs
|
||||||
|
#25-Jan-2000 Mark Fawcett asSubstitute for add
|
||||||
|
#24-Feb-2000 mccollr Split out the localization keys.
|
||||||
|
#23-Feb-2000 Nigel Morse add as substitute
|
||||||
|
#29-Feb-2000 Nigel Morse merge out from int_v6.2
|
||||||
|
#24-Feb-2000 Nigel Morse add remove entries
|
||||||
|
#01-Mar-2000 Nigel Morse merge out.
|
||||||
|
#09-Mar-2000 James Beard Merge from int_v6.2
|
||||||
|
#03-Apr-2000 Nigel Morse hard-coded fix
|
||||||
|
#21-Jun-2001 xuesimon add CS mapper
|
||||||
|
#27-Nov-2001 xuesimon Remove CSMapper properties
|
||||||
|
#27-Nov-2001 xuesimon promote to pv_look_v8
|
||||||
|
#27-Jan-2005 Zhixin Huang Change the icon from gif to png file.
|
||||||
|
#28-Mar-2005 basava PR#4307699-PSE->Substitute only takes one entry from a big clipboard
|
||||||
|
#06-Feb-2006 Venkatesh Chitnis de-imanization
|
||||||
|
#25-Feb-2010 William Zhou Fix PR#6310037 - CondValAgent and CondValData are available in Insert Level operation
|
||||||
|
#$HISTORY$
|
||||||
|
#=================================================================================================*/
|
||||||
|
|
||||||
|
import=com.teamcenter.rac.pse.pse,com.teamcenter.rac.common.common,com.teamcenter.rac.aif.aif
|
||||||
|
|
||||||
|
# AbstractAIFDialog looks for this key.
|
||||||
|
# The RemoveDialog overrides the title, but this key avoids
|
||||||
|
# the error comming up.
|
||||||
|
# DO NOT move to _locale.properties
|
||||||
|
# DO ignore it.
|
||||||
|
|
||||||
|
command.TITLE=NULL
|
||||||
|
|
||||||
|
insertLevelOperation=com.teamcenter.rac.pse.operations.InsertLevelOperation
|
||||||
|
saveAsItemRevDialogPanel=com.teamcenter.rac.commands.saveas.SaveAsItemRevPanel
|
||||||
|
pasteOperation=com.teamcenter.rac.pse.operations.BOMPasteOperation
|
||||||
|
|
||||||
|
# Specify the types to be loaded
|
||||||
|
com.teamcenter.rac.commands.newitem.ItemTypePanel.TYPES_LOADER=com.teamcenter.rac.commands.newitem.NewItemTypesLoader
|
||||||
|
com.teamcenter.rac.commands.newitem.NewItemTypesLoader.CLASSES=Item,Drawing
|
||||||
|
com.teamcenter.rac.commands.newitem.NewItemTypesLoader.Item.EXCLUDETYPES=EngChange,Part,Design,PSSignal,PSConnection,Schedule,ScheduleTask,Architecture,AllocationMap,CAEItem,CAEBCItem,CAEConnItem,CAELoadItem,MEOP,MEProcess,MEWorkarea,MEContext,MEGenericBOP,MEProductBOP,Vendor,BidPackage,SwDesignComp,PhysicalPart,ParmDef,ParmDefBCD,ParmDefBitDef,ParmDefBool,ParmDefDate,ParmDefDbl,ParmDefHex,ParmDefInt,ParmDefSED,ParmDefStr,ParmGrpVal,CalParm,ParmGrpDef,SSP0Frequency,ValidationAgent,ValData,ValidationReq,DesignReq,IssueReport
|
||||||
|
com.teamcenter.rac.commands.newitem.NewItemTypesLoader.vi.CLASSES=Item,MEProcess,MEOP,MEWorkarea,Drawing
|
||||||
|
com.teamcenter.rac.commands.newitem.NewItemTypesLoader.vi.Item.EXCLUDETYPES=EngChange,Part,Design,PSSignal,PSConnection,Schedule,ScheduleTask,Architecture,AllocationMap,CAEItem,CAEBCItem,CAEConnItem,CAELoadItem,MEOP,MEProcess,MEWorkarea,MEContext,MEGenericBOP,MEProductBOP,Vendor,BidPackage,SwDesignComp,PhysicalPart,ParmDef,ParmDefBCD,ParmDefBitDef,ParmDefBool,ParmDefDate,ParmDefDbl,ParmDefHex,ParmDefInt,ParmDefSED,ParmDefStr,ParmGrpVal,CalParm,ParmGrpDef,SSP0Frequency,ValidationAgent,ValData,ValidationReq,DesignReq,IssueReport
|
||||||
|
# Coordinate System Mapper input
|
||||||
|
|
||||||
|
sub.ICON=images/replace_16.png
|
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
EXCEL.TZ_DH=1ZDB106004D;1ZDB106005D;1ZDB106006D;1ZDB106007D;1ZDB106008D;1ZDB106009D;1ZDB106010D;1ZDB106011D;1ZDB106012D
|
||||||
|
EXCEL.TZ_ID=1ZDB400000T;1ZDB5*0000X;1ZDB600000J;1ZDB70*000Q;1ZDB800000Y;1ZDB330000Y;1ZDB350000P;1ZDB360000P;1ZDB300000P
|
||||||
|
|
||||||
|
EXCEL.TZ_NAME=\u94C1\u5FC3\u91C7\u8D2D\u6E05\u5355;\u7EBF\u5708\u91C7\u8D2D\u6E05\u5355;\u5668\u8EAB\u91C7\u8D2D\u6E05\u5355;\u5F15\u7EBF\u91C7\u8D2D\u6E05\u5355;\u6CB9\u7BB1\u91C7\u8D2D\u6E05\u5355;\u8054\u7BA1\u91C7\u8D2D\u6E05\u5355;\u56DE\u6CB9\u7BA1\u91C7\u8D2D\u6E05\u5355;\u6BCD\u7EBF\u76D2\u91C7\u8D2D\u6E05\u5355;\u603B\u88C5\u91C7\u8D2D\u6E05\u5355
|
||||||
|
|
||||||
|
EXCEL.CGD_DH=1ZDB106001D
|
||||||
|
|
||||||
|
EXCEL.CGD_NAME=\u7EC4\u4EF6\u91C7\u8D2D\u6E05\u5355
|
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,45 @@
|
|||||||
|
#*==================================================================================================
|
||||||
|
#
|
||||||
|
# Copyright (c) 2000 Unigraphics Solutions Inc., An EDS Company
|
||||||
|
# Unpublished - All rights reserved
|
||||||
|
#
|
||||||
|
#===================================================================================================
|
||||||
|
# File description: This properties file contains all locale specific keys for the changeownership package.
|
||||||
|
# It is the intent that this file is to be localized based upon the Java
|
||||||
|
# localization resource bundle naming conventions. For further information
|
||||||
|
# please refer to the Java doc on this subject.
|
||||||
|
#
|
||||||
|
# Filename: changeownership.properties
|
||||||
|
# Module : com.teamcenter.rac.commands.changeownership
|
||||||
|
#
|
||||||
|
#===================================================================================================
|
||||||
|
# Date Name Description of Change
|
||||||
|
#14-Feb-2000 x_subrat initial create
|
||||||
|
#05-Mar-2000 chenm Merge from int_v6.2 to chenm_v62
|
||||||
|
#26-Apr-2002 Rob McColl Rebranding change from tc to Teamcenter.
|
||||||
|
#06-Feb-2006 Venkatesh Chitnis de-imanization
|
||||||
|
#$HISTORY$
|
||||||
|
#=================================================================================================*/
|
||||||
|
|
||||||
|
command.TITLE = \u66F4\u6539\u6240\u6709\u6743
|
||||||
|
|
||||||
|
selectUser.TIP = \u9009\u62E9\u65B0\u7684\u6240\u6709\u6743\u7528\u6237
|
||||||
|
|
||||||
|
confirmationText = \u786E\u5B9A\u8981\u66F4\u6539\u6240\u6709\u6743\u5417\uFF1F
|
||||||
|
|
||||||
|
changeOwnershipObjects = \u66F4\u6539\u5BF9\u8C61\u7684\u6240\u6709\u6743...
|
||||||
|
|
||||||
|
noSelection = \u672A\u9009\u5B9A\u8981\u66F4\u6539\u6240\u6709\u6743\u7684\u5BF9\u8C61
|
||||||
|
|
||||||
|
error.TITLE = \u66F4\u6539\u6240\u6709\u6743...
|
||||||
|
selectionError.MSG = \u9009\u5B9A\u5BF9\u8C61\u4E0D\u662F\u7528\u6237
|
||||||
|
|
||||||
|
newOwnerLabel = \u65B0\u6240\u6709\u6743\u7528\u6237
|
||||||
|
|
||||||
|
sameUser.TITLE = \u9009\u5B9A\u7684\u6240\u6709\u6743\u7528\u6237
|
||||||
|
sameUser.MSG = \u9009\u5B9A\u7528\u6237\u5DF2\u7ECF\u662F\u4EE5\u4E0B\u5BF9\u8C61\u7684\u6240\u6709\u8005\uFF1A
|
||||||
|
|
||||||
|
noOwningUserComponents.MSG=\u4EE5\u4E0B\u9009\u5B9A\u5143\u7D20\u6CA1\u6709\u5173\u8054\u6240\u6709\u6743\u7528\u6237\u3002\u5C06\u4EC5\u4F20\u9012\u5177\u6709\u6240\u6709\u6743\u7684\u5143\u7D20\u3002\n\n{0}
|
||||||
|
|
||||||
|
#A list of items (items whose owner is already the user to be changed to) will be displayed preceding the following message.
|
||||||
|
sameUserMoreToDisplay.MSG = \u548C {0} \u66F4\u591A\u5143\u7D20\u3002
|
@ -0,0 +1,195 @@
|
|||||||
|
<job id="SubsMacros-MSWord">
|
||||||
|
<reference guid="{00020905-0000-0000-C000-000000000046}"/>
|
||||||
|
<script language="VBScript">
|
||||||
|
Option Explicit
|
||||||
|
On Error Resume Next
|
||||||
|
Dim digitDict
|
||||||
|
digitDict = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
|
|
||||||
|
Dim fs, WshShell
|
||||||
|
Set fs = CreateObject("Scripting.FileSystemObject")
|
||||||
|
Set WshShell = WScript.CreateObject("WScript.Shell")
|
||||||
|
|
||||||
|
Dim docFileName, txtFileName ,outdoc_file,pageMax
|
||||||
|
If WScript.Arguments.Count < 3 Then
|
||||||
|
MsgBox "Usage: SubsMacros-MSWord <doc file> <data file>"
|
||||||
|
WScript.Quit
|
||||||
|
End If
|
||||||
|
docFileName = WScript.Arguments(0)
|
||||||
|
txtFileName = WScript.Arguments(1)
|
||||||
|
'outdoc_file = WScript.Arguments(2)
|
||||||
|
pageMax = CInt(WScript.Arguments(2))
|
||||||
|
Dim wordApp
|
||||||
|
|
||||||
|
Dim docFilePath, pathLen
|
||||||
|
For pathLen = Len(docFileName) To 1 Step -1
|
||||||
|
If Mid(docFileName, pathLen, 1) = "\" Then
|
||||||
|
docFilePath = Left(docFileName, pathLen)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim txtFile, line, data
|
||||||
|
If fs.FileExists(docFileName) = False Then
|
||||||
|
WScript.Quit
|
||||||
|
End If
|
||||||
|
If fs.FileExists(txtFileName) = False Then
|
||||||
|
WScript.Quit
|
||||||
|
End If
|
||||||
|
|
||||||
|
Set txtFile = fs.OpenTextFile(txtFileName)
|
||||||
|
line = txtFile.ReadLine()
|
||||||
|
txtFile.Close
|
||||||
|
Set data = ReadObject(line)
|
||||||
|
|
||||||
|
Dim doc
|
||||||
|
Dim docVar, varIndex
|
||||||
|
'Dim word, name, value, startPos, endPos,preword
|
||||||
|
Set wordApp = CreateObject("Word.Application")
|
||||||
|
|
||||||
|
Set doc = wordApp.Documents.Open( docFileName )
|
||||||
|
'wordApp.Visible = True
|
||||||
|
Dim docSelection
|
||||||
|
Set docSelection= wordApp.Selection
|
||||||
|
Dim tables,table,tableCout,num,rRange
|
||||||
|
Set tableCout = docSelection.Information(wdNumberOfPagesInDocument)
|
||||||
|
'WScript.Echo "表格:" & docSelection.Information(wdNumberOfPagesInDocument)
|
||||||
|
'WScript.Echo "新页数:" & pageMax
|
||||||
|
'WScript.Echo "新页数:" & doc.tables.Count
|
||||||
|
'新增页
|
||||||
|
If docSelection.Information(wdNumberOfPagesInDocument) <pageMax Then
|
||||||
|
|
||||||
|
doc.tables(1).Range.Copy
|
||||||
|
'For Each table in doc.Tables
|
||||||
|
' table.Range.Copy
|
||||||
|
'Next
|
||||||
|
|
||||||
|
For num = docSelection.Information(wdNumberOfPagesInDocument)+1 to pageMax
|
||||||
|
'WScript.Echo "新增第" & num & "页"
|
||||||
|
wordApp.Selection.EndKey(6)
|
||||||
|
wordApp.Selection.InsertBreak(2)
|
||||||
|
'wordApp.Selection.TypeBackspace
|
||||||
|
wordApp.Selection.Range.PasteAndFormat (wdOriginalFormat)
|
||||||
|
Next
|
||||||
|
end if
|
||||||
|
'删除页
|
||||||
|
If docSelection.Information(wdNumberOfPagesInDocument) >pageMax Then
|
||||||
|
'WScript.Echo "删除页"
|
||||||
|
Dim ra,CurrentPageStart,CurrentPageEnd,Range
|
||||||
|
For num = docSelection.Information(wdNumberOfPagesInDocument) to pageMax+1 Step -1
|
||||||
|
'If num= docSelection.Information(wdNumberOfPagesInDocument)
|
||||||
|
' WScript.Echo "删除最后一页"
|
||||||
|
'Else
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'WScript.Echo "删除第" & num & "页"
|
||||||
|
wordApp.Selection.EndKey(6)
|
||||||
|
'wordApp.Selection.Delete
|
||||||
|
doc.tables(num).Delete
|
||||||
|
wordApp.Selection.Delete
|
||||||
|
Next
|
||||||
|
end if
|
||||||
|
|
||||||
|
Dim intProp, cusProp
|
||||||
|
For intProp = 1 To doc.CustomDocumentProperties.Count
|
||||||
|
'WScript.Echo doc.CustomDocumentProperties(intProp).Name
|
||||||
|
If doc.CustomDocumentProperties(intProp).Value = "" Then
|
||||||
|
doc.CustomDocumentProperties(intProp).Value = " "
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim t, dataName, dataVal ,pic,strs,str,pim
|
||||||
|
Dim ObjSelection,wordRange
|
||||||
|
On Error Resume Next
|
||||||
|
For Each t In data
|
||||||
|
On Error Resume Next
|
||||||
|
dataName = t
|
||||||
|
'WScript.Echo "内容:" & dataName
|
||||||
|
For cusProp = 1 To doc.CustomDocumentProperties.Count
|
||||||
|
If doc.CustomDocumentProperties(cusProp).Name = dataName Then
|
||||||
|
doc.CustomDocumentProperties(cusProp).Value = data(dataName)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
err.Clear
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
'域更新
|
||||||
|
Dim aStory, aField
|
||||||
|
For Each aStory In doc.StoryRanges
|
||||||
|
For Each aField In aStory.Fields
|
||||||
|
aField.Update
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
doc.Save
|
||||||
|
doc.Close
|
||||||
|
wordApp.Quit
|
||||||
|
|
||||||
|
|
||||||
|
Function ReadObject(dataline)
|
||||||
|
Dim data, nvpair, nv
|
||||||
|
Set ReadObject = CreateObject("Scripting.Dictionary")
|
||||||
|
data = Split(dataline, "|")
|
||||||
|
For Each nvpair In data
|
||||||
|
nv = Split(nvpair, "=")
|
||||||
|
If UBound(nv) >= 1 Then
|
||||||
|
If Not ReadObject.Exists(nv(0)) Then
|
||||||
|
'ReadObject.Add nv(0), SubstEscSeq(nv(1))
|
||||||
|
ReadObject.Add nv(0), nv(1)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function digitValue(hexStr)
|
||||||
|
digitValue = InStr(digitDict, hexStr) - 1
|
||||||
|
'WScript.Echo "Decode hex char " & hexStr & " to " & digitValue
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function CompareDates(s)
|
||||||
|
Dim lastDate,last,time_str,strs
|
||||||
|
last = "2000-01-01"
|
||||||
|
lastDate = CDate(last)
|
||||||
|
'MsgBox s
|
||||||
|
Dim ll
|
||||||
|
strs = Split(s,",")
|
||||||
|
ll = UBound(strs)
|
||||||
|
'WScript.Echo "长度="&" "&ll
|
||||||
|
If UBound(strs) = -1 Then
|
||||||
|
CompareDates = " "
|
||||||
|
ElseIf UBound(strs) = 0 Then
|
||||||
|
CompareDates = s
|
||||||
|
Else
|
||||||
|
For Each t In strs
|
||||||
|
time_str = CDate(t)
|
||||||
|
'MsgBox time_str
|
||||||
|
If DateDiff("d", time_str, lastDate) < 0 Then
|
||||||
|
lastDate = time_str
|
||||||
|
End if
|
||||||
|
Next
|
||||||
|
CompareDates = lastDate
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function SubstEscSeq(str)
|
||||||
|
Dim startPos, tokenPos, strLen
|
||||||
|
SubstEscSeq = ""
|
||||||
|
strLen = Len(str)
|
||||||
|
startPos = 1
|
||||||
|
Do While startPos < strLen
|
||||||
|
tokenPos = InStr(startPos, str, "%")
|
||||||
|
If tokenPos < 1 Then
|
||||||
|
Exit Do
|
||||||
|
End If
|
||||||
|
SubstEscSeq = SubstEscSeq + Mid(str, startPos, tokenPos - startPos)
|
||||||
|
'WScript.Echo "Hex token " & Mid(str, tokenPos, 3) & " decoded to asc value: " & digitValue(Mid(str, tokenPos+1, 1)) * 16 + digitValue(Mid(str, tokenPos+2, 1))
|
||||||
|
SubstEscSeq = SubstEscSeq + Chr(digitValue(Mid(str, tokenPos+1, 1)) * 16 + digitValue(Mid(str, tokenPos+2, 1)))
|
||||||
|
startPos = tokenPos + 3
|
||||||
|
Loop
|
||||||
|
SubstEscSeq = SubstEscSeq + Mid(str, startPos, strLen - startPos + 1)
|
||||||
|
'WScript.Echo "Decoded string from " & str & " to " & SubstEscSeq
|
||||||
|
End Function
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</job>
|
@ -0,0 +1,75 @@
|
|||||||
|
<job id = "TopFile-MSWord">
|
||||||
|
<script language="VBScript">
|
||||||
|
Option Explicit
|
||||||
|
On Error Resume Next
|
||||||
|
Dim digitDict
|
||||||
|
digitDict = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
|
|
||||||
|
Dim fs, WshShell
|
||||||
|
Set fs = CreateObject("Scripting.FileSystemObject")
|
||||||
|
Set WshShell = WScript.CreateObject("WScript.Shell")
|
||||||
|
Dim docFileName, txtFileName
|
||||||
|
If WScript.Arguments.Count < 2 Then
|
||||||
|
'MsgBox "Usage: SubsMacros-MSWord <doc file> <data file>"
|
||||||
|
WScript.Quit
|
||||||
|
End If
|
||||||
|
docFileName = WScript.Arguments(0)
|
||||||
|
txtFileName = WScript.Arguments(1)
|
||||||
|
|
||||||
|
Dim docFilePath, pathLen
|
||||||
|
For pathLen = Len(docFileName) To 1 Step -1
|
||||||
|
If Mid(docFileName, pathLen, 1) = "\" Then
|
||||||
|
docFilePath = Left(docFileName, pathLen)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Dim wordApp
|
||||||
|
Dim txtFile, line, data
|
||||||
|
If fs.FileExists(docFileName) = False Then
|
||||||
|
'WScript.Echo "File " & docFileName & " doesn't exist!"
|
||||||
|
WScript.Quit
|
||||||
|
End If
|
||||||
|
If Not Right(docFileName, 4) = ".doc" Then
|
||||||
|
If Not Right(docFileName, 5) = ".docm" Then
|
||||||
|
'MsgBox "数据集引用文件 " & docFileName & " 扩展名不是.docm或doc, 可能出现不正确结果. 建议将扩展名改为.doc.docm"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If fs.FileExists(txtFileName) = False Then
|
||||||
|
'WScript.Echo "File " & txtFileName & " doesn't exist!"
|
||||||
|
WScript.Quit
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim doc
|
||||||
|
Dim docVar, varIndex
|
||||||
|
'Dim word, name, value, startPos, endPos,preword
|
||||||
|
Set wordApp = CreateObject("Word.Application")
|
||||||
|
'wordApp.Visible = false
|
||||||
|
Set doc = wordApp.Documents.Open( docFileName )
|
||||||
|
Set txtFile = fs.OpenTextFile(txtFileName)
|
||||||
|
line = txtFile.ReadAll()
|
||||||
|
'msgbox "插入内容--" & line
|
||||||
|
txtFile.Close
|
||||||
|
dim vals,vals2,i
|
||||||
|
vals = Split(line,"$")
|
||||||
|
for i=0 to ubound(vals)
|
||||||
|
|
||||||
|
'msgbox "显示1:"&vals(i)
|
||||||
|
vals2 = Split(vals(i),"=")
|
||||||
|
If doc.Bookmarks.Exists(vals2(0))= True Then
|
||||||
|
'msgbox "显示2:" & vals2(0) & "=" & vals2(1)
|
||||||
|
doc.Bookmarks(vals2(0)).Select
|
||||||
|
doc.Bookmarks(vals2(0)).Range.Text=vals2(1)
|
||||||
|
End If
|
||||||
|
next
|
||||||
|
'magbox "修改结束"
|
||||||
|
doc.Save
|
||||||
|
'msgbox "保存"
|
||||||
|
doc.Close
|
||||||
|
'msgbox "关闭"
|
||||||
|
wordApp.Quit
|
||||||
|
'msgbox "退出"
|
||||||
|
</script>
|
||||||
|
</job>
|
@ -0,0 +1,19 @@
|
|||||||
|
#\u6570\u636E\u5E93\u9A71\u52A8
|
||||||
|
driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
#\u6570\u636E\u5E93\u8FDE\u63A5\u5730\u5740
|
||||||
|
url=jdbc:sqlserver://10.128.10.135:1433;DatabaseName=CHINT_DB
|
||||||
|
#\u7528\u6237\u540D
|
||||||
|
username=PLMUser
|
||||||
|
#\u5BC6\u7801
|
||||||
|
password=PLMUser
|
||||||
|
#\u8FDE\u63A5\u6C60\u7684\u6700\u5927\u6570\u636E\u5E93\u8FDE\u63A5\u6570\u3002\u8BBE\u4E3A0\u8868\u793A\u65E0\u9650\u5236
|
||||||
|
maxActive=30
|
||||||
|
#\u6700\u5927\u7A7A\u95F2\u6570\uFF0C\u6570\u636E\u5E93\u8FDE\u63A5\u7684\u6700\u5927\u7A7A\u95F2\u65F6\u95F4\u3002\u8D85\u8FC7\u7A7A\u95F2\u65F6\u95F4\uFF0C\u6570\u636E\u5E93\u8FDE
|
||||||
|
#\u63A5\u5C06\u88AB\u6807\u8BB0\u4E3A\u4E0D\u53EF\u7528\uFF0C\u7136\u540E\u88AB\u91CA\u653E\u3002\u8BBE\u4E3A0\u8868\u793A\u65E0\u9650\u5236
|
||||||
|
maxIdle=10
|
||||||
|
#\u6700\u5927\u5EFA\u7ACB\u8FDE\u63A5\u7B49\u5F85\u65F6\u95F4\u3002\u5982\u679C\u8D85\u8FC7\u6B64\u65F6\u95F4\u5C06\u63A5\u5230\u5F02\u5E38\u3002\u8BBE\u4E3A-1\u8868\u793A\u65E0\u9650\u5236
|
||||||
|
maxWait=1000
|
||||||
|
#\u8D85\u8FC7removeAbandonedTimeout\u65F6\u95F4\u540E\uFF0C\u662F\u5426\u8FDB \u884C\u6CA1\u7528\u8FDE\u63A5\uFF08\u5E9F\u5F03\uFF09\u7684\u56DE\u6536\uFF08\u9ED8\u8BA4\u4E3Afalse\uFF0C\u8C03\u6574\u4E3Atrue)
|
||||||
|
removeAbandoned=true
|
||||||
|
#\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\uFF0C\u56DE\u6536\u6CA1\u6709\u7528(\u5E9F\u5F03)\u7684\u8FDE\u63A5\uFF08\u9ED8\u8BA4\u4E3A 300\u79D2\uFF0C\u8C03\u6574\u4E3A180\uFF09
|
||||||
|
removeAbandonedTimeout=180
|
@ -0,0 +1,41 @@
|
|||||||
|
SQL.URL=jdbc:sqlserver://10.128.20.35:1433;DatabaseName=BDP2020
|
||||||
|
SQL.DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
SQL.USER=PLMUser
|
||||||
|
SQL.PASSWORD=PLMUser
|
||||||
|
|
||||||
|
#\u4F4E\u538B\u8BDA\u521B
|
||||||
|
SQL.CC.URL=jdbc:sqlserver://10.128.10.135:1433;DatabaseName=CHINT_DB
|
||||||
|
SQL.CC.DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
SQL.CC.USER=PLMUser
|
||||||
|
SQL.CC.PASSWORD=PLMUser
|
||||||
|
|
||||||
|
# Test
|
||||||
|
#SQL.SH.URL=jdbc:sqlserver://10.128.155.236:1433;DatabaseName=ISP.CADAssistant
|
||||||
|
#SQL.SH.DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
#SQL.SH.USER=sa
|
||||||
|
#SQL.SH.PASSWORD=2wsx#EDC
|
||||||
|
#
|
||||||
|
SQL.SH.URL=jdbc:sqlserver://10.128.155.140:1433;DatabaseName=ISP.CADAssistant
|
||||||
|
SQL.SH.DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
SQL.SH.USER=sa
|
||||||
|
SQL.SH.PASSWORD=2wsx#EDC
|
||||||
|
|
||||||
|
SQL.TC.URL=jdbc:oracle:thin:@10.128.10.207:1521:tcprod
|
||||||
|
SQL.TC.DRIVER=oracle.jdbc.driver.OracleDriver
|
||||||
|
SQL.TC.USER=infodba
|
||||||
|
SQL.TC.PASSWORD=infodba
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#SQL.TCDATA.URL=jdbc:oracle:thin:@192.168.0.103:1521:TC
|
||||||
|
SQL.TCDATA.URL=jdbc:oracle:thin:@10.128.18.139:1521:testdb
|
||||||
|
SQL.TCDATA.DRIVER=oracle.jdbc.driver.OracleDriver
|
||||||
|
SQL.TCDATA.USER=infodba
|
||||||
|
SQL.TCDATA.PASSWORD=infodba
|
||||||
|
|
||||||
|
SQL.TEMPLATE_TREE=select t.PmpcCode, t.PmpcCompanyCode, t.PmpcName, t.PmpcUpperCode, t.PmpcItem, t.PmpcPrhCode, t.PmpcEnd,t.PmpcCanzz,t.PmpcPType,t.PmpcMType from CcemVW_Pmpc t;
|
||||||
|
SQL.TEMPLATE=select t.PrhName,t.PrdLine,t.PrdNo,t.PrdFeatureCode,t.FeatureName,t.PrdCanInput,t.PrdSign from CcemVW_Prd t where t.prhcode = ? order by t.PrdNo
|
||||||
|
SQL.LOV=select t.PrddNo,t.PrddFeatureCode,t.PrddValue from CcemVW_Prdd t where t.PrddCode = ? and PrddLine = ? order by t.PrddNo
|
||||||
|
SQL.FEATURE=select t.FeatureCode,t.FeatureName from CcemVW_Feature t
|
||||||
|
SQL.GROUP=select t.ProductGroupCode,t.ProductGroupName from CcemVW_ProductGroup t
|
@ -0,0 +1 @@
|
|||||||
|
ZT2_BOMEC.FORMJAVARENDERING=com.connor.chint.sap2.stylesheet.BOMDifStyle
|
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||||
|
<configuration>
|
||||||
|
<typeAliases>
|
||||||
|
<typeAlias alias="CHINTMaterial" type="com.connor.chint.sap2.test.CHINTMaterial"></typeAlias>
|
||||||
|
<typeAlias alias="CcemVW_Cgd" type="com.connor.chint.sap2.mybatis.CcemVW_Cgd"></typeAlias>
|
||||||
|
<typeAlias alias="CHINT_M007_MATERIAL" type="com.connor.chint.sap2.bean.CHINT_M007_MATERIAL"></typeAlias>
|
||||||
|
<typeAlias alias="CHINT_M008_MATERIAL" type="com.connor.chint.sap2.bean.CHINT_M008_MATERIAL"></typeAlias>
|
||||||
|
<typeAlias alias="PBox" type="com.connor.chint.sap2.dy.createElectricalBOM.bean.PBox"></typeAlias>
|
||||||
|
</typeAliases>
|
||||||
|
<environments default="development">
|
||||||
|
<!--TC正式数据库-->
|
||||||
|
<environment id="tcprod">
|
||||||
|
<transactionManager type="JDBC"></transactionManager>
|
||||||
|
<dataSource type="POOLED">
|
||||||
|
<property name="driver" value="oracle.jdbc.driver.OracleDriver" />
|
||||||
|
<property name="url" value="jdbc:oracle:thin:@10.128.10.207:1521:tcprod" />
|
||||||
|
<property name="username" value="infodba" />
|
||||||
|
<property name="password" value="infodba" />
|
||||||
|
</dataSource>
|
||||||
|
</environment>
|
||||||
|
<!--低压诚创-->
|
||||||
|
<environment id="DYCC">
|
||||||
|
<transactionManager type="JDBC"></transactionManager>
|
||||||
|
<dataSource type="POOLED">
|
||||||
|
<property name="driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
|
||||||
|
<property name="url" value="jdbc:sqlserver://10.128.10.135:1433;DatabaseName=CHINT_DB" />
|
||||||
|
<property name="username" value="PLMUser" />
|
||||||
|
<property name="password" value="PLMUser" />
|
||||||
|
</dataSource>
|
||||||
|
</environment>
|
||||||
|
<!--低压深化-->
|
||||||
|
<environment id="DYSH">
|
||||||
|
<transactionManager type="JDBC"></transactionManager>
|
||||||
|
<dataSource type="POOLED">
|
||||||
|
<property name="driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
|
||||||
|
<property name="url" value="jdbc:sqlserver://10.128.155.140:1433;DatabaseName=ISP.CADAssistant" />
|
||||||
|
<property name="username" value="sa" />
|
||||||
|
<property name="password" value="2wsx#EDC" />
|
||||||
|
</dataSource>
|
||||||
|
</environment>
|
||||||
|
<!--基础数据平台-->
|
||||||
|
<environment id="MDM">
|
||||||
|
<transactionManager type="JDBC"></transactionManager>
|
||||||
|
<dataSource type="POOLED">
|
||||||
|
<property name="driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
|
||||||
|
<property name="url" value="jdbc:sqlserver://10.128.20.35:1433;DatabaseName=BDP2020" />
|
||||||
|
<property name="username" value="PLMUser" />
|
||||||
|
<property name="password" value="PLMUser" />
|
||||||
|
</dataSource>
|
||||||
|
</environment>
|
||||||
|
</environments>
|
||||||
|
<mappers>
|
||||||
|
<!-- TC数据库 正式 -->
|
||||||
|
<!-- <mapper resource="DBMybatis.xml"/> -->
|
||||||
|
|
||||||
|
<mapper resource="CcemVW_CgdDao.xml"/>
|
||||||
|
|
||||||
|
<mapper resource="CcemVW_Cgd.xml"/>
|
||||||
|
</mappers>
|
||||||
|
</configuration>
|
@ -0,0 +1,19 @@
|
|||||||
|
#\u6570\u636E\u5E93\u9A71\u52A8
|
||||||
|
driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
#\u6570\u636E\u5E93\u8FDE\u63A5\u5730\u5740
|
||||||
|
url=jdbc:sqlserver://10.128.10.135:1433;DatabaseName=CHINT_DB
|
||||||
|
#\u7528\u6237\u540D
|
||||||
|
username=PLMUser
|
||||||
|
#\u5BC6\u7801
|
||||||
|
password=PLMUser
|
||||||
|
#\u8FDE\u63A5\u6C60\u7684\u6700\u5927\u6570\u636E\u5E93\u8FDE\u63A5\u6570\u3002\u8BBE\u4E3A0\u8868\u793A\u65E0\u9650\u5236
|
||||||
|
maxActive=30
|
||||||
|
#\u6700\u5927\u7A7A\u95F2\u6570\uFF0C\u6570\u636E\u5E93\u8FDE\u63A5\u7684\u6700\u5927\u7A7A\u95F2\u65F6\u95F4\u3002\u8D85\u8FC7\u7A7A\u95F2\u65F6\u95F4\uFF0C\u6570\u636E\u5E93\u8FDE
|
||||||
|
#\u63A5\u5C06\u88AB\u6807\u8BB0\u4E3A\u4E0D\u53EF\u7528\uFF0C\u7136\u540E\u88AB\u91CA\u653E\u3002\u8BBE\u4E3A0\u8868\u793A\u65E0\u9650\u5236
|
||||||
|
maxIdle=10
|
||||||
|
#\u6700\u5927\u5EFA\u7ACB\u8FDE\u63A5\u7B49\u5F85\u65F6\u95F4\u3002\u5982\u679C\u8D85\u8FC7\u6B64\u65F6\u95F4\u5C06\u63A5\u5230\u5F02\u5E38\u3002\u8BBE\u4E3A-1\u8868\u793A\u65E0\u9650\u5236
|
||||||
|
maxWait=1000
|
||||||
|
#\u8D85\u8FC7removeAbandonedTimeout\u65F6\u95F4\u540E\uFF0C\u662F\u5426\u8FDB \u884C\u6CA1\u7528\u8FDE\u63A5\uFF08\u5E9F\u5F03\uFF09\u7684\u56DE\u6536\uFF08\u9ED8\u8BA4\u4E3Afalse\uFF0C\u8C03\u6574\u4E3Atrue)
|
||||||
|
removeAbandoned=true
|
||||||
|
#\u8D85\u8FC7\u65F6\u95F4\u9650\u5236\uFF0C\u56DE\u6536\u6CA1\u6709\u7528(\u5E9F\u5F03)\u7684\u8FDE\u63A5\uFF08\u9ED8\u8BA4\u4E3A 300\u79D2\uFF0C\u8C03\u6574\u4E3A180\uFF09
|
||||||
|
removeAbandonedTimeout=180
|