Просмотр исходного кода

应收对账单相关功能调整

hejq 7 лет назад
Родитель
Сommit
fc11545cad

+ 14 - 3
src/main/java/com/uas/platform/b2b/dao/PurchaseApCheckDao.java

@@ -1,14 +1,15 @@
 package com.uas.platform.b2b.dao;
 
-import java.util.List;
-
+import com.uas.platform.b2b.model.ErpProdIODetail;
+import com.uas.platform.b2b.model.PurchaseApCheck;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.jpa.repository.query.Procedure;
 import org.springframework.data.repository.query.Param;
 import org.springframework.stereotype.Repository;
 
-import com.uas.platform.b2b.model.PurchaseApCheck;
+import java.util.List;
 
 @Repository
 public interface PurchaseApCheckDao extends JpaSpecificationExecutor<PurchaseApCheck>, JpaRepository<PurchaseApCheck, Long> {
@@ -63,4 +64,14 @@ public interface PurchaseApCheckDao extends JpaSpecificationExecutor<PurchaseApC
 	 */
 	@Query("select count(p), p.checkStatus from PurchaseApCheck p where p.id in :ids group by p.checkStatus")
 	List<Object[]> getUnreadCountEveryStatus(@Param("ids") List<Long> ids);
+
+    /**
+     * 根据条件筛选对账单
+     *
+     * @param con 筛选条件
+     * @param prod 物料筛选条件
+     * @return
+     */
+	@Procedure(name = "apchek")
+	List<ErpProdIODetail> findAllApChecks(String con, String prod);
 }

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

@@ -1,29 +1,22 @@
 package com.uas.platform.b2b.model;
 
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
 import com.uas.platform.b2b.erp.model.PurchaseAPBill;
 import com.uas.platform.b2b.support.SystemSession;
 
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
 /**
  * 货款调账
  * 
  * @author hejq
  * @time 创建时间:2017年5月18日
  */
-@Table(name = "purc$apbilladjustment")
+@Table(name = "purc$apbilladjustment", indexes = {
+        @Index(name = "adjust_aa_custuu_index", columnList = "aa_custuu"),
+        @Index(name = "adjust_aa_enuu_index", columnList = "aa_enuu")
+})
 @Entity
 public class ApbillAdjustment implements Serializable {
 

+ 55 - 0
src/main/java/com/uas/platform/b2b/model/ApcheckField.java

@@ -0,0 +1,55 @@
+package com.uas.platform.b2b.model;
+
+/**
+ * 对账时采用的字段
+ *
+ * Created by hejq on 2018-05-17.
+ */
+public enum ApcheckField {
+
+    /**
+     * 企业UU
+     */
+    _venduu,
+
+    /**
+     * 客户企业UU
+     */
+    _enuu,
+
+    /**
+     * 客户名称
+     */
+    en_name,
+
+    /**
+     * 开始日期
+     */
+    fromDate,
+
+    /**
+     * 截止日期
+     */
+    endDate,
+
+    /**
+     * 应付供应商
+     */
+    _receivename,
+
+    /**
+     * 送货工厂
+     */
+    _factory,
+
+    /**
+     * 物料名称
+     */
+    pr_title,
+
+    /**
+     * 物料规格
+     */
+    pr_spec
+
+}

+ 371 - 339
src/main/java/com/uas/platform/b2b/model/ErpProdIODetail.java

@@ -1,380 +1,412 @@
 package com.uas.platform.b2b.model;
 
+import javax.persistence.*;
 import java.io.Serializable;
 import java.util.Date;
 
 /**
  * 买家应付(卖家应收)对账单
  */
+@Entity
+@NamedStoredProcedureQueries({
+        @NamedStoredProcedureQuery(
+                name = "findAllApChecks",
+                procedureName = "apcheck",
+                resultClasses = { ErpProdIODetail.class },
+                parameters = {
+                        @StoredProcedureParameter(
+                                mode = ParameterMode.IN,
+                                name = "con",
+                                type = String.class),
+                        @StoredProcedureParameter(
+                                mode = ParameterMode.IN,
+                                name = "prod",
+                                type = String.class)
+                }
+        )
+})
 public class ErpProdIODetail implements Serializable {
 
 	private static final long serialVersionUID = 1L;
 
 	/**
-	 * 出入库单号
+	 * ID
 	 */
-	private String inOutNo;
+	private String id;
+
+    /**
+     * 出入库单号
+     */
+    private String inoutno;
+
+    /**
+     * 出出入库单序号
+     */
+    private Long detno;
+
+    /**
+     * 单据类型
+     */
+    private String piclass;
+
+    /**
+     * 客户采购编号
+     */
+    private String ordercode;
+
+    /**
+     * 客户采购序号
+     */
+    private Long orderdetno;
+
+    /**
+     * 客户采购料号
+     */
+    private String prodcode;
+
+    /**
+     * 客户采购规格
+     */
+    private String prodspec;
+
+    /**
+     * 客户物料描述
+     */
+    private String prodtitle;
+
+    /**
+     * 客户验收数量
+     */
+    private Double qty;
+
+    /**
+     * 单价
+     */
+    private Double orderprice;
+
+    /**
+     * 币别
+     */
+    private String currency;
+
+    /**
+     * 税率
+     */
+    private Double taxrate;
+
+    /**
+     * 已对账数
+     */
+    private Double ycheckqty;
+
+    /**
+     * 本次对账数
+     */
+    private Double thischeckqty;
+
+    /**
+     * 客户名称
+     */
+    private String custname;
+
+    /**
+     * 客户UU
+     */
+    private Long custuu;
+
+    /**
+     * sourceid
+     */
+    private Long sourceid;
+
+    /**
+     * 单据来源表
+     */
+    private String sourcetable;
+
+    /**
+     * 企业UU
+     */
+    private Long enuu;
+
+    /**
+     * 日期
+     */
+    private Date pidate;
+
+    /**
+     * 汇率
+     */
+    private Double rate;
+
+    /**
+     * 应付供应商编号
+     */
+    private String receivecode;
+
+    /**
+     * 应付供应商名称
+     */
+    private String receivename;
+
+    /**
+     * 金额
+     */
+    private Double money;
+
+    /**
+     * 本次对账金额
+     */
+    private Double nowmoney;
+
+    /**
+     * 送货工厂
+     */
+    private String factory;
+
+    /**
+     * 送货单号
+     */
+    private String sendcode;
+
+    /**
+     * 仓库
+     */
+    private String whname;
+
+    @Id
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getInoutno() {
+        return inoutno;
+    }
+
+    public void setInoutno(String inoutno) {
+        this.inoutno = inoutno;
+    }
+
+    public Long getDetno() {
+        return detno;
+    }
+
+    public void setDetno(Long detno) {
+        this.detno = detno;
+    }
+
+    public String getPiclass() {
+        return piclass;
+    }
+
+    public void setPiclass(String piclass) {
+        this.piclass = piclass;
+    }
+
+    public String getOrdercode() {
+        return ordercode;
+    }
+
+    public void setOrdercode(String ordercode) {
+        this.ordercode = ordercode;
+    }
+
+    public Long getOrderdetno() {
+        return orderdetno;
+    }
+
+    public void setOrderdetno(Long orderdetno) {
+        this.orderdetno = orderdetno;
+    }
+
+    public String getProdcode() {
+        return prodcode;
+    }
+
+    public void setProdcode(String prodcode) {
+        this.prodcode = prodcode;
+    }
+
+    public String getProdspec() {
+        return prodspec;
+    }
+
+    public void setProdspec(String prodspec) {
+        this.prodspec = prodspec;
+    }
+
+    public String getProdtitle() {
+        return prodtitle;
+    }
+
+    public void setProdtitle(String prodtitle) {
+        this.prodtitle = prodtitle;
+    }
+
+    public Double getQty() {
+        return qty;
+    }
+
+    public void setQty(Double qty) {
+        this.qty = qty;
+    }
+
+    public Double getOrderprice() {
+        return orderprice;
+    }
 
-	/**
-	 * 出出入库单序号
-	 */
-	private Long detno;
-
-	/**
-	 * 单据类型
-	 */
-	private String piClass;
-
-	/**
-	 * 客户采购编号
-	 */
-	private String orderCode;
-
-	/**
-	 * 客户采购序号
-	 */
-	private Long orderDetno;
-
-	/**
-	 * 客户采购料号
-	 */
-	private String prodCode;
-
-	/**
-	 * 客户采购规格
-	 */
-	private String prodSpec;
-
-	/**
-	 * 客户物料描述
-	 */
-	private String prodTitle;
-
-	/**
-	 * 客户验收数量
-	 */
-	private Double qty;
-
-	/**
-	 * 单价
-	 */
-	private Double orderPrice;
-
-	/**
-	 * 币别
-	 */
-	private String currency;
-
-	/**
-	 * 税率
-	 */
-	private Double taxrate;
-
-	/**
-	 * 已对账数
-	 */
-	private Double yCheckQty;
-
-	/**
-	 * 本次对账数
-	 */
-	private Double thisCheckQty;
-
-	/**
-	 * 客户名称
-	 */
-	private String custName;
-
-	/**
-	 * 客户UU
-	 */
-	private Long custUu;
-
-	/**
-	 * sourceid
-	 */
-	private Long sourceId;
-
-	/**
-	 * 单据来源表
-	 */
-	private String sourceTable;
-
-	/**
-	 * 企业UU
-	 */
-	private Long enUu;
-
-	/**
-	 * 日期
-	 */
-	private Date piDate;
-
-	/**
-	 * 汇率
-	 */
-	private Double rate;
-
-	/**
-	 * 应付供应商编号
-	 */
-	private String receiveCode;
-
-	/**
-	 * 应付供应商名称
-	 */
-	private String receiveName;
-
-	/**
-	 * 金额
-	 */
-	private Double money;
-
-	/**
-	 * 本次对账金额
-	 */
-	private Double nowMoney;
-
-	/**
-	 * 送货工厂
-	 */
-	private String factory;
-	
-	/**
-	 * 送货单号
-	 */
-	private String sendcode;
-	
-	/**
-	 * 仓库
-	 */
-	private String whname;
-
-	public String getFactory() {
-		return factory;
-	}
-
-	public void setFactory(String factory) {
-		this.factory = factory;
-	}
-
-	public Double getMoney() {
-		this.money = (this.qty == null ? 0 : this.qty) * (this.orderPrice == null ? 0 : this.orderPrice);
-		return this.money;
-	}
-
-	public void setMoney(Double money) {
-		this.money = money;
-	}
-
-	public Double getNowMoney() {
-		this.nowMoney = (this.thisCheckQty == null ? 0 : this.thisCheckQty)
-				* (this.orderPrice == null ? 0 : this.orderPrice);
-		return this.nowMoney;
-	}
-
-	public void setNowMoney(Double nowMoney) {
-		this.nowMoney = nowMoney;
-	}
-
-	public Double getRate() {
-		return rate;
-	}
-
-	public void setRate(Double rate) {
-		this.rate = rate;
-	}
-
-	public Date getPiDate() {
-		return piDate;
-	}
-
-	public void setPiDate(Date piDate) {
-		this.piDate = piDate;
-	}
-
-	public String getInOutNo() {
-		return inOutNo;
-	}
-
-	public void setInOutNo(String inOutNo) {
-		this.inOutNo = inOutNo;
-	}
-
-	public Long getDetno() {
-		return detno;
-	}
-
-	public void setDetno(Long detno) {
-		this.detno = detno;
-	}
-
-	public String getPiClass() {
-		return piClass;
-	}
-
-	public void setPiClass(String piClass) {
-		this.piClass = piClass;
-	}
-
-	public String getOrderCode() {
-		return orderCode;
-	}
-
-	public void setOrderCode(String orderCode) {
-		this.orderCode = orderCode;
-	}
-
-	public Long getOrderDetno() {
-		return orderDetno;
-	}
-
-	public void setOrderDetno(Long orderDetno) {
-		this.orderDetno = orderDetno;
-	}
-
-	public String getProdCode() {
-		return prodCode;
-	}
-
-	public void setProdCode(String prodCode) {
-		this.prodCode = prodCode;
-	}
-
-	public Double getQty() {
-		return qty;
-	}
-
-	public void setQty(Double qty) {
-		this.qty = qty;
-	}
-
-	public Double getOrderPrice() {
-		return orderPrice;
-	}
-
-	public void setOrderPrice(Double orderPrice) {
-		this.orderPrice = orderPrice;
-	}
-
-	public String getCurrency() {
-		return currency;
-	}
-
-	public void setCurrency(String currency) {
-		this.currency = currency;
-	}
-
-	public Double getTaxrate() {
-		return taxrate;
-	}
-
-	public void setTaxrate(Double taxrate) {
-		this.taxrate = taxrate;
-	}
-
-	public Double getYCheckQty() {
-		return yCheckQty;
-	}
-
-	public void setYCheckQty(Double yCheckQty) {
-		this.yCheckQty = yCheckQty;
-	}
+    public void setOrderprice(Double orderprice) {
+        this.orderprice = orderprice;
+    }
 
-	public Double getThisCheckQty() {
-		return thisCheckQty;
-	}
+    public String getCurrency() {
+        return currency;
+    }
 
-	public void setThisCheckQty(Double thisCheckQty) {
-		this.thisCheckQty = thisCheckQty;
-	}
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+    public Double getTaxrate() {
+        return taxrate;
+    }
+
+    public void setTaxrate(Double taxrate) {
+        this.taxrate = taxrate;
+    }
 
-	public String getCustName() {
-		return custName;
-	}
+    public Double getYcheckqty() {
+        return ycheckqty;
+    }
 
-	public void setCustName(String custName) {
-		this.custName = custName;
-	}
+    public void setYcheckqty(Double ycheckqty) {
+        this.ycheckqty = ycheckqty;
+    }
 
-	public Long getCustUu() {
-		return custUu;
-	}
+    public Double getThischeckqty() {
+        return thischeckqty;
+    }
 
-	public void setCustUu(Long custUu) {
-		this.custUu = custUu;
-	}
+    public void setThischeckqty(Double thischeckqty) {
+        this.thischeckqty = thischeckqty;
+    }
 
-	public Long getSourceId() {
-		return sourceId;
-	}
+    public String getCustname() {
+        return custname;
+    }
 
-	public void setSourceId(Long sourceId) {
-		this.sourceId = sourceId;
-	}
+    public void setCustname(String custname) {
+        this.custname = custname;
+    }
 
-	public String getSourceTable() {
-		return sourceTable;
-	}
+    public Long getCustuu() {
+        return custuu;
+    }
 
-	public void setSourceTable(String sourceTable) {
-		this.sourceTable = sourceTable;
-	}
+    public void setCustuu(Long custuu) {
+        this.custuu = custuu;
+    }
 
-	public Long getEnUu() {
-		return enUu;
-	}
+    public Long getSourceid() {
+        return sourceid;
+    }
 
-	public void setEnUu(Long enUu) {
-		this.enUu = enUu;
-	}
+    public void setSourceid(Long sourceid) {
+        this.sourceid = sourceid;
+    }
 
-	public String getReceiveCode() {
-		return receiveCode;
-	}
+    public String getSourcetable() {
+        return sourcetable;
+    }
 
-	public void setReceiveCode(String receiveCode) {
-		this.receiveCode = receiveCode;
-	}
+    public void setSourcetable(String sourcetable) {
+        this.sourcetable = sourcetable;
+    }
 
-	public String getReceiveName() {
-		return receiveName;
-	}
+    public Long getEnuu() {
+        return enuu;
+    }
 
-	public void setReceiveName(String receiveName) {
-		this.receiveName = receiveName;
-	}
+    public void setEnuu(Long enuu) {
+        this.enuu = enuu;
+    }
 
-	public String getProdTitle() {
-		return prodTitle;
-	}
+    public Date getPidate() {
+        return pidate;
+    }
 
-	public void setProdTitle(String prodTitle) {
-		this.prodTitle = prodTitle;
-	}
+    public void setPidate(Date pidate) {
+        this.pidate = pidate;
+    }
 
-	public String getProdSpec() {
-		return prodSpec;
-	}
+    public Double getRate() {
+        return rate;
+    }
 
-	public void setProdSpec(String prodSpec) {
-		this.prodSpec = prodSpec;
-	}
+    public void setRate(Double rate) {
+        this.rate = rate;
+    }
 
-	public String getSendcode() {
-		return sendcode;
-	}
+    public String getReceivecode() {
+        return receivecode;
+    }
 
-	public void setSendcode(String sendcode) {
-		this.sendcode = sendcode;
-	}
+    public void setReceivecode(String receivecode) {
+        this.receivecode = receivecode;
+    }
 
-	public String getWhname() {
-		return whname;
-	}
+    public String getReceivename() {
+        return receivename;
+    }
 
-	public void setWhname(String whname) {
-		this.whname = whname;
-	}
+    public void setReceivename(String receivename) {
+        this.receivename = receivename;
+    }
 
+    public Double getMoney() {
+        this.money = (this.qty == null ? 0 : this.qty) * (this.orderprice == null ? 0 : this.orderprice);
+        return this.money;
+    }
+
+    public void setMoney(Double money) {
+        this.money = money;
+    }
+
+    public Double getNowmoney() {
+        this.nowmoney = (this.thischeckqty == null ? 0 : this.thischeckqty)
+                * (this.orderprice == null ? 0 : this.orderprice);
+        return this.nowmoney;
+    }
+
+    public void setNowmoney(Double nowmoney) {
+        this.nowmoney = nowmoney;
+    }
+
+    public String getFactory() {
+        return factory;
+    }
+
+    public void setFactory(String factory) {
+        this.factory = factory;
+    }
+
+    public String getSendcode() {
+        return sendcode;
+    }
+
+    public void setSendcode(String sendcode) {
+        this.sendcode = sendcode;
+    }
+
+    public String getWhname() {
+        return whname;
+    }
+
+    public void setWhname(String whname) {
+        this.whname = whname;
+    }
 }

+ 4 - 3
src/main/java/com/uas/platform/b2b/model/MakeAccept.java

@@ -1,18 +1,19 @@
 package com.uas.platform.b2b.model;
 
+import javax.persistence.*;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Set;
 
-import javax.persistence.*;
-
 /**
  * 买家的委外验收单
  * 
  * @author aof
  * @date 2015年8月18日
  */
-@Table(name = "make$accept")
+@Table(name = "make$accept", indexes = {
+		@Index(name = "make_accept_enduu_index", columnList = "ma_enuu")
+})
 @Entity
 public class MakeAccept implements Serializable {
 	private static final long serialVersionUID = 1L;

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

@@ -14,6 +14,7 @@ import java.util.Set;
 @Table(name = "make$return", indexes = {
 		@Index(name = "make_return_code_index", columnList = "mr_code"),
 		@Index(name = "make_return_enuu_index", columnList = "mr_enuu"),
+		@Index(name = "make_return_venduu_index", columnList = "mr_venduu"),
 		@Index(name = "make_return_enuu_code_index", columnList = "mr_code,mr_enuu", unique = true)
 })
 @Entity

+ 6 - 16
src/main/java/com/uas/platform/b2b/model/PurchaseAccept.java

@@ -1,31 +1,21 @@
 package com.uas.platform.b2b.model;
 
+import javax.persistence.*;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Set;
 
-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.JoinColumn;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
-import javax.persistence.OrderBy;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
 /**
  * 买家的采购验收单
  * 
  * @author yingp
  * 
  */
-@Table(name = "purc$accept", indexes = {@Index(name = "unique_enuu_code", columnList = "pa_enuu,pa_code", unique = true)})
+@Table(name = "purc$accept", indexes = {
+		@Index(name = "unique_enuu_code", columnList = "pa_enuu,pa_code", unique = true),
+		@Index(name = "pa_venduu_index", columnList = "pa_venduu"),
+        @Index(name = "pa_enuu_index", columnList = "pa_enuu")
+})
 @Entity
 public class PurchaseAccept implements Serializable {
 

+ 5 - 13
src/main/java/com/uas/platform/b2b/model/PurchaseBadIn.java

@@ -1,28 +1,20 @@
 package com.uas.platform.b2b.model;
 
+import javax.persistence.*;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Set;
 
-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.OneToMany;
-import javax.persistence.OrderBy;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
 /**
  * 买家的不良品入库单
  * 
  * @author suntg
  * 
  */
-@Table(name = "purc$badin")
+@Table(name = "purc$badin", indexes = {
+		@Index(name = "pb_enuu_index", columnList = "pb_enuu"),
+		@Index(name = "pb_venduu_index", columnList = "pb_venduu")
+})
 @Entity
 public class PurchaseBadIn implements Serializable {
 

+ 5 - 13
src/main/java/com/uas/platform/b2b/model/PurchaseBadOut.java

@@ -1,28 +1,20 @@
 package com.uas.platform.b2b.model;
 
+import javax.persistence.*;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Set;
 
-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.OneToMany;
-import javax.persistence.OrderBy;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
 /**
  * 买家的不良品出库单
  * 
  * @author suntg
  * 
  */
-@Table(name = "purc$badout")
+@Table(name = "purc$badout", indexes = {
+		@Index(name = "po_enuu_index", columnList = "po_enuu"),
+		@Index(name = "po_venduu_index", columnList = "po_venduu")
+})
 @Entity
 public class PurchaseBadOut implements Serializable {
 

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

@@ -11,7 +11,11 @@ import java.util.Set;
  * @author suntg
  *
  */
-@Table(name = "purc$MRB", indexes = {@Index(name = "unique_enuu_code", columnList = "pm_enuu,pm_code", unique = true)})
+@Table(name = "purc$MRB", indexes = {
+		@Index(name = "unique_enuu_code", columnList = "pm_enuu,pm_code", unique = true),
+		@Index(name = "pm_enuu_index", columnList = "pm_enuu"),
+		@Index(name = "pm_venduu_index", columnList = "pm_venduu")
+})
 @Entity
 public class PurchaseMRB implements Serializable {
 

+ 6 - 16
src/main/java/com/uas/platform/b2b/model/PurchaseReturn.java

@@ -1,31 +1,21 @@
 package com.uas.platform.b2b.model;
 
+import javax.persistence.*;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Set;
 
-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.JoinColumn;
-import javax.persistence.OneToMany;
-import javax.persistence.OneToOne;
-import javax.persistence.OrderBy;
-import javax.persistence.SequenceGenerator;
-import javax.persistence.Table;
-
 /**
  * 买家的采购验退单
  * 
  * @author suntg
  * 
  */
-@Table(name = "purc$return", indexes = {@Index(name = "unique_enuu_code", columnList = "pr_enuu,pr_code", unique = true)})
+@Table(name = "purc$return", indexes = {
+		@Index(name = "unique_enuu_code", columnList = "pr_enuu,pr_code", unique = true),
+		@Index(name = "pr_enuu_index", columnList = "pr_enuu"),
+		@Index(name = "pr_venduu_index", columnList = "pr_venduu")
+})
 @Entity
 public class PurchaseReturn implements Serializable {
 

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

@@ -8,14 +8,14 @@ package com.uas.platform.b2b.model;
  */
 public class SourceForApcheck {
 
-	private Long sourceId;
-	private String sourceTable;
+	private Long sourceid;
+	private String sourcetable;
 	private Double newYCheckQty;
 
 	public SourceForApcheck(PurchaseApCheckItem item) {
 		super();
-		this.sourceId = item.getSourceId();
-		this.sourceTable = item.getSourceTable();
+		this.sourceid = item.getSourceId();
+		this.sourcetable = item.getSourceTable();
 		if (item.getOldYCheckQty() == null) {
 			this.newYCheckQty = item.getCheckQty();
 		} else {
@@ -24,20 +24,20 @@ public class SourceForApcheck {
 
 	}
 
-	public Long getSourceId() {
-		return sourceId;
+	public Long getSourceid() {
+		return sourceid;
 	}
 
-	public void setSourceId(Long sourceId) {
-		this.sourceId = sourceId;
+	public void setSourceid(Long sourceid) {
+		this.sourceid = sourceid;
 	}
 
-	public String getSourceTable() {
-		return sourceTable;
+	public String getSourcetable() {
+		return sourcetable;
 	}
 
-	public void setSourceTable(String sourceTable) {
-		this.sourceTable = sourceTable;
+	public void setSourcetable(String sourcetable) {
+		this.sourcetable = sourcetable;
 	}
 
 	public Double getNewYCheckQty() {
@@ -49,7 +49,7 @@ public class SourceForApcheck {
 	}
 
 	public boolean hasInfo() {
-		if (this.getNewYCheckQty() != null && this.getSourceId() != null && this.getSourceTable() != null) {
+		if (this.getNewYCheckQty() != null && this.getSourceid() != null && this.getSourcetable() != null) {
 			return true;
 		}
 		return false;
@@ -57,7 +57,7 @@ public class SourceForApcheck {
 
 	@Override
 	public String toString() {
-		return "SourceForApcheck [sourceId=" + sourceId + ", sourceTable=" + sourceTable + ", newYCheckQty=" + newYCheckQty + "]";
+		return "SourceForApcheck [sourceId=" + sourceid + ", sourceTable=" + sourcetable + ", newYCheckQty=" + newYCheckQty + "]";
 	}
 
 }

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

@@ -1,17 +1,19 @@
 package com.uas.platform.b2b.service.impl;
 
-import java.util.Date;
-import java.util.List;
-
+import com.uas.platform.b2b.dao.CommonDao;
+import com.uas.platform.b2b.model.ApcheckField;
+import com.uas.platform.b2b.model.ErpProdIODetail;
+import com.uas.platform.b2b.service.ErpProdIODetailService;
+import com.uas.platform.b2b.support.SystemSession;
 import org.apache.axis.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
-import com.uas.platform.b2b.dao.CommonDao;
-import com.uas.platform.b2b.model.ErpProdIODetail;
-import com.uas.platform.b2b.service.ErpProdIODetailService;
-import com.uas.platform.b2b.support.SystemSession;
+import javax.persistence.EntityManager;
+import javax.persistence.StoredProcedureQuery;
+import java.util.Date;
+import java.util.List;
 
 @Service
 public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
@@ -19,6 +21,9 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
 	@Autowired
 	private CommonDao commonDao;
 
+	@Autowired
+    private EntityManager entityManager;
+
 	public List<ErpProdIODetail> findAllApChecks(List<Long> filter) {
 		Long enUu = SystemSession.getUser().getEnterprise().getUu();
 		String sql = "select p.pi_inoutno inOutNo,p.pd_detno detno ,p.pi_class piClass, p.pd_ordercode orderCode, p.pd_orderdetno  orderDetno,"
@@ -53,66 +58,36 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
 	@Override
 	public List<ErpProdIODetail> findXlsApChecks(List<Long> filter, String keyword, Long fromDate, Long endDate) {
 		Long enUu = SystemSession.getUser().getEnterprise().getUu();
-		String sql = "select p.pi_inoutno inOutNo,p.pd_detno detno ,p.pi_class piClass, p.pd_ordercode orderCode, p.pd_orderdetno  orderDetno,"
-				+ " p.pd_prodcode prodCode, p.pr_spec prodSpec, p.pr_title prodTitle,p.pd_qty qty, p.pi_date piDate, p.pd_orderprice  orderPrice, p.pi_currency currency, p.pd_taxrate taxrate, p.whname whname, p.pd_ycheckqty yCheckQty,"
-				+ " p.pd_thischeckqty thisCheckQty, p.custuu custUu, p.custname custName, p.enuu enUu, p.sourceid sourceId, p.pi_sourcetable sourceTable, p.pi_rate rate, p.pi_receivecode receiveCode,"
-				+ " p.pi_receivename receiveName , p.pd_factory factory, p.sendcode sendcode from erp$prodiodetail p where p.pd_thischeckqty<>0 and enuu = ?";
+		String AND = " and ";
+		String equal = " = ";
+		String quotation = "'";
+        StringBuffer con = new StringBuffer(AND).append(ApcheckField._venduu).append(equal).append(enUu);
+        StringBuffer prod = new StringBuffer(" where 1=1 ");
 		if (!StringUtils.isEmpty(keyword)) {
 			// 物料名称和规格存在特殊符号,用|做分隔符
 			String[] strs = keyword.split("\\|");
-			if (strs.length == 1) {
-				sql = sql + " and custname = '" + strs[0] + "'";
+			if (strs.length >= 1) {
+                prod.append(AND).append(ApcheckField.en_name).append(equal).append(quotation).append(strs[0]).append(quotation);
 			}
-			if (strs.length == 2) {
-				if (strs[0].length() != 0) {
-					sql = sql + " and custname = '" + strs[0] + "'";
-				}
-				sql = sql + " and pi_receivename = '" + strs[1] + "'";
+			if (strs.length >= 2) {
+				con.append(AND).append(ApcheckField._receivename).append(equal).append(quotation).append(strs[1]).append(quotation);
 			}
-			if (strs.length == 3) {
-				if (strs[0].length() != 0) {
-					sql = sql + " and custname = '" + strs[0] + "'";
-				}
-				if (strs[1].length() != 0) {
-					sql = sql + " and pi_receivename = '" + strs[1] + "'";
-				}
-				sql = sql + " and pd_factory = '" + strs[2] + "'";
+			if (strs.length >= 3) {
+                con.append(AND).append(ApcheckField._factory).append(equal).append(quotation).append(strs[2]).append(quotation);
 			}
-			if (strs.length == 4) {
-				if (strs[0].length() != 0) {
-					sql = sql + " and custname = '" + strs[0] + "'";
-				}
-				if (strs[1].length() != 0) {
-					sql = sql + " and pi_receivename = '" + strs[1] + "'";
-				}
-				if (strs[2].length() != 0) {
-					sql = sql + " and pd_factory = '" + strs[2] + "'";
-				}
-				sql = sql + " and pr_title = '" + strs[3] + "'";
+			if (strs.length >= 4) {
+			    prod.append(AND).append(ApcheckField.pr_title).append(equal).append(quotation).append(strs[3]).append(quotation);
 			}
-			if (strs.length == 5) {
-				if (strs[0].length() != 0) {
-					sql = sql + " and custname = '" + strs[0] + "'";
-				}
-				if (strs[1].length() != 0) {
-					sql = sql + " and pi_receivename = '" + strs[1] + "'";
-				}
-				if (strs[2].length() != 0) {
-					sql = sql + " and pd_factory = '" + strs[2] + "'";
-				}
-				if (strs[3].length() != 0) {
-					sql = sql + " and pr_title = '" + strs[3] + "'";
-				}
-				sql = sql + " and pr_spec = '" + strs[4] + "'";
+			if (strs.length >= 5) {
+                prod.append(AND).append(ApcheckField.pr_spec).append(equal).append(quotation).append(strs[4]).append(quotation);
 			}
 		}
 		if (fromDate != null) {
-			sql = sql + " and DATE_FORMAT(pi_date, '%Y-%m-%d') >= ('" + new java.sql.Date(new Date(fromDate).getTime()) + "')";
+            con.append(AND).append(" DAYFORMDATE(_date) >= '").append(new java.sql.Date(new Date(fromDate).getTime())).append("' ");
 		}
 		if (endDate != null) {
-			sql = sql + " and DATE_FORMAT(pi_date, '%Y-%m-%d') < ('" + new java.sql.Date(new Date(endDate + 1000).getTime()) + "')";
+            con.append(AND).append(" DAYFORMDATE(_date) <= '").append(new java.sql.Date(new Date(endDate + 1000 * 60 * 60 * 24).getTime())).append("' ");
 		}
-		Object[] args = new Object[] { enUu };
 		if (!CollectionUtils.isEmpty(filter)) {
 			String[] str = new String[filter.size()];
 			Long[] lon = new Long[filter.size() + 1];
@@ -126,12 +101,13 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
 				lon[i + 1] = filter.get(i);
 				s = s + str[i];
 			}
-			sql = sql + " and custUu in (" + s + ")";
+            con.append(AND).append(ApcheckField._enuu).append(" in (").append(s).append(")");
 			lon[0] = enUu;
-			args = lon;
 		}
-		sql = sql + " order by pi_date desc";
-		List<ErpProdIODetail> erpProdIODetails = commonDao.query(sql, args, ErpProdIODetail.class);
-		return erpProdIODetails;
+        StoredProcedureQuery storedProcedureQuery = this.entityManager.createNamedStoredProcedureQuery("findAllApChecks");
+        storedProcedureQuery.setParameter("con", con.toString());
+        storedProcedureQuery.setParameter("prod", prod.append(" ").toString());
+        storedProcedureQuery.execute();
+        return storedProcedureQuery.getResultList();
 	}
 }

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

@@ -295,30 +295,30 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
 				if (source.hasInfo()) {
 					String idName = null;
 					String yCheckQtyName = null;
-					if (source.getSourceTable().equals("purc$returnitem")) {
+					if (source.getSourcetable().equals("purc$returnitem")) {
 						idName = "pri_id";
 						yCheckQtyName = "pri_ycheckqty";
-					} else if (source.getSourceTable().equals("purc$acceptitem")) {
+					} else if (source.getSourcetable().equals("purc$acceptitem")) {
 						idName = "pai_id";
 						yCheckQtyName = "pai_ycheckqty";
-					} else if (source.getSourceTable().equals("purc$badinitem")) {
+					} else if (source.getSourcetable().equals("purc$badinitem")) {
 						idName = "pbi_id";
 						yCheckQtyName = "pbi_ycheckqty";
-					} else if (source.getSourceTable().equals("purc$badoutitem")) {
+					} else if (source.getSourcetable().equals("purc$badoutitem")) {
 						idName = "poi_id";
 						yCheckQtyName = "poi_ycheckqty";
-					} else if (source.getSourceTable().equals("make$acceptitem")) {
+					} else if (source.getSourcetable().equals("make$acceptitem")) {
 						idName = "mai_id";
 						yCheckQtyName = "mai_ycheckqty";
-					} else if (source.getSourceTable().equals("make$returnitem")) {
+					} else if (source.getSourcetable().equals("make$returnitem")) {
 						idName = "mri_id";
 						yCheckQtyName = "mri_ycheckqty";
-					} else if (source.getSourceTable().equals("purc$apbilladjustment")) {
+					} else if (source.getSourcetable().equals("purc$apbilladjustment")) {
 						idName = "aa_id";
 						yCheckQtyName = "aa_ycheckqty";
 					}
-					String sql = "update " + source.getSourceTable() + " set " + yCheckQtyName + " = "
-							+ source.getNewYCheckQty() + " where " + idName + " = " + source.getSourceId();
+					String sql = "update " + source.getSourcetable() + " set " + yCheckQtyName + " = "
+							+ source.getNewYCheckQty() + " where " + idName + " = " + source.getSourceid();
 					jdbcTemplate.execute(sql);
 				} else {
 					throw new IllegalOperatorException("保存失败!");

+ 34 - 34
src/main/webapp/resources/js/index/app.js

@@ -10783,15 +10783,15 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.sdateFrom = new Date($scope.sdateTo.getFullYear(), $scope.sdateTo.getMonth(), 1);
         $scope.vuuorname = '';
         $scope.factory = '';
-        $scope.prodTitle = '';
-        $scope.prodSpec = '';
+        $scope.prodtitle = '';
+        $scope.prodspec = '';
         $scope.condition.uuorname = '';
         $scope.condition.dateFrom = '';
         $scope.condition.dateTo = '';
         $scope.condition.venduuorname = '';
         $scope.condition.factory = '';
-        $scope.condition.prodTitle = '';
-        $scope.condition.prodSpec = '';
+        $scope.condition.prodtitle = '';
+        $scope.condition.prodspec = '';
 
         $scope.searchOrder = function (check) {
             $scope.data = [];
@@ -10799,8 +10799,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.totalMoney = 0;
             $scope.condition.uuorname = $scope.suuorname;
             $scope.condition.factory = $scope.factory
-            $scope.condition.prodTitle = $scope.prodTitle;
-            $scope.condition.prodSpec = $scope.prodSpec;
+            $scope.condition.prodtitle = $scope.prodtitle;
+            $scope.condition.prodspec = $scope.prodspec;
             $scope.condition.dateFrom = ($scope.sdateFrom || 0);
             $scope.thisdatato = ($scope.sdateTo || 0);
             if ($scope.thisdatato != 0) {
@@ -10816,8 +10816,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 $scope.keywordXls = angular.copy(($scope.condition.uuorname == null ? "" : $scope.condition.uuorname)
                     + "|" + ($scope.condition.venduuorname == null ? "" : $scope.condition.venduuorname)
                     + "|" + ($scope.condition.factory == null ? "" : $scope.condition.factory)
-                    + "|" + ($scope.condition.prodTitle == null ? "" : $scope.condition.prodTitle)
-                    + "|" + ($scope.condition.prodSpec == null ? "" : $scope.condition.prodSpec));//保存当前取值的关键词
+                    + "|" + ($scope.condition.prodtitle == null ? "" : $scope.condition.prodtitle)
+                    + "|" + ($scope.condition.prodspec == null ? "" : $scope.condition.prodspec));//保存当前取值的关键词
                 $scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
                 $scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
                 if (!$scope.suuorname) {
@@ -10861,13 +10861,13 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         // 点击勾选全部的复选框
         $scope.checkAll = function () {
             $scope.totalMoney = 0;
-            $scope.filteredData = $filter('filter')($scope.data, $scope.condition.prodTitle || $scope.condition.uuorname || $scope.condition.venduuorname || $scope.condition.prodSpec || $scope.condition.factory);
+            $scope.filteredData = $filter('filter')($scope.data, $scope.condition.prodtitle || $scope.condition.uuorname || $scope.condition.venduuorname || $scope.condition.prodspec || $scope.condition.factory);
             var uuorname = $scope.suuorname;
             var venduuorname = $scope.venduuorname;
             var dateFrom = $scope.condition.dateFrom;
             var dateTo = $scope.condition.dateTo;
             var prodTitle = $scope.condition.prodTitle;
-            var prodSpec = $scope.condition.prodSpec;
+            var prodSpec = $scope.condition.prodspec;
             var factory = $scope.condition.factory;
             angular.forEach($scope.filteredData, function (item) {
                 if ((item.piDate >= dateFrom || dateFrom == '') && (item.piDate < dateTo || dateTo == '')) {
@@ -10883,7 +10883,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             $scope.totalMoney = 0;
             angular.forEach($scope.data, function (check) {
                 if (check.$selected) {
-                    var price = DecimalNumber.accMul((check.thisCheckQty || 0), (check.orderPrice || 0));
+                    var price = DecimalNumber.accMul((check.thischeckqty || 0), (check.orderprice || 0));
                     $scope.totalMoney += Math.round(price * 100) / 100;
                 } else {
                     $scope.totalMoney += 0;
@@ -10997,7 +10997,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     if (check.qty > 0) {
                         $scope.data.maxThisCheckQty = check.qty;
                         $scope.data.minThisCheckQty = 0;
-                        if (check.qty - (check.yCheckQty || 0) < check.thisCheckQty || check.thisCheckQty < 0 || check.thisCheckQty == 0) {
+                        if (check.qty - (check.ycheckqty || 0) < check.thischeckqty || check.thischeckqty < 0 || check.thischeckqty == 0) {
                             $scope.validQty = false;
                             $scope.loading = false;
                             toaster.pop('error', '本次对账数量,填写有误!');
@@ -11005,7 +11005,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     } else if (check.qty < 0) {
                         $scope.data.maxThisCheckQty = 0;
                         $scope.data.minThisCheckQty = check.qty;
-                        if (((-check.qty) - (-check.yCheckQty) < (-check.thisCheckQty)) || check.thisCheckQty > 0 || check.thisCheckQty == 0) {
+                        if (((-check.qty) - (-check.ycheckqty) < (-check.thischeckqty)) || check.thischeckqty > 0 || check.thischeckqty == 0) {
                             $scope.validQty = false;
                             $scope.loading = false;
                             toaster.pop('error', '本次对账数量,填写有误!');
@@ -11016,41 +11016,41 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                     if ($scope.apCheck.beginDate == '') {
                         $scope.apCheck.beginDate = check.piDate;
                     } else {
-                        $scope.apCheck.beginDate = $scope.apCheck.beginDate > check.piDate ? check.piDate : $scope.apCheck.beginDate;
+                        $scope.apCheck.beginDate = $scope.apCheck.beginDate > check.pidate ? check.pidate : $scope.apCheck.beginDate;
                     }
 
                     //获取最大时间作为对账区间的截止时间
                     if ($scope.apCheck.endDate == '') {
-                        $scope.apCheck.endDate = check.piDate;
+                        $scope.apCheck.endDate = check.pidate;
                     } else {
-                        $scope.apCheck.endDate = $scope.apCheck.endDate < check.piDate ? check.piDate : $scope.apCheck.endDate;
+                        $scope.apCheck.endDate = $scope.apCheck.endDate < check.pidate ? check.pidate : $scope.apCheck.endDate;
                     }
 
                     //应收对账单明细行数据
-                    $scope.item.orderCode = check.orderCode;
-                    $scope.item.orderClass = check.piClass;
-                    $scope.item.orderDetno = check.orderDetno;
-                    $scope.item.price = check.orderPrice;
-                    $scope.item.checkQty = check.thisCheckQty;
-                    $scope.item.amount = (check.thisCheckQty || 0) * (check.orderPrice || 0);
-                    $scope.item.sourceId = check.sourceId;
-                    $scope.item.sourceTable = check.sourceTable;
-                    $scope.item.oldYCheckQty = check.yCheckQty;
-                    $scope.item.prodCode = check.prodCode;
-                    $scope.item.prodTitle = check.prodTitle;
-                    $scope.item.prodSpec = check.prodSpec;
-                    $scope.item.inoutno = check.inOutNo;
+                    $scope.item.orderCode = check.ordercode;
+                    $scope.item.orderClass = check.piclass;
+                    $scope.item.orderDetno = check.orderdetno;
+                    $scope.item.price = check.orderprice;
+                    $scope.item.checkQty = check.thischeckqty;
+                    $scope.item.amount = (check.thischeckqty || 0) * (check.orderprice || 0);
+                    $scope.item.sourceId = check.sourceid;
+                    $scope.item.sourceTable = check.sourcetable;
+                    $scope.item.oldYCheckQty = check.ycheckqty;
+                    $scope.item.prodCode = check.prodcode;
+                    $scope.item.prodTitle = check.prodtitle;
+                    $scope.item.prodSpec = check.prodspec;
+                    $scope.item.inoutno = check.inoutno;
                     $scope.item.inoutnodetno = check.detno;
                     $scope.item.taxrate = check.taxrate;
-                    $scope.item.receiveCode = check.receiveCode;
-                    $scope.item.receiveName = check.receiveName;
+                    $scope.item.receiveCode = check.receivecode;
+                    $scope.item.receiveName = check.receivename;
                     $scope.item.sendcode = check.sendcode;
                     $scope.item.whname = check.whname;
 
                     //来源表相关信息
-                    $scope.sourceInfo.sourceId = check.sourceId;
-                    $scope.sourceInfo.sourceTable = check.sourceTable;
-                    $scope.sourceInfo.newYCheckQty = ((check.yCheckQty || 0) + check.thisCheckQty);
+                    $scope.sourceInfo.sourceid = check.sourceid;
+                    $scope.sourceInfo.sourcetable = check.sourcetable;
+                    $scope.sourceInfo.newYCheckQty = ((check.ycheckqty || 0) + check.thischeckqty);
 
                     sourceInfos.push($scope.sourceInfo);
                     $scope.apCheck.items.push($scope.item);

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

@@ -228,46 +228,43 @@
 			</div>
 			<div class="table-body-wrap">
 				<table class="table table-bordered">
-					<tr
-						ng-repeat="check in data | filter:condition.factory | filter:condition.prodSpec | filter:condition.prodTitle | filter:condition.uuorname | filter:condition.venduuorname | orderBy: 'piDate': reverse=true"
-						ng-if="((condition.dateFrom == '') || ((condition.dateFrom !== '') && (condition.dateFrom <= check.piDate))) && ((condition.dateTo == '') || ((condition.dateTo !== '') && (condition.dateTo >= check.piDate)))"
+					<tr ng-repeat="check in data | filter:condition.factory | filter:condition.prodspec | filter:condition.prodtitle | filter:condition.uuorname | filter:condition.venduuorname | orderBy: 'pidate': reverse=true"
 						class="thAlign" style="height: 40px;">
 						<td width="36" style="text-align: center;vertical-align: middle;"><input
 							ng-model="check.$selected" name="checkbox"
 							ng-click="checkOne(check)" ng-change="getTotalMoney()"
 							type="checkbox"></td>
-						<td width="100"><input ng-model="check.thisCheckQty"
+						<td width="100"><input ng-model="check.thischeckqty"
 							type="number" max="data.maxThisCheckQty"
 							min="data.minThisCheckQty" ng-change="getTotalMoney()"
 							style="width: 75px;" class=" input-sm text-center"></td>
-						<td width="70" title="{{check.custName}}"><div
-								style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.custName}}</div></td>
-						<td width="60">{{::check.inOutNo}}</td>
+						<td width="70" title="{{check.custname}}"><div
+								style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.custname}}</div></td>
+						<td width="60">{{::check.inoutno}}</td>
 						<td width="60">{{::check.sendcode}}</td>
 						<td width="35" align="center">{{::check.detno}}</td>
-						<td width="60">{{::check.piClass}}</td>
-						<td width="60">{{::check.piDate | date:'yyyy-MM-dd' }}</td>
-						<td width="90" title="{{check.receiveName}}">
+						<td width="60">{{::check.piclass}}</td>
+						<td width="60">{{::check.pidate | date:'yyyy-MM-dd' }}</td>
+						<td width="90" title="{{check.receivename}}">
 							<div
-								style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.receiveName}}</div>
+								style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.receivename}}</div>
 						</td>
-						<td width="70">{{::check.orderCode}}</td>
-						<td width="65">{{::check.prodCode}}</td>
-						<td width="70" title="{{check.prodTitle}}">
+						<td width="70">{{::check.ordercode}}</td>
+						<td width="65">{{::check.prodcode}}</td>
+						<td width="70" title="{{check.prodtitle}}">
 							<div
-								style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodTitle}}</div>
+								style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodtitle}}</div>
 						</td>
-						<td width="70" title="{{check.prodSpec}}"><div
-								style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodSpec}}</div></td>
+						<td width="70" title="{{check.prodspec}}"><div
+								style="display: -webkit-box; text-overflow: ellipsis; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 3; -webkit-box-orient: vertical;">{{::check.prodspec}}</div></td>
 						<td width="65">{{::check.factory}}</td>
 						<td width="55">{{::check.qty}}</td>
-						<td width="40">{{::check.orderPrice}}</td>
+						<td width="40">{{::check.orderprice}}</td>
 						<td width="30">{{::check.currency}}</td>
 						<td width="40" align="center">{{::check.taxrate}}</td>
-						<td width="60">{{::(check.qty || 0)*(check.orderPrice || 0) |
+						<td width="60">{{::(check.qty || 0)*(check.orderprice || 0) |
 							number:2}}</td>
-						<td width="60">{{::(check.orderPrice ||
-							0)*(check.thisCheckQty || 0) | number:2}}</td>
+						<td width="60">{{::(check.orderprice || 0)*(check.thischeckqty || 0) | number:2}}</td>
 					</tr>
 					<tr ng-if="!data || data.length==0">
 						<td colspan="19">