Browse Source

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

叶仕杰 3 years ago
parent
commit
7c85247cb8
14 changed files with 760 additions and 0 deletions
  1. 37 0
      common/common-entity/sql记录
  2. 98 0
      common/common-entity/src/main/java/com/yihu/jw/entity/voluntary/VoluntaryRecruitmentArrangeDO.java
  3. 111 0
      common/common-entity/src/main/java/com/yihu/jw/entity/voluntary/VoluntaryRecruitmentCompanyDO.java
  4. 111 0
      common/common-entity/src/main/java/com/yihu/jw/entity/voluntary/VoluntaryRecruitmentPeopleDO.java
  5. 15 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/voluntary/VoluntaryRecruitmentArrangeDao.java
  6. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/voluntary/VoluntaryRecruitmentCompanyDao.java
  7. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/voluntary/VoluntaryRecruitmentPeopleDao.java
  8. 88 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/voluntary/VoluntaryRecruitmentCompanyEndpoint.java
  9. 74 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/voluntary/VoluntaryRecruitmentEndpoint.java
  10. 88 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/voluntary/VoluntaryRecruitmentPeopleEndpoint.java
  11. 18 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentArrangeService.java
  12. 18 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentCompanyService.java
  13. 18 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentPeopleService.java
  14. 52 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentService.java

+ 37 - 0
common/common-entity/sql记录

