Commit 91cac1a5 authored by xiachenqi's avatar xiachenqi

支持查询和导出天津河北个人邮寄信息相关代码

parent 2387cff2
......@@ -577,7 +577,7 @@ public class PersonPostApi {
cell = row.createCell(13);
cell.setCellValue(personPostEntity.getGetToCity());
cell = row.createCell(14);
cell.setCellValue(personPostEntity.getGetToProvince());
cell.setCellValue(personPostEntity.getGetToCounty());
cell = row.createCell(15);
cell.setCellValue(personPostEntity.getRecipientAddress());
cell = row.createCell(16);
......
......@@ -24,12 +24,39 @@ public interface PersonPostMapper {
boolean savePersonPost(PersonPostEntity personPostEntity);
@Update("update prepro_person p set IS_POST=9 where p.JMSFZSLH in ( select p.JMSFZSLH from prepro_person p left join files files on p.file_id=files.ID \n" +
"where JMSFZSLH in(select FIRST_WHITE from person_post where FILE_ID=#{fileId}) and files.CREAT_TIME=#{creatTime} )")
"where JMSFZSLH in(select FIRST_WHITE from person_post where FILE_ID=#{fileId}) and files.CREATE_TIME=#{creatTime} )")
boolean updateIsPost(@Param("fileId") String fileId, @Param("creatTime") String creatTime);
@Select("SELECT * FROM PERSON_POST WHERE ID_CARD=#{idCard} AND BEGIN_USEFUL_LIFE=#{startDate} AND VALID_PERIOD_END=#{endDate} AND STATE1=0")
List<PersonPostEntity> findAllByIdCardAndStartDateAndEndDate(@Param("idCard") String idCard, @Param("startDate") String startDate, @Param("endDate") String endDate);
@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 " +
" <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 " +
"</script>")
int findPersonalDataCount(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("jmsfzslh") String jmsfzslh, @Param("idCard") String idCard, @Param("state") String state, @Param("district") String district, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") String getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("emailNo") String emailNo, @Param("notNull") String notNull, @Param("printDate") String printDate, @Param("GK") Long gk);
@Select("<script> " +
......@@ -41,25 +68,26 @@ public interface PersonPostMapper {
" 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" +
" <when test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
" <when test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER = TO_NUMBER(${emailNo}) </when>" +
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=${orderNumber} </when>" +
" <when test='jmsfzslh!=\"\"'> and PERSON_POST.FIRST_WHITE=#{jmsfzslh} </when>" +
" <when test='idCard!=\"\"'> and PERSON_POST.ID_CARD=#{idCard} </when>" +
" <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>" +
" <when test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </when>" +
" <when test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </when>" +
" <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>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty}) </when>" +
" <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>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between ${startDate} and ${endDate} </when>" +
" <when test='printDate!=\"\"'> and to_char(PERSON_POST.print_Date,'yyyyMMdd') = ${printDate} </when>" +
" <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 substr(PERSON_POST.first_white,-13) ) " +
"A" +
") B " +
......@@ -68,7 +96,6 @@ public interface PersonPostMapper {
"</script>")
List <PersonPostEntity> findAllPersonalData(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("jmsfzslh") String jmsfzslh, @Param("idCard") String idCard, @Param("state") String state, @Param("district") String district, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") String getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("firstIndex") long firstIndex, @Param("pageSize") long pageSize, @Param("emailNo") String emailNo, @Param("notNull") int notNull, @Param("printDate") String printDate, @Param("GK") Long gk);
@Select("select ID,FIRST_WHITE,APPLICANT_NAME,NOTE from person_post where FIRST_WHITE=#{uploadId}")
List<Map<String,Object>> selectNote(@Param("uploadId") String uploadId);
......@@ -76,34 +103,6 @@ public interface PersonPostMapper {
@Update("UPDATE PERSON_POST SET NOTE = #{note},STATE1 = 1 where FIRST_WHITE = #{uploadNo}")
void addNote(@Param("uploadNo") String uploadNo, @Param("note") String note);
@Select("<script> " +
"SELECT COUNT(*) FROM PERSON_POST \n" +
" 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 " +
" <when test='applicantName!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
" <when test='emailNo!=\"\" '> and PERSON_POST.WAYBILL_NUMBER =TO_NUMBER(#{emailNo}) </when>" +
" <when test='orderNumber!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{orderNumber} </when>" +
" <when test='jmsfzslh!=\"\"'> and PERSON_POST.FIRST_WHITE=#{jmsfzslh} </when>" +
" <when test='idCard!=\"\"'> and PERSON_POST.ID_CARD=#{idCard} </when>" +
" <when test='state== 0 '> and PERSON_POST.print_date is null </when>" +
" <when test='state== 1 '> and PERSON_POST.print_date is not null </when>" +
" <when test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </when>" +
" <when test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </when>" +
" <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>" +
" <when test='latticeMouthInformation!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{latticeMouthInformation} </when>" +
" <when test='getToCounty!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${getToCounty} ) </when>" +
" <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>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </when>" +
" <when test='printDate!=\"\"'> and to_char(PERSON_POST.print_Date,'yyyyMMdd')=${printDate} </when>" +
" order by PERSON_POST.id " +
"</script>")
int findPersonalDataCount(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("jmsfzslh") String jmsfzslh, @Param("idCard") String idCard, @Param("state") String state, @Param("district") String district, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") String getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("emailNo") String emailNo, @Param("notNull") String notNull, @Param("printDate") String printDate, @Param("GK") Long gk);
@Delete("DELETE PERSON_POST " +
"WHERE 1=1" +
" <when test='applicantName!=null'> and PERSON_POST.APPLICANT_NAME = #{applicantName} </when>" +
......@@ -115,8 +114,6 @@ public interface PersonPostMapper {
" <when test='startDate!=null'> and FILE_NAME_DIC.UPLOAD_DATE between #{startDate} and #{endDate} </when>")
boolean deleteAllPersonalData(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("state") String state, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") List<String> getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate);
@Delete("DELETE FROM PERSON_POST WHERE FILE_ID = #{fileId}")
void deletePersonPostByFileId(@Param("fileId") String fileId);
......@@ -141,22 +138,22 @@ public interface PersonPostMapper {
" FROM PERSON_POST " +
" LEFT JOIN FILE_NAME_DIC ON FILE_NAME_DIC.FILE_ID=PERSON_POST.FILE_ID " +
" WHERE 1=1" +
" <when test='sqrxm!=\"\"'> and PERSON_POST.APPLICANT_NAME = #{sqrxm} </when>" +
" <when test='ddh!=\"\"'> and PERSON_POST.ORDER_NUMBER=#{ddh} </when>" +
// " <when test='hasPrinted!=\"\"'> and PERSON_POST.STATE=#{hasPrinted} </when>" +
" <when test='hasPrinted== 0 '> and PERSON_POST.print_date is null </when>" +
" <when test='hasPrinted== 1 '> and PERSON_POST.print_date is not null </when>" +
" <when test='district== 1 '> and PERSON_POST.FIRST_WHITE like '110018%' </when>" +
" <when test='district== 0 '> and SUBSTR(PERSON_POST.FIRST_WHITE,0,6) != '110018' </when>" +
" <when test='gkxx!=\"\"'> and PERSON_POST.LATTICE_MOUTH_INFORMATION=#{gkxx} </when>" +
" <when test='emailNo!=\"\"'> and PERSON_POST.WAYBILL_NUMBER=TO_NUMBER(#{emailNo}) </when>" +
" <when test='str!=\"\"'> and PERSON_POST.GET_TO_COUNTY in ( ${str} ) </when>" +
" <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== 1 '> and GK in (1,2,3,4) </if>" +
" <if test='GK== 5 '> and GK = 5</if>" +
" <when test='startDate!=\"\"'> and subStr(FILE_NAME_DIC.UPLOAD_DATE,0,8) between #{startDate} and #{endDate} </when>" +
" <when test='printDate!=\"\"'> and to_char(PERSON_POST.print_Date,'yyyyMMdd')=${printDate} </when>" +
" <when test='notNull!=\"\"'> and PERSON_POST.state1=${notNull} </when>" +
" <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>" +
" order by PERSON_POST.id " +
"</script>")
List <PersonPostEntity> findAllPersonalDataNoPage(@Param("sqrxm") String sqrxm, @Param("ddh") String ddh, @Param("hasPrinted") String hasPrinted, @Param("district") String district,
......
......@@ -113,8 +113,7 @@ public class PersonPostServiceImpl implements PersonPostService {
@Override
public int findPersonalDataCountByImportDate(String starDate, String endDate) {
int count = personPostMapper.selectPersonalDataCountByImportDate(starDate, endDate);
return count;
return personPostMapper.selectPersonalDataCountByImportDate(starDate, endDate);
}
@Override
......
......@@ -241,6 +241,7 @@
<option value="">--请选择分拣信息--</option>
<option value="1">城区</option>
<option value="5">远郊</option>
<option value="6">天津河北</option>
<option value="0">其他</option>
</select>
</td>
......
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