✨ 各业务模块列表与导出补齐创建人及创建时间
统一 VO/Wrapper/ExportExcel 返回并填充 createUserName,导出同步展示创建人、创建时间。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+7
@@ -52,6 +52,13 @@ public class AirportMasterVO extends AirportMaster {
|
||||
@Schema(description = "导入错误信息")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+4
@@ -49,6 +49,10 @@ public class FeeItemVO extends FeeItem {
|
||||
@Schema(description = "组织")
|
||||
private String createDeptName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人")
|
||||
private String updateUserName;
|
||||
|
||||
+7
@@ -52,6 +52,13 @@ public class PortTerminalVO extends PortTerminal {
|
||||
@Schema(description = "导入错误信息")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+7
@@ -52,6 +52,13 @@ public class RailwayStationVO extends RailwayStation {
|
||||
@Schema(description = "导入错误信息")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+7
@@ -80,6 +80,13 @@ public class AccidentRecordVO extends AccidentRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+4
@@ -68,6 +68,10 @@ public class AnnualInspectionRecordVO extends AnnualInspectionRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人姓名")
|
||||
private String updateUserName;
|
||||
|
||||
+4
@@ -58,6 +58,10 @@ public class CustomerArchiveVO extends CustomerArchive {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "联系人")
|
||||
private List<CustomerContactVO> contacts = new ArrayList<>();
|
||||
|
||||
+4
@@ -69,4 +69,8 @@ public class DriverVO extends Driver {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate warningDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -25,5 +25,8 @@ public class EquipmentLedgerVO extends EquipmentLedger {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
@TableField(exist = false)
|
||||
private String updateUserName;
|
||||
}
|
||||
|
||||
+4
@@ -26,6 +26,10 @@ public class EtcRecordVO extends EtcRecord {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人姓名")
|
||||
private String updateUserName;
|
||||
|
||||
+7
@@ -63,6 +63,13 @@ public class InsuranceRecordVO extends InsuranceRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+7
@@ -62,6 +62,13 @@ public class MaintenancePlanVO extends MaintenancePlan {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+7
@@ -62,6 +62,13 @@ public class MaintenanceRecordVO extends MaintenanceRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+4
@@ -66,6 +66,10 @@ public class MileageRecordVO extends MileageRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人姓名")
|
||||
private String updateUserName;
|
||||
|
||||
+4
@@ -76,6 +76,10 @@ public class OilElectricRecordVO extends OilElectricRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人姓名")
|
||||
private String updateUserName;
|
||||
|
||||
+4
@@ -49,6 +49,10 @@ public class OtherExpenseRecordVO extends OtherExpenseRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人姓名")
|
||||
private String updateUserName;
|
||||
|
||||
+7
@@ -63,6 +63,13 @@ public class TireReplacementRecordVO extends TireReplacementRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+4
@@ -57,6 +57,10 @@ public class TransportChangeRecordVO extends TransportChangeRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "更新人姓名")
|
||||
private String updateUserName;
|
||||
|
||||
+4
@@ -62,4 +62,8 @@ public class TransportShipVO extends TransportShip {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate warningDate;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -76,4 +76,8 @@ public class TransportVehicleVO extends TransportVehicle {
|
||||
@Schema(description = "绑定司机")
|
||||
private String boundDriver;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -63,6 +63,13 @@ public class ViolationRecordVO extends ViolationRecord {
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTimeEnd;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "创建人姓名")
|
||||
private String createUserName;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
|
||||
+3
@@ -102,6 +102,9 @@ public class AirportMasterExportExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
|
||||
+3
@@ -50,6 +50,9 @@ public class FeeItemExportExcel implements Serializable {
|
||||
@ExcelProperty("组织")
|
||||
private String createDeptName;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
|
||||
+3
@@ -80,6 +80,9 @@ public class PortTerminalExportExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
|
||||
+3
@@ -92,6 +92,9 @@ public class RailwayStationExportExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("更新人")
|
||||
private String updateUserName;
|
||||
|
||||
|
||||
+1
@@ -323,6 +323,7 @@ public class AirportMasterServiceImpl extends BaseServiceImpl<AirportMasterMappe
|
||||
excel.setLatitude(scaleCoordinate(airportMaster.getLatitude(), MIN_LATITUDE, MAX_LATITUDE));
|
||||
excel.setDataSource(normalizeDataSource(airportMaster.getDataSource()));
|
||||
excel.setStatusName(Objects.equals(airportMaster.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||
excel.setCreateUserName(UserCache.getUserRealName(airportMaster.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(airportMaster.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+1
@@ -228,6 +228,7 @@ public class FeeItemServiceImpl extends BaseServiceImpl<FeeItemMapper, FeeItem>
|
||||
excel.setCreateDeptName(
|
||||
Func.isEmpty(feeItem.getCreateDept()) ? "" : SysCache.getDeptName(feeItem.getCreateDept())
|
||||
);
|
||||
excel.setCreateUserName(UserCache.getUserRealName(feeItem.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(feeItem.getUpdateUser()));
|
||||
excel.setStatusName(Objects.equals(feeItem.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||
return excel;
|
||||
|
||||
+1
@@ -357,6 +357,7 @@ public class PortTerminalServiceImpl extends BaseServiceImpl<PortTerminalMapper,
|
||||
excel.setLatitude(scaleCoordinate(portTerminal.getLatitude(), MIN_LATITUDE, MAX_LATITUDE));
|
||||
excel.setDataSource(normalizeDataSource(portTerminal.getDataSource()));
|
||||
excel.setStatusName(Objects.equals(portTerminal.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||
excel.setCreateUserName(UserCache.getUserRealName(portTerminal.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(portTerminal.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+1
@@ -349,6 +349,7 @@ public class RailwayStationServiceImpl extends BaseServiceImpl<RailwayStationMap
|
||||
excel.setLatitude(formatCoordinate(railwayStation.getLatitude(), MIN_LATITUDE, MAX_LATITUDE));
|
||||
excel.setDataSource(normalizeDataSource(railwayStation.getDataSource()));
|
||||
excel.setStatusName(Objects.equals(railwayStation.getStatus(), STATUS_ENABLED) ? "启用" : "停用");
|
||||
excel.setCreateUserName(UserCache.getUserRealName(railwayStation.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(railwayStation.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ public class AirportMasterWrapper extends BaseEntityWrapper<AirportMaster, Airpo
|
||||
public AirportMasterVO entityVO(AirportMaster airportMaster) {
|
||||
AirportMasterVO airportMasterVO = Objects.requireNonNull(BeanUtil.copyProperties(airportMaster, AirportMasterVO.class));
|
||||
airportMasterVO.setRegionCode(airportMaster.getDistrictCode());
|
||||
airportMasterVO.setCreateUserName(UserCache.getUserRealName(airportMaster.getCreateUser()));
|
||||
airportMasterVO.setUpdateUserName(UserCache.getUserRealName(airportMaster.getUpdateUser()));
|
||||
return airportMasterVO;
|
||||
}
|
||||
|
||||
+1
@@ -52,6 +52,7 @@ public class FeeItemWrapper extends BaseEntityWrapper<FeeItem, FeeItemVO> {
|
||||
feeItemVO.setCreateDeptName(
|
||||
Func.isEmpty(feeItem.getCreateDept()) ? "" : SysCache.getDeptName(feeItem.getCreateDept())
|
||||
);
|
||||
feeItemVO.setCreateUserName(UserCache.getUserRealName(feeItem.getCreateUser()));
|
||||
feeItemVO.setUpdateUserName(UserCache.getUserRealName(feeItem.getUpdateUser()));
|
||||
return feeItemVO;
|
||||
}
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ public class PortTerminalWrapper extends BaseEntityWrapper<PortTerminal, PortTer
|
||||
public PortTerminalVO entityVO(PortTerminal portTerminal) {
|
||||
PortTerminalVO portTerminalVO = Objects.requireNonNull(BeanUtil.copyProperties(portTerminal, PortTerminalVO.class));
|
||||
portTerminalVO.setRegionCode(portTerminal.getDistrictCode());
|
||||
portTerminalVO.setCreateUserName(UserCache.getUserRealName(portTerminal.getCreateUser()));
|
||||
portTerminalVO.setUpdateUserName(UserCache.getUserRealName(portTerminal.getUpdateUser()));
|
||||
return portTerminalVO;
|
||||
}
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ public class RailwayStationWrapper extends BaseEntityWrapper<RailwayStation, Rai
|
||||
public RailwayStationVO entityVO(RailwayStation railwayStation) {
|
||||
RailwayStationVO railwayStationVO = Objects.requireNonNull(BeanUtil.copyProperties(railwayStation, RailwayStationVO.class));
|
||||
railwayStationVO.setRegionCode(railwayStation.getDistrictCode());
|
||||
railwayStationVO.setCreateUserName(UserCache.getUserRealName(railwayStation.getCreateUser()));
|
||||
railwayStationVO.setUpdateUserName(UserCache.getUserRealName(railwayStation.getUpdateUser()));
|
||||
return railwayStationVO;
|
||||
}
|
||||
|
||||
+2
-1
@@ -37,6 +37,7 @@ import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.annotation.PreAuth;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
@@ -200,7 +201,7 @@ public class CustomerArchiveController extends BladeController {
|
||||
LambdaQueryWrapper<CustomerArchive> queryWrapper = Wrappers.<CustomerArchive>lambdaQuery()
|
||||
.eq(CustomerArchive::getIsDeleted, 0)
|
||||
.orderByDesc(CustomerArchive::getCreateTime);
|
||||
if (!AuthUtil.isAdministrator()) {
|
||||
if (!TransportBusinessSupport.isAdministrator()) {
|
||||
Long userId = AuthUtil.getUserId();
|
||||
queryWrapper.and(wrapper -> wrapper
|
||||
.exists("SELECT 1 FROM blade_user_customer_scope bucs WHERE bucs.user_id = " + userId
|
||||
|
||||
+3
@@ -81,6 +81,9 @@ public class AccidentRecordExportExcel implements Serializable {
|
||||
@ExcelProperty("事故原因及损坏情况")
|
||||
private String accidentReasonDamage;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+3
@@ -81,6 +81,9 @@ public class AnnualInspectionRecordExportExcel implements Serializable {
|
||||
@ExcelProperty("评定(复核)单位")
|
||||
private String assessmentUnit;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+3
@@ -88,6 +88,9 @@ public class CommonAddressExportExcel implements Serializable {
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
+3
@@ -93,6 +93,9 @@ public class CommonCargoExportExcel implements Serializable {
|
||||
@ExcelProperty("组织")
|
||||
private String deptName;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("更新时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
+3
@@ -93,6 +93,9 @@ public class CustomerArchiveExcel implements Serializable {
|
||||
@ExcelProperty("法人/负责人")
|
||||
private String legalPerson;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
+7
@@ -35,6 +35,7 @@ import lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 司机管理 Excel
|
||||
@@ -128,4 +129,10 @@ public class DriverExcel implements Serializable {
|
||||
@ExcelProperty("所属组织 *")
|
||||
private String organizationName;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -7,10 +7,12 @@ package org.springblade.transport.excel;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnore;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.format.DateTimeFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备台账 Excel
|
||||
@@ -29,5 +31,7 @@ public class EquipmentLedgerExcel implements Serializable {
|
||||
@ExcelProperty("规格型号") private String specificationModel;
|
||||
@ExcelProperty(value = "出厂日期", converter = org.springblade.common.excel.LenientDateStringConverter.class) private String factoryDate;
|
||||
@ExcelProperty("备注") private String remark;
|
||||
@ExcelProperty("创建人") private String createUserName;
|
||||
@ExcelProperty("创建时间") @DateTimeFormat("yyyy-MM-dd HH:mm:ss") private Date createTime;
|
||||
@ExcelIgnore private String errorMessage;
|
||||
}
|
||||
|
||||
+3
@@ -49,6 +49,9 @@ public class EtcRecordExportExcel implements Serializable {
|
||||
@ExcelProperty("出口站")
|
||||
private String exitStation;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+3
@@ -81,6 +81,9 @@ public class InsuranceRecordExportExcel implements Serializable {
|
||||
@ExcelProperty("开票日期")
|
||||
private LocalDate invoiceDate;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+2
@@ -54,6 +54,8 @@ public class LoadingManageExcel implements Serializable {
|
||||
private String transportType;
|
||||
@ExcelProperty("数据来源")
|
||||
private String dataSource;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+6
-3
@@ -24,14 +24,17 @@ public class MaintenancePlanExportExcel extends MaintenancePlanExcel {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty(value = "创建时间", index = 12)
|
||||
@ExcelProperty(value = "创建人", index = 12)
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty(value = "创建时间", index = 13)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@ExcelProperty(value = "更新人", index = 13)
|
||||
@ExcelProperty(value = "更新人", index = 14)
|
||||
private String updateUserName;
|
||||
|
||||
@ExcelProperty(value = "更新时间", index = 14)
|
||||
@ExcelProperty(value = "更新时间", index = 15)
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
}
|
||||
|
||||
+3
@@ -96,6 +96,9 @@ public class MaintenanceRecordExcel implements Serializable {
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal mileage;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+2
@@ -69,6 +69,8 @@ public class MasterOrderWaybillExcel {
|
||||
private String businessStatus;
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
@ExcelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
@ExcelProperty("创建时间")
|
||||
|
||||
+3
@@ -70,6 +70,9 @@ public class MileageRecordExportExcel implements Serializable {
|
||||
@NumberFormat("0.00")
|
||||
private BigDecimal totalMileage;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+3
@@ -60,6 +60,9 @@ public class OilElectricRecordExportExcel implements Serializable {
|
||||
@ExcelProperty("站点")
|
||||
private String station;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+3
@@ -41,6 +41,9 @@ public class OtherExpenseRecordExportExcel implements Serializable {
|
||||
@ExcelProperty("金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+3
@@ -74,6 +74,9 @@ public class TireReplacementRecordExportExcel implements Serializable {
|
||||
@ExcelProperty("换胎说明")
|
||||
private String replacementDescription;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+3
@@ -55,6 +55,9 @@ public class TransportChangeRecordExportExcel implements Serializable {
|
||||
@ExcelProperty("变更内容")
|
||||
private String changeContent;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+7
@@ -36,6 +36,7 @@ import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 船舶管理 Excel
|
||||
@@ -144,4 +145,10 @@ public class TransportShipExcel implements Serializable {
|
||||
@ExcelProperty("船舶经营人")
|
||||
private String shipOperator;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -35,6 +35,7 @@ import lombok.Data;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 车辆管理 Excel
|
||||
@@ -83,4 +84,10 @@ public class TransportVehicleExcel implements Serializable {
|
||||
@ExcelProperty("年审有效期")
|
||||
private LocalDate annualReviewEndDate;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -94,6 +94,9 @@ public class ViolationRecordExcel implements Serializable {
|
||||
@ExcelProperty("处理结果")
|
||||
private String processResult;
|
||||
|
||||
@ExcelProperty("创建人")
|
||||
private String createUserName;
|
||||
|
||||
@ExcelProperty("创建时间")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
+2
@@ -74,6 +74,7 @@ public class AccidentRecordServiceImpl extends BaseServiceImpl<AccidentRecordMap
|
||||
records.forEach(record -> {
|
||||
record.setDirectEconomicLoss(normalizeEmptyAmount(record.getDirectEconomicLoss()));
|
||||
record.setInsuranceClaimAmount(normalizeEmptyAmount(record.getInsuranceClaimAmount()));
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
@@ -161,6 +162,7 @@ public class AccidentRecordServiceImpl extends BaseServiceImpl<AccidentRecordMap
|
||||
AccidentRecordExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(accidentRecord, AccidentRecordExportExcel.class));
|
||||
excel.setDirectEconomicLoss(normalizeEmptyAmount(accidentRecord.getDirectEconomicLoss()));
|
||||
excel.setInsuranceClaimAmount(normalizeEmptyAmount(accidentRecord.getInsuranceClaimAmount()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(accidentRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(accidentRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+2
@@ -74,6 +74,7 @@ public class AnnualInspectionRecordServiceImpl extends BaseServiceImpl<AnnualIns
|
||||
List<AnnualInspectionRecordVO> records = baseMapper.selectAnnualInspectionRecordPage(page, annualInspectionRecord);
|
||||
records.forEach(record -> {
|
||||
record.setFee(normalizeEmptyAmount(record.getFee()));
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
@@ -182,6 +183,7 @@ public class AnnualInspectionRecordServiceImpl extends BaseServiceImpl<AnnualIns
|
||||
excel.setVehicleTechnicalLevel(VEHICLE.equals(annualInspectionRecord.getVehicleType()) ? annualInspectionRecord.getVehicleTechnicalLevel() : null);
|
||||
excel.setShipInspectionType(SHIP.equals(annualInspectionRecord.getVehicleType()) ? annualInspectionRecord.getShipInspectionType() : null);
|
||||
excel.setFee(normalizeEmptyAmount(annualInspectionRecord.getFee()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(annualInspectionRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(annualInspectionRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+3
-2
@@ -161,6 +161,7 @@ public class CommonAddressServiceImpl extends BaseServiceImpl<CommonAddressMappe
|
||||
return list(queryWrapper).stream().map(address -> {
|
||||
CommonAddressExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(address, CommonAddressExportExcel.class));
|
||||
excel.setSiteCodeDisplay(TYPE_NORMAL.equals(address.getAddressType()) ? NORMAL_SITE_CODE : address.getSiteCode());
|
||||
excel.setCreateUserName(UserCache.getUserRealName(address.getCreateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
@@ -296,14 +297,14 @@ public class CommonAddressServiceImpl extends BaseServiceImpl<CommonAddressMappe
|
||||
}
|
||||
|
||||
private void validateCurrentDept(CommonAddress address) {
|
||||
if (!AuthUtil.isAdministrator() && !Objects.equals(address.getDeptId(), currentDeptId())) {
|
||||
if (!TransportBusinessSupport.isAdministrator() && !Objects.equals(address.getDeptId(), currentDeptId())) {
|
||||
throw new ServiceException("无权操作其他组织常用地址");
|
||||
}
|
||||
}
|
||||
|
||||
private void fillDisplay(CommonAddressVO address) {
|
||||
address.setSiteCodeDisplay(TYPE_NORMAL.equals(address.getAddressType()) ? NORMAL_SITE_CODE : address.getSiteCode());
|
||||
address.setReadonly(!AuthUtil.isAdministrator() && !Objects.equals(address.getDeptId(), currentDeptId()));
|
||||
address.setReadonly(!TransportBusinessSupport.isAdministrator() && !Objects.equals(address.getDeptId(), currentDeptId()));
|
||||
address.setCreateUserName(UserCache.getUserRealName(address.getCreateUser()));
|
||||
address.setUpdateUserName(UserCache.getUserRealName(address.getUpdateUser()));
|
||||
}
|
||||
|
||||
+2
@@ -30,6 +30,7 @@ import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.transport.excel.CommonCargoExcel;
|
||||
import org.springblade.transport.excel.CommonCargoExportExcel;
|
||||
@@ -118,6 +119,7 @@ public class CommonCargoServiceImpl extends BaseServiceImpl<CommonCargoMapper, C
|
||||
BeanUtil.copyProperties(record, excel);
|
||||
excel.setCargoCodeSuffix(cargoCodeSuffix(record));
|
||||
excel.setCargoValue(normalizeCargoValue(record.getCargoValue()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
+2
-2
@@ -416,7 +416,7 @@ public class ContractManageServiceImpl extends BaseServiceImpl<ContractManageMap
|
||||
private LambdaQueryWrapper<ContractManage> buildQuery(ContractManageVO contractManage) {
|
||||
TransportBusinessSupport.validateAllDept(contractManage.getAllDept(), "合同管理");
|
||||
LambdaQueryWrapper<ContractManage> queryWrapper = Wrappers.<ContractManage>lambdaQuery().eq(ContractManage::getIsDeleted, 0);
|
||||
if (AuthUtil.isAdministrator()) {
|
||||
if (TransportBusinessSupport.isAdministrator()) {
|
||||
if (Objects.equals(contractManage.getAllDept(), 1) && Func.isNotEmpty(contractManage.getOrganizationId())) {
|
||||
queryWrapper.eq(ContractManage::getOrganizationId, contractManage.getOrganizationId());
|
||||
}
|
||||
@@ -1092,7 +1092,7 @@ public class ContractManageServiceImpl extends BaseServiceImpl<ContractManageMap
|
||||
}
|
||||
|
||||
private boolean canOperateInCurrentScope(ContractManage contractManage) {
|
||||
if (AuthUtil.isAdministrator()) {
|
||||
if (TransportBusinessSupport.isAdministrator()) {
|
||||
return true;
|
||||
}
|
||||
Long currentDeptId = TransportBusinessSupport.currentDeptId("合同管理");
|
||||
|
||||
+2
@@ -35,6 +35,7 @@ import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.excel.CreditScoreQuantificationExcel;
|
||||
import org.springblade.transport.mapper.CreditRatingStandardMapper;
|
||||
import org.springblade.transport.mapper.CreditScoreCategoryMapper;
|
||||
@@ -119,6 +120,7 @@ public class CreditScoreQuantificationServiceImpl extends BaseServiceImpl<Credit
|
||||
throw new ServiceException("评分量化表不存在");
|
||||
}
|
||||
CreditScoreQuantificationVO detail = Objects.requireNonNull(BeanUtil.copyProperties(quantification, CreditScoreQuantificationVO.class));
|
||||
detail.setCreateUserName(UserCache.getUserRealName(quantification.getCreateUser()));
|
||||
detail.setCategories(loadCategories(id));
|
||||
detail.setStandards(loadStandards(id));
|
||||
return detail;
|
||||
|
||||
+6
-1
@@ -33,10 +33,12 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.core.tenant.annotation.TenantIgnore;
|
||||
import org.springblade.core.tool.jackson.JsonUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.excel.CustomerArchiveExcel;
|
||||
import org.springblade.transport.mapper.CreditRatingStandardMapper;
|
||||
import org.springblade.transport.mapper.CreditScoreCategoryMapper;
|
||||
@@ -145,6 +147,7 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
@Override
|
||||
public IPage<CustomerArchiveVO> selectCustomerArchivePage(IPage<CustomerArchiveVO> page, CustomerArchiveVO customer) {
|
||||
List<CustomerArchiveVO> records = baseMapper.selectCustomerArchivePage(page, customer, currentScopeUserId());
|
||||
records.forEach(record -> record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser())));
|
||||
fillFundUseRisk(records);
|
||||
return page.setRecords(records);
|
||||
}
|
||||
@@ -1199,6 +1202,7 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
|
||||
private CustomerArchiveVO buildDetail(CustomerArchive customer) {
|
||||
CustomerArchiveVO detail = Objects.requireNonNull(BeanUtil.copyProperties(customer, CustomerArchiveVO.class));
|
||||
detail.setCreateUserName(UserCache.getUserRealName(customer.getCreateUser()));
|
||||
Long id = customer.getId();
|
||||
detail.setContacts(loadContacts(id));
|
||||
detail.setReceiptAccounts(loadReceiptAccounts(id));
|
||||
@@ -1232,7 +1236,7 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
* 客商可见范围用户。超管返回空,表示不按用户客商授权表过滤。
|
||||
*/
|
||||
private Long currentScopeUserId() {
|
||||
return AuthUtil.isAdministrator() ? null : AuthUtil.getUserId();
|
||||
return TransportBusinessSupport.isAdministrator() ? null : AuthUtil.getUserId();
|
||||
}
|
||||
|
||||
private CustomerArchive copyCustomer(CustomerArchive customer) {
|
||||
@@ -1571,6 +1575,7 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
excel.setApplyCreditLimit(customer.getApplyCreditLimit());
|
||||
excel.setContactPhone(customer.getContactPhone());
|
||||
excel.setLegalPerson(customer.getLegalPerson());
|
||||
excel.setCreateUserName(UserCache.getUserRealName(customer.getCreateUser()));
|
||||
excel.setCreateTime(customer.getCreateTime());
|
||||
return excel;
|
||||
}
|
||||
|
||||
+6
-1
@@ -34,6 +34,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.feign.ISysClient;
|
||||
import org.springblade.system.feign.IUserClient;
|
||||
@@ -82,7 +83,9 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
@Override
|
||||
public IPage<DriverVO> selectDriverPage(IPage<DriverVO> page, DriverVO driver) {
|
||||
prepareQuery(driver);
|
||||
return page.setRecords(baseMapper.selectDriverPage(page, driver));
|
||||
List<DriverVO> records = baseMapper.selectDriverPage(page, driver);
|
||||
records.forEach(record -> record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser())));
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,6 +136,8 @@ public class DriverServiceImpl extends BaseServiceImpl<DriverMapper, Driver> imp
|
||||
public List<DriverExcel> exportDriver(Wrapper<Driver> queryWrapper) {
|
||||
return list(queryWrapper).stream().map(driver -> {
|
||||
DriverExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(driver, DriverExcel.class));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(driver.getCreateUser()));
|
||||
excel.setCreateTime(driver.getCreateTime());
|
||||
excel.setAddress((driver.getAddressRegion() == null ? "" : driver.getAddressRegion())
|
||||
+ (driver.getAddress() == null ? "" : driver.getAddress()));
|
||||
return excel;
|
||||
|
||||
+10
-2
@@ -59,7 +59,10 @@ public class EquipmentLedgerServiceImpl extends BaseServiceImpl<EquipmentLedgerM
|
||||
@Override
|
||||
public IPage<EquipmentLedgerVO> selectEquipmentLedgerPage(IPage<EquipmentLedgerVO> page, EquipmentLedgerVO equipmentLedger) {
|
||||
List<EquipmentLedgerVO> records = baseMapper.selectEquipmentLedgerPage(page, equipmentLedger);
|
||||
records.forEach(record -> record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser())));
|
||||
records.forEach(record -> {
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@@ -207,7 +210,12 @@ public class EquipmentLedgerServiceImpl extends BaseServiceImpl<EquipmentLedgerM
|
||||
@Override
|
||||
public List<EquipmentLedgerExcel> exportEquipmentLedger(Wrapper<EquipmentLedger> queryWrapper) {
|
||||
return list(queryWrapper).stream()
|
||||
.map(item -> Objects.requireNonNull(BeanUtil.copyProperties(item, EquipmentLedgerExcel.class)))
|
||||
.map(item -> {
|
||||
EquipmentLedgerExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(item, EquipmentLedgerExcel.class));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(item.getCreateUser()));
|
||||
excel.setCreateTime(item.getCreateTime());
|
||||
return excel;
|
||||
})
|
||||
.toList();
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -45,7 +45,10 @@ public class EtcRecordServiceImpl extends BaseServiceImpl<EtcRecordMapper, EtcRe
|
||||
@Override
|
||||
public IPage<EtcRecordVO> selectEtcRecordPage(IPage<EtcRecordVO> page, EtcRecordVO etcRecord) {
|
||||
List<EtcRecordVO> records = baseMapper.selectEtcRecordPage(page, etcRecord);
|
||||
records.forEach(record -> record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser())));
|
||||
records.forEach(record -> {
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@@ -124,6 +127,7 @@ public class EtcRecordServiceImpl extends BaseServiceImpl<EtcRecordMapper, EtcRe
|
||||
return list(queryWrapper).stream().map(etcRecord -> {
|
||||
EtcRecordExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(etcRecord, EtcRecordExportExcel.class));
|
||||
excel.setTransactionAmount(nonNegative(etcRecord.getTransactionAmount()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(etcRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(etcRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+2
@@ -97,6 +97,7 @@ public class InsuranceRecordServiceImpl extends BaseServiceImpl<InsuranceRecordM
|
||||
records.forEach(record -> {
|
||||
record.setInsuredAmount(normalizeEmptyAmount(record.getInsuredAmount()));
|
||||
record.setPremium(normalizeEmptyAmount(record.getPremium()));
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
@@ -198,6 +199,7 @@ public class InsuranceRecordServiceImpl extends BaseServiceImpl<InsuranceRecordM
|
||||
InsuranceRecordExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(insuranceRecord, InsuranceRecordExportExcel.class));
|
||||
excel.setInsuredAmount(normalizeEmptyAmount(insuranceRecord.getInsuredAmount()));
|
||||
excel.setPremium(normalizeEmptyAmount(insuranceRecord.getPremium()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(insuranceRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(insuranceRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+2
@@ -14,6 +14,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.jackson.JsonUtil;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.system.cache.DictCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
import org.springblade.transport.excel.LoadingManageExcel;
|
||||
@@ -326,6 +327,7 @@ public class LoadingManageServiceImpl extends BaseServiceImpl<LoadingManageMappe
|
||||
LoadingManageExcel excel = new LoadingManageExcel();
|
||||
BeanUtil.copyProperties(record, excel);
|
||||
excel.setTransportType(transportTypeName(record.getTransportType()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
excel.setCreateTime(record.getCreateTime());
|
||||
excel.setUpdateTime(record.getUpdateTime());
|
||||
excel.setBusinessStatus(LoadingManageWrapper.businessStatusName(record.getBusinessStatus()));
|
||||
|
||||
+2
@@ -69,6 +69,7 @@ public class MaintenancePlanServiceImpl extends BaseServiceImpl<MaintenancePlanM
|
||||
records.forEach(record -> {
|
||||
record.setMileage(normalizeEmptyMileage(record.getMileage()));
|
||||
record.setNextMaintenanceMileage(normalizeEmptyMileage(record.getNextMaintenanceMileage()));
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
@@ -152,6 +153,7 @@ public class MaintenancePlanServiceImpl extends BaseServiceImpl<MaintenancePlanM
|
||||
public List<MaintenancePlanExportExcel> exportMaintenancePlan(Wrapper<MaintenancePlan> queryWrapper) {
|
||||
return list(queryWrapper).stream().map(maintenancePlan -> {
|
||||
MaintenancePlanExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(maintenancePlan, MaintenancePlanExportExcel.class));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(maintenancePlan.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(maintenancePlan.getUpdateUser()));
|
||||
excel.setMileage(normalizeEmptyMileage(maintenancePlan.getMileage()));
|
||||
excel.setNextMaintenanceMileage(normalizeEmptyMileage(maintenancePlan.getNextMaintenanceMileage()));
|
||||
|
||||
+5
-1
@@ -66,7 +66,10 @@ public class MaintenanceRecordServiceImpl extends BaseServiceImpl<MaintenanceRec
|
||||
@Override
|
||||
public IPage<MaintenanceRecordVO> selectMaintenanceRecordPage(IPage<MaintenanceRecordVO> page, MaintenanceRecordVO maintenanceRecord) {
|
||||
List<MaintenanceRecordVO> records = baseMapper.selectMaintenanceRecordPage(page, maintenanceRecord);
|
||||
records.forEach(record -> record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser())));
|
||||
records.forEach(record -> {
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@@ -144,6 +147,7 @@ public class MaintenanceRecordServiceImpl extends BaseServiceImpl<MaintenanceRec
|
||||
MaintenanceRecordExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(maintenanceRecord, MaintenanceRecordExportExcel.class));
|
||||
excel.setCost(scaleAmount(maintenanceRecord.getCost()));
|
||||
excel.setMileage(scaleAmount(nonNegative(normalizeMileage(maintenanceRecord.getMileage()))));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(maintenanceRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(maintenanceRecord.getUpdateUser()));
|
||||
if (Func.isEmpty(excel.getMileageUnit())) {
|
||||
excel.setMileageUnit(defaultMileageUnit(maintenanceRecord.getVehicleType()));
|
||||
|
||||
+1
@@ -245,6 +245,7 @@ public class MasterOrderServiceImpl extends BaseServiceImpl<MasterOrderMapper, M
|
||||
waybill.getProcessJson(),
|
||||
waybill.getDriverAcceptStatus())));
|
||||
row.setRemark(waybill.getRemark());
|
||||
row.setCreateUserName(UserCache.getUserRealName(waybill.getCreateUser()));
|
||||
row.setUpdateTime(waybill.getUpdateTime());
|
||||
row.setCreateTime(waybill.getCreateTime());
|
||||
result.add(row);
|
||||
|
||||
+2
@@ -71,6 +71,7 @@ public class MileageRecordServiceImpl extends BaseServiceImpl<MileageRecordMappe
|
||||
record.setCurrentMonthMileage(normalizeEmptyMileage(record.getCurrentMonthMileage()));
|
||||
record.setMonthlyMileage(normalizeEmptyMileage(record.getMonthlyMileage()));
|
||||
record.setTotalMileage(normalizeEmptyMileage(record.getTotalMileage()));
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
@@ -157,6 +158,7 @@ public class MileageRecordServiceImpl extends BaseServiceImpl<MileageRecordMappe
|
||||
excel.setCurrentMonthMileage(normalizeEmptyMileage(mileageRecord.getCurrentMonthMileage()));
|
||||
excel.setMonthlyMileage(normalizeEmptyMileage(mileageRecord.getMonthlyMileage()));
|
||||
excel.setTotalMileage(normalizeEmptyMileage(mileageRecord.getTotalMileage()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(mileageRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(mileageRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+2
@@ -61,6 +61,7 @@ public class OilElectricRecordServiceImpl extends BaseServiceImpl<OilElectricRec
|
||||
record.setUnitPrice(normalizeEmptyAmount(record.getUnitPrice()));
|
||||
record.setTransactionAmount(normalizeEmptyAmount(record.getTransactionAmount()));
|
||||
record.setBalance(normalizeEmptyAmount(record.getBalance()));
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
@@ -150,6 +151,7 @@ public class OilElectricRecordServiceImpl extends BaseServiceImpl<OilElectricRec
|
||||
excel.setUnitPrice(normalizeEmptyAmount(oilElectricRecord.getUnitPrice()));
|
||||
excel.setTransactionAmount(normalizeEmptyAmount(oilElectricRecord.getTransactionAmount()));
|
||||
excel.setBalance(normalizeEmptyAmount(oilElectricRecord.getBalance()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(oilElectricRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(oilElectricRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+5
-1
@@ -51,7 +51,10 @@ public class OtherExpenseRecordServiceImpl extends BaseServiceImpl<OtherExpenseR
|
||||
@Override
|
||||
public IPage<OtherExpenseRecordVO> selectOtherExpenseRecordPage(IPage<OtherExpenseRecordVO> page, OtherExpenseRecordVO otherExpenseRecord) {
|
||||
List<OtherExpenseRecordVO> records = baseMapper.selectOtherExpenseRecordPage(page, otherExpenseRecord);
|
||||
records.forEach(record -> record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser())));
|
||||
records.forEach(record -> {
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@@ -130,6 +133,7 @@ public class OtherExpenseRecordServiceImpl extends BaseServiceImpl<OtherExpenseR
|
||||
return list(queryWrapper).stream().map(otherExpenseRecord -> {
|
||||
OtherExpenseRecordExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(otherExpenseRecord, OtherExpenseRecordExportExcel.class));
|
||||
excel.setAmount(nonNegative(otherExpenseRecord.getAmount()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(otherExpenseRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(otherExpenseRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+2
-2
@@ -337,7 +337,7 @@ public class ProjectApplyServiceImpl extends BaseServiceImpl<ProjectApplyMapper,
|
||||
private LambdaQueryWrapper<ProjectApply> buildQuery(ProjectApplyVO projectApply) {
|
||||
TransportBusinessSupport.validateAllDept(projectApply.getAllDept(), "项目立项");
|
||||
LambdaQueryWrapper<ProjectApply> queryWrapper = Wrappers.<ProjectApply>lambdaQuery().eq(ProjectApply::getIsDeleted, 0);
|
||||
if (AuthUtil.isAdministrator()) {
|
||||
if (TransportBusinessSupport.isAdministrator()) {
|
||||
// 超管默认可查看全部未删除数据;仅在明确指定承办组织时按组织精确筛选。
|
||||
if (Objects.equals(projectApply.getAllDept(), 1) && Func.isNotEmpty(projectApply.getUndertakeDeptId())) {
|
||||
queryWrapper.eq(ProjectApply::getUndertakeDeptId, projectApply.getUndertakeDeptId());
|
||||
@@ -951,7 +951,7 @@ public class ProjectApplyServiceImpl extends BaseServiceImpl<ProjectApplyMapper,
|
||||
}
|
||||
|
||||
private boolean canCurrentUserOperate(ProjectApply projectApply) {
|
||||
if (AuthUtil.isAdministrator()) {
|
||||
if (TransportBusinessSupport.isAdministrator()) {
|
||||
return true;
|
||||
}
|
||||
Long currentDeptId = TransportBusinessSupport.currentDeptId("项目立项");
|
||||
|
||||
+1
-1
@@ -185,7 +185,7 @@ public class TemporaryCreditLimitServiceImpl extends BaseServiceImpl<TemporaryCr
|
||||
private LambdaQueryWrapper<TemporaryCreditLimit> buildQuery(TemporaryCreditLimitVO temporaryCreditLimit) {
|
||||
TransportBusinessSupport.validateAllDept(temporaryCreditLimit.getAllDept(), "临时额度管理");
|
||||
LambdaQueryWrapper<TemporaryCreditLimit> queryWrapper = Wrappers.<TemporaryCreditLimit>lambdaQuery().eq(TemporaryCreditLimit::getIsDeleted, 0);
|
||||
if (AuthUtil.isAdministrator()) {
|
||||
if (TransportBusinessSupport.isAdministrator()) {
|
||||
if (Objects.equals(temporaryCreditLimit.getAllDept(), 1) && Func.isNotEmpty(temporaryCreditLimit.getApplyDeptId())) {
|
||||
queryWrapper.eq(TemporaryCreditLimit::getApplyDeptId, temporaryCreditLimit.getApplyDeptId());
|
||||
}
|
||||
|
||||
+2
@@ -72,6 +72,7 @@ public class TireReplacementRecordServiceImpl extends BaseServiceImpl<TireReplac
|
||||
records.forEach(record -> {
|
||||
record.setTireQuantity(normalizeEmptyInteger(record.getTireQuantity()));
|
||||
record.setReplacementCost(normalizeEmptyAmount(record.getReplacementCost()));
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
@@ -162,6 +163,7 @@ public class TireReplacementRecordServiceImpl extends BaseServiceImpl<TireReplac
|
||||
TireReplacementRecordExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(tireReplacementRecord, TireReplacementRecordExportExcel.class));
|
||||
excel.setTireQuantity(normalizeEmptyInteger(tireReplacementRecord.getTireQuantity()));
|
||||
excel.setReplacementCost(normalizeEmptyAmount(tireReplacementRecord.getReplacementCost()));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(tireReplacementRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(tireReplacementRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+5
-1
@@ -65,7 +65,10 @@ public class TransportChangeRecordServiceImpl extends BaseServiceImpl<TransportC
|
||||
@Override
|
||||
public IPage<TransportChangeRecordVO> selectTransportChangeRecordPage(IPage<TransportChangeRecordVO> page, TransportChangeRecordVO transportChangeRecord) {
|
||||
List<TransportChangeRecordVO> records = baseMapper.selectTransportChangeRecordPage(page, transportChangeRecord);
|
||||
records.forEach(record -> record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser())));
|
||||
records.forEach(record -> {
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@@ -135,6 +138,7 @@ public class TransportChangeRecordServiceImpl extends BaseServiceImpl<TransportC
|
||||
return list(queryWrapper).stream()
|
||||
.map(transportChangeRecord -> {
|
||||
TransportChangeRecordExportExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(transportChangeRecord, TransportChangeRecordExportExcel.class));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(transportChangeRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(transportChangeRecord.getUpdateUser()));
|
||||
return excel;
|
||||
})
|
||||
|
||||
+6
-1
@@ -31,6 +31,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.transport.excel.TransportShipExcel;
|
||||
import org.springblade.transport.mapper.TransportShipMapper;
|
||||
@@ -66,7 +67,9 @@ public class TransportShipServiceImpl extends BaseServiceImpl<TransportShipMappe
|
||||
@Override
|
||||
public IPage<TransportShipVO> selectTransportShipPage(IPage<TransportShipVO> page, TransportShipVO ship) {
|
||||
prepareQuery(ship);
|
||||
return page.setRecords(baseMapper.selectTransportShipPage(page, ship));
|
||||
List<TransportShipVO> records = baseMapper.selectTransportShipPage(page, ship);
|
||||
records.forEach(record -> record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser())));
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -111,6 +114,8 @@ public class TransportShipServiceImpl extends BaseServiceImpl<TransportShipMappe
|
||||
public List<TransportShipExcel> exportTransportShip(Wrapper<TransportShip> queryWrapper) {
|
||||
return list(queryWrapper).stream().map(ship -> {
|
||||
TransportShipExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(ship, TransportShipExcel.class));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(ship.getCreateUser()));
|
||||
excel.setCreateTime(ship.getCreateTime());
|
||||
excel.setConstructionDateRange(formatDateRange(
|
||||
ship.getKeelLayingDate(), ship.getBuildCompletionDate()
|
||||
));
|
||||
|
||||
+4
@@ -32,6 +32,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.transport.excel.TransportVehicleExcel;
|
||||
import org.springblade.transport.mapper.DriverMapper;
|
||||
@@ -81,6 +82,7 @@ public class TransportVehicleServiceImpl extends BaseServiceImpl<TransportVehicl
|
||||
public IPage<TransportVehicleVO> selectTransportVehiclePage(IPage<TransportVehicleVO> page, TransportVehicleVO vehicle) {
|
||||
prepareQuery(vehicle);
|
||||
List<TransportVehicleVO> records = baseMapper.selectTransportVehiclePage(page, vehicle);
|
||||
records.forEach(record -> record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser())));
|
||||
fillBoundDrivers(records);
|
||||
return page.setRecords(records);
|
||||
}
|
||||
@@ -188,6 +190,8 @@ public class TransportVehicleServiceImpl extends BaseServiceImpl<TransportVehicl
|
||||
public List<TransportVehicleExcel> exportTransportVehicle(Wrapper<TransportVehicle> queryWrapper) {
|
||||
return list(queryWrapper).stream().map(vehicle -> {
|
||||
TransportVehicleExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(vehicle, TransportVehicleExcel.class));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(vehicle.getCreateUser()));
|
||||
excel.setCreateTime(vehicle.getCreateTime());
|
||||
excel.setStatusName(vehicle.getStatus() != null && vehicle.getStatus() == 2 ? "停用" : "启用");
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+5
-1
@@ -76,7 +76,10 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
||||
@Override
|
||||
public IPage<ViolationRecordVO> selectViolationRecordPage(IPage<ViolationRecordVO> page, ViolationRecordVO violationRecord) {
|
||||
List<ViolationRecordVO> records = baseMapper.selectViolationRecordPage(page, violationRecord);
|
||||
records.forEach(record -> record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser())));
|
||||
records.forEach(record -> {
|
||||
record.setCreateUserName(UserCache.getUserRealName(record.getCreateUser()));
|
||||
record.setUpdateUserName(UserCache.getUserRealName(record.getUpdateUser()));
|
||||
});
|
||||
return page.setRecords(records);
|
||||
}
|
||||
|
||||
@@ -173,6 +176,7 @@ public class ViolationRecordServiceImpl extends BaseServiceImpl<ViolationRecordM
|
||||
ViolationRecordExcel excel = Objects.requireNonNull(BeanUtil.copyProperties(violationRecord, ViolationRecordExcel.class));
|
||||
excel.setFineAmount(normalizeEmptyAmount(violationRecord.getFineAmount()));
|
||||
excel.setDeductPoints(validDeductPoints(normalizeEmptyInteger(violationRecord.getDeductPoints())));
|
||||
excel.setCreateUserName(UserCache.getUserRealName(violationRecord.getCreateUser()));
|
||||
excel.setUpdateUserName(UserCache.getUserRealName(violationRecord.getUpdateUser()));
|
||||
return excel;
|
||||
}).toList();
|
||||
|
||||
+4
-3
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.mp.base.BaseServiceImpl;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.transport.support.TransportBusinessSupport;
|
||||
import org.springblade.core.tool.jackson.JsonUtil;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.transport.mapper.LoadingManageMapper;
|
||||
@@ -1268,19 +1269,19 @@ public class VoucherManageServiceImpl extends BaseServiceImpl<VoucherManageMappe
|
||||
@Override
|
||||
public IPage<Map<String, Object>> selectableWaybillBatches(IPage<?> page, String batchNo, String createUser, Integer waybillCount, String createTimeStart, String createTimeEnd) {
|
||||
return voucherWaybillBatchMapper.selectVoucherWaybillBatchPage(page, AuthUtil.getTenantId(), batchNo, createUser, waybillCount, createTimeStart, createTimeEnd,
|
||||
!AuthUtil.isAdministrator(), currentCarrierName());
|
||||
!TransportBusinessSupport.isAdministrator(), currentCarrierName());
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> selectableWaybillBatchesByIds(List<Long> ids) {
|
||||
if (Func.isEmpty(ids)) return List.of();
|
||||
return voucherWaybillBatchMapper.selectWaybillBatchesByIds(AuthUtil.getTenantId(), ids, !AuthUtil.isAdministrator(), currentCarrierName());
|
||||
return voucherWaybillBatchMapper.selectWaybillBatchesByIds(AuthUtil.getTenantId(), ids, !TransportBusinessSupport.isAdministrator(), currentCarrierName());
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通用户只能关联承运商名称与其当前组织名称一致的运单批次;超级管理员不受此限制。
|
||||
*/
|
||||
private String currentCarrierName() {
|
||||
if (AuthUtil.isAdministrator()) return null;
|
||||
if (TransportBusinessSupport.isAdministrator()) return null;
|
||||
Long currentDeptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
return getOrganizationName(currentDeptId);
|
||||
}
|
||||
|
||||
+21
-2
@@ -25,6 +25,7 @@ package org.springblade.transport.support;
|
||||
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.constant.RoleConstant;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.cache.SysCache;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
@@ -57,6 +58,24 @@ public final class TransportBusinessSupport {
|
||||
private TransportBusinessSupport() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否超级管理员:当前用户任一角色别名等于 administrator 即为超级管理员。
|
||||
*
|
||||
* @return true-超级管理员
|
||||
*/
|
||||
public static boolean isAdministrator() {
|
||||
String userRole = AuthUtil.getUserRole();
|
||||
if (Func.isBlank(userRole)) {
|
||||
return false;
|
||||
}
|
||||
for (String roleAlias : Func.toStrArray(userRole)) {
|
||||
if (RoleConstant.ADMINISTRATOR.equals(Func.toStr(roleAlias).trim())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static Long currentDeptId(String moduleName) {
|
||||
Long deptId = Func.firstLong(AuthUtil.getDeptId());
|
||||
if (Func.isEmpty(deptId) || deptId <= 0) {
|
||||
@@ -80,7 +99,7 @@ public final class TransportBusinessSupport {
|
||||
}
|
||||
|
||||
public static void validateAllDept(Integer allDept, String moduleName) {
|
||||
if (Objects.equals(allDept, 1) && !AuthUtil.isAdministrator()) {
|
||||
if (Objects.equals(allDept, 1) && !isAdministrator()) {
|
||||
throw new ServiceException("无权查看全部组织" + moduleName);
|
||||
}
|
||||
}
|
||||
@@ -97,7 +116,7 @@ public final class TransportBusinessSupport {
|
||||
*/
|
||||
public static List<Long> resolveDeptFilterIds(Integer allDept, Long deptId, String moduleName) {
|
||||
validateAllDept(allDept, moduleName);
|
||||
if (AuthUtil.isAdministrator()) {
|
||||
if (isAdministrator()) {
|
||||
if (Objects.equals(allDept, 1) && Func.isNotEmpty(deptId) && deptId > 0) {
|
||||
return Collections.singletonList(deptId);
|
||||
}
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ public class AccidentRecordWrapper extends BaseEntityWrapper<AccidentRecord, Acc
|
||||
// 未填写金额的占位值 -1 对外展示为空
|
||||
accidentRecordVO.setDirectEconomicLoss(normalizeEmptyAmount(accidentRecordVO.getDirectEconomicLoss()));
|
||||
accidentRecordVO.setInsuranceClaimAmount(normalizeEmptyAmount(accidentRecordVO.getInsuranceClaimAmount()));
|
||||
accidentRecordVO.setCreateUserName(UserCache.getUserRealName(accidentRecord.getCreateUser()));
|
||||
accidentRecordVO.setUpdateUserName(UserCache.getUserRealName(accidentRecord.getUpdateUser()));
|
||||
return accidentRecordVO;
|
||||
}
|
||||
|
||||
+1
@@ -52,6 +52,7 @@ public class AnnualInspectionRecordWrapper extends BaseEntityWrapper<AnnualInspe
|
||||
AnnualInspectionRecordVO annualInspectionRecordVO = Objects.requireNonNull(BeanUtil.copyProperties(annualInspectionRecord, AnnualInspectionRecordVO.class));
|
||||
// 费用占位值 -1 对外展示为空
|
||||
annualInspectionRecordVO.setFee(normalizeEmptyAmount(annualInspectionRecordVO.getFee()));
|
||||
annualInspectionRecordVO.setCreateUserName(UserCache.getUserRealName(annualInspectionRecord.getCreateUser()));
|
||||
annualInspectionRecordVO.setUpdateUserName(UserCache.getUserRealName(annualInspectionRecord.getUpdateUser()));
|
||||
return annualInspectionRecordVO;
|
||||
}
|
||||
|
||||
+4
-1
@@ -24,6 +24,7 @@ package org.springblade.transport.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.CreditScoreQuantification;
|
||||
import org.springblade.transport.pojo.vo.CreditScoreQuantificationVO;
|
||||
|
||||
@@ -42,7 +43,9 @@ public class CreditScoreQuantificationWrapper extends BaseEntityWrapper<CreditSc
|
||||
|
||||
@Override
|
||||
public CreditScoreQuantificationVO entityVO(CreditScoreQuantification quantification) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(quantification, CreditScoreQuantificationVO.class));
|
||||
CreditScoreQuantificationVO vo = Objects.requireNonNull(BeanUtil.copyProperties(quantification, CreditScoreQuantificationVO.class));
|
||||
vo.setCreateUserName(UserCache.getUserRealName(quantification.getCreateUser()));
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -24,6 +24,7 @@ package org.springblade.transport.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.CustomerArchive;
|
||||
import org.springblade.transport.pojo.vo.CustomerArchiveVO;
|
||||
|
||||
@@ -42,7 +43,9 @@ public class CustomerArchiveWrapper extends BaseEntityWrapper<CustomerArchive, C
|
||||
|
||||
@Override
|
||||
public CustomerArchiveVO entityVO(CustomerArchive customerArchive) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(customerArchive, CustomerArchiveVO.class));
|
||||
CustomerArchiveVO vo = Objects.requireNonNull(BeanUtil.copyProperties(customerArchive, CustomerArchiveVO.class));
|
||||
vo.setCreateUserName(UserCache.getUserRealName(customerArchive.getCreateUser()));
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -27,6 +27,7 @@ package org.springblade.transport.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.Driver;
|
||||
import org.springblade.transport.pojo.vo.DriverVO;
|
||||
|
||||
@@ -45,7 +46,9 @@ public class DriverWrapper extends BaseEntityWrapper<Driver, DriverVO> {
|
||||
|
||||
@Override
|
||||
public DriverVO entityVO(Driver driver) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(driver, DriverVO.class));
|
||||
DriverVO vo = Objects.requireNonNull(BeanUtil.copyProperties(driver, DriverVO.class));
|
||||
vo.setCreateUserName(UserCache.getUserRealName(driver.getCreateUser()));
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -28,6 +28,7 @@ public class EtcRecordWrapper extends BaseEntityWrapper<EtcRecord, EtcRecordVO>
|
||||
@Override
|
||||
public EtcRecordVO entityVO(EtcRecord etcRecord) {
|
||||
EtcRecordVO etcRecordVO = Objects.requireNonNull(BeanUtil.copyProperties(etcRecord, EtcRecordVO.class));
|
||||
etcRecordVO.setCreateUserName(UserCache.getUserRealName(etcRecord.getCreateUser()));
|
||||
etcRecordVO.setUpdateUserName(UserCache.getUserRealName(etcRecord.getUpdateUser()));
|
||||
return etcRecordVO;
|
||||
}
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ public class InsuranceRecordWrapper extends BaseEntityWrapper<InsuranceRecord, I
|
||||
// 未填写保额等金额的占位值 -1 对外展示为空
|
||||
insuranceRecordVO.setInsuredAmount(normalizeEmptyAmount(insuranceRecordVO.getInsuredAmount()));
|
||||
insuranceRecordVO.setPremium(normalizeEmptyAmount(insuranceRecordVO.getPremium()));
|
||||
insuranceRecordVO.setCreateUserName(UserCache.getUserRealName(insuranceRecord.getCreateUser()));
|
||||
insuranceRecordVO.setUpdateUserName(UserCache.getUserRealName(insuranceRecord.getUpdateUser()));
|
||||
return insuranceRecordVO;
|
||||
}
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ public class MaintenancePlanWrapper extends BaseEntityWrapper<MaintenancePlan, M
|
||||
// 未填写里程的占位值 -1 对外展示为空
|
||||
maintenancePlanVO.setMileage(normalizeEmptyMileage(maintenancePlanVO.getMileage()));
|
||||
maintenancePlanVO.setNextMaintenanceMileage(normalizeEmptyMileage(maintenancePlanVO.getNextMaintenanceMileage()));
|
||||
maintenancePlanVO.setCreateUserName(UserCache.getUserRealName(maintenancePlan.getCreateUser()));
|
||||
maintenancePlanVO.setUpdateUserName(UserCache.getUserRealName(maintenancePlan.getUpdateUser()));
|
||||
return maintenancePlanVO;
|
||||
}
|
||||
|
||||
+1
@@ -51,6 +51,7 @@ public class MaintenanceRecordWrapper extends BaseEntityWrapper<MaintenanceRecor
|
||||
if (maintenanceRecordVO.getMileage() != null && maintenanceRecordVO.getMileage().compareTo(BigDecimal.valueOf(-1)) == 0) {
|
||||
maintenanceRecordVO.setMileage(null);
|
||||
}
|
||||
maintenanceRecordVO.setCreateUserName(UserCache.getUserRealName(maintenanceRecord.getCreateUser()));
|
||||
maintenanceRecordVO.setUpdateUserName(UserCache.getUserRealName(maintenanceRecord.getUpdateUser()));
|
||||
return maintenanceRecordVO;
|
||||
}
|
||||
|
||||
+1
@@ -55,6 +55,7 @@ public class MileageRecordWrapper extends BaseEntityWrapper<MileageRecord, Milea
|
||||
mileageRecordVO.setCurrentMonthMileage(normalizeEmptyMileage(mileageRecordVO.getCurrentMonthMileage()));
|
||||
mileageRecordVO.setMonthlyMileage(normalizeEmptyMileage(mileageRecordVO.getMonthlyMileage()));
|
||||
mileageRecordVO.setTotalMileage(normalizeEmptyMileage(mileageRecordVO.getTotalMileage()));
|
||||
mileageRecordVO.setCreateUserName(UserCache.getUserRealName(mileageRecord.getCreateUser()));
|
||||
mileageRecordVO.setUpdateUserName(UserCache.getUserRealName(mileageRecord.getUpdateUser()));
|
||||
return mileageRecordVO;
|
||||
}
|
||||
|
||||
+1
@@ -36,6 +36,7 @@ public class OilElectricRecordWrapper extends BaseEntityWrapper<OilElectricRecor
|
||||
oilElectricRecordVO.setUnitPrice(normalizeEmptyAmount(oilElectricRecordVO.getUnitPrice()));
|
||||
oilElectricRecordVO.setTransactionAmount(normalizeEmptyAmount(oilElectricRecordVO.getTransactionAmount()));
|
||||
oilElectricRecordVO.setBalance(normalizeEmptyAmount(oilElectricRecordVO.getBalance()));
|
||||
oilElectricRecordVO.setCreateUserName(UserCache.getUserRealName(oilElectricRecord.getCreateUser()));
|
||||
oilElectricRecordVO.setUpdateUserName(UserCache.getUserRealName(oilElectricRecord.getUpdateUser()));
|
||||
return oilElectricRecordVO;
|
||||
}
|
||||
|
||||
+1
@@ -28,6 +28,7 @@ public class OtherExpenseRecordWrapper extends BaseEntityWrapper<OtherExpenseRec
|
||||
@Override
|
||||
public OtherExpenseRecordVO entityVO(OtherExpenseRecord otherExpenseRecord) {
|
||||
OtherExpenseRecordVO otherExpenseRecordVO = Objects.requireNonNull(BeanUtil.copyProperties(otherExpenseRecord, OtherExpenseRecordVO.class));
|
||||
otherExpenseRecordVO.setCreateUserName(UserCache.getUserRealName(otherExpenseRecord.getCreateUser()));
|
||||
otherExpenseRecordVO.setUpdateUserName(UserCache.getUserRealName(otherExpenseRecord.getUpdateUser()));
|
||||
return otherExpenseRecordVO;
|
||||
}
|
||||
|
||||
+1
@@ -54,6 +54,7 @@ public class TireReplacementRecordWrapper extends BaseEntityWrapper<TireReplacem
|
||||
// 未填写数量/费用的占位值 -1 对外展示为空
|
||||
tireReplacementRecordVO.setTireQuantity(normalizeEmptyInteger(tireReplacementRecordVO.getTireQuantity()));
|
||||
tireReplacementRecordVO.setReplacementCost(normalizeEmptyAmount(tireReplacementRecordVO.getReplacementCost()));
|
||||
tireReplacementRecordVO.setCreateUserName(UserCache.getUserRealName(tireReplacementRecord.getCreateUser()));
|
||||
tireReplacementRecordVO.setUpdateUserName(UserCache.getUserRealName(tireReplacementRecord.getUpdateUser()));
|
||||
return tireReplacementRecordVO;
|
||||
}
|
||||
|
||||
+1
@@ -47,6 +47,7 @@ public class TransportChangeRecordWrapper extends BaseEntityWrapper<TransportCha
|
||||
@Override
|
||||
public TransportChangeRecordVO entityVO(TransportChangeRecord transportChangeRecord) {
|
||||
TransportChangeRecordVO transportChangeRecordVO = Objects.requireNonNull(BeanUtil.copyProperties(transportChangeRecord, TransportChangeRecordVO.class));
|
||||
transportChangeRecordVO.setCreateUserName(UserCache.getUserRealName(transportChangeRecord.getCreateUser()));
|
||||
transportChangeRecordVO.setUpdateUserName(UserCache.getUserRealName(transportChangeRecord.getUpdateUser()));
|
||||
return transportChangeRecordVO;
|
||||
}
|
||||
|
||||
+4
-1
@@ -27,6 +27,7 @@ package org.springblade.transport.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.TransportShip;
|
||||
import org.springblade.transport.pojo.vo.TransportShipVO;
|
||||
|
||||
@@ -45,7 +46,9 @@ public class TransportShipWrapper extends BaseEntityWrapper<TransportShip, Trans
|
||||
|
||||
@Override
|
||||
public TransportShipVO entityVO(TransportShip ship) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(ship, TransportShipVO.class));
|
||||
TransportShipVO vo = Objects.requireNonNull(BeanUtil.copyProperties(ship, TransportShipVO.class));
|
||||
vo.setCreateUserName(UserCache.getUserRealName(ship.getCreateUser()));
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-1
@@ -27,6 +27,7 @@ package org.springblade.transport.wrapper;
|
||||
|
||||
import org.springblade.core.mp.support.BaseEntityWrapper;
|
||||
import org.springblade.core.tool.utils.BeanUtil;
|
||||
import org.springblade.system.cache.UserCache;
|
||||
import org.springblade.transport.pojo.entity.TransportVehicle;
|
||||
import org.springblade.transport.pojo.vo.TransportVehicleVO;
|
||||
|
||||
@@ -45,7 +46,9 @@ public class TransportVehicleWrapper extends BaseEntityWrapper<TransportVehicle,
|
||||
|
||||
@Override
|
||||
public TransportVehicleVO entityVO(TransportVehicle vehicle) {
|
||||
return Objects.requireNonNull(BeanUtil.copyProperties(vehicle, TransportVehicleVO.class));
|
||||
TransportVehicleVO vo = Objects.requireNonNull(BeanUtil.copyProperties(vehicle, TransportVehicleVO.class));
|
||||
vo.setCreateUserName(UserCache.getUserRealName(vehicle.getCreateUser()));
|
||||
return vo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -54,6 +54,7 @@ public class ViolationRecordWrapper extends BaseEntityWrapper<ViolationRecord, V
|
||||
// 未填写罚款/扣分的占位值 -1 对外展示为空
|
||||
violationRecordVO.setFineAmount(normalizeEmptyAmount(violationRecordVO.getFineAmount()));
|
||||
violationRecordVO.setDeductPoints(normalizeEmptyInteger(violationRecordVO.getDeductPoints()));
|
||||
violationRecordVO.setCreateUserName(UserCache.getUserRealName(violationRecord.getCreateUser()));
|
||||
violationRecordVO.setUpdateUserName(UserCache.getUserRealName(violationRecord.getUpdateUser()));
|
||||
return violationRecordVO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user