Commit 5302fb23 authored by suichenguang's avatar suichenguang

excel添加更改备注

parent 37af3535
...@@ -53,18 +53,28 @@ public class PersonPostApi { ...@@ -53,18 +53,28 @@ public class PersonPostApi {
return null; return null;
} }
/**
* 查询备注信息
* @param jsonStr
* @return
*/
@RequestMapping("selectNote") @RequestMapping("selectNote")
public List<Map<String,Object>>selectNote(@RequestBody String jsonStr){ public List<Map<String,Object>>selectNote(@RequestBody String jsonStr){
List<Map<String,Object>> resultList = new ArrayList<>(); List<Map<String,Object>> resultList = new ArrayList<>();
JSONArray jsonArray = JSONArray.fromObject(jsonStr); JSONArray jsonArray = JSONArray.fromObject(jsonStr);
for (int i=0;i<jsonArray.size();i++){ for (int i=0;i<jsonArray.size();i++){
Map<String,Object> resultMap=personPostService.selectNote((String) jsonArray.get(i)); Map<String,Object> resultMap=personPostService.selectNote((int)(jsonArray.get(i)));
resultList.add(resultMap); resultList.add(resultMap);
} }
return resultList; return resultList;
} }
/**
* 更改备注信息
* @param jsonStr
* @return
*/
@RequestMapping("addNote") @RequestMapping("addNote")
public boolean addNote(@RequestBody String jsonStr){ public boolean addNote(@RequestBody String jsonStr){
JSONArray jsonArray = JSONArray.fromObject(jsonStr); JSONArray jsonArray = JSONArray.fromObject(jsonStr);
......
...@@ -58,7 +58,7 @@ public interface PersonPostMapper { ...@@ -58,7 +58,7 @@ public interface PersonPostMapper {
@Select("select ID,FIRST_WHITE,APPLICANT_NAME,NOTE from person_post where ID=#{id}") @Select("select ID,FIRST_WHITE,APPLICANT_NAME,NOTE from person_post where ID=#{id}")
public Map<String,Object>selectNote(@Param("id")String id); public Map<String,Object>selectNote(@Param("id")int id);
@Update("UPDATE PERSON_POST SET NOTE = #{note} where ID = #{id}") @Update("UPDATE PERSON_POST SET NOTE = #{note} where ID = #{id}")
......
...@@ -44,7 +44,7 @@ public interface PersonPostService { ...@@ -44,7 +44,7 @@ public interface PersonPostService {
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray, String uploadDate,String emailNo); public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted, String gkxx, JSONArray jsonArray, String uploadDate,String emailNo);
public Map<String,Object> selectNote(@Param("id")String id); public Map<String,Object> selectNote(@Param("id")int id);
public boolean addNote(@Param("id")String id,@Param("note")String note); public boolean addNote(@Param("id")String id,@Param("note")String note);
......
...@@ -134,7 +134,7 @@ public class PersonPostServiceImpl implements PersonPostService { ...@@ -134,7 +134,7 @@ public class PersonPostServiceImpl implements PersonPostService {
} }
@Override @Override
public Map<String, Object> selectNote(String id) { public Map<String, Object> selectNote(int id) {
Map<String, Object> resultMap = personPostMapper.selectNote(id); Map<String, Object> resultMap = personPostMapper.selectNote(id);
return resultMap; return resultMap;
} }
......
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