Преглед изворни кода

Merge remote-tracking branch 'origin/master' into hotfix-1284-wangmh

wangmh пре 7 година
родитељ
комит
5975991b3e
56 измењених фајлова са 1625 додато и 1371 уклоњено
  1. 17 20
      src/main/java/com/uas/platform/b2b/controller/BaseInfoController.java
  2. 1 4
      src/main/java/com/uas/platform/b2b/controller/ComponentController.java
  3. 23 27
      src/main/java/com/uas/platform/b2b/controller/ProductController.java
  4. 11 4
      src/main/java/com/uas/platform/b2b/controller/ProductUsersController.java
  5. 19 19
      src/main/java/com/uas/platform/b2b/controller/PurcProductController.java
  6. 1 1
      src/main/java/com/uas/platform/b2b/controller/SaleOrderChangeController.java
  7. 11 6
      src/main/java/com/uas/platform/b2b/dao/InvitationRecordDao.java
  8. 2 0
      src/main/java/com/uas/platform/b2b/dao/ProductUsersDao.java
  9. 252 1
      src/main/java/com/uas/platform/b2b/erp/model/VendorPerformanceAssessErp.java
  10. 3 1
      src/main/java/com/uas/platform/b2b/erp/service/impl/MakeServiceImpl.java
  11. 1 0
      src/main/java/com/uas/platform/b2b/erp/service/impl/PurchaseAPBillServiceImpl.java
  12. 41 77
      src/main/java/com/uas/platform/b2b/erp/service/impl/PurchaseNotifyServiceImpl.java
  13. 1 1
      src/main/java/com/uas/platform/b2b/erp/service/impl/PurchaseProdInOutServiceImpl.java
  14. 2 1
      src/main/java/com/uas/platform/b2b/erp/service/impl/VendorPerformanceAssessErpServiceImpl.java
  15. 15 1
      src/main/java/com/uas/platform/b2b/model/ApbillAdjustment.java
  16. 13 0
      src/main/java/com/uas/platform/b2b/model/ErpProdIODetail.java
  17. 17 11
      src/main/java/com/uas/platform/b2b/model/Product.java
  18. 0 7
      src/main/java/com/uas/platform/b2b/model/ProductUsers.java
  19. 15 1
      src/main/java/com/uas/platform/b2b/model/PurchaseApCheckItem.java
  20. 1 1
      src/main/java/com/uas/platform/b2b/model/PurchaseOrderChangeItem.java
  21. 192 1
      src/main/java/com/uas/platform/b2b/model/VendorPerformanceAssess.java
  22. 5 6
      src/main/java/com/uas/platform/b2b/ps/InquiryUtils.java
  23. 57 0
      src/main/java/com/uas/platform/b2b/ps/ProductUtils.java
  24. 0 41
      src/main/java/com/uas/platform/b2b/search/SearchController.java
  25. 9 53
      src/main/java/com/uas/platform/b2b/search/SearchService.java
  26. 0 54
      src/main/java/com/uas/platform/b2b/search/SearchServiceImpl.java
  27. 0 10
      src/main/java/com/uas/platform/b2b/service/ComponentService.java
  28. 8 12
      src/main/java/com/uas/platform/b2b/service/ProductUsersService.java
  29. 2 2
      src/main/java/com/uas/platform/b2b/service/impl/BaseInfoServiceImpl.java
  30. 0 7
      src/main/java/com/uas/platform/b2b/service/impl/ComponentServiceImpl.java
  31. 20 23
      src/main/java/com/uas/platform/b2b/service/impl/EnquiryServiceImpl.java
  32. 8 8
      src/main/java/com/uas/platform/b2b/service/impl/ErpProdIODetailServiceImpl.java
  33. 2 33
      src/main/java/com/uas/platform/b2b/service/impl/ProductUsersServiceImpl.java
  34. 4 2
      src/main/java/com/uas/platform/b2b/service/impl/PurchaseOrderChangeServiceImpl.java
  35. 14 26
      src/main/java/com/uas/platform/b2b/v2/controller/EnterpriseController.java
  36. 79 9
      src/main/java/com/uas/platform/b2b/v2/service/impl/EnterpriseServiceImpl.java
  37. 1 0
      src/main/webapp/WEB-INF/views/normal/index.html
  38. 14 4
      src/main/webapp/resources/css/index.css
  39. 314 777
      src/main/webapp/resources/js/index/app.js
  40. 13 7
      src/main/webapp/resources/lib/treeview/css/angular.treeview.css
  41. 10 8
      src/main/webapp/resources/lib/treeview/js/angular.treeview.js
  42. 1 1
      src/main/webapp/resources/tpl/index/baseInfo/customersInfo.html
  43. 1 1
      src/main/webapp/resources/tpl/index/baseInfo/inquiryItem_detail.html
  44. 1 1
      src/main/webapp/resources/tpl/index/baseInfo/invitation.html
  45. 1 1
      src/main/webapp/resources/tpl/index/baseInfo/searchresult.html
  46. 1 1
      src/main/webapp/resources/tpl/index/baseInfo/servicerInfo.html
  47. 1 1
      src/main/webapp/resources/tpl/index/baseInfo/vendorsInfo.html
  48. 105 82
      src/main/webapp/resources/tpl/index/common/header.html
  49. 3 1
      src/main/webapp/resources/tpl/index/common/leftAll.html
  50. 1 1
      src/main/webapp/resources/tpl/index/fa/apBillOutList.html
  51. 1 1
      src/main/webapp/resources/tpl/index/fa/apCheckList.html
  52. 1 1
      src/main/webapp/resources/tpl/index/home/right.html
  53. 1 1
      src/main/webapp/resources/tpl/index/sale/left.html
  54. 197 12
      src/main/webapp/resources/tpl/index/sale/pubinquiry.html
  55. 111 0
      src/test/java/com/uas/platform/b2b/purc/PurchaseNoticeSearchTest.java
  56. 1 0
      src/test/java/com/uas/platform/b2b/purc/PurchaseNotify.java

+ 17 - 20
src/main/java/com/uas/platform/b2b/controller/BaseInfoController.java

