main
熊朝柱 2 weeks ago
parent 9daaae8df9
commit 2e45570810

8
.idea/.gitignore vendored

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxBlameSettings">
<option name="version" value="2" />
</component>
</project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ASMSmaliIdeaPluginConfiguration">
<asm skipDebug="true" skipFrames="true" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_22" default="true" project-jdk-name="openjdk-22" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/com.connor.jd.plm.iml" filepath="$PROJECT_DIR$/com.connor.jd.plm.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,7 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jxl.jar"/>
<classpathentry exported="true" kind="lib" path="lib/aspose-cells-18.9.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/commons-codec-1.13.jar"/>

@ -19,23 +19,943 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.108.0",
com.teamcenter.rac.workflow.processdesigner;bundle-version="12000.2.0"
Automatic-Module-Name: JDProject
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.connor.jd.operations,
Export-Package: .,
cn.hutool,
cn.hutool.aop,
cn.hutool.aop.aspects,
cn.hutool.aop.interceptor,
cn.hutool.aop.proxy,
cn.hutool.bloomfilter,
cn.hutool.bloomfilter.bitMap,
cn.hutool.bloomfilter.filter,
cn.hutool.cache,
cn.hutool.cache.file,
cn.hutool.cache.impl,
cn.hutool.captcha,
cn.hutool.captcha.generator,
cn.hutool.core.annotation,
cn.hutool.core.bean,
cn.hutool.core.bean.copier,
cn.hutool.core.bean.copier.provider,
cn.hutool.core.builder,
cn.hutool.core.clone,
cn.hutool.core.codec,
cn.hutool.core.collection,
cn.hutool.core.comparator,
cn.hutool.core.convert,
cn.hutool.core.convert.impl,
cn.hutool.core.date,
cn.hutool.core.date.format,
cn.hutool.core.exceptions,
cn.hutool.core.getter,
cn.hutool.core.img,
cn.hutool.core.io,
cn.hutool.core.io.checksum,
cn.hutool.core.io.file,
cn.hutool.core.io.resource,
cn.hutool.core.io.watch,
cn.hutool.core.io.watch.watchers,
cn.hutool.core.lang,
cn.hutool.core.lang.caller,
cn.hutool.core.lang.copier,
cn.hutool.core.lang.func,
cn.hutool.core.lang.loader,
cn.hutool.core.lang.mutable,
cn.hutool.core.map,
cn.hutool.core.map.multi,
cn.hutool.core.math,
cn.hutool.core.net,
cn.hutool.core.swing,
cn.hutool.core.swing.clipboard,
cn.hutool.core.text,
cn.hutool.core.text.csv,
cn.hutool.core.text.escape,
cn.hutool.core.text.replacer,
cn.hutool.core.thread,
cn.hutool.core.thread.lock,
cn.hutool.core.thread.threadlocal,
cn.hutool.core.util,
cn.hutool.cron,
cn.hutool.cron.listener,
cn.hutool.cron.pattern,
cn.hutool.cron.pattern.matcher,
cn.hutool.cron.pattern.parser,
cn.hutool.cron.task,
cn.hutool.crypto,
cn.hutool.crypto.asymmetric,
cn.hutool.crypto.digest,
cn.hutool.crypto.digest.mac,
cn.hutool.crypto.symmetric,
cn.hutool.db,
cn.hutool.db.dialect,
cn.hutool.db.dialect.impl,
cn.hutool.db.ds,
cn.hutool.db.ds.c3p0,
cn.hutool.db.ds.dbcp,
cn.hutool.db.ds.druid,
cn.hutool.db.ds.hikari,
cn.hutool.db.ds.jndi,
cn.hutool.db.ds.pooled,
cn.hutool.db.ds.simple,
cn.hutool.db.ds.tomcat,
cn.hutool.db.handler,
cn.hutool.db.meta,
cn.hutool.db.nosql.mongo,
cn.hutool.db.nosql.redis,
cn.hutool.db.sql,
cn.hutool.db.transaction,
cn.hutool.dfa,
cn.hutool.extra.emoji,
cn.hutool.extra.ftp,
cn.hutool.extra.mail,
cn.hutool.extra.qrcode,
cn.hutool.extra.servlet,
cn.hutool.extra.servlet.multipart,
cn.hutool.extra.ssh,
cn.hutool.extra.template,
cn.hutool.extra.template.engine,
cn.hutool.extra.template.engine.beetl,
cn.hutool.extra.template.engine.enjoy,
cn.hutool.extra.template.engine.freemarker,
cn.hutool.extra.template.engine.rythm,
cn.hutool.extra.template.engine.thymeleaf,
cn.hutool.extra.template.engine.velocity,
cn.hutool.extra.tokenizer,
cn.hutool.extra.tokenizer.engine,
cn.hutool.extra.tokenizer.engine.analysis,
cn.hutool.extra.tokenizer.engine.ansj,
cn.hutool.extra.tokenizer.engine.hanlp,
cn.hutool.extra.tokenizer.engine.ikanalyzer,
cn.hutool.extra.tokenizer.engine.jcseg,
cn.hutool.extra.tokenizer.engine.jieba,
cn.hutool.extra.tokenizer.engine.mmseg,
cn.hutool.extra.tokenizer.engine.mynlp,
cn.hutool.extra.tokenizer.engine.word,
cn.hutool.http,
cn.hutool.http.cookie,
cn.hutool.http.ssl,
cn.hutool.http.useragent,
cn.hutool.http.webservice,
cn.hutool.json,
cn.hutool.json.serialize,
cn.hutool.log,
cn.hutool.log.dialect.commons,
cn.hutool.log.dialect.console,
cn.hutool.log.dialect.jboss,
cn.hutool.log.dialect.jdk,
cn.hutool.log.dialect.log4j,
cn.hutool.log.dialect.log4j2,
cn.hutool.log.dialect.slf4j,
cn.hutool.log.dialect.tinylog,
cn.hutool.log.level,
cn.hutool.poi,
cn.hutool.poi.excel,
cn.hutool.poi.excel.cell,
cn.hutool.poi.excel.editors,
cn.hutool.poi.excel.sax,
cn.hutool.poi.excel.sax.handler,
cn.hutool.poi.excel.style,
cn.hutool.poi.exceptions,
cn.hutool.poi.word,
cn.hutool.script,
cn.hutool.setting,
cn.hutool.setting.dialect,
cn.hutool.setting.profile,
cn.hutool.socket,
cn.hutool.socket.aio,
cn.hutool.socket.nio,
cn.hutool.socket.protocol,
cn.hutool.system,
cn.hutool.system.oshi,
com.alibaba.fastjson,
com.alibaba.fastjson.annotation,
com.alibaba.fastjson.asm,
com.alibaba.fastjson.parser,
com.alibaba.fastjson.parser.deserializer,
com.alibaba.fastjson.serializer,
com.alibaba.fastjson.support.jaxrs,
com.alibaba.fastjson.support.spring,
com.alibaba.fastjson.util,
com.aspose.cells,
com.aspose.cells.a,
com.aspose.cells.a.a,
com.aspose.cells.a.b.a,
com.aspose.cells.a.c,
com.aspose.cells.a.d,
com.aspose.cells.a.d.a,
com.aspose.cells.a.d.a.a,
com.aspose.cells.a.d.a.b,
com.aspose.cells.a.d.b,
com.aspose.cells.a.e,
com.aspose.cells.a.f,
com.aspose.cells.b.a,
com.aspose.cells.b.a.a,
com.aspose.cells.b.a.b,
com.aspose.cells.b.a.b.a,
com.aspose.cells.b.a.b.a.a,
com.aspose.cells.b.a.b.b,
com.aspose.cells.b.a.b.c,
com.aspose.cells.b.a.b.d,
com.aspose.cells.b.a.b.d.a,
com.aspose.cells.b.a.b.e,
com.aspose.cells.b.a.c,
com.aspose.cells.b.a.d,
com.aspose.cells.b.a.e,
com.aspose.cells.b.a.f,
com.aspose.cells.b.a.f.a,
com.aspose.cells.b.a.f.a.a,
com.aspose.cells.b.b,
com.aspose.cells.b.c.a,
com.connor.jd.operations,
com.connor.jd.plm.action,
com.connor.jd.plm.beans,
com.connor.jd.plm.changeImportObjectsUnit,
com.connor.jd.plm.dialog,
com.connor.jd.plm.dialogs,
com.connor.jd.plm.form,
com.connor.jd.plm.handlers,
com.connor.jd.plm.signingAndApprovalRecordHistory,
com.connor.jd.plm.table,
com.connor.jd.plm.util,
com.connor.jd.plm.utils,
com.teamcenter.rac.stylesheet
Import-Package: com.connor.jd.plm.beans,
com.eltima.components.ui,
com.microsoft.schemas.compatibility,
com.microsoft.schemas.compatibility.impl,
com.microsoft.schemas.office.excel,
com.microsoft.schemas.office.excel.impl,
com.microsoft.schemas.office.office,
com.microsoft.schemas.office.office.impl,
com.microsoft.schemas.office.visio.x2012.main,
com.microsoft.schemas.office.visio.x2012.main.impl,
com.microsoft.schemas.office.x2006.digsig,
com.microsoft.schemas.office.x2006.digsig.impl,
com.microsoft.schemas.office.x2006.encryption,
com.microsoft.schemas.office.x2006.encryption.impl,
com.microsoft.schemas.office.x2006.keyEncryptor.certificate,
com.microsoft.schemas.office.x2006.keyEncryptor.certificate.impl,
com.microsoft.schemas.office.x2006.keyEncryptor.password,
com.microsoft.schemas.office.x2006.keyEncryptor.password.impl,
com.microsoft.schemas.vml,
com.microsoft.schemas.vml.impl,
com.sun.deploy.uitoolkit.impl.fx,
com.sun.deploy.uitoolkit.impl.fx.ui,
com.sun.deploy.uitoolkit.impl.fx.ui.resources,
com.sun.glass.events,
com.sun.glass.ui,
com.sun.glass.ui.delegate,
com.sun.glass.ui.win,
com.sun.glass.utils,
com.sun.istack,
com.sun.istack.localization,
com.sun.istack.logging,
com.sun.javafx,
com.sun.javafx.animation,
com.sun.javafx.applet,
com.sun.javafx.application,
com.sun.javafx.beans,
com.sun.javafx.beans.event,
com.sun.javafx.binding,
com.sun.javafx.charts,
com.sun.javafx.collections,
com.sun.javafx.css,
com.sun.javafx.css.converters,
com.sun.javafx.css.parser,
com.sun.javafx.cursor,
com.sun.javafx.effect,
com.sun.javafx.embed,
com.sun.javafx.event,
com.sun.javafx.font,
com.sun.javafx.font.coretext,
com.sun.javafx.font.directwrite,
com.sun.javafx.font.freetype,
com.sun.javafx.font.t2k,
com.sun.javafx.fxml,
com.sun.javafx.fxml.builder,
com.sun.javafx.fxml.expression,
com.sun.javafx.geom,
com.sun.javafx.geom.transform,
com.sun.javafx.geometry,
com.sun.javafx.iio,
com.sun.javafx.iio.bmp,
com.sun.javafx.iio.common,
com.sun.javafx.iio.gif,
com.sun.javafx.iio.ios,
com.sun.javafx.iio.jpeg,
com.sun.javafx.iio.png,
com.sun.javafx.image,
com.sun.javafx.image.impl,
com.sun.javafx.jmx,
com.sun.javafx.logging,
com.sun.javafx.media,
com.sun.javafx.menu,
com.sun.javafx.perf,
com.sun.javafx.print,
com.sun.javafx.property,
com.sun.javafx.property.adapter,
com.sun.javafx.robot,
com.sun.javafx.robot.impl,
com.sun.javafx.runtime,
com.sun.javafx.runtime.async,
com.sun.javafx.runtime.eula,
com.sun.javafx.scene,
com.sun.javafx.scene.control,
com.sun.javafx.scene.control.behavior,
com.sun.javafx.scene.control.skin,
com.sun.javafx.scene.control.skin.resources,
com.sun.javafx.scene.input,
com.sun.javafx.scene.layout.region,
com.sun.javafx.scene.paint,
com.sun.javafx.scene.shape,
com.sun.javafx.scene.text,
com.sun.javafx.scene.transform,
com.sun.javafx.scene.traversal,
com.sun.javafx.scene.web,
com.sun.javafx.scene.web.behavior,
com.sun.javafx.scene.web.skin,
com.sun.javafx.sg.prism,
com.sun.javafx.sg.prism.web,
com.sun.javafx.stage,
com.sun.javafx.text,
com.sun.javafx.tk,
com.sun.javafx.tk.quantum,
com.sun.javafx.util,
com.sun.javafx.webkit,
com.sun.javafx.webkit.drt,
com.sun.javafx.webkit.prism,
com.sun.javafx.webkit.prism.theme,
com.sun.javafx.webkit.theme,
com.sun.media.jfxmedia,
com.sun.media.jfxmedia.control,
com.sun.media.jfxmedia.effects,
com.sun.media.jfxmedia.events,
com.sun.media.jfxmedia.locator,
com.sun.media.jfxmedia.logging,
com.sun.media.jfxmedia.track,
com.sun.media.jfxmediaimpl,
com.sun.media.jfxmediaimpl.platform,
com.sun.media.jfxmediaimpl.platform.gstreamer,
com.sun.media.jfxmediaimpl.platform.ios,
com.sun.media.jfxmediaimpl.platform.java,
com.sun.media.jfxmediaimpl.platform.osx,
com.sun.openpisces,
com.sun.pisces,
com.sun.prism,
com.sun.prism.d3d,
com.sun.prism.image,
com.sun.prism.impl,
com.sun.prism.impl.packrect,
com.sun.prism.impl.paint,
com.sun.prism.impl.ps,
com.sun.prism.impl.shape,
com.sun.prism.j2d,
com.sun.prism.j2d.paint,
com.sun.prism.j2d.print,
com.sun.prism.paint,
com.sun.prism.ps,
com.sun.prism.shader,
com.sun.prism.shape,
com.sun.prism.sw,
com.sun.scenario,
com.sun.scenario.animation,
com.sun.scenario.animation.shared,
com.sun.scenario.effect,
com.sun.scenario.effect.impl,
com.sun.scenario.effect.impl.hw,
com.sun.scenario.effect.impl.hw.d3d,
com.sun.scenario.effect.impl.prism,
com.sun.scenario.effect.impl.prism.ps,
com.sun.scenario.effect.impl.prism.sw,
com.sun.scenario.effect.impl.state,
com.sun.scenario.effect.impl.sw,
com.sun.scenario.effect.impl.sw.java,
com.sun.scenario.effect.impl.sw.sse,
com.sun.scenario.effect.light,
com.sun.webkit,
com.sun.webkit.dom,
com.sun.webkit.event,
com.sun.webkit.graphics,
com.sun.webkit.network,
com.sun.webkit.network.about,
com.sun.webkit.network.data,
com.sun.webkit.perf,
com.sun.webkit.plugin,
com.sun.webkit.text,
com.sun.xml.bind,
com.sun.xml.bind.annotation,
com.sun.xml.bind.api,
com.sun.xml.bind.api.impl,
com.sun.xml.bind.marshaller,
com.sun.xml.bind.unmarshaller,
com.sun.xml.bind.util,
com.sun.xml.bind.v2,
com.sun.xml.bind.v2.bytecode,
com.sun.xml.bind.v2.model.annotation,
com.sun.xml.bind.v2.model.core,
com.sun.xml.bind.v2.model.impl,
com.sun.xml.bind.v2.model.nav,
com.sun.xml.bind.v2.model.runtime,
com.sun.xml.bind.v2.model.util,
com.sun.xml.bind.v2.runtime,
com.sun.xml.bind.v2.runtime.output,
com.sun.xml.bind.v2.runtime.property,
com.sun.xml.bind.v2.runtime.reflect,
com.sun.xml.bind.v2.runtime.reflect.opt,
com.sun.xml.bind.v2.runtime.unmarshaller,
com.sun.xml.bind.v2.schemagen,
com.sun.xml.bind.v2.schemagen.episode,
com.sun.xml.bind.v2.schemagen.xmlschema,
com.sun.xml.bind.v2.util,
com.sun.xml.txw2,
com.sun.xml.txw2.annotation,
com.sun.xml.txw2.output,
com.teamcenter.rac.commands.namedreferences,
com.teamcenter.rac.commands.open,
com.teamcenter.rac.stylesheet,
common,
common.log,
javafx.animation,
javafx.application,
javafx.beans,
javafx.beans.binding,
javafx.beans.property,
javafx.beans.property.adapter,
javafx.beans.value,
javafx.collections,
javafx.collections.transformation,
javafx.concurrent,
javafx.css,
javafx.embed.swing,
javafx.event,
javafx.fxml,
javafx.geometry,
javafx.print,
javafx.scene,
javafx.scene.canvas,
javafx.scene.chart,
javafx.scene.control,
javafx.scene.control.cell,
javafx.scene.effect,
javafx.scene.image,
javafx.scene.input,
javafx.scene.layout,
javafx.scene.media,
javafx.scene.paint,
javafx.scene.shape,
javafx.scene.text,
javafx.scene.transform,
javafx.scene.web,
javafx.stage,
javafx.util,
javafx.util.converter,
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.bind.annotation.adapters,
javax.xml.bind.attachment,
javax.xml.bind.helpers,
javax.xml.bind.util,
jxl,
jxl.biff,
jxl.biff.drawing,
jxl.biff.formula,
jxl.demo,
jxl.format,
jxl.read.biff,
jxl.write,
jxl.write.biff,
netscape.javascript,
oracle.core.lmx,
oracle.core.lvf,
oracle.jdbc,
oracle.jdbc.aq,
oracle.jdbc.babelfish,
oracle.jdbc.connector,
oracle.jdbc.dcn,
oracle.jdbc.diagnostics,
oracle.jdbc.driver,
oracle.jdbc.internal,
oracle.jdbc.oci,
oracle.jdbc.oracore,
oracle.jdbc.pool,
oracle.jdbc.proxy,
oracle.jdbc.proxy.annotation,
oracle.jdbc.replay,
oracle.jdbc.replay.driver,
oracle.jdbc.replay.internal,
oracle.jdbc.rowset,
oracle.jdbc.util,
oracle.jdbc.xa,
oracle.jdbc.xa.client,
oracle.jpub.runtime,
oracle.net.ano,
oracle.net.aso,
oracle.net.jdbc.TNSAddress,
oracle.net.jdbc.nl,
oracle.net.jdbc.nl.mesg,
oracle.net.jndi,
oracle.net.ns,
oracle.net.nt,
oracle.net.resolver,
oracle.security.o3logon,
oracle.security.o5logon,
oracle.sql,
oracle.sql.converter,
org.apache.commons.codec,
org.apache.commons.codec.binary,
org.apache.commons.codec.cli,
org.apache.commons.codec.digest,
org.apache.commons.codec.language,
org.apache.commons.codec.language.bm,
org.apache.commons.codec.net,
org.apache.commons.collections4,
org.apache.commons.collections4.bag,
org.apache.commons.collections4.bidimap,
org.apache.commons.collections4.collection,
org.apache.commons.collections4.comparators,
org.apache.commons.collections4.functors,
org.apache.commons.collections4.iterators,
org.apache.commons.collections4.keyvalue,
org.apache.commons.collections4.list,
org.apache.commons.collections4.map,
org.apache.commons.collections4.multimap,
org.apache.commons.collections4.multiset,
org.apache.commons.collections4.properties,
org.apache.commons.collections4.queue,
org.apache.commons.collections4.sequence,
org.apache.commons.collections4.set,
org.apache.commons.collections4.splitmap,
org.apache.commons.collections4.trie,
org.apache.commons.collections4.trie.analyzer,
org.apache.commons.compress,
org.apache.commons.compress.archivers,
org.apache.commons.compress.archivers.ar,
org.apache.commons.compress.archivers.arj,
org.apache.commons.compress.archivers.cpio,
org.apache.commons.compress.archivers.dump,
org.apache.commons.compress.archivers.examples,
org.apache.commons.compress.archivers.jar,
org.apache.commons.compress.archivers.sevenz,
org.apache.commons.compress.archivers.tar,
org.apache.commons.compress.archivers.zip,
org.apache.commons.compress.changes,
org.apache.commons.compress.compressors,
org.apache.commons.compress.compressors.brotli,
org.apache.commons.compress.compressors.bzip2,
org.apache.commons.compress.compressors.deflate,
org.apache.commons.compress.compressors.deflate64,
org.apache.commons.compress.compressors.gzip,
org.apache.commons.compress.compressors.lz4,
org.apache.commons.compress.compressors.lz77support,
org.apache.commons.compress.compressors.lzma,
org.apache.commons.compress.compressors.lzw,
org.apache.commons.compress.compressors.pack200,
org.apache.commons.compress.compressors.snappy,
org.apache.commons.compress.compressors.xz,
org.apache.commons.compress.compressors.z,
org.apache.commons.compress.compressors.zstandard,
org.apache.commons.compress.parallel,
org.apache.commons.compress.utils,
org.apache.commons.lang3,
org.apache.commons.lang3.arch,
org.apache.commons.lang3.builder,
org.apache.commons.lang3.concurrent,
org.apache.commons.lang3.event,
org.apache.commons.lang3.exception,
org.apache.commons.lang3.math,
org.apache.commons.lang3.mutable,
org.apache.commons.lang3.reflect,
org.apache.commons.lang3.text,
org.apache.commons.lang3.text.translate,
org.apache.commons.lang3.time,
org.apache.commons.lang3.tuple,
org.apache.commons.logging,
org.apache.commons.logging.impl,
org.apache.commons.math3,
org.apache.commons.math3.analysis,
org.apache.commons.math3.analysis.differentiation,
org.apache.commons.math3.analysis.function,
org.apache.commons.math3.analysis.integration,
org.apache.commons.math3.analysis.integration.gauss,
org.apache.commons.math3.analysis.interpolation,
org.apache.commons.math3.analysis.polynomials,
org.apache.commons.math3.analysis.solvers,
org.apache.commons.math3.complex,
org.apache.commons.math3.dfp,
org.apache.commons.math3.distribution,
org.apache.commons.math3.distribution.fitting,
org.apache.commons.math3.exception,
org.apache.commons.math3.exception.util,
org.apache.commons.math3.filter,
org.apache.commons.math3.fitting,
org.apache.commons.math3.fitting.leastsquares,
org.apache.commons.math3.fraction,
org.apache.commons.math3.genetics,
org.apache.commons.math3.geometry,
org.apache.commons.math3.geometry.enclosing,
org.apache.commons.math3.geometry.euclidean.oned,
org.apache.commons.math3.geometry.euclidean.threed,
org.apache.commons.math3.geometry.euclidean.twod,
org.apache.commons.math3.geometry.euclidean.twod.hull,
org.apache.commons.math3.geometry.hull,
org.apache.commons.math3.geometry.partitioning,
org.apache.commons.math3.geometry.partitioning.utilities,
org.apache.commons.math3.geometry.spherical.oned,
org.apache.commons.math3.geometry.spherical.twod,
org.apache.commons.math3.linear,
org.apache.commons.math3.ml.clustering,
org.apache.commons.math3.ml.clustering.evaluation,
org.apache.commons.math3.ml.distance,
org.apache.commons.math3.ml.neuralnet,
org.apache.commons.math3.ml.neuralnet.oned,
org.apache.commons.math3.ml.neuralnet.sofm,
org.apache.commons.math3.ml.neuralnet.sofm.util,
org.apache.commons.math3.ml.neuralnet.twod,
org.apache.commons.math3.ml.neuralnet.twod.util,
org.apache.commons.math3.ode,
org.apache.commons.math3.ode.events,
org.apache.commons.math3.ode.nonstiff,
org.apache.commons.math3.ode.sampling,
org.apache.commons.math3.optim,
org.apache.commons.math3.optim.linear,
org.apache.commons.math3.optim.nonlinear.scalar,
org.apache.commons.math3.optim.nonlinear.scalar.gradient,
org.apache.commons.math3.optim.nonlinear.scalar.noderiv,
org.apache.commons.math3.optim.nonlinear.vector,
org.apache.commons.math3.optim.nonlinear.vector.jacobian,
org.apache.commons.math3.optim.univariate,
org.apache.commons.math3.optimization,
org.apache.commons.math3.optimization.direct,
org.apache.commons.math3.optimization.fitting,
org.apache.commons.math3.optimization.general,
org.apache.commons.math3.optimization.linear,
org.apache.commons.math3.optimization.univariate,
org.apache.commons.math3.primes,
org.apache.commons.math3.random,
org.apache.commons.math3.special,
org.apache.commons.math3.stat,
org.apache.commons.math3.stat.clustering,
org.apache.commons.math3.stat.correlation,
org.apache.commons.math3.stat.descriptive,
org.apache.commons.math3.stat.descriptive.moment,
org.apache.commons.math3.stat.descriptive.rank,
org.apache.commons.math3.stat.descriptive.summary,
org.apache.commons.math3.stat.inference,
org.apache.commons.math3.stat.interval,
org.apache.commons.math3.stat.ranking,
org.apache.commons.math3.stat.regression,
org.apache.commons.math3.transform,
org.apache.commons.math3.util,
org.apache.log4j,
org.apache.log4j.chainsaw,
org.apache.log4j.config,
org.apache.log4j.helpers,
org.apache.log4j.jdbc,
org.apache.log4j.jmx,
org.apache.log4j.lf5,
org.apache.log4j.lf5.util,
org.apache.log4j.lf5.viewer,
org.apache.log4j.lf5.viewer.categoryexplorer,
org.apache.log4j.lf5.viewer.configure,
org.apache.log4j.net,
org.apache.log4j.nt,
org.apache.log4j.or,
org.apache.log4j.or.sax,
org.apache.log4j.spi,
org.apache.log4j.varia,
org.apache.log4j.xml,
org.apache.poi,
org.apache.poi.common.usermodel,
org.apache.poi.common.usermodel.fonts,
org.apache.poi.crypt.examples,
org.apache.poi.ddf,
org.apache.poi.examples.util,
org.apache.poi.extractor,
org.apache.poi.extractor.ole2,
org.apache.poi.hdgf,
org.apache.poi.hdgf.chunks,
org.apache.poi.hdgf.dev,
org.apache.poi.hdgf.exceptions,
org.apache.poi.hdgf.extractor,
org.apache.poi.hdgf.pointers,
org.apache.poi.hdgf.streams,
org.apache.poi.hemf.draw,
org.apache.poi.hemf.record.emf,
org.apache.poi.hemf.record.emfplus,
org.apache.poi.hemf.usermodel,
org.apache.poi.hmef,
org.apache.poi.hmef.attribute,
org.apache.poi.hmef.dev,
org.apache.poi.hmef.extractor,
org.apache.poi.hpbf,
org.apache.poi.hpbf.dev,
org.apache.poi.hpbf.extractor,
org.apache.poi.hpbf.model,
org.apache.poi.hpbf.model.qcbits,
org.apache.poi.hpsf,
org.apache.poi.hpsf.examples,
org.apache.poi.hpsf.extractor,
org.apache.poi.hpsf.wellknown,
org.apache.poi.hslf.blip,
org.apache.poi.hslf.dev,
org.apache.poi.hslf.examples,
org.apache.poi.hslf.exceptions,
org.apache.poi.hslf.extractor,
org.apache.poi.hslf.model,
org.apache.poi.hslf.model.textproperties,
org.apache.poi.hslf.record,
org.apache.poi.hslf.usermodel,
org.apache.poi.hslf.util,
org.apache.poi.hsmf,
org.apache.poi.hsmf.datatypes,
org.apache.poi.hsmf.dev,
org.apache.poi.hsmf.examples,
org.apache.poi.hsmf.exceptions,
org.apache.poi.hsmf.extractor,
org.apache.poi.hsmf.parsers,
org.apache.poi.hssf,
org.apache.poi.hssf.converter,
org.apache.poi.hssf.dev,
org.apache.poi.hssf.eventmodel,
org.apache.poi.hssf.eventusermodel,
org.apache.poi.hssf.eventusermodel.dummyrecord,
org.apache.poi.hssf.eventusermodel.examples,
org.apache.poi.hssf.extractor,
org.apache.poi.hssf.model,
org.apache.poi.hssf.record,
org.apache.poi.hssf.record.aggregates,
org.apache.poi.hssf.record.cf,
org.apache.poi.hssf.record.chart,
org.apache.poi.hssf.record.common,
org.apache.poi.hssf.record.cont,
org.apache.poi.hssf.record.crypto,
org.apache.poi.hssf.record.pivottable,
org.apache.poi.hssf.usermodel,
org.apache.poi.hssf.usermodel.examples,
org.apache.poi.hssf.usermodel.helpers,
org.apache.poi.hssf.util,
org.apache.poi.hssf.view,
org.apache.poi.hssf.view.brush,
org.apache.poi.hwmf.draw,
org.apache.poi.hwmf.record,
org.apache.poi.hwmf.usermodel,
org.apache.poi.hwpf,
org.apache.poi.hwpf.converter,
org.apache.poi.hwpf.dev,
org.apache.poi.hwpf.extractor,
org.apache.poi.hwpf.model,
org.apache.poi.hwpf.model.io,
org.apache.poi.hwpf.model.types,
org.apache.poi.hwpf.sprm,
org.apache.poi.hwpf.usermodel,
org.apache.poi.ooxml,
org.apache.poi.ooxml.dev,
org.apache.poi.ooxml.extractor,
org.apache.poi.ooxml.util,
org.apache.poi.openxml4j.exceptions,
org.apache.poi.openxml4j.opc,
org.apache.poi.openxml4j.opc.internal,
org.apache.poi.openxml4j.opc.internal.marshallers,
org.apache.poi.openxml4j.opc.internal.unmarshallers,
org.apache.poi.openxml4j.util,
org.apache.poi.poifs,
org.apache.poi.poifs.common,
org.apache.poi.poifs.crypt,
org.apache.poi.poifs.crypt.agile,
org.apache.poi.poifs.crypt.binaryrc4,
org.apache.poi.poifs.crypt.cryptoapi,
org.apache.poi.poifs.crypt.dsig,
org.apache.poi.poifs.crypt.dsig.facets,
org.apache.poi.poifs.crypt.dsig.services,
org.apache.poi.poifs.crypt.standard,
org.apache.poi.poifs.crypt.temp,
org.apache.poi.poifs.crypt.xor,
org.apache.poi.poifs.dev,
org.apache.poi.poifs.eventfilesystem,
org.apache.poi.poifs.filesystem,
org.apache.poi.poifs.macros,
org.apache.poi.poifs.nio,
org.apache.poi.poifs.poibrowser,
org.apache.poi.poifs.property,
org.apache.poi.poifs.storage,
org.apache.poi.sl.draw,
org.apache.poi.sl.draw.binding,
org.apache.poi.sl.draw.geom,
org.apache.poi.sl.extractor,
org.apache.poi.sl.image,
org.apache.poi.sl.usermodel,
org.apache.poi.ss,
org.apache.poi.ss.examples,
org.apache.poi.ss.examples.formula,
org.apache.poi.ss.examples.html,
org.apache.poi.ss.excelant,
org.apache.poi.ss.excelant.util,
org.apache.poi.ss.extractor,
org.apache.poi.ss.format,
org.apache.poi.ss.formula,
org.apache.poi.ss.formula.atp,
org.apache.poi.ss.formula.constant,
org.apache.poi.ss.formula.eval,
org.apache.poi.ss.formula.eval.forked,
org.apache.poi.ss.formula.function,
org.apache.poi.ss.formula.functions,
org.apache.poi.ss.formula.ptg,
org.apache.poi.ss.formula.udf,
org.apache.poi.ss.usermodel,
org.apache.poi.ss.usermodel.charts,
org.apache.poi.ss.usermodel.helpers,
org.apache.poi.ss.util,
org.apache.poi.ss.util.cellwalk,
org.apache.poi.util,
org.apache.poi.wp.usermodel,
org.apache.poi.xddf.usermodel,
org.apache.poi.xddf.usermodel.chart,
org.apache.poi.xddf.usermodel.text,
org.apache.poi.xdgf.exceptions,
org.apache.poi.xdgf.extractor,
org.apache.poi.xdgf.geom,
org.apache.poi.xdgf.usermodel,
org.apache.poi.xdgf.usermodel.section,
org.apache.poi.xdgf.usermodel.section.geometry,
org.apache.poi.xdgf.usermodel.shape,
org.apache.poi.xdgf.usermodel.shape.exceptions,
org.apache.poi.xdgf.util,
org.apache.poi.xdgf.xml,
org.apache.poi.xslf.draw,
org.apache.poi.xslf.extractor,
org.apache.poi.xslf.model,
org.apache.poi.xslf.usermodel,
org.apache.poi.xslf.usermodel.tutorial,
org.apache.poi.xslf.util,
org.apache.poi.xssf,
org.apache.poi.xssf.binary,
org.apache.poi.xssf.eventusermodel,
org.apache.poi.xssf.eventusermodel.examples,
org.apache.poi.xssf.extractor,
org.apache.poi.xssf.model,
org.apache.poi.xssf.streaming,
org.apache.poi.xssf.streaming.examples,
org.apache.poi.xssf.usermodel,
org.apache.poi.xssf.usermodel.charts,
org.apache.poi.xssf.usermodel.examples,
org.apache.poi.xssf.usermodel.extensions,
org.apache.poi.xssf.usermodel.helpers,
org.apache.poi.xssf.util,
org.apache.poi.xwpf.extractor,
org.apache.poi.xwpf.model,
org.apache.poi.xwpf.usermodel,
org.apache.poi.xwpf.usermodel.examples,
org.apache.xmlbeans,
org.apache.xmlbeans.impl.common,
org.apache.xmlbeans.impl.config,
org.apache.xmlbeans.impl.inst2xsd,
org.apache.xmlbeans.impl.inst2xsd.util,
org.apache.xmlbeans.impl.jam,
org.apache.xmlbeans.impl.jam.annotation,
org.apache.xmlbeans.impl.jam.internal,
org.apache.xmlbeans.impl.jam.internal.classrefs,
org.apache.xmlbeans.impl.jam.internal.elements,
org.apache.xmlbeans.impl.jam.internal.javadoc,
org.apache.xmlbeans.impl.jam.internal.parser,
org.apache.xmlbeans.impl.jam.internal.reflect,
org.apache.xmlbeans.impl.jam.mutable,
org.apache.xmlbeans.impl.jam.provider,
org.apache.xmlbeans.impl.jam.visitor,
org.apache.xmlbeans.impl.jam.xml,
org.apache.xmlbeans.impl.regex,
org.apache.xmlbeans.impl.repackage,
org.apache.xmlbeans.impl.richParser,
org.apache.xmlbeans.impl.schema,
org.apache.xmlbeans.impl.soap,
org.apache.xmlbeans.impl.store,
org.apache.xmlbeans.impl.tool,
org.apache.xmlbeans.impl.util,
org.apache.xmlbeans.impl.validator,
org.apache.xmlbeans.impl.values,
org.apache.xmlbeans.impl.xb.ltgfmt,
org.apache.xmlbeans.impl.xb.ltgfmt.impl,
org.apache.xmlbeans.impl.xb.substwsdl,
org.apache.xmlbeans.impl.xb.substwsdl.impl,
org.apache.xmlbeans.impl.xb.xmlconfig,
org.apache.xmlbeans.impl.xb.xmlconfig.impl,
org.apache.xmlbeans.impl.xb.xmlschema,
org.apache.xmlbeans.impl.xb.xmlschema.impl,
org.apache.xmlbeans.impl.xb.xsdownload,
org.apache.xmlbeans.impl.xb.xsdownload.impl,
org.apache.xmlbeans.impl.xb.xsdschema,
org.apache.xmlbeans.impl.xb.xsdschema.impl,
org.apache.xmlbeans.impl.xpath.saxon,
org.apache.xmlbeans.impl.xpathgen,
org.apache.xmlbeans.impl.xquery.saxon,
org.apache.xmlbeans.impl.xsd2inst,
org.apache.xmlbeans.soap,
org.apache.xmlbeans.xml.stream,
org.apache.xmlbeans.xml.stream.events,
org.apache.xmlbeans.xml.stream.utils,
org.dom4j,
org.dom4j.bean,
org.dom4j.datatype,
org.dom4j.dom,
org.dom4j.dtd,
org.dom4j.io,
org.dom4j.jaxb,
org.dom4j.rule,
org.dom4j.rule.pattern,
org.dom4j.swing,
org.dom4j.tree,
org.dom4j.util,
org.dom4j.xpath,
org.dom4j.xpp,
org.etsi.uri.x01903.v13,
org.etsi.uri.x01903.v13.impl,
org.openxmlformats.schemas.drawingml.x2006.chart,
org.openxmlformats.schemas.drawingml.x2006.chart.impl,
org.openxmlformats.schemas.drawingml.x2006.main,
org.openxmlformats.schemas.drawingml.x2006.main.impl,
org.openxmlformats.schemas.drawingml.x2006.picture,
org.openxmlformats.schemas.drawingml.x2006.picture.impl,
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing,
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.impl,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing,
org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.impl,
org.openxmlformats.schemas.officeDocument.x2006.customProperties,
org.openxmlformats.schemas.officeDocument.x2006.customProperties.impl,
org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes,
org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes.impl,
org.openxmlformats.schemas.officeDocument.x2006.extendedProperties,
org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.impl,
org.openxmlformats.schemas.officeDocument.x2006.relationships,
org.openxmlformats.schemas.officeDocument.x2006.relationships.impl,
org.openxmlformats.schemas.presentationml.x2006.main,
org.openxmlformats.schemas.presentationml.x2006.main.impl,
org.openxmlformats.schemas.spreadsheetml.x2006.main,
org.openxmlformats.schemas.spreadsheetml.x2006.main.impl,
org.openxmlformats.schemas.wordprocessingml.x2006.main,
org.openxmlformats.schemas.wordprocessingml.x2006.main.impl,
org.openxmlformats.schemas.xpackage.x2006.digitalSignature,
org.openxmlformats.schemas.xpackage.x2006.digitalSignature.impl,
org.w3.x2000.x09.xmldsig,
org.w3.x2000.x09.xmldsig.impl,
schemaorg_apache_xmlbeans.system.s8C3F193EE11A2F798ACF65489B9E6078,
schemaorg_apache_xmlbeans.system.sD023D6490046BA0250A839A9AD24C443,
schemaorg_apache_xmlbeans.system.sXMLCONFIG,
schemaorg_apache_xmlbeans.system.sXMLLANG,
schemaorg_apache_xmlbeans.system.sXMLSCHEMA,
schemaorg_apache_xmlbeans.system.sXMLTOOLS,
tcimporthistorydatas
Import-Package: com.aspose.cad.internal.ac,
com.connor.dev.imp.ob,
com.connor.jd.plm.beans,
com.connor.jd.plm.table,
com.teamcenter.rac.aif,
com.teamcenter.rac.aif.kernel,
com.teamcenter.rac.kernel,
com.teamcenter.rac.util,
com.teamcenter.services,
com.teamcenter.services.rac,
com.teamcenter.services.rac.core,
com.teamcenter.services.rac.core._2008_06,
com.teamcenter.soa.common,
jxl,
jxl.read.biff,
org.apache.http.client,
org.apache.http.client.methods,
org.apache.http.client.params,
@ -64,4 +984,7 @@ Bundle-ClassPath: .,
lib/ojdbc6.jar,
config/,
lib/datepicker.jar,
lib/aspose-cells-18.9.jar
lib/aspose-cells-18.9.jar,
lib/jxl.jar,
lib/dom4j-1.6.1.jar,
lib/log4j.jar

