文件下载
This commit is contained in:
parent
9218b8c3ed
commit
89563275b7
|
|
@ -305,7 +305,6 @@ public class PlanOutController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* "中文名称"文件下载
|
||||
*/
|
||||
|
|
@ -347,4 +346,20 @@ public class PlanOutController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查看来源-计划分页
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getWarnInfoPage")
|
||||
@DecryptAndVerify(decryptedClass = ProNeedInfo.class)
|
||||
public PageInfo<ProNeedInfo> getWarnInfoPage(EncryptedReq<ProNeedInfo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<ProNeedInfo> list = service.getWarnInfoPage(dto.getData());
|
||||
PageInfo<ProNeedInfo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ public class ProNeedInfo extends PageInfo {
|
|||
* 工程id
|
||||
*/
|
||||
private String proId;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String proName;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -168,4 +168,18 @@ public interface PlanOutMapper {
|
|||
* @return
|
||||
*/
|
||||
PlanApplyBean getDataInfoDetails(PlanApplyBean data);
|
||||
|
||||
/**
|
||||
* 超库存量
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<ProNeedInfo> getWarnInfoPage(ProNeedInfo data);
|
||||
|
||||
/**
|
||||
* 计划外量
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<ProNeedInfo> getWarnInfoPage2(ProNeedInfo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,4 +109,11 @@ public interface PlanOutService {
|
|||
* @return
|
||||
*/
|
||||
ServerResponse getDataInfoDetails(PlanApplyBean data);
|
||||
|
||||
/**
|
||||
* 计划量- 超库存量、非计划量
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<ProNeedInfo> getWarnInfoPage(ProNeedInfo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -484,6 +484,27 @@ public class PlanOutServiceImpl implements PlanOutService{
|
|||
return ServerResponse.createSuccess(new PlanApplyBean());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProNeedInfo> getWarnInfoPage(ProNeedInfo data) {
|
||||
List<ProNeedInfo> list=new ArrayList<>();
|
||||
try {
|
||||
if("1".equals(data.getType())){
|
||||
list=mapper.getWarnInfoPage(data);
|
||||
|
||||
}else{
|
||||
list=mapper.getWarnInfoPage2(data);
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,18 +240,19 @@
|
|||
</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,
|
||||
pro.num proNum,plan.num planNum,pni.unit
|
||||
from t_pro_need_info pni
|
||||
LEFT JOIN(
|
||||
select count(pro_id) num ,module_id
|
||||
FROM t_pro_need_info
|
||||
GROUP BY module_id
|
||||
)pro on pro.module_id=pni.module_id
|
||||
LEFT JOIN (
|
||||
select model_id ,count(apply_id) num
|
||||
FROM t_plan_details
|
||||
GROUP BY model_id
|
||||
)plan on plan.model_id=pni.module_id
|
||||
pro.num proNum,plan.num planNum,pni.unit,pro2.name proName
|
||||
from t_pro_need_info pni
|
||||
LEFT JOIN(
|
||||
select count(pro_id) num ,module_id
|
||||
FROM t_pro_need_info
|
||||
GROUP BY module_id
|
||||
)pro on pro.module_id=pni.module_id
|
||||
LEFT JOIN (
|
||||
select model_id ,count(apply_id) num
|
||||
FROM t_plan_details
|
||||
GROUP BY model_id
|
||||
)plan on plan.model_id=pni.module_id
|
||||
LEFT JOIN bm_project pro2 on pni.pro_id=pro2.id
|
||||
<where>
|
||||
<if test='typeSource=="1"'>
|
||||
and pni.fh_num=0
|
||||
|
|
@ -288,5 +289,34 @@
|
|||
pro.num proNum,plan.num planNum
|
||||
from t_pro_need_info pni
|
||||
</select>
|
||||
<select id="getWarnInfoPage" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
|
||||
select tni.pro_id,tni.type,tni.`name`,tni.module,tni.module_id moduleId ,tni.unit,tni.need_num needNum,tni.id ,mt.num,
|
||||
( tni.need_num-mt.num) diff
|
||||
from t_pro_need_info tni
|
||||
left join mm_type mt on mt.id=tni.module_id and mt.`LEVEL`=4
|
||||
where tni.need_num-mt.NUM>0
|
||||
<if test="module!=null and module!=''">
|
||||
and pni.`module` like concat('%',#{module},'%')
|
||||
</if>
|
||||
<if test="name!=null and name!=''">
|
||||
and pni.`name` like concat('%',#{name},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getWarnInfoPage2" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
|
||||
select tni.pro_id,tni.type,tni.`name`,tni.module,tni.module_id moduleId ,
|
||||
tni.unit,tni.need_num needNum,tni.id ,pro2.name proName,tni.fh_num fhNum
|
||||
from t_pro_need_info tni
|
||||
LEFT JOIN bm_project pro2 on tni.pro_id=pro2.id
|
||||
where 1=1 and tni.need_type=2
|
||||
<if test="module!=null and module!=''">
|
||||
and pni.`module` like concat('%',#{module},'%')
|
||||
</if>
|
||||
<if test="name!=null and name!=''">
|
||||
and pni.`name` like concat('%',#{name},'%')
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue