更新0812
This commit is contained in:
parent
b0bb97d65f
commit
5e2d58e758
@ -182,7 +182,7 @@ public class InspectionMallPartnersController extends BaseController {
|
|||||||
Map<String, Object> stringObjectMap = orderInfoService.workOrderData(query);
|
Map<String, Object> stringObjectMap = orderInfoService.workOrderData(query);
|
||||||
|
|
||||||
rows.add(CollUtil.newArrayList("公示价格汇总:", "", String.valueOf(Double.parseDouble(stringObjectMap.get("goodsPriceSum").toString()) / 100d) + "元", "实付金额汇总:", "", String.valueOf(Double.parseDouble(stringObjectMap.get("payMoneySum").toString()) / 100d) + "元"));
|
rows.add(CollUtil.newArrayList("公示价格汇总:", "", String.valueOf(Double.parseDouble(stringObjectMap.get("goodsPriceSum").toString()) / 100d) + "元", "实付金额汇总:", "", String.valueOf(Double.parseDouble(stringObjectMap.get("payMoneySum").toString()) / 100d) + "元"));
|
||||||
rows.add(CollUtil.newArrayList("车牌号", "检测车型", "检测类型", "业务渠道", "客户来源", "经办人", "承保公司", "交强到期时间", "商业到期时间", "公示价格", "实收金额", "付款时间", "客户手机号", "支付方式", "开始时间", "结束时间", "检测结果", "出纳是否确认"));
|
rows.add(CollUtil.newArrayList("车牌号", "检测车型", "检测类型", "业务渠道", "客户来源", "经办人", "承保公司", "交强到期时间", "商业到期时间", "公示价格", "实收金额", "优惠金额","付款时间", "客户手机号", "支付方式", "开始时间", "结束时间", "检测结果", "出纳是否确认"));
|
||||||
|
|
||||||
|
|
||||||
List<DictDataDO> sysDictData = dictDataService.getDictDataListByDictType("pay_type");
|
List<DictDataDO> sysDictData = dictDataService.getDictDataListByDictType("pay_type");
|
||||||
@ -225,7 +225,8 @@ public class InspectionMallPartnersController extends BaseController {
|
|||||||
.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP)
|
.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP)
|
||||||
.toString(), ObjectUtil.isEmpty(item.getRealPayMoney()) ? "暂未支付" : BigDecimal.valueOf(item.getRealPayMoney())
|
.toString(), ObjectUtil.isEmpty(item.getRealPayMoney()) ? "暂未支付" : BigDecimal.valueOf(item.getRealPayMoney())
|
||||||
.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP)
|
.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP)
|
||||||
.toString(), ObjectUtil.isEmpty(item.getPayTime()) ? "暂未支付" : DateUtil.format(item.getPayTime(), "yyyy-MM-dd hh:mm"),
|
.toString(), ObjectUtil.isEmpty(item.getReduceMoney()) ? "" : BigDecimal.valueOf(item.getReduceMoney())
|
||||||
|
.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP).toString(),ObjectUtil.isEmpty(item.getPayTime()) ? "暂未支付" : DateUtil.format(item.getPayTime(), "yyyy-MM-dd hh:mm"),
|
||||||
Optional.ofNullable(item.getBuyPhone()).orElse(""), payTypeStr, ObjectUtil.isEmpty(item.getStartTime()) ? "" : DateUtil.format(item.getStartTime(), "yyyy-MM-dd hh:mm"), ObjectUtil.isEmpty(item.getEndTime()) ? "" : DateUtil.format(item.getEndTime(), "yyyy-MM-dd hh:mm"), isPassStr, cashier));
|
Optional.ofNullable(item.getBuyPhone()).orElse(""), payTypeStr, ObjectUtil.isEmpty(item.getStartTime()) ? "" : DateUtil.format(item.getStartTime(), "yyyy-MM-dd hh:mm"), ObjectUtil.isEmpty(item.getEndTime()) ? "" : DateUtil.format(item.getEndTime(), "yyyy-MM-dd hh:mm"), isPassStr, cashier));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,7 +332,7 @@ public class InspectionMallPartnersController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ====== 合并单元格写标题 ======
|
// ====== 合并单元格写标题 ======
|
||||||
writer.merge(17, titleBuilder.toString());
|
writer.merge(18, titleBuilder.toString());
|
||||||
|
|
||||||
// ====== 设置标题行高 ======
|
// ====== 设置标题行高 ======
|
||||||
writer.setRowHeight(0, 30);
|
writer.setRowHeight(0, 30);
|
||||||
|
|||||||
@ -643,6 +643,19 @@ public class PartnerOwnController extends BaseController {
|
|||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 结算订单
|
||||||
|
* @param infoVo 订单信息
|
||||||
|
* @return: cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
|
||||||
|
* @author 許
|
||||||
|
* @date: 2025/8/12 11:28
|
||||||
|
*/
|
||||||
|
@PostMapping("/settlement")
|
||||||
|
public CommonResult<?> settlement(@RequestBody InspectionInfoVo infoVo) {
|
||||||
|
partnerList.settlement(infoVo);
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量结算
|
* 批量结算
|
||||||
*
|
*
|
||||||
|
|||||||
@ -119,6 +119,9 @@ public class InspectionInfo extends TenantBaseDO
|
|||||||
/** 检查工手机号 */
|
/** 检查工手机号 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Long realPayMoney;
|
private Long realPayMoney;
|
||||||
|
/** 检查工手机号 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long reduceMoney;
|
||||||
/** 订单号 */
|
/** 订单号 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
@ -260,4 +263,25 @@ public class InspectionInfo extends TenantBaseDO
|
|||||||
private String insuranceCompanyName;
|
private String insuranceCompanyName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<String> datetimeRange;
|
private List<String> datetimeRange;
|
||||||
|
/**
|
||||||
|
* 结算金额
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long settlementAmount;
|
||||||
|
/**
|
||||||
|
* 结算人
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long settlementUser;
|
||||||
|
/**
|
||||||
|
* 结算优惠金额
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long settlementDiscount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算账户
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String receivablesAccount;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -290,4 +290,13 @@ public interface AppInspectionPartnerService extends IService<ShopMallPartners>
|
|||||||
* @param query
|
* @param query
|
||||||
*/
|
*/
|
||||||
void batchSettlement(OrderTableQuery query);
|
void batchSettlement(OrderTableQuery query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 结算订单
|
||||||
|
* @param infoVo
|
||||||
|
* @return: void
|
||||||
|
* @author 許
|
||||||
|
* @date: 2025/8/12 11:28
|
||||||
|
*/
|
||||||
|
void settlement(InspectionInfoVo infoVo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1736,10 +1736,11 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
AdminUserDO meetMan = userMap.get(info.getMeetManId());
|
AdminUserDO meetMan = userMap.get(info.getMeetManId());
|
||||||
|
|
||||||
InspectionInfoVo res = new InspectionInfoVo();
|
InspectionInfoVo res = new InspectionInfoVo();
|
||||||
BeanUtils.copyProperties(order, res); // 建议手动复制必要字段
|
|
||||||
BeanUtils.copyProperties(info, res);
|
BeanUtils.copyProperties(info, res);
|
||||||
|
BeanUtils.copyProperties(order, res); // 建议手动复制必要字段
|
||||||
|
|
||||||
res.setInspectionId(info.getId());
|
res.setInspectionId(info.getId());
|
||||||
|
res.setSettlementAmount(order.getSettlementAmount());
|
||||||
res.setBuyUserName(buyUser != null ? buyUser.getNickname() : "");
|
res.setBuyUserName(buyUser != null ? buyUser.getNickname() : "");
|
||||||
res.setBuyUserPhone(buyUser != null ? buyUser.getMobile() : "");
|
res.setBuyUserPhone(buyUser != null ? buyUser.getMobile() : "");
|
||||||
res.setReturnCarUserId(info.getReturnCarUserId());
|
res.setReturnCarUserId(info.getReturnCarUserId());
|
||||||
@ -1843,6 +1844,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
}
|
}
|
||||||
InspectionStepInfo latest = stepInfoService.getOne(Wrappers.<InspectionStepInfo>lambdaQuery()
|
InspectionStepInfo latest = stepInfoService.getOne(Wrappers.<InspectionStepInfo>lambdaQuery()
|
||||||
.eq(InspectionStepInfo::getInspectionInfoId, info.getId())
|
.eq(InspectionStepInfo::getInspectionInfoId, info.getId())
|
||||||
|
.isNotNull(InspectionStepInfo::getUpdateTime)
|
||||||
.orderByDesc(InspectionStepInfo::getCreateTime).last("LIMIT 1"));
|
.orderByDesc(InspectionStepInfo::getCreateTime).last("LIMIT 1"));
|
||||||
return latest != null ? DateUtil.betweenMs(info.getStartTime(), latest.getUpdateTime()) : 0;
|
return latest != null ? DateUtil.betweenMs(info.getStartTime(), latest.getUpdateTime()) : 0;
|
||||||
}
|
}
|
||||||
@ -2517,7 +2519,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
public List<Map<String, Object>> getStaffCount(DlInspectionProject dlInspectionProject) {
|
public List<Map<String, Object>> getStaffCount(DlInspectionProject dlInspectionProject) {
|
||||||
List<Map<String, Object>> staffCount = inspectionWorkNodeService.getStaffCount(dlInspectionProject);
|
List<Map<String, Object>> staffCount = inspectionWorkNodeService.getStaffCount(dlInspectionProject);
|
||||||
// 根据userId查询检测工单表 接车人
|
// 根据userId查询检测工单表 接车人
|
||||||
List<InspectionInfo> list = inspectionInfoService.selectMeetCarList(dlInspectionProject.getDatetimeRange(),null);
|
List<InspectionInfo> list = inspectionInfoService.selectMeetCarList(dlInspectionProject.getDatetimeRange(), null);
|
||||||
// 统计每个 meetManId 的数量,避免 null key 异常
|
// 统计每个 meetManId 的数量,避免 null key 异常
|
||||||
Map<Long, List<InspectionInfo>> meetManIdCountMap = list.stream()
|
Map<Long, List<InspectionInfo>> meetManIdCountMap = list.stream()
|
||||||
.filter(info -> info.getMeetManId() != null) // 过滤 null 值
|
.filter(info -> info.getMeetManId() != null) // 过滤 null 值
|
||||||
@ -2769,9 +2771,8 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
/**
|
/**
|
||||||
* 文件统计列表
|
* 文件统计列表
|
||||||
*
|
*
|
||||||
* @param servicePackageId
|
* @param startTime 开始时间
|
||||||
* @param startTime 开始时间
|
* @param endTime 结束时间
|
||||||
* @param endTime 结束时间
|
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@ -2802,8 +2803,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量结算
|
* 批量结算
|
||||||
*
|
|
||||||
* @param query
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@ -2878,4 +2877,22 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl<AppInspectionPa
|
|||||||
.set(OrderInfo::getAccountingConfirmUser, SecurityFrameworkUtils.getLoginUserId()));
|
.set(OrderInfo::getAccountingConfirmUser, SecurityFrameworkUtils.getLoginUserId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 结算订单
|
||||||
|
* @return: void
|
||||||
|
* @author 許
|
||||||
|
* @date: 2025/8/12 11:28
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void settlement(InspectionInfoVo infoVo) {
|
||||||
|
/* 1.查询订单id*/
|
||||||
|
InspectionInfo info = inspectionInfoService.getById(infoVo.getInspectionId());
|
||||||
|
/* 2.更新订单表*/
|
||||||
|
orderService.update(Wrappers.<OrderInfo>lambdaUpdate()
|
||||||
|
.eq(OrderInfo::getId, info.getInspectionOrderId())
|
||||||
|
.set(OrderInfo::getSettlementAmount, infoVo.getSettlementAmount() * 100)
|
||||||
|
.set(OrderInfo::getSettlementUser, SecurityFrameworkUtils.getLoginUserId())
|
||||||
|
.set(OrderInfo::getSettlementReduceMoney, infoVo.getSettlementReduceMoney() * 100));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -157,4 +157,16 @@ public class InspectionInfoVo {
|
|||||||
|
|
||||||
/** 保险公司名称 */
|
/** 保险公司名称 */
|
||||||
private String insuranceCompanyName;
|
private String insuranceCompanyName;
|
||||||
|
/**
|
||||||
|
* 结算金额
|
||||||
|
*/
|
||||||
|
private Long settlementAmount;
|
||||||
|
/**
|
||||||
|
* 结算人
|
||||||
|
*/
|
||||||
|
private Long settlementUser;
|
||||||
|
/**
|
||||||
|
* 结算优惠金额
|
||||||
|
*/
|
||||||
|
private Long settlementReduceMoney;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,6 +103,18 @@ public class OrderInfo extends TenantBaseDO {
|
|||||||
* 文件
|
* 文件
|
||||||
*/
|
*/
|
||||||
private String files;
|
private String files;
|
||||||
|
/**
|
||||||
|
* 结算金额
|
||||||
|
*/
|
||||||
|
private Long settlementAmount;
|
||||||
|
/**
|
||||||
|
* 结算人
|
||||||
|
*/
|
||||||
|
private Long settlementUser;
|
||||||
|
/**
|
||||||
|
* 结算优惠金额
|
||||||
|
*/
|
||||||
|
private Long settlementReduceMoney;
|
||||||
/**
|
/**
|
||||||
* 出纳是否确认 0-未到账 1-已到账 null-待确认
|
* 出纳是否确认 0-未到账 1-已到账 null-待确认
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -716,14 +716,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
realPayMoney
|
realPayMoney
|
||||||
,oi.pay_type,oi.order_status as
|
,oi.pay_type,oi.order_status as
|
||||||
orderStatus,oi.goods_id,oi.sku_id,oi.pay_time,oi.goods_price,oi.cashier_confirm,oi.cashier_confirm_remark,oi.cashier_confirm_time
|
orderStatus,oi.goods_id,oi.sku_id,oi.pay_time,oi.goods_price,oi.cashier_confirm,oi.cashier_confirm_remark,oi.cashier_confirm_time
|
||||||
,oi.accounting_confirm,oi.accounting_confirm_remark,
|
,oi.accounting_confirm,oi.accounting_confirm_remark,oi.reduce_money as reduceMoney,oi.settlement_amount,oi.settlement_reduce_money,oi.settlement_user,oi.receivables_account,
|
||||||
car.next_inspection_date,car.insurance_company_name,car.insurance_expiry_date,car.vehicle_insurance_expiry_date
|
car.next_inspection_date,car.insurance_company_name,car.insurance_expiry_date,car.vehicle_insurance_expiry_date
|
||||||
from inspection_info ins
|
from inspection_info ins
|
||||||
left join order_info oi on oi.id = ins.inspection_order_id
|
left join order_info oi on oi.id = ins.inspection_order_id
|
||||||
left join system_users su on su.id = ins.user_id
|
left join system_users su on su.id = ins.user_id
|
||||||
left join system_user_role sur on sur.user_id = su.id
|
left join system_user_role sur on sur.user_id = su.id
|
||||||
LEFT JOIN shop_user_car car on car.car_no = ins.car_num
|
LEFT JOIN shop_user_car car on car.car_no = ins.car_num
|
||||||
where 1=1 AND ins.deleted = 0
|
where 1=1 AND ins.deleted = 0 AND oi.deleted = 0
|
||||||
<if test="query.carModelOrCarYear!=null and query.carModelOrCarYear!=''">
|
<if test="query.carModelOrCarYear!=null and query.carModelOrCarYear!=''">
|
||||||
and (ins.car_num like concat('%',#{query.carModelOrCarYear},'%')
|
and (ins.car_num like concat('%',#{query.carModelOrCarYear},'%')
|
||||||
OR ins.certificate_num like concat('%',#{query.carModelOrCarYear},'%'))
|
OR ins.certificate_num like concat('%',#{query.carModelOrCarYear},'%'))
|
||||||
@ -772,6 +772,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
and oi.cashier_confirm = 1
|
and oi.cashier_confirm = 1
|
||||||
and (oi.accounting_confirm is null or oi.accounting_confirm != 1)
|
and (oi.accounting_confirm is null or oi.accounting_confirm != 1)
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY ins.id
|
||||||
order by ins.start_time desc
|
order by ins.start_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="workOrderDataNew" resultType="java.util.Map">
|
<select id="workOrderDataNew" resultType="java.util.Map">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user