董监任免申报

This commit is contained in:
zhuyy 2023-02-03 11:44:18 +08:00
parent fad900595f
commit ae14c70861
10 changed files with 307 additions and 0 deletions

View File

@ -29,6 +29,7 @@ public interface UrlConstant {
String MECHANISM = API + "/mechanism"; String MECHANISM = API + "/mechanism";
String ORGANIZATION = API + "/organization"; String ORGANIZATION = API + "/organization";
String PARTY_ORGANIZATION = API + "/party_organization"; String PARTY_ORGANIZATION = API + "/party_organization";
String DIRECTORS_SUPERVISORS = API + "/directors_supervisors";

View File

@ -0,0 +1,51 @@
package com.ydool.staff.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.common.base.BaseController;
import com.ydool.common.constant.UrlConstant;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.dto.DirectorsSupervisorsDto;
import com.ydool.staff.entity.DirectorsSupervisors;
import com.ydool.staff.service.IDirectorsSupervisorsService;
import com.ydool.system.request.IdsRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping(UrlConstant.DIRECTORS_SUPERVISORS)
@Api(tags = "董监任免申报", value = "董监任免申报")
public class DirectorsSupervisorsController extends BaseController {
@Autowired
IDirectorsSupervisorsService directorsSupervisorsService;
@GetMapping("/selectDirectorsSupervisorsList")
@ApiOperation(value = "董监任免申报列表")
@ApiImplicitParams({@ApiImplicitParam(name = "current", value = "当前页", dataType = "Integer"), @ApiImplicitParam(name = "size", value = "每页条数", dataType = "Integer"),})
public AjaxResult selectDirectorsSupervisorsList(DirectorsSupervisorsDto directorsSupervisorsDto) {
return directorsSupervisorsService.selectDirectorsSupervisorsList(new Page<>(getPageNum(), getPageSize()), directorsSupervisorsDto);
}
@PostMapping("/saveDirectorsSupervisors")
@ApiOperation(value = "新增董监任免申报")
public AjaxResult saveDirectorsSupervisors(@RequestBody @Validated DirectorsSupervisors directorsSupervisors) {
return directorsSupervisorsService.saveDirectorsSupervisors(directorsSupervisors);
}
@PutMapping("/editDirectorsSupervisors")
@ApiOperation(value = "修改董监任免申报")
public AjaxResult editDirectorsSupervisors(@RequestBody @Validated DirectorsSupervisors directorsSupervisors) {
return directorsSupervisorsService.editDirectorsSupervisors(directorsSupervisors);
}
@PostMapping("/deleteDirectorsSupervisors")
@ApiOperation(value = "删除董监任免申报")
public AjaxResult deleteDirectorsSupervisors(@RequestBody IdsRequest ids) {
return directorsSupervisorsService.deleteDirectorsSupervisors(ids);
}
}

View File

@ -21,6 +21,13 @@ public class OrganizationController extends BaseController {
@Autowired @Autowired
IOrganizationService organizationService; IOrganizationService organizationService;
@GetMapping("/selectOrganizationByName")
@ApiOperation(value = "企业名称查企业信息")
@ApiImplicitParams({@ApiImplicitParam(name = "companyName", value = "企业名称", required = true)})
public AjaxResult selectOrganizationByName(String companyName) {
return organizationService.selectOrganizationByName(companyName);
}
@GetMapping("/selectOrganizationList") @GetMapping("/selectOrganizationList")
@ApiOperation(value = "内设机构登记列表") @ApiOperation(value = "内设机构登记列表")
@ApiImplicitParams({@ApiImplicitParam(name = "companyName", value = "企业名称"), @ApiImplicitParam(name = "current", value = "当前页", dataType = "Integer"), @ApiImplicitParam(name = "size", value = "每页条数", dataType = "Integer"),}) @ApiImplicitParams({@ApiImplicitParam(name = "companyName", value = "企业名称"), @ApiImplicitParam(name = "current", value = "当前页", dataType = "Integer"), @ApiImplicitParam(name = "size", value = "每页条数", dataType = "Integer"),})

View File

@ -0,0 +1,26 @@
package com.ydool.staff.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class DirectorsSupervisorsDto {
@ApiModelProperty(value = "姓名")
private String username;
@ApiModelProperty(value = "董监类型")
private String directorsType;
@ApiModelProperty(value = "人员类型")
private String personnelType;
@ApiModelProperty(value = "政治面貌")
private String politicsStatus;
@ApiModelProperty(value = "人员状态")
private String personnelStatus;
@ApiModelProperty(value = "单据状态")
private String documentStatus;
}

View File

@ -0,0 +1,99 @@
package com.ydool.staff.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ydool.common.base.BaseEntity;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* <p>
*
* </p>
*
* @author msf
* @since 2023-02-03
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_lc_directors_supervisors")
@ApiModel(value = "DirectorsSupervisors对象", description = "")
public class DirectorsSupervisors extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "姓名")
@NotBlank(message = "姓名不能为空")
private String username;
@ApiModelProperty(value = "性别")
@NotNull(message = "性别不能为空")
private Integer sex;
@ApiModelProperty(value = "出生年月")
@NotNull(message = "出生年月不能为空")
private Date dataBirth;
@ApiModelProperty(value = "身份证")
@NotBlank(message = "身份证不能为空")
private String identityCard;
@ApiModelProperty(value = "董监类型")
@NotBlank(message = "董监类型不能为空")
private String directorsType;
@ApiModelProperty(value = "人员类型")
@NotBlank(message = "人员类型不能为空")
private String personnelType;
@ApiModelProperty(value = "政治面貌")
@NotBlank(message = "政治面貌不能为空")
private String politicsStatus;
@ApiModelProperty(value = "工作单位")
@NotBlank(message = "工作单位不能为空")
private String workUnit;
@ApiModelProperty(value = "职务")
@NotBlank(message = "职务不能为空")
private String job;
@ApiModelProperty(value = "任命文件")
@NotBlank(message = "任命文件不能为空")
private String appointment;
@ApiModelProperty(value = "任职开始时间")
@NotNull(message = "任职开始时间不能为空")
private Date serviceStartTime;
@ApiModelProperty(value = "任职结束时间")
private Date serviceEndTime;
@ApiModelProperty(value = "人员状态")
private String personnelStatus;
@ApiModelProperty(value = "离职时间")
private Date dimissionTime;
@ApiModelProperty(value = "离职原因")
private String dimissionCause;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "相关附件")
@NotBlank(message = "相关附件不能为空")
private String correlationFile;
@ApiModelProperty(value = "单据状态")
private String documentStatus;
}

View File

@ -0,0 +1,18 @@
package com.ydool.staff.mapper;
import com.ydool.staff.entity.DirectorsSupervisors;
import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author msf
* @since 2023-02-03
*/
@Mapper
public interface DirectorsSupervisorsMapper extends MPJBaseMapper<DirectorsSupervisors> {
}

View File

@ -0,0 +1,27 @@
package com.ydool.staff.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.dto.DirectorsSupervisorsDto;
import com.ydool.staff.entity.DirectorsSupervisors;
import com.ydool.system.request.IdsRequest;
/**
* <p>
* 服务类
* </p>
*
* @author msf
* @since 2023-02-03
*/
public interface IDirectorsSupervisorsService {
AjaxResult selectDirectorsSupervisorsList(Page<DirectorsSupervisors> page, DirectorsSupervisorsDto directorsSupervisorsDto);
AjaxResult saveDirectorsSupervisors(DirectorsSupervisors directorsSupervisors);
AjaxResult editDirectorsSupervisors(DirectorsSupervisors directorsSupervisors);
AjaxResult deleteDirectorsSupervisors(IdsRequest ids);
}

View File

@ -20,5 +20,7 @@ public interface IOrganizationService {
AjaxResult selectOrganizationByMechanism(String id); AjaxResult selectOrganizationByMechanism(String id);
AjaxResult deleteOrganization(IdsRequest id); AjaxResult deleteOrganization(IdsRequest id);
AjaxResult selectOrganizationByName(String companyName);
} }

View File

@ -0,0 +1,71 @@
package com.ydool.staff.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ydool.common.data.dto.AjaxResult;
import com.ydool.staff.dto.DirectorsSupervisorsDto;
import com.ydool.staff.entity.DirectorsSupervisors;
import com.ydool.common.base.BaseService;
import com.ydool.staff.mapper.DirectorsSupervisorsMapper;
import com.ydool.staff.service.IDirectorsSupervisorsService;
import com.ydool.system.request.IdsRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
/**
* <p>
* 服务类
* </p>
*
* @author msf
* @since 2023-02-03
*/
@Service
public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSupervisorsMapper, DirectorsSupervisors> implements IDirectorsSupervisorsService {
@Autowired
DirectorsSupervisorsMapper directorsSupervisorsMapper;
@Override
public AjaxResult selectDirectorsSupervisorsList(Page<DirectorsSupervisors> page, DirectorsSupervisorsDto directorsSupervisorsDto) {
LambdaQueryWrapper<DirectorsSupervisors> directorsSupervisorsLambdaQueryWrapper = new LambdaQueryWrapper<>();
directorsSupervisorsLambdaQueryWrapper.eq(StrUtil.isNotBlank(directorsSupervisorsDto.getUsername()), DirectorsSupervisors::getUsername, directorsSupervisorsDto.getUsername());
directorsSupervisorsLambdaQueryWrapper.eq(StrUtil.isNotBlank(directorsSupervisorsDto.getDirectorsType()), DirectorsSupervisors::getDirectorsType, directorsSupervisorsDto.getDirectorsType());
directorsSupervisorsLambdaQueryWrapper.eq(StrUtil.isNotBlank(directorsSupervisorsDto.getPersonnelType()), DirectorsSupervisors::getPersonnelType, directorsSupervisorsDto.getPersonnelType());
directorsSupervisorsLambdaQueryWrapper.eq(StrUtil.isNotBlank(directorsSupervisorsDto.getPoliticsStatus()), DirectorsSupervisors::getPoliticsStatus, directorsSupervisorsDto.getPoliticsStatus());
directorsSupervisorsLambdaQueryWrapper.eq(StrUtil.isNotBlank(directorsSupervisorsDto.getPersonnelStatus()), DirectorsSupervisors::getPersonnelStatus, directorsSupervisorsDto.getPersonnelStatus());
Page<DirectorsSupervisors> directorsSupervisors = directorsSupervisorsMapper.selectPage(page, directorsSupervisorsLambdaQueryWrapper);
return AjaxResult.ok().data(directorsSupervisors);
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult saveDirectorsSupervisors(DirectorsSupervisors directorsSupervisors) {
int i = directorsSupervisorsMapper.insert(directorsSupervisors);
return i > 0 ? AjaxResult.ok().msg("新增成功!") : AjaxResult.fail().msg("新增失败!");
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult editDirectorsSupervisors(DirectorsSupervisors directorsSupervisors) {
int i = directorsSupervisorsMapper.updateById(directorsSupervisors);
return i > 0 ? AjaxResult.ok().msg("修改成功!") : AjaxResult.fail().msg("修改失败!");
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult deleteDirectorsSupervisors(IdsRequest ids) {
if (CollectionUtil.isEmpty(Arrays.asList(ids.getIds()))) {
return AjaxResult.fail().msg("Id不能为空");
} else {
int i = directorsSupervisorsMapper.deleteBatchIds(Arrays.asList(ids.getIds()));
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
}
}
}

View File

@ -75,5 +75,10 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!"); return i > 0 ? AjaxResult.ok().msg("删除成功!") : AjaxResult.fail().msg("删除失败!");
} }
} }
@Override
public AjaxResult selectOrganizationByName(String companyName) {
return AjaxResult.ok().data(organizationMapper.selectOne(new LambdaQueryWrapper<Organization>().eq(Organization::getCompanyName, companyName)));
}
} }