JRT性能演示

演示视频

君生我未生,我生君已老,这里是java信创频道JRT,真信创-不糊弄。

基础架构决定上层建筑,和给有些品种的植物种植一样,品种不对,施肥浇水再多,也是不可能长成参天大树的。JRT吸收了各方优点,在1.9G内存下服务器运行数据库和Web,业务数据有170多万的情况下查询年报能跑到1秒以内。

Spring+Radis+maven还有什么说的吗?用实际行动证明JRT方案的可行性,不光开发速度快、部署简单、依赖少、占用资源少、连性能也要击败他。java圈子还不如C#的好,C#起码造轮子没人反驳,java里面不用Spring就是异类,连设计框架的勇气都没有。

满满的特色脚本代码

java 复制代码
import JRT.Core.Dto.CmdDto;
import JRT.Core.Dto.OutValue;
import JRT.Core.Util.LogUtils;
import JRT.Core.Util.MakeCmdUtil;
import JRT.Model.Bussiness.Parameters;
import JRTBLLBase.BaseHttpHandlerMachine;
import JRTBLLBase.Helper;

import java.util.ArrayList;
import java.util.List;

/**
 * 希森美康XN9000仪器接口,批量插入数据
 */
public class miXN9000Lot extends BaseHttpHandlerMachine {
    /**
     * 流水号
     */
    private static String dataEpis = "";

    /**
     * 数据的日期
     */
    private static int date = Helper.GetNowDate();

    /**
     * 数据的时间
     */
    private static int time = Helper.GetNowTime();

    /**
     * 缓存结果
     */
    private static String result = "";

    /**
     * 保存仪器数据
     *
     * @param Param   参数
     * @param Session
     * @param Output
     * @return
     * @throws Exception
     */
    public String SaveData(Parameters Param, OutValue Session, OutValue Output) throws Exception {
        String mi = Param.P0;
        String data = Param.P1;
        String epis = Param.P2;
        String fileName = Param.P3;
        String DBColName = Param.P4;
        Trace(mi, data, "M->H");
        //读取文件到第几行数据
        int index = Helper.ValidParam(Param.P5, -1);
        //返回的数据
        List<CmdDto> cmdList = new ArrayList<>();
        try {
            String[] arr = data.split(",");
            //第一行解析流水号和结果日期时间
            if (arr[0].equals("0")) {
                String dateStr = arr[1];
                date = Helper.DateToInt(dateStr);
                String timeStr = arr[2];
                time = Helper.TimeToInt(timeStr);
                dataEpis = arr[3];
                result = "";
            }
            //解析结果
            else if (arr[0].equals("1")) {
                String chl = arr[1];
                String res = arr[3];
                result += chl + "\\" + res + ",";
            }
            //解析图片
            else if (arr[0].equals("3")) {
                String imgClass = arr[2];
                String imgPath = arr[3];
                //取图
                MakeCmdUtil.AddGetImageCmd(cmdList, dataEpis, imgClass, imgPath, "");
                //删图
                //MakeCmdUtil.AddRMCmd(cmdList,imgPath);
            }
            //最后一行保存结果
            if (index == -1 && !dataEpis.isEmpty()) {
                Trace(mi, result, "解析结果");
                //循环生成几年的数据
                List<Integer> dateList=Helper.GetDatesBetween(20100101,20120101);
                for(Integer day:dateList) {
                    //处理数据
                    Helper.GetBllMethodData("mi.miBase", "SaveResult", mi, dataEpis, result, day, time);
                }
            }
            Trace(mi, "解析完成", "M->H");
        } catch (Exception ex) {
            LogUtils.WriteExceptionLog("解析XN9000仪器结果发生错误", ex);
        }
        return Helper.Object2Json(cmdList);
    }

    /**
     * 得到文件服务地址供接口上传图片
     *
     * @param Param
     * @param Session
     * @param Output
     * @return
     * @throws Exception
     */
    public String GetFileService(Parameters Param, OutValue Session, OutValue Output) throws Exception {
        String mi = Param.P0;
        String path = (String) Helper.GetBllMethodData("mi.miBase", "GetFileService", mi);
        //返回文件服务路径
        return path;
    }

    /**
     * 保存文件到数据库
     *
     * @param Param
     * @param Session
     * @param Output
     * @return
     * @throws Exception
     */
    public String SaveImage(Parameters Param, OutValue Session, OutValue Output) throws Exception {
        String mi = Param.P0;
        String epis = Param.P1;
        String ImageClass = Param.P2;
        String fileName = Param.P3;
        String fullName = Param.P4;
        String caption = "";
        String displayRatio = "";
        String width = "";
        String height = "";
        String sequence = "";
        Integer receiveDate = null;
        String ret = (String) Helper.GetBllMethodData("mi.miBase", "SaveImage", mi, epis, ImageClass, "", fileName, null, caption, displayRatio, width, height, sequence);
        return ret;
    }

    /**
     * 查询要上传的指令
     *
     * @param Param
     * @param Session
     * @param Output
     * @return
     * @throws Exception
     */
    public String QryUpdata(Parameters Param, OutValue Session, OutValue Output) throws Exception {
        String mi = Param.P0;
        //先写Log测试
        LogUtils.WriteDebugLog("mi:" + mi + ",调用上传查询");
        //返回的数据
        List<CmdDto> cmdList = new ArrayList<>();
        return Helper.Object2Json(cmdList);
    }

    /**
     * 设置上传指令执行状态
     *
     * @param Param
     * @param Session
     * @param Output
     * @return
     * @throws Exception
     */
    public String SetQryStatus(Parameters Param, OutValue Session, OutValue Output) throws Exception {
        String mi = Param.P0;
        String setStatusKey = Param.P1;
        //先写Log测试
        LogUtils.WriteDebugLog("mi:" + mi + ",setStatusKey:" + setStatusKey + "设置状态");
        return "";
    }


}
相关推荐
钱栈up4 分钟前
电脑卡死7分钟,日志断在13:56:03:一次Windows硬挂死的根因复盘
windows
钱栈up20 分钟前
扫完 3.5 万文件后,我发现了 521 组散落的同名文件
爬虫·python·数据分析
黄权光20 分钟前
AI智能体项目实战记录(01):开发环境搭建之conda的安装与配置
python
Wokoo721 分钟前
Selenium 核心 API 解析(三)
python·功能测试·selenium
在世修行32 分钟前
智学文枢:技术选型
python·技术选型
程序喵大人38 分钟前
【C++入门】编译链接模型 - 07 链接器怎样把符号对上号
开发语言·c++·编译器·编译链接·链接器
用户83562907805139 分钟前
如何使用 Python 将 PDF 转换为 PPTX 文件
后端·python
微三云 - 廖会灵 (私域系统开发)1 小时前
供应链系统实战:多渠道订单聚合与分布式库存一致性方案总结
开发语言·分布式·php
学逆向的1 小时前
C 数据溢出与精度丢失
c语言·开发语言·网络安全
我命由我123451 小时前
Function Calling 模型
人工智能·python·学习·ai·学习方法·ai编程·ai写作