Commit 513d0686 authored by dahai's avatar dahai

更新交接单 交接单详单实体

parent b0320bbe
......@@ -29,10 +29,7 @@ import javax.ws.rs.core.MediaType;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.*;
@RestController
@RequestMapping("importXML")
......@@ -77,39 +74,44 @@ public class ReadXmlApi {
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) requ;
Iterator<String> iter = multiRequest.getFileNames();
while (iter.hasNext()) {
MultipartFile item = multiRequest.getFile(iter.next());
try {
// 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件
// 得到上传的文件名称
filename = item.getName();
if (filename == null || filename.trim().equals("")) {
List<MultipartFile> fileRows = multiRequest.getFiles(iter.next().toString());
for (MultipartFile item: fileRows) {
try {
// 如果fileitem中封装的是普通输入项的数据
// 如果fileitem中封装的是上传文件
// 得到上传的文件名称
filename = item.getName();
System.out.println(filename+"===============");
if (filename == null || filename.trim().equals("")) {
continue;
}
InputStream in = item.getInputStream();
String str = YXStringUtils.inputStream2String(in, "utf-8");
in.close();
IDCardFactory idCardFactory = new IDCardFactory();
idcardsFactory(idCardFactory.extractIDCard(str));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
yxresp.outPutError("UnsupportedEncodingException", "上传文件时发现文件编码错误:" + e.getMessage());
continue;
} catch (IOException e) {
e.printStackTrace();
yxresp.outPutError("IOException", "上传文件时发生IO错误:" + e.getMessage());
continue;
} catch (DocumentException e) {
e.printStackTrace();
yxresp.outPutError("DocumentException", "上传文件时发生IO错误:" + e.getMessage());
continue;
} catch (Exception e) {
e.printStackTrace();
yxresp.outPutError("Exception", "上传文件时发生错误,非法XML文件:" + filename);
continue;
}
InputStream in = item.getInputStream();
String str = YXStringUtils.inputStream2String(in, "utf-8");
in.close();
IDCardFactory idCardFactory = new IDCardFactory();
idcardsFactory(idCardFactory.extractIDCard(str));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
yxresp.outPutError("UnsupportedEncodingException", "上传文件时发现文件编码错误:" + e.getMessage());
continue;
} catch (IOException e) {
e.printStackTrace();
yxresp.outPutError("IOException", "上传文件时发生IO错误:" + e.getMessage());
continue;
} catch (DocumentException e) {
e.printStackTrace();
yxresp.outPutError("DocumentException", "上传文件时发生IO错误:" + e.getMessage());
continue;
} catch (Exception e) {
e.printStackTrace();
yxresp.outPutError("Exception", "上传文件时发生错误,非法XML文件:" + filename);
continue;
}
}
}
}
// item
} catch (Exception e) {
e.printStackTrace();
yxresp.outPutError("FileUploadException", "文件上传发生异常:" + e.getMessage());
......
package com.yxproject.start.entity;
import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/3/9 14:53
* 2019/3/10 14:52
*/
@Entity
@Table(name = "DETAIL_RECEIPT_LIST", schema = "YINGXIN", catalog = "")
......@@ -17,8 +16,6 @@ public class DetailReceiptListEntity {
private String name;
private String policeCode;
private String cardId;
private Time printUninstallMark;
private Time eQualityMark;
private String note;
private String signGovt;
......@@ -82,26 +79,6 @@ public class DetailReceiptListEntity {
this.cardId = cardId;
}
@Basic
@Column(name = "PRINT_UNINSTALL_MARK")
public Time getPrintUninstallMark() {
return printUninstallMark;
}
public void setPrintUninstallMark(Time printUninstallMark) {
this.printUninstallMark = printUninstallMark;
}
@Basic
@Column(name = "E_QUALITY_MARK")
public Time geteQualityMark() {
return eQualityMark;
}
public void seteQualityMark(Time eQualityMark) {
this.eQualityMark = eQualityMark;
}
@Basic
@Column(name = "NOTE")
public String getNote() {
......@@ -133,14 +110,12 @@ public class DetailReceiptListEntity {
Objects.equals(name, that.name) &&
Objects.equals(policeCode, that.policeCode) &&
Objects.equals(cardId, that.cardId) &&
Objects.equals(printUninstallMark, that.printUninstallMark) &&
Objects.equals(eQualityMark, that.eQualityMark) &&
Objects.equals(note, that.note) &&
Objects.equals(signGovt, that.signGovt);
}
@Override
public int hashCode() {
return Objects.hash(id, uploadNo, acceptNo, name, policeCode, cardId, printUninstallMark, eQualityMark, note, signGovt);
return Objects.hash(id, uploadNo, acceptNo, name, policeCode, cardId, note, signGovt);
}
}
......@@ -4,17 +4,21 @@ import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/3/10 14:52
*/
@Entity
@Table(name = "RECEIPT_LIST", schema = "YINGXIN", catalog = "")
public class ReceiptListEntity {
private long id;
private Long taskId;
private Time saveDate;
private String qrCode;
private Time receiptDate;
private String policeCode;
private Long finishCount;
private Long inStorageCount;
private Long outStorageCount;
private String note;
private Time checkDate;
private String checkName;
private Long state;
@Id
@Column(name = "ID")
......@@ -27,23 +31,23 @@ public class ReceiptListEntity {
}
@Basic
@Column(name = "TASK_ID")
public Long getTaskId() {
return taskId;
@Column(name = "QR_CODE")
public String getQrCode() {
return qrCode;
}
public void setTaskId(Long taskId) {
this.taskId = taskId;
public void setQrCode(String qrCode) {
this.qrCode = qrCode;
}
@Basic
@Column(name = "SAVE_DATE")
public Time getSaveDate() {
return saveDate;
@Column(name = "RECEIPT_DATE")
public Time getReceiptDate() {
return receiptDate;
}
public void setSaveDate(Time saveDate) {
this.saveDate = saveDate;
public void setReceiptDate(Time receiptDate) {
this.receiptDate = receiptDate;
}
@Basic
......@@ -67,33 +71,33 @@ public class ReceiptListEntity {
}
@Basic
@Column(name = "IN_STORAGE_COUNT")
public Long getInStorageCount() {
return inStorageCount;
@Column(name = "CHECK_DATE")
public Time getCheckDate() {
return checkDate;
}
public void setInStorageCount(Long inStorageCount) {
this.inStorageCount = inStorageCount;
public void setCheckDate(Time checkDate) {
this.checkDate = checkDate;
}
@Basic
@Column(name = "OUT_STORAGE_COUNT")
public Long getOutStorageCount() {
return outStorageCount;
@Column(name = "CHECK_NAME")
public String getCheckName() {
return checkName;
}
public void setOutStorageCount(Long outStorageCount) {
this.outStorageCount = outStorageCount;
public void setCheckName(String checkName) {
this.checkName = checkName;
}
@Basic
@Column(name = "NOTE")
public String getNote() {
return note;
@Column(name = "STATE")
public Long getState() {
return state;
}
public void setNote(String note) {
this.note = note;
public void setState(Long state) {
this.state = state;
}
@Override
......@@ -102,17 +106,17 @@ public class ReceiptListEntity {
if (o == null || getClass() != o.getClass()) return false;
ReceiptListEntity that = (ReceiptListEntity) o;
return id == that.id &&
Objects.equals(taskId, that.taskId) &&
Objects.equals(saveDate, that.saveDate) &&
Objects.equals(qrCode, that.qrCode) &&
Objects.equals(receiptDate, that.receiptDate) &&
Objects.equals(policeCode, that.policeCode) &&
Objects.equals(finishCount, that.finishCount) &&
Objects.equals(inStorageCount, that.inStorageCount) &&
Objects.equals(outStorageCount, that.outStorageCount) &&
Objects.equals(note, that.note);
Objects.equals(checkDate, that.checkDate) &&
Objects.equals(checkName, that.checkName) &&
Objects.equals(state, that.state);
}
@Override
public int hashCode() {
return Objects.hash(id, taskId, saveDate, policeCode, finishCount, inStorageCount, outStorageCount, note);
return Objects.hash(id, qrCode, receiptDate, policeCode, finishCount, checkDate, checkName, state);
}
}
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