BUG修改
This commit is contained in:
parent
4a7a6079f2
commit
055d19668b
|
|
@ -98,7 +98,7 @@ public class CarSupServiceImpl implements CarSupService{
|
|||
try{
|
||||
int nums=mapper.getUserBySup(data);
|
||||
if(nums>0){
|
||||
return ServerResponse.createBySuccessMsg("供应商下存在车辆信息不允许删除!");
|
||||
return ServerResponse.createErroe("供应商下存在车辆信息不允许删除!");
|
||||
}
|
||||
int num=mapper.deleteCarSup(data);
|
||||
if(num>0){
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
from car_plan_out_details cpod
|
||||
left join car_plan_out cpo on cpod.out_id=cpo.id
|
||||
left join car_supplier cs on cpod.sup_id=cs.id
|
||||
left join car_plan_details cpd on cpd.apply_id=cpod.apply_id and cpd.model_id
|
||||
left join car_plan_details cpd on cpd.apply_id=cpod.apply_id and cpd.model_id=cpod.model_id
|
||||
LEFT JOIN car_ma_type_info cmti on cmti.id=cpod.model_id
|
||||
left join car_plan_apply cpa on cpa.id =cpod.apply_id
|
||||
left join car_supplier_info csi on csi.id= cpod.car_id
|
||||
|
|
|
|||
|
|
@ -82,21 +82,24 @@
|
|||
left join car_slt_plan csp on csp.plan_id=cpas.apply_id
|
||||
left join bm_project pro on pro.bid_id=cpa.pro_id
|
||||
where cpa.status_type=1
|
||||
GROUP BY pro.bmname
|
||||
) info on pro.bmname=info.bmname
|
||||
left join(
|
||||
SELECT distinct pro_id
|
||||
FROM car_plan_apply
|
||||
WHERE status_type=1
|
||||
) cp on cp.pro_id=pro.bid_id
|
||||
where cp.pro_id is not null
|
||||
<if test="year!=null and year!=''">
|
||||
and DATE_FORMAT(cpa.create_time,'%Y')=YEAR(CURDATE())
|
||||
</if>
|
||||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||||
and DATE_FORMAT(cpa.create_time,'%Y-%m-%d')
|
||||
between DATE_FORMAT(#{startTime},'%Y-%m-%d') and DATE_FORMAT(#{endTime},'%Y-%m-%d')
|
||||
</if>
|
||||
GROUP BY pro.bmname
|
||||
) info on pro.bmname=info.bmname
|
||||
left join(
|
||||
SELECT distinct pro_id
|
||||
FROM car_plan_apply cpa
|
||||
WHERE status_type=1
|
||||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||||
and DATE_FORMAT(cpa.create_time,'%Y-%m-%d')
|
||||
between DATE_FORMAT(#{startTime},'%Y-%m-%d') and DATE_FORMAT(#{endTime},'%Y-%m-%d')
|
||||
</if>
|
||||
) cp on cp.pro_id=pro.bid_id
|
||||
where cp.pro_id is not null
|
||||
|
||||
|
||||
|
||||
GROUP BY pro.bmname
|
||||
</select>
|
||||
|
|
@ -121,6 +124,10 @@
|
|||
<if test="proName!=null and proName!=''">
|
||||
and pro.name like concat('%',#{proName},'%')
|
||||
</if>
|
||||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||||
and DATE_FORMAT(cpa.create_time,'%Y-%m-%d')
|
||||
between DATE_FORMAT(#{startTime},'%Y-%m-%d') and DATE_FORMAT(#{endTime},'%Y-%m-%d')
|
||||
</if>
|
||||
GROUP BY cpa.pro_id
|
||||
</select>
|
||||
<select id="getSltPageListByPro" resultType="com.bonus.gzcar.business.backstage.entity.CarBalanceVo">
|
||||
|
|
@ -142,6 +149,10 @@
|
|||
<if test="code!=null and code!=''">
|
||||
and cpa.`code` like concat('%',#{code},'%')
|
||||
</if>
|
||||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||||
and DATE_FORMAT(cpa.create_time,'%Y-%m-%d')
|
||||
between DATE_FORMAT(#{startTime},'%Y-%m-%d') and DATE_FORMAT(#{endTime},'%Y-%m-%d')
|
||||
</if>
|
||||
GROUP BY cpa.id
|
||||
order by cpa.create_time desc
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -212,7 +212,10 @@
|
|||
select distinct cpd.id, cpd.apply_id planId ,cpd.model_id modelId,cpd.need_day needDay,cpd.need_num needNum,
|
||||
cpd.remark,cpd.plan_type planType,cmti.type,cmti.name,cmti.model ,cmti.unit,cpas.sup_id supId,
|
||||
cct.is_out_set isOutSet,cct.is_driver_set isDriverSet,cpas.contract_id contractId,
|
||||
cpod.car_num carNum,cpod.use_day planDay
|
||||
cpod.car_num carNum,cpod.use_day planDay,cpod.car_id carId,
|
||||
cpod.start_address startAddress, cpod.end_address endAddress,
|
||||
cpod.jc_gls jcGls, cpod.gls, cpod.jc_price jcMoney,
|
||||
cpod.dc_money dcMoney, cpod.dc_unit dcUnit
|
||||
from car_plan_out_details cpod
|
||||
left join car_plan_details cpd on cpod.apply_id=cpd.apply_id and cpd.model_id=cpod.model_id
|
||||
left join car_plan_apply_sup cpas on cpd.apply_id=cpas.apply_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue