代码提交

This commit is contained in:
liang.chao 2025-09-04 15:46:32 +08:00
parent 78e2a37c9c
commit c66fc79469
5 changed files with 42 additions and 16 deletions

View File

@ -212,8 +212,13 @@ public class PushProDataUseInfoController extends BaseController {
@GetMapping(value = "getCompletionNotRefundedDetails")
public TableDataInfo getCompletionNotRefundedDetails(ProIdsBean bean) {
try {
List<MachineInfoBean> results = new ArrayList<>();
startPage();
List<MachineInfoBean> results = service.getCompletionNotRefundedDetails(bean);
if (bean.getDeptId() != null) {
results = service.getCompletionNotRefundedDetails(bean);
} else {
results = service.getCompletionNotRefundedDetailsSub(bean);
}
return getDataTable(results);
} catch (Exception e) {
logger.error(e.toString(), e);

View File

@ -55,4 +55,6 @@ public interface ProDataUseInfoMapper {
SysUser getPersonNameAndPhone(MachineInfoBean machineDetail);
List<MachineInfoBean> getCompletionNotRefundedSub(ProIdsBean bean);
List<MachineInfoBean> getCompletionNotRefundedDetailsSub(ProIdsBean bean);
}

View File

@ -46,4 +46,6 @@ public interface ProDataUseInfoService {
List<MachineInfoBean> getAllMacheDetails(ProIdsBean bean);
List<MachineInfoBean> getCompletionNotRefundedSub(ProIdsBean bean);
List<MachineInfoBean> getCompletionNotRefundedDetailsSub(ProIdsBean bean);
}

View File

@ -213,4 +213,9 @@ public class ProDataUseInfoImpl implements ProDataUseInfoService {
public List<MachineInfoBean> getCompletionNotRefundedSub(ProIdsBean bean) {
return proDataUseInfoMapper.getCompletionNotRefundedSub(bean);
}
@Override
public List<MachineInfoBean> getCompletionNotRefundedDetailsSub(ProIdsBean bean) {
return proDataUseInfoMapper.getCompletionNotRefundedDetailsSub(bean);
}
}

View File

@ -283,7 +283,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getCompletionNotRefundedDetails" resultType="com.bonus.material.push.domain.MachineInfoBean">
select
bp.pro_name as proName,
bp.pro_center as proCenter,
bp.actual_end_date as actualEndDate,
DATEDIFF(NOW(), bp.actual_end_date) as daysDiff,
sai.num num,
@ -297,20 +296,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dept sd on bp.imp_unit = sd.dept_id
left join ma_type mt on sai.type_id = mt.type_id
left join ma_type mt2 on mt.parent_id = mt2.type_id
where sai.is_slt = 0 and sai.end_time is null and bp.actual_end_date is not null
and sd.dept_id = #{deptId} and bp.pro_center is not null
<if test="proId != null">
AND bp.pro_id = #{proId}
</if>
<if test="deptName != null and deptName !=''">
AND sd.dept_name like concat ('%', #{deptName}, '%')
</if>
<if test="proCenter != null and proCenter !=''">
AND bp.pro_center like concat ('%', #{proCenter}, '%')
</if>
<if test="proName != null and proName !=''">
AND bp.pro_name like concat ('%', #{proName}, '%')
</if>
where sai.status = 0 and bp.actual_end_date is not null
and sd.dept_id = #{deptId}
<if test="typeName != null and typeName !=''">
AND mt2.type_name like concat ('%', #{typeName}, '%')
</if>
@ -655,5 +642,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where sai.is_slt = 0 and sai.end_time is null and bp.actual_end_date is not null AND sd.dept_name = #{deptName} and bp.pro_center is not null
GROUP BY bp.pro_center
</select>
<select id="getCompletionNotRefundedDetailsSub" resultType="com.bonus.material.push.domain.MachineInfoBean">
select
bp.pro_name as proName,
bp.pro_center as proCenter,
bp.actual_end_date as actualEndDate,
DATEDIFF(NOW(), bp.actual_end_date) as daysDiff,
sai.num num,
mt.type_name as typeModelName,
mt.unit_name as unit,
mt2.type_name as typeName
from slt_agreement_info sai
left join bm_agreement_info bai on sai.agreement_id = bai.agreement_id
left join bm_project bp on bai.project_id = bp.pro_id
left join sys_dept sd on bp.imp_unit = sd.dept_id
left join ma_type mt on sai.type_id = mt.type_id
left join ma_type mt2 on mt.parent_id = mt2.type_id
where sai.status = 0 and bp.actual_end_date is not null
and bp.pro_center is not null and bp.pro_center= #{proCenter}
<if test="typeName != null and typeName !=''">
AND mt2.type_name like concat ('%', #{typeName}, '%')
</if>
<if test="typeModelName != null and typeModelName !=''">
AND mt.type_name like concat ('%', #{typeModelName}, '%')
</if>
</select>
</mapper>