18.编号生成的大致规则

集装箱编号校验码规则(JavaScript版本) 最近需要用到校验集装箱号是正确,网上搜了搜箱号的校验规则,写了份demo 贴上具体的计算方法, 参考点这里 懒的点的可以看我复制粘贴然后整理的的部分 一、箱号编码的构成 标准集装箱箱号由11位编码组成,包括三个部分: 1、第一部分由4位英文字母组成。 2、第二部分由6位数字组成。 3、第三部分为校验码(Check Digit)由前4位字母和6位数字经过校验规则运算得到,用于识别在校验时是否发生... 阅读详情

规则:

  • 1.code = InsertCodeUtil.getIncrSerial(字母所写+ORG+租户id+"-"+组织id);
    注:根据key获取Redis自增流水
  • 2.如果code是"0001"
    count = 当前租户+组织下数据的条数
    code = InsertCodeUtil.getIncrSerial(字母所写+ORG+租户id+"-"+组织id,count);
  • 3.dateCode = 字母缩写+当前时间(yyyyMMdd)
  • 4.code = dateCode + code

代码:

String code = InsertCodeUtil.getIncrSerial(BusinessConstant.ZF+CommonConstant.ORG+user.getTenantId()+"_"+couponAbandonSaveVO.getMarketingOrganizationId());
if (CommonConstant.CODE.equals(code)) {
    MutipleCondition where = new MutipleCondition();
    where.add(new SingleCondition().setField(CouponAbandonDao.tenantId).setOperator(CompareOperator.EQUAL).setIntegers(user.getTenantId()));
    where.add(new SingleCondition().setField(CouponAbandonDao.marketingOrganizationId).setOperator(CompareOperator.IS_NULL));
    Long count = couponAbandonDao.count(where);
    code = InsertCodeUtil.getIncrSerial(BusinessConstant.ZF+CommonConstant.TENANT+user.getTenantId()+"_"+couponAbandonSaveVO.getMarketingOrganizationId(), count);
}
String dateCode = commonService.createCode(BusinessConstant.ZF);
code = dateCode+code;
couponAbandon.setCode(code);

//生成券码的方法

    public String createCode(String type) {
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
        String date = LocalDateTime.now().format(formatter);
        return type+date;
    }
[工作表控件18] 自动编号控件:业务单据流水号生成实战指南 摘要:明道云工作表的自动编号控件能高效生成统一格式的业务单据流水号,支持前缀、字段引用、时间格式、周期重置等配置。本文详解其功能与配置方法,提供组合编号实例(如RK-武汉仓-20201010001),并介绍编号重置策略。同时指出常见问题(如编号缺失、并发重复)及解决方案,建议通过调整起始值、批量填充或工作流处理。最后给出优化建议,帮助用户规避风险,确保业务单据编号的连续性与准确性。 阅读详情

相关推荐

麒麟V10 ARM环境离线部署MySQL:从依赖缺失到服务自启的完整避坑指南

本文详细介绍了在麒麟V10 ARM环境下离线部署MySQL的完整流程,包括依赖缺失解决方案、目录配置、服务自启设置及性能调优。特别针对国产操作系统和ARM架构的兼容性问题,提供了实用的避坑指南和优化建议,帮助用户高效完成MySQL部署与维护。

weixin_28741413的博客 409

日期时间代码规范

说明:日期格式化时,yyyy 表示当天所在的年,而大写的 YYYY 代表是 week in which year(JDK7 之后 引入的概念),意思是当天所在的周属于的年份,一周从周日开始,周六结束,只要本周跨年,返回的 YYYY 就是下一年。@DateTimeFormat是Spring的注解,作用是限制前端传入的时间格式,如果格式不匹配,则会抛出异常,可以理解成一种格式限制,不加该注解,Spring也会将前端传入的时间字符串解析成Date类型。缺省的该属性的值为空,也就是不进行特殊的格式化。

weixin_39621391的博客 2667

Qt5开发从入门到精通——第一篇概述

Qt是一个跨平台的C++图形用户界面应用程序框架。它为应用程序开发者提供建立艺术级图形用户界面所需的所有功能。它是完全面向对象的,很容易扩展,并且允许真正的组件编程。在Qt程序开发过程中,除可以通过手写代码实现软件开发功能外,还可以通过Qt的GUI界面设计器(QtDesigner)进行界面的绘制和布局。该工具提供了Qt的基本可绘制窗口部件,如QWidget、QLabel、QPushButton和QVBoxLayout等。•对象查看器•属性编辑器。.........

weixin_44759598的博客 9509

干货 | 最完整的元器件批次详细图解

什么是批次 LOT CODE又叫LOT No.,LOT No.是lot number的缩写,是“批号”的意思。厂家为了可以追溯和审查该批元器件的生产历史,所以每一批产品都有相应的的生产号码。生产批号是同一批元器件的编号。它是用于识别“批”的一组数字或字母加数字。一般的,根据批号可以追踪产品的生产情况(生产日期、质量等级、出厂时间、产地等等)。现在大多数企业都逐渐把元器件的生产日期和生产批号统一化。不同的原厂给定的lot number 和 D/C形式各不一样。 产品丝印示例 ...

weixin_44367275的博客 1万+

IEEE ACCESS Please note that all author names should be listed in English.(所有作者名需用英文名列出)

很奇怪哈,我明明手稿和提交页面作者都是用的英文,但是为什么还是会提示我没用英文呢?后来给编辑发消息,回的很快,他给我发了一个截图,确实是出现中文,但是我还是不知道为啥会出现中文。直到晚上回寝室洗澡的时候忽然想起来了是不是orcid的原因,因为它会强制作者绑定一个orcid账号,而我的orcid账号的名字刚好是中文的。当然这个只是我的一个猜想,但是我觉得可能性很大。我的第二篇论文已经投稿了快三个月了,效果非常的不好,所以我打算转投IEEE ACCESS了,希望这里可以给我一点好的建议。

kuyecsl的博客 3310

matplotlib三维画图之观察博弈论混合策略下纳什均衡点

