bug 修改
This commit is contained in:
parent
dae2283de0
commit
1d3fb7e535
|
|
@ -62,31 +62,43 @@
|
|||
<!--查询待审核-->
|
||||
<select id="getCarNeedPlanList" resultType="com.bonus.gzcar.business.backstage.entity.CarNeedPlanVo">
|
||||
select
|
||||
cpa.id, cpa.code, cpa.type , cpa.pro_id proId, cpa.project_part projectPart, cpa.project_content projectContent,
|
||||
cpa.need_time needTime, cpa.creator,DATE_FORMAT(cpa.create_time,'%Y-%m-%d') appLyTime,pro.name proName,
|
||||
cpa.remark, cpa.status, cpa.updater, cpa.update_time updateTime,
|
||||
if(cpa.type=1,'车辆','吊车') typeName ,
|
||||
cpa.apply_type applyType, cpa.status_type statusType,cpa.user_name userName
|
||||
from car_plan_apply cpa
|
||||
cpa.id, cpa.code, cpa.type , cpa.pro_id proId, cpa.project_part projectPart, cpa.project_content projectContent,
|
||||
cpa.need_time needTime, cpa.creator,DATE_FORMAT(cpa.create_time,'%Y-%m-%d') appLyTime,pro.name proName,
|
||||
cpa.remark, cpa.status, cpa.updater, cpa.update_time updateTime,
|
||||
if(cpa.type=1,'车辆','吊车') typeName ,
|
||||
cpa.apply_type applyType, cpa.status_type statusType,cpa.user_name userName
|
||||
from car_plan_apply cpa
|
||||
left join bm_project pro on pro.bid_id=cpa.pro_id
|
||||
where 1=1
|
||||
<if test="applyType!=null and applyType!=''">
|
||||
and cpa.apply_type=#{applyType}
|
||||
</if>
|
||||
<if test="status!=null and status!=''">
|
||||
and cpa.status=#{status}
|
||||
</if>
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
and (
|
||||
cpa.code like concat('%',#{keyWord},'%') or
|
||||
cpa.user_name like concat('%',#{keyWord},'%') or
|
||||
cpa.project_part like concat('%',#{keyWord},'%') or
|
||||
cpa.project_content like concat('%',#{keyWord},'%') or
|
||||
cpa.remark like concat('%',#{keyWord},'%') or
|
||||
pro.name like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
ORDER BY cpa.create_time desc
|
||||
<if test="applyType!=null and applyType!=''">
|
||||
and cpa.apply_type=#{applyType}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="status == 1">
|
||||
AND cpa.status = 1 AND cpa.status_type != 1
|
||||
</when>
|
||||
<when test="status == 2">
|
||||
AND cpa.status = 1 AND cpa.status_type = 1
|
||||
</when>
|
||||
<when test="status == 3">
|
||||
AND cpa.status = 3
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
<!-- <if test="status!=null and status!=''">
|
||||
and cpa.status=#{status}
|
||||
</if>-->
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
and (
|
||||
cpa.code like concat('%',#{keyWord},'%') or
|
||||
cpa.user_name like concat('%',#{keyWord},'%') or
|
||||
cpa.project_part like concat('%',#{keyWord},'%') or
|
||||
cpa.project_content like concat('%',#{keyWord},'%') or
|
||||
cpa.remark like concat('%',#{keyWord},'%') or
|
||||
pro.name like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
ORDER BY cpa.create_time desc
|
||||
</select>
|
||||
<select id="getPlanCode" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@
|
|||
need_num needNum, dispatch_num dispatchNum,need_num-dispatch_num-IFNULL(outData.num,0) noDispatchNum,
|
||||
cpa.apply_type applyType, cpa.status_type statusType,cpa.user_name userName,
|
||||
if(cpa.dispatch_num>0,'已派车',if(cpa.dispatch_status=0,'待审核','待派车')) statusName,
|
||||
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=1,'已通过','已驳回') ) ) auditStatus
|
||||
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=2,'已通过','已驳回') ) ) auditStatus
|
||||
from car_plan_apply cpa
|
||||
left join bm_project pro on pro.bid_id=cpa.pro_id
|
||||
LEFT JOIN bm_project_type bpt on pro.TYPE_ID=bpt.ID
|
||||
|
|
@ -181,7 +181,7 @@
|
|||
cpa.remark like concat('%',#{keyWord},'%') or
|
||||
if(cpa.type=1,'车辆','吊车') like concat('%',#{keyWord},'%') or
|
||||
if(cpa.dispatch_num>0,'已派车',if(cpa.dispatch_status=0,'待审核','待派车')) like concat('%',#{keyWord},'%') or
|
||||
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=1,'已通过','已驳回') ) ) like concat('%',#{keyWord},'%')
|
||||
if(cpa.dispatch_status=0,'待审核', if(cpa.dispatch_status=5,'待派车',if(cpa.dispatch_status=2,'已通过','已驳回') ) ) like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue