bug状态修改
This commit is contained in:
parent
9a6c6ba98f
commit
380ef770d0
|
|
@ -14,6 +14,8 @@ public class HomeSupStatisticsVo {
|
|||
|
||||
/**合同ID*/
|
||||
private Long id;
|
||||
/**供应商id*/
|
||||
private String supId;
|
||||
/**合同类型 1.车辆 2.吊车*/
|
||||
private int type;
|
||||
/**供应商名称*/
|
||||
|
|
|
|||
|
|
@ -146,4 +146,18 @@ public interface HomeIndexMapper {
|
|||
* @date 2025/1/20 9:25
|
||||
*/
|
||||
List<HomeProPlanDataViewVo> getProPlanDataView(BackParamsDto data);
|
||||
|
||||
/**
|
||||
* 依据车辆类型查询支付金额
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
IndexVo getPayMoneyByCarType(BackParamsDto dto);
|
||||
|
||||
/**
|
||||
* 查询 供应商 合同 的 以租赁数量金额 进度
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
HomeSupStatisticsVo getMoneyBySupContract(HomeSupStatisticsVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.gzcar.business.backstage.service;
|
|||
import com.bonus.gzcar.business.backstage.entity.*;
|
||||
import com.bonus.gzcar.business.backstage.mapper.HomeIndexMapper;
|
||||
import com.bonus.gzcar.manager.common.util.DateTimeHelper;
|
||||
import com.bonus.gzcar.manager.common.util.StringHelper;
|
||||
import com.bonus.gzcar.manager.common.util.StringUtils;
|
||||
import com.bonus.gzcar.manager.webResult.ServerResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -101,6 +102,9 @@ public class HomeIndexServiceImpl implements HomeIndexService {
|
|||
log.info("数据概览-已付款金额{}", Thread.currentThread().getName());
|
||||
List<Object> dataList = new ArrayList<>(2);
|
||||
IndexVo indexVo = mapper.getPayMoney(dto);
|
||||
if(StringHelper.isEmpty(indexVo.getMoney())){
|
||||
indexVo.setMoney("0");
|
||||
}
|
||||
dataList.add(0, indexVo != null ? Double.parseDouble(indexVo.getMoney()) : 0);
|
||||
dataList.add(1, indexVo != null ? Integer.parseInt(indexVo.getNum()) : 0);
|
||||
return dataList;
|
||||
|
|
@ -108,6 +112,9 @@ public class HomeIndexServiceImpl implements HomeIndexService {
|
|||
Future<List<Object>> future6 = testTaskExecutor.submit(() -> {
|
||||
log.info("数据概览-应付款金额{}", Thread.currentThread().getName());
|
||||
IndexVo indexVo = mapper.getNoPayMoney(dto);
|
||||
if(StringHelper.isEmpty(indexVo.getMoney())){
|
||||
indexVo.setMoney("0");
|
||||
}
|
||||
List<Object> dataList = new ArrayList<>(2);
|
||||
dataList.add(0, indexVo != null ? Double.parseDouble(indexVo.getMoney()) : 0);
|
||||
dataList.add(1, indexVo != null ? Integer.parseInt(indexVo.getNum()) : 0);
|
||||
|
|
@ -248,6 +255,17 @@ public class HomeIndexServiceImpl implements HomeIndexService {
|
|||
List<HomeSupStatisticsVo> dataList = new ArrayList<>();
|
||||
for (int i = 0; i < v.size(); i++) {
|
||||
HomeSupStatisticsVo vo = v.get(i);
|
||||
HomeSupStatisticsVo de=mapper.getMoneyBySupContract(vo);
|
||||
if(de!=null){
|
||||
vo.setLeaseProgress(handleProgress(vo.getContractMoney(),de.getLeaseMoney()));
|
||||
vo.setLeaseNum(de.getLeaseNum());
|
||||
vo.setLeaseMoney(de.getLeaseMoney());
|
||||
vo.setDispatchTime(de.getDispatchTime());
|
||||
}else{
|
||||
vo.setLeaseProgress(0);
|
||||
vo.setLeaseNum(0);
|
||||
vo.setLeaseMoney(0);
|
||||
}
|
||||
vo.setDispatchTime(vo.getDispatchTime() == null ? "--" : vo.getDispatchTime());
|
||||
dataList.add(vo);
|
||||
}
|
||||
|
|
@ -273,6 +291,13 @@ public class HomeIndexServiceImpl implements HomeIndexService {
|
|||
double v = handleMoney(list);
|
||||
vo.setContractMoney(v);
|
||||
}
|
||||
dto.setType("1");
|
||||
IndexVo indexVo = mapper.getPayMoneyByCarType(dto);
|
||||
if(indexVo!=null) {
|
||||
vo.setPayMoney(Double.parseDouble(indexVo.getMoney()));
|
||||
}else {
|
||||
vo.setPayMoney(0.0);
|
||||
}
|
||||
double progress = handleProgress(vo.getContractMoney(), vo.getPayMoney());
|
||||
vo.setProgress(progress);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -291,6 +316,14 @@ public class HomeIndexServiceImpl implements HomeIndexService {
|
|||
double v = handleMoney(list);
|
||||
vo.setContractMoney(v);
|
||||
}
|
||||
dto.setType("2");
|
||||
IndexVo indexVo = mapper.getPayMoneyByCarType(dto);
|
||||
if(indexVo!=null) {
|
||||
vo.setPayMoney(Double.parseDouble(indexVo.getMoney()));
|
||||
}else {
|
||||
vo.setPayMoney(0.0);
|
||||
}
|
||||
|
||||
double progress = handleProgress(vo.getContractMoney(), vo.getPayMoney());
|
||||
vo.setProgress(progress);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@
|
|||
ccr.ratio AS contractRatio,
|
||||
ccr.ratio_money AS contractMoney,
|
||||
ccr.sup_name AS supName,
|
||||
ccr.sup_id supId,
|
||||
cc.type AS type
|
||||
FROM car_contract cc
|
||||
LEFT JOIN car_contract_relation ccr ON cc.id = ccr.contract_id
|
||||
|
|
@ -94,16 +95,9 @@
|
|||
|
||||
<!--首页-租赁金额 type:1(运输车辆)、2.吊车-->
|
||||
<select id="getLeaseMoney" resultType="java.lang.String">
|
||||
<if test="type == 1">
|
||||
SELECT money
|
||||
FROM car_contract cc
|
||||
WHERE type = 1 AND is_active = '1'
|
||||
</if>
|
||||
<if test="type == 2">
|
||||
SELECT money
|
||||
FROM car_contract cc
|
||||
WHERE type = 2 AND is_active = '1'
|
||||
</if>
|
||||
WHERE type = #{type} AND is_active = '1'
|
||||
</select>
|
||||
<!--首页-二级页面-分公司数据-->
|
||||
<select id="getCompanyData" resultType="java.util.Map">
|
||||
|
|
@ -256,7 +250,7 @@
|
|||
</where>
|
||||
</select>
|
||||
<select id="getNoPayMoney" resultType="com.bonus.gzcar.business.backstage.entity.IndexVo">
|
||||
SELECT sum(a.money),sum(a.num)
|
||||
SELECT sum(a.money) money ,sum(a.num) num
|
||||
from (
|
||||
SELECT sum(cpo.money) money ,0 num
|
||||
from car_plan_out cpo
|
||||
|
|
@ -275,4 +269,23 @@
|
|||
</if>
|
||||
)a
|
||||
</select>
|
||||
<select id="getPayMoneyByCarType" resultType="com.bonus.gzcar.business.backstage.entity.IndexVo">
|
||||
SELECT sum(csp.money) money
|
||||
from car_slt_plan csp
|
||||
left join car_slt_apply sla on csp.slt_id=sla.id
|
||||
<where>
|
||||
csp.type=#{type}
|
||||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||||
AND DATE_FORMAT(sla.create_time,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getMoneyBySupContract"
|
||||
resultType="com.bonus.gzcar.business.backstage.entity.HomeSupStatisticsVo">
|
||||
select DATE_FORMAT(max(cpo.create_time),'%Y-%m-%d') dispatchTime ,SUM(dispatch_num) leaseNum ,sum(money) leaseMoney
|
||||
from car_plan_apply_sup cpas
|
||||
left join car_plan_out cpo on cpas.apply_id=cpo.apply_id
|
||||
where cpo.`status`=1 and cpas.contract_id=#{id} and cpas.sup_id=#{supId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue