综合查询
This commit is contained in:
parent
5c2d2f6119
commit
4b52f8076c
|
|
@ -222,6 +222,58 @@ public class ComplexQueryController extends BaseController {
|
|||
util.exportExcel(response, list, "综合查询--导出修饰待入库详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--查询待报废设备详情")
|
||||
@GetMapping("/getScrapList")
|
||||
public AjaxResult getScrapList(ScrapRecordInfo bean) {
|
||||
startPage();
|
||||
List<ScrapRecordInfo> list = complexQueryService.getScrapList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出待报废设备详情
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--导出待报废设备详情")
|
||||
@PostMapping("/exportScrapList")
|
||||
public void exportScrapList(HttpServletResponse response, ScrapRecordInfo bean) {
|
||||
List<ScrapRecordInfo> list = complexQueryService.getScrapList(bean);
|
||||
ExcelUtil<ScrapRecordInfo> util = new ExcelUtil<>(ScrapRecordInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--导出待报废设备详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已审核报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--查询已审核报废设备详情")
|
||||
@GetMapping("/getScrapAuditList")
|
||||
public AjaxResult getScrapAuditList(ScrapAuditInfo bean) {
|
||||
startPage();
|
||||
List<ScrapAuditInfo> list = complexQueryService.getScrapAuditList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出已审核报废设备详情
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--导出已审核报废设备详情")
|
||||
@PostMapping("/exportScrapAuditList")
|
||||
public void exportScrapAuditList(HttpServletResponse response, ScrapAuditInfo bean) {
|
||||
List<ScrapAuditInfo> list = complexQueryService.getScrapAuditList(bean);
|
||||
ExcelUtil<ScrapAuditInfo> util = new ExcelUtil<>(ScrapAuditInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--导出已审核报废设备详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 工程机具使用列表
|
||||
* @param bean
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 综合查询-机具出库列表查询
|
||||
|
|
@ -105,6 +106,6 @@ public class OutRecordInfo {
|
|||
@ApiModelProperty(value = "二级ID")
|
||||
private Integer secondTypeId;
|
||||
|
||||
@ApiModelProperty(value = "一级ID")
|
||||
private Integer firstTypeId;
|
||||
@ApiModelProperty(value = "一级ID集合")
|
||||
private List<Integer> firstTypeIdList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.material.basic.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 已报废审核详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/3/7 9:23
|
||||
*/
|
||||
@Data
|
||||
public class ScrapAuditInfo {
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "机具名称")
|
||||
@Excel(name = "机具名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格ID")
|
||||
private Integer typeId;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "购置单价")
|
||||
@Excel(name = "原值(元)")
|
||||
private BigDecimal buyPrice;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "报废人员")
|
||||
@Excel(name = "报废人员")
|
||||
private String scrapBy;
|
||||
|
||||
@ApiModelProperty(value = "审核人员")
|
||||
@Excel(name = "审核人员")
|
||||
private String auditBy;
|
||||
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty(value = "报废类型")
|
||||
@Excel(name = "报废类型")
|
||||
private String scrapType;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.material.basic.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 待报废详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/3/7 9:23
|
||||
*/
|
||||
@Data
|
||||
public class ScrapRecordInfo {
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "机具名称")
|
||||
@Excel(name = "机具名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格ID")
|
||||
private Integer typeId;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "购置单价")
|
||||
@Excel(name = "原值(元)")
|
||||
private BigDecimal buyPrice;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "报废人员")
|
||||
@Excel(name = "报废人员")
|
||||
private String scrapBy;
|
||||
|
||||
@ApiModelProperty(value = "审核人员")
|
||||
@Excel(name = "审核人员")
|
||||
private String auditBy;
|
||||
|
||||
@ApiModelProperty(value = "报废时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报废时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date scrapTime;
|
||||
|
||||
@ApiModelProperty(value = "报废类型")
|
||||
@Excel(name = "报废类型")
|
||||
private String scrapType;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -109,4 +109,18 @@ public interface ComplexQueryMapper {
|
|||
* @return
|
||||
*/
|
||||
UseStorageInfo selectInFo(UseStorageInfo useStorageInfo);
|
||||
|
||||
/**
|
||||
* 查询待报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<ScrapRecordInfo> getScrapList(ScrapRecordInfo bean);
|
||||
|
||||
/**
|
||||
* 查询已审核报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<ScrapAuditInfo> getScrapAuditList(ScrapAuditInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,4 +87,18 @@ public interface ComplexQueryService {
|
|||
* @return
|
||||
*/
|
||||
List<RepairInputRecord> getRepairInputList(RepairInputRecord bean);
|
||||
|
||||
/**
|
||||
* 查询待报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<ScrapRecordInfo> getScrapList(ScrapRecordInfo bean);
|
||||
|
||||
/**
|
||||
* 查询已审核报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<ScrapAuditInfo> getScrapAuditList(ScrapAuditInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -483,4 +483,24 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
return complexQueryMapper.getRepairInputList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ScrapRecordInfo> getScrapList(ScrapRecordInfo bean) {
|
||||
return complexQueryMapper.getScrapList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已审核报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ScrapAuditInfo> getScrapAuditList(ScrapAuditInfo bean) {
|
||||
return complexQueryMapper.getScrapAuditList(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
@ApiOperation("查询修试审核任务列表")
|
||||
@GetMapping("/questList")
|
||||
@SysLog(title = "查询修试审核任务列表", businessType = OperaType.QUERY, module = "机具系统->查询修试审核任务列表")
|
||||
@RequiresPermissions("service:auditing:list")
|
||||
//@RequiresPermissions("service:auditing:list")
|
||||
public AjaxResult questList(RepairAuditDetails repairAuditDetails) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
|
|
@ -100,7 +100,7 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("查看修饰审核任务详细列表")
|
||||
@GetMapping("/getRepairAuditList")
|
||||
@RequiresPermissions("service:auditing:list")
|
||||
//@RequiresPermissions("service:auditing:list")
|
||||
public AjaxResult getRepairAuditList(RepairAuditDetails repairAuditDetails) {
|
||||
List<RepairAuditDetails> list = repairAuditDetailsService.getRepairAuditList(repairAuditDetails);
|
||||
return AjaxResult.success(list);
|
||||
|
|
@ -214,7 +214,7 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
|
||||
@ApiOperation(value = "(外层)批量修改修试审核详细")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("repair:details:edit")
|
||||
//@RequiresPermissions("repair:details:edit")
|
||||
@SysLog(title = "批量修试审核详细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->批量修改修试审核详细")
|
||||
@PostMapping("/outerAudit")
|
||||
public AjaxResult outerAudit(@RequestBody @NotNull List<RepairAuditDetails> repairAuditDetails) {
|
||||
|
|
|
|||
|
|
@ -380,6 +380,7 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
|||
if (scrapApplyDetails == null || CollectionUtils.isEmpty(scrapApplyDetails.getIdList())) {
|
||||
return AjaxResult.error("参数为空");
|
||||
}
|
||||
try {
|
||||
// 根据传参修改报废状态
|
||||
int result = 0;
|
||||
for (Long id : scrapApplyDetails.getIdList()) {
|
||||
|
|
@ -393,6 +394,9 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
|||
return AjaxResult.success("审核通过");
|
||||
}
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -363,8 +363,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="typeModelName != null and typeModelName != ''">
|
||||
and bs.type_model_name like CONCAT('%',#{typeModelName},'%')
|
||||
</if>
|
||||
<if test="firstTypeId != null ">
|
||||
and mt3.type_id = #{firstTypeId}
|
||||
<if test="firstTypeIdList != null and firstTypeIdList.size > 0">
|
||||
and mt3.type_id in
|
||||
<foreach collection="firstTypeIdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND bs.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
|
|
@ -816,4 +819,79 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getScrapList" resultType="com.bonus.material.basic.domain.ScrapRecordInfo">
|
||||
SELECT mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mt.buy_price AS buyPrice,
|
||||
mm.ma_code AS maCode,
|
||||
sad.create_by AS scrapBy,
|
||||
su.nick_name AS auditBy,
|
||||
sad.create_time AS scrapTime,
|
||||
CASE
|
||||
sad.scrap_source
|
||||
WHEN '1' then '退料报废'
|
||||
WHEN '2' then '维修报废'
|
||||
WHEN '3' then '盘点报废'
|
||||
ELSE ''
|
||||
END
|
||||
as scrapType
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = sad.ma_id
|
||||
LEFT JOIN sys_user su ON sad.audit_by = su.user_id
|
||||
WHERE 1 = 1
|
||||
<if test="typeId != null">
|
||||
AND sad.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||
mt.type_name like concat('%',#{keyWord},'%') or
|
||||
su.nick_name like concat('%',#{keyWord},'%') or
|
||||
sad.create_by like concat('%',#{keyWord},'%') or
|
||||
mm.ma_code like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_code ,mt.type_id
|
||||
</select>
|
||||
|
||||
<select id="getScrapAuditList" resultType="com.bonus.material.basic.domain.ScrapAuditInfo">
|
||||
SELECT mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mt.buy_price AS buyPrice,
|
||||
mm.ma_code AS maCode,
|
||||
su.nick_name AS scrapBy,
|
||||
su2.nick_name AS auditBy,
|
||||
sad.ledger_time AS auditTime,
|
||||
CASE
|
||||
sad.scrap_source
|
||||
WHEN '1' then '退料报废'
|
||||
WHEN '2' then '维修报废'
|
||||
WHEN '3' then '盘点报废'
|
||||
ELSE ''
|
||||
END
|
||||
as scrapType
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = sad.ma_id
|
||||
LEFT JOIN sys_user su ON sad.create_by = su.user_id
|
||||
LEFT JOIN sys_user su2 ON sad.ledger_by = su2.user_id
|
||||
WHERE 1 = 1
|
||||
<if test="typeId != null">
|
||||
AND sad.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||
mt.type_name like concat('%',#{keyWord},'%') or
|
||||
su.nick_name like concat('%',#{keyWord},'%') or
|
||||
su2.nick_name like concat('%',#{keyWord},'%') or
|
||||
mm.ma_code like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_code ,mt.type_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue