更新
This commit is contained in:
parent
843a21a44e
commit
ca9bdc21cc
@ -33,7 +33,12 @@ public class InspectionMeetCarOrderController {
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
public CommonResult<?> get(Long id){
|
||||
public CommonResult<?> get(Long id) {
|
||||
return CommonResult.success(inspectionMeetCarOrderService.getById(id));
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
public CommonResult<?> delete(Long id) {
|
||||
return CommonResult.success(inspectionMeetCarOrderService.removeById(id));
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,8 @@ public class InspectionInfo extends TenantBaseDO
|
||||
private String buyPhone;
|
||||
private String userAddress;
|
||||
private String unitName;
|
||||
private Integer customerSourceId; //客户来源id
|
||||
private Integer businessChannelId; //业务渠道id
|
||||
|
||||
private Long partnerId;
|
||||
/** 检测工主键 */
|
||||
@ -69,6 +71,7 @@ public class InspectionInfo extends TenantBaseDO
|
||||
private Integer recheckCount;
|
||||
/** 重检次数 */
|
||||
private Integer reinspectCount;
|
||||
private String businessChannel; //业务渠道
|
||||
private String otherName;
|
||||
|
||||
/** 0进行中1已结束 */
|
||||
|
@ -67,6 +67,9 @@ public class InspectionMeetCarOrder extends TenantBaseDO {
|
||||
private String skuName;
|
||||
private String otherPhone;
|
||||
private String otherName;
|
||||
private String businessChannel; //业务渠道
|
||||
private Integer customerSourceId; //客户来源id
|
||||
private Integer businessChannelId; //业务渠道id
|
||||
|
||||
/**
|
||||
* 接车类型 0接待 1上门取车
|
||||
|
@ -1548,6 +1548,43 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
||||
}
|
||||
res.setOtherName(Optional.ofNullable(info.getOtherName()).orElse(null));
|
||||
res.setOtherPhone(Optional.ofNullable(info.getOtherPhone()).orElse(null));
|
||||
res.setCustomerSource(Optional.ofNullable(info.getCustomerSource()).orElse(null));
|
||||
res.setBusinessChannel(Optional.ofNullable(info.getBusinessChannel()).orElse(null));
|
||||
if (ObjectUtil.isNotEmpty(info.getCarModel())) {
|
||||
// 截取字符串到牌字
|
||||
String carModel = info.getCarModel();
|
||||
if (carModel != null && carModel.contains("牌")) {
|
||||
res.setCarModel(carModel.substring(0, carModel.indexOf("牌")));
|
||||
} else {
|
||||
res.setCarModel(carModel); // 或设置为 "" / null / "未知" 等默认值
|
||||
}
|
||||
|
||||
}
|
||||
//判断检测是否完成
|
||||
if (info.getStatus().equals("1")){
|
||||
//计算检测时长以x小时x分展示
|
||||
// 计算时间差,单位为毫秒
|
||||
//判断结束时间是否为空
|
||||
long betweenMs = 0;
|
||||
if (ObjectUtil.isNotNull(info.getEndTime())) {
|
||||
betweenMs = DateUtil.betweenMs(info.getStartTime(), info.getEndTime());
|
||||
|
||||
|
||||
}else {
|
||||
//查询步骤表根据时间倒叙
|
||||
InspectionStepInfo one = stepInfoService.getOne(Wrappers.<InspectionStepInfo>lambdaQuery().eq(InspectionStepInfo::getInspectionInfoId, info.getId()).orderByDesc(InspectionStepInfo::getCreateTime).last("LIMIT 1"));
|
||||
betweenMs = DateUtil.betweenMs(info.getStartTime(), one.getUpdateTime());
|
||||
}
|
||||
// 转换为小时和分钟
|
||||
long minutes = betweenMs / (1000 * 60);
|
||||
long hours = minutes / 60;
|
||||
long remainMinutes = minutes % 60;
|
||||
res.setInspectionDuration(hours + "小时" + remainMinutes + "分");
|
||||
}
|
||||
//根据车辆注册日期计算车龄
|
||||
if (ObjectUtil.isNotNull(info.getCarRegisterDate())) {
|
||||
res.setCarAge(DateUtil.betweenYear(info.getCarRegisterDate(), new Date(), true));
|
||||
}
|
||||
/*根据工单表中的leadManId查询对应的引车员*/
|
||||
if (ObjectUtil.isNotNull(info.getLeadManId())) {
|
||||
AdminUserDO leadMan = adminUserService.getById(info.getLeadManId());
|
||||
|
@ -221,9 +221,9 @@ public class InspectionWorkNodeServiceImpl extends ServiceImpl<InspectionWorkNod
|
||||
// 更新或插入步骤信息
|
||||
DlInspectionProject project = inspectionProjectService.getOne(new LambdaQueryWrapper<DlInspectionProject>()
|
||||
.eq(DlInspectionProject::getId, workNode.getProjectId()));
|
||||
// 判断检测项目是否包含制证
|
||||
// 判断检测项目是否包含制证 并且是合格
|
||||
if (ObjectUtil.isNotEmpty(project)) {
|
||||
if (project.getProjectName().contains("制证")) {
|
||||
if (project.getProjectName().contains("制证") && "1".equals(inspectionWorkNode.getType())) {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +68,15 @@ public class InspectionInfoVo {
|
||||
private Date validationTime;
|
||||
// 核销人
|
||||
private String validationRealName;
|
||||
private String businessChannel; //业务渠道
|
||||
//客户来源
|
||||
private String customerSource;
|
||||
//车辆品牌型号
|
||||
private String carModel;
|
||||
//检测时长
|
||||
private String inspectionDuration;
|
||||
//车龄
|
||||
private Long carAge;
|
||||
//优惠金额
|
||||
private Long couponDiscount = 0L;
|
||||
//实付金额 分
|
||||
|
@ -41,6 +41,9 @@ public class OrderTable {
|
||||
/** 客户来源 */
|
||||
private String customerSource;
|
||||
|
||||
/** 业务渠道 */
|
||||
private String businessChannel;
|
||||
|
||||
/** 车辆型号 */
|
||||
private String carModel;
|
||||
|
||||
|
@ -630,6 +630,7 @@ FROM
|
||||
t.customerSource,
|
||||
t.carModel,
|
||||
t.inspectionCount,
|
||||
t.businessChannel,
|
||||
CASE
|
||||
WHEN t.status = '已完成' AND t.is_pass = 0 THEN '不合格'
|
||||
WHEN t.status = '已完成' AND t.is_pass = 1 THEN '合格'
|
||||
@ -645,6 +646,7 @@ FROM
|
||||
oi.pay_time AS payTime, -- 新增字段
|
||||
oi.create_time AS createTime,
|
||||
ii.customer_source AS customerSource,
|
||||
ii.business_channel AS businessChannel,
|
||||
ii.car_model AS carModel,
|
||||
IFNULL(ii.recheck_count, 0) + IFNULL(ii.reinspect_count, 0) + 1 AS inspectionCount,
|
||||
CASE
|
||||
|
Loading…
Reference in New Issue
Block a user