提交 2d54028b 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码 [Spring Boot]

上级 c5413ad8
package cn.ibizlab.businesscentral.core.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.businesscentral.util.domain.DTOBase;
import cn.ibizlab.businesscentral.util.domain.DTOClient;
import lombok.Data;
/**
* 服务DTO对象[Hr_resume_lineDTO]
*/
@Data
public class Hr_resume_lineDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [ID]
*
*/
@JSONField(name = "id")
@JsonProperty("id")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 属性 [NAME]
*
*/
@JSONField(name = "name")
@JsonProperty("name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String name;
/**
* 属性 [EMPLOYEE_ID]
*
*/
@JSONField(name = "employee_id")
@JsonProperty("employee_id")
@JsonSerialize(using = ToStringSerializer.class)
private Long employeeId;
/**
* 属性 [LINE_TYPE_ID]
*
*/
@JSONField(name = "line_type_id")
@JsonProperty("line_type_id")
@JsonSerialize(using = ToStringSerializer.class)
private Long lineTypeId;
/**
* 属性 [EMPLOYEE_ID_TEXT]
*
*/
@JSONField(name = "employee_id_text")
@JsonProperty("employee_id_text")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String employeeIdText;
/**
* 属性 [LINE_TYPE_ID_TEXT]
*
*/
@JSONField(name = "line_type_id_text")
@JsonProperty("line_type_id_text")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String lineTypeIdText;
/**
* 属性 [DATE_START]
*
*/
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "date_start" , format="yyyy-MM-dd")
@JsonProperty("date_start")
private Timestamp dateStart;
/**
* 属性 [DATE_END]
*
*/
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "date_end" , format="yyyy-MM-dd")
@JsonProperty("date_end")
private Timestamp dateEnd;
/**
* 属性 [DISPLAY_TYPE]
*
*/
@JSONField(name = "display_type")
@JsonProperty("display_type")
@Size(min = 0, max = 60, message = "内容长度必须小于等于[60]")
private String displayType;
/**
* 属性 [CREATE_DATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "create_date" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("create_date")
private Timestamp createDate;
/**
* 属性 [WRITE_DATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "write_date" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("write_date")
private Timestamp writeDate;
/**
* 属性 [CREATE_UID]
*
*/
@JSONField(name = "create_uid")
@JsonProperty("create_uid")
@JsonSerialize(using = ToStringSerializer.class)
private Long createUid;
/**
* 属性 [WRITE_UID]
*
*/
@JSONField(name = "write_uid")
@JsonProperty("write_uid")
@JsonSerialize(using = ToStringSerializer.class)
private Long writeUid;
/**
* 设置 [NAME]
*/
public void setName(String name){
this.name = name ;
this.modify("name",name);
}
/**
* 设置 [EMPLOYEE_ID]
*/
public void setEmployeeId(Long employeeId){
this.employeeId = employeeId ;
this.modify("employee_id",employeeId);
}
/**
* 设置 [LINE_TYPE_ID]
*/
public void setLineTypeId(Long lineTypeId){
this.lineTypeId = lineTypeId ;
this.modify("line_type_id",lineTypeId);
}
/**
* 设置 [DATE_START]
*/
public void setDateStart(Timestamp dateStart){
this.dateStart = dateStart ;
this.modify("date_start",dateStart);
}
/**
* 设置 [DATE_END]
*/
public void setDateEnd(Timestamp dateEnd){
this.dateEnd = dateEnd ;
this.modify("date_end",dateEnd);
}
/**
* 设置 [DISPLAY_TYPE]
*/
public void setDisplayType(String displayType){
this.displayType = displayType ;
this.modify("display_type",displayType);
}
/**
* 设置 [CREATE_DATE]
*/
public void setCreateDate(Timestamp createDate){
this.createDate = createDate ;
this.modify("create_date",createDate);
}
/**
* 设置 [WRITE_DATE]
*/
public void setWriteDate(Timestamp writeDate){
this.writeDate = writeDate ;
this.modify("write_date",writeDate);
}
/**
* 设置 [CREATE_UID]
*/
public void setCreateUid(Long createUid){
this.createUid = createUid ;
this.modify("create_uid",createUid);
}
/**
* 设置 [WRITE_UID]
*/
public void setWriteUid(Long writeUid){
this.writeUid = writeUid ;
this.modify("write_uid",writeUid);
}
}
package cn.ibizlab.businesscentral.core.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.ibizlab.businesscentral.util.domain.DTOBase;
import cn.ibizlab.businesscentral.util.domain.DTOClient;
import lombok.Data;
/**
* 服务DTO对象[Hr_resume_line_typeDTO]
*/
@Data
public class Hr_resume_line_typeDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [ID]
*
*/
@JSONField(name = "id")
@JsonProperty("id")
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 属性 [NAME]
*
*/
@JSONField(name = "name")
@JsonProperty("name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
private String name;
/**
* 属性 [SEQUENCE]
*
*/
@JSONField(name = "sequence")
@JsonProperty("sequence")
private Integer sequence;
/**
* 属性 [CREATE_DATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "create_date" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("create_date")
private Timestamp createDate;
/**
* 属性 [WRITE_DATE]
*
*/
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "write_date" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("write_date")
private Timestamp writeDate;
/**
* 属性 [WRITE_UID]
*
*/
@JSONField(name = "write_uid")
@JsonProperty("write_uid")
@JsonSerialize(using = ToStringSerializer.class)
private Long writeUid;
/**
* 属性 [CREATE_UID]
*
*/
@JSONField(name = "create_uid")
@JsonProperty("create_uid")
@JsonSerialize(using = ToStringSerializer.class)
private Long createUid;
/**
* 设置 [NAME]
*/
public void setName(String name){
this.name = name ;
this.modify("name",name);
}
/**
* 设置 [SEQUENCE]
*/
public void setSequence(Integer sequence){
this.sequence = sequence ;
this.modify("sequence",sequence);
}
/**
* 设置 [CREATE_DATE]
*/
public void setCreateDate(Timestamp createDate){
this.createDate = createDate ;
this.modify("create_date",createDate);
}
/**
* 设置 [WRITE_DATE]
*/
public void setWriteDate(Timestamp writeDate){
this.writeDate = writeDate ;
this.modify("write_date",writeDate);
}
/**
* 设置 [WRITE_UID]
*/
public void setWriteUid(Long writeUid){
this.writeUid = writeUid ;
this.modify("write_uid",writeUid);
}
/**
* 设置 [CREATE_UID]
*/
public void setCreateUid(Long createUid){
this.createUid = createUid ;
this.modify("create_uid",createUid);
}
}
package cn.ibizlab.businesscentral.core.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line;
import cn.ibizlab.businesscentral.core.dto.Hr_resume_lineDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="CoreHr_resume_lineMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface Hr_resume_lineMapping extends MappingBase<Hr_resume_lineDTO, Hr_resume_line> {
}
package cn.ibizlab.businesscentral.core.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line_type;
import cn.ibizlab.businesscentral.core.dto.Hr_resume_line_typeDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},implementationName="CoreHr_resume_line_typeMapping",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface Hr_resume_line_typeMapping extends MappingBase<Hr_resume_line_typeDTO, Hr_resume_line_type> {
}
package cn.ibizlab.businesscentral.core.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.businesscentral.core.dto.*;
import cn.ibizlab.businesscentral.core.mapping.*;
import cn.ibizlab.businesscentral.core.odoo_hr.domain.Hr_resume_line;
import cn.ibizlab.businesscentral.core.odoo_hr.service.IHr_resume_lineService;
import cn.ibizlab.businesscentral.core.odoo_hr.filter.Hr_resume_lineSearchContext;
import cn.ibizlab.businesscentral.util.annotation.VersionCheck;
@Slf4j
@Api(tags = {"员工简历行" })
@RestController("Core-hr_resume_line")
@RequestMapping("")
public class Hr_resume_lineResource {
@Autowired
public IHr_resume_lineService hr_resume_lineService;
@Autowired
@Lazy
public Hr_resume_lineMapping hr_resume_lineMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Create-all')")
@ApiOperation(value = "新建员工简历行", tags = {"员工简历行" }, notes = "新建员工简历行")
@RequestMapping(method = RequestMethod.POST, value = "/hr_resume_lines")
public ResponseEntity<Hr_resume_lineDTO> create(@Validated @RequestBody Hr_resume_lineDTO hr_resume_linedto) {
Hr_resume_line domain = hr_resume_lineMapping.toDomain(hr_resume_linedto);
hr_resume_lineService.create(domain);
Hr_resume_lineDTO dto = hr_resume_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Create-all')")
@ApiOperation(value = "批量新建员工简历行", tags = {"员工简历行" }, notes = "批量新建员工简历行")
@RequestMapping(method = RequestMethod.POST, value = "/hr_resume_lines/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<Hr_resume_lineDTO> hr_resume_linedtos) {
hr_resume_lineService.createBatch(hr_resume_lineMapping.toDomain(hr_resume_linedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Update-all')")
@ApiOperation(value = "更新员工简历行", tags = {"员工简历行" }, notes = "更新员工简历行")
@RequestMapping(method = RequestMethod.PUT, value = "/hr_resume_lines/{hr_resume_line_id}")
public ResponseEntity<Hr_resume_lineDTO> update(@PathVariable("hr_resume_line_id") Long hr_resume_line_id, @RequestBody Hr_resume_lineDTO hr_resume_linedto) {
Hr_resume_line domain = hr_resume_lineMapping.toDomain(hr_resume_linedto);
domain .setId(hr_resume_line_id);
hr_resume_lineService.update(domain );
Hr_resume_lineDTO dto = hr_resume_lineMapping.toDto(domain );
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Update-all')")
@ApiOperation(value = "批量更新员工简历行", tags = {"员工简历行" }, notes = "批量更新员工简历行")
@RequestMapping(method = RequestMethod.PUT, value = "/hr_resume_lines/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<Hr_resume_lineDTO> hr_resume_linedtos) {
hr_resume_lineService.updateBatch(hr_resume_lineMapping.toDomain(hr_resume_linedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Remove-all')")
@ApiOperation(value = "删除员工简历行", tags = {"员工简历行" }, notes = "删除员工简历行")
@RequestMapping(method = RequestMethod.DELETE, value = "/hr_resume_lines/{hr_resume_line_id}")
public ResponseEntity<Boolean> remove(@PathVariable("hr_resume_line_id") Long hr_resume_line_id) {
return ResponseEntity.status(HttpStatus.OK).body(hr_resume_lineService.remove(hr_resume_line_id));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Remove-all')")
@ApiOperation(value = "批量删除员工简历行", tags = {"员工简历行" }, notes = "批量删除员工简历行")
@RequestMapping(method = RequestMethod.DELETE, value = "/hr_resume_lines/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<Long> ids) {
hr_resume_lineService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Get-all')")
@ApiOperation(value = "获取员工简历行", tags = {"员工简历行" }, notes = "获取员工简历行")
@RequestMapping(method = RequestMethod.GET, value = "/hr_resume_lines/{hr_resume_line_id}")
public ResponseEntity<Hr_resume_lineDTO> get(@PathVariable("hr_resume_line_id") Long hr_resume_line_id) {
Hr_resume_line domain = hr_resume_lineService.get(hr_resume_line_id);
Hr_resume_lineDTO dto = hr_resume_lineMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@ApiOperation(value = "获取员工简历行草稿", tags = {"员工简历行" }, notes = "获取员工简历行草稿")
@RequestMapping(method = RequestMethod.GET, value = "/hr_resume_lines/getdraft")
public ResponseEntity<Hr_resume_lineDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(hr_resume_lineMapping.toDto(hr_resume_lineService.getDraft(new Hr_resume_line())));
}
@ApiOperation(value = "检查员工简历行", tags = {"员工简历行" }, notes = "检查员工简历行")
@RequestMapping(method = RequestMethod.POST, value = "/hr_resume_lines/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody Hr_resume_lineDTO hr_resume_linedto) {
return ResponseEntity.status(HttpStatus.OK).body(hr_resume_lineService.checkKey(hr_resume_lineMapping.toDomain(hr_resume_linedto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Save-all')")
@ApiOperation(value = "保存员工简历行", tags = {"员工简历行" }, notes = "保存员工简历行")
@RequestMapping(method = RequestMethod.POST, value = "/hr_resume_lines/save")
public ResponseEntity<Boolean> save(@RequestBody Hr_resume_lineDTO hr_resume_linedto) {
return ResponseEntity.status(HttpStatus.OK).body(hr_resume_lineService.save(hr_resume_lineMapping.toDomain(hr_resume_linedto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-Save-all')")
@ApiOperation(value = "批量保存员工简历行", tags = {"员工简历行" }, notes = "批量保存员工简历行")
@RequestMapping(method = RequestMethod.POST, value = "/hr_resume_lines/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<Hr_resume_lineDTO> hr_resume_linedtos) {
hr_resume_lineService.saveBatch(hr_resume_lineMapping.toDomain(hr_resume_linedtos));
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-searchDefault-all')")
@ApiOperation(value = "获取数据集", tags = {"员工简历行" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/hr_resume_lines/fetchdefault")
public ResponseEntity<List<Hr_resume_lineDTO>> fetchDefault(Hr_resume_lineSearchContext context) {
Page<Hr_resume_line> domains = hr_resume_lineService.searchDefault(context) ;
List<Hr_resume_lineDTO> list = hr_resume_lineMapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_resume_line-searchDefault-all')")
@ApiOperation(value = "查询数据集", tags = {"员工简历行" } ,notes = "查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/hr_resume_lines/searchdefault")
public ResponseEntity<Page<Hr_resume_lineDTO>> searchDefault(@RequestBody Hr_resume_lineSearchContext context) {
Page<Hr_resume_line> domains = hr_resume_lineService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hr_resume_lineMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册