فهرست منبع

【商务平台】 采购变更单搜索null值bug修复

hejq 9 سال پیش
والد
کامیت
aa4180882d

+ 4 - 3
search-console-b2b/src/main/java/com/uas/search/console/b2b/util/DocumentToObjectUtils.java

@@ -244,7 +244,8 @@ public class DocumentToObjectUtils {
 		PurcProofingsendSimpleInfo purcProofingsend = new PurcProofingsendSimpleInfo();
 		purcProofingsend.setId(Long.valueOf(
 				document.get(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.ID_FIELD))));
-		purcProofingsend.setBrand(document.get(PurcProofingsendSimpleInfo.BRAND_FIELD));
+		purcProofingsend.setBrand(
+				document.get(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.BRAND_FIELD)));
 		purcProofingsend.setDate(new Date(Long.valueOf(
 				document.get(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.DATE_FIELD)))));
 		purcProofingsend.setProofingItem(JSONObject.parseObject(
@@ -520,13 +521,13 @@ public class DocumentToObjectUtils {
 		Table_name tableName = ClassAndTableNameUtils.toTableName(PurchaseChangesSimpleInfo.class);
 		PurchaseChangesSimpleInfo purcChanges = new PurchaseChangesSimpleInfo();
 		purcChanges.setId(Long.valueOf(
-				ClassAndTableNameUtils.combineField(tableName, document.get(PurchaseChangesSimpleInfo.ID_FIELD))));
+				document.get(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.ID_FIELD))));
 		purcChanges.setCode(
 				document.get(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.CODE_FIELD)));
 		purcChanges.setOrderCode(document
 				.get(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.ORDERCODE_FIELD)));
 		purcChanges.setStatus(Short.valueOf(
-				ClassAndTableNameUtils.combineField(tableName, document.get(PurchaseChangesSimpleInfo.STATUS_FIELD))));
+				document.get(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.STATUS_FIELD))));
 		purcChanges.setDate(new Date(Long.valueOf(
 				document.get(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.DATE_FIELD)))));
 		purcChanges.setEnterprise(JSONObject.parseObject(

+ 85 - 81
search-console-b2b/src/main/java/com/uas/search/console/b2b/util/ObjectToDocumentUtils.java

@@ -198,23 +198,19 @@ public class ObjectToDocumentUtils {
 				makeOrder.getCode(), Store.YES));
 		// TODO 暂时将未结案的设为0,以后在数据源头进行处理
 		if (makeOrder.getEnd() != null) {
-			document.add(
-					new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.END_FIELD),
-							String.valueOf(makeOrder.getEnd()), Store.YES));
+			document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.END_FIELD),
+					String.valueOf(makeOrder.getEnd()), Store.YES));
 		} else {
-			document.add(
-					new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.END_FIELD),
-							String.valueOf(0), Store.YES));
+			document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.END_FIELD),
+					String.valueOf(0), Store.YES));
 		}
-		document.add(
-				new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.STATUS_FIELD),
-						String.valueOf(makeOrder.getStatus()), Store.YES));
+		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.STATUS_FIELD),
+				String.valueOf(makeOrder.getStatus()), Store.YES));
 		document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.DATE_FIELD),
 				makeOrder.getDate().getTime(), Store.YES));
 		// enterprise、vend和orderItems以json的格式存储
-		document.add(
-				new TextField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.ENTERPRISE_FIELD),
-						JSONObject.toJSONString(makeOrder.getEnterprise()), Store.YES));
+		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.ENTERPRISE_FIELD),
+				JSONObject.toJSONString(makeOrder.getEnterprise()), Store.YES));
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, MakeOrderSimpleInfo.VEND_FIELD),
 				JSONObject.toJSONString(makeOrder.getVend()), Store.YES));
 		if (makeOrder.getProduct() != null) {
@@ -254,7 +250,7 @@ public class ObjectToDocumentUtils {
 				JSONObject.toJSONString(purcAccept.getVend()), Store.YES));
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseAcceptSimpleInfo.ENTERPRISE_FIELD),
-				JSONObject.toJSONString(purcAccept.getEnterprise()), Store.YES));
+						JSONObject.toJSONString(purcAccept.getEnterprise()), Store.YES));
 		if (!CollectionUtils.isEmpty(purcAccept.getAcceptItems())) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseAcceptSimpleInfo.ITEMS_FIELD),
@@ -297,7 +293,7 @@ public class ObjectToDocumentUtils {
 				JSONObject.toJSONString(saleQuotation.getVend()), Store.YES));
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, SaleQuotationSimpleInfo.ENTERPRISE_FIELD),
-				JSONObject.toJSONString(saleQuotation.getEnterprise()), Store.YES));
+						JSONObject.toJSONString(saleQuotation.getEnterprise()), Store.YES));
 		if (!CollectionUtils.isEmpty(saleQuotation.getSaleQuotationItems())) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, SaleQuotationSimpleInfo.ITEMS_FIELD),
@@ -333,7 +329,7 @@ public class ObjectToDocumentUtils {
 				JSONObject.toJSONString(purchapbill.getVend()), Store.YES));
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.ENTERPRISE_FIELD),
-				JSONObject.toJSONString(purchapbill.getEnterprise()), Store.YES));
+						JSONObject.toJSONString(purchapbill.getEnterprise()), Store.YES));
 		if (!CollectionUtils.isEmpty(purchapbill.getItems())) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseApbillSimpleInfo.ITEMS_FIELD),
@@ -375,7 +371,7 @@ public class ObjectToDocumentUtils {
 				JSONObject.toJSONString(purchBadin.getVend()), Store.YES));
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadinSimpleInfo.ENTERPRISE_FIELD),
-				JSONObject.toJSONString(purchBadin.getEnterprise()), Store.YES));
+						JSONObject.toJSONString(purchBadin.getEnterprise()), Store.YES));
 		if (!CollectionUtils.isEmpty(purchBadin.getBadInItems())) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadinSimpleInfo.ITEMS_FIELD),
@@ -417,7 +413,7 @@ public class ObjectToDocumentUtils {
 				JSONObject.toJSONString(purchaseBadout.getVend()), Store.YES));
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadoutSimpleInfo.ENTERPRISE_FIELD),
-				JSONObject.toJSONString(purchaseBadout.getEnterprise()), Store.YES));
+						JSONObject.toJSONString(purchaseBadout.getEnterprise()), Store.YES));
 		if (!CollectionUtils.isEmpty(purchaseBadout.getBadOutItems())) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseBadoutSimpleInfo.ITEMS_FIELD),
@@ -455,7 +451,7 @@ public class ObjectToDocumentUtils {
 		// vend和items以json的格式存储
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseForecastSimpleInfo.VEND_FIELD),
-				JSONObject.toJSONString(purchaseForecast.getVend()), Store.YES));
+						JSONObject.toJSONString(purchaseForecast.getVend()), Store.YES));
 		if (!CollectionUtils.isEmpty(purchaseForecast.getForecastItems())) {
 			document.add(new TextField(
 					ClassAndTableNameUtils.combineField(tableName, PurchaseForecastSimpleInfo.ITEMS_FIELD),
@@ -481,9 +477,8 @@ public class ObjectToDocumentUtils {
 		Document document = new Document();
 		// 不能用LongField,否则后续实时更新索引时,方法updateDocument(new Term("", ""),
 		// doc)无法根据id进行更新
-		document.add(
-				new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseInquirySimpleInfo.ID_FIELD),
-						String.valueOf(purcInquiry.getId()), Store.YES));
+		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseInquirySimpleInfo.ID_FIELD),
+				String.valueOf(purcInquiry.getId()), Store.YES));
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseInquirySimpleInfo.CODE_FIELD),
 				String.valueOf(purcInquiry.getCode()), Store.YES));
 		document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseInquirySimpleInfo.DATE_FIELD),
@@ -494,7 +489,7 @@ public class ObjectToDocumentUtils {
 		if (!CollectionUtils.isEmpty(purcInquiry.getInquiryItems())) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseInquirySimpleInfo.ITEMS_FIELD),
-					JSONObject.toJSONString(purcInquiry.getInquiryItems()), Store.YES));
+							JSONObject.toJSONString(purcInquiry.getInquiryItems()), Store.YES));
 		}
 		return document;
 	}
@@ -517,9 +512,8 @@ public class ObjectToDocumentUtils {
 		Document document = new Document();
 		// 不能用LongField,否则后续实时更新索引时,方法updateDocument(new Term("", ""),
 		// doc)无法根据id进行更新
-		document.add(
-				new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.ID_FIELD),
-						String.valueOf(purcMrb.getId()), Store.YES));
+		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.ID_FIELD),
+				String.valueOf(purcMrb.getId()), Store.YES));
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.CODE_FIELD),
 				String.valueOf(purcMrb.getCode()), Store.YES));
 		document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.DATE_FIELD),
@@ -527,20 +521,21 @@ public class ObjectToDocumentUtils {
 		// vend和items以json的格式存储
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.VEND_FIELD),
 				JSONObject.toJSONString(purcMrb.getVend()), Store.YES));
-		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.ENTERPRISE_FIELD),
-				JSONObject.toJSONString(purcMrb.getEnterprise()), Store.YES));
+		document.add(
+				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.ENTERPRISE_FIELD),
+						JSONObject.toJSONString(purcMrb.getEnterprise()), Store.YES));
 		if (purcMrb.getOrderItem() != null) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.ITEMS_FIELD),
-					JSONObject.toJSONString(purcMrb.getOrderItem()), Store.YES));
+							JSONObject.toJSONString(purcMrb.getOrderItem()), Store.YES));
 		}
 		if (purcMrb.getBadIn() != null) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseMrbSimpleInfo.BADITEMS_FIELD),
-					JSONObject.toJSONString(purcMrb.getBadIn()), Store.YES));
+							JSONObject.toJSONString(purcMrb.getBadIn()), Store.YES));
 		}
 		return document;
-		
+
 	}
 
 	/**
@@ -551,9 +546,10 @@ public class ObjectToDocumentUtils {
 	 */
 	public static Document toDocument(PurchaseChangesSimpleInfo purcChanges) {
 		if (purcChanges == null || purcChanges.getId() == null || StringUtils.isEmpty(purcChanges.getCode())
-				|| purcChanges.getVend() == null || purcChanges.getVend().getUu() == null
-				|| StringUtils.isEmpty(purcChanges.getVend().getEnName()) || StringUtils.isEmpty(purcChanges.getDate())
-				|| purcChanges.getEnterprise() == null || purcChanges.getEnterprise().getUu() == null
+				|| StringUtils.isEmpty(purcChanges.getOrderCode()) || purcChanges.getVend() == null
+				|| purcChanges.getVend().getUu() == null || StringUtils.isEmpty(purcChanges.getVend().getEnName())
+				|| StringUtils.isEmpty(purcChanges.getDate()) || purcChanges.getEnterprise() == null
+				|| purcChanges.getEnterprise().getUu() == null
 				|| StringUtils.isEmpty(purcChanges.getEnterprise().getEnName())) {
 			return null;
 		}
@@ -561,9 +557,8 @@ public class ObjectToDocumentUtils {
 		Document document = new Document();
 		// 不能用LongField,否则后续实时更新索引时,方法updateDocument(new Term("", ""),
 		// doc)无法根据id进行更新
-		document.add(
-				new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.ID_FIELD),
-						String.valueOf(purcChanges.getId()), Store.YES));
+		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.ID_FIELD),
+				String.valueOf(purcChanges.getId()), Store.YES));
 		document.add(
 				new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseChangesSimpleInfo.STATUS_FIELD),
 						String.valueOf(purcChanges.getStatus()), Store.YES));
@@ -608,22 +603,25 @@ public class ObjectToDocumentUtils {
 		document.add(
 				new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.ID_FIELD),
 						String.valueOf(purcProofing.getId()), Store.YES));
-		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.CODE_FIELD),
-				String.valueOf(purcProofing.getCode()), Store.YES));
-		document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.DATE_FIELD),
-				purcProofing.getDate().getTime(), Store.YES));
+		document.add(
+				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.CODE_FIELD),
+						String.valueOf(purcProofing.getCode()), Store.YES));
+		document.add(
+				new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.DATE_FIELD),
+						purcProofing.getDate().getTime(), Store.YES));
 		// vend和items以json的格式存储
-		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.VEND_FIELD),
-				JSONObject.toJSONString(purcProofing.getVend()), Store.YES));
+		document.add(
+				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.VEND_FIELD),
+						JSONObject.toJSONString(purcProofing.getVend()), Store.YES));
 		if (!CollectionUtils.isEmpty(purcProofing.getProofingItems())) {
-			document.add(
-					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.ITEMS_FIELD),
-							JSONObject.toJSONString(purcProofing.getProofingItems()), Store.YES));
+			document.add(new TextField(
+					ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.ITEMS_FIELD),
+					JSONObject.toJSONString(purcProofing.getProofingItems()), Store.YES));
 		}
 		if (null != purcProofing.getProduct()) {
-			document.add(
-					new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.PRODUCT_FIELD),
-							JSONObject.toJSONString(purcProofing.getProduct()), Store.YES));
+			document.add(new TextField(
+					ClassAndTableNameUtils.combineField(tableName, PurchaseProofingSimpleInfo.PRODUCT_FIELD),
+					JSONObject.toJSONString(purcProofing.getProduct()), Store.YES));
 		}
 		return document;
 	}
@@ -647,9 +645,8 @@ public class ObjectToDocumentUtils {
 		Document document = new Document();
 		// 不能用LongField,否则后续实时更新索引时,方法updateDocument(new Term("", ""),
 		// doc)无法根据id进行更新
-		document.add(
-				new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.ID_FIELD),
-						String.valueOf(purcReturn.getId()), Store.YES));
+		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.ID_FIELD),
+				String.valueOf(purcReturn.getId()), Store.YES));
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseReturnSimpleInfo.CODE_FIELD),
 				String.valueOf(purcReturn.getCode()), Store.YES));
 		document.add(
@@ -690,9 +687,8 @@ public class ObjectToDocumentUtils {
 		Document document = new Document();
 		// 不能用LongField,否则后续实时更新索引时,方法updateDocument(new Term("", ""),
 		// doc)无法根据id进行更新
-		document.add(
-				new StringField(ClassAndTableNameUtils.combineField(tableName, MakeAcceptSimpleInfo.ID_FIELD),
-						String.valueOf(makeAccept.getId()), Store.YES));
+		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, MakeAcceptSimpleInfo.ID_FIELD),
+				String.valueOf(makeAccept.getId()), Store.YES));
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, MakeAcceptSimpleInfo.CODE_FIELD),
 				String.valueOf(makeAccept.getCode()), Store.YES));
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, MakeAcceptSimpleInfo.SENDCODE_FIELD),
@@ -742,7 +738,7 @@ public class ObjectToDocumentUtils {
 		if (!CollectionUtils.isEmpty(makeChanges.getOrderChangeItems())) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, MakeChangesSimpleInfo.ITEMS_FIELD),
-					JSONObject.toJSONString(makeChanges.getOrderChangeItems()), Store.YES));
+							JSONObject.toJSONString(makeChanges.getOrderChangeItems()), Store.YES));
 		}
 		return document;
 	}
@@ -766,9 +762,8 @@ public class ObjectToDocumentUtils {
 		Document document = new Document();
 		// 不能用LongField,否则后续实时更新索引时,方法updateDocument(new Term("", ""),
 		// doc)无法根据id进行更新
-		document.add(
-				new StringField(ClassAndTableNameUtils.combineField(tableName, MakeReturnSimpleInfo.ID_FIELD),
-						String.valueOf(makeRetrun.getId()), Store.YES));
+		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, MakeReturnSimpleInfo.ID_FIELD),
+				String.valueOf(makeRetrun.getId()), Store.YES));
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, MakeReturnSimpleInfo.CODE_FIELD),
 				String.valueOf(makeRetrun.getCode()), Store.YES));
 		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, MakeReturnSimpleInfo.SENDCODE_FIELD),
@@ -848,15 +843,19 @@ public class ObjectToDocumentUtils {
 		// doc)无法根据id进行更新
 		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ID_FIELD),
 				String.valueOf(purcNotice.getId()), Store.YES));
-		document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.DATE_FIELD), purcNotice.getDate().getTime(), Store.YES));
+		document.add(new LongField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.DATE_FIELD),
+				purcNotice.getDate().getTime(), Store.YES));
+		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.VEND_FIELD),
+				JSON.toJSONString(purcNotice.getVend()), Store.YES));
 		document.add(
-				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.VEND_FIELD), JSON.toJSONString(purcNotice.getVend()), Store.YES));
-		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ENTERPRISE_FIELD),
-				JSON.toJSONString(purcNotice.getEnterprise()), Store.YES));
-		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.STATUS_FIELD), String.valueOf(purcNotice.getStatus()),
-				Store.YES));
-		document.add(new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ISWAITING_FIELD), String.valueOf(purcNotice.getWaiting()),
-				Store.YES));
+				new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ENTERPRISE_FIELD),
+						JSON.toJSONString(purcNotice.getEnterprise()), Store.YES));
+		document.add(
+				new StringField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.STATUS_FIELD),
+						String.valueOf(purcNotice.getStatus()), Store.YES));
+		document.add(new StringField(
+				ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ISWAITING_FIELD),
+				String.valueOf(purcNotice.getWaiting()), Store.YES));
 		// 是否结案,如果为空录入为未结案
 		if (purcNotice.getEnd() != null) {
 			document.add(
@@ -869,7 +868,8 @@ public class ObjectToDocumentUtils {
 		}
 		// vend和orderItems以json的格式存储
 		if (purcNotice.getOrderItem() != null) {
-			document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ORDERITEMS_FIELD),
+			document.add(new TextField(
+					ClassAndTableNameUtils.combineField(tableName, PurchaseNoticeSimpleInfo.ORDERITEMS_FIELD),
 					JSONObject.toJSONString(purcNotice.getOrderItem()), Store.YES));
 		}
 		return document;
@@ -898,7 +898,7 @@ public class ObjectToDocumentUtils {
 		// doc)无法根据id进行更新
 		document.add(
 				new StringField(ClassAndTableNameUtils.combineField(tableName, PurcProofingapprovalSimpleInfo.ID_FIELD),
-				String.valueOf(purcProofingapproval.getId()), Store.YES));
+						String.valueOf(purcProofingapproval.getId()), Store.YES));
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, PurcProofingapprovalSimpleInfo.CODE_FIELD),
 						purcProofingapproval.getCode(), Store.YES));
