1、springboot的后端接口:
(1)post存储接口
@AutoLog(value = "个人档案信息编辑")
@ApiOperation(value = "个人档案信息编辑", notes = "个人档案信息编辑")
@PostMapping(value = "/edit")
public Result<UpdateInformation> edit(@RequestBody UpdateAll updateAll) {
Result<UpdateInformation> result = new Result<UpdateInformation>();
//before和now需要利用object的方式进行转换,因为不确定是哪个具体的类
String before = JSONArray.toJSONString(updateAll.getBefore());
String now = JSONArray.toJSONString(updateAll.getNow());
//直接利用get的方式获得其他信息类
UpdateOthers updateOthers=updateAll.getOthers();
UpdateInformation updateInformation = new UpdateInformation();
(2)get查询接口
@AutoLog(value = "个人档案信息修改通过待办id查询")
@ApiOperation(value = "个人档案信息修改通过待办id查询", notes = "个人档案信息修改通过待办id查询")
@GetMapping(value = "/queryById")
public Result<UpdateBoth> queryById(@RequestParam(name = "id", required = true) String id) {
Result<UpdateBoth> result = new Result<UpdateBoth>();
try{
Map<String, Object> map = iUpdateInformationService.queryById(id);
UpdateBoth updateBoth = JSON.parseObject(JSON.toJSONString(map), UpdateBoth.class);
if (map == null) {
result.error500("个人档案修改数据不存在,请重新确认!");
} else {
String updatetype = (String) map.get("C_UPDATE_OPERATE");
2、vue前端接口函数调用定义
(1)post接口定义
"before":{
"country": "中国",
"nation": "汉族",
"csplace": "北京"
},
"now":{
"country": "中国",
"nation": "汉族",
"csplace": "北京"
},"others":
{
"cUpdateOperate": "2",
"cUpdateType": "0",
"cUpdateOperateId": "yanjiangyi"
} }