Commit f4f323c0 authored by suichenguang's avatar suichenguang

修改

parent 46617ae9
......@@ -59,7 +59,7 @@ public class PersonPostApi {
String latticeMouthInformation = jsonObject.getString("latticeMouthInformation");
List<String> getToCounty = new ArrayList<>();
getToCounty.add(jsonObject.getString("getToCounty"));
String uploadDate = jsonObject.getString("uploadDate");
String uploadDate = replaceDate(jsonObject.getString("uploadDate"));
int count = personPostService.findPersonalDataCount(applicantName,orderNumber,state,latticeMouthInformation,getToCounty,uploadDate);
return count;
}
......
......@@ -33,12 +33,9 @@ public interface PersonPostMapper {
"SELECT * FROM " +
"( " +
"SELECT A.*, ROWNUM RN " +
" from (SELECT PERSON_POST.ORDER_NUMBER,PERSON_POST.WAYBILL_NUMBER,PERSON_POST.BACK_WAYBILL_NUMBER,PROD_CARD_T.ACCEPT_NO,PERSON_POST.APPLICANT_NAME,PERSON_POST.RECIPIENT_PHONE,PERSON_POST.RECIPIENT_ADDRESS,PERSON_POST.PRINT_DATE" +
" from (SELECT PERSON_POST.*" +
" FROM PERSON_POST " +
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID" +
" LEFT JOIN PREPRO_PERSON ON PERSON_POST.ID_CARD=PREPRO_PERSON.GMSFHM" +
" LEFT JOIN PROD_CARD_T@PROD_LINK ON PROD_CARD_T.UPLOAD_NO = PREPRO_PERSON.JMSFZSLH" +
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
" WHERE 1=1" +
" <when test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>" +
......@@ -55,17 +52,17 @@ public interface PersonPostMapper {
@Select("<script> " +
"SELECT COUNT(*) FROM NEW_FILES \n" +
"LEFT JOIN PREPRO_PERSON ON NEW_FILES.ID = PREPRO_PERSON.NEW_FILE_ID " +
"SELECT COUNT(*) FROM PERSON_POST \n" +
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
" where 1=1 " +
" <when test='applicantName!=null'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
" <when test='orderNumber!=null'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>" +
" <when test='state!=null'> and PERSON_POST.STATE=#{state} </when>" +
" <when test='latticeMouthInformation!=null'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>" +
" <when test='state!=\"\"'> and PERSON_POST.STATE=#{state} </when>" +
" <when test='latticeMouthInformation!=\"\"'> 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>" +
" <when test='uploadDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE)=#{uploadDate} </when>" +
"</script>")
public int findPersonalDataCount( @Param("applicantName")String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("uploadDate") String uploadDate);
public int findPersonalDataCount( @Param("applicantName")String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") String getToCounty,@Param("uploadDate") String uploadDate);
......@@ -77,7 +74,7 @@ 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>")
public boolean deleteAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,List<String> getToCounty ,@Param("uploadDate")String uploadDate);
public boolean deleteAllPersonalData(@Param("applicantName")String applicantName,@Param("orderNumber")String orderNumber,@Param("state")String state,@Param("latticeMouthInformation")String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty ,@Param("uploadDate")String uploadDate);
......
......@@ -3,6 +3,7 @@ package com.yxproject.start.service;
import com.yxproject.start.dto.ReadCardDto;
import com.yxproject.start.entity.FileNameDicEntity;
import com.yxproject.start.entity.PersonPostEntity;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
......@@ -23,7 +24,7 @@ public interface PersonPostService {
public boolean savePersonPost(List<PersonPostEntity> personPostEntities);
public List<PersonPostEntity> findPersonalData(String applicantName,String orderNumber,String state,String latticeMouthInformation,List<String> getToCounty,String uploadDate,String firstIndex,String pageSize);
public List<PersonPostEntity> findPersonalData(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("uploadDate") String uploadDate,@Param("firstIndex") String firstIndex,@Param("pageSize") String pageSize);
public boolean deletePersonalData(String applicantName,String orderNumber,String state,String latticeMouthInformation,List<String> getToCounty,String uploadDate);
......
......@@ -63,7 +63,9 @@ public class PersonPostServiceImpl implements PersonPostService {
str+="'"+getToCounty.get(i)+"',";
}
}
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!"+str);
List<PersonPostEntity> list = personPostMapper.findAllPersonalData(applicantName,orderNumber,state,latticeMouthInformation,str,uploadDate,firstIndexLong * pageSizeLong,(firstIndexLong - 1) * pageSizeLong + 1);
System.out.println("数据:"+list);
return list;
}
......@@ -89,7 +91,16 @@ public class PersonPostServiceImpl implements PersonPostService {
@Override
public int findPersonalDataCount(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("uploadDate") String uploadDate) {
int count=personPostMapper.findPersonalDataCount(applicantName,orderNumber,state,latticeMouthInformation,getToCounty,uploadDate);
String str = null;
for (int i = 0;i<getToCounty.size();i++){
if (i==getToCounty.size()-1){
str+="'"+getToCounty.get(i)+"'";
}else {
str+="'"+getToCounty.get(i)+"',";
}
}
System.out.println("1111111111111111111111111111"+str);
int count=personPostMapper.findPersonalDataCount(applicantName,orderNumber,state,latticeMouthInformation,str,uploadDate);
return count;
}
......
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