@ -26,5 +26,8 @@ bin.includes = plugin.xml,\
lib/commons-lang3-3.9.jar,\
src/config/,\
lib/datepicker.jar,\
lib/aspose-cells-18.9.jar
lib/aspose-cells-18.9.jar,\
lib/jxl.jar,\
lib/dom4j-1.6.1.jar,\
lib/log4j.jar

@ -206,6 +206,8 @@
<command categoryId="JDProject.commands.category" name="批量升版" id="batchRevise"></command>
<command categoryId="JDProject.commands.category" name="BOM管理" id="BOMManagement "></command>
<command categoryId="JDProject.commands.category" name="签审记录查询" id="RecordHistoryHandler "></command>
<command categoryId="JDProject.commands.category" name="更新导入对象单位" id="ChangeImportObjectsUnit"></command>
</extension>
<extension
point="org.eclipse.ui.handlers">
@ -403,6 +405,8 @@
<handler commandId="deleteItemRevision" class="com.connor.jd.plm.handlers.DeleteItemRevisionHandler"></handler>
<handler commandId="batchRevise" class="com.connor.jd.plm.handlers.BatchReviseHandler"></handler>
<handler commandId="RecordHistoryHandler" class="com.connor.jd.plm.signingAndApprovalRecordHistory.RecordHistoryHandler"></handler>
<handler commandId="ChangeImportObjectsUnit" class=" com.connor.jd.plm.changeImportObjectsUnit.ChangeImportObjectsUnitHandler"></handler>
</extension>
<extension
@ -658,6 +662,8 @@
<menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=additions">
<menu id="JDProject.menus.JD2_CSXWHMENU" label="测试项维护" mnemonic="M">
<command commandId="JD2_CSXWH" id="JDProject.menus.JD2_CSXWH" mnemonic="S"></command>
<command commandId="RecordHistoryHandler" id="JDProject.menus.RecordHistoryHandler" mnemonic="S"></command>
<command commandId="ChangeImportObjectsUnit" id="JDProject.menus.ChangeImportObjectsUnit" mnemonic="S"></command>
</menu>
</menuContribution>
<menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=additions">

