工程竣工未归还查询

This commit is contained in:
hongchao 2025-11-24 14:21:09 +08:00
parent cbc4faa3d6
commit 86be0b78d0
7 changed files with 180 additions and 0 deletions

View File

@ -19,6 +19,8 @@ import com.bonus.material.basic.service.ComplexQueryService;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.domain.Type;
import com.bonus.material.part.domain.PartInventory;
import com.bonus.material.push.domain.MachineInfoBean;
import com.bonus.material.push.domain.MachineInfoExport;
import com.bonus.system.api.model.LoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -634,4 +636,44 @@ public class ComplexQueryController extends BaseController {
List<Type> pageList = complexQueryService.getStorageNumLogDetails(bean);
return AjaxResult.success(getDataTable(pageList));
}
/**
* 工程竣工未归还查询列表
*/
@ApiOperation(value = "综合查询--工程竣工未归还查询列表")
@GetMapping("/getFinishNoReturnList")
public AjaxResult getFinishNoReturnList(MachineInfoBean bean) {
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
List<MachineInfoBean> list = complexQueryService.getFinishNoReturnList(bean);
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
}
/**
* 导出工程竣工未归还查询列表
* @param response
* @param bean
*/
@ApiOperation("导出工程竣工未归还查询列表")
@PostMapping("/exportFinishNoReturnList")
public void exportFinishNoReturnList(HttpServletResponse response, MachineInfoBean bean)
{
String fileName = "工程竣工未归还报表";
List<MachineInfoBean> list = complexQueryService.getFinishNoReturnList(bean);
List<MachineInfoExport> exportList = new ArrayList<>();
//将list复制到exportList
for (int i = 0; i < list.size(); i++) {
MachineInfoExport machineInfoExport = new MachineInfoExport();
machineInfoExport.setSerialNumber(i + 1);
BeanUtils.copyProperties(list.get(i), machineInfoExport);
exportList.add(machineInfoExport);
}
ExcelUtil<MachineInfoExport> util = new ExcelUtil<>(MachineInfoExport.class);
// 获取当前年月日时分秒导出时间用括号拼接在后面
String title = "工程竣工未归还报表" + "" + "导出时间:" + DateUtils.getTime() + "";
util.exportExcel(response, exportList, fileName, title);
}
}

View File

@ -4,6 +4,7 @@ import com.bonus.material.basic.domain.*;
import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
import com.bonus.material.ma.domain.Type;
import com.bonus.material.part.domain.PartInventory;
import com.bonus.material.push.domain.MachineInfoBean;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -255,4 +256,6 @@ public interface ComplexQueryMapper {
* @return
*/
List<ProjUsingRecordExport> getSecondStatisticsList(ProjUsingRecord bean);
List<MachineInfoBean> getFinishNoReturnList(MachineInfoBean bean);
}

View File

@ -5,6 +5,7 @@ import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
import com.bonus.material.ma.domain.Type;
import com.bonus.material.part.domain.PartInventory;
import com.bonus.material.part.domain.PartTypeQueryDto;
import com.bonus.material.push.domain.MachineInfoBean;
import java.util.List;
@ -168,4 +169,6 @@ public interface ComplexQueryService {
* @return
*/
List<ProjUsingRecordExport> getSecondStatisticsList(ProjUsingRecord bean);
List<MachineInfoBean> getFinishNoReturnList(MachineInfoBean bean);
}

View File

@ -12,6 +12,7 @@ import com.bonus.material.basic.service.ComplexQueryService;
import com.bonus.material.ma.domain.Type;
import com.bonus.material.part.domain.PartInventory;
import com.bonus.material.part.domain.PartTypeQueryDto;
import com.bonus.material.push.domain.MachineInfoBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -857,4 +858,15 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
return new ArrayList<>();
}
}
/**
* 工程竣工未归还查询列表
* @param bean
* @return
*/
@Override
public List<MachineInfoBean> getFinishNoReturnList(MachineInfoBean bean) {
return complexQueryMapper.getFinishNoReturnList(bean);
}
}

View File

@ -0,0 +1,89 @@
package com.bonus.material.push.domain;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @description 综合查询--退料查询
* @author hay
* @date 2024/2/26 14:51
*/
@ApiModel(description = "工程竣工未归还查询")
@Data
public class MachineInfoExport implements Serializable {
private static final long serialVersionUID = 2227217051604273598L;
@ApiModelProperty(value = "主键id")
private Integer id;
@ApiModelProperty(value = "序号")
@Excel(name = "序号", isSequence = true, sort = 0, width = 5)
private Integer serialNumber;
// 设备id
private String typeId;
// 设备名称
private String typeName;
// 规格型号
private String typeModelName;
// 计量单位
private String unit;
// 数量
private BigDecimal num;
// 固定资产编号
private String assetsCode;
//租赁价格
private String rentPrice;
//库管员
private String typeKeeperName;
// 状态
private String status;
// 实施组织
@ApiModelProperty(value = "分公司")
@Excel(name = "分公司", width = 30)
private String deptName;
// 实施组织id
private Integer deptId;
// 工程名称
@ApiModelProperty(value = "工程名称")
@Excel(name = "工程名称", width = 80)
private String proName;
// 项目管理部
private String proCenter;
// 领用时间
private String leaseTime;
// 到期时间
private String expireTime;
// 机具编码
private String maCode;
// 剩余到期天数
private Integer daysDiff;
// 竣工时间
private String actualEndDate;
// 负责人
private String personName;
// 联系方式
private String personPhone;
private String specification;
private String materialName;
private String materialDw;
private String subKcNum;
/**
* 1 牵张设备 2 抱杆 3动力设备 4 变电专业设备 5安全工器具 6自主创新设备 7其他
*/
private Integer isStatics;
//租赁价格
private String leasePrice;
}

View File

@ -2111,5 +2111,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY proId,typeId
ORDER BY proId
</select>
<select id="getFinishNoReturnList" resultType="com.bonus.material.push.domain.MachineInfoBean">
select
bp.pro_name as proName,
bp.pro_center as proCenter,
sd.dept_name as deptName,
sd.dept_id as deptId
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.is_slt = 0 and sai.end_time is null and bp.actual_end_date is not null
and bp.pro_center is not null and bp.external_id is not null
and bai.is_show = 1
and mt.jiju_type = 1
and mt2.is_statics != 1
<if test="deptName != null and deptName != ''">
and sd.dept_name = #{deptName}
</if>
<if test="proName != null and proName != ''">
and bp.pro_name like concat('%', #{proName}, '%')
</if>
GROUP BY bp.external_id
ORDER BY
sd.order_num
</select>
</mapper>

View File

@ -709,8 +709,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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.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 and bp.external_id is not null
and bai.is_show = 1
and mt.jiju_type = 1
and mt2.is_statics != 1
GROUP BY bp.pro_center
</select>
<select id="getCompletionNotRefundedDetailsSub" resultType="com.bonus.material.push.domain.MachineInfoBean">