Commit d31da58e authored by 付培阳's avatar 付培阳

消防专家接口

parent 4acab9b9
......@@ -28,31 +28,31 @@ public class FireExpertsDto extends BaseDto {
private String name;
@ApiModelProperty(value = "证件类型")
private String documentType;
private String certificatesType;
@ApiModelProperty(value = "证件类型code")
private String documentTypeCode;
private String certificatesTypeCode;
@ApiModelProperty(value = "证件号")
private Long documentNum;
private Long certificatesNum;
@ApiModelProperty(value = "单位")
private String unitsName;
private String companyName;
@ApiModelProperty(value = "性别")
private String gender;
@ApiModelProperty(value = "名族")
private String national;
private String nation;
@ApiModelProperty(value = "籍贯")
private String nativePlace;
@ApiModelProperty(value = "现居住地")
private String theLatter;
private String residence;
@ApiModelProperty(value = "政治面貌")
private String politicalLandscape;
private String politicalOutlook;
@ApiModelProperty(value = "办公用 电话")
private String officePhone;
......@@ -61,7 +61,7 @@ public class FireExpertsDto extends BaseDto {
private String mobilePhone;
@ApiModelProperty(value = "最高学历")
private String educationBackground;
private String highestEducation;
@ApiModelProperty(value = "岗位名称")
private String jobs;
......@@ -70,10 +70,10 @@ public class FireExpertsDto extends BaseDto {
private String jobsCode;
@ApiModelProperty(value = "消防专家领域")
private String field;
private String expert;
@ApiModelProperty(value = "消防专家领域code")
private String fieldCode;
private String expertCode;
@ApiModelProperty(value = "人员照片")
private String personnelPhotos;
......
......@@ -28,30 +28,31 @@ public class FireExperts extends BaseEntity {
private String name;
@ApiModelProperty(value = "证件类型")
private String documentType;
private String certificatesType;
@ApiModelProperty(value = "证件类型code")
private String documentTypeCode;
private String certificatesTypeCode;
@ApiModelProperty(value = "证件号")
private Long documentNum;
private Long certificatesNum;
@ApiModelProperty(value = "单位")
private String unitsName;
private String companyName;
@ApiModelProperty(value = "性别")
private String gender;
@ApiModelProperty(value = "名族")
private String national;
private String nation;
@ApiModelProperty(value = "籍贯")
private String nativePlace;
@ApiModelProperty(value = "现居住地")
private String theLatter;
private String residence;
@ApiModelProperty(value = "政治面貌")
private String politicalLandscape;
private String politicalOutlook;
@ApiModelProperty(value = "办公用 电话")
private String officePhone;
......@@ -60,7 +61,7 @@ public class FireExperts extends BaseEntity {
private String mobilePhone;
@ApiModelProperty(value = "最高学历")
private String educationBackground;
private String highestEducation;
@ApiModelProperty(value = "岗位名称")
private String jobs;
......@@ -69,10 +70,10 @@ public class FireExperts extends BaseEntity {
private String jobsCode;
@ApiModelProperty(value = "消防专家领域")
private String field;
private String expert;
@ApiModelProperty(value = "消防专家领域code")
private String fieldCode;
private String expertCode;
@ApiModelProperty(value = "人员照片")
private String personnelPhotos;
......@@ -88,10 +89,10 @@ public class FireExperts extends BaseEntity {
@ApiModelProperty(value = "消防机构id")
private Long fireTeamId;
@ApiModelProperty(value = "消防机构name")
private Long fireTeamName;
@ApiModelProperty(value = "备注")
private String note;
......
package com.yeejoin.amos.boot.module.common.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto;
......@@ -18,13 +22,13 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
*
*消防专家
* @author system_generator
* @date 2021-06-25
*/
* 消防专家
*
* @author system_generator
* @date 2021-06-25
*/
@RestController
@Api(tags = "Api")
@Api(tags = "消防专家Api")
@RequestMapping(value = "/common/fire-experts")
public class FireExpertsController extends BaseController {
......@@ -32,77 +36,86 @@ public class FireExpertsController extends BaseController {
FireExpertsServiceImpl fireExpertsServiceImpl;
/**
* 新增
* @return
*/
* 新增
*
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<FireExpertsDto> save(@RequestBody FireExpertsDto model) {
model = fireExpertsServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<FireExpertsDto> save(@RequestBody FireExpertsDto model)
{
model=fireExpertsServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<FireExpertsDto> updateBySequenceNbrFireExperts(@RequestBody FireExpertsDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(fireExpertsServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
* @param sequenceNbr 主键
* @return
*/
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<FireExpertsDto> updateBySequenceNbrFireExperts(@RequestBody FireExpertsDto model,
@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(fireExpertsServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
public ResponseModel<Boolean> deleteBySequenceNbr(@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(fireExpertsServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
public ResponseModel<FireExpertsDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 根据sequenceNbr查询
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
public ResponseModel<FireExpertsDto> seleteOne(@PathVariable Long sequenceNbr)
{
return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*@param current 当前页
*@param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
public ResponseModel<Page<FireExpertsDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam(value = "size") int size)
{
Page<FireExpertsDto> page=new Page<FireExpertsDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryForFireExpertsPage(page));
}
/**
*列表全部数据查询
*@return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<FireExpertsDto>> selectForList()
{
return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryForFireExpertsList());
}
* 列表分页查询
*
* @param current 当前页
* @param size 每页大小
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询")
public ResponseModel<Page<FireExpertsDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<FireExpertsDto> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryForFireExpertsPage(page));
}
/**
* 列表全部数据查询
*
* @return 返回结果
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<FireExpertsDto>> selectForList() {
return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryForFireExpertsList());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment