Commit 72cc90f4 by liyanlin

增加字段

parent 7f48030c
...@@ -31,4 +31,7 @@ public class ApprovalHistoryReq { ...@@ -31,4 +31,7 @@ public class ApprovalHistoryReq {
@ApiModelProperty("费用类型") @ApiModelProperty("费用类型")
private String typeNo; private String typeNo;
@ApiModelProperty("费用单号,支持模糊搜索")
private String costNo;
} }
...@@ -17,15 +17,24 @@ import java.time.LocalDateTime; ...@@ -17,15 +17,24 @@ import java.time.LocalDateTime;
@ApiModel("审批历史查询Vo") @ApiModel("审批历史查询Vo")
public class ApprovalHistoryVo { public class ApprovalHistoryVo {
@ApiModelProperty
private Integer id;
@ApiModelProperty(value = "费用单号") @ApiModelProperty(value = "费用单号")
private String costNo; private String costNo;
@ApiModelProperty(value = "费用类型")
private String costFrom;
@ApiModelProperty(value = "借支/借还")
private Integer isLend;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "审批时间") @ApiModelProperty(value = "审批时间")
private LocalDateTime approvalTime; private LocalDateTime approvalTime;
@ApiModelProperty(value = "审批前费用状态") @ApiModelProperty(value = "审批前费用状态")
private Integer costStatus; private String costStatus;
@ApiModelProperty(value = "是否通过") @ApiModelProperty(value = "是否通过")
private boolean isPassed; private boolean isPassed;
......
...@@ -4,11 +4,14 @@ ...@@ -4,11 +4,14 @@
<mapper namespace="com.blt.other.module.cost.dao.ApprovalHistoryMapper"> <mapper namespace="com.blt.other.module.cost.dao.ApprovalHistoryMapper">
<select id="getApprovalHistoryList" parameterType="com.blt.other.module.cost.dto.request.ApprovalHistoryReq" resultType="com.blt.other.module.cost.vo.ApprovalHistoryVo"> <select id="getApprovalHistoryList" parameterType="com.blt.other.module.cost.dto.request.ApprovalHistoryReq" resultType="com.blt.other.module.cost.vo.ApprovalHistoryVo">
select ah.cost_no as costNo ,ah.cost_status as costStatus ,ah.is_passed as isPassed ,ah.approval_time as approvalTime ,c.type_name as typeName,u.username from approval_history ah select ah.id, ah.cost_no as costNo ,c.cost_form as costFrom,c.is_lend as isLend, s2.statusvalue as costStatus ,ah.is_passed as isPassed ,ah.approval_time as approvalTime ,c.type_name as typeName,u.username
from approval_history ah
left join cost c on c.cost_no = ah.cost_no left join cost c on c.cost_no = ah.cost_no
left join `user` u on u.userid = ah.approval_user_id left join `user` u on u.userid = ah.approval_user_id
left join status s2 on s2.statusname = 'cost_status' and s2.statuskey = ah.cost_status
where ah.approval_time between #{startTime} and #{endTime} where ah.approval_time between #{startTime} and #{endTime}
<if test="costStatus != null">and ah.cost_status = #{costStatus}</if> <if test="costStatus != null">and ah.cost_status = #{costStatus}</if>
<if test="typeNo != null and typeNo != ''">and c.type_no = #{typeNo}</if> <if test="typeNo != null and typeNo != ''">and c.type_no = #{typeNo}</if>
<if test="costNo != null and costNo != ''">and ah.cost_no like '#{costNo}'</if>
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment