@@ -32,62 +32,74 @@ public interface PersonPostMapper {
@Select("<script> "+
"SELECT COUNT(*) FROM PERSON_POST \n"+
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID "+
" where 1=1 "+
" <where> "+
" <if test='startDate != null and startDate != \"\"'> AND PERSON_POST.FILE_ID IN (SELECT FILE_ID FROM FILE_NAME_DIC WHERE UPLOAD_DATE BETWEEN ${startDate}||'000000' AND ${endDate}||'235959') </if> "+
" <if test='printDate != null and printDate != \"\"'> AND PERSON_POST.print_Date BETWEEN TO_DATE(#{printDate}||'000000', 'yyyyMMddHH24MISS') AND TO_DATE(#{printDate}||'235959', 'yyyyMMddHH24MISS') </if>"+
" <if test='notNull== 1 '> and PERSON_POST.state1=1 </if>"+
" <if test='notNull== 0 '> and PERSON_POST.state1=0 </if>"+
" <if test='notNull== 3 '> and PERSON_POST.state1=3 </if>"+
" <if test='state== 0 '> and PERSON_POST.print_date is null </if>"+
" <if test='state== 1 '> and PERSON_POST.print_date is not null </if>"+
" <if test='GK == 6'> AND PERSON_POST.GET_TO_PROVINCE IN ('天津市', '河北省') </if>"+
" <if test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </if>"+
" <if test='emailNo!=\"\" '> and PERSON_POST.WAYBILL_NUMBER =TO_NUMBER(#{emailNo}) </if>"+
" <if test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </if>"+
" <if test='jmsfzslh!=\"\"'> and PERSON_POST.FIRST_WHITE=#{jmsfzslh} </if>"+
" <if test='idCard!=\"\"'> and PERSON_POST.ID_CARD=#{idCard} </if>"+
" <if test='state== 0 '> and PERSON_POST.print_date is null </if>"+
" <if test='state== 1 '> and PERSON_POST.print_date is not null </if>"+
" <if test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </if>"+
" <if test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </if>"+
" <if test='notNull== 1 '> and PERSON_POST.state1=1 </if>"+
" <if test='notNull== 0 '> and PERSON_POST.state1=0 </if>"+
" <if test='notNull== 3 '> and PERSON_POST.state1=3 </if>"+
" <if test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </if>"+
" <if test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty} ) </if>"+
" <if test='GK== 0 '> and GK = 0 </if>"+
" <if test='GK== 1 '> and GK in (1,2,3,4) </if>"+
" <if test='GK== 5 '> and GK = 5</if>"+
" <if test='GK == 6'> AND PERSON_POST.GET_TO_PROVINCE IN ('天津市', '河北省') </if>"+
" <if test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </if>"+
" <if test='printDate != null and printDate != \"\"'> AND PERSON_POST.print_Date BETWEEN TO_DATE(#{printDate}||'000000', 'yyyyMMddHH24MISS') AND TO_DATE(#{printDate}||'235959', 'yyyyMMddHH24MISS') </if>"+
" order by PERSON_POST.id "+
" <if test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </if>"+
" <if test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </if>"+
"SELECT DISTINCT B.*,substr(B.first_white,-13) FROM "+
// "SELECT DISTINCT B.* FROM " +
"( "+
"SELECT A.*, ROWNUM RN "+
" from (SELECT DISTINCT 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.first_white = prepro_person.jmsfzslh "+
// " LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
// " left join PREPRO_PERSON on PERSON_POST.first_white = prepro_person.jmsfzslh " +
" WHERE 1=1"+
" <if test='startDate != null and startDate != \"\"'> AND PERSON_POST.FILE_ID IN (SELECT FILE_ID FROM FILE_NAME_DIC WHERE UPLOAD_DATE BETWEEN ${startDate}||'000000' AND ${endDate}||'235959') </if> "+
" <if test='printDate != null and printDate != \"\"'> AND PERSON_POST.print_Date BETWEEN TO_DATE(#{printDate}||'000000', 'yyyyMMddHH24MISS') AND TO_DATE(#{printDate}||'235959', 'yyyyMMddHH24MISS') </if>"+
" <if test='notNull== 1 '> and PERSON_POST.state1=1 </if>"+
" <if test='notNull== 0 '> and PERSON_POST.state1=0 </if>"+
" <if test='notNull== 3 '> and PERSON_POST.state1=3 </if>"+
" <if test='state== 0 '> and PERSON_POST.print_date is null </if>"+
" <if test='state== 1 '> and PERSON_POST.print_date is not null </if>"+
" <if test='GK == 6'> AND PERSON_POST.GET_TO_PROVINCE IN ('天津市', '河北省') </if>"+
" <if test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </if>"+
" <if test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER = TO_NUMBER(${emailNo}) </if>"+
" <if test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=${orderNumber} </if>"+
" <if test='jmsfzslh!=\"\"'> and PERSON_POST.FIRST_WHITE=#{jmsfzslh} </if>"+
" <if test='idCard!=\"\"'> and PERSON_POST.ID_CARD=#{idCard} </if>"+
" <if test='state== 0 '> and PERSON_POST.print_date is null </if>"+
" <if test='state== 1 '> and PERSON_POST.print_date is not null </if>"+
" <if test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </if>"+
" <if test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </if>"+
" <if test='notNull== 1 '> and PERSON_POST.state1=1 </if>"+
" <if test='notNull== 0 '> and PERSON_POST.state1=0 </if>"+
" <if test='notNull== 3 '> and PERSON_POST.state1=3 </if>"+
" <if test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </if>"+
" <if test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty}) </if>"+
" <if test='GK== 0 '> and GK = 0 </if>"+
" <if test='GK== 1 '> and GK in (1,2,3,4) </if>"+
" <if test='GK== 5 '> and GK = 5</if>"+
" <if test='GK == 6'> AND PERSON_POST.GET_TO_PROVINCE IN ('天津市', '河北省') </if>"+
" <if test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between ${startDate} and ${endDate} </if>"+
" <if test='printDate != null and printDate != \"\"'> AND PERSON_POST.print_Date BETWEEN TO_DATE(#{printDate}||'000000', 'yyyyMMddHH24MISS') AND TO_DATE(#{printDate}||'235959', 'yyyyMMddHH24MISS') </if>"+
" <if test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </if>"+
" <if test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </if>"+
"order by substr(PERSON_POST.first_white,-13) ) "+
"A"+
") B "+
...
...
@@ -96,6 +108,37 @@ public interface PersonPostMapper {
" <if test='startDate != null and startDate != \"\"'> AND PERSON_POST.FILE_ID IN (SELECT FILE_ID FROM FILE_NAME_DIC WHERE UPLOAD_DATE BETWEEN ${startDate}||'000000' AND ${endDate}||'235959') </if> "+
" <if test='printDate != null and printDate != \"\"'> AND PERSON_POST.print_Date BETWEEN TO_DATE(#{printDate}||'000000', 'yyyyMMddHH24MISS') AND TO_DATE(#{printDate}||'235959', 'yyyyMMddHH24MISS') </if>"+
" <if test='notNull!=\"\"'> and PERSON_POST.state1=${notNull} </if>"+
" <if test='hasPrinted== 0 '> and PERSON_POST.print_date is null </if>"+
" <if test='hasPrinted== 1 '> and PERSON_POST.print_date is not null </if>"+
" <if test='GK== 0 '> and GK = 0 </if>"+
" <if test='GK== 1 '> and PERSON_POST.GET_TO_PROVINCE = '北京市' </if>"+
" <if test='GK== 5 '> and GK = 5</if>"+
" <if test='GK== 6'> AND PERSON_POST.GET_TO_PROVINCE IN ('天津市', '河北省') </if>"+
" <if test='sqrxm!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{sqrxm} </if>"+
" <if test='ddh!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{ddh} </if>"+
" <if test='gkxx!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{gkxx} </if>"+
" <if test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER=TO_NUMBER(#{emailNo}) </if>"+
" <if test='str!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${str} ) </if>"+
" <if test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </if>"+
" <if test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </if>"+
@@ -132,33 +175,6 @@ public interface PersonPostMapper {
@Select("SELECT count(*) FROM FILE_NAME_DIC a LEFT JOIN PERSON_POST b on a.FILE_ID=b.FILE_ID WHERE b.PRINT_DATE IS NULL AND substr(a.UPLOAD_DATE,0,8) between ${startDate} and ${endDate} ")
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID "+
" WHERE 1=1"+
" <if test='sqrxm!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{sqrxm} </if>"+
" <if test='ddh!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{ddh} </if>"+
" <if test='hasPrinted== 0 '> and PERSON_POST.print_date is null </if>"+
" <if test='hasPrinted== 1 '> and PERSON_POST.print_date is not null </if>"+
" <if test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </if>"+
" <if test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </if>"+
" <if test='gkxx!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{gkxx} </if>"+
" <if test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER=TO_NUMBER(#{emailNo}) </if>"+
" <if test='str!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${str} ) </if>"+
" <if test='GK== 0 '> and GK = 0 </if>"+
" <if test='GK== 1 '> and GK in (1,2,3,4) </if>"+
" <if test='GK== 5 '> and GK = 5</if>"+
" <if test='GK == 6'> AND PERSON_POST.GET_TO_PROVINCE IN ('天津市', '河北省') </if>"+
" <if test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </if>"+
" <if test='printDate != null and printDate != \"\"'> AND PERSON_POST.print_Date BETWEEN TO_DATE(#{printDate}||'000000', 'yyyyMMddHH24MISS') AND TO_DATE(#{printDate}||'235959', 'yyyyMMddHH24MISS') </if>"+
" <if test='notNull!=\"\"'> and PERSON_POST.state1=${notNull} </if>"+