Commit 94a71d39 authored by liboyang's avatar liboyang

push

parent 6b2078e8
...@@ -22,243 +22,243 @@ import java.io.File; ...@@ -22,243 +22,243 @@ import java.io.File;
@RequestMapping("ReadExcel") @RequestMapping("ReadExcel")
public class ReadExcelApi { public class ReadExcelApi {
@Autowired // @Autowired
PersonalProgressStatusService personalProgressStatusService; // PersonalProgressStatusService personalProgressStatusService;
@Autowired // @Autowired
PersonPostAbnormalService personPostAbnormalService; // PersonPostAbnormalService personPostAbnormalService;
@Autowired // @Autowired
CardDetailedListService cardDetailedListService; // CardDetailedListService cardDetailedListService;
@Autowired // @Autowired
PersonPostService personPostService; // PersonPostService personPostService;
@Autowired // @Autowired
TemporaryCertificateService temporaryCertificateService; // TemporaryCertificateService temporaryCertificateService;
@Autowired // @Autowired
RedoRegistrationService redoRegistrationService; // RedoRegistrationService redoRegistrationService;
//
Boolean result = null; // Boolean result = null;
//
//
/** // /**
* 导入个人制证进度状态表 // * 导入个人制证进度状态表
*/ // */
@RequestMapping("ReadPPS") // @RequestMapping("ReadPPS")
public boolean ReadPersonalProgressStatus() { // public boolean ReadPersonalProgressStatus() {
ReadExcel obj = new ReadExcel(); // ReadExcel obj = new ReadExcel();
PersonalProgressStatusEntity personalProgressStatus = new PersonalProgressStatusEntity(); // PersonalProgressStatusEntity personalProgressStatus = new PersonalProgressStatusEntity();
List<PersonalProgressStatusEntity> entityList=new ArrayList<PersonalProgressStatusEntity>(); // List<PersonalProgressStatusEntity> entityList=new ArrayList<PersonalProgressStatusEntity>();
File file = new File("E:/北京制证项目/personal_progress_status.xls"); // File file = new File("E:/北京制证项目/personal_progress_status.xls");
List excelList = obj.readExcel(file); // List excelList = obj.readExcel(file);
for (int i = 0; i < excelList.size(); i++) { // for (int i = 0; i < excelList.size(); i++) {
List list = (List) excelList.get(i); // List list = (List) excelList.get(i);
//
//跳过空行和第一行 // //跳过空行和第一行
if (list ==null||i==0){ // if (list ==null||i==0){
continue; // 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); // System.out.println("输出:"+list);
} // personalProgressStatus.setUploadNo((String) list.get(0));
// personalProgressStatus.setProgressStatus((Long) list.get(1));
return result; // 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));
@RequestMapping("ReadPPA") // personalProgressStatus.setSortDate((Time) list.get(8));
public boolean ReadPersonPostAbnormal(){ // personalProgressStatus.setQualityTestDate((Time) list.get(9));
ReadExcel obj = new ReadExcel(); // personalProgressStatus.setOutStorageDate((Time) list.get(10));
PersonPostAbnormalEntity personPostAbnormal = new PersonPostAbnormalEntity(); // personalProgressStatus.setHandOutDate((Time) list.get(11));
List<PersonPostAbnormalEntity> entityList= new ArrayList<PersonPostAbnormalEntity>(); // personalProgressStatus.setSignInDate((Time) list.get(12));
File file = new File("E:/北京制证项目/person_post_abnormal.xls"); // entityList.add(personalProgressStatus);
List excelList = obj.readExcel(file); //// for (int j=0;j<list.size();j++){
for (int i = 0; i < excelList.size(); i++){ //// System.out.println();
List list = (List) excelList.get(i); //// }
//跳过空行和第一行 // result = personalProgressStatusService.updatePersonalProgressStatus(entityList);
if (list == null||i==0){ // }
continue; //
} // return result;
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)); // @RequestMapping("ReadPPA")
personPostAbnormal.setOrderState((String) list.get(6)); // public boolean ReadPersonPostAbnormal(){
personPostAbnormal.setApplicantName((String) list.get(7)); // ReadExcel obj = new ReadExcel();
personPostAbnormal.setSenderName((String) list.get(8)); // PersonPostAbnormalEntity personPostAbnormal = new PersonPostAbnormalEntity();
personPostAbnormal.setSenderPhone((String) list.get(9)); // List<PersonPostAbnormalEntity> entityList= new ArrayList<PersonPostAbnormalEntity>();
personPostAbnormal.setSenderAddress((String) list.get(10)); // File file = new File("E:/北京制证项目/person_post_abnormal.xls");
personPostAbnormal.setRecipientName((String) list.get(11)); // List excelList = obj.readExcel(file);
personPostAbnormal.setRecipientPhone((String) list.get(12)); // for (int i = 0; i < excelList.size(); i++){
personPostAbnormal.setRecipientAddress((String) list.get(13)); // List list = (List) excelList.get(i);
personPostAbnormal.setOrderBlankNumber((String) list.get(14)); // //跳过空行和第一行
personPostAbnormal.setGetToProvince((String) list.get(15)); // if (list == null||i==0){
personPostAbnormal.setGetToCity((String) list.get(16)); // continue;
personPostAbnormal.setGetToCounty((String) list.get(17)); // }
personPostAbnormal.setBusinessType((String) list.get(18)); // personPostAbnormal.setBackWaybillNumber((String) list.get(0));
personPostAbnormal.setLatticeMouthInformation((String) list.get(19)); // personPostAbnormal.setOrderNumber((String) list.get(1));
personPostAbnormal.setNatureOfTheInternal((String) list.get(20)); // personPostAbnormal.setCreateDate((Time) list.get(2));
personPostAbnormal.setNatureOfTheInformation((String) list.get(21)); // personPostAbnormal.setOpenid((String) list.get(3));
personPostAbnormal.setFirstWhite((String) list.get(22)); // personPostAbnormal.setWcPlayOrderNumber((String) list.get(4));
personPostAbnormal.setErrCode((String) list.get(23)); // personPostAbnormal.setPlayState((String) list.get(5));
entityList.add(personPostAbnormal); // personPostAbnormal.setOrderState((String) list.get(6));
System.out.println("111111111111111111"+entityList.get(0)); // personPostAbnormal.setApplicantName((String) list.get(7));
} // personPostAbnormal.setSenderName((String) list.get(8));
result = personPostAbnormalService.updatePersonPostAbnormal(entityList); // personPostAbnormal.setSenderPhone((String) list.get(9));
return result; // 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));
@RequestMapping("ReadCDL") // personPostAbnormal.setGetToCity((String) list.get(16));
public boolean ReadCardDetailList(){ // personPostAbnormal.setGetToCounty((String) list.get(17));
ReadExcel obj = new ReadExcel(); // personPostAbnormal.setBusinessType((String) list.get(18));
CardDetailedListEntity cardDetailedList = new CardDetailedListEntity(); // personPostAbnormal.setLatticeMouthInformation((String) list.get(19));
List<CardDetailedListEntity> entityList = new ArrayList<CardDetailedListEntity>(); // personPostAbnormal.setNatureOfTheInternal((String) list.get(20));
File file = new File("E:/北京制证项目/Card_Detail_List.xls"); // personPostAbnormal.setNatureOfTheInformation((String) list.get(21));
List excelList = obj.readExcel(file); // personPostAbnormal.setFirstWhite((String) list.get(22));
for (int i=0;i<excelList.size();i++){ // personPostAbnormal.setErrCode((String) list.get(23));
List list = (List) excelList.get(i); // entityList.add(personPostAbnormal);
//跳过空行和第一行 // System.out.println("111111111111111111"+entityList.get(0));
if (list == null||i==0){ // }
continue; // result = personPostAbnormalService.updatePersonPostAbnormal(entityList);
} // return result;
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); // @RequestMapping("ReadCDL")
} // public boolean ReadCardDetailList(){
result = cardDetailedListService.updateCardDetailedList(entityList); // ReadExcel obj = new ReadExcel();
return result; // 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);
@RequestMapping("ReadPersonPost") // //跳过空行和第一行
public boolean ReadPersonPost(){ // if (list == null||i==0){
ReadExcel obj = new ReadExcel(); // continue;
PersonPostEntity personPost = new PersonPostEntity(); // }
List<PersonPostEntity> entityList = new ArrayList<PersonPostEntity>(); // cardDetailedList.setPolistListId((String) list.get(0));
File file = new File("E:/北京制证项目/Person_Post.xls"); // cardDetailedList.setUploadNo((String) list.get(1));
List excelList = obj.readExcel(file); // cardDetailedList.setNote((String) list.get(2));
for (int i=0;i<excelList.size();i++){ // cardDetailedList.setFileName((String) list.get(3));
List list = (List) excelList.get(i); // cardDetailedList.setPoliceCode((String) list.get(4));
//跳过空行和第一行 // entityList.add(cardDetailedList);
if (list == null||i==0){ // }
continue; // result = cardDetailedListService.updateCardDetailedList(entityList);
} // return result;
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)); // @RequestMapping("ReadPersonPost")
personPost.setOrderState((String) list.get(6)); // public boolean ReadPersonPost(){
personPost.setApplicantName((String) list.get(7)); // ReadExcel obj = new ReadExcel();
personPost.setSenderName((String) list.get(8)); // PersonPostEntity personPost = new PersonPostEntity();
personPost.setSenderPhone((String) list.get(9)); // List<PersonPostEntity> entityList = new ArrayList<PersonPostEntity>();
personPost.setSenderAddress((String) list.get(10)); // File file = new File("E:/北京制证项目/Person_Post.xls");
personPost.setRecipientName((String) list.get(11)); // List excelList = obj.readExcel(file);
personPost.setRecipientPhone((String) list.get(12)); // for (int i=0;i<excelList.size();i++){
personPost.setRecipientAddress((String) list.get(13)); // List list = (List) excelList.get(i);
personPost.setOrderBlankNumber((String) list.get(14)); // //跳过空行和第一行
personPost.setGetToProvince((String) list.get(15)); // if (list == null||i==0){
personPost.setGetToCity((String) list.get(16)); // continue;
personPost.setGetToCounty((String) list.get(17)); // }
personPost.setBusinessType((String) list.get(18)); // personPost.setBackWaybillNumber((String) list.get(0));
personPost.setLatticeMouthInformation((String) list.get(19)); // personPost.setOrderNumber((String) list.get(1));
personPost.setNatureOfTheInternal((String) list.get(20)); // personPost.setCreateDate((Time) list.get(2));
personPost.setLatticeMouthInformation((String) list.get(21)); // personPost.setOpenid((String) list.get(3));
personPost.setFirstWhite((String) list.get(22)); // personPost.setWcPlayOrderNumber((String) list.get(4));
entityList.add(personPost); // personPost.setPlayState((String) list.get(5));
} // personPost.setOrderState((String) list.get(6));
result = personPostService.updatePersonPost(entityList); // personPost.setApplicantName((String) list.get(7));
return result; // 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));
@RequestMapping("ReadTemporaryCertificate") // personPost.setOrderBlankNumber((String) list.get(14));
public boolean ReadTemporaryCertificate(){ // personPost.setGetToProvince((String) list.get(15));
ReadExcel obj = new ReadExcel(); // personPost.setGetToCity((String) list.get(16));
TemporaryCertificateEntity temporaryCertificate = new TemporaryCertificateEntity(); // personPost.setGetToCounty((String) list.get(17));
List<TemporaryCertificateEntity> entityList = new ArrayList<TemporaryCertificateEntity>(); // personPost.setBusinessType((String) list.get(18));
File file = new File("E:/北京制证项目/Temporary_Certificate.xls"); // personPost.setLatticeMouthInformation((String) list.get(19));
List excelList = obj.readExcel(file); // personPost.setNatureOfTheInternal((String) list.get(20));
for (int i=0;i<excelList.size();i++) { // personPost.setLatticeMouthInformation((String) list.get(21));
List list = (List) excelList.get(i); // personPost.setFirstWhite((String) list.get(22));
//跳过空行和第一行 // entityList.add(personPost);
if (list == null||i==0){ // }
continue; // result = personPostService.updatePersonPost(entityList);
} // return result;
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)); // @RequestMapping("ReadTemporaryCertificate")
temporaryCertificate.setBackWorkshopDate((String) list.get(6)); // public boolean ReadTemporaryCertificate(){
temporaryCertificate.setDeliverToParty((String) list.get(7)); // ReadExcel obj = new ReadExcel();
temporaryCertificate.setNote((String) list.get(8)); // TemporaryCertificateEntity temporaryCertificate = new TemporaryCertificateEntity();
entityList.add(temporaryCertificate); // List<TemporaryCertificateEntity> entityList = new ArrayList<TemporaryCertificateEntity>();
} // File file = new File("E:/北京制证项目/Temporary_Certificate.xls");
result = temporaryCertificateService.updateTemporaryCertificate(entityList); // List excelList = obj.readExcel(file);
return result; // for (int i=0;i<excelList.size();i++) {
} // List list = (List) excelList.get(i);
/** // //跳过空行和第一行
* 导入重做证件信息 // if (list == null||i==0){
*/ // continue;
@RequestMapping("ReadRedoRegistration") // }
public boolean ReadRedoRegistration(){ // temporaryCertificate.setName((String) list.get(0));
ReadExcel obj = new ReadExcel(); // temporaryCertificate.setCardId((String) list.get(1));
RedoRegistrationEntity redoRegistration = new RedoRegistrationEntity(); // temporaryCertificate.setPhone((String) list.get(2));
List<RedoRegistrationEntity> entityList = new ArrayList<RedoRegistrationEntity>(); // temporaryCertificate.setLastDurationOfStatus((String) list.get(3));
File file = new File("E:/北京制证项目/Read_Redo_Registration.xls"); // temporaryCertificate.setReceiptDate((String) list.get(4));
List excelList = obj.readExcel(file); // temporaryCertificate.setDateOfHandOverToTreat((String) list.get(5));
for (int i=0;i<excelList.size();i++) { // temporaryCertificate.setBackWorkshopDate((String) list.get(6));
List list = (List) excelList.get(i); // temporaryCertificate.setDeliverToParty((String) list.get(7));
//跳过空行和第一行 // temporaryCertificate.setNote((String) list.get(8));
if (list == null||i==0){ // entityList.add(temporaryCertificate);
continue; // }
} // result = temporaryCertificateService.updateTemporaryCertificate(entityList);
redoRegistration.setRedoRegistrationId((String) list.get(0)); // return result;
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)); // @RequestMapping("ReadRedoRegistration")
redoRegistration.setRedoReason((String) list.get(6)); // public boolean ReadRedoRegistration(){
redoRegistration.setCallDate((String) list.get(7)); // ReadExcel obj = new ReadExcel();
redoRegistration.setBackDate((String) list.get(8)); // RedoRegistrationEntity redoRegistration = new RedoRegistrationEntity();
redoRegistration.setNote((String) list.get(9)); // List<RedoRegistrationEntity> entityList = new ArrayList<RedoRegistrationEntity>();
entityList.add(redoRegistration); // File file = new File("E:/北京制证项目/Read_Redo_Registration.xls");
} // List excelList = obj.readExcel(file);
result=redoRegistrationService.updateRedoRegistration(entityList); // for (int i=0;i<excelList.size();i++) {
return result; // 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