Commit 3e6d00ca authored by liboyang's avatar liboyang

新增页面

parent 318235bf
//package com.yxproject.start.api;
//import com.yxproject.start.entity.ExcelEntity;
//import com.yxproject.start.dto.AnalyseDto;
//import com.yxproject.start.dto.ProgressDto;
//import com.yxproject.start.dto.ReadCardDto;
//import com.yxproject.start.dto.XmlAndExcelInfoDto;
//import com.yxproject.start.entity.PersonPostEntity;
//import com.yxproject.start.service.Business;
//import com.yxproject.start.service.PersonPostService;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.stereotype.Service;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.ws.rs.*;
//import javax.ws.rs.core.Context;
//import javax.ws.rs.core.MediaType;
//import java.text.DateFormat;
//import java.text.ParseException;
//import java.text.SimpleDateFormat;
//import java.util.Date;
//import java.util.List;
//
//@Controller
//@RequestMapping("idCard")
//public class IdCardPostApi {
//
//
// @Autowired
// private PersonPostService personPostService;
//
// private Logger logger = LoggerFactory.getLogger(IdCardPostApi.class);
//
// private SimpleDateFormat dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
// private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
//
// private Date getDateFromString(String gmtCreat, DateFormat dateFormat) {
// if (gmtCreat != null) {
// try {
// return dateFormat.parse(gmtCreat);
// } catch (ParseException e) {
// logger.error(e.getMessage());
// return null;
// }
// }
// return null;
// }
//
// /**
// * 查询身份证对应的邮寄信息
// * @param card 身份证信息
// * @return 邮寄信息
// */
//
// @RequestMapping("getPostInfo")
// public List<PersonPostEntity> getPostInfo(ReadCardDto card) {
// return personPostService.getPostInfo(card);
// }
//
//
// /**
// * 确认打印快递单
// * @param id 快递信息在数据库中的主键ID
// * @return 更新后的快递信息记录
// */
// @RequestMapping("printPostList")
// public PersonPostEntity printPostList(@QueryParam("id") int id, @QueryParam("printTime") String printTime) {
// Date printDateTime = getDateFromString(printTime, dateTimeFormat);
// if (printDateTime == null) return null;
// return personPostService.printPostList(id, printDateTime);
// }
//
// /**
// * 获取分析进度
// * @return 分析进度的JSON
// */
// @GET
// @Path("getProgress")
// @Produces(MediaType.APPLICATION_JSON)
// public ProgressDto getProgress() {
// return business.getProgress();
// }
//
// /**
// * 获取区县列表
// * @return 区县的JSON数组
// */
// @GET
// @Path("districts")
// @Produces(MediaType.APPLICATION_JSON)
// public List<String> getDistricts() {
// return business.getDistricts();
// }
//
// /**
// * 条件查询
// * @param gmtCreat 导入时间
// * @param hasPrinted 是否打印
// * @param djx 到件县
// * @param gkxx 格口信息
// * @param ddh 订单号
// * @param sequence 序号
// * @param sqrxm 申请人姓名
// * @return 邮寄信息的list
// */
// @GET
// @Path("records")
// @Produces(MediaType.APPLICATION_JSON)
// public List<ExcelEntity> getRecords(@QueryParam("gmtCreat")String gmtCreat, @DefaultValue("0") @QueryParam("hasPrinted") int hasPrinted,
// @QueryParam("djx") List<String> djx, @QueryParam("gkxx") String gkxx, @QueryParam("ddh") String ddh,
// @QueryParam("sequence")int sequence, @QueryParam("sqrxm") String sqrxm) {
// Date importDate = getDateFromString(gmtCreat, dateFormat);
// return business.getRecords(importDate, hasPrinted, djx, gkxx, ddh, sequence, sqrxm);
// }
//
// /**
// * 条件查询
// * @param gmtCreat 导入时间
// * @param hasPrinted 是否打印
// * @param djx 到件县
// * @param gkxx 格口信息
// * @param ddh 订单号
// * @param sequence 序号
// * @param sqrxm 申请人姓名
// * @param index 索引
// * @param pageSize 页大小
// * @return 邮寄信息的list
// */
// @GET
// @Path("recordsByPaging")
// @Produces(MediaType.APPLICATION_JSON)
// public List<ExcelEntity> getRecordsByPaging(@QueryParam("gmtCreat")String gmtCreat, @DefaultValue("0") @QueryParam("hasPrinted") int hasPrinted,
// @QueryParam("djx") List<String> djx, @QueryParam("gkxx") String gkxx, @QueryParam("ddh") String ddh,
// @QueryParam("sequence")int sequence, @QueryParam("sqrxm") String sqrxm, @QueryParam("index") int index,
// @QueryParam("pageSize") @DefaultValue("10") int pageSize) {
// Date importDate = getDateFromString(gmtCreat, dateFormat);
// return business.getRecordsPaging(importDate, hasPrinted, djx, gkxx, ddh, sequence, sqrxm, index, pageSize);
// }
//
// /**
// * 查询记录数
// * @param gmtCreat 导入时间
// * @param hasPrinted 是否打印
// * @param djx 到件县
// * @param gkxx 格口信息
// * @param ddh 订单号
// * @param sequence 序号
// * @param sqrxm 申请人姓名
// * @return 查询到的条数
// */
// @GET
// @Path("recordCount")
// public int getCount(@QueryParam("gmtCreat")String gmtCreat, @DefaultValue("0") @QueryParam("hasPrinted") int hasPrinted,
// @QueryParam("djx") List<String> djx, @QueryParam("gkxx") String gkxx, @QueryParam("ddh") String ddh,
// @QueryParam("sequence")int sequence, @QueryParam("sqrxm") String sqrxm) {
// Date importDate = getDateFromString(gmtCreat, dateFormat);
// return business.getCount(importDate, hasPrinted, djx, gkxx, ddh, sequence, sqrxm);
// }
//
// /**
// * 匹配不成功的记录
// * @param gmtCreat 导入时间
// * @return 实体类List转换为json数组
// */
// @GET
// @Path("recordsHasNotMatched")
// @Produces(MediaType.APPLICATION_JSON)
// public List<ExcelEntity> getrecordHasNotPrinted(@QueryParam("gmtCreat") String gmtCreat) {
// Date importDate = getDateFromString(gmtCreat, dateFormat);
// return business.getRecordsHasNotMatched(importDate);
// }
//
// @GET
// @Path("createDistrict")
// public String createDistrict() {
// business.createDistrict();
// return "ok";
// }
//
// @GET
// @Path("download")
// public void exportExcel(@Context HttpServletRequest request, @Context HttpServletResponse response,
// @QueryParam("gmtCreat")String gmtCreat, @DefaultValue("0") @QueryParam("hasPrinted") int hasPrinted,
// @QueryParam("djx") List<String> djx, @QueryParam("gkxx") String gkxx, @QueryParam("ddh") String ddh,
// @QueryParam("sequence")int sequence, @QueryParam("sqrxm") String sqrxm) throws Exception {
// Date importDate = getDateFromString(gmtCreat, dateFormat);
// business.downLoadReportForm(request, response, importDate, hasPrinted, djx, gkxx, ddh, sequence, sqrxm);
// }
//
// @DELETE
// @Path("recordsHaveNotPrinted")
// public String deleteRecords(@QueryParam("gmtCreat") String gmtCreat) {
// Date importDate = getDateFromString(gmtCreat, dateFormat);
// business.deleteRecords(importDate);
// return "finish";
// }
//}
package com.yxproject.start.dto;
public class ReadCardDto {
private String idCard;
private String startDate;
private String endDate;
@Override
public String toString() {
return "ReadCardDto{" +
"idCard='" + idCard + '\'' +
", startDate='" + startDate + '\'' +
", endDate='" + endDate + '\'' +
'}';
}
public ReadCardDto() {
}
public ReadCardDto(String idCard, String startDate, String endDate) {
this.idCard = idCard;
this.startDate = startDate;
this.endDate = endDate;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
}
package com.yxproject.start.service;
import com.yxproject.start.dto.ReadCardDto;
import com.yxproject.start.entity.PersonPostEntity;
import java.util.Date;
......@@ -15,8 +14,5 @@ public interface PersonPostService {
* 导入个人邮寄异常信息
*/
public boolean savePersonPost(List<PersonPostEntity> personPostEntities);
public List<PersonPostEntity> getPostInfo(ReadCardDto card);
public PersonPostEntity printPostList(int id, Date printDateTime);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.dto.ReadCardDto;
import com.yxproject.start.entity.PersonPostEntity;
import com.yxproject.start.entity.PreproPersonEntity;
import com.yxproject.start.mapper.PersonPostMapper;
import com.yxproject.start.mapper.PreproPersonMapper;
import com.yxproject.start.service.PersonPostService;
......@@ -10,8 +8,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
......@@ -23,9 +19,6 @@ import java.util.List;
public class PersonPostServiceImpl implements PersonPostService {
@Autowired
private PersonPostMapper personPostMapper;
@Autowired
private PreproPersonMapper preproPersonMapper;
@Override
@Transactional(rollbackFor = Exception.class)
......@@ -36,17 +29,4 @@ public class PersonPostServiceImpl implements PersonPostService {
}
return true;
}
@Override
public List<PersonPostEntity> getPostInfo(ReadCardDto card) {
String idCard = card.getIdCard();
String startDate = card.getStartDate();
String endDate = card.getEndDate();
return personPostMapper.findAllByIdCardAndStartDateAndEndDate(idCard, startDate, endDate);
}
@Override
public PersonPostEntity printPostList(int id, Date printDateTime) {
return null;
}
}
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