1、工程详情增加待分配查询
2、车辆,驾驶员新增白名单 3、数据库:表car_driver_info增加is_white字段,表car_supplier_info增加is_white字段
This commit is contained in:
parent
cd557d44e7
commit
e3154dfe0f
|
|
@ -64,6 +64,11 @@ public class CarCarController {
|
||||||
List<CarCarVo> list = service.getCarPageList(dto);
|
List<CarCarVo> list = service.getCarPageList(dto);
|
||||||
final int[] num = {1};
|
final int[] num = {1};
|
||||||
list.forEach(vo->{
|
list.forEach(vo->{
|
||||||
|
if (vo.getIsWhiteList()==1){
|
||||||
|
vo.setIsWhiteStr("是");
|
||||||
|
} else {
|
||||||
|
vo.setIsWhiteStr("否");
|
||||||
|
}
|
||||||
vo.setXh(num[0]);
|
vo.setXh(num[0]);
|
||||||
num[0]++;
|
num[0]++;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,11 @@ public class CarDriverController {
|
||||||
List<CarDriverVo> list = service.getDriverPageList(dto);
|
List<CarDriverVo> list = service.getDriverPageList(dto);
|
||||||
final int[] num = {1};
|
final int[] num = {1};
|
||||||
list.forEach(vo->{
|
list.forEach(vo->{
|
||||||
|
if (vo.getIsWhiteList()==1){
|
||||||
|
vo.setIsWhiteStr("是");
|
||||||
|
} else {
|
||||||
|
vo.setIsWhiteStr("否");
|
||||||
|
}
|
||||||
vo.setXh(num[0]);
|
vo.setXh(num[0]);
|
||||||
num[0]++;
|
num[0]++;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,17 @@ public class CarCarVo extends ParentVo {
|
||||||
@Excel(name = "行驶证", width = 10.0, orderNum = "7")
|
@Excel(name = "行驶证", width = 10.0, orderNum = "7")
|
||||||
private int xszNum;
|
private int xszNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为白名单
|
||||||
|
*/
|
||||||
|
private int isWhiteList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为白名单
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否为白名单", width = 10.0, orderNum = "10")
|
||||||
|
private String isWhiteStr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片类型
|
* 图片类型
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,18 @@ public class CarDriverVo extends ParentVo {
|
||||||
*/
|
*/
|
||||||
@Excel(name = "其他操作证", width = 10.0, orderNum = "5")
|
@Excel(name = "其他操作证", width = 10.0, orderNum = "5")
|
||||||
private int otherNum;
|
private int otherNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为白名单
|
||||||
|
*/
|
||||||
|
private int isWhiteList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否为白名单
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否为白名单", width = 10.0, orderNum = "7")
|
||||||
|
private String isWhiteStr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片类型
|
* 图片类型
|
||||||
*/
|
*/
|
||||||
|
|
@ -54,4 +66,5 @@ public class CarDriverVo extends ParentVo {
|
||||||
* 删除的文件类型
|
* 删除的文件类型
|
||||||
*/
|
*/
|
||||||
private String delTypes;
|
private String delTypes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,14 @@
|
||||||
<insert id="addCarData" useGeneratedKeys="true" keyProperty="id">
|
<insert id="addCarData" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into car_supplier_info(
|
insert into car_supplier_info(
|
||||||
car_num, brand, type, ton, xy_num, bx_num, xsz_num, bx_date,
|
car_num, brand, type, ton, xy_num, bx_num, xsz_num, bx_date,
|
||||||
sup_id, creator, create_time, updator, update_time, is_active
|
sup_id, creator, create_time, updator, update_time,is_white, is_active
|
||||||
)values (#{carNum},#{brand},#{type},#{ton},#{xyNum},#{bxNum},#{xszNum},#{bxDay},#{supId},
|
)values (#{carNum},#{brand},#{type},#{ton},#{xyNum},#{bxNum},#{xszNum},#{bxDay},#{supId},
|
||||||
#{creator},now(),#{updater},now(),1)
|
#{creator},now(),#{updater},now(),#{isWhiteList},1)
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateCarData">
|
<update id="updateCarData">
|
||||||
update car_supplier_info set
|
update car_supplier_info set
|
||||||
car_num=#{carNum}, brand=#{brand}, type=#{type}, ton=#{ton}, bx_date=#{bxDay},
|
car_num=#{carNum}, brand=#{brand}, type=#{type}, ton=#{ton}, bx_date=#{bxDay},
|
||||||
sup_id=#{supId}, updator=#{updater}, update_time=now(),xy_num=#{xyNum},bx_num=#{bxNum},xsz_num=#{xszNum}
|
sup_id=#{supId}, updator=#{updater}, update_time=now(),xy_num=#{xyNum},bx_num=#{bxNum},xsz_num=#{xszNum},is_white=#{isWhiteList}
|
||||||
WHERE id=#{id}
|
WHERE id=#{id}
|
||||||
</update>
|
</update>
|
||||||
<update id="deleteCarData">
|
<update id="deleteCarData">
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getCarPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarCarVo">
|
<select id="getCarPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarCarVo">
|
||||||
select csi.id,csi.car_num carNum,csi.brand,csi.type,csi.ton,IFNULL(file1.num,0) xyNum,
|
select csi.id,csi.car_num carNum,csi.brand,csi.type,csi.ton,IFNULL(file1.num,0) xyNum,csi.is_white as isWhiteList,
|
||||||
IFNULL(file2.num,0) bxNum,IFNULL(file3.num,0) xszNum,csi.bx_date bxDay,sup_id supId,cs.name supName
|
IFNULL(file2.num,0) bxNum,IFNULL(file3.num,0) xszNum,csi.bx_date bxDay,sup_id supId,cs.name supName
|
||||||
from car_supplier_info csi
|
from car_supplier_info csi
|
||||||
LEFT JOIN car_supplier cs on csi.sup_id=cs.id
|
LEFT JOIN car_supplier cs on csi.sup_id=cs.id
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
order by csi.create_time desc
|
order by csi.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getCarSupDetails" resultType="com.bonus.gzcar.business.backstage.entity.CarCarVo">
|
<select id="getCarSupDetails" resultType="com.bonus.gzcar.business.backstage.entity.CarCarVo">
|
||||||
select csi.id,csi.car_num carNum,csi.brand,csi.type,csi.ton,IFNULL(file1.num,0) xyNum,
|
select csi.id,csi.car_num carNum,csi.brand,csi.type,csi.ton,IFNULL(file1.num,0) xyNum,csi.is_white as isWhiteList,
|
||||||
IFNULL(file2.num,0) bxNum,IFNULL(file3.num,0) xszNum,csi.bx_date bxDay,sup_id supId,cs.name supName
|
IFNULL(file2.num,0) bxNum,IFNULL(file3.num,0) xszNum,csi.bx_date bxDay,sup_id supId,cs.name supName
|
||||||
from car_supplier_info csi
|
from car_supplier_info csi
|
||||||
LEFT JOIN car_supplier cs on csi.sup_id=cs.id
|
LEFT JOIN car_supplier cs on csi.sup_id=cs.id
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,20 @@
|
||||||
<insert id="addDriverData" useGeneratedKeys="true" keyProperty="id">
|
<insert id="addDriverData" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into car_driver_info(
|
insert into car_driver_info(
|
||||||
name, phone, sup_id, creator, create_time, updator,
|
name, phone, sup_id, creator, create_time, updator,
|
||||||
update_time, is_active
|
update_time,is_white, is_active
|
||||||
)values (#{name},#{phone},#{supId},#{creator},now(),#{updater},now(),1)
|
)values (#{name},#{phone},#{supId},#{creator},now(),#{updater},now(),#{isWhiteList},1)
|
||||||
</insert>
|
</insert>
|
||||||
<update id="deleteDriverData">
|
<update id="deleteDriverData">
|
||||||
update car_driver_info set is_active=0 where id=#{id}
|
update car_driver_info set is_active=0 where id=#{id}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateDriver">
|
<update id="updateDriver">
|
||||||
update car_driver_info set name=#{name}, phone=#{phone},sup_id=#{supId},updator=#{updater},
|
update car_driver_info set name=#{name}, phone=#{phone},sup_id=#{supId},updator=#{updater},is_white=#{isWhiteList}
|
||||||
update_time=now()
|
update_time=now()
|
||||||
where id=#{id}
|
where id=#{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getDriverPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
|
<select id="getDriverPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
|
||||||
select cdi.id, cdi.name, cdi.phone, cdi.sup_id supId,file1.num sfzNum,file2.num jszNum,file3.num otherNum,cs.name supName
|
select cdi.id, cdi.name, cdi.phone, cdi.sup_id supId,file1.num sfzNum,file2.num jszNum,file3.num otherNum,cs.name supName,cdi.is_white as isWhiteList
|
||||||
from car_driver_info cdi
|
from car_driver_info cdi
|
||||||
left join car_supplier cs on cs.id=cdi.sup_id
|
left join car_supplier cs on cs.id=cdi.sup_id
|
||||||
left join(
|
left join(
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
ORDER BY cdi.create_time desc
|
ORDER BY cdi.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getDriverDetails" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
|
<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
|
select cdi.id, cdi.name, cdi.phone, cdi.sup_id supId,cs.name supName,cdi.is_white as isWhiteList
|
||||||
from car_driver_info cdi
|
from car_driver_info cdi
|
||||||
left join car_supplier cs on cs.id=cdi.id
|
left join car_supplier cs on cs.id=cdi.id
|
||||||
where cdi.id=#{id}
|
where cdi.id=#{id}
|
||||||
|
|
|
||||||
|
|
@ -127,10 +127,12 @@
|
||||||
IFNULL(SUM(ANY_VALUE(cpa.dispatch_num)),0) AS dispatchNum,
|
IFNULL(SUM(ANY_VALUE(cpa.dispatch_num)),0) AS dispatchNum,
|
||||||
SUM(IFNULL( cpo.dispatch_num,0)) dispatch_num,SUM(IFNULL(cpo.money,0)) money,
|
SUM(IFNULL( cpo.dispatch_num,0)) dispatch_num,SUM(IFNULL(cpo.money,0)) money,
|
||||||
ANY_VALUE(bp.bmname) AS companyName,
|
ANY_VALUE(bp.bmname) AS companyName,
|
||||||
CASE WHEN SUM(ANY_VALUE(cpa.dispatch_num)) = 0 OR SUM(ANY_VALUE(cpa.dispatch_num)) IS NULL THEN '2'
|
CASE WHEN cpas.apply_id is null THEN '4'
|
||||||
|
WHEN SUM(ANY_VALUE(cpa.dispatch_num)) = 0 OR SUM(ANY_VALUE(cpa.dispatch_num)) IS NULL THEN '2'
|
||||||
WHEN SUM(ANY_VALUE(cpa.dispatch_num)) = SUM(ANY_VALUE(cpa.need_num)) THEN '3'
|
WHEN SUM(ANY_VALUE(cpa.dispatch_num)) = SUM(ANY_VALUE(cpa.need_num)) THEN '3'
|
||||||
ELSE '1' END AS dispatchStatus
|
ELSE '1' END AS dispatchStatus
|
||||||
FROM car_plan_apply cpa
|
FROM car_plan_apply cpa
|
||||||
|
LEFT JOIN car_plan_apply_sup cpas on cpas.apply_id=cpa.id
|
||||||
LEFT JOIN bm_project bp ON cpa.pro_id = bp.bid_id
|
LEFT JOIN bm_project bp ON cpa.pro_id = bp.bid_id
|
||||||
left join(
|
left join(
|
||||||
SELECT sum(dispatch_num) dispatch_num,sum(money) money,cpo.apply_id
|
SELECT sum(dispatch_num) dispatch_num,sum(money) money,cpo.apply_id
|
||||||
|
|
@ -138,7 +140,8 @@
|
||||||
where cpo.status=1
|
where cpo.status=1
|
||||||
GROUP BY cpo.apply_id
|
GROUP BY cpo.apply_id
|
||||||
)cpo on cpo.apply_id=cpa.id
|
)cpo on cpo.apply_id=cpa.id
|
||||||
<where>
|
where
|
||||||
|
cpa.`status` = '2' AND cpa.status_type = '1'
|
||||||
<if test="yearMonth!=null and yearMonth!=''">
|
<if test="yearMonth!=null and yearMonth!=''">
|
||||||
AND DATE_FORMAT(cpa.create_time,'%Y-%m') = #{yearMonth}
|
AND DATE_FORMAT(cpa.create_time,'%Y-%m') = #{yearMonth}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -154,13 +157,18 @@
|
||||||
<if test="proName!=null and proName!=''">
|
<if test="proName!=null and proName!=''">
|
||||||
AND INSTR(bp.name,#{proName}) > 0
|
AND INSTR(bp.name,#{proName}) > 0
|
||||||
</if>
|
</if>
|
||||||
AND cpa.`status` = '2' AND cpa.status_type = '1'
|
<if test="dispatchStatus!=null and dispatchStatus!=''">
|
||||||
</where>
|
<if test='dispatchStatus=="4"'>
|
||||||
|
and cpas.apply_id is null
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
GROUP BY cpa.pro_id
|
GROUP BY cpa.pro_id
|
||||||
<if test="dispatchStatus!='0' and dispatchStatus!=null">
|
<if test="dispatchStatus!=null and dispatchStatus!=''">
|
||||||
HAVING (CASE WHEN SUM(ANY_VALUE(cpa.dispatch_num)) = 0 OR SUM(ANY_VALUE(cpa.dispatch_num)) IS NULL THEN '2'
|
<if test='dispatchStatus!="4" and dispatchStatus!="0"'>
|
||||||
WHEN SUM(ANY_VALUE(cpa.dispatch_num)) = SUM(ANY_VALUE(cpa.need_num)) THEN '3'
|
HAVING (CASE WHEN SUM(ANY_VALUE(cpa.dispatch_num)) = 0 OR SUM(ANY_VALUE(cpa.dispatch_num)) IS NULL THEN '2'
|
||||||
ELSE '1' END = #{dispatchStatus})
|
WHEN SUM(ANY_VALUE(cpa.dispatch_num)) = SUM(ANY_VALUE(cpa.need_num)) THEN '3'
|
||||||
|
ELSE '1' END = #{dispatchStatus})
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<!--首页-二级页面-工程详情-需求计划详情-->
|
<!--首页-二级页面-工程详情-需求计划详情-->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue