|
@@ -182,9 +182,9 @@ public class ObjectToDocumentUtils {
|
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseOrderSimpleInfo.DATE_FIELD),
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseOrderSimpleInfo.DATE_FIELD),
|
|
|
purchaseOrder.getDate().getTime(), Store.YES));
|
|
purchaseOrder.getDate().getTime(), Store.YES));
|
|
|
// enterprise、vend和orderItems以json的格式存储
|
|
// enterprise、vend和orderItems以json的格式存储
|
|
|
- document.add(
|
|
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseOrderSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purchaseOrder.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseOrderSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purchaseOrder.getEnterprise()), Store.YES));
|
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseOrderSimpleInfo.VEND_FIELD),
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseOrderSimpleInfo.VEND_FIELD),
|
|
|
JSONObject.toJSONString(purchaseOrder.getVend()), Store.YES));
|
|
JSONObject.toJSONString(purchaseOrder.getVend()), Store.YES));
|
|
|
if (!CollectionUtils.isEmpty(purchaseOrder.getOrderItems())) {
|
|
if (!CollectionUtils.isEmpty(purchaseOrder.getOrderItems())) {
|
|
@@ -241,8 +241,9 @@ public class ObjectToDocumentUtils {
|
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.DATE_FIELD),
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.DATE_FIELD),
|
|
|
makeOrder.getDate().getTime(), Store.YES));
|
|
makeOrder.getDate().getTime(), Store.YES));
|
|
|
// enterprise、vend和orderItems以json的格式存储
|
|
// enterprise、vend和orderItems以json的格式存储
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(makeOrder.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ document.add(
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(makeOrder.getEnterprise()), Store.YES));
|
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.VEND_FIELD),
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.VEND_FIELD),
|
|
|
JSONObject.toJSONString(makeOrder.getVend()), Store.YES));
|
|
JSONObject.toJSONString(makeOrder.getVend()), Store.YES));
|
|
|
if (makeOrder.getProduct() != null) {
|
|
if (makeOrder.getProduct() != null) {
|
|
@@ -292,11 +293,12 @@ public class ObjectToDocumentUtils {
|
|
|
purcAccept.getDate().getTime(), Store.YES));
|
|
purcAccept.getDate().getTime(), Store.YES));
|
|
|
}
|
|
}
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseAcceptSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purcAccept.getVend()), Store.YES));
|
|
|
|
|
document.add(
|
|
document.add(
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseAcceptSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purcAccept.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseAcceptSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purcAccept.getVend()), Store.YES));
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseAcceptSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purcAccept.getEnterprise()), Store.YES));
|
|
|
if (!CollectionUtils.isEmpty(purcAccept.getAcceptItems())) {
|
|
if (!CollectionUtils.isEmpty(purcAccept.getAcceptItems())) {
|
|
|
document.add(
|
|
document.add(
|
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseAcceptSimpleInfo.ITEMS_FIELD),
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseAcceptSimpleInfo.ITEMS_FIELD),
|
|
@@ -345,9 +347,9 @@ public class ObjectToDocumentUtils {
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, SaleQuotationSimpleInfo.VEND_FIELD),
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, SaleQuotationSimpleInfo.VEND_FIELD),
|
|
|
JSONObject.toJSONString(saleQuotation.getVend()), Store.YES));
|
|
JSONObject.toJSONString(saleQuotation.getVend()), Store.YES));
|
|
|
- document.add(
|
|
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, SaleQuotationSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(saleQuotation.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, SaleQuotationSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(saleQuotation.getEnterprise()), Store.YES));
|
|
|
if (!CollectionUtils.isEmpty(saleQuotation.getSaleQuotationItems())) {
|
|
if (!CollectionUtils.isEmpty(saleQuotation.getSaleQuotationItems())) {
|
|
|
document.add(
|
|
document.add(
|
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, SaleQuotationSimpleInfo.ITEMS_FIELD),
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, SaleQuotationSimpleInfo.ITEMS_FIELD),
|
|
@@ -386,11 +388,12 @@ public class ObjectToDocumentUtils {
|
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.DATE_FIELD),
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.DATE_FIELD),
|
|
|
purchapbill.getDate().getTime(), Store.YES));
|
|
purchapbill.getDate().getTime(), Store.YES));
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purchapbill.getVend()), Store.YES));
|
|
|
|
|
document.add(
|
|
document.add(
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purchapbill.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purchapbill.getVend()), Store.YES));
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purchapbill.getEnterprise()), Store.YES));
|
|
|
if (!CollectionUtils.isEmpty(purchapbill.getItems())) {
|
|
if (!CollectionUtils.isEmpty(purchapbill.getItems())) {
|
|
|
document.add(
|
|
document.add(
|
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.ITEMS_FIELD),
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.ITEMS_FIELD),
|
|
@@ -442,9 +445,9 @@ public class ObjectToDocumentUtils {
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadinSimpleInfo.VEND_FIELD),
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadinSimpleInfo.VEND_FIELD),
|
|
|
JSONObject.toJSONString(purchBadin.getVend()), Store.YES));
|
|
JSONObject.toJSONString(purchBadin.getVend()), Store.YES));
|
|
|
- document.add(
|
|
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadinSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purchBadin.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseBadinSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purchBadin.getEnterprise()), Store.YES));
|
|
|
if (!CollectionUtils.isEmpty(purchBadin.getBadInItems())) {
|
|
if (!CollectionUtils.isEmpty(purchBadin.getBadInItems())) {
|
|
|
document.add(
|
|
document.add(
|
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadinSimpleInfo.ITEMS_FIELD),
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadinSimpleInfo.ITEMS_FIELD),
|
|
@@ -494,11 +497,12 @@ public class ObjectToDocumentUtils {
|
|
|
String.valueOf(purchaseBadout.getSendCode()), Store.YES));
|
|
String.valueOf(purchaseBadout.getSendCode()), Store.YES));
|
|
|
}
|
|
}
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadoutSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purchaseBadout.getVend()), Store.YES));
|
|
|
|
|
document.add(
|
|
document.add(
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadoutSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purchaseBadout.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadoutSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purchaseBadout.getVend()), Store.YES));
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseBadoutSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purchaseBadout.getEnterprise()), Store.YES));
|
|
|
if (!CollectionUtils.isEmpty(purchaseBadout.getBadOutItems())) {
|
|
if (!CollectionUtils.isEmpty(purchaseBadout.getBadOutItems())) {
|
|
|
document.add(
|
|
document.add(
|
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadoutSimpleInfo.ITEMS_FIELD),
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadoutSimpleInfo.ITEMS_FIELD),
|
|
@@ -561,8 +565,6 @@ public class ObjectToDocumentUtils {
|
|
|
return document;
|
|
return document;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* PurchaseMrbSimpleInfo对象转为Document
|
|
* PurchaseMrbSimpleInfo对象转为Document
|
|
|
*
|
|
*
|
|
@@ -645,8 +647,9 @@ public class ObjectToDocumentUtils {
|
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.DATE_FIELD),
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.DATE_FIELD),
|
|
|
purcChanges.getDate().getTime(), Store.YES));
|
|
purcChanges.getDate().getTime(), Store.YES));
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purcChanges.getVend()), Store.YES));
|
|
|
|
|
|
|
+ document.add(
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purcChanges.getVend()), Store.YES));
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.ENTERPRISE_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.ENTERPRISE_FIELD),
|
|
|
JSONObject.toJSONString(purcChanges.getEnterprise()), Store.YES));
|
|
JSONObject.toJSONString(purcChanges.getEnterprise()), Store.YES));
|
|
@@ -688,9 +691,9 @@ public class ObjectToDocumentUtils {
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseProofingItemSimpleInfo.STATUS_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseProofingItemSimpleInfo.STATUS_FIELD),
|
|
|
String.valueOf(purcProofingItem.getStatus()), Store.YES));
|
|
String.valueOf(purcProofingItem.getStatus()), Store.YES));
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
- document.add(
|
|
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingItemSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purcProofingItem.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseProofingItemSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purcProofingItem.getEnterprise()), Store.YES));
|
|
|
if (purcProofingItem.getProofing() != null) {
|
|
if (purcProofingItem.getProofing() != null) {
|
|
|
document.add(new TextField(
|
|
document.add(new TextField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseProofingItemSimpleInfo.PROOFING_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseProofingItemSimpleInfo.PROOFING_FIELD),
|
|
@@ -736,11 +739,12 @@ public class ObjectToDocumentUtils {
|
|
|
purcReturn.getDate().getTime(), Store.YES));
|
|
purcReturn.getDate().getTime(), Store.YES));
|
|
|
}
|
|
}
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purcReturn.getVend()), Store.YES));
|
|
|
|
|
document.add(
|
|
document.add(
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(purcReturn.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purcReturn.getVend()), Store.YES));
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(purcReturn.getEnterprise()), Store.YES));
|
|
|
if (!CollectionUtils.isEmpty(purcReturn.getReturnItems())) {
|
|
if (!CollectionUtils.isEmpty(purcReturn.getReturnItems())) {
|
|
|
document.add(
|
|
document.add(
|
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.ITEMS_FIELD),
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.ITEMS_FIELD),
|
|
@@ -827,9 +831,9 @@ public class ObjectToDocumentUtils {
|
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, MakeOrderChangeItemSimpleInfo.CODE_FIELD),
|
|
new TextField(ClassAndTableNameUtils.combineField(tableName, MakeOrderChangeItemSimpleInfo.CODE_FIELD),
|
|
|
String.valueOf(makeChangeItems.getOrderCode()), Store.YES));
|
|
String.valueOf(makeChangeItems.getOrderCode()), Store.YES));
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
- document.add(
|
|
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderChangeItemSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(makeChangeItems.getVend()), Store.YES));
|
|
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, MakeOrderChangeItemSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(makeChangeItems.getVend()), Store.YES));
|
|
|
if (!StringUtils.isEmpty(makeChangeItems.getProduct())) {
|
|
if (!StringUtils.isEmpty(makeChangeItems.getProduct())) {
|
|
|
document.add(new TextField(
|
|
document.add(new TextField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, MakeOrderChangeItemSimpleInfo.PRODUCT_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, MakeOrderChangeItemSimpleInfo.PRODUCT_FIELD),
|
|
@@ -927,8 +931,9 @@ public class ObjectToDocumentUtils {
|
|
|
// vend和items以json的格式存储
|
|
// vend和items以json的格式存储
|
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, SaleSendSimpleInfo.VEND_FIELD),
|
|
document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, SaleSendSimpleInfo.VEND_FIELD),
|
|
|
JSONObject.toJSONString(saleSend.getVend()), Store.YES));
|
|
JSONObject.toJSONString(saleSend.getVend()), Store.YES));
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, SaleSendSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSONObject.toJSONString(saleSend.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ document.add(
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, SaleSendSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSONObject.toJSONString(saleSend.getEnterprise()), Store.YES));
|
|
|
if (!CollectionUtils.isEmpty(saleSend.getSendItems())) {
|
|
if (!CollectionUtils.isEmpty(saleSend.getSendItems())) {
|
|
|
document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, SaleSendSimpleInfo.ITEMS_FIELD),
|
|
document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, SaleSendSimpleInfo.ITEMS_FIELD),
|
|
|
JSONObject.toJSONString(saleSend.getSendItems()), Store.YES));
|
|
JSONObject.toJSONString(saleSend.getSendItems()), Store.YES));
|
|
@@ -967,11 +972,12 @@ public class ObjectToDocumentUtils {
|
|
|
String.valueOf(purcNotice.getId()), Store.YES));
|
|
String.valueOf(purcNotice.getId()), Store.YES));
|
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.DATE_FIELD),
|
|
document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.DATE_FIELD),
|
|
|
purcNotice.getDate().getTime(), Store.YES));
|
|
purcNotice.getDate().getTime(), Store.YES));
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSON.toJSONString(purcNotice.getVend()), Store.YES));
|
|
|
|
|
document.add(
|
|
document.add(
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
- JSON.toJSONString(purcNotice.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSON.toJSONString(purcNotice.getVend()), Store.YES));
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ENTERPRISE_FIELD),
|
|
|
|
|
+ JSON.toJSONString(purcNotice.getEnterprise()), Store.YES));
|
|
|
document.add(
|
|
document.add(
|
|
|
new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.STATUS_FIELD),
|
|
new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.STATUS_FIELD),
|
|
|
String.valueOf(purcNotice.getStatus()), Store.YES));
|
|
String.valueOf(purcNotice.getStatus()), Store.YES));
|
|
@@ -1059,9 +1065,9 @@ public class ObjectToDocumentUtils {
|
|
|
purcProofingapproval.getSscode(), Store.YES));
|
|
purcProofingapproval.getSscode(), Store.YES));
|
|
|
}
|
|
}
|
|
|
// vend和orderItems以json的格式存储
|
|
// vend和orderItems以json的格式存储
|
|
|
- document.add(
|
|
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurcProofingapprovalSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSON.toJSONString(purcProofingapproval.getVend().getEnName()), Store.YES));
|
|
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurcProofingapprovalSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSON.toJSONString(purcProofingapproval.getVend().getEnName()), Store.YES));
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurcProofingapprovalSimpleInfo.ENTERPRISE_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurcProofingapprovalSimpleInfo.ENTERPRISE_FIELD),
|
|
|
JSON.toJSONString(purcProofingapproval.getEnterprise().getEnName()), Store.YES));
|
|
JSON.toJSONString(purcProofingapproval.getEnterprise().getEnName()), Store.YES));
|
|
@@ -1164,8 +1170,9 @@ public class ObjectToDocumentUtils {
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseApCheckSimpleInfo.ENTERPRISE_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseApCheckSimpleInfo.ENTERPRISE_FIELD),
|
|
|
JSON.toJSONString(purcApcheck.getEnterprise()), Store.YES));
|
|
JSON.toJSONString(purcApcheck.getEnterprise()), Store.YES));
|
|
|
- document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseApCheckSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSON.toJSONString(purcApcheck.getVendor()), Store.YES));
|
|
|
|
|
|
|
+ document.add(
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseApCheckSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSON.toJSONString(purcApcheck.getVendor()), Store.YES));
|
|
|
// vend和orderItems以json的格式存储
|
|
// vend和orderItems以json的格式存储
|
|
|
if (purcApcheck.getItems() != null) {
|
|
if (purcApcheck.getItems() != null) {
|
|
|
document.add(
|
|
document.add(
|
|
@@ -1263,9 +1270,9 @@ public class ObjectToDocumentUtils {
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryItemSimpleInfo.OVERDUE_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryItemSimpleInfo.OVERDUE_FIELD),
|
|
|
String.valueOf(inquiryItem.getOverdue()), Store.YES));
|
|
String.valueOf(inquiryItem.getOverdue()), Store.YES));
|
|
|
}
|
|
}
|
|
|
- document.add(
|
|
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryItemSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSON.toJSONString(inquiryItem.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryItemSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSON.toJSONString(inquiryItem.getEnterprise()), Store.YES));
|
|
|
if (inquiryItem.getInquiry() != null) {
|
|
if (inquiryItem.getInquiry() != null) {
|
|
|
document.add(new TextField(
|
|
document.add(new TextField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryItemSimpleInfo.INQUIRY_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryItemSimpleInfo.INQUIRY_FIELD),
|
|
@@ -1342,12 +1349,12 @@ public class ObjectToDocumentUtils {
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryMouldSimpleInfo.VALID_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryMouldSimpleInfo.VALID_FIELD),
|
|
|
String.valueOf(inquiryMould.getValid()), Store.YES));
|
|
String.valueOf(inquiryMould.getValid()), Store.YES));
|
|
|
}
|
|
}
|
|
|
- document.add(
|
|
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryMouldSimpleInfo.VEND_FIELD),
|
|
|
|
|
- JSON.toJSONString(inquiryMould.getVend()), Store.YES));
|
|
|
|
|
|
|
+ document.add(new StringField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryMouldSimpleInfo.VEND_FIELD),
|
|
|
|
|
+ JSON.toJSONString(inquiryMould.getVend()), Store.YES));
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryMouldSimpleInfo.ENTERPRISE_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryMouldSimpleInfo.ENTERPRISE_FIELD),
|
|
|
- JSON.toJSONString(inquiryMould.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ JSON.toJSONString(inquiryMould.getEnterprise()), Store.YES));
|
|
|
if (inquiryMould.getMouldItems() != null) {
|
|
if (inquiryMould.getMouldItems() != null) {
|
|
|
document.add(new TextField(
|
|
document.add(new TextField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryMouldSimpleInfo.ITEMS_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseInquiryMouldSimpleInfo.ITEMS_FIELD),
|
|
@@ -1422,8 +1429,9 @@ public class ObjectToDocumentUtils {
|
|
|
enterprise.getEnName(), Store.YES));
|
|
enterprise.getEnName(), Store.YES));
|
|
|
if (null != enterprise.getEnShortname()) {
|
|
if (null != enterprise.getEnShortname()) {
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
- ClassAndTableNameUtils.combineField(tableName, EnterpriseSearchSimpleInfo.SHORTNAME_FIELD),
|
|
|
|
|
- enterprise.getEnShortname(), Store.YES));}
|
|
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, EnterpriseSearchSimpleInfo.SHORTNAME_FIELD),
|
|
|
|
|
+ enterprise.getEnShortname(), Store.YES));
|
|
|
|
|
+ }
|
|
|
if (null != enterprise.getEnAdminuu()) {
|
|
if (null != enterprise.getEnAdminuu()) {
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, EnterpriseSearchSimpleInfo.ADMINUU_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, EnterpriseSearchSimpleInfo.ADMINUU_FIELD),
|
|
@@ -1530,8 +1538,7 @@ public class ObjectToDocumentUtils {
|
|
|
enterprise.getEnuu()));
|
|
enterprise.getEnuu()));
|
|
|
return document;
|
|
return document;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
public static Document toDocument(ProductComponentSimpleInfo prodComp) {
|
|
public static Document toDocument(ProductComponentSimpleInfo prodComp) {
|
|
|
if (prodComp == null || prodComp.getId() == null) {
|
|
if (prodComp == null || prodComp.getId() == null) {
|
|
|
return null;
|
|
return null;
|
|
@@ -1641,7 +1648,7 @@ public class ObjectToDocumentUtils {
|
|
|
ClassAndTableNameUtils.combineField(tableName, DeputyOrderSimpleInfo.ID_FIELD), depOrder.getId()));
|
|
ClassAndTableNameUtils.combineField(tableName, DeputyOrderSimpleInfo.ID_FIELD), depOrder.getId()));
|
|
|
return document;
|
|
return document;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 将PurcahseTenderSimplInfo转换为Document
|
|
* 将PurcahseTenderSimplInfo转换为Document
|
|
|
*
|
|
*
|
|
@@ -1649,36 +1656,35 @@ public class ObjectToDocumentUtils {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public static Document toDocument(PurchaseTenderSimpleInfo tender) {
|
|
public static Document toDocument(PurchaseTenderSimpleInfo tender) {
|
|
|
- if (tender == null || tender.getId() == null || tender.getCode() == null ||tender.getProdCode() == null
|
|
|
|
|
- || tender.getProdTitle() == null || tender.getStatus() == null || tender.getIfOpen() == null || tender.getIsPublish() == null) {
|
|
|
|
|
|
|
+ if (tender == null || tender.getId() == null || tender.getCode() == null || tender.getProdCode() == null
|
|
|
|
|
+ || tender.getProdTitle() == null || tender.getStatus() == null || tender.getIfOpen() == null
|
|
|
|
|
+ || tender.getIsPublish() == null) {
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|
|
|
Table_name tableName = ClassAndTableNameUtils.toTableName(PurchaseTenderSimpleInfo.class);
|
|
Table_name tableName = ClassAndTableNameUtils.toTableName(PurchaseTenderSimpleInfo.class);
|
|
|
Document document = new Document();
|
|
Document document = new Document();
|
|
|
// 不能用LongField,否则后续实时更新索引时,方法updateDocument(new Term("", ""),
|
|
// 不能用LongField,否则后续实时更新索引时,方法updateDocument(new Term("", ""),
|
|
|
// doc)无法根据id进行更新
|
|
// doc)无法根据id进行更新
|
|
|
|
|
+ document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ID_FIELD),
|
|
|
|
|
+ String.valueOf(tender.getId()), Store.YES));
|
|
|
|
|
+ document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.CODE_FIELD),
|
|
|
|
|
+ tender.getCode(), Store.YES));
|
|
|
document.add(
|
|
document.add(
|
|
|
- new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ID_FIELD),
|
|
|
|
|
- String.valueOf(tender.getId()), Store.YES));
|
|
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.CURRENCY_FIELD),
|
|
|
|
|
+ tender.getCurrency(), Store.YES));
|
|
|
document.add(
|
|
document.add(
|
|
|
- new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.CODE_FIELD),
|
|
|
|
|
- tender.getCode(), Store.YES));
|
|
|
|
|
- document.add(new StringField(
|
|
|
|
|
- ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.CURRENCY_FIELD),
|
|
|
|
|
- tender.getCurrency(), Store.YES));
|
|
|
|
|
- document.add(new StringField(
|
|
|
|
|
- ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.STATUS_FIELD),
|
|
|
|
|
- tender.getStatus(), Store.YES));
|
|
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.STATUS_FIELD),
|
|
|
|
|
+ tender.getStatus(), Store.YES));
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ISPUBLISH_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ISPUBLISH_FIELD),
|
|
|
String.valueOf(tender.getIsPublish()), Store.YES));
|
|
String.valueOf(tender.getIsPublish()), Store.YES));
|
|
|
- document.add(new StringField(
|
|
|
|
|
- ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.IFOPEN_FIELD),
|
|
|
|
|
- String.valueOf(tender.getIfOpen()), Store.YES));
|
|
|
|
|
|
|
+ document.add(
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.IFOPEN_FIELD),
|
|
|
|
|
+ String.valueOf(tender.getIfOpen()), Store.YES));
|
|
|
if (null != tender.getDate()) {
|
|
if (null != tender.getDate()) {
|
|
|
- document.add(new LongField(
|
|
|
|
|
- ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.DATE_FIELD),
|
|
|
|
|
- Long.valueOf(tender.getDate().getTime()), Store.YES));
|
|
|
|
|
|
|
+ document.add(
|
|
|
|
|
+ new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.DATE_FIELD),
|
|
|
|
|
+ Long.valueOf(tender.getDate().getTime()), Store.YES));
|
|
|
}
|
|
}
|
|
|
if (null != tender.getEndDate()) {
|
|
if (null != tender.getEndDate()) {
|
|
|
document.add(new LongField(
|
|
document.add(new LongField(
|
|
@@ -1696,9 +1702,9 @@ public class ObjectToDocumentUtils {
|
|
|
String.valueOf(tender.getCertificate()), Store.YES));
|
|
String.valueOf(tender.getCertificate()), Store.YES));
|
|
|
}
|
|
}
|
|
|
if (null != tender.getUser()) {
|
|
if (null != tender.getUser()) {
|
|
|
- document.add(new StringField(
|
|
|
|
|
- ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.USER_FIELD),
|
|
|
|
|
- tender.getUser(), Store.YES));
|
|
|
|
|
|
|
+ document.add(
|
|
|
|
|
+ new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.USER_FIELD),
|
|
|
|
|
+ tender.getUser(), Store.YES));
|
|
|
}
|
|
}
|
|
|
if (null != tender.getUserTel()) {
|
|
if (null != tender.getUserTel()) {
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
@@ -1726,13 +1732,13 @@ public class ObjectToDocumentUtils {
|
|
|
tender.getShipAddress(), Store.YES));
|
|
tender.getShipAddress(), Store.YES));
|
|
|
}
|
|
}
|
|
|
if (null != tender.getPayment()) {
|
|
if (null != tender.getPayment()) {
|
|
|
- document.add(
|
|
|
|
|
- new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.PAYMENT_FIELD),
|
|
|
|
|
- tender.getPayment(), Store.YES));
|
|
|
|
|
|
|
+ document.add(new TextField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.PAYMENT_FIELD),
|
|
|
|
|
+ tender.getPayment(), Store.YES));
|
|
|
}
|
|
}
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ENTERPRISE_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ENTERPRISE_FIELD),
|
|
|
- JSON.toJSONString(tender.getEnterprise()), Store.YES));
|
|
|
|
|
|
|
+ JSON.toJSONString(tender.getEnterprise()), Store.YES));
|
|
|
if (tender.getTenderItems() != null) {
|
|
if (tender.getTenderItems() != null) {
|
|
|
document.add(new StringField(
|
|
document.add(new StringField(
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ITEMS_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ITEMS_FIELD),
|
|
@@ -1748,11 +1754,10 @@ public class ObjectToDocumentUtils {
|
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.RESULT_FIELD),
|
|
ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.RESULT_FIELD),
|
|
|
String.valueOf(tender.getResult()), Store.YES));
|
|
String.valueOf(tender.getResult()), Store.YES));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 排序字段
|
|
// 排序字段
|
|
|
document.add(new NumericDocValuesField(
|
|
document.add(new NumericDocValuesField(
|
|
|
- ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ID_FIELD),
|
|
|
|
|
- tender.getId()));
|
|
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PurchaseTenderSimpleInfo.ID_FIELD), tender.getId()));
|
|
|
return document;
|
|
return document;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1814,6 +1819,11 @@ public class ObjectToDocumentUtils {
|
|
|
JSONObject.toJSONString(pagingReleaseDetail.getPagingRelease()), Store.YES));
|
|
JSONObject.toJSONString(pagingReleaseDetail.getPagingRelease()), Store.YES));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 排序字段
|
|
|
|
|
+ document.add(new NumericDocValuesField(
|
|
|
|
|
+ ClassAndTableNameUtils.combineField(tableName, PagingReleaseDetailSimpleInfo.ID_FIELD),
|
|
|
|
|
+ pagingReleaseDetail.getId()));
|
|
|
|
|
+
|
|
|
return document;
|
|
return document;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|