@@ -922,7 +922,7 @@ public class ObjectToDocumentUtils {
 				purcProofingapproval.getSscode(), Store.YES));
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, PurcProofingapprovalSimpleInfo.VEND_FIELD),
-				JSON.toJSONString(purcProofingapproval.getVend().getEnName()), Store.YES));
+						JSON.toJSONString(purcProofingapproval.getVend().getEnName()), Store.YES));
 		document.add(new TextField(
 				ClassAndTableNameUtils.combineField(tableName, PurcProofingapprovalSimpleInfo.ENTERPRISE_FIELD),
 				JSON.toJSONString(purcProofingapproval.getEnterprise().getEnName()), Store.YES));
@@ -948,14 +948,20 @@ public class ObjectToDocumentUtils {
 		// doc)无法根据id进行更新
 		document.add(
 				new StringField(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.ID_FIELD),
-				String.valueOf(purcProofingsend.getId()), Store.YES));
-		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.BRAND_FIELD), purcProofingsend.getBrand(), Store.YES));
+						String.valueOf(purcProofingsend.getId()), Store.YES));
+		document.add(
+				new TextField(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.BRAND_FIELD),
+						purcProofingsend.getBrand(), Store.YES));
 		document.add(
-				new LongField(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.DATE_FIELD), purcProofingsend.getDate().getTime(), Store.YES));
-		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.CODE_FIELD), purcProofingsend.getCode(), Store.YES));
+				new LongField(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.DATE_FIELD),
+						purcProofingsend.getDate().getTime(), Store.YES));
+		document.add(
+				new TextField(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.CODE_FIELD),
+						purcProofingsend.getCode(), Store.YES));
 		// vend和orderItems以json的格式存储
 		if (purcProofingsend.getProofingItem() != null) {
-			document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.ITEMS_FIELD),
+			document.add(new TextField(
+					ClassAndTableNameUtils.combineField(tableName, PurcProofingsendSimpleInfo.ITEMS_FIELD),
 					JSONObject.toJSONString(purcProofingsend.getProofingItem()), Store.YES));
 		}
 		return document;
@@ -1034,20 +1040,18 @@ public class ObjectToDocumentUtils {
 		if (null != saleArcheck.getStatus()) {
 			document.add(
 					new StringField(ClassAndTableNameUtils.combineField(tableName, SaleArcheckSimpleInfo.STATUS_FIELD),
-							String.valueOf(saleArcheck.getStatus()),
-					Store.YES));
+							String.valueOf(saleArcheck.getStatus()), Store.YES));
 		}
 		document.add(
 				new TextField(ClassAndTableNameUtils.combineField(tableName, SaleArcheckSimpleInfo.ENTERPRISE_FIELD),
-				JSON.toJSONString(saleArcheck.getEnterprise()), Store.YES));
-		document.add(
-				new TextField(ClassAndTableNameUtils.combineField(tableName, SaleArcheckSimpleInfo.VEND_FIELD),
-						JSON.toJSONString(saleArcheck.getVendor()), Store.YES));
+						JSON.toJSONString(saleArcheck.getEnterprise()), Store.YES));
+		document.add(new TextField(ClassAndTableNameUtils.combineField(tableName, SaleArcheckSimpleInfo.VEND_FIELD),
+				JSON.toJSONString(saleArcheck.getVendor()), Store.YES));
 		// vend和orderItems以json的格式存储
 		if (saleArcheck.getItems() != null) {
 			document.add(
 					new TextField(ClassAndTableNameUtils.combineField(tableName, SaleArcheckSimpleInfo.ITEMS_FIELD),
-					JSONObject.toJSONString(saleArcheck.getItems()), Store.YES));
+							JSONObject.toJSONString(saleArcheck.getItems()), Store.YES));
 		}
 		return document;
 	}