Commit d41b4c34 authored by 耿迪迪's avatar 耿迪迪

变更审批审批人删除

parent dbd782c8
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.zehong.system.domain.TChangeApplyApprover;
import com.zehong.system.mapper.TChangeApplyApproverMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TChangeApplyApprovalMapper;
......@@ -19,6 +23,9 @@ public class TChangeApplyApprovalServiceImpl implements ITChangeApplyApprovalSer
@Autowired
private TChangeApplyApprovalMapper tChangeApplyApprovalMapper;
@Autowired
private TChangeApplyApproverMapper tChangeApplyApproverMapper;
/**
* 查询变更申请审批验收
*
......@@ -87,6 +94,18 @@ public class TChangeApplyApprovalServiceImpl implements ITChangeApplyApprovalSer
@Override
public int deleteTChangeApplyApprovalByIds(Long[] changeApplyIds)
{
for(Long changeApplyId : changeApplyIds){
TChangeApplyApprover applyApprover = new TChangeApplyApprover();
applyApprover.setChangeApplyId(changeApplyId);
List<TChangeApplyApprover> applyApproverList = tChangeApplyApproverMapper.selectTChangeApplyApproverList(applyApprover);
if(null!=applyApproverList && applyApproverList.size() > 0){
List<Long> changeApplyApproverIds = new ArrayList<>();
for(TChangeApplyApprover applyApprover1 : applyApproverList){
changeApplyApproverIds.add(applyApprover1.getChangeApplyApproverId());
}
tChangeApplyApproverMapper.deleteTChangeApplyApproverByIds(changeApplyApproverIds.toArray(new Long[changeApplyApproverIds.size()]));
}
}
return tChangeApplyApprovalMapper.deleteTChangeApplyApprovalByIds(changeApplyIds);
}
......
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