Commit fa24f754 authored by wuzhilong's avatar wuzhilong

Merge remote-tracking branch 'origin/dev' into dev

parents cabecfdb f9830b76
......@@ -290,7 +290,6 @@ public class PersonPostApi {
/**
* 按受理号检查个人邮寄信息
*
* @param jsonStr
* @return
*/
......@@ -319,6 +318,67 @@ public class PersonPostApi {
return list;
}
/**
* 按受理号提交取消邮寄信息
* @return
*/
@RequestMapping("cancelPostByAcceptNo")
public boolean cancelPostByAcceptNo(@RequestParam("cancelList") String cancelList,@RequestParam("name")String name, HttpServletRequest requ){
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
boolean flag = false;
try {
JSONArray jsonArray = JSONArray.fromObject(cancelList);
for (Object o : jsonArray){
JSONObject jsonObject = JSONObject.fromObject(o);
String acceptNo = jsonObject.getString("acceptNo");
String remarks = jsonObject.getString("remarks");
flag = personPostService.cancelPostByAcceptNo(acceptNo,remarks,name);
}
}catch (Exception e){
logger.error("邮寄信息:" + cancelList);
logger.error("Exception 按受理号检查个人邮寄信息", e);
}
return flag;
}
/**
* 查询取消邮寄信息
* @return
*/
@RequestMapping("selectCancelPost")
public List<Map<String,Object>> selectCancelPost(@RequestParam("beginDate") String beginDate,@RequestParam("endDate") String endDate, HttpServletRequest requ){
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
List<Map<String,Object>> list = new ArrayList<>();
try {
list = personPostService.selectCancelPost(replaceDate(beginDate),replaceDate(endDate));
}catch (Exception e){
logger.error("起始时间:" + beginDate + "截止时间:" + endDate);
logger.error("Exception 查询取消邮寄信息", e);
}
return list;
}
/**
* 按受理号查询取消个人邮寄信息详情
* @return
*/
@RequestMapping("findPersonalDataByAcceptNo")
public PersonPostEntity findPersonalDataByAcceptNo(@RequestParam("acceptNo")String acceptNo, HttpServletRequest requ){
String remoteAddr = requ.getRemoteAddr();
MDC.put("ip", remoteAddr);
PersonPostEntity personPostEntity = new PersonPostEntity();
try {
personPostEntity = personPostService.findPersonalDataByAcceptNo(acceptNo);
}catch (Exception e){
logger.error("个人受理号:" + acceptNo);
logger.error("Exception 按受理号查询个人邮寄信息", e);
}
return personPostEntity;
}
/**
* 去除字符串中中线
......
......@@ -146,4 +146,14 @@ public interface PersonPostMapper {
@Select("SELECT * FROM PERSON_POST WHERE STATE1 = 3 AND FIRST_WHITE IN (${uploadNo}) ")
public List <PersonPostEntity> checkPersonalPost(@Param("uploadNo") String uploadNo);
@Insert("INSERT INTO AUDLIT_FAILURE (UPLOAD_NO,UP_TIUME,REMARKS,NAME) VALUES (#{acceptNo},SYSDATE,#{remarks},#{name})")
public boolean cancelPostByAcceptNo(@Param("acceptNo")String acceptNo, @Param("remarks")String remarks, @Param("name")String name);
@Select("SELECT * FROM AUDLIT_FAILURE WHERE TO_CHAR(UP_TIUME,'yyyyMMdd') BETWEEN #{beginDate} AND #{endDate}")
public List<Map<String, Object>> selectCancelPost(@Param("beginDate")String beginDate,@Param("endDate") String endDate);
@Select("SELECT * FROM PERSON_POST WHERE FIRST_WHITE = #{acceptNo}")
public PersonPostEntity findPersonalDataByAcceptNo(String acceptNo);
}
......@@ -50,4 +50,10 @@ public interface PersonPostService {
public List<PersonPostEntity> checkPersonalPost(String uploadNo);
public boolean cancelPostByAcceptNo(String acceptNo,String remarks,String name);
public List<Map<String,Object>> selectCancelPost(String beginDate,String endDate);
public PersonPostEntity findPersonalDataByAcceptNo(String acceptNo);
}
......@@ -150,6 +150,21 @@ public class PersonPostServiceImpl implements PersonPostService {
return personPostMapper.checkPersonalPost(uploadNo);
}
@Override
public boolean cancelPostByAcceptNo(String acceptNo, String remarks, String name) {
return personPostMapper.cancelPostByAcceptNo(acceptNo,remarks,name);
}
@Override
public List<Map<String, Object>> selectCancelPost(String beginDate, String endDate) {
return personPostMapper.selectCancelPost(beginDate,endDate);
}
@Override
public PersonPostEntity findPersonalDataByAcceptNo(String acceptNo) {
return personPostMapper.findPersonalDataByAcceptNo(acceptNo);
}
// /**
// * 查询个人邮寄信息
// * @param fileName 文件名
......
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