This commit is contained in:
mashuai 2024-05-14 18:02:58 +08:00
parent 4ff2059cc6
commit 2a8e060652
3 changed files with 34 additions and 13 deletions

View File

@ -766,7 +766,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND sd.dept_name = #{maTypeName} AND sd.dept_name = #{maTypeName}
</if> </if>
<if test="materialCode != null and materialCode != ''"> <if test="materialCode != null and materialCode != ''">
AND lai.`code` LIKE CONCAT('%',#{materialCode},'%') AND ba.`code` LIKE CONCAT('%',#{materialCode},'%')
</if> </if>
<if test="unitId != null and unitId != ''"> <if test="unitId != null and unitId != ''">
AND bai.unit_id = #{unitId} AND bai.unit_id = #{unitId}

View File

@ -31,6 +31,11 @@ public class ScrapApplyDetails extends BaseEntity
@ApiModelProperty(value = "任务ID") @ApiModelProperty(value = "任务ID")
private Long taskId; private Long taskId;
/**
* 审核状态
*/
private Integer taskStatus;
/** 上级ID */ /** 上级ID */
@ApiModelProperty(value = "上级ID") @ApiModelProperty(value = "上级ID")
private Long parentId; private Long parentId;
@ -51,6 +56,10 @@ public class ScrapApplyDetails extends BaseEntity
@ApiModelProperty(value = "(1退料2,维修审核3盘点)") @ApiModelProperty(value = "(1退料2,维修审核3盘点)")
private String scrapSource; private String scrapSource;
/** 报废单号 */
@ApiModelProperty(value = "报废单号")
private String scrapCode;
/** 0自然1人为 */ /** 0自然1人为 */
@ApiModelProperty(value = "0=自然1人为") @ApiModelProperty(value = "0=自然1人为")
private String scrapType; private String scrapType;
@ -109,13 +118,19 @@ public class ScrapApplyDetails extends BaseEntity
@ApiModelProperty(value = "数据状态") @ApiModelProperty(value = "数据状态")
private Integer repairStatus; private Integer repairStatus;
private String keyword; private String keywords;
private String typeName; private String typeName;
/** 任务ID集合 --导出时可以选择导出*/ /** 任务ID集合 --导出时可以选择导出*/
@ApiModelProperty(value = "任务ID集合") @ApiModelProperty(value = "任务ID集合")
private String taskIdList; private String taskIdList;
@ApiModelProperty(value = "开始时间")
private String beginTime;
@ApiModelProperty(value = "结束时间")
private String endTime;
public void setId(Long id) public void setId(Long id)
{ {

View File

@ -72,30 +72,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE WHERE
sad.scrap_source IN ( '1', '2' ) sad.scrap_source IN ( '1', '2' )
AND tk.task_type = 57 AND tk.task_type = 57
<if test="keyword != null and keyword != ''"> <if test="keywords != null and keywords != ''">
AND (locate(#{keyword}, tk.create_by) > 0 AND (locate(#{keywords}, tk.create_by) > 0
or locate(#{keyword}, tk.CODE) > 0 or locate(#{keywords}, tk.CODE) > 0
or locate(#{keyword}, bui.unit_name) > 0 or locate(#{keywords}, bui.unit_name) > 0
or locate(#{keyword}, bpl.lot_name) > 0 or locate(#{keywords}, bpl.lot_name) > 0
or locate(#{keyword}, tk1.CODE) > 0) or locate(#{keywords}, tk1.CODE) > 0)
</if> </if>
<if test="backUnit != null and backUnit != ''"> <if test="backUnit != null and backUnit != ''">
and bui.unit_id = #{backUnit} and bui.unit_id = #{backUnit}
</if> </if>
<if test="repairStatus != null and repairStatus != ''">
and tk.task_status = #{repairStatus}
</if>
<if test="backPro != null and backPro != ''"> <if test="backPro != null and backPro != ''">
and bpl.lot_id = #{backPro} and bpl.lot_id = #{backPro}
</if> </if>
<if test="scrapCode != null and scrapCode != ''">
and tk.CODE like concat('%', #{scrapCode}, '%')
</if>
<if test="taskStatus != null and taskStatus != ''">
and tk.task_status = #{taskStatus}
</if>
<if test="scrapSource != null and scrapSource != ''">
and sad.scrap_source = #{scrapSource}
</if>
<if test="type != null and type != ''"> <if test="type != null and type != ''">
and mt1.type_id = #{type} and mt1.type_id = #{type}
</if> </if>
<if test="backCode != null and backCode != ''"> <if test="backCode != null and backCode != ''">
and locate(#{backCode}, tk.code) > 0 and locate(#{backCode}, tk.code) > 0
</if> </if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and tk.create_time between #{params.beginTime} and #{params.endTime} and DATE(tk.create_time) between #{beginTime} and #{endTime}
</if> </if>
GROUP BY tk.CODE GROUP BY tk.CODE
order by tk.create_time desc order by tk.create_time desc