소스 검색

Merge branch 'dev' of liubing/wlyy2.0 into dev

liubing 3 년 전
부모
커밋
9436d1b3ab
1개의 변경된 파일9개의 추가작업 그리고 7개의 파일을 삭제
  1. 9 7
      svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentService.java

+ 9 - 7
svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentService.java

@ -92,6 +92,14 @@ public class VoluntaryRecruitmentService {
    }
    }
    public void addPeople(List<VoluntaryRecruitmentPeopleDO> peopleDOList,List<VoluntaryRecruitmentPeopleDO> peopleDOs,VoluntaryRecruitmentCompanyDO companyDO){
    public void addPeople(List<VoluntaryRecruitmentPeopleDO> peopleDOList,List<VoluntaryRecruitmentPeopleDO> peopleDOs,VoluntaryRecruitmentCompanyDO companyDO){
        if(!StringUtil.isBlank(companyDO.getId())){
            VoluntaryRecruitmentCompanyDO old = companyDao.findOne(companyDO.getId());
            companyDO = old;
        }else {
            companyDO.setNum(0);
            companyDao.save(companyDO);
        }
        for (VoluntaryRecruitmentPeopleDO peopleDO:peopleDOList){
        for (VoluntaryRecruitmentPeopleDO peopleDO:peopleDOList){
            if(peopleDao.existsByPhone(peopleDO.getPhone())){
            if(peopleDao.existsByPhone(peopleDO.getPhone())){
                continue;
                continue;
@ -103,13 +111,7 @@ public class VoluntaryRecruitmentService {
        if(peopleDOs.size()>0){
        if(peopleDOs.size()>0){
            peopleDao.save(peopleDOs);
            peopleDao.save(peopleDOs);
        }
        }
        if(!StringUtil.isBlank(companyDO.getId())){
            VoluntaryRecruitmentCompanyDO old = companyDao.findOne(companyDO.getId());
            old.setNum(old.getNum()+peopleDOs.size());
            companyDao.save(old);
        }
        companyDO.setNum(peopleDOs.size());
        companyDO.setNum(companyDO.getNum()+peopleDOs.size());
        companyDao.save(companyDO);
        companyDao.save(companyDO);
    }
    }