Commit 840b5151 authored by suichenguang's avatar suichenguang

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/main/java/com/yxproject/start/api/BizApi.java
#	src/main/java/com/yxproject/start/api/ExportExcelApi.java
#	src/main/java/com/yxproject/start/api/ReadExcelApi.java
#	src/main/java/com/yxproject/start/utils/ExportExcel.java
parents ce55e450 c1e98ab7
package com.yxproject.start.api;
import com.yxproject.start.service.PoliceStationApplyReasonService;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Administrator
*/
@RestController
@RequestMapping("api")
public class BizApi {
@Autowired
private PoliceStationApplyReasonService policeStationApplyReasonService;
/**
* 保存派出所申领表数据
* @param taskIdList
* @return
*/
@RequestMapping("savePoliceApplicationData")
public int savePoliceApplicationData(@RequestBody String taskIdList) {
JSONArray jsonArray = JSONArray.fromObject(taskIdList);
int i = policeStationApplyReasonService.getAndSavePoliceStationApplyReason(jsonArray);
return i;
}
}
//package com.yxproject.start.api;
//
//import com.yxproject.start.entity.PersonPostAbnormalEntity;
//import com.yxproject.start.entity.RedoRegistrationEntity;
//import com.yxproject.start.entity.TemporaryCertificateEntity;
//import com.yxproject.start.utils.ExportExcel;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//@RestController
//@RequestMapping("exportExcel")
//public class ExportExcelApi {
// /**
// * 导出临时证信息
// */
// @RequestMapping("ExportTemporaryCertificate")
// public boolean ExportTemporaryCertificate(){
// PersonPostAbnormalEntity temporaryCertificate = new PersonPostAbnormalEntity();
// ExportExcel obj = new ExportExcel();
// obj.exportTemporaryCertificateExcel((List<TemporaryCertificateEntity>) temporaryCertificate);
// return true;
// }
// /**
// * 导出重做证件信息
// */
// @RequestMapping("ExportRedoRegistration")
// public boolean ExportRedoRegistration(){
// RedoRegistrationEntity redoRegistration = new RedoRegistrationEntity();
// ExportExcel obj = new ExportExcel();
// obj.exportRedoRegistrationExcel((List<RedoRegistrationEntity>) redoRegistration);
// return true;
// }
//
//}
package com.yxproject.start.api;
import com.yxproject.start.entity.*;
import com.yxproject.start.mapper.*;
import com.yxproject.start.service.*;
import com.yxproject.start.utils.ReadExcel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.sql.Time;
import java.util.ArrayList;
import java.util.List;
import java.io.File;
/**
*
* 导入Excel文件
*
*/
@RestController
@RequestMapping("ReadExcel")
public class ReadExcelApi {
// @Autowired
// PersonalProgressStatusService personalProgressStatusService;
// @Autowired
// PersonPostAbnormalService personPostAbnormalService;
// @Autowired
// CardDetailedListService cardDetailedListService;
// @Autowired
// PersonPostService personPostService;
// @Autowired
// TemporaryCertificateService temporaryCertificateService;
// @Autowired
// RedoRegistrationService redoRegistrationService;
//
// Boolean result = null;
//
//
// /**
// * 导入个人制证进度状态表
// */
// @RequestMapping("ReadPPS")
// public boolean ReadPersonalProgressStatus() {
// ReadExcel obj = new ReadExcel();
// PersonalProgressStatusEntity personalProgressStatus = new PersonalProgressStatusEntity();
// List<PersonalProgressStatusEntity> entityList=new ArrayList<PersonalProgressStatusEntity>();
// File file = new File("E:/北京制证项目/personal_progress_status.xls");
// List excelList = obj.readExcel(file);
// for (int i = 0; i < excelList.size(); i++) {
// List list = (List) excelList.get(i);
//
// //跳过空行和第一行
// if (list ==null||i==0){
// continue;
// }
// System.out.println("输出:"+list);
// personalProgressStatus.setUploadNo((String) list.get(0));
// personalProgressStatus.setProgressStatus((Long) list.get(1));
// personalProgressStatus.setNote((String) list.get(2));
// personalProgressStatus.setImportDate((String) list.get(3));
// personalProgressStatus.setCreateTaskDate((Time) list.get(4));
// personalProgressStatus.setDataCheckDate((Time) list.get(5));
// personalProgressStatus.setFilmPrintDate((Time) list.get(6));
// personalProgressStatus.setPositionDate((Time) list.get(7));
// personalProgressStatus.setSortDate((Time) list.get(8));
// personalProgressStatus.setQualityTestDate((Time) list.get(9));
// personalProgressStatus.setOutStorageDate((Time) list.get(10));
// personalProgressStatus.setHandOutDate((Time) list.get(11));
// personalProgressStatus.setSignInDate((Time) list.get(12));
// entityList.add(personalProgressStatus);
//// for (int j=0;j<list.size();j++){
//// System.out.println();
//// }
// result = personalProgressStatusService.updatePersonalProgressStatus(entityList);
// }
//
// return result;
// }
//
// /**
// * 导入个人邮寄异常信息
// */
// @RequestMapping("ReadPPA")
// public boolean ReadPersonPostAbnormal(){
// ReadExcel obj = new ReadExcel();
// PersonPostAbnormalEntity personPostAbnormal = new PersonPostAbnormalEntity();
// List<PersonPostAbnormalEntity> entityList= new ArrayList<PersonPostAbnormalEntity>();
// File file = new File("E:/北京制证项目/person_post_abnormal.xls");
// List excelList = obj.readExcel(file);
// for (int i = 0; i < excelList.size(); i++){
// List list = (List) excelList.get(i);
// //跳过空行和第一行
// if (list == null||i==0){
// continue;
// }
// personPostAbnormal.setBackWaybillNumber((String) list.get(0));
// personPostAbnormal.setOrderNumber((String) list.get(1));
// personPostAbnormal.setCreateDate((Time) list.get(2));
// personPostAbnormal.setOpenid((String) list.get(3));
// personPostAbnormal.setWcPlayOrderNumber((String) list.get(4));
// personPostAbnormal.setPlayState((String) list.get(5));
// personPostAbnormal.setOrderState((String) list.get(6));
// personPostAbnormal.setApplicantName((String) list.get(7));
// personPostAbnormal.setSenderName((String) list.get(8));
// personPostAbnormal.setSenderPhone((String) list.get(9));
// personPostAbnormal.setSenderAddress((String) list.get(10));
// personPostAbnormal.setRecipientName((String) list.get(11));
// personPostAbnormal.setRecipientPhone((String) list.get(12));
// personPostAbnormal.setRecipientAddress((String) list.get(13));
// personPostAbnormal.setOrderBlankNumber((String) list.get(14));
// personPostAbnormal.setGetToProvince((String) list.get(15));
// personPostAbnormal.setGetToCity((String) list.get(16));
// personPostAbnormal.setGetToCounty((String) list.get(17));
// personPostAbnormal.setBusinessType((String) list.get(18));
// personPostAbnormal.setLatticeMouthInformation((String) list.get(19));
// personPostAbnormal.setNatureOfTheInternal((String) list.get(20));
// personPostAbnormal.setNatureOfTheInformation((String) list.get(21));
// personPostAbnormal.setFirstWhite((String) list.get(22));
// personPostAbnormal.setErrCode((String) list.get(23));
// entityList.add(personPostAbnormal);
// System.out.println("111111111111111111"+entityList.get(0));
// }
// result = personPostAbnormalService.updatePersonPostAbnormal(entityList);
// return result;
// }
//
// /**
// * 导入身份证详单
// */
// @RequestMapping("ReadCDL")
// public boolean ReadCardDetailList(){
// ReadExcel obj = new ReadExcel();
// CardDetailedListEntity cardDetailedList = new CardDetailedListEntity();
// List<CardDetailedListEntity> entityList = new ArrayList<CardDetailedListEntity>();
// File file = new File("E:/北京制证项目/Card_Detail_List.xls");
// List excelList = obj.readExcel(file);
// for (int i=0;i<excelList.size();i++){
// List list = (List) excelList.get(i);
// //跳过空行和第一行
// if (list == null||i==0){
// continue;
// }
// cardDetailedList.setPolistListId((String) list.get(0));
// cardDetailedList.setUploadNo((String) list.get(1));
// cardDetailedList.setNote((String) list.get(2));
// cardDetailedList.setFileName((String) list.get(3));
// cardDetailedList.setPoliceCode((String) list.get(4));
// entityList.add(cardDetailedList);
// }
// result = cardDetailedListService.updateCardDetailedList(entityList);
// return result;
// }
//
// /**
// * 导入个人信息表
// */
// @RequestMapping("ReadPersonPost")
// public boolean ReadPersonPost(){
// ReadExcel obj = new ReadExcel();
// PersonPostEntity personPost = new PersonPostEntity();
// List<PersonPostEntity> entityList = new ArrayList<PersonPostEntity>();
// File file = new File("E:/北京制证项目/Person_Post.xls");
// List excelList = obj.readExcel(file);
// for (int i=0;i<excelList.size();i++){
// List list = (List) excelList.get(i);
// //跳过空行和第一行
// if (list == null||i==0){
// continue;
// }
// personPost.setBackWaybillNumber((String) list.get(0));
// personPost.setOrderNumber((String) list.get(1));
// personPost.setCreateDate((Time) list.get(2));
// personPost.setOpenid((String) list.get(3));
// personPost.setWcPlayOrderNumber((String) list.get(4));
// personPost.setPlayState((String) list.get(5));
// personPost.setOrderState((String) list.get(6));
// personPost.setApplicantName((String) list.get(7));
// personPost.setSenderName((String) list.get(8));
// personPost.setSenderPhone((String) list.get(9));
// personPost.setSenderAddress((String) list.get(10));
// personPost.setRecipientName((String) list.get(11));
// personPost.setRecipientPhone((String) list.get(12));
// personPost.setRecipientAddress((String) list.get(13));
// personPost.setOrderBlankNumber((String) list.get(14));
// personPost.setGetToProvince((String) list.get(15));
// personPost.setGetToCity((String) list.get(16));
// personPost.setGetToCounty((String) list.get(17));
// personPost.setBusinessType((String) list.get(18));
// personPost.setLatticeMouthInformation((String) list.get(19));
// personPost.setNatureOfTheInternal((String) list.get(20));
// personPost.setLatticeMouthInformation((String) list.get(21));
// personPost.setFirstWhite((String) list.get(22));
// entityList.add(personPost);
// }
// result = personPostService.updatePersonPost(entityList);
// return result;
// }
//
// /**
// * 导入临时证信息
// */
// @RequestMapping("ReadTemporaryCertificate")
// public boolean ReadTemporaryCertificate(){
// ReadExcel obj = new ReadExcel();
// TemporaryCertificateEntity temporaryCertificate = new TemporaryCertificateEntity();
// List<TemporaryCertificateEntity> entityList = new ArrayList<TemporaryCertificateEntity>();
// File file = new File("E:/北京制证项目/Temporary_Certificate.xls");
// List excelList = obj.readExcel(file);
// for (int i=0;i<excelList.size();i++) {
// List list = (List) excelList.get(i);
// //跳过空行和第一行
// if (list == null||i==0){
// continue;
// }
// temporaryCertificate.setName((String) list.get(0));
// temporaryCertificate.setCardId((String) list.get(1));
// temporaryCertificate.setPhone((String) list.get(2));
// temporaryCertificate.setLastDurationOfStatus((String) list.get(3));
// temporaryCertificate.setReceiptDate((String) list.get(4));
// temporaryCertificate.setDateOfHandOverToTreat((String) list.get(5));
// temporaryCertificate.setBackWorkshopDate((String) list.get(6));
// temporaryCertificate.setDeliverToParty((String) list.get(7));
// temporaryCertificate.setNote((String) list.get(8));
// entityList.add(temporaryCertificate);
// }
// result = temporaryCertificateService.updateTemporaryCertificate(entityList);
// return result;
// }
// /**
// * 导入重做证件信息
// */
// @RequestMapping("ReadRedoRegistration")
// public boolean ReadRedoRegistration(){
// ReadExcel obj = new ReadExcel();
// RedoRegistrationEntity redoRegistration = new RedoRegistrationEntity();
// List<RedoRegistrationEntity> entityList = new ArrayList<RedoRegistrationEntity>();
// File file = new File("E:/北京制证项目/Read_Redo_Registration.xls");
// List excelList = obj.readExcel(file);
// for (int i=0;i<excelList.size();i++) {
// List list = (List) excelList.get(i);
// //跳过空行和第一行
// if (list == null||i==0){
// continue;
// }
// redoRegistration.setRedoRegistrationId((String) list.get(0));
// redoRegistration.setSubmitDate((String) list.get(1));
// redoRegistration.setCountyCode((String) list.get(2));
// redoRegistration.setPoliceCode((String) list.get(3));
// redoRegistration.setName((String) list.get(4));
// redoRegistration.setCardId((String) list.get(5));
// redoRegistration.setRedoReason((String) list.get(6));
// redoRegistration.setCallDate((String) list.get(7));
// redoRegistration.setBackDate((String) list.get(8));
// redoRegistration.setNote((String) list.get(9));
// entityList.add(redoRegistration);
// }
// result=redoRegistrationService.updateRedoRegistration(entityList);
// return result;
// }
}
package com.yxproject.start.dto;
/**
* @author Administrator
*/
public class PoliceApplyCountDto {
private String policeStationCode;
private String drawType;
private int applyCount;
public String getPoliceStationCode() {
return policeStationCode;
}
public void setPoliceStationCode(String policeStationCode) {
this.policeStationCode = policeStationCode;
}
public String getDrawType() {
return drawType;
}
public void setDrawType(String drawType) {
this.drawType = drawType;
}
public int getApplyCount() {
return applyCount;
}
public void setApplyCount(int applyCount) {
this.applyCount = applyCount;
}
}
package com.yxproject.start.entity;
import javax.persistence.*;
@Entity
@Table(name = "TASK_STATE_DIC", schema = "AUXILIARY", catalog = "")
public class TaskStateDicEntity {
private long taskStateId;
private String taskState;
@Id
@Column(name = "TASK_STATE_ID")
public long getTaskStateId() {
return taskStateId;
}
public void setTaskStateId(long taskStateId) {
this.taskStateId = taskStateId;
}
@Basic
@Column(name = "TASK_STATE")
public String getTaskState() {
return taskState;
}
public void setTaskState(String taskState) {
this.taskState = taskState;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TaskStateDicEntity that = (TaskStateDicEntity) o;
if (taskStateId != that.taskStateId) return false;
if (taskState != null ? !taskState.equals(that.taskState) : that.taskState != null) return false;
return true;
}
@Override
public int hashCode() {
int result = (int) (taskStateId ^ (taskStateId >>> 32));
result = 31 * result + (taskState != null ? taskState.hashCode() : 0);
return result;
}
}
package com.yxproject.start.mapper;
import com.yxproject.start.dto.PoliceApplyCountDto;
import com.yxproject.start.entity.PoliceStationApplyReasonEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author Administrator
*/
@Mapper
public interface PoliceStationApplyReasonMapper {
@Select("SELECT SUBSTR(B.UPLOAD_NO,0,9) police_station_code,B.DRAW_TYPE,count(b.UPLOAD_NO) apply_count from GROUP_NO a\n" +
" LEFT JOIN PROD_APPLY_INFO_T@prod_link b ON a.GROUP_NO=substr(b.ACCEPT_NO,0,8)\n" +
"WHERE TASK_ID=#{taskId} GROUP BY SUBSTR(B.UPLOAD_NO,0,9),B.DRAW_TYPE")
public List<PoliceApplyCountDto> getPoliceStationApplyReason(@Param("taskId") String taskId);
@Insert("INSERT INTO POLICE_STATION_APPLY_REASON(SAVE_DATE,TASK_ID,POLICE_STATION_CODE,APPLY_CODE,APPLY_COUNT)\n" +
"VALUES(SYSDATE,#{taskId},#{policeStationCode},#{drawType},#{applyCount})")
public int savePoliceStationApplyReason(@Param("taskId") String taskId,@Param("policeStationCode")String policeStationCode,@Param("drawType")String drawType,@Param("applyCount")int applyCount);
}
package com.yxproject.start.service;
import net.sf.json.JSONArray;
public interface PoliceStationApplyReasonService {
public int getAndSavePoliceStationApplyReason(JSONArray jsonArray);
}
package com.yxproject.start.service.impl;
import com.yxproject.start.dto.PoliceApplyCountDto;
import com.yxproject.start.entity.PoliceStationApplyReasonEntity;
import com.yxproject.start.mapper.PoliceStationApplyReasonMapper;
import com.yxproject.start.service.PoliceStationApplyReasonService;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
public class PoliceStationApplyReasonServiceImpl implements PoliceStationApplyReasonService{
@Autowired
private PoliceStationApplyReasonMapper policeStationApplyReasonMapper;
@Override
@Transactional(rollbackFor=Exception.class)
public int getAndSavePoliceStationApplyReason(JSONArray taskIdArray) {
int count = 0;
for (Object object:taskIdArray){
List<PoliceApplyCountDto> list = policeStationApplyReasonMapper.getPoliceStationApplyReason(object.toString());
System.out.println(object.toString());
System.out.println(list);
for(int i=0;i<list.size();i++){
int saveCount = policeStationApplyReasonMapper.savePoliceStationApplyReason(object.toString(),list.get(i).getPoliceStationCode(),list.get(i).getDrawType(),list.get(i).getApplyCount());
count+=saveCount;
}
}
return count;
}
}
//package com.yxproject.start.utils;
//
//import com.yxproject.start.entity.PersonPostAbnormalEntity;
//import com.yxproject.start.entity.PersonalProgressStatusEntity;
//import com.yxproject.start.entity.RedoRegistrationEntity;
//import com.yxproject.start.entity.TemporaryCertificateEntity;
//import org.apache.poi.hssf.usermodel.*;
//
//import java.io.FileOutputStream;
//import java.io.IOException;
//import java.text.SimpleDateFormat;
//import java.util.Date;
//import java.util.List;
//
//import static java.lang.Integer.parseInt;
//import static java.lang.Integer.valueOf;
//
///**
// * @auther zhangyusheng
// * 2019/2/12 15:44
// */
//public class ExportExcel {
// /**
// * 导出错误邮寄信息
// * @param personPostAbnormalEntities
// * @return
// */
// public static String exportPersonPostAbnormalExcel(List<PersonPostAbnormalEntity> personPostAbnormalEntities){
// //第一步创建workbook
// HSSFWorkbook wb = new HSSFWorkbook();
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
// HSSFSheet sheet = wb.createSheet("邮寄信息错误信息表");
// sheet.setColumnWidth(0, 30 * 100);
// sheet.setColumnWidth(1, 30 * 70);
// sheet.setColumnWidth(2, 30 * 80);
// sheet.setColumnWidth(3, 30 * 50);
// sheet.setColumnWidth(4, 30 * 110);
// sheet.setColumnWidth(5, 30 * 110);
// sheet.setColumnWidth(6, 30 * 110);
// sheet.setColumnWidth(7, 30 * 110);
// sheet.setColumnWidth(8, 30 * 110);
// sheet.setColumnWidth(9, 30 * 110);
// sheet.setColumnWidth(10, 30 * 110);
// sheet.setColumnWidth(11, 30 * 110);
// sheet.setColumnWidth(12, 30 * 110);
// sheet.setColumnWidth(13, 30 * 110);
// sheet.setColumnWidth(14, 30 * 110);
// sheet.setColumnWidth(15, 30 * 110);
// sheet.setColumnWidth(16, 30 * 110);
// sheet.setColumnWidth(17, 30 * 110);
// sheet.setColumnWidth(18, 30 * 110);
// sheet.setColumnWidth(19, 30 * 110);
// sheet.setColumnWidth(20, 30 * 110);
// sheet.setColumnWidth(21, 30 * 110);
// sheet.setColumnWidth(22, 30 * 110);
// sheet.setColumnWidth(23, 30 * 110);
// sheet.setColumnWidth(24, 30 * 110);
// //第三步创建行row:添加表头0行
// HSSFRow row = sheet.createRow(0);
// HSSFCellStyle style = wb.createCellStyle();//样式
// style.setVerticalAlignment(HSSFCellStyle.ALIGN_LEFT); //设置垂直居中
// style.setAlignment(HSSFCellStyle.ALIGN_LEFT);
// style.setWrapText(true);//设置自动换行
// HSSFFont font = wb.createFont();
// font.setFontHeightInPoints((short) 12);
// style.setFont(font);
// row = sheet.createRow(0); //创建下标为0的单元格
// row.setHeightInPoints(Short.parseShort("20"));//设置行高
// HSSFCell cell = row.createCell(0); //设定值
// cell.setCellValue("邮件号");
// cell = row.createCell(1); //设定值
// cell.setCellValue("反邮件号");
// cell = row.createCell(2); //设定值
// cell.setCellValue("订单号");
// cell = row.createCell(3); //设定值
// cell.setCellValue("订单生成时间");
// cell = row.createCell(4); //设定值
// cell.setCellValue("openid");
// cell = row.createCell(5); //设定值
// cell.setCellValue("微信支付订单号");
// cell = row.createCell(6); //设定值
// cell.setCellValue("支付状态");
// cell = row.createCell(7); //设定值
// cell.setCellValue("订单状态");
// cell = row.createCell(8); //设定值
// cell.setCellValue("申请人姓名");
// cell = row.createCell(9); //设定值
// cell.setCellValue("寄件人姓名");
// cell = row.createCell(10); //设定值
// cell.setCellValue("寄件人联系方式");
// cell = row.createCell(1); //设定值
// cell.setCellValue("寄件人地址");
// cell = row.createCell(11); //设定值
// cell.setCellValue("收件人姓名");
// cell = row.createCell(12); //设定值
// cell.setCellValue("收件人联系方式");
// cell = row.createCell(13); //设定值
// cell.setCellValue("收件人地址");
// cell = row.createCell(14); //设定值
// cell.setCellValue("配货单号");
// cell = row.createCell(15); //设定值
// cell.setCellValue("到件省/直辖市");
// cell = row.createCell(16); //设定值
// cell.setCellValue("到件城市");
// cell = row.createCell(17); //设定值
// cell.setCellValue("到件县/区");
// cell = row.createCell(18); //设定值
// cell.setCellValue("业务类型");
// cell = row.createCell(19); //设定值
// cell.setCellValue("格口信息");
// cell = row.createCell(20); //设定值
// cell.setCellValue("内件性质");
// cell = row.createCell(21); //设定值
// cell.setCellValue("内件信息");
// cell = row.createCell(22); //设定值
// cell.setCellValue("留白一");
// cell = row.createCell(23); //设定值
// cell.setCellValue("错误代码");
// cell = row.createCell(24); //设定值
// cell.setCellValue("检查日期");
// for (int i =0;i<personPostAbnormalEntities.size();i++){
// PersonPostAbnormalEntity personPostAbnormalEntity = personPostAbnormalEntities.get(i);
// row = sheet.createRow(i + 1);
// cell = row.createCell(0); //设定值
// cell.setCellValue(personPostAbnormalEntity.getWaybillNumber());
// cell = row.createCell(1); //设定值
// cell.setCellValue(personPostAbnormalEntity.getBackWaybillNumber());
// cell = row.createCell(2); //设定值
// cell.setCellValue(personPostAbnormalEntity.getOrderNumber());
// cell = row.createCell(3); //设定值
// cell.setCellValue(personPostAbnormalEntity.getCreateDate());
// cell = row.createCell(4); //设定值
// cell.setCellValue(personPostAbnormalEntity.getOpenid());
// cell = row.createCell(5); //设定值
// cell.setCellValue(personPostAbnormalEntity.getWcPlayOrderNumber());
// cell = row.createCell(6); //设定值
// cell.setCellValue(personPostAbnormalEntity.getPlayState());
// cell = row.createCell(7); //设定值
// cell.setCellValue(personPostAbnormalEntity.getOrderState());
// cell = row.createCell(8); //设定值
// cell.setCellValue(personPostAbnormalEntity.getApplicantName());
// cell = row.createCell(9); //设定值
// cell.setCellValue(personPostAbnormalEntity.getSenderName());
// cell = row.createCell(10); //设定值
// cell.setCellValue(personPostAbnormalEntity.getSenderPhone());
// cell = row.createCell(11); //设定值
// cell.setCellValue(personPostAbnormalEntity.getRecipientName());
// cell = row.createCell(12); //设定值
// cell.setCellValue(personPostAbnormalEntity.getRecipientPhone());
// cell = row.createCell(13); //设定值
// cell.setCellValue(personPostAbnormalEntity.getRecipientAddress());
// cell = row.createCell(14); //设定值
// cell.setCellValue(personPostAbnormalEntity.getOrderBlankNumber());
// cell = row.createCell(15); //设定值
// cell.setCellValue(personPostAbnormalEntity.getGetToProvince());
// cell = row.createCell(16); //设定值
// cell.setCellValue(personPostAbnormalEntity.getGetToCity());
// cell = row.createCell(17); //设定值
// cell.setCellValue(personPostAbnormalEntity.getGetToCounty());
// cell = row.createCell(18); //设定值
// cell.setCellValue(personPostAbnormalEntity.getBusinessType());
// cell = row.createCell(19); //设定值
// cell.setCellValue(personPostAbnormalEntity.getLatticeMouthInformation());
// cell = row.createCell(20); //设定值
// cell.setCellValue(personPostAbnormalEntity.getNatureOfTheInternal());
// cell = row.createCell(21); //设定值
// cell.setCellValue(personPostAbnormalEntity.getNatureOfTheInformation());
// cell = row.createCell(22); //设定值
// cell.setCellValue(personPostAbnormalEntity.getFirstWhite());
// cell = row.createCell(23); //设定值
// cell.setCellValue(personPostAbnormalEntity.getErrCode());
//// cell = row.createCell(24); //设定值
//// cell.setCellValue(personPostAbnormalEntity.getCheck_Date());
// }
// //第六步将生成excel文件保存到指定路径下
// FileOutputStream fout = null;
// try {
//// fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
// fout = new FileOutputStream("D:\\Excel\\" + simpleDateFormat.format(new Date())+ "邮寄错误信息表" + ".xls");
// wb.write(fout);
// fout.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
//
// System.out.println("Excel文件生成成功..." + new Date());
//// return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
// return "D:\\Excel\\" + simpleDateFormat.format(new Date()) + "邮寄错误信息表" + ".xls";
// }
//
// /**
// * 导出个人制证状态信息表
// * @param personalProgressStatusEntities
// * @return
// */
// public static String exportPersonalProgressStatusExcel(List<PersonalProgressStatusEntity> personalProgressStatusEntities){
// SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
// //第一步创建workbook
// HSSFWorkbook wb = new HSSFWorkbook();
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
// HSSFSheet sheet = wb.createSheet("个人制证状态信息表");
// sheet.setColumnWidth(0, 30 * 110);
// sheet.setColumnWidth(1, 30 * 110);
// sheet.setColumnWidth(2, 30 * 110);
// sheet.setColumnWidth(3, 30 * 110);
// sheet.setColumnWidth(4, 30 * 110);
// sheet.setColumnWidth(5, 30 * 110);
// sheet.setColumnWidth(6, 30 * 110);
// sheet.setColumnWidth(7, 30 * 110);
// sheet.setColumnWidth(8, 30 * 110);
// sheet.setColumnWidth(9, 30 * 110);
// sheet.setColumnWidth(10, 30 * 110);
// sheet.setColumnWidth(11, 30 * 110);
// sheet.setColumnWidth(12, 30 * 110);
// //第三步创建行row:添加表头0行
// HSSFRow row = sheet.createRow(0);
// HSSFCellStyle style = wb.createCellStyle();//样式
// style.setVerticalAlignment(HSSFCellStyle.ALIGN_LEFT); //设置垂直居中
// style.setAlignment(HSSFCellStyle.ALIGN_LEFT);
// style.setWrapText(true);//设置自动换行
// HSSFFont font = wb.createFont();
// font.setFontHeightInPoints((short) 12);
// style.setFont(font);
// row = sheet.createRow(0); //创建下标为0的单元格
// row.setHeightInPoints(Short.parseShort("20"));//设置行高
// HSSFCell cell = row.createCell(0); //设定值
// cell.setCellValue("上报受理编号");
// cell = row.createCell(1); //设定值
// cell.setCellValue("处理状态");
// cell = row.createCell(2); //设定值
// cell.setCellValue("备注");
// cell = row.createCell(3); //设定值
// cell.setCellValue("导入时间");
// cell = row.createCell(4); //设定值
// cell.setCellValue("生成任务单时间");
// cell = row.createCell(5); //设定值
// cell.setCellValue("数据核验时间");
// cell = row.createCell(6); //设定值
// cell.setCellValue("膜打印时间");
// cell = row.createCell(7); //设定值
// cell.setCellValue("预订位时间");
// cell = row.createCell(8); //设定值
// cell.setCellValue("分拣时间");
// cell = row.createCell(9); //设定值
// cell.setCellValue("质检时间");
// cell = row.createCell(10); //设定值
// cell.setCellValue("出库时间");
// cell = row.createCell(11); //设定值
// cell.setCellValue("下发时间");
// cell = row.createCell(12); //设定值
// cell.setCellValue("签收时间");
//
// for (int i =0;i<personalProgressStatusEntities.size();i++){
// PersonalProgressStatusEntity personalProgressStatusEntity = personalProgressStatusEntities.get(i);
// row = sheet.createRow(i + 1);
// cell = row.createCell(0); //设定值
// cell.setCellValue(personalProgressStatusEntity.getUploadNo());
// cell = row.createCell(1); //设定值
// cell.setCellValue(personalProgressStatusEntity.getProgressStatus());
// cell = row.createCell(2); //设定值
// cell.setCellValue(personalProgressStatusEntity.getNote());
// cell = row.createCell(3); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getImportDate()));
// cell = row.createCell(4); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getCreateTaskDate()));
// cell = row.createCell(5); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getDataCheckDate()));
// cell = row.createCell(6); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getFilmPrintDate()));
// cell = row.createCell(7); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getPositionDate()));
// cell = row.createCell(8); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getSortDate()));
// cell = row.createCell(9); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getQualityTestDate()));
// cell = row.createCell(10); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getOutStorageDate()));
// cell = row.createCell(11); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getHandOutDate()));
// cell = row.createCell(12); //设定值
// cell.setCellValue(formatter.format(personalProgressStatusEntity.getSignInDate()));
// }
// //第六步将生成excel文件保存到指定路径下
// FileOutputStream fout = null;
// try {
//// fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
// fout = new FileOutputStream("D:\\Excel\\" + simpleDateFormat.format(new Date())+ "个人制证状态信息表" + ".xls");
// wb.write(fout);
// fout.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
//
// System.out.println("Excel文件生成成功..." + new Date());
//// return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
// return "D:\\Excel\\" + simpleDateFormat.format(new Date()) + "个人制证状态信息表" + ".xls";
// }
//
// /**
// * 导出临时证件信息表
// * @param temporaryCertificateEntities
// * @return
// */
// public static String exportTemporaryCertificateExcel(List<TemporaryCertificateEntity> temporaryCertificateEntities){
// //第一步创建workbook
// HSSFWorkbook wb = new HSSFWorkbook();
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
// HSSFSheet sheet = wb.createSheet("临时证件信息表");
// sheet.setColumnWidth(0, 30 * 110);
// sheet.setColumnWidth(1, 30 * 110);
// sheet.setColumnWidth(2, 30 * 110);
// sheet.setColumnWidth(3, 30 * 110);
// sheet.setColumnWidth(4, 30 * 110);
// sheet.setColumnWidth(5, 30 * 110);
// sheet.setColumnWidth(6, 30 * 110);
// sheet.setColumnWidth(7, 30 * 110);
// sheet.setColumnWidth(8, 30 * 110);
// sheet.setColumnWidth(9, 30 * 110);
// //第三步创建行row:添加表头0行
// HSSFRow row = sheet.createRow(0);
// HSSFCellStyle style = wb.createCellStyle();//样式
// style.setVerticalAlignment(HSSFCellStyle.ALIGN_LEFT); //设置垂直居中
// style.setAlignment(HSSFCellStyle.ALIGN_LEFT);
// style.setWrapText(true);//设置自动换行
// HSSFFont font = wb.createFont();
// font.setFontHeightInPoints((short) 12);
// style.setFont(font);
// row = sheet.createRow(0); //创建下标为0的单元格
// row.setHeightInPoints(Short.parseShort("20"));//设置行高
// HSSFCell cell = row.createCell(0); //设定值
// cell.setCellValue("临时证件id");
// cell = row.createCell(1); //设定值
// cell.setCellValue("姓名");
// cell = row.createCell(2); //设定值
// cell.setCellValue("身份证号码");
// cell = row.createCell(3); //设定值
// cell.setCellValue("联系电话");
// cell = row.createCell(4); //设定值
// cell.setCellValue("上一个有效期");
// cell = row.createCell(5); //设定值
// cell.setCellValue("收到日期");
// cell = row.createCell(6); //设定值
// cell.setCellValue("交待日期");
// cell = row.createCell(7); //设定值
// cell.setCellValue("返给车间日期");
// cell = row.createCell(8); //设定值
// cell.setCellValue("交给当事人日期");
// cell = row.createCell(9); //设定值
// cell.setCellValue("备注");
//
// for (int i =0;i<temporaryCertificateEntities.size();i++){
// TemporaryCertificateEntity temporaryCertificateEntity = temporaryCertificateEntities.get(i);
// row = sheet.createRow(i + 1);
// cell = row.createCell(0); //设定值
// cell.setCellValue(temporaryCertificateEntity.getTemporaryCertificateId());
// cell = row.createCell(1); //设定值
// cell.setCellValue(temporaryCertificateEntity.getName());
// cell = row.createCell(2); //设定值
// cell.setCellValue(temporaryCertificateEntity.getCardId());
// cell = row.createCell(3); //设定值
// cell.setCellValue(temporaryCertificateEntity.getPhone());
// cell = row.createCell(4); //设定值
// cell.setCellValue(temporaryCertificateEntity.getLastDurationOfStatus());
// cell = row.createCell(5); //设定值
// cell.setCellValue(temporaryCertificateEntity.getReceiptDate());
// cell = row.createCell(6); //设定值
// cell.setCellValue(temporaryCertificateEntity.getDateOfHandOverToTreat());
// cell = row.createCell(7); //设定值
// cell.setCellValue(temporaryCertificateEntity.getBackWorkshopDate());
// cell = row.createCell(8); //设定值
// cell.setCellValue(temporaryCertificateEntity.getDeliverToParty());
// cell = row.createCell(9); //设定值
// cell.setCellValue(temporaryCertificateEntity.getNote());
// }
// //第六步将生成excel文件保存到指定路径下
// FileOutputStream fout = null;
// try {
//// fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
// fout = new FileOutputStream("D:\\Excel\\" + simpleDateFormat.format(new Date())+ "临时证件信息表" + ".xls");
// wb.write(fout);
// fout.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
//
// System.out.println("Excel文件生成成功..." + new Date());
//// return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
// return "D:\\Excel\\" + simpleDateFormat.format(new Date()) + "临时证件信息表" + ".xls";
// }
//
// /**
// * 导出重做登记信息表
// * @param redoRegistrationEntities
// * @return
// */
// public static String exportRedoRegistrationExcel(List<RedoRegistrationEntity> redoRegistrationEntities){
// //第一步创建workbook
// HSSFWorkbook wb = new HSSFWorkbook();
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
// HSSFSheet sheet = wb.createSheet("重做登记信息表");
// sheet.setColumnWidth(0, 30 * 110);
// sheet.setColumnWidth(1, 30 * 110);
// sheet.setColumnWidth(2, 30 * 110);
// sheet.setColumnWidth(3, 30 * 110);
// sheet.setColumnWidth(4, 30 * 110);
// sheet.setColumnWidth(5, 30 * 110);
// sheet.setColumnWidth(6, 30 * 110);
// sheet.setColumnWidth(7, 30 * 110);
// sheet.setColumnWidth(8, 30 * 110);
// sheet.setColumnWidth(9, 30 * 110);
// //第三步创建行row:添加表头0行
// HSSFRow row = sheet.createRow(0);
// HSSFCellStyle style = wb.createCellStyle();//样式
// style.setVerticalAlignment(HSSFCellStyle.ALIGN_LEFT); //设置垂直居中
// style.setAlignment(HSSFCellStyle.ALIGN_LEFT);
// style.setWrapText(true);//设置自动换行
// HSSFFont font = wb.createFont();
// font.setFontHeightInPoints((short) 12);
// style.setFont(font);
// row = sheet.createRow(0); //创建下标为0的单元格
// row.setHeightInPoints(Short.parseShort("20"));//设置行高
// HSSFCell cell = row.createCell(0); //设定值
// cell.setCellValue("重做登记表id");
// cell = row.createCell(1); //设定值
// cell.setCellValue("上传日期");
// cell = row.createCell(2); //设定值
// cell.setCellValue("区县代码");
// cell = row.createCell(3); //设定值
// cell.setCellValue("公安机关代码");
// cell = row.createCell(4); //设定值
// cell.setCellValue("姓名");
// cell = row.createCell(5); //设定值
// cell.setCellValue("身份证号");
// cell = row.createCell(6); //设定值
// cell.setCellValue("重做原因");
// cell = row.createCell(7); //设定值
// cell.setCellValue("来电日期");
// cell = row.createCell(8); //设定值
// cell.setCellValue("返回日期");
// cell = row.createCell(9); //设定值
// cell.setCellValue("备注");
//
// for (int i =0;i<redoRegistrationEntities.size();i++){
// RedoRegistrationEntity redoRegistrationEntity = redoRegistrationEntities.get(i);
// row = sheet.createRow(i + 1);
// cell = row.createCell(0); //设定值
// cell.setCellValue(redoRegistrationEntity.getRedoRegistrationId());
// cell = row.createCell(1); //设定值
// cell.setCellValue(redoRegistrationEntity.getSubmitDate());
// cell = row.createCell(2); //设定值
// cell.setCellValue(redoRegistrationEntity.getCountyCode());
// cell = row.createCell(3); //设定值
// cell.setCellValue(redoRegistrationEntity.getPoliceCode());
// cell = row.createCell(4); //设定值
// cell.setCellValue(redoRegistrationEntity.getName());
// cell = row.createCell(5); //设定值
// cell.setCellValue(redoRegistrationEntity.getCardId());
// cell = row.createCell(6); //设定值
// cell.setCellValue(redoRegistrationEntity.getRedoReason());
// cell = row.createCell(7); //设定值
// cell.setCellValue(redoRegistrationEntity.getCallDate());
// cell = row.createCell(8); //设定值
// cell.setCellValue(redoRegistrationEntity.getBackDate());
// cell = row.createCell(9); //设定值
// cell.setCellValue(redoRegistrationEntity.getNote());
// }
// //第六步将生成excel文件保存到指定路径下
// FileOutputStream fout = null;
// try {
//// fout = new FileOutputStream("E:\\Excel\\" + simpleDateFormat.format(new Date()) + countyInfoList.get(0).get("COUNTYNAME") + ".xls");
// fout = new FileOutputStream("D:\\Excel\\" + simpleDateFormat.format(new Date())+ "重做登记信息表" + ".xls");
// wb.write(fout);
// fout.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
//
// System.out.println("Excel文件生成成功..." + new Date());
//// return "E:\\Excel\\" + simpleDateFormat.format(new Date()) +countyInfoList.get(0).get("COUNTYNAME") + ".xls";
// return "D:\\Excel\\" + simpleDateFormat.format(new Date()) + "重做登记信息表" + ".xls";
// }
//
//
//}
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