Commit 96ab7972 by liyanlin

fix

parent 72cc90f4
...@@ -29,14 +29,13 @@ public class ApprovalHistoryController { ...@@ -29,14 +29,13 @@ public class ApprovalHistoryController {
@ApiOperation("获取审批历史列表") @ApiOperation("获取审批历史列表")
@GetMapping @GetMapping
public ApprovalHistoryResult get(ApprovalHistoryReq req){ public ApprovalHistoryResult get(ApprovalHistoryReq req) {
ApprovalHistoryResult result = new ApprovalHistoryResult(); ApprovalHistoryResult result = new ApprovalHistoryResult();
try { try {
List<ApprovalHistoryVo> list = approvalHistoryService.getApprovalHistoryList(req); List<ApprovalHistoryVo> list = approvalHistoryService.getApprovalHistoryList(req);
result.setSuccess(true); result.setSuccess(true);
result.setList(list); result.setList(list);
} } catch (Exception ex) {
catch (Exception ex){
result.setSuccess(false); result.setSuccess(false);
result.setMsg(ex.getMessage()); result.setMsg(ex.getMessage());
} }
......
...@@ -18,11 +18,11 @@ import java.time.LocalDateTime; ...@@ -18,11 +18,11 @@ import java.time.LocalDateTime;
@ApiModel("审批请求Model") @ApiModel("审批请求Model")
public class ApprovalHistoryReq { public class ApprovalHistoryReq {
@ApiModelProperty(value = "审批时间-起始时间",required = true) @ApiModelProperty(value = "审批时间-起始时间", required = true, example = "2021-08-25 00:00:00")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startTime; private LocalDateTime startTime;
@ApiModelProperty(value = "审批时间-结束时间",required = true) @ApiModelProperty(value = "审批时间-结束时间", required = true, example = "2021-08-26 00:00:00")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime; private LocalDateTime endTime;
......
...@@ -3,8 +3,10 @@ ...@@ -3,8 +3,10 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" > "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<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"
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 resultType="com.blt.other.module.cost.vo.ApprovalHistoryVo">
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 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
......
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