修改导出 及明细
This commit is contained in:
parent
c2282eed91
commit
54cc2a1a38
|
|
@ -22,4 +22,15 @@ public class StatisticsVo {
|
||||||
* 待发货数量
|
* 待发货数量
|
||||||
*/
|
*/
|
||||||
private int num;
|
private int num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待发货数量
|
||||||
|
*/
|
||||||
|
private int fh;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待发货数量
|
||||||
|
*/
|
||||||
|
private int dfh;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,8 @@ public class PlanOutServiceImpl implements PlanOutService{
|
||||||
map.put("overNum",data.getNum());
|
map.put("overNum",data.getNum());
|
||||||
//不在计划内的数量
|
//不在计划内的数量
|
||||||
map.put("noPlanNum",list.get(1).getFhNum());
|
map.put("noPlanNum",list.get(1).getFhNum());
|
||||||
|
map.put("dfh",list.get(0).getDfh());
|
||||||
|
map.put("yfh",list.get(0).getFh());
|
||||||
|
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
map.put("neeNum",0);
|
map.put("neeNum",0);
|
||||||
|
|
@ -271,6 +273,8 @@ public class PlanOutServiceImpl implements PlanOutService{
|
||||||
map.put("overNum",0);
|
map.put("overNum",0);
|
||||||
//不在计划内的数量
|
//不在计划内的数量
|
||||||
map.put("noPlanNum",0);
|
map.put("noPlanNum",0);
|
||||||
|
map.put("dfh",0);
|
||||||
|
map.put("yfh",100);
|
||||||
log.error(e.toString(),e);
|
log.error(e.toString(),e);
|
||||||
}
|
}
|
||||||
return ServerResponse.createSuccess(map);
|
return ServerResponse.createSuccess(map);
|
||||||
|
|
|
||||||
|
|
@ -120,11 +120,12 @@
|
||||||
where ppi.pro_id=#{proId}
|
where ppi.pro_id=#{proId}
|
||||||
</select>
|
</select>
|
||||||
<select id="getStatistics" resultType="com.bonus.gzgqj.business.plan.entity.StatisticsVo">
|
<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
|
from t_pro_need_info
|
||||||
WHERE need_type=1
|
WHERE need_type=1
|
||||||
UNION
|
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
|
from t_pro_need_info
|
||||||
WHERE need_type=2
|
WHERE need_type=2
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -239,7 +240,8 @@
|
||||||
order by plan.update_time DESC
|
order by plan.update_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="getDataInfoByPage" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
|
<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
|
pro.num proNum,plan.num planNum,pni.unit,pro2.name proName
|
||||||
from t_pro_need_info pni
|
from t_pro_need_info pni
|
||||||
LEFT JOIN(
|
LEFT JOIN(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue