mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-09-20 07:25:54 +08:00
Fix 3.2.4 (#607)
* fix: 小数字段-格式 * enh: trim meta-name * fix: value of bslider * fix: file copy * fix: useValueOfVarRecord --------- Co-authored-by: RB <getrebuild@sina.com>
This commit is contained in:
parent
adc3adc646
commit
67943bfb9d
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.rebuild</groupId>
|
<groupId>com.rebuild</groupId>
|
||||||
<artifactId>rebuild</artifactId>
|
<artifactId>rebuild</artifactId>
|
||||||
<version>3.2.3</version>
|
<version>3.2.4</version>
|
||||||
<name>rebuild</name>
|
<name>rebuild</name>
|
||||||
<description>Building your business-systems freely!</description>
|
<description>Building your business-systems freely!</description>
|
||||||
<!-- UNCOMMENT USE TOMCAT -->
|
<!-- UNCOMMENT USE TOMCAT -->
|
||||||
|
|
|
@ -67,11 +67,11 @@ public class Application implements ApplicationListener<ApplicationStartedEvent>
|
||||||
/**
|
/**
|
||||||
* Rebuild Version
|
* Rebuild Version
|
||||||
*/
|
*/
|
||||||
public static final String VER = "3.2.3";
|
public static final String VER = "3.2.4";
|
||||||
/**
|
/**
|
||||||
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
|
* Rebuild Build [MAJOR]{1}[MINOR]{2}[PATCH]{2}[BUILD]{2}
|
||||||
*/
|
*/
|
||||||
public static final int BUILD = 3020308;
|
public static final int BUILD = 3020409;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Driver for DB
|
// Driver for DB
|
||||||
|
|
|
@ -56,6 +56,9 @@ public class Entity2Schema extends Field2Schema {
|
||||||
* @return Returns 实体名称
|
* @return Returns 实体名称
|
||||||
*/
|
*/
|
||||||
public String createEntity(String entityName, String entityLabel, String comments, String mainEntity, boolean haveNameField, boolean haveSeriesField) {
|
public String createEntity(String entityName, String entityLabel, String comments, String mainEntity, boolean haveNameField, boolean haveSeriesField) {
|
||||||
|
entityName = StringUtils.trim(entityName);
|
||||||
|
entityLabel = StringUtils.trim(entityLabel);
|
||||||
|
|
||||||
if (!License.isCommercial() && MetadataHelper.getEntities().length >= 100) {
|
if (!License.isCommercial() && MetadataHelper.getEntities().length >= 100) {
|
||||||
throw new NeedRbvException("实体数量超出免费版限制");
|
throw new NeedRbvException("实体数量超出免费版限制");
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,6 +98,9 @@ public class Field2Schema extends SetUser {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String createField(Entity entity, String fieldLabel, String fieldName, DisplayType type, String comments, String refEntity, JSON extConfig) {
|
public String createField(Entity entity, String fieldLabel, String fieldName, DisplayType type, String comments, String refEntity, JSON extConfig) {
|
||||||
|
fieldLabel = StringUtils.trim(fieldLabel);
|
||||||
|
fieldName = StringUtils.trim(fieldName);
|
||||||
|
|
||||||
if (StringUtils.length(fieldName) < 4) fieldName = toPinyinName(fieldLabel);
|
if (StringUtils.length(fieldName) < 4) fieldName = toPinyinName(fieldLabel);
|
||||||
|
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
|
|
|
@ -36,6 +36,7 @@ import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.commons.lang.math.NumberUtils;
|
import org.apache.commons.lang.math.NumberUtils;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -401,7 +402,7 @@ public class AdvFilterParser extends SetUser {
|
||||||
for (String s : value.split("\\|")) {
|
for (String s : value.split("\\|")) {
|
||||||
maskValue += ObjectUtils.toLong(s);
|
maskValue += ObjectUtils.toLong(s);
|
||||||
}
|
}
|
||||||
value = maskValue + "";
|
value = String.valueOf(maskValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -659,6 +660,8 @@ public class AdvFilterParser extends SetUser {
|
||||||
|
|
||||||
if (v instanceof Date) {
|
if (v instanceof Date) {
|
||||||
v = CalendarUtils.getUTCDateFormat().format(v);
|
v = CalendarUtils.getUTCDateFormat().format(v);
|
||||||
|
} else if (v instanceof BigDecimal) {
|
||||||
|
v = String.valueOf(((BigDecimal) v).doubleValue());
|
||||||
} else {
|
} else {
|
||||||
v = String.valueOf(v);
|
v = String.valueOf(v);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,14 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.BufferedOutputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileFilter;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.io.Reader;
|
||||||
|
import java.io.Writer;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -99,17 +106,10 @@ public class CompressUtils {
|
||||||
* @param source
|
* @param source
|
||||||
* @param dest
|
* @param dest
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
|
* @see FileUtils#copyFile(File, File) Bad on unix!
|
||||||
* @see IOUtils#copyLarge(Reader, Writer)
|
* @see IOUtils#copyLarge(Reader, Writer)
|
||||||
*/
|
*/
|
||||||
public static void copy(File source, File dest) throws IOException {
|
public static void copy(File source, File dest) throws IOException {
|
||||||
FileReader fr = new FileReader(source);
|
FileUtils.copyFile(source, dest);
|
||||||
FileWriter fw = new FileWriter(dest);
|
|
||||||
|
|
||||||
try {
|
|
||||||
IOUtils.copyLarge(fr, fw);
|
|
||||||
} finally {
|
|
||||||
IOUtils.closeQuietly(fr);
|
|
||||||
IOUtils.closeQuietly(fw);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,7 +190,7 @@
|
||||||
<div th:if="${fieldType == 'IMAGE' or fieldType == 'FILE'}" class="form-group row J_for-IMAGE J_for-FILE">
|
<div th:if="${fieldType == 'IMAGE' or fieldType == 'FILE'}" class="form-group row J_for-IMAGE J_for-FILE">
|
||||||
<label class="col-md-12 col-xl-3 col-lg-4 col-form-label text-lg-right">[[${bundle.L('允许上传数量')}]]</label>
|
<label class="col-md-12 col-xl-3 col-lg-4 col-form-label text-lg-right">[[${bundle.L('允许上传数量')}]]</label>
|
||||||
<div class="col-md-12 col-xl-6 col-lg-8 pt-1 pb-1">
|
<div class="col-md-12 col-xl-6 col-lg-8 pt-1 pb-1">
|
||||||
<input class="bslider border-0" id="uploadNumber" type="text" data-slider-min="0" data-slider-max="9" data-slider-value="[0,9]" data-slider-step="1" />
|
<input class="bslider form-control" id="uploadNumber" type="text" data-slider-min="0" data-slider-max="9" data-slider-value="[0,9]" data-slider-step="1" />
|
||||||
<div class="form-text J_minmax" th:utext="${bundle.L('最少上传 **0** 个,最多上传 **9** 个')}"></div>
|
<div class="form-text J_minmax" th:utext="${bundle.L('最少上传 **0** 个,最多上传 **9** 个')}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -250,3 +250,13 @@ select.underline-sm {
|
||||||
select.underline-sm:focus {
|
select.underline-sm:focus {
|
||||||
border-color: #4285f4;
|
border-color: #4285f4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bslider.form-control {
|
||||||
|
border: 0 none;
|
||||||
|
padding: 0;
|
||||||
|
max-height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-text.J_minmax > b {
|
||||||
|
color: #222;
|
||||||
|
}
|
|
@ -90,6 +90,7 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
const extConfigNew = { ...extConfig, ...__gExtConfig }
|
const extConfigNew = { ...extConfig, ...__gExtConfig }
|
||||||
|
|
||||||
// 不同类型的配置
|
// 不同类型的配置
|
||||||
$(`.J_for-${dt} .form-control, .J_for-${dt} .custom-control-input`).each(function () {
|
$(`.J_for-${dt} .form-control, .J_for-${dt} .custom-control-input`).each(function () {
|
||||||
const k = $(this).attr('id')
|
const k = $(this).attr('id')
|
||||||
|
@ -141,7 +142,7 @@ $(document).ready(function () {
|
||||||
})
|
})
|
||||||
extConfigNew['tagList'] = items
|
extConfigNew['tagList'] = items
|
||||||
}
|
}
|
||||||
// 小数
|
// 小数-货币
|
||||||
if (dt === 'DECIMAL' && extConfigNew['decimalType'] === '¥') {
|
if (dt === 'DECIMAL' && extConfigNew['decimalType'] === '¥') {
|
||||||
extConfigNew['decimalType'] = $val('.J_decimalTypeFlag') || '¥'
|
extConfigNew['decimalType'] = $val('.J_decimalTypeFlag') || '¥'
|
||||||
}
|
}
|
||||||
|
@ -248,10 +249,8 @@ $(document).ready(function () {
|
||||||
_handleNumber(extConfig.calcFormula)
|
_handleNumber(extConfig.calcFormula)
|
||||||
|
|
||||||
if (dt === 'DECIMAL') {
|
if (dt === 'DECIMAL') {
|
||||||
if (extConfig.decimalType === '%') {
|
if (!extConfig.decimalType || extConfig.decimalType === 0 || extConfig.decimalType === '0' || extConfig.decimalType === '%') {
|
||||||
// 百分比
|
// 数字、百分比
|
||||||
} else if (!extConfig.decimalType || extConfig.decimalType === 0) {
|
|
||||||
// 数字
|
|
||||||
} else {
|
} else {
|
||||||
$('input[name="decimalType"]:eq(2)').attr('checked', true)
|
$('input[name="decimalType"]:eq(2)').attr('checked', true)
|
||||||
$('.J_decimalTypeFlag').val(extConfig.decimalType)
|
$('.J_decimalTypeFlag').val(extConfig.decimalType)
|
||||||
|
|
Loading…
Reference in a new issue