Commit ccb93980 by 崔彦峰

到账伴侣h5列表查询新增主体类型参数。

1 parent 10855914
...@@ -31,4 +31,10 @@ public class H5ApprovalRecordRequest implements Serializable { ...@@ -31,4 +31,10 @@ public class H5ApprovalRecordRequest implements Serializable {
@ApiModelProperty(name = "endDate", notes = "结束日期", dataType = "String") @ApiModelProperty(name = "endDate", notes = "结束日期", dataType = "String")
private Date endDate; private Date endDate;
@ApiModelProperty(name = "custType", notes = "主体类型:1-广联 2-优加", dataType = "String")
private String custType;
@ApiModelProperty(name = "custId", notes = "主体id(前端不需要传)", dataType = "String")
private String custId;
} }
...@@ -3,9 +3,11 @@ package cn.com.glsx.dj.financial.service; ...@@ -3,9 +3,11 @@ package cn.com.glsx.dj.financial.service;
import cn.com.glsx.dj.financial.dto.approval.H5ApprovalRecordDTO; import cn.com.glsx.dj.financial.dto.approval.H5ApprovalRecordDTO;
import cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper; import cn.com.glsx.dj.financial.mapper.ApprovalRecordsMapper;
import cn.com.glsx.dj.financial.mapper.ApprovalTemplateDetailMapper; import cn.com.glsx.dj.financial.mapper.ApprovalTemplateDetailMapper;
import cn.com.glsx.dj.financial.mapper.NbCbCustInfoMapper;
import cn.com.glsx.dj.financial.mapper.NbCbReceiptMapper; import cn.com.glsx.dj.financial.mapper.NbCbReceiptMapper;
import cn.com.glsx.dj.financial.model.ApprovalRecords; import cn.com.glsx.dj.financial.model.ApprovalRecords;
import cn.com.glsx.dj.financial.model.ApprovalTemplateDetail; import cn.com.glsx.dj.financial.model.ApprovalTemplateDetail;
import cn.com.glsx.dj.financial.model.NbCbCustInfo;
import cn.com.glsx.dj.financial.request.approval.H5ApprovalRecordRequest; import cn.com.glsx.dj.financial.request.approval.H5ApprovalRecordRequest;
import cn.com.glsx.dj.financial.util.FileUtils; import cn.com.glsx.dj.financial.util.FileUtils;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination; import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
...@@ -18,6 +20,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -18,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -42,6 +45,9 @@ public class ApprovalRecordService { ...@@ -42,6 +45,9 @@ public class ApprovalRecordService {
@Autowired @Autowired
private Environment env; private Environment env;
@Autowired
private NbCbCustInfoMapper nbCbCustInfoMapper;
/** /**
* 到账伴侣H5页面-审批详情 * 到账伴侣H5页面-审批详情
* *
...@@ -146,6 +152,15 @@ public class ApprovalRecordService { ...@@ -146,6 +152,15 @@ public class ApprovalRecordService {
*/ */
public Page<H5ApprovalRecordDTO> getH5ApprovalRecordList(RpcPagination<H5ApprovalRecordRequest> pagination) { public Page<H5ApprovalRecordDTO> getH5ApprovalRecordList(RpcPagination<H5ApprovalRecordRequest> pagination) {
Page<H5ApprovalRecordDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(), pagination.isNeedCount()); Page<H5ApprovalRecordDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(), pagination.isNeedCount());
if (StringUtils.isNotBlank(pagination.getCondition().getCustType())) {
Example example = new Example(NbCbCustInfo.class);
example.createCriteria().andEqualTo("delFlag",0)
.andEqualTo("custType", pagination.getCondition().getCustType());
List<NbCbCustInfo> nbCbCustInfos = nbCbCustInfoMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(nbCbCustInfos)) {
pagination.getCondition().setCustId(nbCbCustInfos.get(0).getCustId());
}
}
approvalRecordsMapper.getH5ApprovalRecordList(pagination.getCondition()); approvalRecordsMapper.getH5ApprovalRecordList(pagination.getCondition());
return page; return page;
} }
......
...@@ -133,6 +133,9 @@ ...@@ -133,6 +133,9 @@
<if test="endDate != null"> <if test="endDate != null">
and date(d.trans_time) &lt;= date(#{endDate}) and date(d.trans_time) &lt;= date(#{endDate})
</if> </if>
<if test="custId != null">
and r.custId = #{custId}
</if>
</where> </where>
union all union all
...@@ -171,6 +174,9 @@ ...@@ -171,6 +174,9 @@
<if test="endDate != null"> <if test="endDate != null">
and date(d.trans_time) &lt;= date(#{endDate}) and date(d.trans_time) &lt;= date(#{endDate})
</if> </if>
<if test="custId != null">
and r.custId = #{custId}
</if>
</where> </where>
) t1 ) t1
order by t1.created_date desc order by t1.created_date desc
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!