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

消防专家接口

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