@ -1167,5 +1167,42 @@ ALTER table base.base_login_log add column client_type varchar(10) DEFAULT NULL
-- 2021-7-22 lb
alter table base_life_care_item_dict add column pad_icon_img varchar(255) DEFAULT NULL COMMENT 'pad图标'
-- 2021-08-02 ysj
CREATE TABLE `voluntary_recruitment_arrange` (
  `id` varchar(50) NOT NULL,
  `company_id` varchar(50) DEFAULT NULL,
  `day` varchar(10) DEFAULT NULL COMMENT '服务日期',
  `time` varchar(10) DEFAULT NULL COMMENT '服务时间段',
  `people_id` varchar(50) DEFAULT NULL COMMENT '服务人员id',
  `station` varchar(50) DEFAULT NULL COMMENT '服务站',
  `people_name` varchar(50) DEFAULT NULL COMMENT '服务人员姓名',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `voluntary_recruitment_company` (
  `id` varchar(50) NOT NULL,
  `name` varchar(100) DEFAULT NULL COMMENT '单位名称',
  `contacts` varchar(50) DEFAULT NULL COMMENT '联系人',
  `phone` varchar(50) DEFAULT NULL COMMENT '联系人手机',
  `times` varchar(30) DEFAULT NULL COMMENT '服务时间段',
  `service_station` varchar(5000) DEFAULT NULL COMMENT '服务站',
  `num` int(10) DEFAULT NULL COMMENT '报名人数',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='新冠志愿招募-企业';
CREATE TABLE `voluntary_recruitment_people` (
  `id` varchar(50) NOT NULL,
  `company_id` varchar(50) DEFAULT NULL,
  `company_name` varchar(100) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `idcard` varchar(50) DEFAULT NULL,
  `vaccination` tinyint(1) DEFAULT NULL COMMENT '是否接种疫苗 0未接种 1接种1针 2已接种',
  `experience` tinyint(1) DEFAULT NULL COMMENT '是否有核酸设备运维经验',
  `create_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='企业人员表';

+ 98 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/voluntary/VoluntaryRecruitmentArrangeDO.java

@ -0,0 +1,98 @@
package com.yihu.jw.entity.voluntary;
import com.yihu.jw.entity.UuidIdentityEntityWithCreateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created with IntelliJ IDEA.
 * 志愿招募人员安排表
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@Entity
@Table(name="voluntary_recruitment_arrange")
public class VoluntaryRecruitmentArrangeDO extends UuidIdentityEntityWithCreateTime{
    /**
     * 单位id
     */
    private String companyId;
    /**
     * '服务日期'
     */
    private String day;
    /**
     * '服务时间段'
     */
    private String time;
    /**
     * '服务人员id'
     */
    private String peopleId;
    /**
     * '服务人员姓名'
     */
    private String peopleName;
    /**
     * '服务站'
     */
    private String station;
    @Column(name = "company_id")
    public String getCompanyId() {
        return companyId;
    }
    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }
    @Column(name = "day")
    public String getDay() {
        return day;
    }
    public void setDay(String day) {
        this.day = day;
    }
    @Column(name = "time")
    public String getTime() {
        return time;
    }
    public void setTime(String time) {
        this.time = time;
    }
    @Column(name = "people_id")
    public String getPeopleId() {
        return peopleId;
    }
    public void setPeopleId(String peopleId) {
        this.peopleId = peopleId;
    }
    @Column(name = "people_name")
    public String getPeopleName() {
        return peopleName;
    }
    public void setPeopleName(String peopleName) {
        this.peopleName = peopleName;
    }
    @Column(name = "station")
    public String getStation() {
        return station;
    }
    public void setStation(String station) {
        this.station = station;
    }
}

+ 111 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/voluntary/VoluntaryRecruitmentCompanyDO.java

@ -0,0 +1,111 @@
package com.yihu.jw.entity.voluntary;
import com.yihu.jw.entity.UuidIdentityEntityWithCreateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 * 只有招募单位表
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@Entity
@Table(name="voluntary_recruitment_company")
public class VoluntaryRecruitmentCompanyDO extends UuidIdentityEntityWithCreateTime{
    /**
     * 单位名称
     */
    private String name;
    /**
     * 联系人
     */
    private String contacts;
    /**
     * 联系人手机
     */
    private String phone;
    /**
     * 服务时间段
     */
    private String times;
    /**
     * 服务站
     */
    private String serviceStation;
    /**
     * 报名人数
     */
    private Integer num;
    List<VoluntaryRecruitmentPeopleDO> peopleDOList;
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "contacts")
    public String getContacts() {
        return contacts;
    }
    public void setContacts(String contacts) {
        this.contacts = contacts;
    }
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    @Column(name = "times")
    public String getTimes() {
        return times;
    }
    public void setTimes(String times) {
        this.times = times;
    }
    @Column(name = "service_station")
    public String getServiceStation() {
        return serviceStation;
    }
    public void setServiceStation(String serviceStation) {
        this.serviceStation = serviceStation;
    }
    @Column(name = "num")
    public Integer getNum() {
        return num;
    }
    public void setNum(Integer num) {
        this.num = num;
    }
    @Transient
    public List<VoluntaryRecruitmentPeopleDO> getPeopleDOList() {
        return peopleDOList;
    }
    public void setPeopleDOList(List<VoluntaryRecruitmentPeopleDO> peopleDOList) {
        this.peopleDOList = peopleDOList;
    }
}

+ 111 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/voluntary/VoluntaryRecruitmentPeopleDO.java

@ -0,0 +1,111 @@
package com.yihu.jw.entity.voluntary;
import com.yihu.jw.entity.UuidIdentityEntityWithCreateTime;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created with IntelliJ IDEA.
 * 志愿招募企业表
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@Entity
@Table(name="voluntary_recruitment_people")
public class VoluntaryRecruitmentPeopleDO extends UuidIdentityEntityWithCreateTime{
    /**
     * 单位id
     */
    private String companyId;
    /**
     * 单位名称
     */
    private String companyName;
    /**
     * 姓名
     */
    private String name;
    /**
     * 手机
     */
    private String phone;
    /**
     * 身份证
     */
    private String idcard;
    /**
     * 是否接种疫苗 0未接种 1接种1针 2已接种
     */
    private String vaccination;
    /**
     * 是否有核酸设备运维经验
     */
    private String experience;
    @Column(name = "company_id")
    public String getCompanyId() {
        return companyId;
    }
    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }
    @Column(name = "company_name")
    public String getCompanyName() {
        return companyName;
    }
    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    @Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    @Column(name = "vaccination")
    public String getVaccination() {
        return vaccination;
    }
    public void setVaccination(String vaccination) {
        this.vaccination = vaccination;
    }
    @Column(name = "experience")
    public String getExperience() {
        return experience;
    }
    public void setExperience(String experience) {
        this.experience = experience;
    }
}

+ 15 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/voluntary/VoluntaryRecruitmentArrangeDao.java

@ -0,0 +1,15 @@
package com.yihu.jw.base.dao.voluntary;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentArrangeDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
public interface VoluntaryRecruitmentArrangeDao extends PagingAndSortingRepository<VoluntaryRecruitmentArrangeDO, String>, JpaSpecificationExecutor<VoluntaryRecruitmentArrangeDO> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/voluntary/VoluntaryRecruitmentCompanyDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.dao.voluntary;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentCompanyDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
public interface VoluntaryRecruitmentCompanyDao extends PagingAndSortingRepository<VoluntaryRecruitmentCompanyDO, String>, JpaSpecificationExecutor<VoluntaryRecruitmentCompanyDO> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/voluntary/VoluntaryRecruitmentPeopleDao.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.dao.voluntary;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentPeopleDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
public interface VoluntaryRecruitmentPeopleDao extends PagingAndSortingRepository<VoluntaryRecruitmentPeopleDO, String>, JpaSpecificationExecutor<VoluntaryRecruitmentPeopleDO> {
}

+ 88 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/voluntary/VoluntaryRecruitmentCompanyEndpoint.java

@ -0,0 +1,88 @@
package com.yihu.jw.base.endpoint.voluntary;
import com.yihu.jw.base.service.voluntary.VoluntaryRecruitmentCompanyService;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentCompanyDO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@RestController
@RequestMapping(value = "voluntaryRecruitmentCompany")
@Api(value = "新冠-志愿招募单位管理", description = "新冠-志愿招募单位管理", tags = {"新冠-志愿招募单位管理"})
public class VoluntaryRecruitmentCompanyEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private VoluntaryRecruitmentCompanyService companyService;
    @PostMapping(value = "delete")
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        companyService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = "update")
    @ApiOperation(value = "更新")
    public ObjEnvelop<VoluntaryRecruitmentCompanyDO> update (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        VoluntaryRecruitmentCompanyDO appVersion = toEntity(jsonData, VoluntaryRecruitmentCompanyDO.class);
        if (null == appVersion.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        appVersion = companyService.save(appVersion);
        return success(appVersion, VoluntaryRecruitmentCompanyDO.class);
    }
    @GetMapping(value = "page")
    @ApiOperation(value = "获取分页")
    public PageEnvelop<VoluntaryRecruitmentCompanyDO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<VoluntaryRecruitmentCompanyDO> appVersions = companyService.search(fields, filters, sorts, page, size);
        int count = (int)companyService.getCount(filters);
        return success(appVersions, count, page, size, VoluntaryRecruitmentCompanyDO.class);
    }
    @GetMapping(value = "list")
    @ApiOperation(value = "获取列表")
    public ListEnvelop<VoluntaryRecruitmentCompanyDO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<VoluntaryRecruitmentCompanyDO> appVersions = companyService.search(fields, filters, sorts);
        return success(appVersions, VoluntaryRecruitmentCompanyDO.class);
    }
}

+ 74 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/voluntary/VoluntaryRecruitmentEndpoint.java

@ -0,0 +1,74 @@
package com.yihu.jw.base.endpoint.voluntary;
import com.yihu.jw.base.service.voluntary.VoluntaryRecruitmentCompanyService;
import com.yihu.jw.base.service.voluntary.VoluntaryRecruitmentService;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentCompanyDO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@RestController
@RequestMapping(value = "open/voluntary")
@Api(value = "新冠-志愿招募管理", description = "新冠-志愿招募管理", tags = {"新冠-志愿招募管理"})
public class VoluntaryRecruitmentEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private VoluntaryRecruitmentService voluntaryRecruitmentService;
    @Autowired
    private VoluntaryRecruitmentCompanyService companyService;
    @PostMapping(value = "add")
    @ApiOperation(value = "企业报名")
    public Envelop add (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
         @RequestParam String jsonData){
        try {
            VoluntaryRecruitmentCompanyDO companyDO = toEntity(jsonData, VoluntaryRecruitmentCompanyDO.class);
            voluntaryRecruitmentService.add(companyDO);
            return success("报名成功");
        }catch (Exception e){
            e.printStackTrace();
            return failedException2(e);
        }
    }
    @GetMapping(value = "page")
    @ApiOperation(value = "获取分页")
    public PageEnvelop<VoluntaryRecruitmentCompanyDO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size){
            try {
                List<VoluntaryRecruitmentCompanyDO> appVersions = companyService.search(fields, filters, sorts, page, size);
                int count = (int)companyService.getCount(filters);
                return success(appVersions, count, page, size, VoluntaryRecruitmentCompanyDO.class);
            }catch (Exception e){
                e.printStackTrace();
                return  PageEnvelop.getError("查询失败");
            }
    }
}

+ 88 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/voluntary/VoluntaryRecruitmentPeopleEndpoint.java

@ -0,0 +1,88 @@
package com.yihu.jw.base.endpoint.voluntary;
import com.yihu.jw.base.service.voluntary.VoluntaryRecruitmentPeopleService;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentPeopleDO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@RestController
@RequestMapping(value = "voluntaryRecruitmentPeople")
@Api(value = "新冠-志愿招募单位人员管理", description = "新冠-志愿招募单位人员管理", tags = {"新冠-志愿招募单位人员管理"})
public class VoluntaryRecruitmentPeopleEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private VoluntaryRecruitmentPeopleService peopleService;
    @PostMapping(value = "delete")
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        peopleService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = "update")
    @ApiOperation(value = "更新")
    public ObjEnvelop<VoluntaryRecruitmentPeopleDO> update (
            @ApiParam(name = "jsonData", value = "Json数据", required = true)
            @RequestParam String jsonData) throws Exception {
        VoluntaryRecruitmentPeopleDO appVersion = toEntity(jsonData, VoluntaryRecruitmentPeopleDO.class);
        if (null == appVersion.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        appVersion = peopleService.save(appVersion);
        return success(appVersion, VoluntaryRecruitmentPeopleDO.class);
    }
    @GetMapping(value = "page")
    @ApiOperation(value = "获取分页")
    public PageEnvelop<VoluntaryRecruitmentPeopleDO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<VoluntaryRecruitmentPeopleDO> appVersions = peopleService.search(fields, filters, sorts, page, size);
        int count = (int)peopleService.getCount(filters);
        return success(appVersions, count, page, size, VoluntaryRecruitmentPeopleDO.class);
    }
    @GetMapping(value = "list")
    @ApiOperation(value = "获取列表")
    public ListEnvelop<VoluntaryRecruitmentPeopleDO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<VoluntaryRecruitmentPeopleDO> appVersions = peopleService.search(fields, filters, sorts);
        return success(appVersions, VoluntaryRecruitmentPeopleDO.class);
    }
}

+ 18 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentArrangeService.java

@ -0,0 +1,18 @@
package com.yihu.jw.base.service.voluntary;
import com.yihu.jw.base.dao.voluntary.VoluntaryRecruitmentArrangeDao;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentArrangeDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@Service
public class VoluntaryRecruitmentArrangeService extends BaseJpaService<VoluntaryRecruitmentArrangeDO, VoluntaryRecruitmentArrangeDao> {
    
}

+ 18 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentCompanyService.java

@ -0,0 +1,18 @@
package com.yihu.jw.base.service.voluntary;
import com.yihu.jw.base.dao.voluntary.VoluntaryRecruitmentCompanyDao;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentCompanyDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@Service
public class VoluntaryRecruitmentCompanyService extends BaseJpaService<VoluntaryRecruitmentCompanyDO, VoluntaryRecruitmentCompanyDao> {
}

+ 18 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentPeopleService.java

@ -0,0 +1,18 @@
package com.yihu.jw.base.service.voluntary;
import com.yihu.jw.base.dao.voluntary.VoluntaryRecruitmentPeopleDao;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentPeopleDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@Service
public class VoluntaryRecruitmentPeopleService extends BaseJpaService<VoluntaryRecruitmentPeopleDO, VoluntaryRecruitmentPeopleDao> {
    
}

+ 52 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/voluntary/VoluntaryRecruitmentService.java

@ -0,0 +1,52 @@
package com.yihu.jw.base.service.voluntary;
import com.yihu.jw.base.dao.voluntary.VoluntaryRecruitmentArrangeDao;
import com.yihu.jw.base.dao.voluntary.VoluntaryRecruitmentCompanyDao;
import com.yihu.jw.base.dao.voluntary.VoluntaryRecruitmentPeopleDao;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentCompanyDO;
import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentPeopleDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/8/1
 * @Description:
 */
@Service
public class VoluntaryRecruitmentService {
    @Autowired
    private VoluntaryRecruitmentCompanyDao companyDao;
    @Autowired
    private VoluntaryRecruitmentArrangeDao arrangeDao;
    @Autowired
    private VoluntaryRecruitmentPeopleDao peopleDao;
    /**
     * 企业报名
     */
    public void add(VoluntaryRecruitmentCompanyDO companyDO){
        List<VoluntaryRecruitmentPeopleDO> peopleDOList = companyDO.getPeopleDOList();
        if(peopleDOList!=null){
            companyDO.setNum(peopleDOList.size());
            companyDao.save(companyDO);
            for (VoluntaryRecruitmentPeopleDO peopleDO:peopleDOList){
                peopleDO.setCompanyId(companyDO.getId());
                peopleDO.setCompanyName(companyDO.getName());
            }
            peopleDao.save(peopleDOList);
            return;
        }
        companyDO.setNum(0);
        companyDao.save(companyDO);
    }
}