Browse Source

Merge branch 'dev_copy' of ssh://10.10.101.21/source/platform-b2b into dev_copy

wangmh 8 years ago
parent
commit
84c2e8c7ac

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

@@ -414,8 +414,7 @@ public class BaseInfoController {
 	 * @modify-desc 增加操作日志
 	 */
 	@RequestMapping(value = "/addtoCart", method = RequestMethod.POST)
-	public ResponseEntity<ModelMap> save(String token, @RequestBody String json) {
-		NewPurcOrder neworder = JSONObject.parseObject(json, NewPurcOrder.class);
+	public ResponseEntity<ModelMap> save(String token, @RequestBody NewPurcOrder neworder) {
 		ModelMap map = new ModelMap();
 		boolean flag = tokenService.enabled(token);
 		if (flag) {

+ 210 - 0
src/main/java/com/uas/platform/b2b/erp/model/AutOrder.java

@@ -0,0 +1,210 @@
+package com.uas.platform.b2b.erp.model;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 自动转换订单
+ *
+ * Created by hejq on 2018-05-02.
+ */
+public class AutOrder implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    /**
+     * 采购单号
+     */
+    private String pu_code;
+
+    /**
+     * 采购日期
+     */
+    private String pu_date;
+
+    /**
+     * 采购单所属采购员名称
+     */
+    private String em_name;
+
+    /**
+     * 采购单所属采购员联系方式
+     */
+    private String em_mobile;
+
+    /**
+     * 所属采购员邮箱
+     */
+    private String em_email;
+
+    /**
+     * 采购方
+     */
+    private String en_name;
+
+    /**
+     * 供应商
+     */
+    private String ve_name;
+
+    /**
+     * 币别
+     */
+    private String pu_currency;
+
+    /**
+     * 税率
+     */
+    private String pu_rate;
+
+    /**
+     * 采购类型
+     */
+    private String pu_kind;
+
+    /**
+     * 付款方式
+     */
+    private String pu_payments;
+
+    /**
+     * 送货地址
+     */
+    private String pu_shipaddresscode;
+
+    /**
+     * PDF文档的路径
+     */
+    private String pu_filepath;
+
+    /**
+     * 对应的采购单详情List
+     */
+    private List<AutOrderDetail> details;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getPu_code() {
+        return pu_code;
+    }
+
+    public void setPu_code(String pu_code) {
+        this.pu_code = pu_code;
+    }
+
+    public String getPu_date() {
+        return pu_date;
+    }
+
+    public void setPu_date(String pu_date) {
+        this.pu_date = pu_date;
+    }
+
+    public String getEm_name() {
+        return em_name;
+    }
+
+    public void setEm_name(String em_name) {
+        this.em_name = em_name;
+    }
+
+    public String getEm_mobile() {
+        return em_mobile;
+    }
+
+    public void setEm_mobile(String em_mobile) {
+        this.em_mobile = em_mobile;
+    }
+
+    public String getEm_email() {
+        return em_email;
+    }
+
+    public void setEm_email(String em_email) {
+        this.em_email = em_email;
+    }
+
+    public String getEn_name() {
+        return en_name;
+    }
+
+    public void setEn_name(String en_name) {
+        this.en_name = en_name;
+    }
+
+    public String getVe_name() {
+        return ve_name;
+    }
+
+    public void setVe_name(String ve_name) {
+        this.ve_name = ve_name;
+    }
+
+    public String getPu_currency() {
+        return pu_currency;
+    }
+
+    public void setPu_currency(String pu_currency) {
+        this.pu_currency = pu_currency;
+    }
+
+    public String getPu_rate() {
+        return pu_rate;
+    }
+
+    public void setPu_rate(String pu_rate) {
+        this.pu_rate = pu_rate;
+    }
+
+    public String getPu_kind() {
+        return pu_kind;
+    }
+
+    public void setPu_kind(String pu_kind) {
+        this.pu_kind = pu_kind;
+    }
+
+    public String getPu_payments() {
+        return pu_payments;
+    }
+
+    public void setPu_payments(String pu_payments) {
+        this.pu_payments = pu_payments;
+    }
+
+    public String getPu_shipaddresscode() {
+        return pu_shipaddresscode;
+    }
+
+    public void setPu_shipaddresscode(String pu_shipaddresscode) {
+        this.pu_shipaddresscode = pu_shipaddresscode;
+    }
+
+    public String getPu_filepath() {
+        return pu_filepath;
+    }
+
+    public void setPu_filepath(String pu_filepath) {
+        this.pu_filepath = pu_filepath;
+    }
+
+    public List<AutOrderDetail> getDetails() {
+        return details;
+    }
+
+    public void setDetails(List<AutOrderDetail> details) {
+        this.details = details;
+    }
+}

+ 123 - 0
src/main/java/com/uas/platform/b2b/erp/model/AutOrderDetail.java

@@ -0,0 +1,123 @@
+package com.uas.platform.b2b.erp.model;
+
+import com.uas.platform.b2b.model.PurchaseOrderAll;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+/**
+ * 自动生成订单明细
+ *
+ * Created by hejq on 2018-05-02.
+ */
+public class AutOrderDetail implements Serializable {
+
+    /**
+     * default serialVersionUID
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 物料编号
+     */
+    private String pd_prodcode;
+
+    /**
+     * 采购数量
+     */
+    private String pd_qty;
+
+    /**
+     * 采购价格
+     */
+    private String pd_price;
+
+    /**
+     * 交期
+     */
+    private String pd_delivery;
+
+    /**
+     * 税率税率
+     */
+    private String pd_rate;
+
+    /**
+     * 序号
+     */
+    private String pd_detno;
+
+    /**
+     * 采购订单
+     */
+    private AutOrder order;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getPd_prodcode() {
+        return pd_prodcode;
+    }
+
+    public void setPd_prodcode(String pd_prodcode) {
+        this.pd_prodcode = pd_prodcode;
+    }
+
+    public String getPd_qty() {
+        return pd_qty;
+    }
+
+    public void setPd_qty(String pd_qty) {
+        this.pd_qty = pd_qty;
+    }
+
+    public String getPd_price() {
+        return pd_price;
+    }
+
+    public void setPd_price(String pd_price) {
+        this.pd_price = pd_price;
+    }
+
+    public String getPd_delivery() {
+        return pd_delivery;
+    }
+
+    public void setPd_delivery(String pd_delivery) {
+        this.pd_delivery = pd_delivery;
+    }
+
+    public String getPd_rate() {
+        return pd_rate;
+    }
+
+    public void setPd_rate(String pd_rate) {
+        this.pd_rate = pd_rate;
+    }
+
+    public String getPd_detno() {
+        return pd_detno;
+    }
+
+    public void setPd_detno(String pd_detno) {
+        this.pd_detno = pd_detno;
+    }
+
+    public AutOrder getOrder() {
+        return order;
+    }
+
+    public void setOrder(AutOrder order) {
+        this.order = order;
+    }
+}

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

@@ -222,7 +222,7 @@ public class Inquiry {
 	public Inquiry(SaleQuotation quotation) {
 		this.in_code = quotation.getCode();
 		this.in_date = quotation.getDate();
-		this.in_enddate = quotation.getDate();
+		this.in_enddate = quotation.getEndDate();
 		this.in_recorddate = quotation.getDate();
 		this.in_remark = quotation.getRemark();
 		this.b2b_qu_id = quotation.getId();

+ 0 - 4
src/main/java/com/uas/platform/b2b/erp/model/InquiryDetail.java

@@ -357,15 +357,11 @@ public class InquiryDetail {
 	public InquiryDetail(SaleQuotationItem item) {
 		this.id_currency = item.getQuotation().getCurrency();
 		this.id_detno = item.getNumber();
-//		this.id_fromdate = item.getQuotation().getDate();
 		this.id_minbuyqty = item.getMinOrderQty();
 		this.id_minqty = item.getMinPackQty();
-		this.id_myfromdate = item.getQuotation().getDate();
-		this.id_mytodate = item.getQuotation().getEndDate();
 		this.id_prodcode = item.getProduct() != null ? item.getProduct().getCode(): item.getCustProductCode();
 		this.id_rate = item.getQuotation().getTaxrate();
 		this.id_remark = item.getRemark();
-//		this.id_todate = item.getQuotation().getEndDate();
 		this.ve_uu = item.getQuotation().getEnUU();
 		this.id_brand = item.getBrand();
 		this.id_leadtime = item.getLeadtime();

+ 10 - 0
src/main/java/com/uas/platform/b2b/erp/model/KeywordAlias.java

@@ -0,0 +1,10 @@
+package com.uas.platform.b2b.erp.model;
+
+
+/**
+ * 关键词别名
+ *
+ * Created by hejq on 2018-05-02.
+ */
+public class KeywordAlias {
+}

+ 15 - 21
src/main/java/com/uas/platform/b2b/erp/service/impl/InquiryServiceImpl.java

@@ -117,29 +117,23 @@ public class InquiryServiceImpl implements InquiryService {
 								item.setProduct(products.get(0));
 								item.setProductId(products.get(0).getId());
 							} else {
-                                List<NotExistProduct> productList = notExistProductDao.findByEnuuAndCode(enUU, product.getCode());
-                                if (org.springframework.util.CollectionUtils.isEmpty(productList)) {
-                                    notExistProductDao.save(new NotExistProduct(product.getCode(), enUU, "inquiry", inquiry.getIn_code()));
-                                } else {
-                                    NotExistProduct prod = productList.get(0);
-                                    prod.setStatus(Status.NOT_UPLOAD.value());
-                                    notExistProductDao.save(prod);
-                                }
-                                throw new NotFoundException("企业UU【" + enUU + "】,物料编号【" + product.getCode() + "】,来源【" + inquiry.getIn_code() + "】");
+								List<NotExistProduct> productList = notExistProductDao.findByEnuuAndCode(enUU, product.getCode());
+								if (org.springframework.util.CollectionUtils.isEmpty(productList)) {
+									notExistProductDao.save(new NotExistProduct(product.getCode(), enUU, "inquiry", inquiry.getIn_code()));
+								} else {
+									NotExistProduct prod = productList.get(0);
+									prod.setStatus(Status.NOT_UPLOAD.value());
+									notExistProductDao.save(prod);
+								}
+								throw new NotFoundException("企业UU【" + enUU + "】,物料编号【" + product.getCode() + "】,来源【" + inquiry.getIn_code() + "】");
 							}
-                            item.setInquiry(purchaseInquiry);
+							item.setInquiry(purchaseInquiry);
 							PurchaseInquiryTemp temp = new PurchaseInquiryTemp();
-                            BeanUtils.copyProperties(purchaseInquiry, temp, PurchaseInquiryTemp.class);
-                            PurchaseInquiryTemp inquiryTemp = tempDao.findByCodeAndEnUU(temp.getCode(), temp.getEnUU());
-                            PurchaseInquiryItemTemp itemTemp = new PurchaseInquiryItemTemp();
-                            BeanUtils.copyProperties(item, itemTemp, PurchaseInquiryItemTemp.class);
-                            if (inquiryTemp == null) {
-                                temp = tempDao.save(temp);
-                                itemTemp.setInId(temp.getId());
-                            } else {
-                                itemTemp.setInId(inquiryTemp.getId());
-                            }
-                            tempList.add(itemTemp);
+							BeanUtils.copyProperties(purchaseInquiry, temp, PurchaseInquiryTemp.class);
+							PurchaseInquiryItemTemp itemTemp = new PurchaseInquiryItemTemp();
+							BeanUtils.copyProperties(item, itemTemp, PurchaseInquiryItemTemp.class);
+							itemTemp.setInquiry(temp);
+							tempList.add(itemTemp);
 						}
 					}
 

+ 14 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseInquiryItemTemp.java

@@ -44,6 +44,12 @@ public class PurchaseInquiryItemTemp {
 	@Column(name = "id_inid", nullable = false)
 	private Long inId;
 
+	/**
+	 * 询价单
+	 */
+	@Transient
+	private PurchaseInquiryTemp inquiry;
+
 	/**
 	 * 买家采购员UU
 	 */
@@ -311,6 +317,14 @@ public class PurchaseInquiryItemTemp {
 		this.inId = inId;
 	}
 
+	public PurchaseInquiryTemp getInquiry() {
+		return inquiry;
+	}
+
+	public void setInquiry(PurchaseInquiryTemp inquiry) {
+		this.inquiry = inquiry;
+	}
+
 	public Long getUserUU() {
 		return userUU;
 	}

+ 50 - 29
src/main/java/com/uas/platform/b2b/service/impl/PurchaseInquiryServiceImpl.java

@@ -117,6 +117,9 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
 	@Autowired
     private PurchaseInquiryItemTempDao tempDao;
 
+	@Autowired
+	private PurchaseInquiryTempDao inquiryTempDao;
+
 	private final static ErpBufferedLogger logger = BufferedLoggerManager.getLogger(ErpBufferedLogger.class);
 
     static final String TEL_REGEXP = "^((\\(\\d{3}\\))|(\\d{3}\\-))?(13|15|18|17)\\d{9}$";
@@ -128,35 +131,53 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
 
     @Override
     public void saveList(List<PurchaseInquiryItemTemp> purchaseInquiryItemTemps) {
-        purchaseInquiryItemTemps = tempDao.save(purchaseInquiryItemTemps);
-        List<PurchaseInquiryItem> inquiryItems = new ArrayList<PurchaseInquiryItem>();
-        if (!CollectionUtils.isEmpty(purchaseInquiryItemTemps)) {
-            for (PurchaseInquiryItemTemp temp : purchaseInquiryItemTemps) {
-                PurchaseInquiryItem item = new PurchaseInquiryItem();
-                BeanUtils.copyProperties(temp, item, PurchaseInquiryItem.class);
-                item.setInquiry(purchaseInquiryDao.findOne(temp.getInId()));
-                item.setProduct(productDao.findOne(temp.getProductId()));
-            }
-            saveUserOrders(inquiryItems);
-            Long userUU = SystemSession.getUser().getUserUU();
-            Long enUU = SystemSession.getUser().getEnterprise().getUu();
-            String userIp = SystemSession.getUser().getIp();
-            String userName = SystemSession.getUser().getUserName();
-            sendRemind(PurchaseInquiryItem.distinct(inquiryItems), userUU, userName, userIp, enUU);
-            // 产生消息
-            List<PurchaseInquiry> inquiries = PurchaseInquiryItem.distinct(inquiryItems);
-            List<PurchaseInquiryItem> items = new ArrayList<>();
-            for (PurchaseInquiry inquiry : inquiries) {
-                Set<Long> enUUs = new HashSet<>();
-                for (PurchaseInquiryItem inquiryItem : inquiry.getInquiryItems()) {
-                    if (!enUUs.contains(inquiryItem.getVendUU())) {
-                        items.add(inquiryItem);
-                        enUUs.add(inquiryItem.getVendUU());
-                    }
-                }
-            }
-            ContextUtils.publishEvent(new PurchaseInquiryItemSaveReleaseEvent(items));
-        }
+		try {
+			for (PurchaseInquiryItemTemp itemTemp : purchaseInquiryItemTemps) {
+				PurchaseInquiryTemp inquiryTemp = inquiryTempDao.findByCodeAndEnUU(itemTemp.getInquiry().getCode(), itemTemp.getInquiry().getEnUU());
+				if (inquiryTemp == null) {
+					PurchaseInquiryTemp temp = inquiryTempDao.save(itemTemp.getInquiry());
+					itemTemp.setInId(temp.getId());
+				} else {
+					itemTemp.setInId(inquiryTemp.getId());
+				}
+			}
+			purchaseInquiryItemTemps = tempDao.save(purchaseInquiryItemTemps);
+		} catch (Exception e) {
+			for (PurchaseInquiryItemTemp temp : purchaseInquiryItemTemps) {
+				if (inquiryTempDao.exists(temp.getInId())) {
+					inquiryTempDao.delete(temp.getInId());
+				}
+				throw new IllegalOperatorException("保存失败");
+			}
+		}
+		List<PurchaseInquiryItem> inquiryItems = new ArrayList<PurchaseInquiryItem>();
+		if (!CollectionUtils.isEmpty(purchaseInquiryItemTemps)) {
+			for (PurchaseInquiryItemTemp temp : purchaseInquiryItemTemps) {
+				PurchaseInquiryItem item = new PurchaseInquiryItem();
+				BeanUtils.copyProperties(temp, item, PurchaseInquiryItem.class);
+				item.setInquiry(purchaseInquiryDao.findOne(temp.getInId()));
+				item.setProduct(productDao.findOne(temp.getProductId()));
+			}
+			saveUserOrders(inquiryItems);
+			Long userUU = SystemSession.getUser().getUserUU();
+			Long enUU = SystemSession.getUser().getEnterprise().getUu();
+			String userIp = SystemSession.getUser().getIp();
+			String userName = SystemSession.getUser().getUserName();
+			sendRemind(PurchaseInquiryItem.distinct(inquiryItems), userUU, userName, userIp, enUU);
+			// 产生消息
+			List<PurchaseInquiry> inquiries = PurchaseInquiryItem.distinct(inquiryItems);
+			List<PurchaseInquiryItem> items = new ArrayList<>();
+			for (PurchaseInquiry inquiry : inquiries) {
+				Set<Long> enUUs = new HashSet<>();
+				for (PurchaseInquiryItem inquiryItem : inquiry.getInquiryItems()) {
+					if (!enUUs.contains(inquiryItem.getVendUU())) {
+						items.add(inquiryItem);
+						enUUs.add(inquiryItem.getVendUU());
+					}
+				}
+			}
+			ContextUtils.publishEvent(new PurchaseInquiryItemSaveReleaseEvent(items));
+		}
     }
 
     /**

+ 9 - 12
src/main/java/com/uas/platform/b2b/service/impl/VendorsServiceImpl.java

@@ -1,8 +1,5 @@
 package com.uas.platform.b2b.service.impl;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.uas.sso.util.AccountUtils;
 import com.uas.platform.b2b.dao.CommonDao;
 import com.uas.platform.b2b.dao.DistributeDao;
 import com.uas.platform.b2b.dao.EnterpriseDao;
@@ -21,7 +18,6 @@ import com.uas.platform.b2b.model.Vendor;
 import com.uas.platform.b2b.model.VendorContact;
 import com.uas.platform.b2b.service.VendorService;
 import com.uas.platform.b2b.support.SystemSession;
-import com.uas.platform.b2b.temporary.model.PartnershipRecord;
 import com.uas.platform.core.model.Constant;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.Status;
@@ -334,13 +330,13 @@ public class VendorsServiceImpl implements VendorService {
 		long start = System.currentTimeMillis();
 //		final Long enUU = SystemSession.getUser().getEnterprise().getUu();
         if (null == enUU) {
-            // 设置测试企业 - 优软测试二
-            enUU = 10030994L;
+            // 设置不存在的企业
+            enUU = 100411660L;
         }
         if (StringUtils.isEmpty(productMatchCondition) || productMatchCondition.contains("1=1")) {
 			productMatchCondition = " 1=1 ";
 		} else {
-        	productMatchCondition = productMatchCondition + " and pr_issale = 1 and pr_b2bdisabled <> 1";
+        	productMatchCondition = productMatchCondition + " and pr_issale = 1";
 		}
 		if (StringUtils.isEmpty(enterpriseMatchCondition)) {
 			enterpriseMatchCondition = " 1=1 ";
@@ -348,20 +344,21 @@ public class VendorsServiceImpl implements VendorService {
 		// 查询所有的企业信息
 		StringBuffer enterpriseSql = new StringBuffer();
 		enterpriseSql.append("select en.en_uu, en.en_name, en.en_shortname, en.en_address, en.en_tel, en.en_email, en.en_corporation, en.en_businesscode, en.en_profession, en.en_tags, en.en_contactman, en.en_contacttel from sec$enterprises en right join (" +
-				" select en_uu, count(1) as counts from sec$enterprises left join v$products on en_uu = pr_enuu where ").append(productMatchCondition).append(" and en_uu <> ")
+				" select en_uu, count(1) as counts from sec$enterprises left join products on en_uu = pr_enuu where ").append(productMatchCondition).append(" and en_uu <> ")
 				.append(enUU).append(" and en_name not like '%测试%' and lower(en_name) not like '%test%' and ").append(enterpriseMatchCondition).append(" group by en_uu order by count(1) desc" +
 				" ) a on en.en_uu = a.en_uu order by en.en_weight desc, counts desc");
 		// rownum 控制
 		String rownumSql = ") t where rownum <= " + page * size + ") s where r1 > " + (page - 1) * size;
 		// 查找非供应商的卖当前商品的企业UU
 		StringBuffer vendorRecommendUusSql = new StringBuffer();
+		// and instr(Pr_Title,'测试')<1 and instr(lower(Pr_Title),'test')<1
 		vendorRecommendUusSql.append("select s.*,( select wm_concat(pr_title || (case when pr_brand is not null then '(' || pr_brand || ')' else ' ' end)) from v$products where pr_enuu=en_uu and ")
-				.append(productMatchCondition).append(" and pr_issale = 1 and pr_b2bdisabled <> 1 and instr(Pr_Title,'测试')<1 and instr(lower(Pr_Title),'test')<1 " +
+				.append(productMatchCondition).append(" and pr_issale = 1 and pr_b2bdisabled <> 1 " +
 				" and rownum<5 ) productInfo, (select 1 from purc$vendors where ve_vendenuu = en_uu and ve_myenuu = ").append(enUU)
 				.append(") isVendor from (select t.*,rownum as r1 from (").append(enterpriseSql).append(rownumSql);
 		// 因为需求更改为所有有销售产品的企业都会被返回,所以total直接取除本企业外其他有销售产品的企业数即可,之前的匹配企业数不再返回
 		StringBuffer totalSql = new StringBuffer().append(" select count(1) from (select en_uu from sec$enterprises left join " +
-				" v$products on en_uu = pr_enuu where en_name not like '%测试%' and lower(en_name) not like '%test%' and en_uu <> ")
+				" products on en_uu = pr_enuu where en_name not like '%测试%' and lower(en_name) not like '%test%' and en_uu <> ")
 				.append(enUU).append(" and ").append(productMatchCondition).append(" and ").append(enterpriseMatchCondition).append(" group by en_uu)");
 //        System.out.println("SQL:" + vendorRecommendUusSql.toString());
 //        System.out.println("NUM_SQL:" + totalSql.toString());
@@ -378,7 +375,7 @@ public class VendorsServiceImpl implements VendorService {
 	 * @param page           页数
 	 * @param size           每页条数
 	 * @param vendUU         推荐供应商企业UU
-	 * @param productMatchCondition 列表的物料匹配搜索条件
+	 * @param productMatchCondition 列表的物料匹配搜索条件 -- 需求变更中,此条件已弃用
 	 * @param whereCondition where条件(product的筛选条件拼接)
 	 * @return
 	 */
@@ -462,7 +459,7 @@ public class VendorsServiceImpl implements VendorService {
 		}
 		String value = field.replace("pr_", "");
 		String productSql = "select " + field + " as " + value +" from (" +
-				" select " + field + " from v$products where " + condition + " group by " + field + " order by count(1) desc" +
+				" select " + field + " from v$products where " + condition + " group by " + field +
 				") where rownum <= 10";
 		return commonDao.query(productSql, Product.class);
 	}

+ 2 - 1
src/main/java/com/uas/platform/b2b/v2/controller/InviteRecordController.java

@@ -15,6 +15,7 @@ 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.PageParams;
+import com.uas.platform.core.util.serializer.FlexJsonUtils;
 import com.uas.platform.core.web.bind.RequestState;
 import com.uas.ps.core.util.StringUtils;
 import com.uas.search.b2b.model.SPage;
@@ -158,7 +159,7 @@ public class InviteRecordController {
     @RequestMapping(value = "/add", method = RequestMethod.POST)
     private ModelMap addInvitation(String jsonStr) throws UnsupportedEncodingException {
         String str = URLDecoder.decode(jsonStr, "UTF-8");
-        InvitationRecord record = JSON.parseObject(str, InvitationRecord.class);
+        InvitationRecord record = FlexJsonUtils.fromJson(str, InvitationRecord.class);
         Long enUU = checkByBusinessCode(record.getEnuu(), record.getBussinesscode());
         Long userUU = checkByUserTel(record.getUseruu(), record.getUserTel());
         record.setEnuu(enUU);

+ 1 - 1
src/main/java/com/uas/platform/b2b/v2/service/impl/InviteRecordServiceImpl.java

@@ -149,7 +149,7 @@ public class InviteRecordServiceImpl implements InviteRecordService {
                 "select to_char(in_date, 'yyyy-mm') time,COALESCE(in_active,0),in_enuu from invitationrecords where in_enuu = " + enUU + ")" +
                 "where time like '%" + year + "%' group by time,in_enuu order by time";
         List<Invitation> all = commonDao.query(sql, Invitation.class);
-        String sql1 = "select substr(time, -2) month, time ,in_enuu enUU,count(1) count from(" +
+        String sql1 = "select substr(time, -2) month, time ,in_enuu enUU,count(1) doneCount from(" +
                 "select to_char(in_date, 'yyyy-mm') time,COALESCE(in_active,0),in_enuu from invitationrecords where in_enuu = " + enUU + " and COALESCE(in_active,0) = 1)" +
                 "where time like '%" + year + "%' group by time,in_enuu order by time";
         List<Invitation> done = commonDao.query(sql1, Invitation.class);

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

@@ -34,7 +34,7 @@
 </div>
 <div class="pane base-info" id="order-detail-list">
 	<div class="pub-com_head">
-		<span>应对账单</span>
+		<span>应对账单</span>
 		<div class="p-right">
 			<!-- <a ng-click="print(order)" class="pull-right text-simple"><i
 			class="fa fa-print fa-fw"></i>打印</a> -->

File diff suppressed because it is too large
+ 819 - 819
src/main/webapp/resources/tpl/index/purc/inquiry_new.html


+ 32 - 6
src/main/webapp/resources/tpl/index/purc/order.html

@@ -158,6 +158,31 @@
 	color: #fff;
 	font-weight: inherit;
 	top: -2px;
+}
+	.order-table .product div.text-over {
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+.order-table .product div.text-flow b{
+	float: left;
+}
+.order-table .product div.text-flow span{
+	float: left;
+	display: inline-block;
+	width: 290px;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	overflow: hidden;
+}
+.order-table .product div.text-overflow span{
+	float: left;
+	display: inline-block;
+	width: 340px;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	overflow: hidden;
 }
 </style>
 <link rel="stylesheet" href="static/css/public.css">
@@ -361,17 +386,18 @@
 			ng-if="!order.$collapsed "><!-- && (!searchFilterXls.keyword || item.key || order.$showAll) -->
 			<td class="product">
 				<div class="text-num order-number" ng-class="{'key': item.key&&order.$showAll}" title="第{{::item.number}}行">{{::item.number}}</div>
-				<div class="text-num text-bold">
+				<div class="text-num text-bold text-overflow" title="{{::item.product.code}}">
 					<span ng-bind="::item.product.code"></span>
 				</div>
-				<div>
+				<div class="text-overflow" title="{{::item.product.title}}">
 					<span ng-bind="::item.product.title"></span>
 				</div>
-				<div class="text-muted"
+				<div class="text-muted text-over"
+					 title="{{::item.product.spec}}"
 					ng-bind="::item.product.spec"></div>
-				<div class="text-muted text-bold" ng-if="item.vendspec"><span ng-bind="::item.vendspec"></span></div>
-				<div class="text-bold text-inverse" ng-if="item.factory">送货工厂:<span ng-bind="::item.factory"></span></div>
-				<div class="text-bold text-inverse" ng-if="item.remark">备注:<span ng-bind="::item.remark"></span></div>
+				<div class="text-muted text-bold text-overflow" ng-if="item.vendspec" title="{{item.vendspec}}"><span ng-bind="::item.vendspec"></span></div>
+				<div class="text-bold text-inverse text-flow" ng-if="item.factory" title="{{item.factory}}"><b>送货工厂:</b><span ng-bind="::item.factory"></span></div>
+				<div class="text-bold text-inverse text-flow" ng-if="item.remark" title="{{item.remark}}"><b>备注:</b><span ng-bind="::item.remark"></span></div>
 			</td>
 			<td class="text-center">
 				<div ng-if="!isUser" class="text-num" ng-bind="::item.price | number:6"></div>

+ 34 - 7
src/main/webapp/resources/tpl/index/purc/order_detail.html

@@ -1,3 +1,30 @@
+<style>
+	.block .product div.text-over {
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.block .product div.text-flow b{
+		float: left;
+	}
+	.block .product div.text-flow span{
+		float: left;
+		display: inline-block;
+		width: 290px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.block .product div.text-overflow span{
+		float: left;
+		display: inline-block;
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+</style>
 <div class="loading" ng-class="{'in': loading}">
 	<i></i>
 </div>
@@ -97,17 +124,17 @@
 						<td class="text-center text-num f-16 text-success "  width="50">
 							<span ng-bind="::item.number"></span>
 						</td>
-						<td width="270">
-							<div class="text-num text-bold">
+						<td width="270" class="product">
+							<div class="text-num text-bold text-overflow" title="{{::item.product.code}}">
 								<span ng-bind="::item.product.code"></span>
 							</div>
-							<div>
+							<div class="text-overflow" title="{{::item.product.title}}">
 								<span ng-bind="::item.product.title"></span>
 							</div>
-							<div class="text-muted" ng-bind="::item.product.spec"></div>
-							<div class="text-muted text-bold" ng-if="item.vendspec"><span ng-bind="::item.vendspec"></span></div>
-							<div class="text-bold text-inverse" ng-if="item.factory">送货工厂:<span ng-bind="::item.factory"></span></div>
-							<div class="text-bold text-inverse" ng-if="item.remark">备注:<span ng-bind="::item.remark"></span></div>
+							<div class="text-muted text-over" ng-bind="::item.product.spec" title="{{::item.product.spec}}"></div>
+							<div class="text-muted text-bold text-overflow" ng-if="item.vendspec" title="{{item.vendspec}}"><span ng-bind="::item.vendspec"></span></div>
+							<div class="text-bold text-inverse text-flow" ng-if="item.factory" title="{{item.factory}}"><b>送货工厂:</b><span ng-bind="::item.factory"></span></div>
+							<div class="text-bold text-inverse text-flow" ng-if="item.remark" title="{{item.remark}}"><b>备注:</b><span ng-bind="::item.remark"></span></div>
 						</td>
 						<td class="text-center" width="110">
 							<div ng-if="!isUser" class="text-num" ng-bind="::item.price | number:6"></div>

+ 32 - 6
src/main/webapp/resources/tpl/index/sale/order.html

@@ -144,6 +144,31 @@
 	font-weight: inherit;
 	top: -2px;
 }
+	.order-table .product div.text-over {
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.order-table .product div.text-flow b{
+		float: left;
+	}
+	.order-table .product div.text-flow span{
+		float: left;
+		display: inline-block;
+		width: 290px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.order-table .product div.text-overflow span{
+		float: left;
+		display: inline-block;
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
 </style>
 <link rel="stylesheet" href="static/css/public.css">
 <div class="block" id="public">
@@ -425,17 +450,18 @@
 			ng-if="!order.$collapsed ">
 			<td class="product">
 				<div class="text-num order-number" ng-class="{'key': item.key&&order.$showAll}" title="第{{::item.number}}行">{{::item.number}}</div>
-				<div class="text-num text-bold">
+				<div class="text-num text-bold text-overflow" title="{{::item.product.code}}">
 					<span ng-bind="::item.product.code"></span>
 				</div>
-				<div>
+				<div class="text-overflow" title="{{::item.product.title}}">
 					<span ng-bind="::item.product.title"></span>
 				</div>
-				<div class="text-muted"
+				<div class="text-muted text-over"
+					 title="{{::item.product.spec}}"
 					ng-bind="::item.product.spec"></div>
-				<div class="text-muted text-bold" ng-if="item.vendspec"><span ng-bind="::item.vendspec"></span></div>
-				<div class="text-bold text-inverse" ng-if="item.factory">送货工厂:<span ng-bind="::item.factory"></span></div>
-				<div class="text-bold text-inverse" ng-if="item.remark">备注:<span ng-bind="::item.remark"></span></div>
+				<div class="text-muted text-bold text-overflow" ng-if="item.vendspec" title="{{item.vendspec}}"><span ng-bind="::item.vendspec"></span></div>
+				<div class="text-bold text-inverse text-flow" ng-if="item.factory" title="{{item.factory}}"><b>送货工厂:</b><span ng-bind="::item.factory"></span></div>
+				<div class="text-bold text-inverse text-flow" ng-if="item.remark" title="{{item.remark}}"><b>备注:</b><span ng-bind="::item.remark"></span></div>
 			</td>
 			<td class="text-center">
 				<div ng-if="!isUser" class="text-num" ng-bind="::item.price | number:6"></div>

+ 35 - 7
src/main/webapp/resources/tpl/index/sale/order_detail.html

@@ -1,3 +1,31 @@
+<style>
+	.order-bd .product .text-over{
+		display: inline-block;
+		width: 1200px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.order-bd .product div.text-flow b{
+		float: left;
+	}
+	.order-bd .product div.text-flow span{
+		float: left;
+		display: inline-block;
+		width: 290px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+	.order-bd .product div.text-overflow span{
+		float: left;
+		display: inline-block;
+		width: 340px;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		overflow: hidden;
+	}
+</style>
 <div class="loading" ng-class="{'in': loading}">
 	<i></i>
 </div>
@@ -109,17 +137,17 @@
 							<span ng-bind="::item.number"></span>
 						</td>
 						<td width="200">
-							<div class="text-num">
+							<div class="text-num text-overflow" title="{{::item.product.code}}">
 								<span ng-bind="::item.product.code"></span>
 							</div>
-							<div>
+							<div class="text-overflow" title="{{::item.product.title}}">
 								<span ng-bind="::item.product.title"></span>
 							</div>
-							<div class="text-muted" ng-bind="::item.product.spec"></div>
-							<div class="text-muted text-bold" ng-if="item.vendspec"><span ng-bind="::item.vendspec"></span></div>
-							<div class="text-bold text-inverse" ng-if="item.factory">送货工厂:<span ng-bind="::item.factory"></span></div>
-							<div class="text-bold text-inverse" ng-if="item.remark">备注:<span ng-bind="::item.remark"></span></div>
-							<div ng-repeat="att in item.attachs" class="text-bold text-bold">
+							<div class="text-muted text-over" ng-bind="::item.product.spec" title="{{::item.product.spec}}"></div>
+							<div class="text-muted text-bold text-overflow" ng-if="item.vendspec" title="item.vendspec"><span ng-bind="::item.vendspec"></span></div>
+							<div class="text-bold text-inverse text-flow" ng-if="item.factory" title="{{item.factory}}"><b>送货工厂:</b><span ng-bind="::item.factory"></span></div>
+							<div class="text-bold text-inverse text-flow" ng-if="item.remark" title="{{item.remark}}"><b>备注:</b><span ng-bind="::item.remark"></span></div>
+							<div ng-repeat="att in item.attachs" class="text-bold text-bold text-overflow">
 								<a href="file/{{att.id}}">{{att.name}}</a>
 							</div>
 						</td>

Some files were not shown because too many files changed in this diff