Commit 94a71d39 authored by liboyang's avatar liboyang

push

parent 6b2078e8
......@@ -22,243 +22,243 @@ import java.io.File;
@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();
// @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;
// }
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;
}
// 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;
// }
}
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