@ -0,0 +1,238 @@
package com.connor.jd.plm.changeImportObjectsUnit;
import java.awt.Frame;
import com.teamcenter.rac.aif.AbstractAIFApplication;
import com.teamcenter.rac.aif.common.actions.AbstractAIFAction;
import com.teamcenter.rac.aif.kernel.AbstractAIFSession;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCSession;
import com.teamcenter.rac.kernel.TCTextService;
import com.teamcenter.rac.util.MessageBox;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ChangeImportObjectsUnitAction extends AbstractAIFAction {
private AbstractAIFApplication application;
// /**
// * objectsUnitMap存储对象item_id和单位
// * key 为item_id
// * value为单位
// */
// private Map<String, String> objectsUnitMap = new HashMap<>();
/*
* columListitem_id
*/
private List<List<String>> columList = new ArrayList<List<String>>();
public ChangeImportObjectsUnitAction(AbstractAIFApplication application, Frame frame, String param) {
super(application, frame, param);
this.application = application;
// TODO 自动生成的构造函数存根
}
@Override
public void run() {
// 创建文件选择器
JFileChooser fileChooser = new JFileChooser();
// 设置文件过滤器只显示XLSX文件
FileNameExtensionFilter filter = new FileNameExtensionFilter("Excel Files", "xlsx");
fileChooser.setFileFilter(filter);
// 显示文件选择对话框
int result = fileChooser.showOpenDialog(null);
if (result == JFileChooser.APPROVE_OPTION) {
// 获取选中的文件
File selectedFile = fileChooser.getSelectedFile();
try (FileInputStream fis = new FileInputStream(selectedFile);
Workbook workbook = new XSSFWorkbook(fis)) {
// 获取第一个工作表
Sheet sheet = workbook.getSheetAt(0);
if (sheet != null){
try {
getChangeUnitInfo(sheet);
} catch (Exception e) {
System.out.println("读取表格数据异常:\n"+e.getMessage());
e.printStackTrace();
}
setObjectsUnit(columList);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
private void setObjectsUnit(List<List<String>> columList2) {
AbstractAIFSession session = this.application.getSession();
TCSession tcSession = (TCSession)session;
if (columList2.size() <= 0) {
System.out.println("未获取到有效的item_id和单位值");
return;
}
// //遍历map集合中的item_id和待修改的单位值
// for (String key : columList2.keySet()){
// String unit = columList2.get(key);//单位
//
// try {
// TCComponent[] searchs = tcSession.search("零组件...",
// new String[] { "item_id" },
// new String[] { key });
//
// if (searchs.length<0) {
// System.out.println("erroitem_id["+key+"]未查询到相关对象!");
// continue;
// }
//
// TCComponent tcComponent = searchs[0];
// tcComponent.setProperty("uom_tag", unit == null ? "" : unit);
//
// }catch (Exception e){
// String erroMSGString = "item_id="+key+";\n"+"单位="+unit+";\n错误信息\n"+e.getMessage();
// MessageBox.post(erroMSGString , "设置单位异常", MessageBox.ERROR);
// e.printStackTrace();
// };
// }
for (int i = 0; i < columList2.size(); i++) {
List<String> keyList = columList2.get(i);//xlsx表格中的一行数据中的id版本单位
String itemId = keyList.get(0);
String unit = keyList.get(1);
String rev = keyList.get(2);
try {
TCComponent[] searchs = tcSession.search("零组件...",
new String[] { "item_id" },
new String[] { itemId });
if (searchs.length<0) {
System.out.println("erroitem_id["+itemId+"]未查询到相关对象!");
continue;
}
TCComponent tcComponent = searchs[0];
tcComponent.setProperty("uom_tag", unit == null ? "" : unit);
tcComponent.refresh();
System.out.println("对象:["+tcComponent.getStringProperty("object_string")+"]更新单位完成!");
}catch (Exception e){
String erroMSGString = "item_id="+itemId+";\n"+"单位="+unit+";\n错误信息\n"+e.getMessage();
MessageBox.post(erroMSGString , "设置单位异常", MessageBox.ERROR);
e.printStackTrace();
};
}
MessageBox.post("批量变更单位完成!" , "提示", MessageBox.INFORMATION);
}
/**
* itemIdcolumList
* @author kuma
* @param sheet
*
*/
private void getChangeUnitInfo(Sheet sheet) {
//纪录item_id和单位的表格列索引
int itemIdColumnIndex = 0;
int unitColumnIndex = -1;
int revColumnIndex = -1;
// 获取第一行:表头行
Row headerRow = sheet.getRow(0);
if (headerRow == null){
MessageBox.post("导入表格数据为空!" , "导入文件异常", MessageBox.ERROR);
return;
}
for (Cell cell : headerRow) {
if (cell != null && "基本计量单位".equals(getCellValue(cell))) {
unitColumnIndex = cell.getColumnIndex();
break;
}
}
if (unitColumnIndex == -1){
MessageBox.post("导入表格中未找到'基本计量单位'表头属性!" , "导入文件异常", MessageBox.ERROR);
return;
}
for (Cell cell : headerRow) {
if (cell != null && "版本".equals(getCellValue(cell))) {
revColumnIndex = cell.getColumnIndex();
break;
}
}
if (revColumnIndex == -1){
MessageBox.post("导入表格中未找到'版本'表头属性!" , "导入文件异常", MessageBox.ERROR);
return;
}
// 遍历出标题行外的每一行
for (int i = 1; i <= sheet.getLastRowNum(); i++){
Row row = sheet.getRow(i);
if (row != null){
Cell itemIdCell = row.getCell(itemIdColumnIndex);
Cell unitCell = row.getCell(unitColumnIndex);
Cell revCell = row.getCell(revColumnIndex);
if (itemIdCell != null && unitCell != null && revCell != null){
List<String> layerList = new ArrayList<String>();
String itemId = getCellValue(itemIdCell);
String unit = getCellValue(unitCell);
String rev = getCellValue(revCell);
// objectsUnitMap.put(itemId, unit);
layerList.add(itemId == null ? "" : itemId);
layerList.add(unit == null ? "" : unit);
layerList.add(rev == null ? "" : rev);
columList.add(layerList);
}
}
}
}
private String getCellValue(Cell cell) {
// switch (cell.getCellType()) {
// case STRING:
// return cell.getStringCellValue();
// case NUMERIC:
// if (DateUtil.isCellDateFormatted(cell)) {
// return cell.getDateCellValue().toString();
// } else {
// return String.valueOf(cell.getNumericCellValue());
// }
// case BOOLEAN:
// return String.valueOf(cell.getBooleanCellValue());
// case FORMULA:
// return cell.getCellFormula();
// default:
// return "";
// }
// 创建DataFormatter对象
DataFormatter dataFormatter = new DataFormatter();
// 使用DataFormatter获取单元格的显示值
String cellValue = dataFormatter.formatCellValue(cell);
return cellValue;
}
}

@ -0,0 +1,22 @@
package com.connor.jd.plm.changeImportObjectsUnit;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import com.teamcenter.rac.aif.AbstractAIFApplication;
import com.teamcenter.rac.aifrcp.AIFUtility;
public class ChangeImportObjectsUnitHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
AbstractAIFApplication application = AIFUtility.getCurrentApplication();
ChangeImportObjectsUnitAction action = new ChangeImportObjectsUnitAction(application, null, null);
new Thread(action).start();
return null;
}
}

@ -0,0 +1,502 @@
package com.connor.jd.plm.signingAndApprovalRecordHistory;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSpinner;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.SpinnerDateModel;
import javax.swing.table.DefaultTableModel;
import com.teamcenter.rac.aif.AbstractAIFApplication;
import com.teamcenter.rac.aif.AbstractAIFDialog;
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
import com.teamcenter.rac.kernel.TCComponent;
import com.teamcenter.rac.kernel.TCComponentBOMLine;
import com.teamcenter.rac.kernel.TCComponentItemRevision;
import com.teamcenter.rac.kernel.TCComponentProcess;
import com.teamcenter.rac.kernel.TCComponentTask;
import com.teamcenter.rac.kernel.TCSession;
import com.teamcenter.rac.util.MessageBox;
import cn.hutool.core.util.PageUtil;
public class RecordHistoryDialog extends AbstractAIFDialog implements ActionListener{
private AbstractAIFApplication application;
private TCSession tcSession ;
private JTable table;
private JComboBox<String> operationComboBox;
private JComboBox<String> changePageSizeComboBox;
private JButton queryButton, prevPageButton, nextPageButton, changeSizeButton;
private int currentPageNum;
private int pageSize = 20;//每页数据量
private DefaultTableModel model;
private List<String[]> data = new ArrayList<String[]>();//查询出的所有数据
private JSpinner startDatePicker;
private JSpinner endDatePicker;
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-M-dd HH:mm");
public RecordHistoryDialog(AbstractAIFApplication application) {
super(true);
this.application = application;
this.tcSession = (TCSession) this.application.getSession();
}
@Override
public void run() {
try {
initUi();
} catch (Exception e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
}
private void initUi() throws Exception {
this.setTitle("我的签审记录");
this.setSize(800,600);
this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
// 创建表格模型
String[] columnNames = {"序号", "对象ID", "对象名称", "版本号", "审批操作", "流程名称", "任务Uid", "日期", "备注"};
// 初始化为空数据
this.model = new DefaultTableModel(columnNames,0){
@Override
public boolean isCellEditable(int row, int column) {
return false;// 设置所有单元格为不可编辑
}
};
this.table = new JTable(this.model);
JScrollPane scrollPane = new JScrollPane(this.table);
// 添加双击监听器
table.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
System.out.println("触发单击选中事件~");
if (e.getClickCount() == 2) { // 检查是否为双击事件
System.out.println("触发双击选中事件~");
int row = table.rowAtPoint(e.getPoint());
if (row >= 0) {
// 获取双击行的数据
// String objID = (String) model.getValueAt(row, 1);
// String objName = (String) model.getValueAt(row, 2);
// String versionNum = (String) model.getValueAt(row, 3);
// String approvalOperation = (String) model.getValueAt(row, 4);
// String flowName = (String) model.getValueAt(row, 5);
// String dateValue = (String) model.getValueAt(row, 6);
// String remark = (String) model.getValueAt(row, 7);
String taskUid = (String) model.getValueAt(row, 6);
// 在这里添加双击后的操作,例如显示详细信息
// System.out.println("双击了行: " + row);
System.out.println("对象ID: " + taskUid);
// System.out.println("对象名称: " + objName);
// System.out.println("版本号: " + versionNum);
// System.out.println("审批操作: " + approvalOperation);
// System.out.println("流程名称: " + flowName);
// System.out.println("日期: " + dateValue);
// System.out.println("备注: " + remark);
if (!taskUid.isEmpty()) {
System.out.println("Double-clicked taskUID: " + taskUid);
com.teamcenter.rac.common.Activator.getDefault()
.openPerspective("com.teamcenter.rac.ui.perspectives.navigatorPerspective");
try {
InterfaceAIFComponent chooseComponent = tcSession.stringToComponent(taskUid);
if (chooseComponent != null) {
com.teamcenter.rac.common.Activator.getDefault().openComponents(
"com.teamcenter.rac.ui.perspectives.navigatorPerspective",
new InterfaceAIFComponent[]{chooseComponent});
}else {
System.out.println("未获取到双击选中对象!");
}
} catch (Exception e1) {
// TODO 自动生成的 catch 块
e1.printStackTrace();
}
}
}
}
}
/**
* itemIDcomponent
* @param objID
* @return
* @throws Exception
*/
private InterfaceAIFComponent getItemById(String objID) throws Exception {
InterfaceAIFComponent component = null;
TCComponent[] searchs = tcSession.search("零组件...", new String[] { "零组件 ID" },
new String[] { objID });
if (searchs.length > 0) {
return searchs[0];
}
return null;
}
});
// 创建查询区域
JPanel queryPanel = new JPanel(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
JPanel dateQueryPanel = createDateQueryPanel();//按时间查询区域
JPanel operationQueryPanel = createOperationQueryPanel();//按操作类型查询区域
gbc.weightx = 0.7; // 70% of the available space
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.gridx = 0;
gbc.gridy = 0;
queryPanel.add(dateQueryPanel, gbc);
gbc.weightx = 0.3; // 30% of the available space
gbc.gridx = 1;
gbc.gridy = 0;
queryPanel.add(operationQueryPanel, gbc);
// 创建按钮面板
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
JPanel pageNumChangePanel = createPageNumChoosePanel();
prevPageButton = new JButton("上一页");
prevPageButton.addActionListener(this);
nextPageButton = new JButton("下一页");
nextPageButton.addActionListener(this);
buttonPanel.add(pageNumChangePanel);
buttonPanel.add(prevPageButton);
buttonPanel.add(nextPageButton);
// 添加组件到主面板
this.setLayout(new BorderLayout());
this.add(queryPanel, BorderLayout.NORTH);
this.add(scrollPane, BorderLayout.CENTER);
this.add(buttonPanel, BorderLayout.SOUTH);
this.setVisible(true);
}
/*
*
*/
private JPanel createDateQueryPanel() throws Exception {
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
JLabel label = new JLabel("按时间段查询:");
//设置一个足够小的开始时间
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-M-d HH:mm");
Date stDate = sdf.parse("1998-1-1 00:00");
// 创建一个SpinnerDateModel设置默认值为当前时间
SpinnerDateModel startModel = new SpinnerDateModel();
// SpinnerDateModel startModel = new SpinnerDateModel(stDate, null, null, Calendar.DAY_OF_MONTH);
this.startDatePicker = new JSpinner(startModel);
// 设置编辑器为JSpinner.DateEditor以显示友好格式
JSpinner.DateEditor startEditor = new JSpinner.DateEditor(this.startDatePicker, "yyyy-M-dd HH:mm");
this.startDatePicker.setEditor(startEditor);
// 对结束时间做同样的处理
SpinnerDateModel endModel = new SpinnerDateModel();
this.endDatePicker = new JSpinner(endModel);
JSpinner.DateEditor endEditor = new JSpinner.DateEditor(this.endDatePicker, "yyyy-M-dd HH:mm");
this.endDatePicker.setEditor(endEditor);
panel.add(label);
panel.add(this.startDatePicker);
panel.add(new JLabel("~"));
panel.add(this.endDatePicker);
return panel;
}
/*
*
*/
private JPanel createOperationQueryPanel() {
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
JLabel label = new JLabel("按操作查询:");
operationComboBox = new JComboBox<>(new String[]{"批准", "驳回"});
queryButton = new JButton("查询");
queryButton.addActionListener(this);
panel.add(label);
panel.add(operationComboBox);
panel.add(queryButton);
return panel;
}
/*
*
*/
private JPanel createPageNumChoosePanel() {
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
JLabel label = new JLabel("页面大小:");
changePageSizeComboBox = new JComboBox<>(new String[]{"20", "30","50","100","200","500"});
changeSizeButton = new JButton("切换");
changeSizeButton.addActionListener(this);
panel.add(label);
panel.add(changePageSizeComboBox);
panel.add(changeSizeButton);
return panel;
}
/*
*
* @data:
* @currentPageNum: :[1,2,3,4,5,6...]
*/
private void updateTable(List<String[]> data, int currentPageNum) {
System.out.println("更新数据到表格,入参:当前页码="+currentPageNum);
int totalNum = data.size();//数据总条数
int totalPage = PageUtil.totalPage(totalNum, this.pageSize);
System.out.println("总页数:"+totalPage);//3
System.out.println("总数据条数:"+totalNum);
if (currentPageNum <= totalPage) {
if (this.model.getRowCount() > 0) {
// 清空表格数据,保留列标题
System.out.println("开始清空表格数据,保留列标题");
for (int i = this.model.getRowCount() - 1; i >= 0; i--) {
this.model.removeRow(i);
}
}
//获取当前页数据起始位置的索引
int[] startEnd = PageUtil.transToStartEnd(currentPageNum, pageSize);
int start = startEnd[0];
int end = startEnd[1];
if (end>totalNum) {
System.out.println("end = "+end+",totalNum = "+totalNum);
end = totalNum;
}
System.out.println("渲染到列表中的索引区间:"+start+" = "+end);
for (int i = start; i < end; i++) {
model.addRow(data.get(i));//TODO
}
}else {
System.out.println("当前页码超出总页数!");
this.currentPageNum = totalPage;
MessageBox.post("当前页码超出总页数!","页面提示",MessageBox.INFORMATION);
}
}
private InterfaceAIFComponent[] searchRecord(List<String> entryNames,List<String> entryValues) throws Exception {
//每次查询前重置当前页码
this.currentPageNum = 1;
int nameNum = entryNames.size();
int valueNum = entryValues.size();
InterfaceAIFComponent[] resultComponents = null;
if (nameNum>0 && valueNum>0) {
for(String s:entryValues) {
System.out.println("查询入参:"+s);
}
//调用查询构建器
resultComponents = tcSession.search("签审记录查询",
entryNames.toArray(new String[valueNum]),
entryValues.toArray(new String[valueNum]));
if (resultComponents.length>0) {
System.out.println("签审记录查询成功,共查询到"+resultComponents.length+"个结果!");
if (this.data != null && this.data.size() > 0) {//java.lang.NullPointerException
this.data.clear();//每次查询时清空data集合
}
}else {
System.out.println("签审记录未查询到任何结果!");
}
}else {
System.out.println("未正确传入查询构建器的查询条目和参数,请核对!");
}
return resultComponents;
}
// 以下方法用于获取开始时间的选择值并格式化为字符串
public String getFormattedStartDate() {
Date date = (Date) startDatePicker.getValue();
return dateFormat.format(date);
}
// 以下方法用于获取结束时间的选择值并格式化为字符串
public String getFormattedEndDate() {
Date date = (Date) endDatePicker.getValue();
return dateFormat.format(date);
}
@Override
public void actionPerformed(ActionEvent e) {
String userName = tcSession.getUserName();
Object s = e.getSource();
try {
if (s.equals(this.queryButton)) {
//通过操作类型查询
String startDate = null;
String endDate = null;
String operation = null;
String input = (String) operationComboBox.getSelectedItem();
System.out.println("根据操作类型查询,入参:"+input);
if (input.equals("批准")) {
operation = "已批准";
}else if (input.equals("驳回")) {
operation = "已拒绝";
}
startDate = getFormattedStartDate();
endDate = getFormattedEndDate();
System.out.println(startDate+"<->"+endDate);
List<String> entryNames = new ArrayList<String>();
List<String> entryValues = new ArrayList<String>();
int cxtag = 0;
if (startDate != null && startDate != "") {
cxtag++;
entryNames.add("开始日期早于");
entryValues.add(startDate);
System.out.println("查询入参-开始日期:"+startDate);
}
if (endDate != null && endDate != "") {
cxtag++;
entryNames.add("开始日期晚于");
entryValues.add(endDate);
System.out.println("查询入参-结束日期:"+endDate);
}
if (operation != null && operation != "") {
cxtag++;
entryNames.add("签发决定");
entryValues.add(operation);
System.out.println("查询入参-签发决定:"+operation);
}
if (cxtag != 0) {
entryNames.add("审核者");
entryValues.add(userName);
System.out.println("查询入参-审核者:"+userName);
}
//调用查询构建器
InterfaceAIFComponent[] results = searchRecord(entryNames,entryValues);
if (results.length>0) {
delSearchResult(results);
}else {
MessageBox.post("未查询到任何结果,请检查查询条件是否正确!","查询结果",MessageBox.INFORMATION);
}
}else if (s.equals(this.nextPageButton)) {
//下一页
System.out.println("触发下一页");
this.currentPageNum ++;
updateTable(this.data, currentPageNum);
}else if (s.equals(this.prevPageButton)) {
//上一页
System.out.println("触发上一页");
if (this.currentPageNum >1) {
this.currentPageNum --;
updateTable(this.data, currentPageNum);
}else {
System.out.println("已经到第一页啦!");
this.currentPageNum = 0;
MessageBox.post("已经到第一页啦!","页面提示",MessageBox.INFORMATION);
}
}else if (s.equals(this.changeSizeButton)) {
String selectPageSizeString = (String)changePageSizeComboBox.getSelectedItem();
this.pageSize = Integer.parseInt(selectPageSizeString);
System.out.println("切换页面大小:"+selectPageSizeString);
this.currentPageNum = 1;
updateTable(this.data, currentPageNum);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
/*
*
*/
public void delSearchResult(InterfaceAIFComponent[] results) {
try {
if (results != null) {
int xh = 0;
for (InterfaceAIFComponent component : results) {//节点对象component
TCComponentTask componenttsTask = (TCComponentTask)component;
String uid = componenttsTask.getReferenceProperty("fnd0RootTask").getUid();
System.out.println("===》获取节点对象的fnd0RootTask的uid="+uid);
TCComponentTask process = (TCComponentTask)(componenttsTask.getReferenceProperty("fnd0RootTask"));//
TCComponent[] components = process.getReferenceListProperty("root_target_attachments");
System.out.println("开始获取节点属性");
// 获取节点属性
String dataValue = component.getProperty("fnd0StartDate");
String approvalOperation = component.getProperty("task_result");
String flowName = component.getProperty("fnd0TaskPathName");
String taskUid = component.getUid();
for (InterfaceAIFComponent flowComponent : components) {
if (flowComponent instanceof TCComponentItemRevision) {
System.out.println("获取流程下对象的属性");
//获取流程下对象的属性
TCComponentItemRevision itemRevision = (TCComponentItemRevision) flowComponent;
String item = itemRevision.getStringProperty("item_id");
String obj = itemRevision.getStringProperty("object_name");
String rev = itemRevision.getStringProperty("item_revision_id");
//组织列数据
xh = xh + 1;
//列数据
RecordHistoryEntity entity = new RecordHistoryEntity();
entity.setNum(String.valueOf(xh));
entity.setObjID(item == null ? "" : item);
entity.setObj(obj == null ? "" : obj);
entity.setVersionNum(rev == null ? "" : rev);
entity.setApprovalOperation(approvalOperation == null ? "" : approvalOperation);
entity.setFlowName(flowName == null ? "" : flowName);
entity.setDateValue(dataValue == null ? "" : dataValue);
entity.setRemark("");
entity.setTaskUid(taskUid == null ? "" : taskUid);
System.out.println(entity.toString());
this.data.add(new String[] {
entity.getNum(),
entity.getObjID(),
entity.getObj(),
entity.getVersionNum(),
entity.getApprovalOperation(),
entity.getFlowName(),
entity.getTaskUid(),
entity.getDateValue(),
entity.getRemark()
});
}
}
}
updateTable(this.data, this.currentPageNum);
}else {
System.out.println("根据开始日期查询签审记录失败!");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -0,0 +1,119 @@
package com.connor.jd.plm.signingAndApprovalRecordHistory;
public class RecordHistoryEntity {
//序号
private String num;
//序号
private String objID;
//对象
private String obj;
//版本号
private String versionNum;
//审批操作
private String approvalOperation;
//流程名称
private String flowName;
//任务uid
private String taskUid;
//日期
private String dateValue;
//备注
private String remark;
/**
* @return taskUid
*/
public String getTaskUid() {
return taskUid;
}
/**
* @param taskUid taskUid
*/
public void setTaskUid(String taskUid) {
this.taskUid = taskUid;
}
public String getNum() {
return num;
}
/**
* @return objID
*/
public String getObjID() {
return objID;
}
/**
* @param objID objID
*/
public void setObjID(String objID) {
this.objID = objID;
}
public void setNum(String num) {
this.num = num;
}
public String getObj() {
return obj;
}
public void setObj(String obj) {
this.obj = obj;
}
public String getVersionNum() {
return versionNum;
}
public void setVersionNum(String versionNum) {
this.versionNum = versionNum;
}
public String getApprovalOperation() {
return approvalOperation;
}
public void setApprovalOperation(String approvalOperation) {
this.approvalOperation = approvalOperation;
}
public String getFlowName() {
return flowName;
}
public void setFlowName(String flowName) {
this.flowName = flowName;
}
public String getDateValue() {
return dateValue;
}
public void setDateValue(String dateValue) {
this.dateValue = dateValue;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return "RecordHistoryEntity [num=" + num + ", objID=" + objID + ", obj=" + obj + ", versionNum=" + versionNum
+ ", approvalOperation=" + approvalOperation + ", flowName=" + flowName + ", dateValue=" + dateValue
+ ", remark=" + remark + "]";
}
}

@ -0,0 +1,21 @@
package com.connor.jd.plm.signingAndApprovalRecordHistory;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import com.teamcenter.rac.aif.AbstractAIFApplication;
import com.teamcenter.rac.aifrcp.AIFUtility;
public class RecordHistoryHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
AbstractAIFApplication application = AIFUtility.getCurrentApplication();
RecordHistoryDialog dialog = new RecordHistoryDialog(application);
new Thread(dialog).start();
return null;
}
}

@ -0,0 +1,50 @@
package tcimporthistorydatas;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "TCImportHistoryDatas";
// The shared instance
private static Activator plugin;
/**
* The constructor
*/
public Activator() {
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
}
Loading…
Cancel
Save