Commit 5d059705 authored by liboyang's avatar liboyang

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

parents 51ba3f86 1d34b23c
......@@ -3,6 +3,7 @@ package com.yxproject.start.api;
import com.yxproject.start.dto.ReadCardDto;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.service.PersonPostService;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -74,12 +75,11 @@ public class PersonPostApi {
String orderNumber = jsonObject.getString("orderNumber");
String state = jsonObject.getString("state");
String latticeMouthInformation = jsonObject.getString("latticeMouthInformation");
List<String> getToCounty = new ArrayList<>();
getToCounty.add(jsonObject.getString("getToCounty"));
JSONArray jsonArray =(JSONArray)jsonObject.get("getToCounty");
String uploadDate = jsonObject.getString("uploadDate");
String firstIndex = jsonObject.getString("firstIndex");
String pageSize = jsonObject.getString("pageSize");
List<PersonPostEntity> list = personPostService.findPersonalData(applicantName,orderNumber,state,latticeMouthInformation,getToCounty,uploadDate,firstIndex,pageSize);
List<PersonPostEntity> list = personPostService.findPersonalData(applicantName,orderNumber,state,latticeMouthInformation,jsonArray,uploadDate,firstIndex,pageSize);
return list;
}
......
......@@ -42,11 +42,10 @@ public interface PersonPostMapper {
" <when test='latticeMouthInformation!=null'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=null'> and PERSON_POST.GET_TO_COUNTY in ( #{getToCounty} ) </when>" +
" <when test='uploadDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE=#{uploadDate} </when>" +
// "PERSON_POST limit #{firstIndex},#{pageSize}"
") " +
"A" +
")" +
"WHERE RN BETWEEN #{firstIndex} AND #{pageSize}" +
"WHERE RN BETWEEN #{pageSize} AND #{firstIndex}" +
"</script>")
public List<PersonPostEntity> findAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,@Param("getToCounty")String getToCounty,@Param("uploadDate")String uploadDate,@Param("firstIndex")long firstIndex,@Param("pageSize")long pageSize);
......
......@@ -57,9 +57,9 @@ public class PersonPostServiceImpl implements PersonPostService {
long pageSizeLong = Long.valueOf(pageSize);
for (int i = 0;i<getToCounty.size();i++){
if (i==getToCounty.size()-1){
str+="'"+getToCounty.get(i);
str+="'"+getToCounty.get(i)+"'";
}else {
str+="'"+getToCounty.get(i)+",";
str+="'"+getToCounty.get(i)+"',";
}
}
List<PersonPostEntity> list = personPostMapper.findAllPersonalData(applicantName,orderNumber,state,latticeMouthInformation,str,uploadDate,firstIndexLong * pageSizeLong,(firstIndexLong - 1) * pageSizeLong + 1);
......
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