参考链接: 博弈论入门20讲之第16讲-猜谜游戏-散户如何赢庄家 游戏背景: 我的期望是: 你的期望是: 使用Python的matplotlib画图: import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = Axes3D(fig) X = np.linspace(0, 1, 100) Y = np.linspace(0, 1,

敲代码的小风 1258

自定义编码生成

1.创建一个表,用来维护编号规则,每个规则都有一个type,用来区分规则的使用场景,type唯一。3.编码规则包含时间,前缀,后缀,自增序列位数,分隔符等。1.需要多个编号规则,不同的场景使用的编码规则不同。2.编码需要可自定义灵活选择配置,序号按自增处理。防止redis服务重启后,含有到期时间的数据失效。2.使用redis,用来存储自增序数(常量类,放的表中的type。修改redis.conf。2.redis配置修改。

博客 3694

百度飞桨EasyDL图像分类:收费口车辆类型自动识别

车辆类型识别在高速收费路口的应用中,场景相对单一且拍摄角度一致,因此首次训练模型效果优异,准确率达到了95%,鉴于市面上的车辆类型不断更新迭代且部分车辆的主要特征也不断发生变化,因此可在模型投入应用后,持续收集模型实际运行过中产生的数据,定期添加数据进行模型迭代,保证模型效果。企业将AI模型应用到实际场景中以实现停车费用、过路费用的自动计算,在收费口中由相机对每个车辆进行拍摄,拍摄到的图片传输到预测设备上进行类型识别,基于识别出来的车辆类型自动进行费用计算。该功能可在发起训练时选选择对应的开关打开即可。..

PaddlePaddle 1672

Java生成一定规则递增编号

项目需求中有时需要生成一定规则递增编号。例如生成设备编号:设备类型+五位编号(从1开始,不够前补0),也就是 SYXH000001 / SYXH00002 / SDOI00001 类似这样。 那么如何处理 000001 自增1变为 000002 呢?

蜗牛老师,专注编程领域 4万+

CCS20实战入门:第一个工程搭建示例

通过实际操作演示如何在ccs20中创建并配置首个开发项目,涵盖环境设置与基础调试步骤,帮助新手快速上手ccs20集成开发环境,提升嵌入式开发效率。

weixin_31185473的博客 885

SAP 对接CBS(http方式)

CLEAR:lv_xml_crc32_string. CONCATENATEcrc32_passwordcrc32_keyi_stringINTOlv_xml_crc32_string. CONDENSElv_xml_crc32_string. CALLFUNCTION'SCMS_STRING_TO_XSTRING' EXPORTING text=lv_xml_crc32_string encoding='8400' "GB...

3598

Java自定义id或编号 生成规则

【代码】Java自定义id或编号 生成规则。

later_home的博客 1553

Davinci配置临界区Exclusive Area

在Exclusive Area专属区域内的代码段执行不会被中断,可以用于保护多个Runnable间的共享资源。Exclusive Area会对RTE的调度策略和配置进行约束。如果两个或多个Runnable指向同一个Exclusive Area,那么只有其中一个Runnable被允许在该Exclusive Area内执行。即这些Runnable在ExlcusiveArea内执行时不能并发运行(相互抢占)。:在完整执行期间,整个runnable都在临界区运行。:执行期间可以进入临界区。

qq_42851449的博客 506

正则表达式之18位身份证号,手机号,邮箱,日期

匹配18位身份证号,正则表达式如下: /^[1-9][0-9]{5}(19|20)[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|31)|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}([0-9]|x|X)$/ 说明:现在身份证号都已经是18位了,没必...

weixin_30919235的博客 481

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

python 随机生成建筑工程施工许可证编号,及其规律

模仿工程许可证编号 def get_project_license(area_code=None): """工程施工许可证""" project_code = { '01': '一般工业与民用建筑工程', '02': '冶金有色工业建筑安', '03': '煤炭工业建筑安装工程', '04': '石油工业建筑安装', '05': '化学工业建筑安装工程', '06': '电力工业建筑安装工',

Micheal的博客 681

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

微信\支付宝扫码条码区分规则

目前是根据开头前2位进行判断,目前规则是: 支付宝:25~30开头的长度为16~24位的数字。 例如:289431869362714645; 微信:18位纯数字,以10、11、12、13、14、15开头 。例如:135112298638468293 支付宝API接口页面: https://docs.open.alipay.com/api_1/alipay.trade.pay 微信开发文档页面:https://pay.weixin.qq.com/wiki/doc/api/micropay_sl.php?

weixin_43939924的博客 3987

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

身份证号码隐藏信息

身份证号码18位,小小一长串字符,隐藏的可以获取的信息却不少,做IT开发,信息读取,信息规则了解必不可少; 1、譬如:430281(前六位所在地区编码,第1-2位是省级编码,第3-4位是所在省的市级编码,第5、6位是所在市的县级编码或区级编码。所以一般在同一个县城的人,前6位是一模一样的); 2、19990101,第7-14 代表出生年月日; 3、第15-17这3个位数,是你出生当天,...

weixin_30920091的博客 1537

Runway Planning

题目: Description Most airports have multiple runways. To identify runways, they are given a number indicat- ing the direction of the runway. Such a runway number is obtained by dividing the heading of ...

xueyahao的博客 337

Java项目编号规则生成

我整理的一些关于【Java】的项目学习资料(附讲解~~)和大家一起分享、学习一下:https://d.51cto.com/f2PFnNJava项目编号规则生成 在软件开发中,为项目分配唯一的编号是非常重要的。这不仅可以帮助开发团队管理各个项目,还可以提高团队的协作效率。本文将介绍一种基于特定规则生成Java项目编号的方法...

weixin_36927099的博客 339

OCR识别内容编号规则:cv_resnet18_ocr-detection输出解析

本文介绍了基于“星图GPU”平台自动化部署cv_resnet18_ocr-detection OCR文字检测模型 构建by科哥镜像的方法,该模型支持在WebUI界面中实现零代码操作,适用于证件识别、文档扫描等场景的文本检测与结构化输出,便于快速开展AI应用开发与模型微调。

weixin_42453228的博客 844

中国公民身份证编号规则

这是一篇转发的文章,我对他进行了格式化而已,原文出处不详。 中国公民身份证编号规则一、身份证号码执行标准:18位身份证标准在国家质量技术监督局于1999年7月1日实施的GB11643-1999《公民身份号码》。 GB11643-1999《公民身份号码》为GB11643-1989《社会保障号码》的修订版,其中指出将原标准名称“社会保障号码”更名为“公民身份号码”,另外GB11643-1999《公民

yingms的专栏 2万+

1.6 图纸编号规则

图纸编号规则;

monian187的博客 1454

订单号的生成规则和不同生成策略-总结

订单号的不同生成策略-总结 一. 订单命名的几种规则 不重复:订单号的唯一行 安全性:订单编号中不要透露任何和公司有关的信息,不要使用流水号,容易暴露公司的运营情况 不要使用大规模随机码:随机编码可以满足安全性,但为了满足不重复性要费很大的力气。比如现在已经有了10万条订单,如果再新生成的订单,它的订单号需要与之前的10万条数据的订单号进行比较,结果可想而知。 防止并发 控制位数:一般在10~1...

厚积薄发 4万+

自己使用的订单号的生成规则

商城类的系统都需要生成订单号,订单号的生成规则各个都不一样 *自定义的自增编号 *日期(yyyyMMdd)+随机数(n位) *日期(yyyyMMdd)+userid+随机数(n位) 等等之类的,我做商城时也纠结这个订单号生成规则。所以简单记录下自己的订单号规则: 订单号必须是唯...

chunguo0066的博客 1425

树莓派插针定义快速理解:引脚编号规则图解

搞懂树莓派插针定义不再难,通过直观图解理清GPIO引脚编号规则,无论是物理引脚还是BCM编号都能快速对应,轻松应对各类硬件连接场景。

weixin_35755640的博客 766
上一篇: 将List集合导出为Excel
下一篇: 6.1 Zuul网关
cuichen97
博客等级 码龄7年 34粉丝 209原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值