修改导出 及明细

This commit is contained in:
haozq 2024-11-11 14:27:54 +08:00
parent c2282eed91
commit 54cc2a1a38
3 changed files with 20 additions and 3 deletions

View File

@ -22,4 +22,15 @@ public class StatisticsVo {
* 待发货数量
*/
private int num;
/**
* 待发货数量
*/
private int fh;
/**
* 待发货数量
*/
private int dfh;
}

View File

@ -263,6 +263,8 @@ public class PlanOutServiceImpl implements PlanOutService{
map.put("overNum",data.getNum());
//不在计划内的数量
map.put("noPlanNum",list.get(1).getFhNum());
map.put("dfh",list.get(0).getDfh());
map.put("yfh",list.get(0).getFh());
}catch (Exception e){
map.put("neeNum",0);
@ -271,6 +273,8 @@ public class PlanOutServiceImpl implements PlanOutService{
map.put("overNum",0);
//不在计划内的数量
map.put("noPlanNum",0);
map.put("dfh",0);
map.put("yfh",100);
log.error(e.toString(),e);
}
return ServerResponse.createSuccess(map);

View File

@ -120,11 +120,12 @@
where ppi.pro_id=#{proId}
</select>
<select id="getStatistics" resultType="com.bonus.gzgqj.business.plan.entity.StatisticsVo">
select sum(need_num) needNum ,sum(fh_num) fhNum,SUM(IF(need_num>=fh_num,need_num-fh_num,0)) dfhNum
select sum(need_num) needNum ,sum(fh_num+tz_num) fhNum,SUM(IF(need_num-fh_num-tz_num,need_num-fh_num-tz_num,0)) dfhNum,
ROUND(sum(fh_num+tz_num)/sum(need_num)*100) fh,100- ROUND(sum(fh_num+tz_num) /sum(need_num)*100) dfh
from t_pro_need_info
WHERE need_type=1
UNION
select IFNULL( sum(need_num),0) needNum ,IFNULL(sum(fh_num),0) fhNum,IFNULL(SUM(IF(need_num>=fh_num,need_num-fh_num,0)),0) dfhNum
select IFNULL( sum(need_num),0) needNum ,IFNULL(sum(fh_num),0) fhNum,IFNULL(SUM(IF(need_num-fh_num-tz_num,need_num-fh_num-tz_num,0)),0) dfhNum,0,0
from t_pro_need_info
WHERE need_type=2
</select>
@ -239,7 +240,8 @@
order by plan.update_time DESC
</select>
<select id="getDataInfoByPage" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
select pni.id,pni.type,pni.name,pni.module,pni.module_id moduleId,pni.need_num,pni.fh_num,pni.tz_num,
select pni.id,pni.type,pni.name,pni.module,pni.module_id moduleId,pni.need_num needNum,pni.fh_num fhNum,pni.tz_num tzNum,
IF(pni.need_num-pni.fh_num-pni.tz_num >0,pni.need_num-pni.fh_num-pni.tz_num,0) diff,
pro.num proNum,plan.num planNum,pni.unit,pro2.name proName
from t_pro_need_info pni
LEFT JOIN(