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 "";
    }


}
相关推荐
程序猿炎义13 分钟前
【NVIDIA AIQ】自定义函数实践
人工智能·python·学习
THMAIL41 分钟前
深度学习从入门到精通 - BERT与预训练模型:NLP领域的核弹级技术详解
人工智能·python·深度学习·自然语言处理·性能优化·bert
中国胖子风清扬1 小时前
Rust 序列化技术全解析:从基础到实战
开发语言·c++·spring boot·vscode·后端·中间件·rust
我就是全世界1 小时前
【存储选型终极指南】RustFS vs MinIO:5大维度深度对决,95%技术团队的选择秘密!
开发语言·分布式·rust·存储
nuclear20111 小时前
Python 实现 Markdown 与 Word 高保真互转(含批量转换)
python·word转markdown·markdown转word·word转md·md转word
山烛1 小时前
深度学习:CNN 模型训练中的学习率调整(基于 PyTorch)
人工智能·pytorch·python·深度学习·cnn·调整学习率
yudiandian20142 小时前
【QT 5.12.12 打包-Windows 平台下】
开发语言·qt
要记得喝水2 小时前
C#某公司面试题(含题目和解析)--1
开发语言·windows·面试·c#·.net