k94314517
2024-10-31 bc47afc824f8d7097855f16328f644930570fe58
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/ApproveServiceImpl.java
@@ -17,6 +17,7 @@
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.*;
import com.doumee.dao.business.dao.CompanyMapper;
import com.doumee.dao.business.dao.SmsEmailMapper;
import com.doumee.dao.business.dto.ApproveDTO;
import com.doumee.dao.business.join.ApproveJoinMapper;
import com.doumee.dao.business.join.CarUseBookJoinMapper;
@@ -40,7 +41,6 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -285,14 +285,16 @@
            if(CollectionUtils.isNotEmpty(noticesList)){
                //待我处理的数据
                internalHomeVO.setNoticeWaitNum(
                        noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),memberId)
                        noticesList.stream().filter(i->
                                Constants.equalsInteger(i.getUserId(),memberId)
                                &&Constants.equalsInteger(i.getStatus(),Constants.ZERO)
                                &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO)
                        ).count()
                );
                //已处理数据
                internalHomeVO.setNoticeDealNum(
                        noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),memberId)
                        noticesList.stream().filter(i->
                                Constants.equalsInteger(i.getUserId(),memberId)
                                &&StringUtils.equals(i.getParam4(),i.getUserId().toString())
                                &&Constants.equalsInteger(i.getStatus(),Constants.ONE)
                                &&Constants.equalsInteger(i.getSendacopy(),Constants.ZERO)
@@ -303,9 +305,10 @@
                        noticesJoinMapper.selectCount(new QueryWrapper<Notices>().lambda().eq(Notices::getParam3,memberId))
                );
                //抄送我的数据
                internalHomeVO.setNoticeCopyNum(
                 internalHomeVO.setNoticeCopyNum(
                        noticesList.stream().filter(i->Constants.equalsInteger(i.getUserId(),memberId)
                                &&Constants.equalsInteger(i.getSendacopy(),Constants.ONE)
                                &&Constants.equalsInteger(i.getReaded(),Constants.ZERO)
                        ).count()
                );
            }
@@ -563,7 +566,7 @@
                approve.setTemplatId(approveTempl.getId());
                approve.setChekorId(memberId);
                approve.setStatus(i==0?Constants.ONE:Constants.ZERO);
                approve.setStatusInfo(i==0?"审批中":"处理中");
                approve.setStatusInfo(i==0?"审批中":"待处理");
                approve.setTitle(StringUtils.isBlank(approveParam.getRemark())?"审批中":approveParam.getRemark());
                approve.setIsEndCheck((i+1) == approveParamList.size()?Constants.ONE:Constants.ZERO);
                approve.setObjId(businessId);
@@ -788,6 +791,9 @@
     * @param objLevel  查询级别
     */
    public Company getAuditCompanyHead(Integer companyId, Integer objLevel){
        if(Objects.isNull(objLevel)||Objects.isNull(companyId)){
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"审批流配置异常,请联系管理员");
        }
        Company auditCompany =  companyMapper.selectById(companyId);
        Integer queryLevel = Constants.ONE;
        while(queryLevel<objLevel){
@@ -921,7 +927,6 @@
                }else{
                    waitModel.setStatus(level.getStatus());
                    waitModel.setType(Constants.ZERO);
                    //waitModel.setStatusInfo(passList.size()<=0?StringUtils.defaultString(level.getTitle(),"审批人"):"抄送或签审批人");
                    waitModel.setTitle(passList.size()<=0?StringUtils.defaultString(level.getTitle(),"审批人"):"抄送或签审批人");
                }