Commit 0c2f857d by jianshuqin

新增下 部门负责人与终审同一个,只审其一

parent 739ce66e
......@@ -20,6 +20,9 @@ public interface CostLogDao extends BaseMapper<CostLogDomain> {
//查询部门审核日志
CostLogDomain selectDepartmentCheckLog(String costNo);
//查询部门审核日志
CostLogDomain selectDepartmentCheckLog3(String costNo);
Page<CostLogDomain> queryPageFor4k(@Param("page") Page<Object> page,
@Param("sourceFrom") String sourceFrom);
}
......@@ -113,12 +113,15 @@ public class FinalCheckState extends CostState {
//部门审核人和最终审核人是同一个人,最终审核人自动通过。
CostLogDomain costLogDomain = costLogDao.selectDepartmentCheckLog(costDomain.getCostNo());
CostLogDomain costLogDomain3 = costLogDao.selectDepartmentCheckLog3(costDomain.getCostNo());
List<CostCurrentReviewer> costCurrentReviewerList = costCurrentReviewerMapper.selectByCostNo(costDomain.getCostNo());
if (costLogDomain != null && costCurrentReviewerList.stream().map(CostCurrentReviewer::getOaUserId).collect(Collectors.toList()).contains(costLogDomain.getUpdateUserid())) {
log.info("费用单:{}部门审核人和最终审核人是同一个人,最终审核人自动通过。", costDomain.getCostNo());
this.autoPass("(部门审核人和最终审核人是同一人)");
return;
if (costLogDomain != null) {
List<Integer> listCurrentReviewer = costCurrentReviewerList.stream().map(CostCurrentReviewer::getOaUserId).collect(Collectors.toList());
if (listCurrentReviewer.contains(costLogDomain.getUpdateUserid()) || listCurrentReviewer.contains(costLogDomain3.getUpdateUserid())) {
log.info("费用单:{}部门审核人和最终审核人是同一个人,最终审核人自动通过。", costDomain.getCostNo());
this.autoPass("(部门审核人和最终审核人是同一人)");
return;
}
}
//如果不需要审核 并且主体不是工会 直接通过
......
......@@ -20,6 +20,15 @@
limit 1;
</select>
<select id="selectDepartmentCheckLog3" resultType="com.blt.other.database.model.CostLogDomain">
select *
from cost_log
where cost_no = #{costNo}
and type in = 3
order by update_time desc
limit 1;
</select>
<select id="queryPageFor4k" resultType="com.blt.other.database.model.CostLogDomain">
select cl.* from cost_log cl
left join cost c on c.cost_no = cl.cost_no
......
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