fix bug
This commit is contained in:
@@ -32,6 +32,7 @@ import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
@@ -57,12 +58,66 @@ public class TransportShip extends TenantEntity {
|
||||
@Schema(description = "所属组织")
|
||||
private String organizationName;
|
||||
|
||||
@Schema(description = "安放龙骨日期")
|
||||
private LocalDate keelLayingDate;
|
||||
|
||||
@Schema(description = "建造完工日期")
|
||||
private LocalDate buildCompletionDate;
|
||||
|
||||
@Schema(description = "总长")
|
||||
private BigDecimal totalLength;
|
||||
|
||||
@Schema(description = "船宽")
|
||||
private BigDecimal shipWidth;
|
||||
|
||||
@Schema(description = "型深")
|
||||
private BigDecimal moldedDepth;
|
||||
|
||||
@Schema(description = "最大船高")
|
||||
private BigDecimal maxShipHeight;
|
||||
|
||||
@Schema(description = "空载吃水")
|
||||
private BigDecimal lightDraft;
|
||||
|
||||
@Schema(description = "满载吃水")
|
||||
private BigDecimal fullLoadDraft;
|
||||
|
||||
@Schema(description = "航区")
|
||||
private String navigationArea;
|
||||
|
||||
@Schema(description = "所有权登记号码")
|
||||
private String ownershipRegistrationNo;
|
||||
|
||||
@Schema(description = "初次登记号码")
|
||||
private String initialRegistrationNo;
|
||||
|
||||
@Schema(description = "船舶所有人")
|
||||
private String shipOwner;
|
||||
|
||||
@Schema(description = "取得所有权日期")
|
||||
private LocalDate ownershipAcquisitionDate;
|
||||
|
||||
@Schema(description = "船检登记号")
|
||||
private String shipInspectionNo;
|
||||
|
||||
@Schema(description = "船舶类型")
|
||||
private String shipType;
|
||||
|
||||
@Schema(description = "总吨")
|
||||
private BigDecimal grossTonnage;
|
||||
|
||||
@Schema(description = "净吨")
|
||||
private BigDecimal netTonnage;
|
||||
|
||||
@Schema(description = "船舶所有权证书图片")
|
||||
private String ownershipCertImage;
|
||||
|
||||
@Schema(description = "内河船舶安全与环保证书图片")
|
||||
private String safetyCertImage;
|
||||
|
||||
@Schema(description = "国籍证有效期自")
|
||||
private LocalDate nationalityCertStartDate;
|
||||
|
||||
@Schema(description = "国籍证有效期至")
|
||||
private LocalDate nationalityCertEndDate;
|
||||
|
||||
@@ -72,6 +127,9 @@ public class TransportShip extends TenantEntity {
|
||||
@Schema(description = "国籍证图片")
|
||||
private String nationalityCertImage;
|
||||
|
||||
@Schema(description = "最低安全配员证书有效期自")
|
||||
private LocalDate safeManningCertStartDate;
|
||||
|
||||
@Schema(description = "最低安全配员证书有效期至")
|
||||
private LocalDate safeManningCertEndDate;
|
||||
|
||||
@@ -81,6 +139,12 @@ public class TransportShip extends TenantEntity {
|
||||
@Schema(description = "最低安全配员证书图片")
|
||||
private String safeManningCertImage;
|
||||
|
||||
@Schema(description = "营业运输证编号")
|
||||
private String businessTransportCertNo;
|
||||
|
||||
@Schema(description = "营业运输证发证日期")
|
||||
private LocalDate businessTransportCertIssueDate;
|
||||
|
||||
@Schema(description = "营业运输证有效期至")
|
||||
private LocalDate businessTransportCertEndDate;
|
||||
|
||||
@@ -90,6 +154,9 @@ public class TransportShip extends TenantEntity {
|
||||
@Schema(description = "营业运输证图片")
|
||||
private String businessTransportCertImage;
|
||||
|
||||
@Schema(description = "起租日期")
|
||||
private LocalDate leaseStartDate;
|
||||
|
||||
@Schema(description = "承租有效期至")
|
||||
private LocalDate leaseEndDate;
|
||||
|
||||
@@ -99,6 +166,12 @@ public class TransportShip extends TenantEntity {
|
||||
@Schema(description = "承租合同图片")
|
||||
private String leaseContractImage;
|
||||
|
||||
@Schema(description = "船舶承租人")
|
||||
private String shipLessee;
|
||||
|
||||
@Schema(description = "船舶经营人")
|
||||
private String shipOperator;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@@ -58,6 +58,11 @@ public class TransportVehicle extends TenantEntity {
|
||||
*/
|
||||
@Schema(description = "车牌号")
|
||||
private String plateNo;
|
||||
/**
|
||||
* 车牌颜色
|
||||
*/
|
||||
@Schema(description = "车牌颜色")
|
||||
private String plateColor;
|
||||
/**
|
||||
* 车辆类型
|
||||
*/
|
||||
@@ -134,10 +139,25 @@ public class TransportVehicle extends TenantEntity {
|
||||
@Schema(description = "行驶证长期有效")
|
||||
private Integer drivingLicenseLongTerm;
|
||||
/**
|
||||
* 行驶证图片
|
||||
* 行驶证主页正面
|
||||
*/
|
||||
@Schema(description = "行驶证图片")
|
||||
@Schema(description = "行驶证主页正面")
|
||||
private String drivingLicenseImage;
|
||||
/**
|
||||
* 行驶证主页反面
|
||||
*/
|
||||
@Schema(description = "行驶证主页反面")
|
||||
private String drivingLicenseMainBack;
|
||||
/**
|
||||
* 行驶证副页正面
|
||||
*/
|
||||
@Schema(description = "行驶证副页正面")
|
||||
private String drivingLicenseViceFront;
|
||||
/**
|
||||
* 行驶证副页反面
|
||||
*/
|
||||
@Schema(description = "行驶证副页反面")
|
||||
private String drivingLicenseViceBack;
|
||||
/**
|
||||
* 道路运输证号
|
||||
*/
|
||||
|
||||
@@ -75,6 +75,24 @@ public class DriverController extends BladeController {
|
||||
private static final int DEFAULT_CURRENT = 1;
|
||||
private static final int DEFAULT_SIZE = 10;
|
||||
private static final int MAX_SIZE = 100;
|
||||
private static final String EXPIRY_EXPIRED_SQL = """
|
||||
(
|
||||
((driving_license_long_term IS NULL OR driving_license_long_term != 1) AND driving_license_end_date < {0})
|
||||
OR ((qualification_long_term IS NULL OR qualification_long_term != 1) AND qualification_end_date < {0})
|
||||
)
|
||||
""";
|
||||
private static final String EXPIRY_WITHIN_30_SQL = """
|
||||
(
|
||||
NOT (
|
||||
((driving_license_long_term IS NULL OR driving_license_long_term != 1) AND driving_license_end_date < {0})
|
||||
OR ((qualification_long_term IS NULL OR qualification_long_term != 1) AND qualification_end_date < {0})
|
||||
)
|
||||
AND (
|
||||
((driving_license_long_term IS NULL OR driving_license_long_term != 1) AND driving_license_end_date BETWEEN {0} AND {1})
|
||||
OR ((qualification_long_term IS NULL OR qualification_long_term != 1) AND qualification_end_date BETWEEN {0} AND {1})
|
||||
)
|
||||
)
|
||||
""";
|
||||
|
||||
private final IDriverService driverService;
|
||||
|
||||
@@ -222,18 +240,10 @@ public class DriverController extends BladeController {
|
||||
queryWrapper.eq(Driver::getStatus, driver.getStatus());
|
||||
}
|
||||
if ("within30".equals(driver.getExpireStatus())) {
|
||||
queryWrapper.and(wrapper -> wrapper
|
||||
.and(item -> item.ne(Driver::getDrivingLicenseLongTerm, 1)
|
||||
.between(Driver::getDrivingLicenseEndDate, driver.getToday(), driver.getWarningDate()))
|
||||
.or(item -> item.ne(Driver::getQualificationLongTerm, 1)
|
||||
.between(Driver::getQualificationEndDate, driver.getToday(), driver.getWarningDate())));
|
||||
queryWrapper.apply(EXPIRY_WITHIN_30_SQL, driver.getToday(), driver.getWarningDate());
|
||||
}
|
||||
if ("expired".equals(driver.getExpireStatus())) {
|
||||
queryWrapper.and(wrapper -> wrapper
|
||||
.and(item -> item.ne(Driver::getDrivingLicenseLongTerm, 1)
|
||||
.lt(Driver::getDrivingLicenseEndDate, driver.getToday()))
|
||||
.or(item -> item.ne(Driver::getQualificationLongTerm, 1)
|
||||
.lt(Driver::getQualificationEndDate, driver.getToday())));
|
||||
queryWrapper.apply(EXPIRY_EXPIRED_SQL, driver.getToday());
|
||||
}
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
@@ -62,36 +63,102 @@ public class TransportShipExcel implements Serializable {
|
||||
@ExcelProperty("所属组织")
|
||||
private String organizationName;
|
||||
|
||||
@ExcelProperty("安放龙骨日期")
|
||||
private LocalDate keelLayingDate;
|
||||
|
||||
@ExcelProperty("建造完工日期")
|
||||
private LocalDate buildCompletionDate;
|
||||
|
||||
@ExcelProperty("总长")
|
||||
private BigDecimal totalLength;
|
||||
|
||||
@ExcelProperty("船宽")
|
||||
private BigDecimal shipWidth;
|
||||
|
||||
@ExcelProperty("型深")
|
||||
private BigDecimal moldedDepth;
|
||||
|
||||
@ExcelProperty("最大船高")
|
||||
private BigDecimal maxShipHeight;
|
||||
|
||||
@ExcelProperty("空载吃水")
|
||||
private BigDecimal lightDraft;
|
||||
|
||||
@ExcelProperty("满载吃水")
|
||||
private BigDecimal fullLoadDraft;
|
||||
|
||||
@ExcelProperty("航区")
|
||||
private String navigationArea;
|
||||
|
||||
@ExcelProperty("登记号码")
|
||||
private String ownershipRegistrationNo;
|
||||
|
||||
@ExcelProperty("初次登记号码")
|
||||
private String initialRegistrationNo;
|
||||
|
||||
@ExcelProperty("船舶所有人")
|
||||
private String shipOwner;
|
||||
|
||||
@ExcelProperty("取得所有权日期")
|
||||
private LocalDate ownershipAcquisitionDate;
|
||||
|
||||
@ExcelProperty("船检登记号")
|
||||
private String shipInspectionNo;
|
||||
|
||||
@ExcelProperty("船舶类型")
|
||||
private String shipType;
|
||||
|
||||
@ExcelProperty("总吨")
|
||||
private BigDecimal grossTonnage;
|
||||
|
||||
@ExcelProperty("净吨")
|
||||
private BigDecimal netTonnage;
|
||||
|
||||
@ExcelProperty("国籍证有效期自")
|
||||
private LocalDate nationalityCertStartDate;
|
||||
|
||||
@ExcelProperty("国籍证有效期至")
|
||||
private LocalDate nationalityCertEndDate;
|
||||
|
||||
@ExcelProperty("国籍证长期有效")
|
||||
private String nationalityCertLongTermName;
|
||||
|
||||
@ExcelProperty("最低安全配员证书有效期自")
|
||||
private LocalDate safeManningCertStartDate;
|
||||
|
||||
@ExcelProperty("最低安全配员证书有效期至")
|
||||
private LocalDate safeManningCertEndDate;
|
||||
|
||||
@ExcelProperty("最低安全配员证书长期有效")
|
||||
private String safeManningCertLongTermName;
|
||||
|
||||
@ExcelProperty("营业运输证证书编号")
|
||||
private String businessTransportCertNo;
|
||||
|
||||
@ExcelProperty("营业运输证发证日期")
|
||||
private LocalDate businessTransportCertIssueDate;
|
||||
|
||||
@ExcelProperty("营业运输证有效期至")
|
||||
private LocalDate businessTransportCertEndDate;
|
||||
|
||||
@ExcelProperty("营业运输证长期有效")
|
||||
private String businessTransportCertLongTermName;
|
||||
|
||||
@ExcelProperty("起租日期")
|
||||
private LocalDate leaseStartDate;
|
||||
|
||||
@ExcelProperty("承租有效期至")
|
||||
private LocalDate leaseEndDate;
|
||||
|
||||
@ExcelProperty("承租长期有效")
|
||||
private String leaseLongTermName;
|
||||
|
||||
@ExcelProperty("船舶承租人")
|
||||
private String shipLessee;
|
||||
|
||||
@ExcelProperty("船舶经营人")
|
||||
private String shipOperator;
|
||||
|
||||
@ExcelProperty("状态")
|
||||
private String statusName;
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ public class TransportVehicleExcel implements Serializable {
|
||||
@ExcelProperty("车牌号")
|
||||
private String plateNo;
|
||||
|
||||
@ExcelProperty("车牌颜色")
|
||||
private String plateColor;
|
||||
|
||||
@ExcelProperty("车辆类型")
|
||||
private String vehicleType;
|
||||
|
||||
|
||||
@@ -90,6 +90,23 @@
|
||||
remark
|
||||
</sql>
|
||||
|
||||
<sql id="ExpiryExpiredCondition">
|
||||
(
|
||||
((driving_license_long_term IS NULL OR driving_license_long_term != 1) AND driving_license_end_date < #{driver.today})
|
||||
OR ((qualification_long_term IS NULL OR qualification_long_term != 1) AND qualification_end_date < #{driver.today})
|
||||
)
|
||||
</sql>
|
||||
|
||||
<sql id="ExpiryWithin30Condition">
|
||||
(
|
||||
NOT <include refid="ExpiryExpiredCondition"/>
|
||||
AND (
|
||||
((driving_license_long_term IS NULL OR driving_license_long_term != 1) AND driving_license_end_date BETWEEN #{driver.today} AND #{driver.warningDate})
|
||||
OR ((qualification_long_term IS NULL OR qualification_long_term != 1) AND qualification_end_date BETWEEN #{driver.today} AND #{driver.warningDate})
|
||||
)
|
||||
)
|
||||
</sql>
|
||||
|
||||
<sql id="QueryCondition">
|
||||
is_deleted = 0
|
||||
<if test="driver.driverName != null and driver.driverName != ''">
|
||||
@@ -118,16 +135,10 @@
|
||||
AND status = #{driver.status}
|
||||
</if>
|
||||
<if test="driver.expireStatus != null and driver.expireStatus == 'within30'">
|
||||
AND (
|
||||
(driving_license_long_term != 1 AND driving_license_end_date BETWEEN #{driver.today} AND #{driver.warningDate})
|
||||
OR (qualification_long_term != 1 AND qualification_end_date BETWEEN #{driver.today} AND #{driver.warningDate})
|
||||
)
|
||||
AND <include refid="ExpiryWithin30Condition"/>
|
||||
</if>
|
||||
<if test="driver.expireStatus != null and driver.expireStatus == 'expired'">
|
||||
AND (
|
||||
(driving_license_long_term != 1 AND driving_license_end_date < #{driver.today})
|
||||
OR (qualification_long_term != 1 AND qualification_end_date < #{driver.today})
|
||||
)
|
||||
AND <include refid="ExpiryExpiredCondition"/>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
@@ -144,14 +155,8 @@
|
||||
<select id="selectExpiryStat" resultType="org.springblade.transport.pojo.vo.DriverExpiryStatVO">
|
||||
SELECT
|
||||
COUNT(1) AS total,
|
||||
SUM(CASE WHEN (
|
||||
(driving_license_long_term != 1 AND driving_license_end_date BETWEEN #{driver.today} AND #{driver.warningDate})
|
||||
OR (qualification_long_term != 1 AND qualification_end_date BETWEEN #{driver.today} AND #{driver.warningDate})
|
||||
) THEN 1 ELSE 0 END) AS within30,
|
||||
SUM(CASE WHEN (
|
||||
(driving_license_long_term != 1 AND driving_license_end_date < #{driver.today})
|
||||
OR (qualification_long_term != 1 AND qualification_end_date < #{driver.today})
|
||||
) THEN 1 ELSE 0 END) AS expired
|
||||
SUM(CASE WHEN <include refid="ExpiryWithin30Condition"/> THEN 1 ELSE 0 END) AS within30,
|
||||
SUM(CASE WHEN <include refid="ExpiryExpiredCondition"/> THEN 1 ELSE 0 END) AS expired
|
||||
FROM
|
||||
blade_transport_driver
|
||||
WHERE
|
||||
|
||||
@@ -15,20 +15,44 @@
|
||||
<result column="ship_name" property="shipName"/>
|
||||
<result column="ship_identifier_no" property="shipIdentifierNo"/>
|
||||
<result column="organization_name" property="organizationName"/>
|
||||
<result column="keel_laying_date" property="keelLayingDate"/>
|
||||
<result column="build_completion_date" property="buildCompletionDate"/>
|
||||
<result column="total_length" property="totalLength"/>
|
||||
<result column="ship_width" property="shipWidth"/>
|
||||
<result column="molded_depth" property="moldedDepth"/>
|
||||
<result column="max_ship_height" property="maxShipHeight"/>
|
||||
<result column="light_draft" property="lightDraft"/>
|
||||
<result column="full_load_draft" property="fullLoadDraft"/>
|
||||
<result column="navigation_area" property="navigationArea"/>
|
||||
<result column="ownership_registration_no" property="ownershipRegistrationNo"/>
|
||||
<result column="initial_registration_no" property="initialRegistrationNo"/>
|
||||
<result column="ship_owner" property="shipOwner"/>
|
||||
<result column="ownership_acquisition_date" property="ownershipAcquisitionDate"/>
|
||||
<result column="ship_inspection_no" property="shipInspectionNo"/>
|
||||
<result column="ship_type" property="shipType"/>
|
||||
<result column="gross_tonnage" property="grossTonnage"/>
|
||||
<result column="net_tonnage" property="netTonnage"/>
|
||||
<result column="ownership_cert_image" property="ownershipCertImage"/>
|
||||
<result column="safety_cert_image" property="safetyCertImage"/>
|
||||
<result column="nationality_cert_start_date" property="nationalityCertStartDate"/>
|
||||
<result column="nationality_cert_end_date" property="nationalityCertEndDate"/>
|
||||
<result column="nationality_cert_long_term" property="nationalityCertLongTerm"/>
|
||||
<result column="nationality_cert_image" property="nationalityCertImage"/>
|
||||
<result column="safe_manning_cert_start_date" property="safeManningCertStartDate"/>
|
||||
<result column="safe_manning_cert_end_date" property="safeManningCertEndDate"/>
|
||||
<result column="safe_manning_cert_long_term" property="safeManningCertLongTerm"/>
|
||||
<result column="safe_manning_cert_image" property="safeManningCertImage"/>
|
||||
<result column="business_transport_cert_no" property="businessTransportCertNo"/>
|
||||
<result column="business_transport_cert_issue_date" property="businessTransportCertIssueDate"/>
|
||||
<result column="business_transport_cert_end_date" property="businessTransportCertEndDate"/>
|
||||
<result column="business_transport_cert_long_term" property="businessTransportCertLongTerm"/>
|
||||
<result column="business_transport_cert_image" property="businessTransportCertImage"/>
|
||||
<result column="lease_start_date" property="leaseStartDate"/>
|
||||
<result column="lease_end_date" property="leaseEndDate"/>
|
||||
<result column="lease_long_term" property="leaseLongTerm"/>
|
||||
<result column="lease_contract_image" property="leaseContractImage"/>
|
||||
<result column="ship_lessee" property="shipLessee"/>
|
||||
<result column="ship_operator" property="shipOperator"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
@@ -45,20 +69,44 @@
|
||||
ship_name,
|
||||
ship_identifier_no,
|
||||
organization_name,
|
||||
keel_laying_date,
|
||||
build_completion_date,
|
||||
total_length,
|
||||
ship_width,
|
||||
molded_depth,
|
||||
max_ship_height,
|
||||
light_draft,
|
||||
full_load_draft,
|
||||
navigation_area,
|
||||
ownership_registration_no,
|
||||
initial_registration_no,
|
||||
ship_owner,
|
||||
ownership_acquisition_date,
|
||||
ship_inspection_no,
|
||||
ship_type,
|
||||
gross_tonnage,
|
||||
net_tonnage,
|
||||
ownership_cert_image,
|
||||
safety_cert_image,
|
||||
nationality_cert_start_date,
|
||||
nationality_cert_end_date,
|
||||
nationality_cert_long_term,
|
||||
nationality_cert_image,
|
||||
safe_manning_cert_start_date,
|
||||
safe_manning_cert_end_date,
|
||||
safe_manning_cert_long_term,
|
||||
safe_manning_cert_image,
|
||||
business_transport_cert_no,
|
||||
business_transport_cert_issue_date,
|
||||
business_transport_cert_end_date,
|
||||
business_transport_cert_long_term,
|
||||
business_transport_cert_image,
|
||||
lease_start_date,
|
||||
lease_end_date,
|
||||
lease_long_term,
|
||||
lease_contract_image,
|
||||
ship_lessee,
|
||||
ship_operator,
|
||||
remark
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
<result column="organization_name" property="organizationName"/>
|
||||
<result column="plate_no" property="plateNo"/>
|
||||
<result column="plate_color" property="plateColor"/>
|
||||
<result column="vehicle_type" property="vehicleType"/>
|
||||
<result column="outer_length" property="outerLength"/>
|
||||
<result column="outer_width" property="outerWidth"/>
|
||||
@@ -30,6 +31,9 @@
|
||||
<result column="driving_license_end_date" property="drivingLicenseEndDate"/>
|
||||
<result column="driving_license_long_term" property="drivingLicenseLongTerm"/>
|
||||
<result column="driving_license_image" property="drivingLicenseImage"/>
|
||||
<result column="driving_license_main_back" property="drivingLicenseMainBack"/>
|
||||
<result column="driving_license_vice_front" property="drivingLicenseViceFront"/>
|
||||
<result column="driving_license_vice_back" property="drivingLicenseViceBack"/>
|
||||
<result column="road_transport_cert_no" property="roadTransportCertNo"/>
|
||||
<result column="road_transport_cert_start_date" property="roadTransportCertStartDate"/>
|
||||
<result column="road_transport_cert_end_date" property="roadTransportCertEndDate"/>
|
||||
@@ -55,6 +59,7 @@
|
||||
is_deleted,
|
||||
organization_name,
|
||||
plate_no,
|
||||
plate_color,
|
||||
vehicle_type,
|
||||
outer_length,
|
||||
outer_width,
|
||||
@@ -71,6 +76,9 @@
|
||||
driving_license_end_date,
|
||||
driving_license_long_term,
|
||||
driving_license_image,
|
||||
driving_license_main_back,
|
||||
driving_license_vice_front,
|
||||
driving_license_vice_back,
|
||||
road_transport_cert_no,
|
||||
road_transport_cert_start_date,
|
||||
road_transport_cert_end_date,
|
||||
|
||||
@@ -171,9 +171,33 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
if (Func.isEmpty(driver.getIdCardNo())) {
|
||||
throw new ServiceException("身份证号不能为空");
|
||||
}
|
||||
if (Func.isEmpty(driver.getGender())) {
|
||||
throw new ServiceException("性别不能为空");
|
||||
}
|
||||
if (Func.isEmpty(driver.getPosts())) {
|
||||
throw new ServiceException("岗位不能为空");
|
||||
}
|
||||
if (Func.isEmpty(driver.getDrivingType())) {
|
||||
throw new ServiceException("准驾车型不能为空");
|
||||
}
|
||||
if (Func.isEmpty(driver.getDrivingLicenseNo())) {
|
||||
throw new ServiceException("驾驶证档案编号不能为空");
|
||||
}
|
||||
if (Func.isEmpty(driver.getDrivingLicenseStartDate())) {
|
||||
throw new ServiceException("驾驶证有效期起不能为空");
|
||||
}
|
||||
if (driver.getDrivingLicenseLongTerm() != 1 && Func.isEmpty(driver.getDrivingLicenseEndDate())) {
|
||||
throw new ServiceException("驾驶证有效期止不能为空");
|
||||
}
|
||||
if (Func.isEmpty(driver.getQualificationType())) {
|
||||
throw new ServiceException("从业资格认证类型不能为空");
|
||||
}
|
||||
if (Func.isEmpty(driver.getQualificationNo())) {
|
||||
throw new ServiceException("资格证号不能为空");
|
||||
}
|
||||
if (driver.getQualificationLongTerm() != 1 && Func.isEmpty(driver.getQualificationEndDate())) {
|
||||
throw new ServiceException("从业资格证有效期不能为空");
|
||||
}
|
||||
if (Func.isEmpty(driver.getDriverType())) {
|
||||
throw new ServiceException("司机类型不能为空");
|
||||
}
|
||||
@@ -195,12 +219,6 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
if (Func.isEmpty(driver.getDrivingLicenseFront()) || Func.isEmpty(driver.getDrivingLicenseBack())) {
|
||||
throw new ServiceException("驾驶证主页和副页不能为空");
|
||||
}
|
||||
if (driver.getDrivingLicenseLongTerm() != 1 && Func.isEmpty(driver.getDrivingLicenseEndDate())) {
|
||||
throw new ServiceException("驾驶证有效期止不能为空");
|
||||
}
|
||||
if (driver.getQualificationLongTerm() != 1 && Func.isNotEmpty(driver.getQualificationNo()) && Func.isEmpty(driver.getQualificationEndDate())) {
|
||||
throw new ServiceException("从业资格证有效期止不能为空");
|
||||
}
|
||||
validateLength(driver.getDriverName(), NAME_MAX_LENGTH, "司机姓名不能超过20字");
|
||||
validateLength(driver.getIdCardNo(), ID_CARD_MAX_LENGTH, "身份证号不能超过18字");
|
||||
validateLength(driver.getMobile(), MOBILE_MAX_LENGTH, "手机号不能超过20字");
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.springblade.transport.service.ITransportShipService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -58,6 +59,7 @@ public class TransportShipServiceImpl extends BaseServiceImpl<TransportShipMappe
|
||||
private static final int REMARK_MAX_LENGTH = 200;
|
||||
private static final int DEFAULT_ENABLED_STATUS = 1;
|
||||
private static final int DEFAULT_FALSE = 0;
|
||||
private static final BigDecimal ZERO = BigDecimal.ZERO;
|
||||
|
||||
@Override
|
||||
public IPage<TransportShipVO> selectTransportShipPage(IPage<TransportShipVO> page, TransportShipVO ship) {
|
||||
@@ -129,12 +131,21 @@ public class TransportShipServiceImpl extends BaseServiceImpl<TransportShipMappe
|
||||
ship.setShipName(trimToEmpty(ship.getShipName()));
|
||||
ship.setShipIdentifierNo(trimToEmpty(ship.getShipIdentifierNo()).toUpperCase());
|
||||
ship.setOrganizationName(trimToEmpty(ship.getOrganizationName()));
|
||||
ship.setNavigationArea(trimToEmpty(ship.getNavigationArea()));
|
||||
ship.setOwnershipRegistrationNo(trimToEmpty(ship.getOwnershipRegistrationNo()));
|
||||
ship.setInitialRegistrationNo(trimToEmpty(ship.getInitialRegistrationNo()));
|
||||
ship.setShipOwner(trimToNull(ship.getShipOwner()));
|
||||
ship.setShipInspectionNo(trimToNull(ship.getShipInspectionNo()));
|
||||
ship.setShipType(trimToEmpty(ship.getShipType()));
|
||||
ship.setOwnershipCertImage(trimToNull(ship.getOwnershipCertImage()));
|
||||
ship.setSafetyCertImage(trimToNull(ship.getSafetyCertImage()));
|
||||
ship.setNationalityCertImage(trimToNull(ship.getNationalityCertImage()));
|
||||
ship.setSafeManningCertImage(trimToNull(ship.getSafeManningCertImage()));
|
||||
ship.setBusinessTransportCertNo(trimToEmpty(ship.getBusinessTransportCertNo()));
|
||||
ship.setBusinessTransportCertImage(trimToNull(ship.getBusinessTransportCertImage()));
|
||||
ship.setLeaseContractImage(trimToNull(ship.getLeaseContractImage()));
|
||||
ship.setShipLessee(trimToNull(ship.getShipLessee()));
|
||||
ship.setShipOperator(trimToNull(ship.getShipOperator()));
|
||||
ship.setRemark(trimToNull(ship.getRemark()));
|
||||
if (ship.getNationalityCertLongTerm() == null) {
|
||||
ship.setNationalityCertLongTerm(DEFAULT_FALSE);
|
||||
@@ -163,14 +174,43 @@ public class TransportShipServiceImpl extends BaseServiceImpl<TransportShipMappe
|
||||
if (Func.isEmpty(ship.getOrganizationName())) {
|
||||
throw new ServiceException("所属组织不能为空");
|
||||
}
|
||||
if (Func.isEmpty(ship.getNavigationArea())) {
|
||||
throw new ServiceException("航区不能为空");
|
||||
}
|
||||
if (!"A级".equals(ship.getNavigationArea()) && !"B级".equals(ship.getNavigationArea())) {
|
||||
throw new ServiceException("航区只能选择A级或B级");
|
||||
}
|
||||
if (Func.isEmpty(ship.getOwnershipRegistrationNo())) {
|
||||
throw new ServiceException("登记号码不能为空");
|
||||
}
|
||||
if (Func.isEmpty(ship.getInitialRegistrationNo())) {
|
||||
throw new ServiceException("初次登记号码不能为空");
|
||||
}
|
||||
if (Func.isEmpty(ship.getGrossTonnage())) {
|
||||
throw new ServiceException("总吨不能为空");
|
||||
}
|
||||
if (Func.isEmpty(ship.getNetTonnage())) {
|
||||
throw new ServiceException("净吨不能为空");
|
||||
}
|
||||
if (Func.isEmpty(ship.getShipInspectionNo())) {
|
||||
throw new ServiceException("船检登记号不能为空");
|
||||
}
|
||||
if (Func.isEmpty(ship.getShipType())) {
|
||||
throw new ServiceException("船舶类型不能为空");
|
||||
}
|
||||
if (ship.getNationalityCertLongTerm() != 1 && Func.isEmpty(ship.getNationalityCertEndDate())) {
|
||||
throw new ServiceException("国籍证有效期至不能为空");
|
||||
if (ship.getNationalityCertLongTerm() != 1
|
||||
&& (Func.isEmpty(ship.getNationalityCertStartDate()) || Func.isEmpty(ship.getNationalityCertEndDate()))) {
|
||||
throw new ServiceException("船舶国籍证书有效期不能为空");
|
||||
}
|
||||
if (ship.getSafeManningCertLongTerm() != 1 && Func.isEmpty(ship.getSafeManningCertEndDate())) {
|
||||
throw new ServiceException("最低安全配员证书有效期至不能为空");
|
||||
if (ship.getSafeManningCertLongTerm() != 1
|
||||
&& (Func.isEmpty(ship.getSafeManningCertStartDate()) || Func.isEmpty(ship.getSafeManningCertEndDate()))) {
|
||||
throw new ServiceException("最低安全配员证书有效期不能为空");
|
||||
}
|
||||
if (Func.isEmpty(ship.getBusinessTransportCertNo())) {
|
||||
throw new ServiceException("营业运输证证书编号不能为空");
|
||||
}
|
||||
if (Func.isEmpty(ship.getBusinessTransportCertIssueDate())) {
|
||||
throw new ServiceException("营业运输证发证日期不能为空");
|
||||
}
|
||||
if (ship.getBusinessTransportCertLongTerm() != 1 && Func.isEmpty(ship.getBusinessTransportCertEndDate())) {
|
||||
throw new ServiceException("营业运输证有效期至不能为空");
|
||||
@@ -178,9 +218,29 @@ public class TransportShipServiceImpl extends BaseServiceImpl<TransportShipMappe
|
||||
validateLength(ship.getShipName(), NAME_MAX_LENGTH, "船舶名不能超过50字");
|
||||
validateLength(ship.getShipIdentifierNo(), SHORT_TEXT_MAX_LENGTH, "船舶识别号不能超过50字");
|
||||
validateLength(ship.getOrganizationName(), NAME_MAX_LENGTH, "所属组织不能超过50字");
|
||||
validateLength(ship.getNavigationArea(), SHORT_TEXT_MAX_LENGTH, "航区不能超过50字");
|
||||
validateLength(ship.getOwnershipRegistrationNo(), SHORT_TEXT_MAX_LENGTH, "登记号码不能超过50字");
|
||||
validateLength(ship.getInitialRegistrationNo(), SHORT_TEXT_MAX_LENGTH, "初次登记号码不能超过50字");
|
||||
validateLength(ship.getShipOwner(), NAME_MAX_LENGTH, "船舶所有人不能超过50字");
|
||||
validateLength(ship.getShipInspectionNo(), SHORT_TEXT_MAX_LENGTH, "船检登记号不能超过50字");
|
||||
validateLength(ship.getShipType(), SHORT_TEXT_MAX_LENGTH, "船舶类型不能超过50字");
|
||||
validateLength(ship.getBusinessTransportCertNo(), SHORT_TEXT_MAX_LENGTH, "营业运输证证书编号不能超过50字");
|
||||
validateLength(ship.getShipLessee(), NAME_MAX_LENGTH, "船舶承租人不能超过50字");
|
||||
validateLength(ship.getShipOperator(), NAME_MAX_LENGTH, "船舶经营人不能超过50字");
|
||||
validateLength(ship.getRemark(), REMARK_MAX_LENGTH, "备注不能超过200字");
|
||||
validateNonNegative(ship.getTotalLength(), "总长不能小于0");
|
||||
validateNonNegative(ship.getShipWidth(), "船宽不能小于0");
|
||||
validateNonNegative(ship.getMoldedDepth(), "型深不能小于0");
|
||||
validateNonNegative(ship.getMaxShipHeight(), "最大船高不能小于0");
|
||||
validateNonNegative(ship.getLightDraft(), "空载吃水不能小于0");
|
||||
validateNonNegative(ship.getFullLoadDraft(), "满载吃水不能小于0");
|
||||
validateNonNegative(ship.getGrossTonnage(), "总吨不能小于0");
|
||||
validateNonNegative(ship.getNetTonnage(), "净吨不能小于0");
|
||||
validateDateRange(ship.getKeelLayingDate(), ship.getBuildCompletionDate(), "建造完工日期不能早于安放龙骨日期");
|
||||
validateDateRange(ship.getNationalityCertStartDate(), ship.getNationalityCertEndDate(), "国籍证结束日期不能早于开始日期");
|
||||
validateDateRange(ship.getSafeManningCertStartDate(), ship.getSafeManningCertEndDate(), "最低安全配员证书结束日期不能早于开始日期");
|
||||
validateDateRange(ship.getLeaseStartDate(), ship.getLeaseEndDate(), "终止日期不能早于起租日期");
|
||||
validateDateRange(ship.getBusinessTransportCertIssueDate(), ship.getBusinessTransportCertEndDate(), "营业运输证有效期至不能早于发证日期");
|
||||
}
|
||||
|
||||
private void checkUniqueIdentifier(TransportShip ship) {
|
||||
@@ -199,6 +259,18 @@ public class TransportShipServiceImpl extends BaseServiceImpl<TransportShipMappe
|
||||
}
|
||||
}
|
||||
|
||||
private void validateNonNegative(BigDecimal value, String message) {
|
||||
if (value != null && value.compareTo(ZERO) < 0) {
|
||||
throw new ServiceException(message);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateDateRange(LocalDate startDate, LocalDate endDate, String message) {
|
||||
if (startDate != null && endDate != null && endDate.isBefore(startDate)) {
|
||||
throw new ServiceException(message);
|
||||
}
|
||||
}
|
||||
|
||||
private Long defaultZero(Long value) {
|
||||
return value == null ? 0L : value;
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ public class TransportVehicleServiceImpl extends BaseServiceImpl<TransportVehicl
|
||||
private void prepare(TransportVehicle vehicle) {
|
||||
vehicle.setOrganizationName(trimToEmpty(vehicle.getOrganizationName()));
|
||||
vehicle.setPlateNo(trimToEmpty(vehicle.getPlateNo()).toUpperCase());
|
||||
vehicle.setPlateColor(trimToNull(vehicle.getPlateColor()));
|
||||
vehicle.setVehicleType(trimToEmpty(vehicle.getVehicleType()));
|
||||
vehicle.setBusinessRelation(trimToEmpty(vehicle.getBusinessRelation()));
|
||||
vehicle.setEnergyType(trimToEmpty(vehicle.getEnergyType()));
|
||||
@@ -138,6 +139,9 @@ public class TransportVehicleServiceImpl extends BaseServiceImpl<TransportVehicl
|
||||
vehicle.setRoadTransportCertNo(trimToEmpty(vehicle.getRoadTransportCertNo()));
|
||||
vehicle.setRegistrationNo(trimToEmpty(vehicle.getRegistrationNo()));
|
||||
vehicle.setDrivingLicenseImage(trimToNull(vehicle.getDrivingLicenseImage()));
|
||||
vehicle.setDrivingLicenseMainBack(trimToNull(vehicle.getDrivingLicenseMainBack()));
|
||||
vehicle.setDrivingLicenseViceFront(trimToNull(vehicle.getDrivingLicenseViceFront()));
|
||||
vehicle.setDrivingLicenseViceBack(trimToNull(vehicle.getDrivingLicenseViceBack()));
|
||||
vehicle.setRoadTransportCertImage(trimToNull(vehicle.getRoadTransportCertImage()));
|
||||
vehicle.setRegistrationImage(trimToNull(vehicle.getRegistrationImage()));
|
||||
vehicle.setRemark(trimToNull(vehicle.getRemark()));
|
||||
@@ -168,6 +172,9 @@ public class TransportVehicleServiceImpl extends BaseServiceImpl<TransportVehicl
|
||||
if (!PLATE_NO_PATTERN.matcher(vehicle.getPlateNo()).matches()) {
|
||||
throw new ServiceException("车牌号格式不正确");
|
||||
}
|
||||
if (Func.isEmpty(vehicle.getPlateColor())) {
|
||||
throw new ServiceException("车牌颜色不能为空");
|
||||
}
|
||||
if (Func.isEmpty(vehicle.getVehicleType())) {
|
||||
throw new ServiceException("车辆类型不能为空");
|
||||
}
|
||||
@@ -183,14 +190,14 @@ public class TransportVehicleServiceImpl extends BaseServiceImpl<TransportVehicl
|
||||
if (Func.isEmpty(vehicle.getDrivingLicenseNo())) {
|
||||
throw new ServiceException("行驶证档案编号不能为空");
|
||||
}
|
||||
if (vehicle.getDrivingLicenseLongTerm() != 1 && Func.isEmpty(vehicle.getDrivingLicenseEndDate())) {
|
||||
throw new ServiceException("行驶证有效期止不能为空");
|
||||
if (Func.isEmpty(vehicle.getDrivingLicenseEndDate())) {
|
||||
throw new ServiceException("行驶证有效期不能为空");
|
||||
}
|
||||
if (Func.isEmpty(vehicle.getRoadTransportCertNo())) {
|
||||
throw new ServiceException("道路运输证号不能为空");
|
||||
}
|
||||
if (vehicle.getRoadTransportCertLongTerm() != 1 && Func.isEmpty(vehicle.getRoadTransportCertEndDate())) {
|
||||
throw new ServiceException("道路运输证有效期止不能为空");
|
||||
if (Func.isEmpty(vehicle.getRoadTransportCertEndDate())) {
|
||||
throw new ServiceException("道路运输证有效期不能为空");
|
||||
}
|
||||
if (vehicle.getAnnualReviewLongTerm() != 1 && Func.isEmpty(vehicle.getAnnualReviewEndDate())) {
|
||||
throw new ServiceException("道路运输年审有效期不能为空");
|
||||
@@ -204,6 +211,7 @@ public class TransportVehicleServiceImpl extends BaseServiceImpl<TransportVehicl
|
||||
validateNonNegative(vehicle.getApprovedLoadKg(), "核定载质量不能小于0");
|
||||
validateNonNegative(vehicle.getTractionMassKg(), "准牵引总质量不能小于0");
|
||||
validateLength(vehicle.getOrganizationName(), ORG_MAX_LENGTH, "所属组织不能超过50字");
|
||||
validateLength(vehicle.getPlateColor(), SHORT_TEXT_MAX_LENGTH, "车牌颜色不能超过50字");
|
||||
validateLength(vehicle.getVehicleType(), SHORT_TEXT_MAX_LENGTH, "车辆类型不能超过50字");
|
||||
validateLength(vehicle.getBusinessRelation(), SHORT_TEXT_MAX_LENGTH, "业务关系不能超过50字");
|
||||
validateLength(vehicle.getEnergyType(), SHORT_TEXT_MAX_LENGTH, "能源类型不能超过50字");
|
||||
|
||||
@@ -5,23 +5,47 @@ DROP TABLE IF EXISTS `blade_transport_ship`;
|
||||
CREATE TABLE `blade_transport_ship` (
|
||||
`id` bigint(20) NOT NULL COMMENT '主键',
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`organization_name` varchar(50) NOT NULL COMMENT '所属组织',
|
||||
`ship_name` varchar(50) NOT NULL COMMENT '船舶名',
|
||||
`ship_identifier_no` varchar(50) NOT NULL COMMENT '船舶识别号',
|
||||
`organization_name` varchar(50) NOT NULL COMMENT '所属组织',
|
||||
`keel_laying_date` date DEFAULT NULL COMMENT '安放龙骨日期',
|
||||
`build_completion_date` date DEFAULT NULL COMMENT '建造完工日期',
|
||||
`total_length` decimal(12,2) DEFAULT NULL COMMENT '总长',
|
||||
`ship_width` decimal(12,2) DEFAULT NULL COMMENT '船宽',
|
||||
`molded_depth` decimal(12,2) DEFAULT NULL COMMENT '型深',
|
||||
`max_ship_height` decimal(12,2) DEFAULT NULL COMMENT '最大船高',
|
||||
`light_draft` decimal(12,2) DEFAULT NULL COMMENT '空载吃水',
|
||||
`full_load_draft` decimal(12,2) DEFAULT NULL COMMENT '满载吃水',
|
||||
`navigation_area` varchar(20) DEFAULT NULL COMMENT '航区',
|
||||
`ownership_registration_no` varchar(50) DEFAULT NULL COMMENT '登记号码',
|
||||
`initial_registration_no` varchar(50) DEFAULT NULL COMMENT '初次登记号码',
|
||||
`ship_owner` varchar(50) DEFAULT NULL COMMENT '船舶所有人',
|
||||
`ownership_acquisition_date` date DEFAULT NULL COMMENT '取得所有权日期',
|
||||
`ship_inspection_no` varchar(50) DEFAULT NULL COMMENT '船检登记号',
|
||||
`ship_type` varchar(50) NOT NULL COMMENT '船舶类型',
|
||||
`gross_tonnage` decimal(12,2) DEFAULT NULL COMMENT '总吨',
|
||||
`net_tonnage` decimal(12,2) DEFAULT NULL COMMENT '净吨',
|
||||
`ownership_cert_image` varchar(1000) DEFAULT NULL COMMENT '船舶所有权证书图片',
|
||||
`safety_cert_image` varchar(1000) DEFAULT NULL COMMENT '内河船舶安全与环保证书图片',
|
||||
`nationality_cert_start_date` date DEFAULT NULL COMMENT '国籍证有效期自',
|
||||
`nationality_cert_end_date` date DEFAULT NULL COMMENT '国籍证有效期至',
|
||||
`nationality_cert_long_term` int(11) DEFAULT '0' COMMENT '国籍证长期有效:0否 1是',
|
||||
`nationality_cert_image` varchar(1000) DEFAULT NULL COMMENT '国籍证图片',
|
||||
`safe_manning_cert_start_date` date DEFAULT NULL COMMENT '最低安全配员证书有效期自',
|
||||
`safe_manning_cert_end_date` date DEFAULT NULL COMMENT '最低安全配员证书有效期至',
|
||||
`safe_manning_cert_long_term` int(11) DEFAULT '0' COMMENT '最低安全配员证书长期有效:0否 1是',
|
||||
`safe_manning_cert_image` varchar(1000) DEFAULT NULL COMMENT '最低安全配员证书图片',
|
||||
`business_transport_cert_no` varchar(50) DEFAULT NULL COMMENT '营业运输证证书编号',
|
||||
`business_transport_cert_issue_date` date DEFAULT NULL COMMENT '营业运输证发证日期',
|
||||
`business_transport_cert_end_date` date DEFAULT NULL COMMENT '营业运输证有效期至',
|
||||
`business_transport_cert_long_term` int(11) DEFAULT '0' COMMENT '营业运输证长期有效:0否 1是',
|
||||
`business_transport_cert_image` varchar(1000) DEFAULT NULL COMMENT '营业运输证图片',
|
||||
`lease_start_date` date DEFAULT NULL COMMENT '起租日期',
|
||||
`lease_end_date` date DEFAULT NULL COMMENT '承租有效期至',
|
||||
`lease_long_term` int(11) DEFAULT '0' COMMENT '承租长期有效:0否 1是',
|
||||
`lease_contract_image` varchar(1000) DEFAULT NULL COMMENT '承租合同图片',
|
||||
`ship_lessee` varchar(50) DEFAULT NULL COMMENT '船舶承租人',
|
||||
`ship_operator` varchar(50) DEFAULT NULL COMMENT '船舶经营人',
|
||||
`remark` varchar(200) DEFAULT NULL COMMENT '备注',
|
||||
`create_user` bigint(20) DEFAULT NULL COMMENT '创建人',
|
||||
`create_dept` bigint(20) DEFAULT NULL COMMENT '创建部门',
|
||||
|
||||
25
doc/sql/transport/blade_transport_ship_patch_20260730.sql
Normal file
25
doc/sql/transport/blade_transport_ship_patch_20260730.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
ALTER TABLE `blade_transport_ship`
|
||||
ADD COLUMN `keel_laying_date` date DEFAULT NULL COMMENT '安放龙骨日期' AFTER `ship_identifier_no`,
|
||||
ADD COLUMN `build_completion_date` date DEFAULT NULL COMMENT '建造完工日期' AFTER `keel_laying_date`,
|
||||
ADD COLUMN `total_length` decimal(12,2) DEFAULT NULL COMMENT '总长' AFTER `build_completion_date`,
|
||||
ADD COLUMN `ship_width` decimal(12,2) DEFAULT NULL COMMENT '船宽' AFTER `total_length`,
|
||||
ADD COLUMN `molded_depth` decimal(12,2) DEFAULT NULL COMMENT '型深' AFTER `ship_width`,
|
||||
ADD COLUMN `max_ship_height` decimal(12,2) DEFAULT NULL COMMENT '最大船高' AFTER `molded_depth`,
|
||||
ADD COLUMN `light_draft` decimal(12,2) DEFAULT NULL COMMENT '空载吃水' AFTER `max_ship_height`,
|
||||
ADD COLUMN `full_load_draft` decimal(12,2) DEFAULT NULL COMMENT '满载吃水' AFTER `light_draft`,
|
||||
ADD COLUMN `navigation_area` varchar(20) DEFAULT NULL COMMENT '航区' AFTER `full_load_draft`,
|
||||
ADD COLUMN `ownership_registration_no` varchar(50) DEFAULT NULL COMMENT '登记号码' AFTER `navigation_area`,
|
||||
ADD COLUMN `initial_registration_no` varchar(50) DEFAULT NULL COMMENT '初次登记号码' AFTER `ownership_registration_no`,
|
||||
ADD COLUMN `ship_owner` varchar(50) DEFAULT NULL COMMENT '船舶所有人' AFTER `initial_registration_no`,
|
||||
ADD COLUMN `ownership_acquisition_date` date DEFAULT NULL COMMENT '取得所有权日期' AFTER `ship_owner`,
|
||||
ADD COLUMN `gross_tonnage` decimal(12,2) DEFAULT NULL COMMENT '总吨' AFTER `ship_type`,
|
||||
ADD COLUMN `net_tonnage` decimal(12,2) DEFAULT NULL COMMENT '净吨' AFTER `gross_tonnage`,
|
||||
ADD COLUMN `ownership_cert_image` varchar(1000) DEFAULT NULL COMMENT '船舶所有权证书图片' AFTER `net_tonnage`,
|
||||
ADD COLUMN `safety_cert_image` varchar(1000) DEFAULT NULL COMMENT '内河船舶安全与环保证书图片' AFTER `ownership_cert_image`,
|
||||
ADD COLUMN `nationality_cert_start_date` date DEFAULT NULL COMMENT '国籍证有效期自' AFTER `safety_cert_image`,
|
||||
ADD COLUMN `safe_manning_cert_start_date` date DEFAULT NULL COMMENT '最低安全配员证书有效期自' AFTER `nationality_cert_image`,
|
||||
ADD COLUMN `business_transport_cert_no` varchar(50) DEFAULT NULL COMMENT '营业运输证证书编号' AFTER `safe_manning_cert_image`,
|
||||
ADD COLUMN `business_transport_cert_issue_date` date DEFAULT NULL COMMENT '营业运输证发证日期' AFTER `business_transport_cert_no`,
|
||||
ADD COLUMN `lease_start_date` date DEFAULT NULL COMMENT '起租日期' AFTER `business_transport_cert_image`,
|
||||
ADD COLUMN `ship_lessee` varchar(50) DEFAULT NULL COMMENT '船舶承租人' AFTER `lease_contract_image`,
|
||||
ADD COLUMN `ship_operator` varchar(50) DEFAULT NULL COMMENT '船舶经营人' AFTER `ship_lessee`;
|
||||
@@ -7,6 +7,7 @@ CREATE TABLE `blade_transport_vehicle` (
|
||||
`tenant_id` varchar(12) DEFAULT '000000' COMMENT '租户ID',
|
||||
`organization_name` varchar(50) NOT NULL COMMENT '所属组织',
|
||||
`plate_no` varchar(16) NOT NULL COMMENT '车牌号',
|
||||
`plate_color` varchar(20) DEFAULT NULL COMMENT '车牌颜色',
|
||||
`vehicle_type` varchar(50) NOT NULL COMMENT '车辆类型',
|
||||
`outer_length` int(11) DEFAULT NULL COMMENT '外廓长度,毫米',
|
||||
`outer_width` int(11) DEFAULT NULL COMMENT '外廓宽度,毫米',
|
||||
@@ -22,7 +23,10 @@ CREATE TABLE `blade_transport_vehicle` (
|
||||
`driving_license_start_date` date DEFAULT NULL COMMENT '行驶证有效期起',
|
||||
`driving_license_end_date` date DEFAULT NULL COMMENT '行驶证有效期止',
|
||||
`driving_license_long_term` int(11) DEFAULT '0' COMMENT '行驶证长期有效:0否 1是',
|
||||
`driving_license_image` varchar(1000) DEFAULT NULL COMMENT '行驶证图片',
|
||||
`driving_license_image` varchar(1000) DEFAULT NULL COMMENT '行驶证主页正面',
|
||||
`driving_license_main_back` varchar(1000) DEFAULT NULL COMMENT '行驶证主页反面',
|
||||
`driving_license_vice_front` varchar(1000) DEFAULT NULL COMMENT '行驶证副页正面',
|
||||
`driving_license_vice_back` varchar(1000) DEFAULT NULL COMMENT '行驶证副页反面',
|
||||
`road_transport_cert_no` varchar(50) NOT NULL COMMENT '道路运输证号',
|
||||
`road_transport_cert_start_date` date DEFAULT NULL COMMENT '道路运输证有效期起',
|
||||
`road_transport_cert_end_date` date DEFAULT NULL COMMENT '道路运输证有效期止',
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE `blade_transport_vehicle`
|
||||
ADD COLUMN `plate_color` varchar(20) DEFAULT NULL COMMENT '车牌颜色' AFTER `plate_no`,
|
||||
MODIFY COLUMN `driving_license_image` varchar(1000) DEFAULT NULL COMMENT '行驶证主页正面',
|
||||
ADD COLUMN `driving_license_main_back` varchar(1000) DEFAULT NULL COMMENT '行驶证主页反面' AFTER `driving_license_image`,
|
||||
ADD COLUMN `driving_license_vice_front` varchar(1000) DEFAULT NULL COMMENT '行驶证副页正面' AFTER `driving_license_main_back`,
|
||||
ADD COLUMN `driving_license_vice_back` varchar(1000) DEFAULT NULL COMMENT '行驶证副页反面' AFTER `driving_license_vice_front`;
|
||||
Reference in New Issue
Block a user