1
This commit is contained in:
parent
d3783b1de9
commit
99846979fd
@ -441,8 +441,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
return RepairRoleEnum.INSPECTION.getCode();
|
||||
}
|
||||
// 服务顾问
|
||||
if (codes.contains(RepairRoleEnum.ADVISOR.getName())){
|
||||
return RepairRoleEnum.ADVISOR.getName();
|
||||
if (codes.contains(RepairRoleEnum.ADVISOR.getCode())){
|
||||
return RepairRoleEnum.ADVISOR.getCode();
|
||||
}
|
||||
// 维修工(或班组长)
|
||||
if (codes.contains(RepairRoleEnum.REPAIR_STAFF.getCode())){
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.tickets.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.booking.entity.DlRepairBooking;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTickets;
|
||||
import cn.iocoder.yudao.module.tickets.entity.DlRepairTitem;
|
||||
import lombok.Data;
|
||||
@ -16,6 +17,8 @@ public class DlRepairTicketsRespVO extends DlRepairTickets {
|
||||
|
||||
/** 子表数组 */
|
||||
private List<DlRepairTitem> itemList;
|
||||
/** 关联的预约单信息 */
|
||||
private DlRepairBooking booking;
|
||||
|
||||
/** 上面有地方在用,只能新用一个了,子表数组 */
|
||||
private List<DlRepairTitemReqVO> items;
|
||||
|
@ -4,7 +4,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.tickets.mapper.DlRepairTicketsMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="cn.iocoder.yudao.module.tickets.entity.DlRepairTickets">
|
||||
<resultMap id="BaseResultMap" type="cn.iocoder.yudao.module.tickets.vo.DlRepairTicketsRespVO">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="ticketNo" column="ticket_no" jdbcType="VARCHAR"/>
|
||||
<result property="repairType" column="repair_type" jdbcType="VARCHAR"/>
|
||||
@ -45,6 +45,28 @@
|
||||
<result property="isFinish" column="is_finish" />
|
||||
<result property="nowRepairId" column="now_repair_id" />
|
||||
<result property="nowRepairName" column="now_repair_name" />
|
||||
<association property="booking" javaType="cn.iocoder.yudao.module.booking.entity.DlRepairBooking" select="selectBookingById" column="id"/>
|
||||
<collection property="itemList" column="id" ofType="cn.iocoder.yudao.module.tickets.entity.DlRepairTitem" columnPrefix="item_">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="ticketId" column="ticket_id" />
|
||||
<result property="itemName" column="item_name" />
|
||||
<result property="itemCount" column="item_count" />
|
||||
<result property="itemUnit" column="item_unit" />
|
||||
<result property="itemPrice" column="item_price" />
|
||||
<result property="itemDiscount" column="item_discount" />
|
||||
<result property="itemMoney" column="item_money" />
|
||||
<result property="repairIds" column="repair_ids" />
|
||||
<result property="repairNames" column="repair_names" />
|
||||
<result property="saleId" column="sale_id" />
|
||||
<result property="saleName" column="sale_name" />
|
||||
<result property="itemType" column="item_type" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="partId" column="part_id" />
|
||||
<result property="otherId" column="other_id" />
|
||||
<result property="itemTypeId" column="item_type_id" />
|
||||
<result property="itemStatus" column="item_status" />
|
||||
<result property="remark" column="remark" />
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_SQL">
|
||||
@ -91,7 +113,9 @@
|
||||
from dl_repair_tickets drt
|
||||
where drt.deleted = '0'
|
||||
</sql>
|
||||
|
||||
<select id="selectBookingById" resultType="cn.iocoder.yudao.module.booking.entity.DlRepairBooking">
|
||||
SELECT * FROM dl_repair_booking WHERE tickets_id = #{id}
|
||||
</select>
|
||||
<select id="getTicketsPage" resultMap="BaseResultMap">
|
||||
<include refid="Base_SQL"/>
|
||||
<if test="map.ticketsStatus != null and map.ticketsStatus != '' and map.ticketsStatus != '01'">
|
||||
@ -132,49 +156,29 @@
|
||||
</select>
|
||||
|
||||
<select id="getPageType" resultMap="BaseResultMap">
|
||||
select distinct drt.id as id,
|
||||
ticket_no,
|
||||
repair_type,
|
||||
user_id,
|
||||
user_name,
|
||||
user_mobile,
|
||||
car_id,
|
||||
car_no,
|
||||
car_vin,
|
||||
car_brand_id,
|
||||
car_brand_name,
|
||||
car_brand_type,
|
||||
adviser_id,
|
||||
adviser_name,
|
||||
pay_type,
|
||||
repair_advice,
|
||||
quality_mileage,
|
||||
quality_day,
|
||||
end_check,
|
||||
part_disposal,
|
||||
drt.remark as remark,
|
||||
ticket_type,
|
||||
corp_id,
|
||||
dept_id,
|
||||
count,
|
||||
project_price,
|
||||
part_price,
|
||||
other_price,
|
||||
total_price,
|
||||
tickets_status,
|
||||
drt.create_time as create_time,
|
||||
in_time,
|
||||
out_time,
|
||||
cost,
|
||||
profit,
|
||||
part_status,
|
||||
tickets_work_status,
|
||||
is_finish,
|
||||
now_repair_id,
|
||||
now_repair_name
|
||||
select drt.*,
|
||||
drti.id AS item_id,
|
||||
drti.ticket_id AS item_ticket_id,
|
||||
drti.item_name AS item_item_name,
|
||||
drti.item_count AS item_item_count,
|
||||
drti.item_unit AS item_item_unit,
|
||||
drti.item_price AS item_item_price,
|
||||
drti.item_discount AS item_item_discount,
|
||||
drti.item_money AS item_item_money,
|
||||
drti.repair_ids AS item_repair_ids,
|
||||
drti.repair_names AS item_repair_names,
|
||||
drti.sale_id AS item_sale_id,
|
||||
drti.sale_name AS item_sale_name,
|
||||
drti.item_type AS item_item_type,
|
||||
drti.project_id AS item_project_id,
|
||||
drti.part_id AS item_part_id,
|
||||
drti.other_id AS item_other_id,
|
||||
drti.item_type_id AS item_type_id,
|
||||
drti.item_status AS item_item_status,
|
||||
drti.remark AS item_remark
|
||||
from dl_repair_tickets drt
|
||||
left join dl_repair_titem drti
|
||||
on drt.id = drti.ticket_id
|
||||
on drt.id = drti.ticket_id AND drti.deleted = '0'
|
||||
where drt.deleted = '0'
|
||||
<if test="map.ticketNo != null and map.ticketNo != ''">
|
||||
and (
|
||||
|
Loading…
Reference in New Issue
Block a user