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;
...@@ -88,10 +89,10 @@ public class FireExperts extends BaseEntity { ...@@ -88,10 +89,10 @@ public class FireExperts extends BaseEntity {
@ApiModelProperty(value = "消防机构id") @ApiModelProperty(value = "消防机构id")
private Long fireTeamId; private Long fireTeamId;
@ApiModelProperty(value = "消防机构name") @ApiModelProperty(value = "消防机构name")
private Long fireTeamName; private Long fireTeamName;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String note; private String note;
......
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 {
...@@ -32,77 +36,86 @@ public class FireExpertsController extends BaseController { ...@@ -32,77 +36,86 @@ public class FireExpertsController extends BaseController {
FireExpertsServiceImpl fireExpertsServiceImpl; 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) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save") @PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<FireExpertsDto> save(@RequestBody FireExpertsDto model) public ResponseModel<FireExpertsDto> updateBySequenceNbrFireExperts(@RequestBody FireExpertsDto model,
{ @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model=fireExpertsServiceImpl.createWithModel(model); model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(model); return ResponseHelper.buildResponse(fireExpertsServiceImpl.updateWithModel(model));
} }
/**
* 根据sequenceNbr更新 /**
* @param sequenceNbr 主键 * 根据sequenceNbr删除
* @return *
*/ * @param sequenceNbr 主键
@TycloudOperation(ApiLevel = UserType.AGENCY) * @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) @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查询
*
* @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 * @param current 当前页
*/ * @param size 每页大小
@TycloudOperation(ApiLevel = UserType.AGENCY) * @return 返回结果
@GetMapping(value = "/{sequenceNbr}") */
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个") @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<FireExpertsDto> seleteOne(@PathVariable Long sequenceNbr) @GetMapping(value = "/page")
{ @ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询")
return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryBySeq(sequenceNbr)); public ResponseModel<Page<FireExpertsDto>> queryForPage(@RequestParam(value = "current") int current,
} @RequestParam(value = "size") int size) {
/** Page<FireExpertsDto> page = new Page<>();
* 列表分页查询 page.setCurrent(current);
*@param current 当前页 page.setSize(size);
*@param current 每页大小 return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryForFireExpertsPage(page));
* @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) * @return 返回结果
{ */
Page<FireExpertsDto> page=new Page<FireExpertsDto>(); @TycloudOperation(ApiLevel = UserType.AGENCY)
page.setCurrent(current); @ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
page.setSize(size); @GetMapping(value = "/list")
return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryForFireExpertsPage(page)); public ResponseModel<List<FireExpertsDto>> selectForList() {
} return ResponseHelper.buildResponse(fireExpertsServiceImpl.queryForFireExpertsList());
/** }
*列表全部数据查询
*@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