打包管理添加证书

This commit is contained in:
liangqitao
2021-12-16 15:25:06 +08:00
parent b055733ca4
commit 7758b07c0f
10 changed files with 198 additions and 97 deletions
@@ -8,8 +8,10 @@ import com.jero.meeting.common.MeetingSubitemCommon;
import com.jero.meeting.entity.PayMeetingSituation;
import com.jero.meeting.service.IPayMeetingSituationService;
import com.jero.member.entity.PayMemberProjectSubitem;
import com.jero.member.entity.TbCertificatePayment;
import com.jero.member.entity.TbMemberProjectSubitem;
import com.jero.member.service.IPayMemberProjectSubitemService;
import com.jero.member.service.ITbCertificatePaymentService;
import com.jero.member.service.ITbMemberProjectSubitemService;
import com.jero.pack.common.PackCommon;
import com.jero.pack.entity.PayPackCompany;
@@ -19,19 +21,17 @@ import com.jero.project.entity.PayWorkingGroupSubItem;
import com.jero.project.service.IPayCommonProjectService;
import com.jero.project.service.IPayWorkingGroupSubItemService;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
@Service
public class ProjectPackServiceImpl implements ProjectPackService {
@Autowired
@Resource
private IPayCommonProjectService payCommonProjectService;
@Autowired
@Resource
private IPayWorkingGroupSubItemService payWorkingGroupSubItemService;
@Resource
private IPayMeetingSituationService payMeetingSituationService;
@@ -39,8 +39,10 @@ public class ProjectPackServiceImpl implements ProjectPackService {
private IPayMemberProjectSubitemService payMemberProjectSubitemService;
@Resource
private ITbMemberProjectSubitemService tbMemberProjectSubitemService;
@Autowired
@Resource
private IPayPackCompanyService payPackCompanyService;
@Resource
private ITbCertificatePaymentService tbCertificatePaymentService;
@Override
@@ -145,6 +147,24 @@ public class ProjectPackServiceImpl implements ProjectPackService {
tbMemberProjectSubitem.set(TbMemberProjectSubitem::getUpdateTime,new Date());
tbMemberProjectSubitemService.update(tbMemberProjectSubitem);
break;
// 证书
case PackCommon.PROJECT_TYPE6:
// 验证项目是否存在
TbCertificatePayment tbCertificatePaymentOld = tbCertificatePaymentService.getById(projectId);
if(Objects.isNull(tbCertificatePaymentOld)){
throw new JeroBootException("项目不存在!");
}
// 验证企业是否正确
if(!Objects.equals(tbCertificatePaymentOld.getCompanyId(),payPackCompany.getCompanyId())){
throw new JeroBootException("企业不匹配!");
}
LambdaUpdateWrapper<TbCertificatePayment> tbCertificatePayment = new LambdaUpdateWrapper<>();
tbCertificatePayment.eq(TbCertificatePayment::getId,projectId);
tbCertificatePayment.set(TbCertificatePayment::getPack,packStatus);
tbCertificatePayment.set(TbCertificatePayment::getUpdateBy,sysUser.getUsername());
tbCertificatePayment.set(TbCertificatePayment::getUpdateTime,new Date());
tbCertificatePaymentService.update(tbCertificatePayment);
break;
default:break;
}
}