fix bug
This commit is contained in:
@@ -57,8 +57,8 @@ import java.util.Objects;
|
||||
*/
|
||||
public class ImportFailureExcelUtil {
|
||||
|
||||
public static String formatErrorMessage(int rowNumber, List<String> validationErrors) {
|
||||
StringBuilder errorMessage = new StringBuilder("第").append(rowNumber).append("行:");
|
||||
public static String formatErrorMessage(List<String> validationErrors) {
|
||||
StringBuilder errorMessage = new StringBuilder();
|
||||
for (int index = 0; index < validationErrors.size(); index++) {
|
||||
if (index > 0) {
|
||||
errorMessage.append(System.lineSeparator());
|
||||
|
||||
Vendored
+40
@@ -31,6 +31,10 @@ import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.system.pojo.entity.Region;
|
||||
import org.springblade.system.feign.ISysClient;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
||||
|
||||
/**
|
||||
@@ -50,6 +54,8 @@ public class RegionCache {
|
||||
public static final int VILLAGE_LEVEL = 5;
|
||||
|
||||
private static final String REGION_CODE = "region:code:";
|
||||
private static final String REGION_TREE_CACHE = "region:tree";
|
||||
private static final String REGION_LAZY_TREE = "lazy-tree:";
|
||||
|
||||
private static ISysClient sysClient;
|
||||
|
||||
@@ -73,4 +79,38 @@ public class RegionCache {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行政区划懒加载树
|
||||
*
|
||||
* @param parentCode 父区划编号
|
||||
* @param param 查询参数
|
||||
* @param loader 数据加载器
|
||||
* @return 懒加载树
|
||||
*/
|
||||
public static List<Map<String, Object>> getLazyTree(
|
||||
String parentCode,
|
||||
Map<String, Object> param,
|
||||
Callable<List<Map<String, Object>>> loader) {
|
||||
Map<String, Object> query = param == null ? Map.of() : param;
|
||||
String cacheKey = String.join("|",
|
||||
cacheKeyPart(parentCode),
|
||||
cacheKeyPart(query.get("code")),
|
||||
cacheKeyPart(query.get("name")),
|
||||
cacheKeyPart(query.get("regionLevel"))
|
||||
);
|
||||
return CacheUtil.get(REGION_TREE_CACHE, REGION_LAZY_TREE, cacheKey, loader, Boolean.FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除行政区划懒加载树缓存
|
||||
*/
|
||||
public static void clearLazyTree() {
|
||||
CacheUtil.clear(REGION_TREE_CACHE, Boolean.FALSE);
|
||||
}
|
||||
|
||||
private static String cacheKeyPart(Object value) {
|
||||
String text = value == null ? "" : String.valueOf(value);
|
||||
return text.length() + ":" + text;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -88,6 +90,12 @@ public class Driver extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "详细地址")
|
||||
private String address;
|
||||
/**
|
||||
* 驾驶车辆车牌号
|
||||
*/
|
||||
@Schema(description = "驾驶车辆车牌号")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String drivingVehicle;
|
||||
/**
|
||||
* 岗位,多个使用逗号分隔
|
||||
*/
|
||||
|
||||
+3
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -108,6 +110,7 @@ public class MaintenanceRecord extends TenantEntity {
|
||||
* 里程/航程数
|
||||
*/
|
||||
@Schema(description = "里程/航程数")
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private BigDecimal mileage;
|
||||
/**
|
||||
* 里程单位
|
||||
|
||||
+8
@@ -22,6 +22,8 @@
|
||||
*/
|
||||
package org.springblade.transport.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -87,15 +89,18 @@ public class ProjectApply extends TenantEntity {
|
||||
private BigDecimal receivableLimit;
|
||||
|
||||
@Schema(description = "应收账款回款期限(天)")
|
||||
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Integer receivableDays;
|
||||
|
||||
@Schema(description = "回款账期(天)")
|
||||
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
|
||||
private Integer paymentDays;
|
||||
|
||||
@Schema(description = "货物类型")
|
||||
private String cargoType;
|
||||
|
||||
@Schema(description = "预估货物数量")
|
||||
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String cargoQuantity;
|
||||
|
||||
@Schema(description = "业务周期开始日期")
|
||||
@@ -114,12 +119,15 @@ public class ProjectApply extends TenantEntity {
|
||||
private String businessType;
|
||||
|
||||
@Schema(description = "项目规模(万元)")
|
||||
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
|
||||
private BigDecimal projectScale;
|
||||
|
||||
@Schema(description = "预计利润(万元)")
|
||||
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
|
||||
private BigDecimal estimatedProfit;
|
||||
|
||||
@Schema(description = "资金需求(万元)")
|
||||
@TableField(insertStrategy = FieldStrategy.ALWAYS, updateStrategy = FieldStrategy.ALWAYS)
|
||||
private BigDecimal fundDemand;
|
||||
|
||||
@Schema(description = "结算方式")
|
||||
|
||||
+10
-10
@@ -53,13 +53,13 @@ public class PortTerminalExcel implements Serializable {
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("*编码")
|
||||
@ExcelProperty("编码")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("*港口/码头名称")
|
||||
@ExcelProperty("港口/码头名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("*类型")
|
||||
@ExcelProperty("类型")
|
||||
private String category;
|
||||
|
||||
@ExcelProperty("上级港口")
|
||||
@@ -68,13 +68,13 @@ public class PortTerminalExcel implements Serializable {
|
||||
@ExcelProperty("上级港口编码")
|
||||
private String parentCode;
|
||||
|
||||
@ExcelProperty("*国家")
|
||||
@ExcelProperty("国家")
|
||||
private String country;
|
||||
|
||||
@ExcelProperty("*城市")
|
||||
@ExcelProperty("城市")
|
||||
private String city;
|
||||
|
||||
@ExcelProperty("*区县")
|
||||
@ExcelProperty("区县")
|
||||
private String districtName;
|
||||
|
||||
@ExcelProperty("行政区划编码")
|
||||
@@ -83,18 +83,18 @@ public class PortTerminalExcel implements Serializable {
|
||||
@ExcelProperty("详细地址")
|
||||
private String detailAddress;
|
||||
|
||||
@ExcelProperty("*经度")
|
||||
@ExcelProperty("经度")
|
||||
@NumberFormat("0.000000")
|
||||
private BigDecimal longitude;
|
||||
|
||||
@ExcelProperty("*纬度")
|
||||
@ExcelProperty("纬度")
|
||||
@NumberFormat("0.000000")
|
||||
private BigDecimal latitude;
|
||||
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("启停状态")
|
||||
private String statusName;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
|
||||
+4
-4
@@ -142,7 +142,7 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
||||
normalizeImportAirportMaster(airportMaster);
|
||||
List<String> validationErrors = validateImportAirportMaster(airportMaster, iataCodeCountMap, icaoCodeCountMap);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(formatImportErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(formatImportErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
||||
airportMasterList.add(airportMaster);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(formatImportErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(formatImportErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
@@ -295,8 +295,8 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
||||
}
|
||||
}
|
||||
|
||||
private String formatImportErrorMessage(int rowNumber, List<String> validationErrors) {
|
||||
StringBuilder errorMessage = new StringBuilder("第").append(rowNumber).append("行:");
|
||||
private String formatImportErrorMessage(List<String> validationErrors) {
|
||||
StringBuilder errorMessage = new StringBuilder();
|
||||
for (int index = 0; index < validationErrors.size(); index++) {
|
||||
if (index > 0) {
|
||||
errorMessage.append(System.lineSeparator());
|
||||
|
||||
+1
-1
@@ -149,7 +149,7 @@ public class CargoTypeServiceImpl extends BaseServiceImpl<CargoTypeMapper, Cargo
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(message);
|
||||
failureList.add(toImportFailureExcel(excel, "第" + (index + 2) + "行:" + message));
|
||||
failureList.add(toImportFailureExcel(excel, message));
|
||||
}
|
||||
}
|
||||
return failureList;
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ public class FeeItemServiceImpl extends BaseServiceImpl<FeeItemMapper, FeeItem>
|
||||
save(feeItem);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
failureList.add(toImportFailureExcel(excel, "第" + (index + 2) + "行:" + message));
|
||||
failureList.add(toImportFailureExcel(excel, message));
|
||||
}
|
||||
}
|
||||
return failureList;
|
||||
|
||||
+4
-4
@@ -149,7 +149,7 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
||||
normalizeImportPortTerminal(portTerminal);
|
||||
List<String> validationErrors = validateImportPortTerminal(portTerminal, codeCountMap);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(formatImportErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(formatImportErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
||||
portTerminalList.add(portTerminal);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(formatImportErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(formatImportErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
@@ -175,8 +175,8 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
||||
return errorList;
|
||||
}
|
||||
|
||||
private String formatImportErrorMessage(int rowNumber, List<String> validationErrors) {
|
||||
StringBuilder errorMessage = new StringBuilder("第").append(rowNumber).append("行:");
|
||||
private String formatImportErrorMessage(List<String> validationErrors) {
|
||||
StringBuilder errorMessage = new StringBuilder();
|
||||
for (int index = 0; index < validationErrors.size(); index++) {
|
||||
if (index > 0) {
|
||||
errorMessage.append(System.lineSeparator());
|
||||
|
||||
+4
-4
@@ -148,7 +148,7 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
||||
normalizeImportRailwayStation(railwayStation);
|
||||
validationErrors.addAll(validateImportRailwayStation(railwayStation, tmisCodeCountMap, telegraphCodeCountMap));
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(formatImportErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(formatImportErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
||||
railwayStationList.add(railwayStation);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(formatImportErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(formatImportErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
@@ -312,8 +312,8 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
||||
}
|
||||
}
|
||||
|
||||
private String formatImportErrorMessage(int rowNumber, List<String> validationErrors) {
|
||||
StringBuilder errorMessage = new StringBuilder("第").append(rowNumber).append("行:");
|
||||
private String formatImportErrorMessage(List<String> validationErrors) {
|
||||
StringBuilder errorMessage = new StringBuilder();
|
||||
for (int index = 0; index < validationErrors.size(); index++) {
|
||||
if (index > 0) {
|
||||
errorMessage.append(System.lineSeparator());
|
||||
|
||||
+17
-5
@@ -106,7 +106,11 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
||||
region.setVillageCode(code);
|
||||
region.setVillageName(name);
|
||||
}
|
||||
return StringUtil.isNotBlank(region.getOriginalCode()) ? this.updateById(region) : this.save(region);
|
||||
boolean result = StringUtil.isNotBlank(region.getOriginalCode()) ? this.updateById(region) : this.save(region);
|
||||
if (result) {
|
||||
clearLazyTree();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private void validateUniqueCode(Region region) {
|
||||
@@ -130,7 +134,11 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
||||
if (cnt > 0L) {
|
||||
throw new ServiceException("请先删除子节点!");
|
||||
}
|
||||
return removeById(id);
|
||||
boolean result = removeById(id);
|
||||
if (result) {
|
||||
clearLazyTree();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,7 +148,7 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> lazyTree(String parentCode, Map<String, Object> param) {
|
||||
return baseMapper.lazyTree(parentCode, param);
|
||||
return getLazyTree(parentCode, param, () -> baseMapper.lazyTree(parentCode, param));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -149,20 +157,24 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
||||
throw new ServiceException("导入数据不能为空");
|
||||
}
|
||||
List<RegionExcel> errorList = new ArrayList<>();
|
||||
boolean cacheChanged = false;
|
||||
for (int index = 0; index < data.size(); index++) {
|
||||
RegionExcel excel = data.get(index);
|
||||
try {
|
||||
Region region = BeanUtil.copyProperties(excel, Region.class);
|
||||
if (Boolean.TRUE.equals(isCovered)) {
|
||||
this.saveOrUpdate(region);
|
||||
cacheChanged = this.saveOrUpdate(region) || cacheChanged;
|
||||
} else {
|
||||
this.save(region);
|
||||
cacheChanged = this.save(region) || cacheChanged;
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
excel.setErrorMessage(exception.getMessage());
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
if (cacheChanged) {
|
||||
clearLazyTree();
|
||||
}
|
||||
return errorList;
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -74,6 +74,9 @@ public class DriverExcel implements Serializable {
|
||||
@ExcelProperty("住址")
|
||||
private String address;
|
||||
|
||||
@ExcelProperty("驾驶车辆")
|
||||
private String drivingVehicle;
|
||||
|
||||
@ExcelProperty("岗位 *")
|
||||
private String posts;
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ public class OilElectricRecordExcel implements Serializable {
|
||||
@ExcelIgnore
|
||||
private Long id;
|
||||
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("卡号")
|
||||
private String cardNo;
|
||||
|
||||
@ExcelProperty("*交易时间")
|
||||
|
||||
+2
@@ -20,6 +20,7 @@
|
||||
<result column="education" property="education"/>
|
||||
<result column="address_region" property="addressRegion"/>
|
||||
<result column="address" property="address"/>
|
||||
<result column="driving_vehicle" property="drivingVehicle"/>
|
||||
<result column="posts" property="posts"/>
|
||||
<result column="id_card_front" property="idCardFront"/>
|
||||
<result column="id_card_back" property="idCardBack"/>
|
||||
@@ -64,6 +65,7 @@
|
||||
education,
|
||||
address_region,
|
||||
address,
|
||||
driving_vehicle,
|
||||
posts,
|
||||
id_card_front,
|
||||
id_card_back,
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@
|
||||
contact,
|
||||
address,
|
||||
factory_time,
|
||||
CASE WHEN mileage < 0 THEN 0 ELSE mileage END AS mileage,
|
||||
CASE WHEN mileage = -1 THEN NULL WHEN mileage < 0 THEN 0 ELSE mileage END AS mileage,
|
||||
mileage_unit,
|
||||
attachments,
|
||||
remark
|
||||
|
||||
+2
-2
@@ -97,7 +97,7 @@ public class AccidentRecordServiceImpl extends BaseServiceImpl<AccidentRecordMap
|
||||
prepare(accidentRecord);
|
||||
List<String> validationErrors = validateImportAccidentRecord(accidentRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public class AccidentRecordServiceImpl extends BaseServiceImpl<AccidentRecordMap
|
||||
accidentRecordList.add(accidentRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -96,7 +96,7 @@ public class AnnualInspectionRecordServiceImpl extends BaseServiceImpl<AnnualIns
|
||||
prepare(annualInspectionRecord);
|
||||
List<String> validationErrors = validateImportAnnualInspectionRecord(annualInspectionRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class AnnualInspectionRecordServiceImpl extends BaseServiceImpl<AnnualIns
|
||||
annualInspectionRecordList.add(annualInspectionRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -455,10 +455,10 @@ public class ContractManageServiceImpl extends BaseServiceImpl<ContractManageMap
|
||||
}
|
||||
|
||||
private void normalizeOptionalIntegerFields(ContractManage contractManage) {
|
||||
if (contractManage.getCopyCount() != null && contractManage.getCopyCount() < 0) {
|
||||
if (contractManage.getCopyCount() != null && contractManage.getCopyCount() <= 0) {
|
||||
contractManage.setCopyCount(null);
|
||||
}
|
||||
if (contractManage.getPaymentDays() != null && contractManage.getPaymentDays() < 0) {
|
||||
if (contractManage.getPaymentDays() != null && contractManage.getPaymentDays() <= 0) {
|
||||
contractManage.setPaymentDays(null);
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -55,6 +55,7 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
private static final int NAME_MAX_LENGTH = 10;
|
||||
private static final int ID_CARD_MAX_LENGTH = 18;
|
||||
private static final int MOBILE_MAX_LENGTH = 20;
|
||||
private static final int VEHICLE_NO_MAX_LENGTH = 30;
|
||||
private static final int SHORT_TEXT_MAX_LENGTH = 50;
|
||||
private static final int ADDRESS_MAX_LENGTH = 200;
|
||||
private static final int REMARK_MAX_LENGTH = 200;
|
||||
@@ -132,6 +133,8 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
driver.setEducation(trimToNull(driver.getEducation()));
|
||||
driver.setAddressRegion(trimToNull(driver.getAddressRegion()));
|
||||
driver.setAddress(trimToNull(driver.getAddress()));
|
||||
String drivingVehicle = trimToNull(driver.getDrivingVehicle());
|
||||
driver.setDrivingVehicle(drivingVehicle == null ? null : drivingVehicle.toUpperCase());
|
||||
driver.setPosts(trimToNull(driver.getPosts()));
|
||||
driver.setDrivingType(trimToEmpty(driver.getDrivingType()).toUpperCase());
|
||||
driver.setDrivingLicenseNo(trimToNull(driver.getDrivingLicenseNo()));
|
||||
@@ -224,6 +227,7 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
validateLength(driver.getIdCardNo(), ID_CARD_MAX_LENGTH, "身份证号不能超过18字");
|
||||
validateLength(driver.getMobile(), MOBILE_MAX_LENGTH, "手机号不能超过20字");
|
||||
validateLength(driver.getEmergencyContactMobile(), MOBILE_MAX_LENGTH, "紧急联系人手机号不能超过20字");
|
||||
validateLength(driver.getDrivingVehicle(), VEHICLE_NO_MAX_LENGTH, "驾驶车辆不能超过30字");
|
||||
validateLength(driver.getDrivingLicenseNo(), SHORT_TEXT_MAX_LENGTH, "驾驶证档案编号不能超过50字");
|
||||
validateLength(driver.getQualificationNo(), SHORT_TEXT_MAX_LENGTH, "资格证号不能超过50字");
|
||||
validateLength(driver.getOrganizationName(), SHORT_TEXT_MAX_LENGTH, "所属组织不能超过50字");
|
||||
|
||||
+2
-2
@@ -84,7 +84,7 @@ public class EquipmentLedgerServiceImpl extends BaseServiceImpl<EquipmentLedgerM
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.addValidationError(validationErrors,
|
||||
!importEquipmentCodes.add(equipmentLedger.getEquipmentCode()), "设备编号在本次导入中重复");
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ public class EquipmentLedgerServiceImpl extends BaseServiceImpl<EquipmentLedgerM
|
||||
equipmentLedgerList.add(equipmentLedger);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -73,14 +73,14 @@ public class EtcRecordServiceImpl extends BaseServiceImpl<EtcRecordMapper, EtcRe
|
||||
prepare(etcRecord);
|
||||
List<String> validationErrors = validateImportEtcRecord(etcRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
etcRecordList.add(etcRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -125,7 +125,7 @@ public class InsuranceRecordServiceImpl extends BaseServiceImpl<InsuranceRecordM
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.addValidationError(validationErrors, !importPolicyKeys.add(policyKey), "同一车船类型和保险类型下保单号在本次导入中重复");
|
||||
}
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class InsuranceRecordServiceImpl extends BaseServiceImpl<InsuranceRecordM
|
||||
insuranceRecordList.add(insuranceRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -90,14 +90,14 @@ public class MaintenancePlanServiceImpl extends BaseServiceImpl<MaintenancePlanM
|
||||
prepare(maintenancePlan);
|
||||
List<String> validationErrors = validateImportMaintenancePlan(maintenancePlan);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
maintenancePlanList.add(maintenancePlan);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+9
-3
@@ -61,6 +61,7 @@ public class MaintenanceRecordServiceImpl extends BaseServiceImpl<MaintenanceRec
|
||||
private static final int REPLACED_PART_MAX_LENGTH = 200;
|
||||
private static final int ADDRESS_MAX_LENGTH = 100;
|
||||
private static final int REMARK_MAX_LENGTH = 500;
|
||||
private static final BigDecimal EMPTY_MILEAGE_SENTINEL = BigDecimal.valueOf(-1);
|
||||
|
||||
@Override
|
||||
public IPage<MaintenanceRecordVO> selectMaintenanceRecordPage(IPage<MaintenanceRecordVO> page, MaintenanceRecordVO maintenanceRecord) {
|
||||
@@ -94,14 +95,14 @@ public class MaintenanceRecordServiceImpl extends BaseServiceImpl<MaintenanceRec
|
||||
prepare(maintenanceRecord);
|
||||
List<String> validationErrors = validateImportMaintenanceRecord(maintenanceRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
maintenanceRecordList.add(maintenanceRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
@@ -141,7 +142,7 @@ public class MaintenanceRecordServiceImpl extends BaseServiceImpl<MaintenanceRec
|
||||
return list(queryWrapper).stream().map(maintenanceRecord -> {
|
||||
MaintenanceRecordExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(maintenanceRecord, MaintenanceRecordExportExcel.class));
|
||||
excel.setCost(scaleAmount(maintenanceRecord.getCost()));
|
||||
excel.setMileage(scaleAmount(nonNegative(maintenanceRecord.getMileage())));
|
||||
excel.setMileage(scaleAmount(nonNegative(normalizeMileage(maintenanceRecord.getMileage()))));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(maintenanceRecord.getUpdateUser()));
|
||||
if (Func.isEmpty(excel.getMileageUnit())) {
|
||||
excel.setMileageUnit(defaultMileageUnit(maintenanceRecord.getVehicleType()));
|
||||
@@ -159,6 +160,7 @@ public class MaintenanceRecordServiceImpl extends BaseServiceImpl<MaintenanceRec
|
||||
maintenanceRecord.setCompany(trimToNull(maintenanceRecord.getCompany()));
|
||||
maintenanceRecord.setContact(trimToNull(maintenanceRecord.getContact()));
|
||||
maintenanceRecord.setAddress(trimToNull(maintenanceRecord.getAddress()));
|
||||
maintenanceRecord.setMileage(normalizeMileage(maintenanceRecord.getMileage()));
|
||||
maintenanceRecord.setRemark(trimToNull(maintenanceRecord.getRemark()));
|
||||
if (Func.isEmpty(maintenanceRecord.getMileageUnit())) {
|
||||
maintenanceRecord.setMileageUnit(defaultMileageUnit(maintenanceRecord.getVehicleType()));
|
||||
@@ -213,6 +215,10 @@ public class MaintenanceRecordServiceImpl extends BaseServiceImpl<MaintenanceRec
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
|
||||
private BigDecimal normalizeMileage(BigDecimal mileage) {
|
||||
return Func.isNotEmpty(mileage) && mileage.compareTo(EMPTY_MILEAGE_SENTINEL) == 0 ? null : mileage;
|
||||
}
|
||||
|
||||
private BigDecimal scaleAmount(BigDecimal value) {
|
||||
return Func.isEmpty(value) ? null : value.setScale(2, RoundingMode.HALF_UP);
|
||||
}
|
||||
|
||||
+2
-2
@@ -92,7 +92,7 @@ public class MileageRecordServiceImpl extends BaseServiceImpl<MileageRecordMappe
|
||||
prepare(mileageRecord);
|
||||
List<String> validationErrors = validateImportMileageRecord(mileageRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class MileageRecordServiceImpl extends BaseServiceImpl<MileageRecordMappe
|
||||
mileageRecordList.add(mileageRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -78,18 +78,18 @@ public class OilElectricRecordServiceImpl extends BaseServiceImpl<OilElectricRec
|
||||
OilElectricRecordExcel excel = data.get(index);
|
||||
try {
|
||||
OilElectricRecord oilElectricRecord = Objects.requireNonNull(BeanUtil.copyProperties(excel, OilElectricRecord.class));
|
||||
oilElectricRecord.setDataSource(defaultDataSource(oilElectricRecord.getDataSource()));
|
||||
oilElectricRecord.setDataSource("批量导入");
|
||||
prepare(oilElectricRecord);
|
||||
List<String> validationErrors = validateImportOilElectricRecord(oilElectricRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
oilElectricRecordList.add(oilElectricRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -76,14 +76,14 @@ public class OtherExpenseRecordServiceImpl extends BaseServiceImpl<OtherExpenseR
|
||||
prepare(otherExpenseRecord);
|
||||
List<String> validationErrors = validateImportOtherExpenseRecord(otherExpenseRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
otherExpenseRecordList.add(otherExpenseRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+13
-4
@@ -84,7 +84,7 @@ public class ProjectApplyServiceImpl extends BaseServiceImpl<ProjectApplyMapper,
|
||||
@Override
|
||||
public ProjectApplyVO detail(Long id) {
|
||||
ProjectApplyVO projectApplyVO = ProjectApplyWrapper.build().entityVO(loadExists(id));
|
||||
normalizeOptionalAmounts(projectApplyVO);
|
||||
normalizeOptionalFields(projectApplyVO);
|
||||
fillReadonly(projectApplyVO);
|
||||
return projectApplyVO;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ public class ProjectApplyServiceImpl extends BaseServiceImpl<ProjectApplyMapper,
|
||||
projectApply.setTransportRoute(TransportBusinessSupport.trimToNull(projectApply.getTransportRoute()));
|
||||
projectApply.setTransportType(TransportBusinessSupport.trimToNull(projectApply.getTransportType()));
|
||||
projectApply.setBusinessType(TransportBusinessSupport.trimToNull(projectApply.getBusinessType()));
|
||||
normalizeOptionalAmounts(projectApply);
|
||||
normalizeOptionalFields(projectApply);
|
||||
projectApply.setSettlementMode(TransportBusinessSupport.trimToNull(projectApply.getSettlementMode()));
|
||||
projectApply.setHandlerUserName(TransportBusinessSupport.trimToNull(projectApply.getHandlerUserName()));
|
||||
projectApply.setPrincipalUserName(TransportBusinessSupport.trimToNull(projectApply.getPrincipalUserName()));
|
||||
@@ -354,7 +354,7 @@ public class ProjectApplyServiceImpl extends BaseServiceImpl<ProjectApplyMapper,
|
||||
projectApply.setSituationRemark(TransportBusinessSupport.trimToNull(projectApply.getSituationRemark()));
|
||||
}
|
||||
|
||||
private void normalizeOptionalAmounts(ProjectApply projectApply) {
|
||||
private void normalizeOptionalFields(ProjectApply projectApply) {
|
||||
if (projectApply.getProjectScale() != null && projectApply.getProjectScale().signum() < 0) {
|
||||
projectApply.setProjectScale(null);
|
||||
}
|
||||
@@ -364,6 +364,15 @@ public class ProjectApplyServiceImpl extends BaseServiceImpl<ProjectApplyMapper,
|
||||
if (projectApply.getFundDemand() != null && projectApply.getFundDemand().signum() < 0) {
|
||||
projectApply.setFundDemand(null);
|
||||
}
|
||||
if (projectApply.getReceivableDays() != null && projectApply.getReceivableDays() < 0) {
|
||||
projectApply.setReceivableDays(null);
|
||||
}
|
||||
if (projectApply.getPaymentDays() != null && projectApply.getPaymentDays() < 0) {
|
||||
projectApply.setPaymentDays(null);
|
||||
}
|
||||
if (projectApply.getCargoQuantity() != null && "-1".equals(projectApply.getCargoQuantity().trim())) {
|
||||
projectApply.setCargoQuantity(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void copyChangeFields(ProjectApply target, ProjectApply source) {
|
||||
@@ -473,7 +482,7 @@ public class ProjectApplyServiceImpl extends BaseServiceImpl<ProjectApplyMapper,
|
||||
|
||||
private void validateDays(Integer value, String label) {
|
||||
if (value == null) {
|
||||
throw new ServiceException(label + "不能为空");
|
||||
return;
|
||||
}
|
||||
if (value < 0 || value > 999) {
|
||||
throw new ServiceException(label + "范围为0到999天");
|
||||
|
||||
+2
-2
@@ -92,14 +92,14 @@ public class TireReplacementRecordServiceImpl extends BaseServiceImpl<TireReplac
|
||||
prepare(tireReplacementRecord);
|
||||
List<String> validationErrors = validateImportTireReplacementRecord(tireReplacementRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
tireReplacementRecordList.add(tireReplacementRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -92,14 +92,14 @@ public class TransportChangeRecordServiceImpl extends BaseServiceImpl<TransportC
|
||||
prepare(transportChangeRecord);
|
||||
List<String> validationErrors = validateImportTransportChangeRecord(transportChangeRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
transportChangeRecordList.add(transportChangeRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -63,7 +63,7 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
||||
private static final int PENALTY_UNIT_MAX_LENGTH = 50;
|
||||
private static final int DESCRIPTION_MAX_LENGTH = 500;
|
||||
private static final int RESULT_MAX_LENGTH = 500;
|
||||
private static final int ATTACHMENTS_MAX_LENGTH = 1000;
|
||||
private static final int ATTACHMENTS_MAX_LENGTH = 16000;
|
||||
private static final int MAX_DEDUCT_POINTS = 15;
|
||||
private static final String PROCESSED = "已处理";
|
||||
private static final String UNPROCESSED = "未处理";
|
||||
@@ -104,7 +104,7 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
||||
prepare(violationRecord);
|
||||
List<String> validationErrors = validateImportViolationRecord(violationRecord);
|
||||
if (Func.isNotEmpty(validationErrors)) {
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, validationErrors));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(validationErrors));
|
||||
errorList.add(excel);
|
||||
continue;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
||||
violationRecordList.add(violationRecord);
|
||||
} catch (Exception exception) {
|
||||
String message = exception instanceof ServiceException ? exception.getMessage() : "导入失败";
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(index + 2, List.of(message)));
|
||||
excel.setErrorMessage(org.springblade.common.excel.ImportFailureExcelUtil.formatErrorMessage(List.of(message)));
|
||||
errorList.add(excel);
|
||||
}
|
||||
}
|
||||
@@ -152,7 +152,7 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.addLengthValidationError(validationErrors, violationRecord.getPenaltyUnit(), PENALTY_UNIT_MAX_LENGTH, "被罚单位不能超过50字");
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.addLengthValidationError(validationErrors, violationRecord.getProcessDescription(), DESCRIPTION_MAX_LENGTH, "过程描述不能超过500字");
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.addLengthValidationError(validationErrors, violationRecord.getProcessResult(), RESULT_MAX_LENGTH, "处理结果不能超过500字");
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.addLengthValidationError(validationErrors, violationRecord.getAttachments(), ATTACHMENTS_MAX_LENGTH, "附件不能超过1000字");
|
||||
org.springblade.common.excel.ImportFailureExcelUtil.addLengthValidationError(validationErrors, violationRecord.getAttachments(), ATTACHMENTS_MAX_LENGTH, "附件数据不能超过16000字");
|
||||
return validationErrors;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
||||
validateLength(violationRecord.getPenaltyUnit(), PENALTY_UNIT_MAX_LENGTH, "被罚单位不能超过50字");
|
||||
validateLength(violationRecord.getProcessDescription(), DESCRIPTION_MAX_LENGTH, "过程描述不能超过500字");
|
||||
validateLength(violationRecord.getProcessResult(), RESULT_MAX_LENGTH, "处理结果不能超过500字");
|
||||
validateLength(violationRecord.getAttachments(), ATTACHMENTS_MAX_LENGTH, "附件不能超过1000字");
|
||||
validateLength(violationRecord.getAttachments(), ATTACHMENTS_MAX_LENGTH, "附件数据不能超过16000字");
|
||||
}
|
||||
|
||||
private void validateVehicleTypeImmutable(ViolationRecord violationRecord) {
|
||||
|
||||
+4
@@ -31,6 +31,7 @@ import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.MaintenanceRecord;
|
||||
import org.springblade.transport.pojo.vo.MaintenanceRecordVO;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -47,6 +48,9 @@ public class MaintenanceRecordWrapper extends BaseEntityWrapper<MaintenanceRecor
|
||||
@Override
|
||||
public MaintenanceRecordVO entityVO(MaintenanceRecord maintenanceRecord) {
|
||||
MaintenanceRecordVO maintenanceRecordVO = Objects.requireNonNull(BeanUtil.copyProperties(maintenanceRecord, MaintenanceRecordVO.class));
|
||||
if (maintenanceRecordVO.getMileage() != null && maintenanceRecordVO.getMileage().compareTo(BigDecimal.valueOf(-1)) == 0) {
|
||||
maintenanceRecordVO.setMileage(null);
|
||||
}
|
||||
maintenanceRecordVO.setUpdateUserName(UserCache.getUserRealName(maintenanceRecord.getUpdateUser()));
|
||||
return maintenanceRecordVO;
|
||||
}
|
||||
|
||||
@@ -1416,7 +1416,7 @@ CREATE TABLE `blade_vehicle_maintenance_plan` (
|
||||
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
|
||||
`next_maintenance_time` datetime NULL DEFAULT NULL COMMENT '下次保养时间',
|
||||
`next_maintenance_mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '下次保养里程/航程',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -1450,7 +1450,7 @@ CREATE TABLE `blade_vehicle_maintenance_record` (
|
||||
`factory_time` datetime NULL DEFAULT NULL COMMENT '出厂时间',
|
||||
`mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '里程/航程数',
|
||||
`mileage_unit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '公里' COMMENT '里程单位',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -14,7 +14,7 @@ CREATE TABLE `blade_accident_record` (
|
||||
`direct_economic_loss` decimal(18,2) DEFAULT NULL COMMENT '直接经济损失',
|
||||
`insurance_claim_amount` decimal(18,2) DEFAULT NULL COMMENT '保险理赔金额',
|
||||
`accident_reason_damage` varchar(500) DEFAULT NULL COMMENT '事故原因及损坏情况',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -15,7 +15,7 @@ CREATE TABLE `blade_annual_inspection_record` (
|
||||
`inspection_unit` varchar(50) DEFAULT NULL COMMENT '检测评定单位',
|
||||
`fee` decimal(18,2) NOT NULL COMMENT '费用',
|
||||
`assessment_unit` varchar(50) DEFAULT NULL COMMENT '评定(复核)单位',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -13,7 +13,7 @@ CREATE TABLE `blade_etc_record` (
|
||||
`exit_station` varchar(50) DEFAULT NULL COMMENT '出口站',
|
||||
`data_source` varchar(20) DEFAULT '手工录入' COMMENT '数据来源',
|
||||
`transaction_amount` decimal(18,2) NOT NULL COMMENT '交易金额',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -12,7 +12,7 @@ CREATE TABLE `blade_mileage_record` (
|
||||
`monthly_mileage` decimal(18,2) DEFAULT NULL COMMENT '本月行驶里程',
|
||||
`total_mileage` decimal(18,2) DEFAULT NULL COMMENT '累计行驶里程',
|
||||
`mileage_unit` varchar(10) NOT NULL DEFAULT '公里' COMMENT '里程单位',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -18,7 +18,7 @@ CREATE TABLE `blade_oil_electric_record` (
|
||||
`transaction_amount` decimal(18,2) NOT NULL COMMENT '交易金额',
|
||||
`balance` decimal(18,2) DEFAULT NULL COMMENT '余额',
|
||||
`station` varchar(50) DEFAULT NULL COMMENT '站点',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -11,7 +11,7 @@ CREATE TABLE `blade_other_expense_record` (
|
||||
`vehicle_no` varchar(30) NOT NULL COMMENT '车牌号/船号',
|
||||
`data_source` varchar(20) DEFAULT '手工录入' COMMENT '数据来源',
|
||||
`amount` decimal(18,2) NOT NULL COMMENT '金额',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -12,7 +12,7 @@ CREATE TABLE `blade_tire_replacement_record` (
|
||||
`tire_quantity` int(11) DEFAULT NULL COMMENT '换胎数量',
|
||||
`replacement_cost` decimal(18,2) NOT NULL COMMENT '换胎费用',
|
||||
`replacement_description` varchar(200) DEFAULT NULL COMMENT '换胎说明',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -9,7 +9,7 @@ CREATE TABLE `blade_transport_change_record` (
|
||||
`vehicle_no` varchar(30) DEFAULT NULL COMMENT '车牌号/船号',
|
||||
`change_item` varchar(50) NOT NULL COMMENT '变更事项',
|
||||
`change_content` varchar(200) NOT NULL COMMENT '变更内容',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -13,6 +13,7 @@ CREATE TABLE `blade_transport_driver` (
|
||||
`education` varchar(20) DEFAULT NULL COMMENT '学历',
|
||||
`address_region` varchar(100) DEFAULT NULL COMMENT '地址区划',
|
||||
`address` varchar(200) DEFAULT NULL COMMENT '详细地址',
|
||||
`driving_vehicle` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '驾驶车辆车牌号',
|
||||
`posts` varchar(100) DEFAULT NULL COMMENT '岗位,多个使用逗号分隔',
|
||||
`id_card_front` varchar(1000) DEFAULT NULL COMMENT '身份证正面照',
|
||||
`id_card_back` varchar(1000) DEFAULT NULL COMMENT '身份证反面照',
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `blade_transport_driver`
|
||||
ADD COLUMN `driving_vehicle` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '驾驶车辆车牌号' AFTER `address`;
|
||||
@@ -18,7 +18,7 @@ CREATE TABLE `blade_vehicle_maintenance_plan` (
|
||||
`address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址',
|
||||
`next_maintenance_time` datetime NULL DEFAULT NULL COMMENT '下次保养时间',
|
||||
`next_maintenance_mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '下次保养里程/航程',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -18,7 +18,7 @@ CREATE TABLE `blade_vehicle_maintenance_record` (
|
||||
`factory_time` datetime NULL DEFAULT NULL COMMENT '出厂时间',
|
||||
`mileage` decimal(18,2) NULL DEFAULT NULL COMMENT '里程/航程数',
|
||||
`mileage_unit` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '公里' COMMENT '里程单位',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint NULL DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint NULL DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
ALTER TABLE `blade_vehicle_maintenance_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_vehicle_maintenance_plan`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_tire_replacement_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_accident_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_annual_inspection_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_mileage_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_transport_change_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_oil_electric_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_etc_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
|
||||
ALTER TABLE `blade_other_expense_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
@@ -18,7 +18,7 @@ CREATE TABLE `blade_violation_record` (
|
||||
`process_status` varchar(20) NOT NULL DEFAULT '已处理' COMMENT '处理状态',
|
||||
`process_description` varchar(500) NOT NULL COMMENT '过程描述',
|
||||
`process_result` varchar(500) DEFAULT NULL COMMENT '处理结果',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `blade_violation_record`
|
||||
MODIFY COLUMN `attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON';
|
||||
@@ -5582,7 +5582,7 @@ CREATE TABLE `blade_vehicle_maintenance_plan` (
|
||||
`address` varchar(100) DEFAULT NULL COMMENT '地址',
|
||||
`next_maintenance_time` datetime DEFAULT NULL COMMENT '下次保养时间',
|
||||
`next_maintenance_mileage` decimal(18,2) DEFAULT NULL COMMENT '下次保养里程/航程',
|
||||
`attachments` text COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5623,7 +5623,7 @@ CREATE TABLE `blade_vehicle_maintenance_record` (
|
||||
`factory_time` datetime DEFAULT NULL COMMENT '出厂时间',
|
||||
`mileage` decimal(18,2) DEFAULT NULL COMMENT '里程/航程数',
|
||||
`mileage_unit` varchar(10) DEFAULT '公里' COMMENT '里程单位',
|
||||
`attachments` text COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5704,7 +5704,7 @@ CREATE TABLE `blade_violation_record` (
|
||||
`process_status` varchar(20) NOT NULL DEFAULT '已处理' COMMENT '处理状态',
|
||||
`process_description` varchar(500) NOT NULL COMMENT '过程描述',
|
||||
`process_result` varchar(500) DEFAULT NULL COMMENT '处理结果',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
@@ -5739,7 +5739,7 @@ CREATE TABLE `blade_tire_replacement_record` (
|
||||
`tire_quantity` int(11) DEFAULT NULL COMMENT '换胎数量',
|
||||
`replacement_cost` decimal(18,2) NOT NULL COMMENT '换胎费用',
|
||||
`replacement_description` varchar(200) DEFAULT NULL COMMENT '换胎说明',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5775,7 +5775,7 @@ CREATE TABLE `blade_accident_record` (
|
||||
`direct_economic_loss` decimal(18,2) DEFAULT NULL COMMENT '直接经济损失',
|
||||
`insurance_claim_amount` decimal(18,2) DEFAULT NULL COMMENT '保险理赔金额',
|
||||
`accident_reason_damage` varchar(500) DEFAULT NULL COMMENT '事故原因及损坏情况',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5814,7 +5814,7 @@ CREATE TABLE `blade_annual_inspection_record` (
|
||||
`inspection_unit` varchar(50) DEFAULT NULL COMMENT '检测评定单位',
|
||||
`fee` decimal(18,2) NOT NULL COMMENT '费用',
|
||||
`assessment_unit` varchar(50) DEFAULT NULL COMMENT '评定(复核)单位',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5849,7 +5849,7 @@ CREATE TABLE `blade_mileage_record` (
|
||||
`monthly_mileage` decimal(18,2) DEFAULT NULL COMMENT '本月行驶里程',
|
||||
`total_mileage` decimal(18,2) DEFAULT NULL COMMENT '累计行驶里程',
|
||||
`mileage_unit` varchar(10) NOT NULL DEFAULT '公里' COMMENT '里程单位',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5881,7 +5881,7 @@ CREATE TABLE `blade_transport_change_record` (
|
||||
`vehicle_no` varchar(30) DEFAULT NULL COMMENT '车牌号/船号',
|
||||
`change_item` varchar(50) NOT NULL COMMENT '变更事项',
|
||||
`change_content` varchar(200) NOT NULL COMMENT '变更内容',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5922,7 +5922,7 @@ CREATE TABLE `blade_oil_electric_record` (
|
||||
`transaction_amount` decimal(18,2) NOT NULL COMMENT '交易金额',
|
||||
`balance` decimal(18,2) DEFAULT NULL COMMENT '余额',
|
||||
`station` varchar(50) DEFAULT NULL COMMENT '站点',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5959,7 +5959,7 @@ CREATE TABLE `blade_etc_record` (
|
||||
`exit_station` varchar(50) DEFAULT NULL COMMENT '出口站',
|
||||
`data_source` varchar(20) DEFAULT '手工录入' COMMENT '数据来源',
|
||||
`transaction_amount` decimal(18,2) NOT NULL COMMENT '交易金额',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
@@ -5994,7 +5994,7 @@ CREATE TABLE `blade_other_expense_record` (
|
||||
`vehicle_no` varchar(30) NOT NULL COMMENT '车牌号/船号',
|
||||
`data_source` varchar(20) DEFAULT '手工录入' COMMENT '数据来源',
|
||||
`amount` decimal(18,2) NOT NULL COMMENT '金额',
|
||||
`attachments` varchar(1000) DEFAULT NULL COMMENT '附件',
|
||||
`attachments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '附件JSON',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
Reference in New Issue
Block a user