@@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.ui.ModelMap;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -80,15 +81,12 @@ public class BaseInfoController {
 		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
 		pageParams.getFilters().put("pr_issale", Constant.YES);
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		pageParams.setNotEqualFilters(map);
+        pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -115,15 +113,12 @@ public class BaseInfoController {
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
 		pageParams.getFilters().put("pr_issale", Constant.YES);
 		pageParams.getFilters().put("pr_standard", Constant.YES);
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		pageParams.setNotEqualFilters(map);
+        pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -148,16 +143,15 @@ public class BaseInfoController {
 		pageParams.setKeywordSearchColumns(keywordSearchColumns);
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
 		pageParams.getFilters().put("pr_issale", Constant.YES);
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		map.put("pr_standard", Constant.YES);
+        pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("pr_standard", Constant.YES);
 		pageParams.setNotEqualFilters(map);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -170,7 +164,7 @@ public class BaseInfoController {
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("isSale", Constant.YES);
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
-		/*pageInfo.filter("b2bDisabled", Constant.NO);*/
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -185,7 +179,7 @@ public class BaseInfoController {
 		pageInfo.filter("isSale", Constant.YES);
 		pageInfo.filter("standard", Constant.YES);
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
-		/*pageInfo.filter("b2bDisabled", Constant.NO);*/
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -200,7 +194,7 @@ public class BaseInfoController {
 		pageInfo.filter("isSale", Constant.YES);
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
         pageInfo.filter("standard", Constant.NO);
-		/*pageInfo.filter("b2bDisabled", Constant.NO);*/
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		return productService.findNotStandardB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -309,6 +303,7 @@ public class BaseInfoController {
 		pageInfo.sorting("id", org.springframework.data.domain.Sort.Direction.DESC);
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		pageInfo.filter("isSale", Constant.YES);
+		pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
 		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
@@ -331,9 +326,10 @@ public class BaseInfoController {
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		pageInfo.filter("isSale", Constant.YES);
 		pageInfo.filter("standard", Constant.YES);
+		pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
-		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
+		modelAndView.addObject("data", StringUtils.isEmpty(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
 				: getStandardProductInfo(params, keyword).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/baseInfo/baseInfo", "标准物料资料表"));
 		logger.log("物料资料", "导出Excel列表", "导出标准可卖产品Excel列表");
@@ -353,9 +349,10 @@ public class BaseInfoController {
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		pageInfo.filter("isSale", Constant.YES);
 		pageInfo.filter("standard", Constant.NO);
+		pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
-		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
+		modelAndView.addObject("data", StringUtils.isEmpty(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
 				: getNonStandardProductInfo(params, keyword).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/baseInfo/baseInfo", "非标准物料资料表"));
 		logger.log("物料资料", "导出Excel列表", "导出非标准可卖产品Excel列表");

+ 1 - 4
src/main/java/com/uas/platform/b2b/controller/ComponentController.java

@@ -30,10 +30,7 @@ public class ComponentController {
 	@RequestMapping(value = "/cmplist/{kindId}", method = RequestMethod.GET)
 	@ResponseBody
 	public SPage<Component> getCmpListByKindId(@PathVariable("kindId") Long kindId, PageParams params, String keyword) {
-		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
-		//以当前获取的KindId做过滤条件
-		pageParams.getFilters().put("cmp_kiid", kindId);
-		return searchService.searchProductComponentCheckIds(keyword, pageParams);
+		return null;
 	}
 
 	/**

+ 23 - 27
src/main/java/com/uas/platform/b2b/controller/ProductController.java

@@ -20,6 +20,7 @@ import com.uas.search.b2b.model.Sort.Type;
 import com.uas.search.b2b.util.SearchConstants;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -60,12 +61,12 @@ public class ProductController {
 			pageParams.getFilters().put("pr_enuu", custUU);
 			pageParams.getFilters().put("pr_ispurchase", Constant.YES);
 			HashMap<String, Object> map = new HashMap<>();
-			map.put("pr_b2bdisabled", Constant.YES);
+			map.put("pr_b2cenabled", Constant.YES);
 			pageParams.setNotEqualFilters(map);
 			List<Sort> sortList = new ArrayList<>();
 			sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 			pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-			return searchService.searchProductsCheckIds(keyword, pageParams);
+			return ProductUtils.searchProducts(keyword, pageParams);
 		} else {
 			return null;
 		}
@@ -87,12 +88,12 @@ public class ProductController {
 			pageParams.getFilters().put("pr_enuu", vendUU);
 			pageParams.getFilters().put("pr_issale", Constant.YES);
 			HashMap<String, Object> map = new HashMap<>();
-			map.put("pr_b2bdisabled", Constant.YES);
+			map.put("pr_b2cenabled", Constant.YES);
 			pageParams.setNotEqualFilters(map);
 			List<Sort> sortList = new ArrayList<>();
 			sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 			pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-			return searchService.searchProductsCheckIds(keyword, pageParams);
+			return ProductUtils.searchProducts(keyword, pageParams);
 		} else {
 			return null;
 		}
@@ -107,15 +108,12 @@ public class ProductController {
 		logger.log("查看物料", SystemSession.getUser().getUserName() + "查看了物料信息(全部)");
 		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		pageParams.setNotEqualFilters(map);
+		pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -141,15 +139,12 @@ public class ProductController {
 		pageParams.setKeywordSearchColumns(keywordSearchColumns);
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
 		pageParams.getFilters().put("pr_standard", Constant.YES);
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		pageParams.setNotEqualFilters(map);
+        pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -173,15 +168,11 @@ public class ProductController {
 		keywordSearchColumns.add("pr_code");
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
 		pageParams.getFilters().put("pr_standard", Constant.NO);
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		pageParams.setNotEqualFilters(map);
-
+        pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -196,7 +187,7 @@ public class ProductController {
 	public SPage<Product> getProductInfo(PageParams params, String keyword) {
 		PageInfo pageInfo = new PageInfo(params);
         pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
-        /*pageInfo.filter("b2bDisabled", Constant.NO);*/
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -213,7 +204,7 @@ public class ProductController {
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("standard", Constant.YES);
         pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
-        /*pageInfo.filter("b2bDisabled", Constant.NO);*/
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -230,7 +221,7 @@ public class ProductController {
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("standard", Constant.NO);
         pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
-        /*pageInfo.filter("b2bDisabled", Constant.NO);*/
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -293,9 +284,10 @@ public class ProductController {
 		PageInfo pageInfo = new PageInfo(1, JxlsExcelView.MAX_SIZE, 0);
 		pageInfo.sorting("id", org.springframework.data.domain.Sort.Direction.DESC);
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
+		pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
-		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
+		modelAndView.addObject("data", StringUtils.isEmpty(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
 				: getAllProductInfo(params, keyword).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/baseInfo/baseInfo", "全部物料资料表"));
 		logger.log("物料资料", "导出Excel列表", "导出全部Excel列表");
@@ -312,11 +304,12 @@ public class ProductController {
 	public ModelAndView exportStandard(String keyword) {
 		PageInfo pageInfo = new PageInfo(1, JxlsExcelView.MAX_SIZE, 0);
 		pageInfo.sorting("id", org.springframework.data.domain.Sort.Direction.DESC);
-		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		pageInfo.filter("standard", Constant.YES);
+		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
+		pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
-		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
+		modelAndView.addObject("data", StringUtils.isEmpty(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
 				: getStandardProductInfo(params, keyword).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/baseInfo/baseInfo", "标准物料资料表"));
 		logger.log("物料资料", "导出Excel列表", "导出标准Excel列表");
@@ -335,9 +328,10 @@ public class ProductController {
 		pageInfo.sorting("id", org.springframework.data.domain.Sort.Direction.DESC);
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		pageInfo.filter("standard", Constant.NO);
+		pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
-		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
+		modelAndView.addObject("data", StringUtils.isEmpty(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
 				:getNonStandardProductInfo(params, keyword).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/baseInfo/baseInfo", "非标准物料资料表"));
 		logger.log("物料资料", "导出Excel列表", "导出非标准Excel列表");
@@ -353,6 +347,7 @@ public class ProductController {
 		logger.log("查看产品", SystemSession.getUser().getUserName() + "查看了物料信息(全部)");
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("matchstatus", Status.SUBMITTED.value());
+		pageInfo.filter("b2cEnabled", Constant.YES);
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -379,6 +374,7 @@ public class ProductController {
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("isPurchase", Constant.YES);
 		pageInfo.filter("matchstatus", Status.SUBMITTED.value());
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 

+ 11 - 4
src/main/java/com/uas/platform/b2b/controller/ProductUsersController.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2b.model.FileUpload;
 import com.uas.platform.b2b.model.Product;
 import com.uas.platform.b2b.model.ProductUsers;
+import com.uas.platform.b2b.ps.ProductUtils;
 import com.uas.platform.b2b.search.SearchService;
 import com.uas.platform.b2b.service.ProductUsersService;
 import com.uas.platform.b2b.support.JxlsExcelView;
@@ -11,11 +12,11 @@ import com.uas.platform.b2b.support.SystemSession;
 import com.uas.platform.b2b.support.UsageBufferedLogger;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.logging.BufferedLoggerManager;
-import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
 import com.uas.search.b2b.model.SPage;
 import com.uas.search.b2b.model.Sort;
 import com.uas.search.b2b.util.SearchConstants;
+import org.apache.commons.collections.map.HashedMap;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -28,6 +29,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 用户个人产品库
@@ -56,8 +58,13 @@ public class ProductUsersController {
     @RequestMapping(method = RequestMethod.GET)
     public SPage<ProductUsers> getProductInfo(PageParams params, String keyword) {
         logger.log("查看个人物料", SystemSession.getUser().getUserName() + "查看了个人物料信息");
-        PageInfo pageInfo = new PageInfo(params);
-        return productUsersService.findProductInfoByPageInfo(pageInfo);
+        com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
+        Map<String, Object> filters = new HashedMap();
+        filters.put("enuu", SystemSession.getUser().getEnterprise().getUu());
+        filters.put("useruu", SystemSession.getUser().getUserUU());
+        pageParams.setFilters(filters);
+        SPage<ProductUsers> productUsersSPage = ProductUtils.searchProductUsers(keyword, pageParams);
+        return productUsersSPage;
     }
 
     /**
@@ -72,7 +79,7 @@ public class ProductUsersController {
         List<Sort> sortList = new ArrayList<>();
         sortList.add(new Sort("pu_id", false, Sort.Type.INT, new Long(1)));
         pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-        return searchService.searchProductUsersCheckIds(keyword, pageParams);
+        return ProductUtils.searchProductUsers(keyword, pageParams);
     }
 
     /**

+ 19 - 19
src/main/java/com/uas/platform/b2b/controller/PurcProductController.java

@@ -26,13 +26,13 @@ import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.ui.ModelMap;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -95,9 +95,10 @@ public class PurcProductController {
 		pageInfo.sorting("id", org.springframework.data.domain.Sort.Direction.DESC);
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		pageInfo.filter("isPurchase", Constant.YES);
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
-		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
+		modelAndView.addObject("data", StringUtils.isEmpty(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
 				: getAllProductInfo(params, keyword).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/baseInfo/baseInfo", "全部物料资料表"));
 		logger.log("物料资料", "导出Excel列表", "导出可买物料Excel列表");
@@ -117,9 +118,10 @@ public class PurcProductController {
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		pageInfo.filter("isPurchase", Constant.YES);
 		pageInfo.filter("standard", Constant.YES);
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
-		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
+		modelAndView.addObject("data", StringUtils.isEmpty(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
 				: getStandardProductInfo(params, keyword).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/baseInfo/baseInfo", "标准物料资料表"));
 		logger.log("物料资料", "导出Excel列表", "导出可买物料Excel列表");
@@ -139,9 +141,10 @@ public class PurcProductController {
 		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		pageInfo.filter("isPurchase", Constant.YES);
 		pageInfo.filter("standard", Constant.NO);
+        pageInfo.filter("b2cEnabled", Constant.YES);
 		ModelAndView modelAndView = new ModelAndView();
 		PageParams params = new PageParams(pageInfo);
-		modelAndView.addObject("data", null == keyword || "".equals(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
+		modelAndView.addObject("data", StringUtils.isEmpty(keyword) ? ProductUtils.findByPageInfo(pageInfo, keyword).getContent()
 				:getNonStandardProductInfo(params, keyword).getContent());
 		modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/baseInfo/baseInfo", "非标准物料资料表"));
 		logger.log("物料资料", "导出Excel列表", "导出可买物料Excel列表");
@@ -182,15 +185,12 @@ public class PurcProductController {
 		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
 		pageParams.getFilters().put("pr_ispurchase", Constant.YES);
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		pageParams.setNotEqualFilters(map);
+        pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -217,15 +217,12 @@ public class PurcProductController {
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
 		pageParams.getFilters().put("pr_ispurchase", Constant.YES);
 		pageParams.getFilters().put("pr_standard", Constant.YES);
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		pageParams.setNotEqualFilters(map);
+        pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -250,15 +247,12 @@ public class PurcProductController {
 		pageParams.getFilters().put("pr_enuu", SystemSession.getUser().getEnterprise().getUu());
 		pageParams.getFilters().put("pr_ispurchase", Constant.YES);
 		pageParams.getFilters().put("pr_standard", Constant.NO);
-
-		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
-		pageParams.setNotEqualFilters(map);
+        pageParams.getFilters().put("pr_b2cenabled", Constant.YES);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		return searchService.searchProductsCheckIds(keyword, pageParams);
+		return ProductUtils.searchProducts(keyword, pageParams);
 	}
 
 	/**
@@ -270,6 +264,8 @@ public class PurcProductController {
 		logger.log("查看产品", SystemSession.getUser().getUserName() + "查看了物料信息(全部)");
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("isPurchase", Constant.YES);
+		pageInfo.filter("b2cEnabled", Constant.YES);
+		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -283,6 +279,8 @@ public class PurcProductController {
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("isPurchase", Constant.YES);
 		pageInfo.filter("standard", Constant.YES);
+		pageInfo.filter("b2cEnabled", Constant.YES);
+		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 
@@ -296,6 +294,8 @@ public class PurcProductController {
 		PageInfo pageInfo = new PageInfo(params);
 		pageInfo.filter("isPurchase", Constant.YES);
 		pageInfo.filter("standard", Constant.NO);
+		pageInfo.filter("b2cEnabled", Constant.YES);
+		pageInfo.filter("enUU", SystemSession.getUser().getEnterprise().getUu());
 		return productService.findB2bEnabledProductInfoByPageInfo(pageInfo, keyword);
 	}
 

+ 1 - 1
src/main/java/com/uas/platform/b2b/controller/SaleOrderChangeController.java

@@ -119,7 +119,7 @@ public class SaleOrderChangeController {
 			pageParams.getFilters().put("pc_enuu", new MultiValue(list, true));
 		}
 		pageParams.getFilters().put("pc_status", Status.NOT_REPLY.value());
-		pageParams.getFilters().put("pc_unneedreply", Constant.YES);
+		pageParams.getFilters().put("pc_unneedreply", Constant.NO);
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pc_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);

+ 11 - 6
src/main/java/com/uas/platform/b2b/dao/InvitationRecordDao.java

@@ -1,13 +1,18 @@
 package com.uas.platform.b2b.dao;
 
-import java.util.List;
-
+import com.uas.platform.b2b.model.InvitationRecord;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.stereotype.Repository;
 
-import com.uas.platform.b2b.model.InvitationRecord;
+import java.util.List;
 
+/**
+ * 邀请注册记录
+ * 
+ * @author hejq
+ * @date 2018-08-01 9:13
+ */
 @Repository
 public interface InvitationRecordDao
 		extends JpaRepository<InvitationRecord, Long>, JpaSpecificationExecutor<InvitationRecord> {
@@ -19,7 +24,7 @@ public interface InvitationRecordDao
 	 * @param vendname
 	 * @return
 	 */
-	public InvitationRecord findByUseruuAndVendname(Long useruu, String vendname);
+	InvitationRecord findByUseruuAndVendname(Long useruu, String vendname);
 
 	/**
 	 * 查询个人的邀请记录
@@ -27,7 +32,7 @@ public interface InvitationRecordDao
 	 * @param useruu
 	 * @return
 	 */
-	public List<InvitationRecord> findByUseruu(Long useruu);
+	List<InvitationRecord> findByUseruu(Long useruu);
 
 	/**
 	 * 通过邀请企业uu号和供应商名称查询邀请记录
@@ -36,7 +41,7 @@ public interface InvitationRecordDao
 	 * @param vendname
 	 * @return
 	 */
-	public InvitationRecord findByEnuuAndVendname(Long enuu, String vendname);
+	InvitationRecord findByEnuuAndVendname(Long enuu, String vendname);
 
 	/**
 	 * 通过被邀请企业的名称查询邀请记录

+ 2 - 0
src/main/java/com/uas/platform/b2b/dao/ProductUsersDao.java

@@ -10,6 +10,8 @@ import org.springframework.stereotype.Repository;
 import java.util.List;
 
 /**
+ * 个人物料
+ *
  * Created by hejq on 2017-11-08.
  */
 @Repository

+ 252 - 1
src/main/java/com/uas/platform/b2b/erp/model/VendorPerformanceAssessErp.java

@@ -8,69 +8,312 @@ import java.util.Date;
  * 供应商绩效考核
  *
  * @author huangct
+ * @modify-author hejq
+ * @modify-date 2018-08-03 11:22
+ * @modify-desc 增加字段备注信息
  */
 
 public class VendorPerformanceAssessErp {
+    /**
+     * 编号
+     */
     private String vpa_code;
+
+    /**
+     * ID
+     */
     private Long vpa_id;
+
+    /**
+     * 单据状态
+     */
     private String vpa_status;
+
+    /**
+     * 录入人
+     */
     private String vpa_recordman;
+
+    /**
+     * 录入日期
+     */
     private Date vpa_recorddate;
+
+    /**
+     * 状态码
+     */
     private String vpa_statuscode;
+
+    /**
+     * 申请人
+     */
     private String vpa_applyman;
+
+    /**
+     * 申请部门
+     */
     private String vpa_applydep;
+
+    /**
+     * 申请日期
+     */
     private Date vpa_applydate;
+
+    /**
+     * 考核期间
+     */
     private String vpa_assessdate;
+
+    /**
+     * 采购跟单
+     */
     private String vpa_purchasecode;
+
+    /**
+     * SQE
+     */
     private String vpa_sqe;
+
+    /**
+     * 物料认定组
+     */
     private String vpa_orderteam;
+
+    /**
+     * 供应商号
+     */
     private String vpa_vendorcode;
+
+    /**
+     * 供应商名
+     */
     private String vpa_vendorname;
+
+    /**
+     * 物料类别
+     */
     private String vpa_prodkind;
+
+    /**
+     * 来料批不合格率(15分)
+     */
     private Double vpa_llpbhgl;
+
+    /**
+     * 上线不良率(25分)
+     */
     private Double vpa_sxbll;
+
+    /**
+     * 客户失效次数(10分)
+     */
     private Double vpa_khsxcs;
+
+    /**
+     * 产线重大异常(10分)
+     */
     private Double vpa_cxzdyc;
+
+    /**
+     * 8D回复及时率(5分)
+     */
     private Double vpa_8dhfjsl;
+
+    /**
+     * 异常复发率(10分)
+     */
     private Double vpa_ycffl;
+
+    /**
+     * 供方配合度(25分)
+     */
     private Double vpa_gfphd;
+
+    /**
+     * 质量综合得分
+     */
     private Double vpa_zlzhdf;
+
+    /**
+     * 质量权重得分(30%)
+     */
     private Double vpa_zlqzdf;
+
+    /**
+     * 技术支持(10分)
+     */
     private Double vpa_jszc;
+
+    /**
+     * 技术标准(10分)
+     */
     private Double vpa_jsbz;
+
+    /**
+     * 技术分析(10分)
+     */
     private Double vpa_jsfx;
+
+    /**
+     * 技术资料完整情况(15分)
+     */
     private Double vpa_jszlwzqk;
+
+    /**
+     * 样品合格率(5分)
+     */
     private Double vpa_yphgl;
+
+    /**
+     * 研发/工程实力(10分)
+     */
     private Double vpa_gcsl;
+
+    /**
+     * 可靠性要求/条件(20分)
+     */
     private Double vpa_kkxyq;
+
+    /**
+     * 物料是否发生技术质量问题(20分)
+     */
     private Double vpa_wlsffsjszlwt;
+
+    /**
+     * 技术综合得分
+     */
     private Double vpa_jszhdf;
+
+    /**
+     * 技术权重得分(30%)
+     */
     private Double vpa_jsqzdf;
+
+    /**
+     * 成本降价(50分)
+     */
     private Double vpa_cbjj;
+
+    /**
+     * 支付条件(20分)
+     */
     private Double vpa_zftj;
+
+    /**
+     * 打样支持(15分)
+     */
     private Double vpa_dyzc;
+
+    /**
+     * 服务支持(15分)
+     */
     private Double vpa_fwzc;
+
+    /**
+     * 采购开发综合得分
+     */
     private Double vpa_cgkfzhdf;
+
+    /**
+     * 物料交付(50分)
+     */
     private Double vpa_wljf;
+
+    /**
+     * 停线/调计划次数(30分)
+     */
     private Double vpa_djhcs;
+
+    /**
+     * NG品处理(10分)
+     */
     private Double vpa_ngpcl;
+
+    /**
+     * 服务响应(10分)
+     */
     private Double vpa_fwxl;
+
+    /**
+     * 采购综合得分
+     */
     private Double vpa_cgzhdf;
+
+    /**
+     * 采购及采购开发权重得分(各20%)
+     */
     private Double vpa_cgjcgkfqzdf;
+
+    /**
+     * 总计得分
+     */
     private Double vpa_zjdf;
+
+    /**
+     * 供应商确认得分
+     */
     private String vpa_gysqrdf;
+
+    /**
+     * 不认可原因
+     */
     private String vpa_brkyy;
+
+    /**
+     * 质量评分附件
+     */
     private String vpa_zlpffj;
+
+    /**
+     * 技术评分附件
+     */
     private String vpa_jspffj;
+
+    /**
+     * 采购评分附件
+     */
     private String vpa_cgpffj;
+
+    /**
+     * 审核日期
+     */
     private Date vpa_auditdate;
+
+    /**
+     * 审核人
+     */
     private String vpa_auditor;
+
+    /**
+     * 基本信息附件
+     */
     private String vpa_jbxxfj;
+
+    /**
+     * 采购跟踪人
+     */
     private String vpa_purchasename;
+
+    /**
+     * SQE人
+     */
     private String vpa_sqename;
+
+    /**
+     * 物料认定人
+     */
     private String vpa_ordername;
+
+    /**
+     * 供应商UU
+     */
     private Long ve_uu;
 
+    /**
+     * 供应商等级
+     */
+    private String vpa_grade;
+
     public String getVpa_code() {
         return vpa_code;
     }
@@ -543,6 +786,14 @@ public class VendorPerformanceAssessErp {
         this.ve_uu = ve_uu;
     }
 
+    public String getVpa_grade() {
+        return vpa_grade;
+    }
+
+    public void setVpa_grade(String vpa_grade) {
+        this.vpa_grade = vpa_grade;
+    }
+
     /**
      * 转为平台的产品
      *
@@ -616,7 +867,7 @@ public class VendorPerformanceAssessErp {
         vpa.setVpaPurchasename(this.vpa_purchasename);
         vpa.setVpaSqename(this.vpa_sqename);
         vpa.setVpaOrdername(this.vpa_ordername);
-
+        vpa.setVpaGrade(this.vpa_grade);
         return vpa;
     }
 

+ 3 - 1
src/main/java/com/uas/platform/b2b/erp/service/impl/MakeServiceImpl.java

@@ -81,13 +81,15 @@ public class MakeServiceImpl implements MakeService {
 					makeOrder.setProduct(product);
 					makeOrder.setProductId(product.getId());
 					List<Vendor> vendors = vendorDao.findByMyEnUUAndVendUU(enUU, make.getVe_uu());
-					Vendor vend = vendors.get(0);
+					Vendor vend = new Vendor();
 					if (CollectionUtils.isEmpty(vendors)) {
 						vend = addVendor(make);
 						if (null != vend) {
 							// 添加合作伙伴
 							vendorService.addPartnerShipRecord(vend, appId);
 						}
+					} else {
+						vend = vendors.get(0);
 					}
 					makeOrder.setUserUU(vend.getMyUserUU());
 					makeOrder.setVendUserUU(vend.getVendUserUU());

+ 1 - 0
src/main/java/com/uas/platform/b2b/erp/service/impl/PurchaseAPBillServiceImpl.java

@@ -90,6 +90,7 @@ public class PurchaseAPBillServiceImpl implements PurchaseAPBillService {
 						adjust.setPrid(product.getId());
 						adjust.setDetno(detail.getAbd_detno());
 						adjust.setProdcode(product.getCode());
+						adjust.setProdUnit(product.getUnit());
 						adjust.setQty(detail.getAbd_qty());
 						adjust.setThischeckqty(detail.getAbd_thisvoqty());
 						adjust.setOrderprice(detail.getAbd_price());

+ 41 - 77
src/main/java/com/uas/platform/b2b/erp/service/impl/PurchaseNotifyServiceImpl.java

@@ -1,9 +1,6 @@
 package com.uas.platform.b2b.erp.service.impl;
 
-import com.uas.platform.b2b.dao.PurchaseNoticeDao;
-import com.uas.platform.b2b.dao.PurchaseOrderItemDao;
-import com.uas.platform.b2b.dao.SaleSendItemDao;
-import com.uas.platform.b2b.dao.SaleSendItemVerifyDao;
+import com.uas.platform.b2b.dao.*;
 import com.uas.platform.b2b.erp.model.AcceptNotify;
 import com.uas.platform.b2b.erp.model.AcceptNotifyConfirm;
 import com.uas.platform.b2b.erp.model.AcceptNotifyVerify;
@@ -14,6 +11,7 @@ import com.uas.platform.b2b.support.SystemSession;
 import com.uas.platform.core.model.Status;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
@@ -23,6 +21,12 @@ import java.util.Date;
 import java.util.List;
 import java.util.Set;
 
+/**
+ * 发货提醒
+ * 
+ * @author hejq
+ * @date 2018-08-03 16:22
+ */
 @Service
 public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
 
@@ -34,6 +38,10 @@ public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
 	private SaleSendItemDao saleSendItemDao;
 	@Autowired
 	private SaleSendItemVerifyDao saleSendItemVerifyDao;
+    @Autowired
+    private CommunalLogDao communalLogDao;
+    @Autowired
+    private JdbcTemplate jdbcTemplate;
 
 	@Override
 	public List<PurchaseNotice> convertPurchaseNotify(List<PurchaseNotify> notifies) {
@@ -42,14 +50,16 @@ public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
 			PurchaseNotice notice = notify.convert();
 			List<PurchaseNotice> existNotices = purchaseNoticeDao.findByEnUUAndSourceId(notice.getEnUU(),
 					notice.getSourceId());
-			if (CollectionUtils.isEmpty(existNotices)) {// sourceId不存在新增保存
+			// sourceId不存在新增保存
+			if (CollectionUtils.isEmpty(existNotices)) {
 				List<Long> idList = purchaseOrderItemDao.findIdByEnUUAndOrderCodeAndNumber(notice.getEnUU(),
                         notice.getOrderItem().getOrder().getCode(), notice.getOrderItem().getNumber());
 				if (!CollectionUtils.isEmpty(idList)) {
 					notice.setOrderItemId(idList.get(0));
 					notices.add(notice);
 				}
-			} else {// 对现有的单据,修改
+				// 对现有的单据,修改
+			} else {
 				PurchaseNotice existNotice = existNotices.get(0);
 				SimpleDateFormat dateFormat = new SimpleDateFormat("MM月dd日");
 				String dateString = dateFormat.format(new Date());
@@ -57,23 +67,25 @@ public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
 				if (StringUtils.hasText(existNotice.getRemark())) {
 					remark = existNotice.getRemark() + "; ";
 				}
-				existNotice.setSendStatus((short) Status.NOT_UPLOAD.value());// 对卖家传输状态 // 待上传
+				// 对卖家传输状态 // 待上传
+				existNotice.setSendStatus((short) Status.NOT_UPLOAD.value());
 				if (existNotice.getQty() != null && !existNotice.getQty().equals(notice.getQty())) {
 					if (existNotice.getEndQty() > notice.getQty()) {
 						// 已发货数大于新的需求数,修改平台上的需求数为已发货数,将已发货数量传回买家ERP修改发货提醒的数量
 						existNotice.setRemark(remark + dateString + "修改需求数量," + existNotice.getQty() + " -> "
 								+ existNotice.getEndQty());
-						existNotice.setQty(existNotice.getEndQty());// 需求数量
-						existNotice.setStatus((short) Status.REPLIED.value());// 状态  已回复
+                        // 需求数量
+						existNotice.setQty(existNotice.getEndQty());
+                        // 状态  已回复
+						existNotice.setStatus((short) Status.REPLIED.value());
 						notices.add(existNotice);
 					} else {
 						// 已发货数小于或等于新的需求数,修改平台上的需求数为新的需求数
 						existNotice.setRemark(
 								remark + dateString + "修改需求数量," + existNotice.getQty() + " -> " + notice.getQty());
-						existNotice.setQty(notice.getQty());// 需求数量
-						existNotice.setDelivery(notice.getDelivery());// 交期
+						existNotice.setQty(notice.getQty());
+						existNotice.setDelivery(notice.getDelivery());
 						notices.add(existNotice);
-
 					}
 				} else {
 					String existDeliveryStr = "空";
@@ -86,8 +98,9 @@ public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
 					}
 					if (!existDeliveryStr.equals(deliveryStr)) {
 						existNotice.setRemark(remark + dateString + "修改交期," + existDeliveryStr + " -> " + deliveryStr);
+                        mergeWaitingStatus(existNotice.getId());
 					}
-					existNotice.setDelivery(notice.getDelivery());// 交期
+					existNotice.setDelivery(notice.getDelivery());
 					notices.add(existNotice);
 				}
 			}
@@ -95,7 +108,21 @@ public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
 		return notices;
 	}
 
-	/**
+    /**
+     * 更新发货提醒备料状态
+     *
+     * @param noticeId 发货单id
+     */
+    private void mergeWaitingStatus(Long noticeId) {
+        String sql = "update purc$notice,purc$orderitems set is_waiting = PURC_NOTICE_WAIT_TO_SEND(pn_delivery, coalesce(pr_ltinstock, 0)) " +
+                "where pn_pdid = pd_id and pn_id = " + noticeId;
+        jdbcTemplate.execute(sql);
+        communalLogDao.save(new CommunalLog("更新发货提醒备料状态", "通过发货提醒更新备料状态", "发货单id: " + noticeId,
+                SystemSession.getUser().getEnterprise().getUu()));
+    }
+
+
+    /**
 	 * 将平台的发货提醒封装成ERP系统的发货提醒
 	 *
 	 * @param noticeList 平台发货提醒
@@ -110,72 +137,9 @@ public class PurchaseNotifyServiceImpl implements PurchaseNotifyService {
 		return notifyList;
 	}
 
-
 	@Override
 	public List<List<PurchaseNotice>> convertEDIPurchaseNotify(List<PurchaseNotify> notifies, Long enUU) {
 		List<List<PurchaseNotice>> allNotices = new ArrayList<List<PurchaseNotice>>();
-		List<PurchaseNotice> notices = new ArrayList<PurchaseNotice>();
-		List<PurchaseNotice> oppNotices = new ArrayList<PurchaseNotice>();
-		for (PurchaseNotify notify : notifies) {
-			PurchaseNotice notice = notify.convertEDI(enUU);
-			List<PurchaseNotice> existNotices = purchaseNoticeDao.findByEnUUAndSourceId(enUU,
-					notice.getSourceId());
-			if (CollectionUtils.isEmpty(existNotices)) {// sourceId不存在新增保存
-				List<PurchaseOrderItem> orderItems = purchaseOrderItemDao.findByEnUUAndOrderCodeAndNumber(
-						notice.getEnUU(), notice.getOrderItem().getOrder().getCode(),
-						notice.getOrderItem().getNumber());
-				if (!CollectionUtils.isEmpty(orderItems)) {
-					notice.setOrderItem(orderItems.get(0));
-					notice.setOrderItemId(notice.getOrderItem().getId());
-					notices.add(notice);
-				}
-			} else {// 对现有的单据,修改
-				PurchaseNotice existNotice = existNotices.get(0);
-				SimpleDateFormat dateFormat = new SimpleDateFormat("MM月dd日");
-				String dateString = dateFormat.format(new Date());
-				String remark = "";
-				if (StringUtils.hasText(existNotice.getRemark())) {
-					remark = existNotice.getRemark() + "; ";
-				}
-				existNotice.setSendStatus((short) Status.NOT_UPLOAD.value());// 对卖家传输状态
-				// 待上传
-				if (existNotice.getQty() != null && !existNotice.getQty().equals(notice.getQty())) {
-					if (existNotice.getEndQty() > notice.getQty()) {
-						// 已发货数大于新的需求数,修改平台上的需求数为已发货数,将已发货数量传回买家ERP修改发货提醒的数量
-						existNotice.setRemark(remark + dateString + "修改需求数量," + existNotice.getQty() + " -> "
-								+ existNotice.getEndQty());
-						existNotice.setQty(existNotice.getEndQty());// 需求数量
-						existNotice.setStatus((short) Status.REPLIED.value());// 状态
-						// 已回复
-						oppNotices.add(existNotice);
-						notices.add(existNotice);
-					} else {
-						// 已发货数小于或等于新的需求数,修改平台上的需求数为新的需求数
-						existNotice.setRemark(
-								remark + dateString + "修改需求数量," + existNotice.getQty() + " -> " + notice.getQty());
-						existNotice.setQty(notice.getQty());// 需求数量
-						existNotice.setDelivery(notice.getDelivery());// 交期
-						notices.add(existNotice);
-					}
-				} else {
-					String existDeliveryStr = "空";
-					String deliveryStr = "空";
-					if (existNotice.getDelivery() != null) {
-						existDeliveryStr = dateFormat.format(existNotice.getDelivery());
-					}
-					if (notice.getDelivery() != null) {
-						deliveryStr = dateFormat.format(notice.getDelivery());
-					}
-					if (!existDeliveryStr.equals(deliveryStr)) {
-						existNotice.setRemark(remark + dateString + "修改交期," + existDeliveryStr + " -> " + deliveryStr);
-					}
-					existNotice.setDelivery(notice.getDelivery());// 交期
-					notices.add(existNotice);
-				}
-			}
-		}
-		allNotices.add(notices);
-		allNotices.add(oppNotices);
 		return allNotices;
 	}
 

+ 1 - 1
src/main/java/com/uas/platform/b2b/erp/service/impl/PurchaseProdInOutServiceImpl.java

@@ -411,7 +411,7 @@ public class PurchaseProdInOutServiceImpl implements PurchaseProdInOutService {
 		if (!CollectionUtils.isEmpty(prodInOuts)) {
 			for (ProdInOutRefreshPrice prod : prodInOuts) {
 				PurchaseAcceptItem acceptItem = purchaseAcceptItemDao.findByEnUUAndCodeAndNumber(
-						SystemSession.getUser().getEnterprise().getUu(), prod.getPbu_inoutno(), prod.getPbu_pdno());
+						SystemSession.getUser().getEnterprise().getUu(), prod.getPbu_inoutno(), prod.getPd_orderdetno());
 				if (null != acceptItem) {
                     PurcAcceptItem item = new PurcAcceptItem();
                     BeanUtils.copyProperties(acceptItem, item, PurcAcceptItem.class);

+ 2 - 1
src/main/java/com/uas/platform/b2b/erp/service/impl/VendorPerformanceAssessErpServiceImpl.java

@@ -32,7 +32,8 @@ public class VendorPerformanceAssessErpServiceImpl implements VendorPerformanceA
                 vpaResult = list.get(0);
             }
 
-            if (vpaResult == null) {// 平台上不存在的新上传上来的物料,新增
+            // 平台上不存在的新上传上来的物料,新增
+            if (vpaResult == null) {
                 vaps.add(vpaErp.convert(enUU));
             } else {// 平台上已经存在的物料,修改
                 //TODO 不需要?

+ 15 - 1
src/main/java/com/uas/platform/b2b/model/ApbillAdjustment.java

@@ -111,6 +111,12 @@ public class ApbillAdjustment implements Serializable {
 	@Column(name = "aa_prodtitle")
 	private String prodtitle;
 
+	/**
+	 * 物料单位
+	 */
+	@Column(name = "aa_produnit")
+	private String prodUnit;
+
 	/**
 	 * 总数量
 	 */
@@ -312,7 +318,15 @@ public class ApbillAdjustment implements Serializable {
 		this.prodtitle = prodtitle;
 	}
 
-	public Double getOrderprice() {
+    public String getProdUnit() {
+        return prodUnit;
+    }
+
+    public void setProdUnit(String prodUnit) {
+        this.prodUnit = prodUnit;
+    }
+
+    public Double getOrderprice() {
 		return orderprice;
 	}
 

+ 13 - 0
src/main/java/com/uas/platform/b2b/model/ErpProdIODetail.java

@@ -77,6 +77,11 @@ public class ErpProdIODetail implements Serializable {
      */
     private String prodtitle;
 
+    /**
+     * 客户物料描述
+     */
+    private String produnit;
+
     /**
      * 客户验收数量
      */
@@ -250,6 +255,14 @@ public class ErpProdIODetail implements Serializable {
         this.prodtitle = prodtitle;
     }
 
+    public String getProdunit() {
+        return produnit;
+    }
+
+    public void setProdunit(String produnit) {
+        this.produnit = produnit;
+    }
+
     public Double getQty() {
         return qty;
     }

+ 17 - 11
src/main/java/com/uas/platform/b2b/model/Product.java

@@ -4,17 +4,7 @@ import com.uas.platform.core.persistence.EnterpriseUU;
 import com.uas.platform.core.persistence.Logger;
 import com.uas.platform.core.persistence.UserUU;
 
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Index;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.persistence.Transient;
+import javax.persistence.*;
 import javax.validation.constraints.NotNull;
 import java.util.Date;
 import java.util.Set;
@@ -362,6 +352,14 @@ public class Product {
 	@Column(name = "pr_b2bdisabled", insertable = false, updatable = false)
 	private Short b2bDisabled;
 
+	/**
+	 * 公共库启用状态
+	 * 1: 启用
+	 * 0: 禁用
+	 */
+	@Transient
+	private Short b2cEnabled;
+
 	/**
 	 * 匹配的料号(买方)(用于供应商推荐接口匹配状态)
 	 */
@@ -792,6 +790,14 @@ public class Product {
 		this.b2bDisabled = b2bDisabled;
 	}
 
+	public Short getB2cEnabled() {
+		return b2cEnabled;
+	}
+
+	public void setB2cEnabled(Short b2cEnabled) {
+		this.b2cEnabled = b2cEnabled;
+	}
+
 	public String getIfMatched() {
 		return ifMatched;
 	}

+ 0 - 7
src/main/java/com/uas/platform/b2b/model/ProductUsers.java

@@ -71,13 +71,6 @@ public class ProductUsers implements Serializable {
 
     }
 
-    public ProductUsers(Long prId, Long enUU, Long userUU, Date date) {
-        this.setPrid(prId);
-        this.setEnuu(enUU);
-        this.setUseruu(userUU);
-        this.setDate(date);
-    }
-
     public Long getId() {
         return id;
     }

+ 15 - 1
src/main/java/com/uas/platform/b2b/model/PurchaseApCheckItem.java

@@ -90,6 +90,12 @@ public class PurchaseApCheckItem implements Serializable {
 	@Column(name = "pai_prodspec")
 	private String prodSpec;
 
+	/**
+	 * 物料单位
+	 */
+	@Column(name = "pai_produnit")
+	private String prodUnit;
+
 	/**
 	 * 单价
 	 */
@@ -381,7 +387,15 @@ public class PurchaseApCheckItem implements Serializable {
 		this.prodSpec = prodSpec;
 	}
 
-	public String getSendcode() {
+    public String getProdUnit() {
+        return prodUnit;
+    }
+
+    public void setProdUnit(String prodUnit) {
+        this.prodUnit = prodUnit;
+    }
+
+    public String getSendcode() {
 		return sendcode;
 	}
 

+ 1 - 1
src/main/java/com/uas/platform/b2b/model/PurchaseOrderChangeItem.java

@@ -234,7 +234,7 @@ public class PurchaseOrderChangeItem {
 			this.newProductTitle = newProduct.getTitle();
 			this.newProductSpec = newProduct.getSpec();
 			this.newProductUnit = newProduct.getUnit();
-			this.newProductSourceId = oldProduct.getSourceId();
+			this.newProductSourceId = newProduct.getSourceId();
 		}
 		this.newProduct = newProduct;
 	}

+ 192 - 1
src/main/java/com/uas/platform/b2b/model/VendorPerformanceAssess.java

@@ -1,9 +1,9 @@
 package com.uas.platform.b2b.model;
 
 import javax.persistence.*;
+import javax.validation.constraints.NotNull;
 import java.io.Serializable;
 import java.util.Date;
-import javax.validation.constraints.NotNull;
 
 /**
  * 供应商绩效考核
@@ -17,6 +17,9 @@ public class VendorPerformanceAssess implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
+    /**
+     * id
+     */
     @Id
     @GeneratedValue(strategy = GenerationType.AUTO)
     @Column(name = "id")
@@ -36,179 +39,353 @@ public class VendorPerformanceAssess implements Serializable {
     @JoinColumn(name = "enuu", insertable = false, updatable = false)
     private EnterpriseInfo enterprise;
 
+    /**
+     * erp vpa_id
+     */
     @Column(name = "vpa_id")
     @NotNull
     private Long vpaId;
 
+    /**
+     * 编号
+     */
     @Column(name = "vpa_code")
     @NotNull
     private String vpaCode;
 
+    /**
+     * 状态
+     */
     @Column(name = "vpa_status")
     private String vpaStatus;
 
+    /**
+     * 录入人
+     */
     @Column(name = "vpa_recordman")
     private String vpaRecordman;
 
+    /**
+     * 录入日期
+     */
     @Column(name = "vpa_recorddate")
     private Date vpaRecorddate;
 
+    /**
+     * 状态码
+     */
     @Column(name = "vpa_statuscode")
     private String vpaStatuscode;
 
+    /**
+     * 申请人
+     */
     @Column(name = "vpa_applyman")
     private String vpaApplyman;
 
+    /**
+     * 申请部门
+     */
     @Column(name = "vpa_applydep")
     private String vpaApplydep;
 
+    /**
+     * 申请日期
+     */
     @Column(name = "vpa_applydate")
     private Date vpaApplydate;
 
+    /**
+     * 考核期间
+     */
     @Column(name = "vpa_assessdate")
     private String vpaAssessdate;
 
+    /**
+     * 采购跟单
+     */
     @Column(name = "vpa_purchasecode")
     private String vpaPurchasecode;
 
+    /**
+     * SQE
+     */
     @Column(name = "vpa_sqe")
     private String vpaSqe;
 
+    /**
+     * 物料认定组
+     */
     @Column(name = "vpa_orderteam")
     private String vpaOrderteam;
 
+    /**
+     * 供应商号
+     */
     @Column(name = "vpa_vendorcode")
     private String vpaVendorcode;
 
+    /**
+     * 供应商名
+     */
     @Column(name = "vpa_vendorname")
     private String vpaVendorname;
 
+    /**
+     * 物料类别
+     */
     @Column(name = "vpa_prodkind")
     private String vpaProdkind;
 
+    /**
+     * 来料批不合格率(15分)
+     */
     @Column(name = "vpa_llpbhgl")
     private Double vpaLlpbhgl;
 
+    /**
+     * 上线不良率(25分)
+     */
     @Column(name = "vpa_sxbll")
     private Double vpaSxbll;
 
+    /**
+     * 客户失效次数(10分)
+     */
     @Column(name = "vpa_khsxcs")
     private Double vpaKhsxcs;
 
+    /**
+     * 产线重大异常(10分)
+     */
     @Column(name = "vpa_cxzdyc")
     private Double vpaCxzdyc;
 
+    /**
+     * 8D回复及时率(5分)
+     */
     @Column(name = "vpa_8dhfjsl")
     private Double vpa8dhfjsl;
 
+    /**
+     * 异常复发率(10分)
+     */
     @Column(name = "vpa_ycffl")
     private Double vpaYcffl;
 
+    /**
+     * 供方配合度(25分)
+     */
     @Column(name = "vpa_gfphd")
     private Double vpaGfphd;
 
+    /**
+     * 质量综合得分
+     */
     @Column(name = "vpa_zlzhdf")
     private Double vpaZlzhdf;
 
+    /**
+     * 质量权重得分(30%)
+     */
     @Column(name = "vpa_zlqzdf")
     private Double vpaZlqzdf;
 
+    /**
+     * 技术支持(10分)
+     */
     @Column(name = "vpa_jszc")
     private Double vpaJszc;
 
+    /**
+     * 技术标准(10分)
+     */
     @Column(name = "vpa_jsbz")
     private Double vpaJsbz;
 
+    /**
+     * 技术分析(10分)
+     */
     @Column(name = "vpa_jsfx")
     private Double vpaJsfx;
 
+    /**
+     * 技术资料完整情况(15分)
+     */
     @Column(name = "vpa_jszlwzqk")
     private Double vpaJszlwzqk;
 
+    /**
+     * 样品合格率(5分)
+     */
     @Column(name = "vpa_yphgl")
     private Double vpaYphgl;
 
+    /**
+     * 研发/工程实力(10分)
+     */
     @Column(name = "vpa_gcsl")
     private Double vpaGcsl;
 
+    /**
+     * 可靠性要求/条件(20分)
+     */
     @Column(name = "vpa_kkxyq")
     private Double vpaKkxyq;
 
+    /**
+     * 物料是否发生技术质量问题(20分)
+     */
     @Column(name = "vpa_wlsffsjszlwt")
     private Double vpaWlsffsjszlwt;
 
+    /**
+     * 技术综合得分
+     */
     @Column(name = "vpa_jszhdf")
     private Double vpaJszhdf;
 
+    /**
+     * 技术权重得分(30%)
+     */
     @Column(name = "vpa_jsqzdf")
     private Double vpaJsqzdf;
 
+    /**
+     * 成本降价(50分)
+     */
     @Column(name = "vpa_cbjj")
     private Double vpaCbjj;
 
+    /**
+     * 支付条件(20分)
+     */
     @Column(name = "vpa_zftj")
     private Double vpaZftj;
 
+    /**
+     * 打样支持(15分)
+     */
     @Column(name = "vpa_dyzc")
     private Double vpaDyzc;
 
+    /**
+     * 服务支持(15分)
+     */
     @Column(name = "vpa_fwzc")
     private Double vpaFwzc;
 
+    /**
+     * 采购开发综合得分
+     */
     @Column(name = "vpa_cgkfzhdf")
     private Double vpaCgkfzhdf;
 
+    /**
+     * 物料交付(50分)
+     */
     @Column(name = "vpa_wljf")
     private Double vpaWljf;
 
+    /**
+     * 停线/调计划次数(30分)
+     */
     @Column(name = "vpa_djhcs")
     private Double vpaDjhcs;
 
+    /**
+     * NG品处理(10分)
+     */
     @Column(name = "vpa_ngpcl")
     private Double vpaNgpcl;
 
+    /**
+     * 服务响应(10分)
+     */
     @Column(name = "vpa_fwxl")
     private Double vpaFwxl;
 
+    /**
+     * 采购综合得分
+     */
     @Column(name = "vpa_cgzhdf")
     private Double vpaCgzhdf;
 
+    /**
+     * 采购及采购开发权重得分(各20%)
+     */
     @Column(name = "vpa_cgjcgkfqzdf")
     private Double vpaCgjcgkfqzdf;
 
+    /**
+     * 总计得分
+     */
     @Column(name = "vpa_zjdf")
     private Double vpaZjdf;
 
+    /**
+     * 供应商确认得分
+     */
     @Column(name = "vpa_gysqrdf")
     private String vpaGysqrdf;
 
+    /**
+     * 不认可原因
+     */
     @Column(name = "vpa_brkyy")
     private String vpaBrkyy;
 
+    /**
+     * 质量评分附件
+     */
     @Column(name = "vpa_zlpffj")
     private String vpaZlpffj;
 
+    /**
+     * 技术评分附件
+     */
     @Column(name = "vpa_jspffj")
     private String vpaJspffj;
 
+    /**
+     * 采购评分附件
+     */
     @Column(name = "vpa_cgpffj")
     private String vpaCgpffj;
 
+    /**
+     * 审核日期
+     */
     @Column(name = "vpa_auditdate")
     private Date vpaAuditdate;
 
+    /**
+     * 审核人
+     */
     @Column(name = "vpa_auditor")
     private String vpaAuditor;
 
+    /**
+     * 基本信息附件
+     */
     @Column(name = "vpa_jbxxfj")
     private String vpaJbxxfj;
 
+    /**
+     * 采购跟踪人
+     */
     @Column(name = "vpa_purchasename")
     private String vpaPurchasename;
 
+    /**
+     * SQE人
+     */
     @Column(name = "vpa_sqename")
     private String vpaSqename;
 
+    /**
+     * 物料认定人
+     */
     @Column(name = "vpa_ordername")
     private String vpaOrdername;
 
@@ -219,6 +396,12 @@ public class VendorPerformanceAssess implements Serializable {
     @NotNull
     private Long vpaVeuu;
 
+    /**
+     * 供应商等级
+     */
+    @Column(name = "vpa_grade")
+    private String vpaGrade;
+
     public Long getId() {
         return id;
     }
@@ -714,4 +897,12 @@ public class VendorPerformanceAssess implements Serializable {
     public void setVpaVeuu(Long vpaVeuu) {
         this.vpaVeuu = vpaVeuu;
     }
+
+    public String getVpaGrade() {
+        return vpaGrade;
+    }
+
+    public void setVpaGrade(String vpaGrade) {
+        this.vpaGrade = vpaGrade;
+    }
 }

+ 5 - 6
src/main/java/com/uas/platform/b2b/ps/InquiryUtils.java

@@ -11,7 +11,6 @@ import com.uas.platform.b2b.temporary.model.InquiryDetailInfo;
 import com.uas.platform.b2b.temporary.model.InquiryMessage;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.util.HttpUtil;
-import com.uas.platform.core.util.serializer.FlexJsonUtils;
 import com.uas.sso.support.Page;
 import org.apache.http.HttpStatus;
 import org.springframework.ui.ModelMap;
@@ -40,7 +39,7 @@ public class InquiryUtils {
      * @throws Exception
      */
     public static PublicInquiryItemInfo save(PublicInquiryItemInfo item) throws Exception {
-        String res = HttpUtil.doPost(url + "/inquiry/sale/item/save",  FlexJsonUtils.toJsonDeep(item));
+        String res = HttpUtil.doPost(url + "/inquiry/sale/item/saveQuote",  JSONObject.toJSONString(item));
         if (null != res) {
             Object obj = JSON.parse(res);
             return JSON.parseObject(obj.toString(), PublicInquiryItemInfo.class);
@@ -83,7 +82,7 @@ public class InquiryUtils {
         formData.put("enuu", enuu);
         HttpUtil.Response res = HttpUtil.sendGetRequest(url + "/inquiry/sale/publicInquiry/detail", formData);
         ModelMap map = new ModelMap();
-        if (res.getStatusCode() == 200) {
+        if (res.getStatusCode() == HttpStatus.SC_OK) {
             JSONObject jsonObject = JSONObject.parseObject(res.getResponseText());
             String itemStr = jsonObject.getString("inquiryItem");
             if (null != itemStr) {
@@ -175,8 +174,8 @@ public class InquiryUtils {
      */
     public static Page<PublicInquiryItemInfo> getQuoteInfo(PageInfo pageInfo, SearchFilter searchFilter, String state) throws Exception {
         JSONObject formData = new JSONObject();
-        formData.put("pageInfo", FlexJsonUtils.toJsonDeep(pageInfo));
-        formData.put("filter", FlexJsonUtils.toJsonDeep(searchFilter));
+        formData.put("pageInfo", JSON.toJSONString(pageInfo));
+        formData.put("filter", JSON.toJSONString(searchFilter));
         if (null != state) {
             formData.put("_state", state);
         }
@@ -258,7 +257,7 @@ public class InquiryUtils {
      * @throws Exception
      */
     public static PurcInquiry saveInquiry(PurcInquiry inquiry) throws Exception {
-        String res = HttpUtil.doPost(url + "/inquiry/buyer/save", FlexJsonUtils.toJsonDeep(inquiry));
+        String res = HttpUtil.doPost(url + "/inquiry/buyer/save", JSON.toJSONString(inquiry));
         if (null != res) {
             Object obj = JSON.parse(res);
             return JSON.parseObject(obj.toString(), PurcInquiry.class);

+ 57 - 0
src/main/java/com/uas/platform/b2b/ps/ProductUtils.java

@@ -13,6 +13,8 @@ import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.util.HttpUtil;
 import com.uas.platform.core.util.HttpUtil.Response;
 import com.uas.platform.core.util.serializer.FlexJsonUtils;
+import com.uas.search.b2b.model.PageParams;
+import com.uas.search.b2b.model.SPage;
 import com.uas.sso.support.Page;
 import org.apache.commons.collections.map.HashedMap;
 import org.apache.http.protocol.HTTP;
@@ -476,6 +478,60 @@ public class ProductUtils {
         return null;
     }
 
+    /**
+     * 搜索物料资料
+     *
+     * @param pageParams 分页参数
+     * @param keyword 关键字
+     * @return
+     */
+    public static SPage<Product> searchProducts(String keyword, PageParams pageParams) {
+        Response res = null;
+        try {
+            JSONObject formData = JSON.parseObject(JSON.toJSONString(pageParams));
+            if (null != keyword) {
+                formData.put("keyword", keyword);
+            }
+            res = HttpUtil.sendGetRequest(PRODUCT_PUBLIC_SERVICE_URL + "/product/get/searchProducts", formData);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (HttpStatus.OK.value() == res.getStatusCode()) {
+            return (SPage)JSONObject.parseObject(res.getResponseText(), new TypeReference<SPage<Product>>() {
+            }, new Feature[0]);
+        } else {
+            logger.error("searchProducts http response status error: " + res.getStatusCode());
+        }
+        return null;
+    }
+
+    /**
+     * 搜索个人物料资料
+     *
+     * @param pageParams 分页参数
+     * @param keyword 关键字
+     * @return
+     */
+    public static SPage<ProductUsers> searchProductUsers(String keyword, PageParams pageParams) {
+        Response res = null;
+        try {
+            JSONObject formData = JSON.parseObject(JSON.toJSONString(pageParams));
+            if (null != keyword) {
+                formData.put("keyword", keyword);
+            }
+            res = HttpUtil.sendGetRequest(PRODUCT_PUBLIC_SERVICE_URL + "/product/get/findProductUsers", formData);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (HttpStatus.OK.value() == res.getStatusCode()) {
+            return (SPage)JSONObject.parseObject(res.getResponseText(), new TypeReference<SPage<ProductUsers>>() {
+            }, new Feature[0]);
+        } else {
+            logger.error("searchProducts http response status error: " + res.getStatusCode());
+        }
+        return null;
+    }
+
     /**
      * 将List转为StringBuffer
      *
@@ -564,4 +620,5 @@ public class ProductUtils {
         }
         return null;
     }
+
 }

+ 0 - 41
src/main/java/com/uas/platform/b2b/search/SearchController.java

@@ -1,6 +1,5 @@
 package com.uas.platform.b2b.search;
 
-import com.uas.sso.entity.UserSpaceDetail;
 import com.uas.platform.b2b.model.*;
 import com.uas.search.b2b.model.PageParams;
 import com.uas.search.b2b.model.SPage;
@@ -230,46 +229,6 @@ public class SearchController {
 		return searchService.searchPurchaseApCheckIds(keyword, pageParams);
 	}
 
-	/**
-	 * 物料信息表:products全部
-	 */
-	@RequestMapping("/products")
-	@ResponseBody
-	public SPage<Product> searchProductsCheckIds(String keyword, PageParams pageParams) {
-		return searchService.searchProductsCheckIds(keyword, pageParams);
-	}
-	
-	/**
-	 * 物料信息表:products标准
-	 */
-	@RequestMapping("/products_standard")
-	@ResponseBody
-	public SPage<Product> searchProductsStandardCheckIds(String keyword, PageParams pageParams) {
-		return searchService.searchProductsStandardCheckIds(keyword, pageParams);
-	}
-
-	/**
-	 * 物料信息表:products非标准
-	 */
-	@RequestMapping("/products_nonstandard")
-	@ResponseBody
-	public SPage<Product> searchProductsNonStandardCheckIds(String keyword, PageParams pageParams) {
-		return searchService.searchProductsNonStandardCheckIds(keyword, pageParams);
-	}
-
-	/**
-	 * 器件信息表
-	 * 
-	 * @param keyword
-	 * @param pageParams
-	 * @return
-	 */
-	@RequestMapping("/component")
-	@ResponseBody
-	public SPage<Component> searchProductComponentCheckIds(String keyword,PageParams pageParams) {
-		return searchService.searchProductComponentCheckIds(keyword, pageParams);
-	}
-	
 	/**
 	 * 企业列表
 	 * 

+ 9 - 53
src/main/java/com/uas/platform/b2b/search/SearchService.java

@@ -284,41 +284,6 @@ public interface SearchService {
 	public com.uas.search.b2b.model.PageParams convertPageParams(com.uas.platform.core.model.PageParams params,
 			String searchFilter);
 
-	/**
-	 * 物料资料
-	 * 
-	 * @param keyword
-	 * @param pageParams
-	 * @return
-	 */
-	public SPage<Product> searchProductsCheckIds(String keyword, PageParams pageParams);
-
-	/**
-	 * 物料资料(标准)
-	 * 
-	 * @param keyword
-	 * @param pageParams
-	 * @return
-	 */
-	public SPage<Product> searchProductsStandardCheckIds(String keyword, PageParams pageParams);
-
-	/**
-	 * 物料资料(非标准)
-	 * 
-	 * @param keyword
-	 * @param pageParams
-	 * @return
-	 */
-	public SPage<Product> searchProductsNonStandardCheckIds(String keyword, PageParams pageParams);
-
-	/**
-	 * 器件信息
-	 * @param keyword
-	 * @param pageParams
-	 * @return
-	 */
-	public SPage<Component> searchProductComponentCheckIds(String keyword, PageParams pageParams);
-
 	/**
 	 * 企业列表
 	 * 
@@ -389,7 +354,7 @@ public interface SearchService {
 	 * @param keyword
 	 * @return
 	 */
-	public List<Map<String, Object>> getSimilarCustomers(String keyword);
+	List<Map<String, Object>> getSimilarCustomers(String keyword);
 
 	List<Map<String, Object>> getSimilarVendors(String keyword);
 
@@ -401,7 +366,7 @@ public interface SearchService {
 	 * @return
 	 * @throws Exception
 	 */
-	public SPage<UserSpaceView> searchUserSpaceDetailCheckIds(String keyword, PageParams pageParams) throws Exception;
+	SPage<UserSpaceView> searchUserSpaceDetailCheckIds(String keyword, PageParams pageParams) throws Exception;
 
 	/**
 	 * 企业圈联想词
@@ -410,7 +375,7 @@ public interface SearchService {
 	 * @return
 	 * @throws Exception
 	 */
-	public List<Map<String, Object>> getSimilarEnterprise(String keyword) throws Exception;
+	List<Map<String, Object>> getSimilarEnterprise(String keyword) throws Exception;
 
 	/**
 	 * 平台询价单
@@ -419,7 +384,7 @@ public interface SearchService {
 	 * @param pageParams
 	 * @return
 	 */
-	public SPage<PurcInquiry> searchPurcInquiryCheckIds(String keyword, PageParams pageParams);
+	SPage<PurcInquiry> searchPurcInquiryCheckIds(String keyword, PageParams pageParams);
 
 	/**
 	 * 平台询价单详情
@@ -428,7 +393,7 @@ public interface SearchService {
 	 * @param pageParams
 	 * @return
 	 */
-	public SPage<PurcInquiryItemInfo> searchPurcInquiryItemCheckIds(String keyword, PageParams pageParams);
+	SPage<PurcInquiryItemInfo> searchPurcInquiryItemCheckIds(String keyword, PageParams pageParams);
 
 	/**
 	 * 通过关键词查询邀请记录
@@ -436,7 +401,7 @@ public interface SearchService {
 	 * @param keyword
 	 * @return
 	 */
-	public SPage<InvitationRecord> getInvitationByKeyword(String keyword, PageParams pageParams);
+	SPage<InvitationRecord> getInvitationByKeyword(String keyword, PageParams pageParams);
 
 	/**
 	 * 查看当前用户供应商企业信息
@@ -462,7 +427,7 @@ public interface SearchService {
 	 * @param keyword
 	 * @return
 	 */
-	public Kind getKindByKeyword(String keyword) throws Exception;
+	Kind getKindByKeyword(String keyword) throws Exception;
 
 	/**
 	 * 点击关键词返回客户信息
@@ -470,7 +435,7 @@ public interface SearchService {
 	 * @param keyword
 	 * @return
 	 */
-	public Vendor getCustByKeyword(String keyword);
+	Vendor getCustByKeyword(String keyword);
 
 	Page<B2BVendor> searchVendorForErp(String keyword, PageParams pageParams);
 
@@ -483,7 +448,7 @@ public interface SearchService {
 	 * @param pageParams
 	 * @return
 	 */
-	public SPage<SaleQuotationDone> searchSaleQuotationDoneIds(String keyword, PageParams pageParams);
+	SPage<SaleQuotationDone> searchSaleQuotationDoneIds(String keyword, PageParams pageParams);
 
 	/**
 	 * 查找投标提问单
@@ -501,15 +466,6 @@ public interface SearchService {
 	 */
 	SPage<VendorPerformanceAssess> searchVendorPerformanceAssesss(String keyword, PageParams pageParams);
 
-    /**
-     * 个人物料库
-     *
-     * @param keyword
-     * @param pageParams
-     * @return
-     */
-    SPage<ProductUsers> searchProductUsersCheckIds(String keyword, PageParams pageParams);
-
 	/**
 	 *  app查找客户采购询价单
 	 * @param keyword 关键词

+ 0 - 54
src/main/java/com/uas/platform/b2b/search/SearchServiceImpl.java

@@ -8,7 +8,6 @@ import com.uas.platform.b2b.erp.model.B2BVendor;
 import com.uas.platform.b2b.erp.model.SaleTenderErp;
 import com.uas.platform.b2b.erp.model.SaleTenderItemErp;
 import com.uas.platform.b2b.model.*;
-import com.uas.platform.b2b.ps.ProductUtils;
 import com.uas.platform.b2b.service.BrandService;
 import com.uas.platform.b2b.service.ComponentService;
 import com.uas.platform.b2b.service.KindService;
@@ -183,9 +182,6 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
 	@Autowired
 	private VendorPerformanceAssessDao vpaDao;
 
-	@Autowired
-    private ProductUsersDao productUsersDao;
-
 	@Autowired
 	private SaleTenderQuestionDao saleTenderQuestionDao;
 
@@ -766,48 +762,6 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
 		return toSPage(idsPage, content);
 	}
 
-	@Override
-	public SPage<Product> searchProductsCheckIds(String keyword, PageParams pageParams) {
-		SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.V$PRODUCTS, pageParams);
-		List<Product> content = new ArrayList<>();
-		// 超过1000就切割
-		if (idsPage.getContent().size() > SplitArray.QUERY_MAX_NUMBER) {
-			List<List<Long>> idLists = SplitArray.splitAry(idsPage.getContent(), SplitArray.QUERY_MAX_NUMBER);
-			for (List<Long> idList : idLists) {
-				List<Product> products = ProductUtils.findByIds(idList);
-				content.addAll(products);
-			}
-		} else {
-			content = ProductUtils.findByIds(idsPage.getContent());
-		}
-		sortByProperty(content, Product.class, "id", idsPage.getContent());
-		return toSPage(idsPage, content);
-	}
-
-	@Override
-	public SPage<Product> searchProductsStandardCheckIds(String keyword, PageParams pageParams) {
-		SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PRODUCTS_STANDARD, pageParams);
-		List<Product> content = ProductUtils.findByIds(idsPage.getContent());
-		sortByProperty(content, Product.class, "id", idsPage.getContent());
-		return toSPage(idsPage, content);
-	}
-
-	@Override
-	public SPage<Product> searchProductsNonStandardCheckIds(String keyword, PageParams pageParams) {
-		SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PRODUCTS_NONSTANDARD, pageParams);
-		List<Product> content = ProductUtils.findByIds(idsPage.getContent());
-		sortByProperty(content, Product.class, "id", idsPage.getContent());
-		return toSPage(idsPage, content);
-	}
-
-	@Override
-	public SPage<Component> searchProductComponentCheckIds(String keyword, PageParams pageParams) {
-		SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PRODUCT$COMPONENT, pageParams);
-		List<Component> content = componentService.findAll(idsPage.getContent());
-		sortByProperty(content, Component.class, "id", idsPage.getContent());
-		return toSPage(idsPage, content);
-	}
-
 	@Override
 	public SPage<Enterprise> searchEnterpriseCheckIds(String keyword, PageParams pageParams) {
 		SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.SEC$ENTERPRISES, pageParams);
@@ -1388,14 +1342,6 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
 		return toSPage(idsPage, content);
 	}
 
-    @Override
-    public SPage<ProductUsers> searchProductUsersCheckIds(String keyword, PageParams pageParams) {
-        SPage<Long> idsPage = searchService.searchIds(keyword, Table_name.PRODUCT$USERS, pageParams);
-        List<ProductUsers> content = productUsersDao.findAll(idsPage.getContent());
-        sortByProperty(content, ProductUsers.class, "id", idsPage.getContent());
-        return toSPage(idsPage, content);
-    }
-
 	/**
 	 * app查找客户采购询价单
 	 *

+ 0 - 10
src/main/java/com/uas/platform/b2b/service/ComponentService.java

@@ -1,21 +1,11 @@
 package com.uas.platform.b2b.service;
 
 import com.uas.platform.b2b.model.Component;
-import com.uas.platform.core.model.PageParams;
-import com.uas.search.b2b.model.SPage;
 
 import java.util.List;
 
 public interface ComponentService {
 
-	/**
-	 * 通过kindId查询器件列表
-	 * 
-	 * @param kindid
-	 * @return
-	 */
-	SPage<Component> getCmpListByKindId(Long kindid, PageParams params, String keyword);
-
     Component findByUuid(String uuid) throws Exception;
 
 	List<Component> findAll(List<Long> content);

+ 8 - 12
src/main/java/com/uas/platform/b2b/service/ProductUsersService.java

@@ -1,10 +1,7 @@
 package com.uas.platform.b2b.service;
 
 import com.uas.platform.b2b.model.Product;
-import com.uas.platform.b2b.model.ProductUsers;
 import com.uas.platform.core.exception.IllegalOperatorException;
-import com.uas.platform.core.model.PageInfo;
-import com.uas.search.b2b.model.SPage;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.ui.ModelMap;
 
@@ -17,26 +14,20 @@ import java.util.List;
  */
 public interface ProductUsersService {
 
-    /**
-     * 通过分页信息展示所有个人的物料(不搜索)
-     *
-     * @param pageInfo
-     * @return
-     */
-    SPage<ProductUsers> findProductInfoByPageInfo(PageInfo pageInfo);
-
     /**
      * 新增个人物料信息
      *
      * @param prodInfo
      * @return
+     * @throws Exception
      */
     ModelMap addNewProduct(Product prodInfo) throws Exception;
 
     /**
      * 通过id解除物料绑定关系
      *
-     * @param id
+     * @param id 个人物料对应id
+     * @throws Exception
      */
     void deleteById(Long id) throws Exception;
 
@@ -45,6 +36,7 @@ public interface ProductUsersService {
      *
      * @param workbook
      * @return
+     * @throws IllegalOperatorException
      */
     ModelMap releaseByWorkbook(Workbook workbook) throws IllegalOperatorException;
 
@@ -52,6 +44,7 @@ public interface ProductUsersService {
      * 批量转入我的产品库
      *
      * @param ids
+     * @throws Exception
      */
     ModelMap coverToUserProd(String ids) throws Exception;
 
@@ -59,12 +52,14 @@ public interface ProductUsersService {
      * 单个转入我的物料
      *
      * @param id
+     * @throws Exception
      */
     void coverToUserProd(Long id) throws Exception;
 
     /**
      * 批量删除我的产品
      * @param idList
+     * @throws Exception
      */
     void deleteByBatch(List<Long> idList) throws Exception;
 
@@ -74,6 +69,7 @@ public interface ProductUsersService {
      * @param id
      * @param enuu
      * @param useruu
+     * @param method
      */
     void coverToMyProduct(Long id, Long enuu, Long useruu, String method);
 }

+ 2 - 2
src/main/java/com/uas/platform/b2b/service/impl/BaseInfoServiceImpl.java

@@ -717,13 +717,13 @@ public class BaseInfoServiceImpl implements BaseInfoService {
 		pageParams.getFilters().put("pr_issale", Constant.YES);
 
 		HashMap<String, Object> map = new HashMap<>();
-		map.put("pr_b2bdisabled", Constant.YES);
+		map.put("pr_b2cenabled", Constant.YES);
 		pageParams.setNotEqualFilters(map);
 
 		List<Sort> sortList = new ArrayList<>();
 		sortList.add(new Sort("pr_id", false, Type.INT, new Long(1)));
 		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
-		SPage<Product> sproducts = searchService.searchProductsCheckIds(keyword, pageParams);
+		SPage<Product> sproducts = ProductUtils.searchProducts(keyword, pageParams);
 		List<Product> products = sproducts.getContent();
 		List<ProdInfo> prodInfos = new ArrayList<ProdInfo>();
 		if (!CollectionUtils.isEmpty(products)) {

+ 0 - 7
src/main/java/com/uas/platform/b2b/service/impl/ComponentServiceImpl.java

@@ -5,9 +5,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2b.model.Component;
 import com.uas.platform.b2b.service.ComponentService;
 import com.uas.platform.b2b.support.SysConf;
-import com.uas.platform.core.model.PageParams;
 import com.uas.platform.core.util.HttpUtil;
-import com.uas.search.b2b.model.SPage;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -20,11 +18,6 @@ public class ComponentServiceImpl implements ComponentService {
 	@Autowired
 	private SysConf conf;
 
-	@Override
-	public SPage<Component> getCmpListByKindId(Long kindid, PageParams params, String keyword) {
-		return null;
-	}
-
 	@Override
 	public Component findByUuid(String uuid) throws Exception {
         HttpUtil.Response res = HttpUtil.sendGetRequest(conf.getB2c() + "/api/product/component/Info/" + uuid, null);

+ 20 - 23
src/main/java/com/uas/platform/b2b/service/impl/EnquiryServiceImpl.java

@@ -1,24 +1,23 @@
  package com.uas.platform.b2b.service.impl;
 
  import com.uas.platform.b2b.model.*;
- import com.uas.platform.b2b.ps.InquiryUtils;
- import com.uas.platform.b2b.service.AttachService;
- import com.uas.platform.b2b.service.EnquiryService;
- import com.uas.platform.b2b.support.SPageUtils;
- import com.uas.platform.b2b.support.SystemSession;
- import com.uas.platform.core.exception.IllegalOperatorException;
- import com.uas.platform.core.exception.NotFoundException;
- import com.uas.platform.core.model.PageInfo;
- import com.uas.platform.core.model.Status;
- import com.uas.search.b2b.model.SPage;
- import com.uas.sso.support.Page;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import org.springframework.ui.ModelMap;
+import com.uas.platform.b2b.ps.InquiryUtils;
+import com.uas.platform.b2b.service.AttachService;
+import com.uas.platform.b2b.service.EnquiryService;
+import com.uas.platform.b2b.support.SPageUtils;
+import com.uas.platform.b2b.support.SystemSession;
+import com.uas.platform.core.exception.NotFoundException;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.Status;
+import com.uas.search.b2b.model.SPage;
+import com.uas.sso.support.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.ui.ModelMap;
 
- import java.util.HashSet;
- import java.util.List;
- import java.util.Set;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 
  /**
  * 公共询价操作方法实现
@@ -116,12 +115,10 @@ public class EnquiryServiceImpl implements EnquiryService {
          }
          inquiryItem.setVendUU(SystemSession.getUser().getEnterprise().getUu());
          inquiryItem.setVendUserUU(SystemSession.getUser().getUserUU());
+         inquiryItem.setSourceId(inquiryItem.getId());
+         inquiryItem.setId(null);
          inquiryItem = InquiryUtils.save(inquiryItem);
-         // 这边的id可能是询价的id,但是不会赋值sourceID,所以如果sourceID有值,应该是已经保存过了
-         if (null != inquiryItem.getSourceId()) {
-            return new ModelMap("success", "报价成功");
-         } else {
-             throw new IllegalOperatorException("报价失败");
-         }
+         return new ModelMap("success", "报价成功");
+
      }
  }

+ 8 - 8
src/main/java/com/uas/platform/b2b/service/impl/ErpProdIODetailServiceImpl.java

@@ -76,7 +76,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
 	    StringBuffer sql = new StringBuffer("select  mr_code as inoutno, mr_date as pidate, mr_rate as rate, mr_receivecode as receivecode, " +
                 "mr_receivename as receivename, '客户委外验退单' as piclass, 'make$returnitem' as sourcetable, ma_code as ordercode, 0 as orderdetno, " +
                 "mri_number as detno,  (-(1) *  mri_qty ) as qty, mri_orderpice as orderprice, mr_currency as currency, mri_taxrate as taxrate, " +
-                "mri_whname as whname, mri_ycheckqty as ycheckqty, pr_code as prodcode, pr_spec as prodspec, pr_title as prodtitle, " +
+                "mri_whname as whname, mri_ycheckqty as ycheckqty, pr_code as prodcode, pr_spec as prodspec, pr_title as prodtitle, pr_unit as produnit, " +
                 "((-(1) *  mri_qty ) - coalesce(mri_ycheckqty, 0)) as thischeckqty, mr_enuu as custuu, mr_venduu as enuu, mri_id as sourceid, " +
                 "mr_sendcode as sendcode, ma_factory as pd_factory, en_name custname from make$return  " +
                 "join make$returnitem on mr_id =  mri_paid " +
@@ -129,7 +129,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                 "ma_receivecode as receivecode, ma_receivename as receivename, '客户委外验收单' as piclass, 'make$acceptitem' as sourcetable, " +
                 "make$orders.ma_code as ordercode, 0 as orderdetno, mai_number as detno, mai_qty as qty, mai_orderpice as orderprice, " +
                 "make$accept.ma_currency as currency, mai_taxrate as taxrate, mai_whname as whname, mai_ycheckqty as ycheckqty, " +
-                "make$orders.pr_code as prodcode, make$orders.pr_spec as prodspec, make$orders.pr_title as prodtitle, " +
+                "make$orders.pr_code as prodcode, make$orders.pr_spec as prodspec, make$orders.pr_title as prodtitle, make$orders.pr_unit as produnit, " +
                 "(mai_qty - coalesce(mai_ycheckqty, 0)) as thischeckqty, make$accept.ma_enuu as custuu, make$accept.ma_venduu as enuu, " +
                 "mai_id as sourceid, ma_sendcode as sendcode, ma_factory as factory, en_name custname from make$accept " +
                 "join make$acceptitem on make$accept.ma_id = mai_paid " +
@@ -181,7 +181,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
 	    StringBuffer sql = new StringBuffer("select  po_code as inoutno, po_date as pidate, po_rate as rate, po_receivecode as receivecode, " +
                 "po_receivename as receivename, '客户不良品出库单' as piclass, 'purc$badoutitem' as sourcetable, pu_code as pd_ordercode, " +
                 "purc$orderitems.pd_number as orderdetno, poi_number as detno, (-(1) * poi_qty ) as qty, 0 as pd_orderprice, po_currency as currency, " +
-                "poi_taxrate as taxrate, poi_whname as whname, poi_ycheckqty as ycheckqty, pr_code as prodcode, pr_spec as prodspec, pr_title as prodtitle, " +
+                "poi_taxrate as taxrate, poi_whname as whname, poi_ycheckqty as ycheckqty, pr_code as prodcode, pr_spec as prodspec, pr_title as prodtitle, pr_unit as produnit, " +
                 "((-(1) * poi_qty ) - coalesce( poi_ycheckqty, 0)) as thischeckqty, po_enuu as custuu, po_venduu as enuu, poi_id as sourceid, " +
                 "po_sendcode as sendcode, purc$orderitems.pd_factory as factory, en_name custname from purc$badout " +
                 "join purc$badoutitem on po_id = poi_poid  " +
@@ -234,7 +234,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
         StringBuffer sql = new StringBuffer("select pb_code as inoutno, pb_date as pidate, pb_rate as rate, pb_receivecode as receivecode, " +
                 "pb_receivename as receivename, '客户不良品入库单' as piclass, 'purc$badinitem' as sourcetable, pu_code as ordercode, " +
                 "pd_number as orderdetno, pbi_number as detno, pbi_qty as qty, 0 as pd_orderprice, pb_currency as currency, pbi_taxrate as taxrate, " +
-                "pbi_whname as whname, pbi_ycheckqty as ycheckqty, pr_code as prodcode, pr_spec as prodspec, pr_title as prodtitle, " +
+                "pbi_whname as whname, pbi_ycheckqty as ycheckqty, pr_code as prodcode, pr_spec as prodspec, pr_title as prodtitle, pr_unit as produnit, " +
                 "(pbi_qty - coalesce(pbi_ycheckqty, 0)) as thischeckqty, pb_enuu as custuu, pb_venduu as enuu, pbi_id as sourceid, " +
                 "pb_sendcode as sendcode, pd_factory as factory, en_name custname from purc$badin " +
                 "join purc$badinitem on pb_id = pbi_pbid " +
@@ -287,7 +287,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
         StringBuffer sql = new StringBuffer("select purc$return.pr_code as inoutno, pr_date as pidate, pr_rate as rate, pr_receivecode as receivecode, " +
                 "pr_receivename as receivename, '客户采购验退单' as piclass, 'purc$returnitem' as sourcetable, pu_code as ordercode, pd_number as orderdetno, " +
                 "pri_number as detno, (-(1) * pri_qty ) as qty, pri_orderprice as orderprice, pr_currency as currency, pri_taxrate as taxrate, " +
-                "pri_whname as whname, purc$returnitem.pr_code as prodcode, purc$returnitem.pr_spec as prodspec, purc$returnitem.pr_title as prodtitle, " +
+                "pri_whname as whname, purc$returnitem.pr_code as prodcode, purc$returnitem.pr_spec as prodspec, purc$returnitem.pr_title as prodtitle, purc$returnitem.pr_unit as produnit, " +
                 "pri_ycheckqty as ycheckqty, ((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) as thischeckqty, pr_enuu as custuu, pr_venduu as enuu, " +
                 "pri_id as sourceid, pr_sendcode as sendcode, pd_factory as factory, en_name custname from purc$return " +
                 "join purc$returnitem on pr_id = pri_prid " +
@@ -340,7 +340,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
         StringBuffer sql = new StringBuffer("select pa_code as inoutno, pa_date as pidate, pa_rate as rate, pa_receivecode as receivcode, " +
                 "pa_receivename as receivename, '客户采购验收单' as piclass, 'purc$acceptitem' as sourcetable, pu_code as ordercode, " +
                 "pd_number as orderdetno, pai_number as detno, pai_qty as qty, pai_orderprice as orderprice, pa_currency as currency, " +
-                "pai_taxrate as taxrate,  pai_whname as whname, purc$acceptitem.pr_code as prodcode, purc$acceptitem.pr_spec as prodspec, " +
+                "pai_taxrate as taxrate,  pai_whname as whname, purc$acceptitem.pr_code as prodcode, purc$acceptitem.pr_spec as prodspec, purc$acceptitem.pr_unit as produnit, " +
                 "purc$acceptitem.pr_title as prodtitle, pai_ycheckqty as ycheckqty, (pai_qty - coalesce(pai_ycheckqty, 0)) as thischeckqty, " +
                 "pa_enuu as custuu, pa_venduu as enuu, pai_id as sourceid, pa_sendcode as sendcode, pd_factory as factory, en_name custname from purc$accept " +
                 "join purc$acceptitem on pai_paid = pa_id " +
@@ -392,10 +392,10 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
     private List<ErpProdIODetail> getAdjustments(StringBuffer distributes, ApcheckKeyWord keyword, Long fromDate, Long endDate, Long enUU) {
         StringBuffer sql = new StringBuffer("select aa_inoutno inoutno, aa_orderdate pidate, aa_rate rate, aa_receivecode receivecode, " +
                 "aa_receivename receivename, '货款调账' as piclass, 'purc$apbilladjustment' as sourcetable, aa_ordercode ordercode, " +
-                "aa_orderdetno orderdetno, aa_detno detno, aa_prid prid, aa_prodcode prodcode, aa_prodspec prodspec, aa_prodtitle prodtitle, " +
+                "aa_orderdetno orderdetno, aa_detno detno, aa_prid prid, aa_prodcode prodcode, aa_prodspec prodspec, aa_prodtitle prodtitle, aa_produnit as produnit, " +
                 "aa_qty qty, aa_orderprice orderprice, aa_currency currency, aa_taxrate taxrate, aa_whname whname, aa_ycheckqty ycheckqty, " +
                 "(aa_qty - coalesce(aa_ycheckqty, 0)) as thischeckqty, aa_custuu custuu, aa_enuu enuu, aa_id sourceid, aa_sendcode sendcode, " +
-                "aa_factory factory, aa_custname custname from purc$apbilladjustment where aa_enuu = ").append(enUU).append(" ");
+                "aa_factory factory, aa_custname custname from purc$apbilladjustment where coalesce(aa_thischeckqty, 0) <> 0 and aa_enuu = ").append(enUU).append(" ");
         if (!StringUtils.isEmpty(keyword.getReceiveName())) {
             sql.append("and aa_receivename = '").append(keyword.getReceiveName()).append("' ");
         }

+ 2 - 33
src/main/java/com/uas/platform/b2b/service/impl/ProductUsersServiceImpl.java

@@ -19,8 +19,6 @@ import com.uas.platform.b2b.support.UsageBufferedLogger;
 import com.uas.platform.core.exception.IllegalOperatorException;
 import com.uas.platform.core.logging.BufferedLoggerManager;
 import com.uas.platform.core.model.Constant;
-import com.uas.platform.core.model.PageInfo;
-import com.uas.search.b2b.model.SPage;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -28,22 +26,18 @@ import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
-import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import org.springframework.ui.ModelMap;
 import org.springframework.util.CollectionUtils;
 
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
 /**
+ * 个人物料
+ *
  * Created by hejq on 2017-11-08.
  */
 @Service
@@ -68,30 +62,6 @@ public class ProductUsersServiceImpl implements ProductUsersService {
      */
     private final static Integer MAX_ROWNUM = 5000;
 
-    @Override
-    public SPage<ProductUsers> findProductInfoByPageInfo(PageInfo pageInfo) {
-        Page<ProductUsers> products = findAllProudctByPageInfo(pageInfo);
-        SPage<ProductUsers> prods = new SPage<ProductUsers>();
-        prods.setContent(products.getContent());
-        prods.setPage(products.getNumber());
-        prods.setSize(products.getSize());
-        prods.setTotalElement(products.getTotalElements());
-        prods.setTotalPage(products.getTotalPages());
-        return prods;
-    }
-
-    private Page<ProductUsers> findAllProudctByPageInfo(final PageInfo pageInfo) {
-        return productUsersDao.findAll(new Specification<ProductUsers>() {
-            @Override
-            public Predicate toPredicate(Root<ProductUsers> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
-                pageInfo.filter("enuu", SystemSession.getUser().getEnterprise().getUu());
-                pageInfo.filter("useruu", SystemSession.getUser().getUserUU());
-                query.where(pageInfo.getPredicates(root, query, builder));
-                return null;
-            }
-        }, pageInfo);
-    }
-
     @Override
     public ModelMap addNewProduct(Product prodInfo) throws Exception {
         ModelMap map = new ModelMap();
@@ -128,7 +98,6 @@ public class ProductUsersServiceImpl implements ProductUsersService {
                     if (products.size() != 0) {
                         prodInfo.setCode(code);
                     }
-
                 }
                 List<Role> roles = roleService.findByEnUUAndUserUU(enuu, useruu);
                 if (!CollectionUtils.isEmpty(roles)) {

+ 4 - 2
src/main/java/com/uas/platform/b2b/service/impl/PurchaseOrderChangeServiceImpl.java

@@ -31,6 +31,7 @@ import javax.persistence.criteria.Predicate;
 import javax.persistence.criteria.Root;
 import javax.transaction.Transactional;
 import java.sql.SQLException;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**
@@ -304,10 +305,11 @@ public class PurchaseOrderChangeServiceImpl implements PurchaseOrderChangeServic
 				orderItem.setReplyRemark("需求数量变更为0,无需回复");
 			}
 		}
-		if (changItem.getNewDelivery().getTime() != orderItem.getDelivery().getTime()) {
+		SimpleDateFormat dateFormat = new SimpleDateFormat("MM月dd日");
+		if (!dateFormat.format(changItem.getNewDelivery()).equals(dateFormat.format(orderItem.getDelivery()))) {
             // 更新备料状态
             jdbcTemplate.execute("update purc$notice,purc$orderitems set is_waiting = PURC_NOTICE_WAIT_TO_SEND(pn_delivery, coalesce(pr_ltinstock, 0)) " +
-					"where pn_pdid = pd_id and pn_pdid " + orderItem.getId());
+					"where pn_pdid = pd_id and pn_pdid = " + orderItem.getId());
             communalLogDao.save(new CommunalLog("更新发货提醒备料状态", "采购变更更新备料状态", "采购明细id: " + orderItem.getId(),
                     SystemSession.getUser().getEnterprise().getUu()));
 		}

+ 14 - 26
src/main/java/com/uas/platform/b2b/v2/controller/EnterpriseController.java

@@ -1,18 +1,11 @@
 package com.uas.platform.b2b.v2.controller;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2b.core.util.ThreadUtils;
 import com.uas.platform.b2b.model.Enterprise;
 import com.uas.platform.b2b.model.EnterpriseBaseInfo;
 import com.uas.platform.b2b.publicapi.service.InviteRecordService;
-import com.uas.platform.b2b.support.CommBufferedLogger;
-import com.uas.platform.b2b.support.SysConf;
 import com.uas.platform.b2b.temporary.model.UserSpaceDetail;
 import com.uas.platform.b2b.v2.service.EnterpriseService;
-import com.uas.platform.core.logging.BufferedLoggerManager;
-import com.uas.sso.common.util.HttpUtil;
-import com.uas.sso.common.util.HttpUtil.ResponseWrap;
 import com.uas.sso.entity.UserSpaceView;
 import com.uas.sso.entity.UserView;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,6 +14,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 
+/**
+ * 企业信息接口
+ * 
+ * @author hejq
+ * @date 2018-08-01 9:05
+ */
 @Controller("v2.EnterpriseController")
 @RequestMapping(value = "/public/enterprise")
 public class EnterpriseController {
@@ -31,15 +30,18 @@ public class EnterpriseController {
 	@Autowired
     private InviteRecordService inviteRecordService;
 
-	@Autowired
-	private SysConf conf;
-
 	@SuppressWarnings("deprecation")
 	@Autowired
 	private com.uas.platform.b2b.service.EnterpriseService enterService;
 
-	private final static CommBufferedLogger logger = BufferedLoggerManager.getLogger(CommBufferedLogger.class);
-
+    /**
+     * 企业信息保存
+     *
+     * @param userSpaceDetail 账户中心企业资料
+     * @param admin 注册人信息
+     * @return
+     * @throws Exception
+     */
 	@RequestMapping(method = RequestMethod.POST)
 	@ResponseBody
 	public UserSpaceView save(UserSpaceView userSpaceDetail, UserView admin) throws Exception {
@@ -47,24 +49,10 @@ public class EnterpriseController {
 			userSpaceDetail.setAdmin(admin);
 			Enterprise enterprise = enterpriseService.save(userSpaceDetail);
 			userSpaceDetail.setSpaceUU(enterprise.getUu());
-			// 为兼容以前模式,同时知会下管理系统。管理系统主要为了获取企业uu
 		}
 		return null;
 	}
 
-	private String syncToManager(UserSpaceView userSpaceDetail) throws Exception {
-		JSONObject formData = JSON.parseObject(JSON.toJSONString(userSpaceDetail));
-		ResponseWrap res = HttpUtil.doPost(conf.getManageInner() + "/public/enterprise", formData);
-		Long enUU = userSpaceDetail.getSpaceUU();
-		if (!res.isSuccess()) {
-			logger.log("同步数据", "error", "同步企业数据到管理平台失败",enUU != null ? enUU : 0L);
-			throw new Exception(res.getContent());
-		} else {
-			logger.log("同步数据", "success", "同步企业数据到管理平台成功", enUU != null ? Long.valueOf(enUU) : 0L);
-			return JSON.parseObject(res.getContent()).getString("dialectUID");
-		}
-	}
-
 	@RequestMapping(method = RequestMethod.DELETE)
 	@ResponseBody
 	public void remove(UserSpaceView userSpace) {

+ 79 - 9
src/main/java/com/uas/platform/b2b/v2/service/impl/EnterpriseServiceImpl.java

@@ -1,18 +1,20 @@
 package com.uas.platform.b2b.v2.service.impl;
 
-import com.uas.platform.b2b.dao.RoleDao;
-import com.uas.platform.b2b.model.Role;
-import com.uas.sso.entity.UserSpaceView;
-import com.uas.sso.entity.UserSpaceDetail;
+import com.uas.platform.b2b.core.util.ThreadUtils;
 import com.uas.platform.b2b.dao.EnterpriseDao;
+import com.uas.platform.b2b.dao.InvitationRecordDao;
+import com.uas.platform.b2b.dao.RoleDao;
 import com.uas.platform.b2b.dao.UserDao;
 import com.uas.platform.b2b.model.Enterprise;
+import com.uas.platform.b2b.model.InvitationRecord;
+import com.uas.platform.b2b.model.Role;
 import com.uas.platform.b2b.model.User;
 import com.uas.platform.b2b.support.CommBufferedLogger;
 import com.uas.platform.b2b.v2.service.EnterpriseService;
 import com.uas.platform.core.logging.BufferedLoggerManager;
+import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.Status;
-import com.uas.sso.entity.UserView;
+import com.uas.sso.entity.UserSpaceView;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
@@ -22,18 +24,28 @@ import java.util.Date;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import java.util.logging.Logger;
 
+/**
+ * 企业信息接口
+ * 
+ * @author hejq
+ * @date 2018-08-01 9:08
+ */
 @Service("v2.EnterpriseService")
 public class EnterpriseServiceImpl implements EnterpriseService {
 
 	@Autowired
 	private EnterpriseDao enterpriseDao;
+
 	@Autowired
 	private UserDao userDao;
+
 	@Autowired
 	private RoleDao roleDao;
 
+	@Autowired
+    private InvitationRecordDao recordDao;
+
 	private final static CommBufferedLogger logger = BufferedLoggerManager.getLogger(CommBufferedLogger.class);
 
 	@Override
@@ -81,8 +93,10 @@ public class EnterpriseServiceImpl implements EnterpriseService {
 		}
 		user.addEnterprise(enterprise);
 		// 将用户设置为管理员,只对用户的当前企业的角色进行修改
-		Set<Role> existRoles = new HashSet<Role>(); // 新用户注册企业时为空
-		if (!CollectionUtils.isEmpty(user.getRoles())) { // 老用户注册新企业
+		// 新用户注册企业时为空
+		Set<Role> existRoles = new HashSet<Role>();
+		// 老用户注册新企业
+		if (!CollectionUtils.isEmpty(user.getRoles())) {
 			existRoles = user.getRoles();
 		}
 		// 设置为本企业管理员
@@ -129,7 +143,63 @@ public class EnterpriseServiceImpl implements EnterpriseService {
 
 	@Override
 	public Enterprise save(Enterprise enterprise) {
-		return enterpriseDao.save(enterprise);
+	    final Enterprise enterpriseInfo = enterpriseDao.save(enterprise);
+	    // 邀请记录链接注册,同步信息到邀请注册记录
+        if (null != enterprise.getInviteUU() && null != enterprise.getInviteUserUU()) {
+            ThreadUtils.task(new Runnable() {
+                @Override
+                public void run() {
+                    mergeInvitation(enterpriseInfo);
+                }
+            });
+        }
+		return enterpriseInfo;
 	}
 
+    /**
+     * 更新邀请注册信息
+     *
+     * @param enterpriseInfo 企业信息
+     */
+    private void mergeInvitation(Enterprise enterpriseInfo) {
+        InvitationRecord record = recordDao.findByUseruuAndVendname(enterpriseInfo.getInviteUserUU(), enterpriseInfo.getEnName());
+        Enterprise inviteEnterprise = enterpriseDao.findOne(enterpriseInfo.getInviteUU());
+        User inviteUser = userDao.findOne(enterpriseInfo.getInviteUserUU());
+        if (null != inviteEnterprise && null != inviteUser) {
+            if (null != record) {
+                record.setEnuu(inviteEnterprise.getInviteUU());
+                record.setBussinesscode(inviteEnterprise.getEnBussinessCode());
+                record.setUserTel(inviteUser.getUserTel());
+                record.setActive(Constant.YES);
+                recordDao.save(record);
+            } else {
+                record = new InvitationRecord();
+                record.setEnuu(inviteEnterprise.getInviteUU());
+                record.setBussinesscode(inviteEnterprise.getEnBussinessCode());
+                record.setUserTel(inviteUser.getUserTel());
+                record.setActive(Constant.YES);
+                record.setVendname(enterpriseInfo.getEnName());
+                record.setVenduseremail(enterpriseInfo.getEnEmail());
+                record.setVendusertel(enterpriseInfo.getEnTel());
+                record.setVendusername(enterpriseInfo.getContactMan());
+                User admin = userDao.findOne(enterpriseInfo.getEnAdminuu());
+                Date inviteDate = null != null ? new Date(enterpriseInfo.getInviteTime()) : new Date(System.currentTimeMillis());
+                record.setDate(inviteDate);
+                record.setVenduu(enterpriseInfo.getUu());
+                record.setSource(enterpriseInfo.getInviteSource() != null ? enterpriseInfo.getInviteSource() : "B2B");
+                record.setStatus(Status.NOT_UPLOAD.value());
+                if (null != admin) {
+                    record.setVenduseremail(admin.getUserEmail());
+                    record.setVendusertel(admin.getUserTel());
+                    record.setVendusername(admin.getUserName());
+                }
+                recordDao.save(record);
+                String inviteInfo = "企业名称: " + enterpriseInfo.getEnName() + ";"
+                        + "邀请企业: " + inviteEnterprise.getEnName() + "(" + inviteEnterprise.getUu() + ");"
+                        + "邀请人: " + inviteUser.getUserName() + "(" + inviteUser.getUserUU() + ")";
+                logger.log("添加合作伙伴", "企业注册添加合作伙伴", inviteInfo , enterpriseInfo.getUu());
+            }
+        }
+    }
+
 }

+ 1 - 0
src/main/webapp/WEB-INF/views/normal/index.html

@@ -258,6 +258,7 @@
 			<a href="http://www.hiways.com" target="_blank" title="深圳市海威思科技">深圳市海威思科技</a>|
 			<a href="http://www.huashangweitai.com" target="_blank" title="深圳市华商维泰显示科技">深圳市华商维泰显示科技</a>|
 			<a href="http://www.ufct.com.cn/" target="_blank" title="联合创泰科技">联合创泰科技</a>
+			<a href="http://www.hi-mantech.com/" target="_blank" title="怡海能达">怡海能达</a>
 		</div>
 		<ul class="list-unstyled footer-bottom">
 			<li>客服电话:400-830-1818</li>

+ 14 - 4
src/main/webapp/resources/css/index.css

@@ -14,7 +14,16 @@ body {
 }
 
 #top, #header, #footer {
-	min-width: 1170px;
+	min-width: 1190px;
+}
+#header{
+	padding-top: 20px;
+    margin: 0 auto;
+	background: #fff;
+}
+#header .container{
+	width: 1190px !important;
+	padding: 0 !important;
 }
 
 #top .container {
@@ -680,7 +689,8 @@ ul>li.item-link>a {
 /*header 顶部头*/
 #site-nav {
 	background-color: #474443;
-	height: 36px;
+	height: 37px;
+	line-height: 37px;
 }
 #site-nav>ul {
 	list-style: none;
@@ -707,7 +717,7 @@ ul>li.item-link>a {
 	vertical-align: middle;
 }
 #site-nav ul li.uas-cloud a span {
-	margin-left: 0.5em;
+	margin-left: 5px;
 	vertical-align: middle;
 }
 
@@ -715,7 +725,7 @@ ul>li.item-link>a {
 	color: rgb(230, 230, 230);
 	text-decoration: none;
 	display: inline-block;
-	line-height: 36px;
+	line-height: 37px;
 	padding: 0 1em;
 }
 

Разлика између датотеке није приказан због своје велике величине
+ 314 - 777
src/main/webapp/resources/js/index/app.js


+ 13 - 7
src/main/webapp/resources/lib/treeview/css/angular.treeview.css

@@ -16,9 +16,10 @@ div[data-angular-treeview] {
 div[data-tree-model] ul {
   margin: 0;
   padding: 0;
-  list-style: none; 
+  list-style: none;
   border: none;
   overflow: hidden;
+  cursor: pointer;
 }
 
 div[data-tree-model] li {
@@ -36,7 +37,7 @@ div[data-tree-model] li b i{
 div.treeView>ul>li>div>ul>li>div>ul>li b i{
   display: none;
 }
-div.treeView>ul>li:nth-child(2)>div>ul>li>b i,div.treeView>ul>li:nth-child(5)>div>ul>li>b i{
+div.treeView>ul>li:nth-child(2)>div>ul>li>b i,div.treeView>ul>li:nth-child(4)>div>ul>li>b i,div.treeView>ul>li:nth-child(5)>div>ul>li>b i{
   display: none;
 }
 div.treeView>ul>li:first-child>.expanded{
@@ -81,21 +82,26 @@ div.treeView>ul>li>span{
   font-size: 14px;
   color: #333;
   font-weight: bold;
+  width: 88%;
 }
 div.treeView>ul>li>span.selected{
-    padding-left: 36px;
+  padding-left: 36px;
 }
 div.treeView>ul>li>div>ul>li>span{
   font-size: 14px;
   font-weight: bold;
   color: #666;
+  width: 76%;
+  padding-left: 22px;
 }
-div.treeView>ul>li:nth-child(2)>div>ul>li>span,div.treeView>ul>li:nth-child(5)>div>ul>li>span{
+div.treeView>ul>li:nth-child(2)>div>ul>li>span,div.treeView>ul>li:nth-child(4)>div>ul>li>span,div.treeView>ul>li:nth-child(5)>div>ul>li>span{
   font-weight: normal;
 }
 div.treeView>ul>li>div>ul>li>div>ul>li>span{
   font-size: 14px;
   color: #666;
+  width: 90%;
+  padding-left: 40px;
 }
 div.treeView>ul>li>i{
   margin-left: 10px;
@@ -103,10 +109,10 @@ div.treeView>ul>li>i{
   top: 8px;
 }
 div.treeView>ul>li>div>ul>li>i{
-  margin-left: 22px;
+  /*margin-left: 22px;*/
 }
 div.treeView>ul>li>div>ul>li>div>ul>li>i{
-  margin-left: 40px;
+  /*margin-left: 40px;*/
 }
 div.treeView>ul>li>div>ul>li>div>ul>li{
   /*width: 100%;*/
@@ -153,5 +159,5 @@ div[data-tree-model] li i, div[data-tree-model] li span {
 div[data-tree-model] li .selected {
   font-weight: bold;
   color: #3f84f6;
-  padding: 1px 5px;
+  /*padding: 1px 5px;*/
 }

+ 10 - 8
src/main/webapp/resources/lib/treeview/js/angular.treeview.js

@@ -47,13 +47,13 @@
 				//tree template
 				var template =
 					'<ul>' +
-						'<li data-ng-repeat="node in ' + treeModel + '"' + '>' +
-							'<i class="collapsed" data-ng-show="node.' + nodeChildren + '.length && node.collapsed" data-ng-click="' + treeId + '.selectNodeHead(node)"></i>' +
-							'<i class="expanded" data-ng-show="node.' + nodeChildren + '.length && !node.collapsed" data-ng-click="' + treeId + '.selectNodeHead(node)"></i>' +
+						'<li data-ng-repeat="node in ' + treeModel + '"' + ' data-ng-click="' + treeId + '.selectNodeLabel(node, $event)">' +
+							'<i class="collapsed" data-ng-show="node.' + nodeChildren + '.length && node.collapsed"></i>' +
+							'<i class="expanded" data-ng-show="node.' + nodeChildren + '.length && !node.collapsed"></i>' +
 							'<i class="normal" data-ng-hide="node.' + nodeChildren + '.length"></i> ' +
-							'<span data-ng-class="node.selected" data-ng-click="' + treeId + '.selectNodeLabel(node)">{{node.' + nodeLabel + '}}</span>' +
-							'<b data-ng-show="node.' + nodeChildren + '.length && node.collapsed" data-ng-click="' + treeId + '.selectNodeHead(node)"><i class="fa fa-angle-right"></i></b>' +
-							'<b data-ng-show="node.' + nodeChildren + '.length && !node.collapsed" data-ng-click="' + treeId + '.selectNodeHead(node)"><i class="fa fa-angle-down"></i></b>' +
+							'<span data-ng-class="node.selected">{{node.' + nodeLabel + '}}</span>' +
+							'<b data-ng-show="node.' + nodeChildren + '.length && node.collapsed"><i class="fa fa-angle-right"></i></b>' +
+							'<b data-ng-show="node.' + nodeChildren + '.length && !node.collapsed"><i class="fa fa-angle-down"></i></b>' +
 							'<b data-ng-hide="node.' + nodeChildren + '.length"><i class="fa fa-angle-right"></i></b> ' +
 							'<div data-ng-hide="node.collapsed" data-tree-id="' + treeId + '" data-tree-model="node.' + nodeChildren + '" data-node-id=' + nodeId + ' data-node-label=' + nodeLabel + ' data-node-children=' + nodeChildren + '></div>' +
 						'</li>' +
@@ -76,8 +76,10 @@
 							selectedNode.collapsed = !selectedNode.collapsed;
 						};
 						//if node label clicks,
-						scope[treeId].selectNodeLabel = scope[treeId].selectNodeLabel || function( selectedNode ){
-
+						scope[treeId].selectNodeLabel = scope[treeId].selectNodeLabel || function( selectedNode, e ){
+							if (e) {
+								e.stopPropagation();
+							}
 							//remove highlight from previous node
 							if( scope[treeId].currentNode && scope[treeId].currentNode.selected ) {
 								scope[treeId].currentNode.selected = undefined;

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/customersInfo.html

@@ -113,7 +113,7 @@
 	border-bottom: none;
 }
 </style>
-<div style="width: 1170px; background: #fff;" id="myquest-public">
+<div style="background: #fff;" id="myquest-public">
 <div ng-include src="'static/tpl/index/baseInfo/vendorAndCustomer.html'"></div>
 <div class="loading in" ng-class="{'in': loading}">
 	<i></i>

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/inquiryItem_detail.html

@@ -444,7 +444,7 @@ input[type="radio"], input[type="checkbox"] {
        color: #969595;
    }
     .detail{
-        width: 1170px;
+        width: 973px;
         /*margin-left: -240px;*/
         background: #fff;
         padding:30px 20px;

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/invitation.html

@@ -119,7 +119,7 @@
 	border-bottom: none;
 }
 </style>
-<div style="width: 1170px; background: #fff;" id="myquest-public">
+<div style=" background: #fff;" id="myquest-public">
 <div ng-include src="'static/tpl/index/baseInfo/addPartnerAndRecord.html'"></div>
 <link rel="stylesheet" href="static/css/public.css">
 <div id="public" style="background: #f5f5f5;">

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/searchresult.html

@@ -302,7 +302,7 @@
 	background: #f5f5f5;
 }
 </style>
-<div class="block" style="width: 1170px;border: #e8e8e8 1px solid;border-top: none;">
+<div class="block" style="border: #e8e8e8 1px solid;border-top: none;">
 <div class="loading in" ng-class="{'in': loading}">
 	<i></i>
 </div>

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/servicerInfo.html

@@ -130,7 +130,7 @@
 	border-bottom: none;
 }
 </style>
-<div style="width: 1170px; background: #fff;" id="myquest-public">
+<div style="background: #fff;" id="myquest-public">
 <div ng-include src="'static/tpl/index/baseInfo/vendorAndCustomer.html'"></div>
 <link rel="stylesheet" href="static/css/public.css">
 <div id="public">

+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/vendorsInfo.html

@@ -130,7 +130,7 @@
 	border-bottom: none;
 }
 </style>
-<div style="width: 1170px; background: #fff;" id="myquest-public">
+<div style="background: #fff;" id="myquest-public">
 <div ng-include src="'static/tpl/index/baseInfo/vendorAndCustomer.html'"></div>
 <link rel="stylesheet" href="static/css/public.css">
 <div id="public">

+ 105 - 82
src/main/webapp/resources/tpl/index/common/header.html

@@ -1,9 +1,23 @@
 <style>
+	#fixed-header {
+		height: 120px;
+	}
+	#header.fix-header{
+		position: fixed;
+		/* padding: 10px 0; */
+		width: 100%;
+		height: 113px;
+		background: #fff;
+		z-index: 1001;
+		top: 0;
+		padding: 10px 0;
+		-webkit-box-shadow: 0 2px 0 0 #ccc;
+		box-shadow: 0 2px 0 0 #ccc;
+	}
 	#header .header-main {
 		height: 100px;
 		width: 1190px;
 		margin: auto;
-		margin-top: 20px;
 	}
 	#header .header-main > li {
 		display: inline-block;
@@ -41,6 +55,7 @@
 		margin-bottom: 10px;
 	}
 	#header .header-main .mall-search input.form-control, #header .header-main .mall-search button.btn-default {
+		width: 441px;
 		height: 40px;
 		border: 2px solid #5078cb;
 		border-radius: 0;
@@ -53,12 +68,12 @@
 	}
 	#header .header-main .mall-search .active-search {
 		text-align: left;
-		margin-top: 2px;
+		margin-top: 4px;
 	}
 	#header .header-main .mall-search .active-search .active-search-body .active-search-item {
 		line-height: 20px;
 		color: #ff0101;
-		font-size: 13px;
+		font-size: 12px;
 		display: inline-block;
 		margin-right: 1em;
 	}
@@ -147,85 +162,93 @@
 		color: #fff;
 	}
 </style>
-<header id="header" role="banner" ng-controller="SearchCtrl">
-	<ul class="header-main list-unstyled">
-		<li class="ghost-center">
-			<div class="mall-logo">
-				<a ng-click="b2cLink('/')" target="_self" >
-					<img src="static/img/all/uas_mall.png" alt="返回首页"/>
-				</a>
-			</div>
-		</li>
-		<li>
-			<div class="mall-slogan"><p>For the World<br/>为世界电子产业创造价值</p></div>
-		</li>
-		<li>
-			<div class="mall-search">
-				<div class="input-group">
-					<div class="type">
-						<span class="type-item" ng-class="{'active': searchType === 'component'}" ng-click="setTypeClick('component')">型号</span>
-						<span class="type-item" ng-class="{'active': searchType === 'kind'}" ng-click="setTypeClick('kind')">物料名称</span>
-						<span class="type-item" ng-class="{'active': searchType === 'store'}" ng-click="setTypeClick('store')">卖家</span>
-						<span class="type-item" ng-class="{'active': searchType === 'brand'}" ng-click="setTypeClick('brand')">品牌</span>
-					</div>
-					<input ng-model="keyword" ng-change="onChange()" type="text" class="form-control"
-						   placeholder="{{placeholderSearch}}" ng-search="search()" ng-focus="onFocus()"
-						   ng-blur="onBlur()" ng-keyup="onKeyup()"/>
-					<span class="input-group-btn" ng-click="search()">
-                        <button class="btn btn-default" type="button">搜索</button>
-                    </span>
-					<ul class="association" ng-show="keyword && (associate || associateEnter)" ng-mouseenter="onAssociateEnter()"
-						ng-mouseleave="onAssociateLeave()">
-						<li ng-repeat="as in associates" ng-bind="as.code" ng-class="{'active': $index==selectIndex}"
-							ng-click="onAssociateClick(as.code)"></li>
-						<li ng-repeat="as in associates" ng-bind="as.nameCn" ng-class="{'active': $index==selectIndex}"
-							ng-click="onAssociateClick(as.nameCn)"></li>
-						<li ng-repeat="as in associates" ng-bind="as.name" ng-class="{'active': $index==selectIndex}"
-							ng-click="onAssociateClick(as.name)"></li>
-					</ul>
-				</div>
-				<div class="active-search">
-					<ul class="list-untyled active-search-body" style="padding: 0;">
-						<li class="active-search-item">热门搜索</li>
-						<li class="active-search-item" ng-repeat="hw in hotwords track by hw.id"><a ng-href="{{hw.url}}" ng-bind="hw.name" target="_blank"></a></li>
-					</ul>
-				</div>
-			</div>
-		</li>
-	</ul>
-	<!--nav   导航-->
-	<nav role="navigation" class="nav-main">
-		<ul class="container">
-			<li><a class="more-title" ng-click="b2cLink('/product/kind/home')">器件选型</a></li>
-			<li>
-				<a ng-click="b2cLink('/')">&nbsp;&nbsp;首页</a>
-			</li>
-			<li>
-				<a ng-click="b2cLink('/applyPurchase')">询价求购</a>
-				<img class="new-animate" src="static/img/all/banner-cuxiao03.png" alt="">
-			</li>
-			<li>
-				<a ng-click="b2cLink('/supplier')">供应商</a>
-			</li>
-			<li>
-				<a ui-sref="home" class="active">B2B商务</a>
-				<img class="new-animate" src="static/img/all/hot.png" alt="">
-			</li>
-			<li>
-				<a ng-click="b2cLink('/provider/shop')">店铺</a>
-			</li>
-			<li>
-				<a ng-click="b2cLink('/product/brand/brandList/A')">品牌墙</a>
-			</li>
-			<li>
-				<a ng-click="b2cLink('/pcb')">PCB专区</a>
-			</li>
-			<li>
-				<a ng-click="b2cLink('/news')">优软快讯</a>
-			</li>
-		</ul>
-	</nav>
-</header>
+
+<div ng-controller="SearchCtrl">
+    <div id="fixed-header">
+        <header id="header" role="banner" ng-class="{'fix-header': isFixed}">
+            <div class="container">
+                <ul class="header-main list-unstyled">
+                    <li class="ghost-center">
+                        <div class="mall-logo">
+                            <a ng-click="b2cLink('/')" target="_self" >
+                                <img src="static/img/all/uas_mall.png" alt="返回首页"/>
+                            </a>
+                        </div>
+                    </li>
+                    <li>
+                        <div class="mall-slogan"><p>For the World<br/>为世界电子产业创造价值</p></div>
+                    </li>
+                    <li>
+                        <div class="mall-search">
+                            <div class="input-group">
+                                <div class="type">
+                                    <span class="type-item" ng-class="{'active': searchType === 'component'}" ng-click="setTypeClick('component')">型号</span>
+                                    <span class="type-item" ng-class="{'active': searchType === 'kind'}" ng-click="setTypeClick('kind')">物料名称</span>
+                                    <span class="type-item" ng-class="{'active': searchType === 'store'}" ng-click="setTypeClick('store')">卖家</span>
+                                    <span class="type-item" ng-class="{'active': searchType === 'brand'}" ng-click="setTypeClick('brand')">品牌</span>
+                                </div>
+                                <input ng-model="keyword" ng-change="onChange()" type="text" class="form-control"
+                                       placeholder="{{placeholderSearch}}" ng-search="search()" ng-focus="onFocus()"
+                                       ng-blur="onBlur()" ng-keyup="onKeyup()"/>
+                                <span class="input-group-btn" ng-click="search()">
+					<button class="btn btn-default" type="button">搜索</button>
+				</span>
+                                <ul class="association" ng-show="keyword && (associate || associateEnter)" ng-mouseenter="onAssociateEnter()"
+                                    ng-mouseleave="onAssociateLeave()">
+                                    <li ng-repeat="as in associates" ng-bind="as.code" ng-class="{'active': $index==selectIndex}"
+                                        ng-click="onAssociateClick(as.code)"></li>
+                                    <li ng-repeat="as in associates" ng-bind="as.nameCn" ng-class="{'active': $index==selectIndex}"
+                                        ng-click="onAssociateClick(as.nameCn)"></li>
+                                    <li ng-repeat="as in associates" ng-bind="as.name" ng-class="{'active': $index==selectIndex}"
+                                        ng-click="onAssociateClick(as.name)"></li>
+                                </ul>
+                            </div>
+                            <div class="active-search">
+                                <ul class="list-untyled active-search-body" style="padding: 0;">
+                                    <li class="active-search-item">热门搜索</li>
+                                    <li class="active-search-item" ng-repeat="hw in hotwords track by hw.id"><a ng-href="{{hw.url}}" ng-bind="hw.name"></a></li>
+                                </ul>
+                            </div>
+                        </div>
+                    </li>
+                </ul>
+            </div>
+        </header>
+    </div>
+
+    <!--nav   导航-->
+    <nav role="navigation" class="nav-main">
+        <ul class="container">
+            <li><a class="more-title" ng-click="b2cLink('/product/kind/home')">器件选型</a></li>
+            <li>
+                <a ng-click="b2cLink('/')">&nbsp;&nbsp;首页</a>
+            </li>
+            <li>
+                <a ng-click="b2cLink('/applyPurchase')">询价求购</a>
+                <img class="new-animate" src="static/img/all/banner-cuxiao03.png" alt="">
+            </li>
+            <li>
+                <a ng-click="b2cLink('/supplier')">供应商</a>
+            </li>
+            <li>
+                <a ui-sref="home" class="active">B2B商务</a>
+                <img class="new-animate" src="static/img/all/hot.png" alt="">
+            </li>
+            <li>
+                <a ng-click="b2cLink('/provider/shop')">店铺</a>
+            </li>
+            <li>
+                <a ng-click="b2cLink('/product/brand/brandList/A')">品牌墙</a>
+            </li>
+            <li>
+                <a ng-click="b2cLink('/pcb')">PCB专区</a>
+            </li>
+            <li>
+                <a ng-click="b2cLink('/news')">优软快讯</a>
+            </li>
+        </ul>
+    </nav>
+</div>
 <script language="javascript" type="text/javascript">
 	$(function () {
 		var targetChildrem_Height = $('.scroll-data dl').height();

+ 3 - 1
src/main/webapp/resources/tpl/index/common/leftAll.html

@@ -56,5 +56,7 @@
 </div>
 <!--应收宝-->
 <!--<div class="jk">-->
-	<!--<img src="static/img/home/jingkong.png">-->
+	<!--<a href="http://www.yitoa-fintech.com/" target="_blank">-->
+		<!--<img src="static/img/home/jingkong.png">-->
+	<!--</a>-->
 <!--</div>-->

+ 1 - 1
src/main/webapp/resources/tpl/index/fa/apBillOutList.html

@@ -64,7 +64,7 @@
 }
 </style>
 
-<div style="margin-right: 20px;">
+<div>
 	<div class="add-apCheckList">
 		<div class="pub-com_head">
 			<span>新增开票单</span>

+ 1 - 1
src/main/webapp/resources/tpl/index/fa/apCheckList.html

@@ -64,7 +64,7 @@
 }
 </style>
 
-<div style="margin-right: 20px;">
+<div>
 	<div class="add-apCheckList">
 		<div class="pub-com_head">
 			<span>新增对账单</span>

+ 1 - 1
src/main/webapp/resources/tpl/index/home/right.html

@@ -66,7 +66,7 @@
 	}
 	.toto-menu .row .content {
 		overflow: hidden;
-		padding: 0 24px 91px;
+		padding: 0 24px 73px;
 		width: 100%;
 	}
 	.toto-menu .row .content .item-list{

+ 1 - 1
src/main/webapp/resources/tpl/index/sale/left.html

@@ -18,7 +18,7 @@
         </ul>
     </div> -->
 	<div class="left-nav">
-		<div class="nav-label"><i class="nav_icon nav2_icon"></i>商管理</div>
+		<div class="nav-label"><i class="nav_icon nav2_icon"></i>商管理</div>
 		<ul class="list-unstyled">
 			<li ui-sref-active="active"><a ui-sref="sale.inquiry" ng-click="getUnread()"><em class="new-dot" ng-if="unread.inquiry > 0"></em>客户采购询价</a></li>
 			<li ui-sref-active="active"><a ui-sref="sale.pubinquiry" ng-click="getUnread()">客户公共询价</a></li>

+ 197 - 12
src/main/webapp/resources/tpl/index/sale/pubinquiry.html

@@ -188,7 +188,6 @@
 	<div class="pub-com_head">
 		<span>客户公共询价单</span>
 		<div class="p-right">
-			<!--<a ng-click="exportXls()" target="_self" class="text-simple" title="导出Excel表格"><i class="fa fa-file-text fa-fw"></i>导出</a>-->
 		</div>
 	</div>
 	<div class="menu condition block">
@@ -199,14 +198,14 @@
 						<button type="button" class="btn btn-default btn-line"
 								ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部<b class="new-dot" ng-if="unread.all>0">{{unread.all>99?'99+':unread.all}}</b></button>
 					</div>
+                    <div class="btn-group btn-group-sm">
+                        <button type="button" class="btn btn-default btn-line"
+                                ng-class="{'btn-info':active=='todoAll' || active=='todoComRemind' || active=='todoRemind'}" ng-click="setActive('todoComRemind')">待报价</button>
+                    </div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
 								ng-class="{'btn-info':active=='done'}" ng-click="setActive('done');setOrdersReadByState()">已报价<b class="new-dot" ng-if="unread.replied>0">{{unread.replied>99?'99+':unread.replied}}</b></button>
 					</div>
-					<!--<div class="btn-group btn-group-sm">
-						<button type="button" class="btn btn-default btn-line"
-								ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">待报价<b class="new-dot" ng-if="unread.notReply>0">{{unread.notReply>99?'99+':unread.notReply}}</b></button>
-					</div>-->
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
 								ng-class="{'btn-info':active=='agreed'}" ng-click="setActive('agreed')">已采纳</button>
@@ -289,9 +288,29 @@
 			</div>
 		</div>
 	</div>
+    <div class="menu condition block" ng-if="active=='todoAll' || active=='todoComRemind' || active=='todoRemind'">
+        <div class="row">
+            <div class="col-xs-4">
+                <div class="btn-group btn-group-sm btn-group-justified">
+                    <div class="btn-group btn-group-sm">
+                        <button type="button" class="btn btn-default btn-line"
+                                ng-class="{'btn-info':active=='todoAll'}" ng-click="setActive('todoAll')">全部</button>
+                    </div>
+					<div class="btn-group btn-group-sm">
+						<button type="button" class="btn btn-default btn-line"
+								ng-class="{'btn-info':active=='todoComRemind'}" ng-click="setActive('todoComRemind')">企业商机</button>
+					</div>
+                    <div class="btn-group btn-group-sm">
+                        <button type="button" class="btn btn-default btn-line"
+                                ng-class="{'btn-info':active=='todoRemind'}" ng-click="setActive('todoRemind')">我的商机</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
 	<table class="order-table block" ng-table="tableParams">
 		<thead>
-		<tr class="header">
+		<tr class="header" ng-if="active != 'todoAll' && active != 'todoRemind' && active != 'todoComRemind'">
 			<th>产品型号</th>
 			<th width="160">品牌</th>
 			<th width="110">分段数量</th>
@@ -299,10 +318,19 @@
 			<th width="160">最小订购/包装</th>
 			<th width="75">操作</th>
 		</tr>
+        <tr class="header" ng-if="active == 'todoAll' || active == 'todoRemind' || active == 'todoComRemind'">
+            <th>产品型号</th>
+            <th width="160">品牌</th>
+            <th width="110" class="line"><em></em>需求数量</th>
+            <th width="90">税率</th>
+            <th width="160" class="line"><em></em>报价截止日期</th>
+            <th width="75">操作</th>
+        </tr>
 		<tr class="sep-row">
 			<td colspan="6"></td>
 		</tr>
 		</thead>
+        <!-- 没有数据返回-->
 		<tbody ng-if="tableParams.total() == 0">
 		<tr>
 			<td colspan="6">
@@ -341,7 +369,8 @@
 			</td>
 		</tr>
 		</tbody>
-		<tbody ng-repeat="inquiryItem in $data track by inquiryItem.id">
+        <!--客户询价信息 start-->
+		<tbody ng-if="active != 'todoAll' && active != 'todoRemind' && active != 'todoComRemind'" ng-repeat="inquiryItem in $data track by inquiryItem.id">
 		<tr class="order-hd">
 			<td class="first" colspan="2">
 				<div class="order-main">
@@ -349,8 +378,7 @@
 						  ng-bind="::inquiryItem.inquiry.date | date:'yyyy-MM-dd'"></span>
 					<span ng-bind="::inquiryItem.inquiry.enterprise.enName"></span>
 					<span>流水号:
-						<a title="查看详情"
-						   class="text-num order-detail"
+						<a title="查看详情" class="text-num order-detail"
 						   ng-bind="::inquiryItem.inquiry.code"
 						   ui-sref="sale.pubinquiry_detail({id:inquiryItem.id})"
 						   target="_self"
@@ -362,7 +390,7 @@
 				币别:<span ng-bind="::(isUser?'-':inquiryItem.currency)"></span>
 			</td>
 			<td>
-				税率:<span>17</span>%
+				税率:<span ng-bind="inquiryItem.taxrate || '-'"></span>%
 			</td>
 			<td class="text-right" colspan="2" class="order-sum">
 				<div ng-if="inquiryItem.replyable">
@@ -374,8 +402,7 @@
 		<tr class="order-bd">
 			<td class="product">
 				<div class="text-num text-bold">
-					<a class="dropdown-toggle"
-					   ng-mouseover="getHistory(inquiryItem)">
+					<a class="dropdown-toggle">
 						<span ng-bind="::inquiryItem.product.cmpCode || inquiryItem.cmpCode"></span>
 						<i class="fa fa-fw fa-sort-desc"></i>
 						<div class="dropdown-menu pane" style="width: 270px;">
@@ -443,5 +470,163 @@
 			</td>
 		</tr>
 		</tbody>
+        <!--客户询价信息 end-->
+        <!--公共询价全部 start-->
+        <tbody ng-if="active == 'todoAll'" ng-repeat="inquiryItem in $data track by inquiryItem.id">
+        <tr class="order-hd">
+            <td class="first" colspan="2">
+                <div class="order-main">
+					<span class="text-num text-bold" title="{{inquiryItem.inquiry.date}}"
+                          ng-bind="::inquiryItem.inquiry.date | date:'yyyy-MM-dd'"></span>
+                    <span ng-bind="::inquiryItem.inquiry.enterprise.enName"></span>
+                    <span>流水号:
+						<a title="查看详情" class="text-num order-detail"
+                           ng-bind="::inquiryItem.inquiry.code"
+                           target="_self"
+                           ng-click="toDetail(inquiryItem)"></a>
+					</span>
+                </div>
+            </td>
+            <td>
+            </td>
+            <td>
+
+            </td>
+            <td class="text-right" colspan="2" class="order-sum">
+            </td>
+        </tr>
+        <tr class="order-bd">
+            <td class="product">
+                <div class="text-num text-bold">
+                    <a class="dropdown-toggle">
+                        <span ng-bind="::inquiryItem.product.cmpCode || inquiryItem.cmpCode"></span>
+                        <i class="fa fa-fw fa-sort-desc"></i>
+                        <div class="dropdown-menu pane" style="width: 270px;">
+                            <div class="pane-body">
+                                <div>
+                                    <div>
+                                        <span>产品规格:</span>
+                                        <em ng-bind="inquiryItem.product.spec || inquiryItem.spec || '无'"></em>
+                                    </div>
+                                    <div>
+                                        <span>产品名称:</span>
+                                        <em ng-bind="::inquiryItem.product.title || inquiryItem.prodTitle || '无'"></em>
+                                    </div>
+                                </div>
+                                <div ng-show="!inquiryItem.product.spec && !inquiryItem.product.title && !inquiryItem.spec && !inquiryItem.prodTitle"
+                                     class="text-center text-muted">暂无产品信息</div>
+                            </div>
+                        </div>
+                    </a>
+                </div>
+                <div ng-if="inquiryItem.attachUrl" class="text-muted">
+                    <i class="fa fa-paperclip fa-fw" style="color: #ffa340; font-size: 18px;"></i>附件:<a class="file" href="{{inquiryItem.attachUrl}}" target="_blank">{{::inquiryItem.attachName}}</a>
+                </div>
+            </td>
+            <td class="text-center">
+                <span ng-bind="inquiryItem.product.brand || inquiryItem.inbrand || '-'"></span>
+            </td>
+            <td class="text-center">
+                <span ng-bind="inquiryItem.needquantity || '-'"></span>
+            </td>
+            <td class="text-center">
+                <!--<span>17</span>%-->
+            </td>
+            <td class="text-center">
+                <span ng-bind-html="inquiryItem.endDate| datespan"></span>
+            </td>
+            <td ng-if="inquiryItem.quoted == 1">
+                <a class="offer" ng-click="">已报价</a>
+            </td>
+            <td ng-if="inquiryItem.quoted != 1">
+                <a class="offer"ng-click="transtoInquiry(inquiryItem)" ng-if="inquiryItem.remainingTime > 0 && inquiryItem.overdue != 1 && currentEn.uu != inquiryItem.inquiry.enUU && isOverDue(inquiryItem.inquiry.endDate)">报价</a>
+                <a style="color: #999" ng-if="inquiryItem.remainingTime > 0 && inquiryItem.overdue != 1 && currentEn.uu == inquiryItem.inquiry.enUU && isOverDue(inquiryItem.inquiry.endDate)" ng-click="transtoInquiry(inquiryItem)">报价</a>
+                <a class="offer" ng-if="inquiryItem.remainingTime <= 0 || inquiryItem.overdue == 1 " ng-click="">已结束</a>
+            </td>
+        </tr>
+        </tbody>
+        <!--公共询价全部 end-->
+        <!--商机 start-->
+        <tbody ng-if="active == 'todoRemind' || active == 'todoComRemind'" ng-repeat="inquiryItem in $data track by inquiryItem.id">
+        <tr class="order-hd">
+            <td class="first" colspan="2">
+                <div class="order-main">
+					<span class="text-num text-bold" title="{{inquiryItem.inquiry.date}}"
+                          ng-bind="::inquiryItem.inquiry.date | date:'yyyy-MM-dd'"></span>
+                    <span ng-bind="::inquiryItem.inquiry.enterprise.enName"></span>
+                    <span>流水号:
+						<a title="查看详情" class="text-num order-detail"
+                           ng-bind="::inquiryItem.inquiry.code"
+                           target="_self"
+                           ng-click="remindDetail(inquiryItem)"></a>
+					</span>
+                </div>
+            </td>
+            <td>
+            </td>
+            <td>
+            </td>
+            <td class="text-right" colspan="2" class="order-sum">
+                <div ng-if="inquiryItem.replyable">
+                    <span class="text-inverse text-bold" ng-bind="::inquiryItem.inquiry.endDate | timespan"></span>
+                    <span class="text-muted" style="margin-right:35px;">后截止报价</span>
+                </div>
+            </td>
+        </tr>
+        <tr class="order-bd">
+            <td class="product">
+                <div class="text-num text-bold">
+                    <a class="dropdown-toggle">
+                        <span ng-bind="::inquiryItem.product.cmpCode || inquiryItem.cmpCode"></span>
+                        <i class="fa fa-fw fa-sort-desc"></i>
+                        <div class="dropdown-menu pane" style="width: 270px;">
+                            <div class="pane-body">
+                                <div>
+                                    <div>
+                                        <span>产品规格:</span>
+                                        <em ng-bind="inquiryItem.product.spec || inquiryItem.spec || '无'"></em>
+                                    </div>
+                                    <div>
+                                        <span>产品名称:</span>
+                                        <em ng-bind="::inquiryItem.product.title || inquiryItem.prodTitle || '无'"></em>
+                                    </div>
+                                </div>
+                                <div ng-show="!inquiryItem.product.spec && !inquiryItem.product.title && !inquiryItem.spec && !inquiryItem.prodTitle"
+                                     class="text-center text-muted">暂无产品信息</div>
+                            </div>
+                        </div>
+                    </a>
+                </div>
+                <div ng-if="inquiryItem.attachUrl" class="text-muted">
+                    <i class="fa fa-paperclip fa-fw" style="color: #ffa340; font-size: 18px;"></i>附件:<a class="file" href="{{inquiryItem.attachUrl}}" target="_blank">{{::inquiryItem.attachName}}</a>
+                </div>
+            </td>
+            <td class="text-center">
+                <span ng-bind="inquiryItem.product.brand || inquiryItem.inbrand || '-'"></span>
+            </td>
+            <td class="text-center">
+                <span ng-bind="inquiryItem.needQty || '-'"></span>
+            </td>
+            <td class="text-center">
+                <!--<span>17</span>%-->
+            </td>
+            <td class="text-center">
+                <span ng-bind-html="inquiryItem.endDate| datespan"></span>
+            </td>
+            <td>
+                <div ng-if="inquiryItem.remainingTime <= 0" class="block">
+                    <span>已结束</span>
+                </div>
+                <div ng-if="inquiryItem.remainingTime > 0" class="block">
+                    <a ng-if="inquiryItem.status==100" ng-click="qute(inquiryItem)">报价</a>
+                    <span ng-if="inquiryItem.status==101">已报价</span>
+                    <span ng-if="inquiryItem.status==104">已采纳</span>
+                    <span ng-if="inquiryItem.status==103">未采纳</span>
+                    <span ng-if="inquiryItem.status==111">已结束</span>
+                </div>
+            </td>
+        </tr>
+        </tbody>
+        <!--商机 end-->
 	</table>
 </div>

+ 111 - 0
src/test/java/com/uas/platform/b2b/purc/PurchaseNoticeSearchTest.java

@@ -0,0 +1,111 @@
+package com.uas.platform.b2b.purc;
+
+import com.uas.platform.core.util.HttpUtil;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.junit.Test;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class PurchaseNoticeSearchTest {
+
+    /**
+     * 查出索引没有创建的
+     * @throws Exception
+     */
+    @Test
+    public void checkAndUpdate() throws Exception {
+
+        List<Long> ids = new ArrayList<>();
+        for (Long i=13824692L;i<=13824692L;i++) {
+            ids.add(i);
+        }
+        List<Long> list = checkAll("purc$orders",ids);
+        if (!StringUtils.isEmpty(list)) {
+            for (Long id : list) {
+                update("purc$orders",id);
+            }
+        }
+
+
+    }
+
+    @Test
+    public void update() throws Exception {
+        Long[] ids = {1133714L,1133715L,1133716L,1133717L,1133718L,1133719L,1133720L,1133721L,1133722L,1133723L,1133724L,1133725L};
+        List<Long> list = checkAll("PURC$INQUIRYITEMS",Arrays.asList(ids));
+        if (CollectionUtils.isEmpty(list)){
+            System.out.println("无不存在索引");
+        } else {
+            list.forEach(id-> System.out.println(id));
+        }
+
+    }
+
+    private List<Long> checkAll(String tableName,List<Long> ids) throws Exception{
+        List<Long> list = new ArrayList<>();
+        for (Long id :ids) {
+            String searchInfoUrl = "http://10.10.100.179:8081/search/object";// ?tableName=PURC$NOTICE&id=
+            String infoUrl = searchInfoUrl + "?tableName=" + tableName + "&id=";
+            HttpUtil.Response response = HttpUtil.sendGetRequest(infoUrl + id, null);
+            if (StringUtils.isEmpty(response.getResponseText())) {
+                list.add(id);
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 重建
+     * @param tableName
+     * @param id
+     * @return
+     * @throws Exception
+     */
+    private boolean update(String tableName, Long id) throws Exception {
+        String searchUpdateUrl = "http://10.10.100.179:8081/index/maintain";// ?tableName=PURC$NOTICE&methodType=update&dataId=
+        String url = searchUpdateUrl + "?tableName=" + tableName + "&methodType=update&dataId=";
+
+        HttpRequestBase request = new HttpRequestBase() {
+            @Override
+            public String getMethod() {
+                return "GET";
+            }
+        };
+        request.addHeader("Authorization", "Basic YWRtaW46c2VsZWN0MTExKioq");
+
+        request.setURI(URI.create(url + id));
+        HttpUtil.Response response = HttpUtil.sendHttpUriRequest(request);
+        System.out.println(id + " " + response.getResponseText());
+        return true;
+    }
+
+    /**
+     * 检查,如果不存在重建
+     * @param tableName
+     * @param id
+     * @return
+     * @throws Exception
+     */
+    private boolean checkAndUpdate(String tableName, Long id) throws Exception {
+        String searchInfoUrl = "http://10.10.100.179:8081/search/object";// ?tableName=PURC$NOTICE&id=
+        String infoUrl = searchInfoUrl + "?tableName=" + tableName + "&id=";
+
+        HttpUtil.Response response = HttpUtil.sendGetRequest(infoUrl + id, null);
+        if (StringUtils.isEmpty(response.getResponseText())) {
+            return update(tableName, id);
+        }
+        return false;
+    }
+
+    @Test
+    public void test() throws Exception{
+        update("purc$orders",13824692L);
+    }
+
+
+}

+ 1 - 0
src/test/java/com/uas/platform/b2b/purc/PurchaseNotify.java

@@ -140,4 +140,5 @@ public class PurchaseNotify extends BaseJunitTest {
         Page<Product> productPage = ProductUtils.findByPageInfo(pageInfo, null);
         System.out.println(productPage);
     }
+
 }

Неке датотеке нису приказане због велике количине промена