Merge remote-tracking branch 'origin/main'

This commit is contained in:
jiang 2025-07-16 22:33:23 +08:00
commit 4e7787bb29
3 changed files with 29 additions and 23 deletions

View File

@ -283,7 +283,7 @@ public class SupDispatchCarController {
// 只有当detailCount > 1时才需要合并
if (detailCount > 1) {
// 合并主数据列前10列
for (int col = 0; col < 10; col++) {
for (int col = 0; col < 11; col++) {
mergeRegions.add(new CellRangeAddress(
currentRow,
currentRow + detailCount - 1,
@ -321,14 +321,14 @@ public class SupDispatchCarController {
CellStyle wrapTextStyle = createWrapTextStyle(workbook); // 自动换行样式
// 设置列宽可根据实际情况调整
int[] columnWidths = {8, 15, 15, 10, 15, 20, 10, 10, 15, 15, 15, 15, 15, 10, 10, 10, 10};
int[] columnWidths = {8, 15,15, 15, 10, 15, 20, 10, 10, 15, 15, 15, 15, 15, 10, 10, 10, 10};
for (int i = 0; i < columnWidths.length; i++) {
sheet.setColumnWidth(i, columnWidths[i] * 256); // 256是一个字符的宽度单位
}
// 创建标题行
Row titleRow = sheet.createRow(0);
String[] titles = {"序号", "工程", "计划编号", "申请人", "申请时间", "备注", "派车状态", "派车数量", "派车日期", "到货确认单",
String[] titles = {"序号", "供应商","工程", "计划编号", "申请人", "申请时间", "备注", "派车状态", "派车数量", "派车日期", "到货确认单",
"类型","起运地", "目的地", "使用地", "车型", "型号", "车牌"};
for (int i = 0; i < titles.length; i++) {
Cell cell = titleRow.createCell(i);
@ -343,24 +343,25 @@ public class SupDispatchCarController {
// 主数据前10列
setCellValueWithStyle(row, 0, data.getXh(),dataStyle);
setCellValueWithStyle(row, 1, data.getProName(), wrapTextStyle);
setCellValueWithStyle(row, 2, data.getCode(), dataStyle);
setCellValueWithStyle(row, 3, data.getUserName(), dataStyle);
setCellValueWithStyle(row, 4, data.getAppLyTime(), dataStyle);
setCellValueWithStyle(row, 5, data.getRemark(), wrapTextStyle);
setCellValueWithStyle(row, 6, data.getStatusName(), dataStyle);
setCellValueWithStyle(row, 7, data.getDispatchNum(), dataStyle);
setCellValueWithStyle(row, 8, data.getOutTime(), dataStyle);
setCellValueWithStyle(row, 9, data.getFileNum(), dataStyle);
setCellValueWithStyle(row, 1, data.getSupName(), wrapTextStyle);
setCellValueWithStyle(row, 2, data.getProName(), wrapTextStyle);
setCellValueWithStyle(row, 3, data.getCode(), dataStyle);
setCellValueWithStyle(row, 4, data.getUserName(), dataStyle);
setCellValueWithStyle(row, 5, data.getAppLyTime(), dataStyle);
setCellValueWithStyle(row, 6, data.getRemark(), wrapTextStyle);
setCellValueWithStyle(row, 7, data.getStatusName(), dataStyle);
setCellValueWithStyle(row, 8, data.getDispatchNum(), dataStyle);
setCellValueWithStyle(row, 9, data.getOutTime(), dataStyle);
setCellValueWithStyle(row, 10, data.getFileNum(), dataStyle);
// 详情数据后6列
setCellValueWithStyle(row, 10, data.getCarType(), dataStyle);
setCellValueWithStyle(row, 11, data.getStartAddress(), dataStyle);
setCellValueWithStyle(row, 12, data.getEndAddress(), dataStyle);
setCellValueWithStyle(row, 13, data.getUseAddress(), dataStyle);
setCellValueWithStyle(row, 14, data.getName(), dataStyle);
setCellValueWithStyle(row, 15, data.getModel(), dataStyle);
setCellValueWithStyle(row, 16, data.getCarNumStr(), dataStyle);
setCellValueWithStyle(row, 11, data.getCarType(), dataStyle);
setCellValueWithStyle(row, 12, data.getStartAddress(), dataStyle);
setCellValueWithStyle(row, 13, data.getEndAddress(), dataStyle);
setCellValueWithStyle(row, 14, data.getUseAddress(), dataStyle);
setCellValueWithStyle(row, 15, data.getName(), dataStyle);
setCellValueWithStyle(row, 16, data.getModel(), dataStyle);
setCellValueWithStyle(row, 17, data.getCarNumStr(), dataStyle);
}
// 添加合并区域

View File

@ -95,8 +95,8 @@
<select id="getDriverDetails" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
select cdi.id, cdi.name, cdi.phone, cdi.sup_id supId,cs.name supName,cdi.is_white as isWhiteList
from car_driver_info cdi
left join car_supplier cs on cs.id=cdi.id
where cdi.id=#{id}
left join car_supplier cs on cs.id=cdi.sup_id
where cdi.id=#{id}
</select>
<select id="getDriverListBySup" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
select cdi.id,cdi.name,cdi.phone,cdi.sup_id supId ,cs.name supName,cdi.is_white as isWhiteList,

View File

@ -321,11 +321,12 @@
select cpo.id,cpo.type,cpo.apply_id planId,cpa.code ,cpa.user_name userName ,
cpa.create_time applyTime ,cpa.remark,cpo.out_time outTime ,cpo.dispatch_num dispatchNum,cpo.status,
IFNULL(file.num ,0) fileNum,pro.name proName,
cs.`name` as supName,
CASE
WHEN cpo.file_status IS NULL THEN '待上传'
WHEN cpo.file_status = 0 THEN '待审核'
WHEN cpo.file_status = 1 THEN '审核通过'
WHEN cpo.file_status = 2 THEN '审核驳回'
WHEN cpo.file_status = 1 THEN '通过'
WHEN cpo.file_status = 2 THEN '驳回'
ELSE ''
END AS fileStatus
FROM car_plan_out cpo
@ -336,6 +337,7 @@
where model_table='car_plan_out' AND type='到货确认单'
GROUP BY own_id
)file on file.id=concat(cpo.id,'-dh')
LEFT JOIN car_supplier cs ON cs.id = cpo.sup_id
where 1=1 and cpo.status=2
<if test="keyWord!=null and keyWord!=''">
and (
@ -346,6 +348,9 @@
pro.name like concat('%',#{keyWord},'%')
)
</if>
<if test="supId!=null and supId!=''">
and cpo.sup_id=#{supId}
</if>
order by cpo.create_time desc
</select>
<select id="getSltNumByPlan" resultType="java.lang.Integer">