退料、维修、维修审核查询页面
This commit is contained in:
parent
69b5f3853d
commit
c90560fbaa
|
|
@ -638,9 +638,26 @@ public class BackApplyInfoController extends BaseController {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* -----------退料查询页面接口----------
|
||||
*/
|
||||
|
||||
/**
|
||||
* 退料查询列表
|
||||
*/
|
||||
@ApiOperation(value = "退料查询列表")
|
||||
@GetMapping("/getBackQueryList")
|
||||
public AjaxResult getBackQueryList(BackApplyInfo backApplyInfo) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
List<BackApplyInfo> list = backApplyInfoService.getBackQueryList(backApplyInfo);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@ public class BackApplyInfo implements Serializable {
|
|||
@ApiModelProperty(value = "类型id")
|
||||
private String typeId;
|
||||
|
||||
@ApiModelProperty(value = "规格id")
|
||||
private String typeModelId;
|
||||
|
||||
@ApiModelProperty(value = "物资类型")
|
||||
private String materialType;
|
||||
|
||||
|
|
@ -79,6 +82,9 @@ public class BackApplyInfo implements Serializable {
|
|||
@Excel(name = "物资类型")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
|
@ -229,4 +235,7 @@ public class BackApplyInfo implements Serializable {
|
|||
* 审核签名集合
|
||||
*/
|
||||
private List<LeaseOutSign> approveSignList;
|
||||
|
||||
@ApiModelProperty("机具类型(1机具,2安全工器具)")
|
||||
private String jiJuType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -538,4 +538,11 @@ public interface BackApplyInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
List<SltAgreementInfo> getClzList(BackApplyDetails applyInfo);
|
||||
|
||||
/**
|
||||
* 退料查询
|
||||
* @param backApplyInfo
|
||||
* @return
|
||||
*/
|
||||
List<BackApplyInfo> getBackQueryList(BackApplyInfo backApplyInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,5 +258,12 @@ public interface IBackApplyInfoService {
|
|||
* @return
|
||||
*/
|
||||
List<ExitPermit> getCodeList(ExitPermit bean);
|
||||
|
||||
/**
|
||||
* 退料查询列表
|
||||
* @param backApplyInfo
|
||||
* @return
|
||||
*/
|
||||
List<BackApplyInfo> getBackQueryList(BackApplyInfo backApplyInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -410,6 +410,16 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
return backApplyInfoMapper.getCodeList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BackApplyInfo> getBackQueryList(BackApplyInfo backApplyInfo) {
|
||||
try {
|
||||
return backApplyInfoMapper.getBackQueryList(backApplyInfo);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否有编码设备
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -185,5 +185,6 @@ public class RetainedEquipmentInfo {
|
|||
private String typeModelNameId;
|
||||
|
||||
@ApiModelProperty("机具类型(1机具,2安全工器具)")
|
||||
@Excel(name = "机具类型")
|
||||
private String jiJuType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -371,4 +371,19 @@ public class Machine extends BaseEntity {
|
|||
|
||||
@ApiModelProperty(value="下次检验结束时间")
|
||||
private String nextEndTime;
|
||||
|
||||
@ApiModelProperty(value = "施工类型ids")
|
||||
private String[] constructionTypes;
|
||||
|
||||
@ApiModelProperty(value = "物资类型id")
|
||||
private String materialTypeId;
|
||||
|
||||
@ApiModelProperty(value = "设备类型id")
|
||||
private String typeNameId;
|
||||
|
||||
@ApiModelProperty(value = "规格型号id")
|
||||
private String typeModelNameId;
|
||||
|
||||
@ApiModelProperty("机具类型(1机具,2安全工器具)")
|
||||
private String jiJuTypeStr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ public class MachineExportVo {
|
|||
@ApiModelProperty(value = "设备编号")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty("机具类型(1机具,2安全工器具)")
|
||||
@Excel(name = "机具类型")
|
||||
private String jiJuTypeStr;
|
||||
|
||||
@ApiModelProperty("状态名称")
|
||||
@Excel(name = "设备状态")
|
||||
private String statusName;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.back.domain.BackApplyInfo;
|
||||
import com.bonus.material.back.domain.vo.BackApplyVo;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.ma.domain.LabelBind;
|
||||
|
|
@ -464,4 +465,37 @@ public class RepairController extends BaseController {
|
|||
ExcelUtil<PartDetails> util = new ExcelUtil<PartDetails>(PartDetails.class);
|
||||
util.exportExcel(response, list, "配件查询列表");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* -----------维修查询页面接口----------
|
||||
*/
|
||||
/**
|
||||
* 维修查询列表
|
||||
*/
|
||||
@ApiOperation(value = "维修查询列表")
|
||||
@GetMapping("/getRepairQueryList")
|
||||
public AjaxResult getRepairQueryList(RepairTask bean) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
List<RepairTask> list = service.getRepairQueryList(bean);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
||||
/**
|
||||
* -----------维修审核查询页面接口----------
|
||||
*/
|
||||
|
||||
/**
|
||||
* 维修审核查询列表
|
||||
*/
|
||||
@ApiOperation(value = "维修审核查询列表")
|
||||
@GetMapping("/getRepairAuditQueryList")
|
||||
public AjaxResult getRepairAuditQueryList(RepairTask bean) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
List<RepairTask> list = service.getRepairAuditQueryList(bean);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,4 +226,21 @@ public class RepairTask {
|
|||
* 维修完成时间
|
||||
*/
|
||||
private String repairTime;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "单位id")
|
||||
private Long unitId;
|
||||
|
||||
@ApiModelProperty(value="工程id")
|
||||
private Long proId;
|
||||
|
||||
@ApiModelProperty(value = "类型id")
|
||||
private String typeId;
|
||||
|
||||
@ApiModelProperty(value = "规格id")
|
||||
private String typeModelId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -450,4 +450,18 @@ public interface RepairMapper {
|
|||
* @return
|
||||
*/
|
||||
RepairDeviceVO getRepairNumByTaskId(RepairDeviceVO bean);
|
||||
|
||||
/**
|
||||
* 查询维修查询列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairTask> getRepairQueryList(RepairTask bean);
|
||||
|
||||
/**
|
||||
* 获取维修查询列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairTask> getRepairAuditQueryList(RepairTask bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,4 +170,18 @@ public interface RepairService {
|
|||
* @return
|
||||
*/
|
||||
List<PartDetails> getPartUsingList(PartDetails bean);
|
||||
|
||||
/**
|
||||
* 获取维修查询列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairTask> getRepairQueryList(RepairTask bean);
|
||||
|
||||
/**
|
||||
* 获取维修审核查询列表
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<RepairTask> getRepairAuditQueryList(RepairTask bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1970,4 +1970,24 @@ public class RepairServiceImpl implements RepairService {
|
|||
return repairMapper.getPartUsingList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairTask> getRepairQueryList(RepairTask bean) {
|
||||
try {
|
||||
return repairMapper.getRepairQueryList(bean);
|
||||
} catch (Exception e) {
|
||||
log.error("查询修试查询列表", e.getMessage());
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairTask> getRepairAuditQueryList(RepairTask bean) {
|
||||
try {
|
||||
return repairMapper.getRepairAuditQueryList(bean);
|
||||
} catch (Exception e) {
|
||||
log.error("查询修试查询列表", e.getMessage());
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1712,4 +1712,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
order by start_time asc
|
||||
</select>
|
||||
<select id="getBackQueryList" resultType="com.bonus.material.back.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bcd.parent_id as parentId,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
bai2.`code`,
|
||||
mm.ma_code as maCode,
|
||||
bcd.back_num as backNum,
|
||||
bai2.back_person as backPerson,
|
||||
bcd.create_time AS createTime,
|
||||
bu2.unit_name AS unitName,
|
||||
bp2.pro_name AS proName,
|
||||
mt.jiju_type AS jijuType
|
||||
FROM
|
||||
back_check_details bcd
|
||||
LEFT JOIN back_apply_info bai2 ON bcd.parent_id = bai2.id
|
||||
LEFT JOIN tm_task_agreement tta ON bai2.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_unit bu2 ON bai.unit_id = bu2.unit_id
|
||||
LEFT JOIN bm_project bp2 ON bai.project_id = bp2.pro_id
|
||||
LEFT JOIN ma_type mt ON bcd.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id
|
||||
WHERE
|
||||
bai2.direct_id IS NULL
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
and bcd.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||
mt.type_name like concat('%',#{keyWord},'%') or
|
||||
bai2.`code` like concat('%',#{keyWord},'%') or
|
||||
mm.ma_code like concat('%',#{keyWord},'%') or
|
||||
bai2.back_person like concat('%',#{keyWord},'%') or
|
||||
bu2.unit_name like concat('%', #{keyWord}, '%') or
|
||||
bp2.pro_name like concat('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
and bu2.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
and bp2.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="typeId != null and typeId!=''">
|
||||
and mt2.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="typeModelId != null and typeModelId!=''">
|
||||
and mt.type_id = #{typeModelId}
|
||||
</if>
|
||||
ORDER BY bcd.parent_id desc,bcd.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ma.inspect_status as inspectStatus,
|
||||
ma.phone as phone,
|
||||
mt.jiju_type as jiJuType,
|
||||
CASE mt.jiju_type
|
||||
WHEN 2 THEN
|
||||
'安全工器具'
|
||||
ELSE
|
||||
'施工机具'
|
||||
END jiJuTypeStr,
|
||||
mt.is_check as isCheck,
|
||||
CASE
|
||||
WHEN RIGHT(ma.ma_code, 4) REGEXP '^[0-9]{4}$' THEN CAST(RIGHT(ma.ma_code, 4) AS UNSIGNED)
|
||||
|
|
@ -141,6 +147,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND (ma.assets_code IS NULL OR ma.assets_code = '')
|
||||
</if>
|
||||
</if>
|
||||
<if test="constructionTypes != null and constructionTypes.length > 0">
|
||||
and mt4.type_id in
|
||||
<foreach item="item" index="index" collection="constructionTypes" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="materialTypeId != null and materialTypeId != ''">
|
||||
and mt3.type_id = #{materialTypeId}
|
||||
</if>
|
||||
<if test="typeNameId != null and typeNameId != ''">
|
||||
and mt2.type_id = #{typeNameId}
|
||||
</if>
|
||||
<if test="typeModelNameId != null and typeModelNameId != ''">
|
||||
and mt.type_id = #{typeModelNameId}
|
||||
</if>
|
||||
<if test="jiJuTypeStr != null and jiJuTypeStr != ''">
|
||||
AND mt.jiju_type = #{jiJuTypeStr}
|
||||
</if>
|
||||
|
||||
) a
|
||||
where
|
||||
|
|
|
|||
|
|
@ -1660,4 +1660,128 @@
|
|||
and rad.type_id = #{typeId}
|
||||
and rad.is_ds = '0'
|
||||
</select>
|
||||
<select id="getRepairQueryList" resultType="com.bonus.material.repair.domain.RepairTask">
|
||||
SELECT
|
||||
rad.id AS id,
|
||||
rad.task_id as taskId,
|
||||
tt.create_time as repairTime,
|
||||
tt.`code` as repairCode,
|
||||
bai.CODE AS backCode,
|
||||
bui.unit_name AS backUnit,
|
||||
bpi.pro_name AS backPro,
|
||||
mt2.type_name as type,
|
||||
mt.type_name as typeName,
|
||||
mt.unit_name as unit,
|
||||
sda.dict_label as repairStatus,
|
||||
SUM(rad.repair_num) as repairNum,
|
||||
SUM(rad.repaired_num) as repairedNum,
|
||||
SUM(rad.scrap_num) as scrapNum
|
||||
FROM
|
||||
repair_apply_details rad
|
||||
LEFT JOIN tm_task tt on tt.task_id=rad.task_id
|
||||
LEFT JOIN sys_dict_data sda on sda.dict_value=tt.task_status and sda.dict_type='repair_task_status'
|
||||
LEFT JOIN tm_task_agreement tta ON rad.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
||||
LEFT JOIN bm_unit bui ON bai2.unit_id = bui.unit_id
|
||||
LEFT JOIN bm_project bpi ON bai2.project_id = bpi.pro_id and bpi.del_flag = '0'
|
||||
LEFT JOIN back_apply_info bai ON rad.back_id = bai.id
|
||||
LEFT JOIN ma_type mt on mt.type_id=rad.type_id
|
||||
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
|
||||
WHERE
|
||||
rad.is_ds = 0
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
and tt.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
tt.`code` like concat('%',#{keyWord},'%') or
|
||||
bai.CODE like concat('%',#{keyWord},'%') or
|
||||
bui.unit_name like concat('%',#{keyWord},'%') or
|
||||
bpi.pro_name like concat('%',#{keyWord},'%') or
|
||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||
mt.type_name like concat('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="unitId != null">
|
||||
and bui.unit_id = #{unitId}
|
||||
</if>
|
||||
<if test="proId != null">
|
||||
and bpi.pro_id = #{proId}
|
||||
</if>
|
||||
<if test="typeId != null and typeId!=''">
|
||||
and mt2.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="typeModelId != null and typeModelId!=''">
|
||||
and mt.type_id = #{typeModelId}
|
||||
</if>
|
||||
GROUP BY rad.task_id,rad.type_id
|
||||
ORDER BY tt.create_time desc
|
||||
</select>
|
||||
<select id="getRepairAuditQueryList" resultType="com.bonus.material.repair.domain.RepairTask">
|
||||
select *
|
||||
from (SELECT tt.create_time as createTime,
|
||||
tt2.`code` as repairCode,
|
||||
mt2.type_name as type,
|
||||
mt.type_name as typeName,
|
||||
SUM(rad.repair_num) as repairNum,
|
||||
SUM(rad.repaired_num) as repairedNum,
|
||||
SUM(rad.scrap_num) as scrapNum
|
||||
FROM repair_audit_details rad
|
||||
LEFT JOIN tm_task tt on tt.task_id = rad.task_id
|
||||
LEFT JOIN tm_task tt2 ON tt2.task_id = rad.repair_id
|
||||
LEFT JOIN ma_type mt ON rad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
WHERE tt.create_time < '2025-08-20 00:00:00'
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND tt.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
tt2.`code` like concat('%',#{keyWord},'%') or
|
||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||
mt.type_name like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="typeId != null and typeId!=''">
|
||||
and mt2.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="typeModelId != null and typeModelId!=''">
|
||||
and mt.type_id = #{typeModelId}
|
||||
</if>
|
||||
GROUP BY rad.task_id, rad.type_id
|
||||
|
||||
UNION
|
||||
|
||||
SELECT tt.create_time as createTime,
|
||||
tt2.`code` as repairCode,
|
||||
mt2.type_name as type,
|
||||
mt.type_name as typeName,
|
||||
SUM(rad.repair_num) as repairNum,
|
||||
SUM(rad.repaired_num) as repairedNum,
|
||||
SUM(rad.scrap_num) as scrapNum
|
||||
FROM repair_audit_details rad
|
||||
LEFT JOIN tm_task tt on tt.task_id = rad.task_id
|
||||
LEFT JOIN tm_task tt2 ON tt2.task_id = tt.pre_task_id
|
||||
LEFT JOIN ma_type mt ON rad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
WHERE tt.create_time >= '2025-08-20 00:00:00'
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND tt.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
tt2.`code` like concat('%',#{keyWord},'%') or
|
||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||
mt.type_name like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="typeId != null and typeId!=''">
|
||||
and mt2.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="typeModelId != null and typeModelId!=''">
|
||||
and mt.type_id = #{typeModelId}
|
||||
</if>
|
||||
GROUP BY rad.task_id, rad.type_id) a
|
||||
order by createTime desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue