Commit 9e39c8cf authored by xiachenqi's avatar xiachenqi

新增分拣规则字典表

页面添加根据分拣信息查询
parent 91cbc36d
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yxproject</groupId>
<artifactId>start</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>start</name>
<description>Demo project for Spring Boot</description>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yxproject</groupId>
<artifactId>start</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>start</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring-boot-web-starter</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring-boot-web-starter</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.14</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.14</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.10</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.10</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -44,11 +44,13 @@ import static com.yxproject.start.utils.YXStringUtils.stripNonDigits;
@RequestMapping("personPostApi")
public class PersonPostApi {
@Autowired
PersonPostService personPostService;
private final PersonPostService personPostService;
Logger logger = Logger.getLogger(PersonPostApi.class);
public PersonPostApi(PersonPostService personPostService) {
this.personPostService = personPostService;
}
/**
* 查询备注信息
......@@ -211,7 +213,8 @@ public class PersonPostApi {
String emailNo = jsonObject.getString("emailNo");
String notNull = jsonObject.getString("notNull");
String printDate = stripNonDigits(jsonObject.getString("printDate"));
count = personPostService.findPersonalDataCount(applicantName, orderNumber, state, district,latticeMouthInformation, jsonArray, startDate,endDate, emailNo, notNull,printDate);
Long gk = jsonObject.getLong("gk");
count = personPostService.findPersonalDataCount(applicantName, orderNumber, state, district,latticeMouthInformation, jsonArray, startDate,endDate, emailNo, notNull,printDate, gk);
} catch (Exception e) {
logger.error("个人邮寄信息:" + jsonObject);
logger.error("Exception 按条件查询个人邮寄信息异常", e);
......@@ -247,7 +250,8 @@ public class PersonPostApi {
String emailNo = jsonObject.getString("emailNo");
int notNull = Integer.parseInt((jsonObject.getString("notNull")));
String printDate = stripNonDigits(jsonObject.getString("printDate"));
list = personPostService.findPersonalData(applicantName, orderNumber, state,district, latticeMouthInformation, jsonArray, startDate, endDate, firstIndex, pageSize, emailNo, notNull,printDate);
Long gk = jsonObject.getLong("gk");
list = personPostService.findPersonalData(applicantName, orderNumber, state,district, latticeMouthInformation, jsonArray, startDate, endDate, firstIndex, pageSize, emailNo, notNull,printDate, gk);
} catch (Exception e) {
logger.error("个人邮寄信息:" + jsonObject);
logger.error("Exception 按条件查询个人邮寄信息异常", e);
......@@ -324,14 +328,14 @@ public class PersonPostApi {
@RequestMapping("download")
public void exportExcel(HttpServletRequest request, HttpServletResponse response,
@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, @RequestParam("hasPrinted") String hasPrinted,@RequestParam("district") String district,
@RequestParam("djx") List<String> djx, @RequestParam("gkxx") String gkxx, @RequestParam("ddh") String ddh, @RequestParam("notNull") String notNull,
@RequestParam("djx") List<String> djx, @RequestParam("gkxx") String gkxx, @RequestParam("ddh") String ddh, @RequestParam("notNull") String notNull,@RequestParam(value = "gk") Long gk,
@RequestParam("sequence") String sequence, @RequestParam("sqrxm") String sqrxm, @RequestParam("emailNo") String emailNo,@RequestParam("printDate") String printDate) throws Exception {
String remoteAddr = request.getRemoteAddr();
MDC.put("ip", remoteAddr);
JSONArray jsonArray = new JSONArray();
try {
jsonArray = JSONArray.fromObject(djx);
List<PersonPostEntity> list = personPostService.downLoadReportForm(request, response, sqrxm, ddh, hasPrinted,district, gkxx, jsonArray, replaceDate(startDate),replaceDate(endDate), emailNo,stripNonDigits(printDate),notNull);
List<PersonPostEntity> list = personPostService.downLoadReportForm(request, response, sqrxm, ddh, hasPrinted,district, gkxx, jsonArray, replaceDate(startDate),replaceDate(endDate), emailNo,stripNonDigits(printDate),notNull, gk);
exportExcel(request, response, list);
} catch (Exception e) {
logger.error("上传时间:" + startDate + endDate + "类型普证-0,邮寄-9:" + hasPrinted + "格口信息:" + gkxx + "订单号:" + ddh + "申请人姓名:" + sqrxm + "运单号码:" + emailNo);
......@@ -724,7 +728,8 @@ public class PersonPostApi {
@RequestMapping("downLoadInvalidOrder")
public void exportInvalidOrderExcel(HttpServletRequest request, HttpServletResponse response,
@RequestParam("beginDate") String beginDate,@RequestParam("endDate") String endDate) throws Exception {
@RequestParam("beginDate") String beginDate,@RequestParam("endDate") String endDate,
@RequestParam(defaultValue = "-1", name = "gk") Long gk) throws Exception {
String remoteAddr = request.getRemoteAddr();
MDC.put("ip", remoteAddr);
try {
......
......@@ -2,6 +2,7 @@ package com.yxproject.start.api;
import com.yxproject.start.entity.*;
import com.yxproject.start.service.FileNameDicService;
import com.yxproject.start.service.GkDicService;
import com.yxproject.start.service.GreenPackageInformationService;
import com.yxproject.start.service.PersonPostService;
import com.yxproject.start.utils.ReadExcel;
......@@ -11,7 +12,6 @@ import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.log4j.Logger;
import org.apache.log4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -38,15 +38,19 @@ import java.util.*;
@RequestMapping("ReadExcel")
public class ReadExcelApi {
@Autowired
PersonPostService personPostService;
@Autowired
FileNameDicService fileNameDicService;
@Autowired
GreenPackageInformationService greenPackageInformationService;
private final PersonPostService personPostService;
private final FileNameDicService fileNameDicService;
private final GreenPackageInformationService greenPackageInformationService;
private final GkDicService gkDicService;
Logger logger = Logger.getLogger(ReadExcelApi.class);
public ReadExcelApi(PersonPostService personPostService, FileNameDicService fileNameDicService, GreenPackageInformationService greenPackageInformationService, GkDicService gkDicService) {
this.personPostService = personPostService;
this.fileNameDicService = fileNameDicService;
this.greenPackageInformationService = greenPackageInformationService;
this.gkDicService = gkDicService;
}
/**
* 导入个人邮寄信息表
*/
......@@ -72,7 +76,7 @@ public class ReadExcelApi {
// 设置上传文件总量的最大值,最大值=同时上传的多个文件的大小的最大值的和,目前设置为4000MB
upload.setSizeMax(1024 * 1024 * 4000);
// 将普通属性存入map中,之后调用
Map<String, String> map = new HashMap<String, String>();
Map<String, String> map = new HashMap<>();
List<FileItem> list = null;
int post=0;
int backPost=0;
......@@ -117,9 +121,10 @@ public class ReadExcelApi {
fileNameDicEntity.setUploadDate(simpleDateFormat.format(new Date()));
fileNameDicEntity.setFormStartTime(replaceDate(startDate));
fileNameDicEntity.setFormDeadline(replaceDate(endDate));
fileNameDicEntity.setState((long) 0);
fileNameDicEntity.setState(0L);
fileNameDicService.saveFileNameDic(fileNameDicEntity);
//保存个人邮寄信息
Map<String, Long> gkMap = gkDicService.getGkDicMap();
List<PersonPostEntity> entityList = new ArrayList<>();
for (int i = 0; i < list1.size(); i++) {
PersonPostEntity personPostEntity = new PersonPostEntity();
......@@ -159,6 +164,7 @@ public class ReadExcelApi {
personPostEntity.setNatureOfTheInformation((String) list2.get(23));
personPostEntity.setFirstWhite(list2.get(24).toString().substring(5, 27));
personPostEntity.setFileId(fileNameDicEntity.getFileId());
personPostEntity.setGk(gkMap);
entityList.add(personPostEntity);
}
personPostService.savePersonPost(entityList);
......
package com.yxproject.start.entity;
import lombok.*;
import javax.persistence.*;
@Data
@Entity
@Table(name = "GK_DIC", schema = "YINGXIN", catalog = "")
public class GkDicEntity {
/**
* id
*/
@Id
@Column(name = "ID")
private Long id;
/**
* 省
*/
@Basic
@Column(name = "PROVINCE")
private String province;
/**
* 市
*/
@Basic
@Column(name = "CITY")
private String city;
/**
* 区县
*/
@Basic
@Column(name = "DISTRICT")
private String district;
/**
* 对应字母
*/
@Basic
@Column(name = "LETTER")
private String letter;
/**
* 机构名称
*/
@Basic
@Column(name = "NAME")
private String organName;
/**
* 对应编码
*/
@Basic
@Column(name = "CODE")
private String code;
/**
* 格口
*/
@Basic
@Column(name = "GK")
private Long gk;
}
package com.yxproject.start.mapper;
import com.yxproject.start.entity.GkDicEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface GkDicMapper {
@Select("SELECT * FROM GK_DIC")
List<GkDicEntity> findAll();
}
......@@ -17,9 +17,9 @@ import java.util.Map;
@Mapper
public interface PersonPostMapper {
@Insert("insert into PERSON_POST " +
"( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE,FILE_ID,STATE1,BIRTH_DATE) " +
"( WAYBILL_NUMBER,BACK_WAYBILL_NUMBER,ORDER_NUMBER,CREATE_DATE,OPENID,WC_PLAY_ORDER_NUMBER,PLAY_STATE,ORDER_STATE,APPLICANT_NAME,SENDER_NAME,SENDER_PHONE,SENDER_ADDRESS,RECIPIENT_NAME,RECIPIENT_PHONE,RECIPIENT_ADDRESS,ORDER_BLANK_NUMBER,GET_TO_PROVINCE,GET_TO_CITY,GET_TO_COUNTY,BUSINESS_TYPE,LATTICE_MOUTH_INFORMATION,NATURE_OF_THE_INTERNAL,NATURE_OF_THE_INFORMATION,FIRST_WHITE,FILE_ID,STATE1,BIRTH_DATE,GK) " +
"values " +
"(#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite},#{fileId},3,#{birthDate})")
"(#{waybillNumber},#{backWaybillNumber},#{orderNumber},#{createDate},#{openid},#{wcPlayOrderNumber},#{playState},#{orderState},#{applicantName},#{senderName},#{senderPhone},#{senderAddress},#{recipientName},#{recipientPhone},#{recipientAddress},#{orderBlankNumber},#{getToProvince},#{getToCity},#{getToCounty},#{businessType},#{latticeMouthInformation},#{natureOfTheInternal},#{natureOfTheInformation},#{firstWhite},#{fileId},3,#{birthDate},#{gk})")
@Options(useGeneratedKeys=true, keyProperty="id", keyColumn="id")
public boolean savePersonPost(PersonPostEntity personPostEntity);
......@@ -51,8 +51,11 @@ public interface PersonPostMapper {
" <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='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 substr(PERSON_POST.first_white,-13) ) " +
......@@ -61,7 +64,7 @@ public interface PersonPostMapper {
"WHERE RN BETWEEN ${pageSize} AND ${firstIndex}" +
" order by rn " +
"</script>")
public List <PersonPostEntity> findAllPersonalData( @Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @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);
public List <PersonPostEntity> findAllPersonalData( @Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @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}")
......@@ -88,11 +91,14 @@ public interface PersonPostMapper {
" <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>")
public int findPersonalDataCount( @Param("applicantName")String applicantName,@Param("orderNumber") String orderNumber,@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);
public int findPersonalDataCount( @Param("applicantName")String applicantName,@Param("orderNumber") String orderNumber,@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);
......@@ -143,13 +149,16 @@ public interface PersonPostMapper {
" <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='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>" +
" <when test='notNull!=\"\"'> and PERSON_POST.state1=${notNull} </when>" +
" order by PERSON_POST.id " +
"</script>")
public List <PersonPostEntity> findAllPersonalDataNoPage( @Param("sqrxm") String sqrxm, @Param("ddh") String ddh, @Param("hasPrinted") String hasPrinted,@Param("district") String district,
@Param("gkxx") String gkxx, @Param("str") String str, @Param("startDate") String startDate,@Param("endDate") String endDate, @Param("emailNo") String emailNo,@Param("printDate") String printDate,@Param("notNull") String notNull );
@Param("gkxx") String gkxx, @Param("str") String str, @Param("startDate") String startDate,@Param("endDate") String endDate, @Param("emailNo") String emailNo,@Param("printDate") String printDate,@Param("notNull") String notNull, @Param("GK") Long gk);
@Select("SELECT distinct first_White,applicant_Name,recipient_Name,nature_Of_The_Information,ACCEPT_THE_MATTER " +
" FROM PERSON_POST WHERE STATE1 = 3 AND FIRST_WHITE IN (${uploadNo}) ")
......
package com.yxproject.start.service;
import java.util.Map;
/**
* gk dic服务
*
* @author xcq
* @date 2023/06/02
*/
public interface GkDicService {
/**
* 获取格口信息的map
*
* @return {@link Map}<{@link String}, {@link Long}>
*/
public Map<String, Long> getGkDicMap();
}
......@@ -29,7 +29,7 @@ public interface PersonPostService {
public boolean savePersonPost(List<PersonPostEntity> personPostEntities);
public List<PersonPostEntity> findPersonalData(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("district") String district,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("firstIndex") String firstIndex,@Param("pageSize") String pageSize, String emailNo,int notNull,String printDate);
public List<PersonPostEntity> findPersonalData(@Param("applicantName") String applicantName,@Param("orderNumber") String orderNumber,@Param("state") String state,@Param("district") String district,@Param("latticeMouthInformation") String latticeMouthInformation,@Param("getToCounty") List<String> getToCounty,@Param("startDate") String startDate,@Param("endDate") String endDate,@Param("firstIndex") String firstIndex,@Param("pageSize") String pageSize, String emailNo,int notNull,String printDate, Long gk);
public boolean deletePersonalData(String applicantName,String orderNumber,String state,String latticeMouthInformation,List<String> getToCounty,String starDate,String endDate);
......@@ -39,11 +39,11 @@ public interface PersonPostService {
public boolean printPostList(int id, Date printDateTime);
public int findPersonalDataCount(String applicantName, String orderNumber, String state,String district, String latticeMouthInformation, List<String> getToCounty, String startDate,String endDate, String emailNo,String notNull,String printDate);
public int findPersonalDataCount(String applicantName, String orderNumber, String state,String district, String latticeMouthInformation, List<String> getToCounty, String startDate,String endDate, String emailNo,String notNull,String printDate, Long gk);
public int findPersonalDataCountByImportDate(String starDate,String endDate);
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted,String district, String gkxx, JSONArray jsonArray,String starDate,String endDate,String emailNo,String printDate,String notNull);
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request,HttpServletResponse response,String sqrxm, String ddh, String hasPrinted,String district, String gkxx, JSONArray jsonArray,String starDate,String endDate,String emailNo,String printDate,String notNull, Long gk);
public Map<String,Object> selectNote(@Param("uploadId")String uploadId);
......
package com.yxproject.start.service.impl;
import com.yxproject.start.entity.GkDicEntity;
import com.yxproject.start.mapper.GkDicMapper;
import com.yxproject.start.service.GkDicService;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class GkDicServiceImpl implements GkDicService {
private final GkDicMapper gkDicMapper;
public GkDicServiceImpl(GkDicMapper gkDicMapper) {
this.gkDicMapper = gkDicMapper;
}
/**
* 获取格口信息的map
*
* @return {@link Map}<{@link String}, {@link Long}>
*/
@Override
public Map<String, Long> getGkDicMap() {
Map<String, Long> gkDicMap = new HashMap<>();
List<GkDicEntity> gkDicEntityList = gkDicMapper.findAll();
for (GkDicEntity gkDicEntity : gkDicEntityList) {
gkDicMap.put(gkDicEntity.getCode(), gkDicEntity.getGk());
}
return gkDicMap;
}
}
\ No newline at end of file
......@@ -54,19 +54,18 @@ public class PersonPostServiceImpl implements PersonPostService {
return true;
}
@Override
public List<PersonPostEntity> findPersonalData(String applicantName, String orderNumber, String state,String district, String latticeMouthInformation, List<String> getToCounty, String startDate, String endDate, String firstIndex, String pageSize, String emailNo, int notNull, String printDate) {
String str = "";
long firstIndexLong = Long.valueOf(firstIndex);
long pageSizeLong = Long.valueOf(pageSize);
public List<PersonPostEntity> findPersonalData(String applicantName, String orderNumber, String state,String district, String latticeMouthInformation, List<String> getToCounty, String startDate, String endDate, String firstIndex, String pageSize, String emailNo, int notNull, String printDate, Long gk) {
StringBuilder str = new StringBuilder();
long firstIndexLong = Long.parseLong(firstIndex);
long pageSizeLong = Long.parseLong(pageSize);
for (int i = 0; i < getToCounty.size(); i++) {
if (i == getToCounty.size() - 1) {
str += "'" + getToCounty.get(i) + "'";
str.append("'").append(getToCounty.get(i)).append("'");
} else {
str += "'" + getToCounty.get(i) + "',";
str.append("'").append(getToCounty.get(i)).append("',");
}
}
List<PersonPostEntity> list = personPostMapper.findAllPersonalData(applicantName, orderNumber, state,district, latticeMouthInformation, str, startDate, endDate, firstIndexLong * pageSizeLong, (firstIndexLong - 1) * pageSizeLong + 1, emailNo, notNull, printDate);
return list;
return personPostMapper.findAllPersonalData(applicantName, orderNumber, state,district, latticeMouthInformation, str.toString(), startDate, endDate, firstIndexLong * pageSizeLong, (firstIndexLong - 1) * pageSizeLong + 1, emailNo, notNull, printDate, gk);
}
@Override
......@@ -98,17 +97,16 @@ public class PersonPostServiceImpl implements PersonPostService {
}
@Override
public int findPersonalDataCount(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("state") String state,@Param("district") String district, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") List<String> getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate, String emailNo, String notNull, String printDate) {
String str = "";
public int findPersonalDataCount(@Param("applicantName") String applicantName, @Param("orderNumber") String orderNumber, @Param("state") String state,@Param("district") String district, @Param("latticeMouthInformation") String latticeMouthInformation, @Param("getToCounty") List<String> getToCounty, @Param("startDate") String startDate, @Param("endDate") String endDate, String emailNo, String notNull, String printDate, Long gk) {
StringBuilder str = new StringBuilder();
for (int i = 0; i < getToCounty.size(); i++) {
if (i == getToCounty.size() - 1) {
str += "'" + getToCounty.get(i) + "'";
str.append("'").append(getToCounty.get(i)).append("'");
} else {
str += "'" + getToCounty.get(i) + "',";
str.append("'").append(getToCounty.get(i)).append("',");
}
}
int count = personPostMapper.findPersonalDataCount(applicantName, orderNumber, state, district,latticeMouthInformation, str, startDate, endDate, emailNo, notNull, printDate);
return count;
return personPostMapper.findPersonalDataCount(applicantName, orderNumber, state, district,latticeMouthInformation, str.toString(), startDate, endDate, emailNo, notNull, printDate, gk);
}
@Override
......@@ -118,18 +116,17 @@ public class PersonPostServiceImpl implements PersonPostService {
}
@Override
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request, HttpServletResponse response, String sqrxm, String ddh, String hasPrinted, String district,String gkxx, JSONArray jsonArray, String starDate, String endDate, String emailNo, String printDate, String notNull) {
String str = "";
public List<PersonPostEntity> downLoadReportForm(HttpServletRequest request, HttpServletResponse response, String sqrxm, String ddh, String hasPrinted, String district,String gkxx, JSONArray jsonArray, String starDate, String endDate, String emailNo, String printDate, String notNull, Long gk) {
StringBuilder str = new StringBuilder();
for (int i = 0; i < jsonArray.size(); i++) {
if (i == jsonArray.size() - 1) {
str += "'" + jsonArray.get(i) + "'";
str.append("'").append(jsonArray.get(i)).append("'");
} else {
str += "'" + jsonArray.get(i) + "',";
str.append("'").append(jsonArray.get(i)).append("',");
}
}
List<PersonPostEntity> list = personPostMapper.findAllPersonalDataNoPage(sqrxm, ddh, hasPrinted,district, gkxx, str, starDate, endDate, emailNo, printDate, notNull);
return list;
return personPostMapper.findAllPersonalDataNoPage(sqrxm, ddh, hasPrinted,district, gkxx, str.toString(), starDate, endDate, emailNo, printDate, notNull, gk);
}
@Override
......
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