Browse Source

提交开源任务材料

10.0
LAPTOP-SB56SG4Q\86185 3 years ago
parent
commit
c3dcfbda05
  1. BIN
      JSD-8421配置使用说明.docx
  2. BIN
      JSD-8421需求确认书.docx
  3. 5
      README.md
  4. BIN
      lib/finekit-10.0.jar
  5. 29
      plugin.xml
  6. 22
      src/main/java/com/fr/plugin/hdbk/Constants.java
  7. 31
      src/main/java/com/fr/plugin/hdbk/LocaleFinder.java
  8. 76
      src/main/java/com/fr/plugin/hdbk/function/NORMSDIST.java
  9. 3
      src/main/resources/com/fr/plugin/hdbk/locale/lang.properties
  10. 3
      src/main/resources/com/fr/plugin/hdbk/locale/lang_en_US.properties
  11. 3
      src/main/resources/com/fr/plugin/hdbk/locale/lang_zh_CN.properties
  12. 82
      正态累计函数示例.cpt

BIN
JSD-8421配置使用说明.docx

Binary file not shown.

BIN
JSD-8421需求确认书.docx

Binary file not shown.

5
README.md

@ -1,3 +1,6 @@
# open-JSD-8421 # open-JSD-8421
JSD-8421 开源任务材料 JSD-8421 正态分布函数\
免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\
仅作为开发者学习参考使用!禁止用于任何商业用途!\
为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系hugh处理。

BIN
lib/finekit-10.0.jar

Binary file not shown.

29
plugin.xml

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>com.fr.plugin.hdbk.v10</id>
<name><![CDATA[正态累计分布函数插件]]></name>
<active>yes</active>
<version>1.0</version>
<env-version>10.0</env-version>
<jartime>2018-07-31</jartime>
<vendor>mqh</vendor>
<description><![CDATA[
NORMSDIST(z):正态累计分布函数<br/>
示例:NORMSDIST(z)<br/>
必需参数:z,需要计算器分布的数值<br/>
]]></description>
<change-notes><![CDATA[
主要功能:<br/>
NORMSDIST(z):正态累计分布函数<br/>
]]></change-notes>
<main-package>com.fr.plugin.hdbk</main-package>
<prefer-packages>
<prefer-package>com.fanruan.api</prefer-package>
</prefer-packages>
<extra-core>
<FunctionDefineProvider class="com.fr.plugin.hdbk.function.NORMSDIST" name="NORMSDIST"
description="NORMSDIST(z):正态累计分布函数,示例:NORMSDIST(1.333333)"/>
<LocaleFinder class="com.fr.plugin.hdbk.LocaleFinder"/>
</extra-core>
<function-recorder class="com.fr.plugin.hdbk.function.NORMSDIST"/>
</plugin>

22
src/main/java/com/fr/plugin/hdbk/Constants.java

@ -0,0 +1,22 @@
/*
* Copyright (C), 2015-2019
* FileName: Constants
* Author: Louis
* Date: 2019/9/4 16:09
* Description: Constants
* History:
* <author> <time> <version> <desc>
*/
package com.fr.plugin.hdbk;
/**
* <Function Description><br>
* <Constants>
*
* @author Louis
* @since 1.0.0
*/
public class Constants {
public static final String PLUGIN_ID = "com.fr.plugin.hdbk.v10";
public static final String ICON_PATH = "/com/fr/plugin/hdbk/images/logo16.png";
}

31
src/main/java/com/fr/plugin/hdbk/LocaleFinder.java

@ -0,0 +1,31 @@
/*
* Copyright (C), 2015-2019
* FileName: LocaleFinder
* Author: Louis
* Date: 2019/9/4 16:20
* Description: LocaleFinder
* History:
* <author> <time> <version> <desc>
*/
package com.fr.plugin.hdbk;
import com.fr.stable.fun.impl.AbstractLocaleFinder;
/**
* <Function Description><br>
* <LocaleFinder>
*
* @author Louis
* @since 1.0.0
*/
public class LocaleFinder extends AbstractLocaleFinder {
@Override
public String find() {
return "com/fr/plugin/hdbk/locale/lang";
}
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
}

76
src/main/java/com/fr/plugin/hdbk/function/NORMSDIST.java

@ -0,0 +1,76 @@
/*
* Copyright (C), 2015-2020
* FileName: NORMSDIST
* Author: Louis
* Date: 2020/5/22 15:50
* Description: NORMSDIST
* History:
* <author> <time> <version> <desc>
*/
package com.fr.plugin.hdbk.function;
import com.fanruan.api.i18n.I18nKit;
import com.fanruan.api.log.LogKit;
import com.fr.base.Utils;
import com.fr.intelli.record.Focus;
import com.fr.intelli.record.Original;
import com.fr.plugin.context.PluginContexts;
import com.fr.plugin.hdbk.Constants;
import com.fr.record.analyzer.EnableMetrics;
import com.fr.script.AbstractFunction;
import com.fr.stable.Primitive;
import com.fr.stable.fun.Authorize;
import com.fr.third.org.apache.commons.math3.distribution.NormalDistribution;
import java.math.BigDecimal;
import static com.fr.plugin.hdbk.Constants.PLUGIN_ID;
/**
* <Function Description><br>
* <NORMSDIST类-正态累计分布函数>
*
* @author Louis
* @since 1.0.0
*/
@EnableMetrics
@Authorize(callSignKey = Constants.PLUGIN_ID)
public class NORMSDIST extends AbstractFunction {
private static final long serialVersionUID = -422355325281808141L;
public NORMSDIST() {
}
/**
* args参数: z需要计算器分布的数值
*
* @param args
* @return
*/
@Override
@Focus(id = PLUGIN_ID, text = "Plugin-hdbk", source = Original.PLUGIN)
public Object run(Object[] args) {
if (!PluginContexts.currentContext().isAvailable()) {
LogKit.error(I18nKit.getLocText("Plugin-hdbk_Expired"));
return Primitive.ERROR_VALUE;
}
if (args.length < 1) {
return Primitive.ERROR_VALUE;
}
try {
double z = Double.parseDouble(Utils.objectToString(args[0]));
NormalDistribution normalDistributioin = new NormalDistribution(0, 1);
double result = normalDistributioin.cumulativeProbability(z);
result = new BigDecimal(result).setScale(9, BigDecimal.ROUND_HALF_UP).doubleValue();
return result;
} catch (Exception e) {
LogKit.error(e.getMessage(), e);
return Primitive.ERROR_VALUE;
}
}
@Override
public Type getType() {
return OTHER;
}
}

3
src/main/resources/com/fr/plugin/hdbk/locale/lang.properties

@ -0,0 +1,3 @@
Plugin-hdbk=NORMSDIST Plugin
Plugin-hdbk_function_description=NORMSDIST
Plugin-hdbk_Expired=NORMSDIST Plugin Expired!

3
src/main/resources/com/fr/plugin/hdbk/locale/lang_en_US.properties

@ -0,0 +1,3 @@
Plugin-hdbk=NORMSDIST Plugin
Plugin-hdbk_function_description=NORMSDIST
Plugin-hdbk_Expired=NORMSDIST Plugin Expired!

3
src/main/resources/com/fr/plugin/hdbk/locale/lang_zh_CN.properties

@ -0,0 +1,3 @@
Plugin-hdbk=\u6B63\u6001\u7D2F\u8BA1\u5206\u5E03\u51FD\u6570\u63D2\u4EF6
Plugin-hdbk_function_description=\u6B63\u6001\u7D2F\u8BA1\u5206\u5E03\u51FD\u6570
Plugin-hdbk_Expired=\u6B63\u6001\u7D2F\u8BA1\u5206\u5E03\u51FD\u6570\u63D2\u4EF6\u8BB8\u53EF\u5931\u6548\uFF01

82
正态累计函数示例.cpt

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<WorkBook xmlVersion="20170720" releaseVersion="10.0.0">
<Report class="com.fr.report.worksheet.WorkSheet" name="sheet1">
<ReportPageAttr>
<HR/>
<FR/>
<HC/>
<FC/>
</ReportPageAttr>
<ColumnPrivilegeControl/>
<RowPrivilegeControl/>
<RowHeight defaultValue="723900">
<![CDATA[975360,975360,723900,723900,723900,723900,723900,723900,723900,723900,723900]]></RowHeight>
<ColumnWidth defaultValue="2743200">
<![CDATA[5394960,5181600,2743200,2743200,2743200,2743200,2743200,2743200,2743200,2743200,2743200]]></ColumnWidth>
<CellElementList>
<C c="0" r="0">
<O>
<![CDATA[正态累计函数示例1:]]></O>
<PrivilegeControl/>
<Expand/>
</C>
<C c="1" r="0">
<O t="XMLable" class="com.fr.base.Formula">
<Attributes>
<![CDATA[=NORMSDIST(1.333333)]]></Attributes>
</O>
<PrivilegeControl/>
<Expand/>
</C>
<C c="0" r="1">
<O>
<![CDATA[正态累计函数示例2:]]></O>
<PrivilegeControl/>
<Expand/>
</C>
<C c="1" r="1">
<O t="XMLable" class="com.fr.base.Formula">
<Attributes>
<![CDATA[=NORMSDIST()]]></Attributes>
</O>
<PrivilegeControl/>
<Expand/>
</C>
<C c="0" r="2">
<O>
<![CDATA[正态累计函数示例3:]]></O>
<PrivilegeControl/>
<Expand/>
</C>
<C c="1" r="2">
<O t="XMLable" class="com.fr.base.Formula">
<Attributes>
<![CDATA[=NORMSDIST("ddd")]]></Attributes>
</O>
<PrivilegeControl/>
<Expand/>
</C>
</CellElementList>
<ReportAttrSet>
<ReportSettings headerHeight="0" footerHeight="0">
<PaperSetting/>
<Background name="ColorBackground" color="-1"/>
</ReportSettings>
</ReportAttrSet>
<PrivilegeControl/>
</Report>
<ReportParameterAttr>
<Attributes showWindow="true" delayPlaying="true" windowPosition="1" align="0" useParamsTemplate="true" currentIndex="0"/>
<PWTitle>
<![CDATA[参数]]></PWTitle>
</ReportParameterAttr>
<StyleList/>
<DesignerVersion DesignerVersion="KAA"/>
<PreviewType PreviewType="0"/>
<TemplateCloudInfoAttrMark class="com.fr.plugin.cloud.analytics.attr.TemplateInfoAttrMark" pluginID="com.fr.plugin.cloud.analytics.v10" plugin-version="2.2.0.20210728">
<TemplateCloudInfoAttrMark createTime="1629257915521"/>
</TemplateCloudInfoAttrMark>
<TemplateIdAttMark class="com.fr.base.iofile.attr.TemplateIdAttrMark">
<TemplateIdAttMark TemplateId="7e48d434-b822-473f-b3a8-27c6f120ab1f"/>
</TemplateIdAttMark>
</WorkBook>
Loading…
Cancel
Save