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

对账金额保留两位小数

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

+ 2 - 0
src/main/java/com/uas/platform/b2b/controller/SaleOrderController.java

@@ -1153,6 +1153,8 @@ public class SaleOrderController {
 		map.put("pu_end", new MultiValue(list, true));
 		map.put("pu_status", (short) Status.UNAUDIT.value());
 		pageParams.setNotEqualFilters(map);
+        pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
+        pageParams.getFilters().put("pu_enuu", SystemSession.getUser().getEnterprise().getUu());
 		return searchService.searchPurchaseWaitingOrderIds(keyword, pageParams);
 	}
 

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

@@ -1,6 +1,6 @@
 package com.uas.platform.b2b.model;
 
-import com.uas.platform.b2b.publicapi.model.TradeCount;
+import com.uas.platform.b2b.publicapi.model.ApCheckAmount;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -21,12 +21,12 @@ public class ErpProdIo {
     /**
      * 本月应收(前端传入指定月份)
      */
-    private List<TradeCount> thisMonthCount;
+    private List<ApCheckAmount> thisMonthCount;
 
     /**
      * 应收总额
      */
-    private List<TradeCount> totalCount;
+    private List<ApCheckAmount> totalCount;
 
     /**
      * 供应商名称
@@ -41,19 +41,19 @@ public class ErpProdIo {
         this.details = details;
     }
 
-    public List<TradeCount> getThisMonthCount() {
+    public List<ApCheckAmount> getThisMonthCount() {
         return thisMonthCount;
     }
 
-    public void setThisMonthCount(List<TradeCount> thisMonthCount) {
+    public void setThisMonthCount(List<ApCheckAmount> thisMonthCount) {
         this.thisMonthCount = thisMonthCount;
     }
 
-    public List<TradeCount> getTotalCount() {
+    public List<ApCheckAmount> getTotalCount() {
         return totalCount;
     }
 
-    public void setTotalCount(List<TradeCount> totalCount) {
+    public void setTotalCount(List<ApCheckAmount> totalCount) {
         this.totalCount = totalCount;
     }
 

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

@@ -2,7 +2,7 @@ package com.uas.platform.b2b.model;
 
 import com.alibaba.fastjson.annotation.JSONField;
 import com.uas.platform.b2b.erp.model.InquiryVendorInfo;
-import com.uas.platform.b2b.publicapi.model.TradeCount;
+import com.uas.platform.b2b.publicapi.model.ApCheckAmount;
 import com.uas.platform.core.persistence.Logger;
 import com.uas.platform.core.persistence.OtherUserUU;
 import com.uas.platform.core.persistence.StatusColumn;
@@ -219,13 +219,13 @@ public class Vendor implements Serializable {
      * 本月应收(前端传入指定月份)
      */
 	@Transient
-    private List<TradeCount> thisMonthCount;
+    private List<ApCheckAmount> thisMonthCount;
 
     /**
      * 应收总额
      */
 	@Transient
-    private List<TradeCount> totalCount;
+    private List<ApCheckAmount> totalCount;
 
 	public Long getId() {
 		return id;
@@ -440,19 +440,19 @@ public class Vendor implements Serializable {
         this.saleContacts = saleContacts;
     }
 
-    public List<TradeCount> getThisMonthCount() {
+    public List<ApCheckAmount> getThisMonthCount() {
         return thisMonthCount;
     }
 
-    public void setThisMonthCount(List<TradeCount> thisMonthCount) {
+    public void setThisMonthCount(List<ApCheckAmount> thisMonthCount) {
         this.thisMonthCount = thisMonthCount;
     }
 
-    public List<TradeCount> getTotalCount() {
+    public List<ApCheckAmount> getTotalCount() {
         return totalCount;
     }
 
-    public void setTotalCount(List<TradeCount> totalCount) {
+    public void setTotalCount(List<ApCheckAmount> totalCount) {
         this.totalCount = totalCount;
     }
 

+ 10 - 10
src/main/java/com/uas/platform/b2b/model/util/UnCheckedCountSqls.java

@@ -12,21 +12,21 @@ public class UnCheckedCountSqls {
     /**
      * 货款调账未对账金额查询语句
      */
-    public static final String ADJUSTMENT_COUNT_SQL = "select coalesce(sum((aa_qty - coalesce(aa_ycheckqty, 0)) * aa_orderprice), 0) as amount, aa_currency as currency \n" +
+    public static final String ADJUSTMENT_COUNT_SQL = "select coalesce(sum((aa_qty - coalesce(aa_ycheckqty, 0)) * aa_orderprice), 0) as count, aa_currency as currency \n" +
         "from purc$apbilladjustment where coalesce(aa_thischeckqty, 0) <> 0 and aa_enuu = ? and aa_custuu = ? " +
         "group by aa_currency";
 
     /**
      * 当月货款调账未对账金额查询语句
      */
-    public static final String THISMONTH_ADJUSTMENT_COUNT_SQL = "select coalesce(sum((aa_qty - coalesce(aa_ycheckqty, 0)) * aa_orderprice), 0) as amount, aa_currency as currency \n" +
+    public static final String THISMONTH_ADJUSTMENT_COUNT_SQL = "select coalesce(sum((aa_qty - coalesce(aa_ycheckqty, 0)) * aa_orderprice), 0) as count, aa_currency as currency \n" +
         "from purc$apbilladjustment where coalesce(aa_thischeckqty, 0) <> 0 and aa_enuu = ? and aa_custuu = ? and aa_date between ? and ?" +
         "group by aa_currency";
 
     /**
      * 客户采购验收单未对账金额查询语句
      */
-    public static final String SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as amount, pa_currency as currency \n" +
+    public static final String SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as count, pa_currency as currency \n" +
         "from purc$accept left join `purc$acceptitem` on pai_paid = pa_id " +
         "where pa_venduu = ? and pa_enuu = ? and pai_qty > coalesce(pai_ycheckqty, 0) and pai_orderprice <> 0 " +
         "group by pa_currency";
@@ -34,7 +34,7 @@ public class UnCheckedCountSqls {
     /**
      * 客户采购验收单未对账金额查询语句
      */
-    public static final String THISMONTH_SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as amount, pa_currency as currency \n" +
+    public static final String THISMONTH_SALE_ACCEPT_COUNT_SQL = "select coalesce(sum((pai_qty - coalesce(pai_ycheckqty, 0)) * pai_orderprice), 0) as count, pa_currency as currency \n" +
         "from purc$accept left join `purc$acceptitem` on pai_paid = pa_id " +
         "where pa_venduu = ? and pa_enuu = ? and pai_qty > coalesce(pai_ycheckqty, 0) and pai_orderprice <> 0 and pa_date between ? and ?" +
         "group by pa_currency";
@@ -42,21 +42,21 @@ public class UnCheckedCountSqls {
     /**
      * 客户采购验退单未对账金额查询语句
      */
-    public static final String SALE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) *  pri_orderprice), 0) as amount, pr_currency as currency \n" +
+    public static final String SALE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) *  pri_orderprice), 0) as count, pr_currency as currency \n" +
         "from `purc$return` left join `purc$returnitem` on pr_id = pri_prid " +
         "where pri_qty > abs(coalesce(pri_ycheckqty, 0)) and pr_venduu = ? and pr_enuu = ? group by pr_currency";
 
     /**
      * 客户采购验退单未对账金额查询语句
      */
-    public static final String THISMONTH_SALE_RETURN_COUNT_SQL = "select sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) *  pri_orderprice) as amount, pr_currency as currency \n" +
+    public static final String THISMONTH_SALE_RETURN_COUNT_SQL = "select sum(((-(1) * pri_qty ) - coalesce(pri_ycheckqty, 0)) *  pri_orderprice) as count, pr_currency as currency \n" +
         "from `purc$return` left join `purc$returnitem` on pr_id = pri_prid " +
         "where pri_qty > abs(coalesce(pri_ycheckqty, 0)) and pr_venduu = ? and pr_enuu = ? and pr_date between ? and ? group by pr_currency";
 
     /**
      * 客户委外验收单未对账金额查询语句
      */
-    public static final String MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as amount, ma_currency as currency " +
+    public static final String MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as count, ma_currency as currency " +
         " from make$accept " +
         "join make$acceptitem on ma_id = mai_paid " +
         "where mai_qty > coalesce(mai_ycheckqty, 0) and ma_venduu = ? and ma_enuu = ? and mai_orderpice > 0 group by ma_currency";
@@ -64,7 +64,7 @@ public class UnCheckedCountSqls {
     /**
      * 客户委外验收单未对账金额查询语句
      */
-    public static final String THISMONTH_MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as amount,ma_currency as currency " +
+    public static final String THISMONTH_MAKE_ACCEPT_COUNT_SQL = "select coalesce(sum((mai_qty - coalesce(mai_ycheckqty, 0)) * mai_orderpice), 0) as count, ma_currency as currency " +
         " from make$accept " +
         "join make$acceptitem on ma_id = mai_paid " +
         "where mai_qty > coalesce(mai_ycheckqty, 0) and ma_venduu = ? and ma_enuu = ? and mai_orderpice > 0 and ma_date between ? and ? group by ma_currency";
@@ -72,7 +72,7 @@ public class UnCheckedCountSqls {
     /**
      * 客户委外验退单未对账金额查询语句
      */
-    public static final String MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) *  mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as amount,mr_currency as currency " +
+    public static final String MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) *  mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as count,mr_currency as currency " +
         " from make$return " +
         "join make$returnitem on mr_id =  mri_paid " +
         "where mri_qty > abs(coalesce(mri_ycheckqty, 0)) and mr_venduu = ? and mr_enuu = ? and mri_orderpice > 0 group by mr_currency";
@@ -80,7 +80,7 @@ public class UnCheckedCountSqls {
     /**
      * 客户委外验退单未对账金额查询语句
      */
-    public static final String THISMONTH_MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) *  mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as amount, mr_currency as currency " +
+    public static final String THISMONTH_MAKE_RETURN_COUNT_SQL = "select coalesce(sum(((-(1) *  mri_qty ) - coalesce(mri_ycheckqty, 0)) * mri_orderpice), 0) as count, mr_currency as currency " +
         " from make$return " +
         "join make$returnitem on mr_id =  mri_paid " +
         "where mri_qty > abs(coalesce(mri_ycheckqty, 0)) and mr_venduu = ? and mr_enuu = ? and mri_orderpice > 0 and mr_date between ? and ? " +

+ 16 - 0
src/main/java/com/uas/platform/b2b/publicapi/controller/ApCheckApiController.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2b.publicapi.controller;
 
 import com.uas.platform.b2b.publicapi.service.ApCheckApiService;
+import com.uas.platform.b2b.task.ApCheckTask;
 import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.ui.ModelMap;
@@ -22,6 +23,9 @@ public class ApCheckApiController {
     @Autowired
     private ApCheckApiService apCheckApiService;
 
+    @Autowired
+    ApCheckTask apCheckTask;
+
     /**
      * 日志
      */
@@ -68,4 +72,16 @@ public class ApCheckApiController {
         logger.info("查询企业对账金额: " + enUU + ", " + startTime + ", " + endTime + ", amount: " + amount);
         return new ModelMap("count", amount);
     }
+
+    /**
+     * 执行更新对账数据
+     *
+     * @return 执行时间
+     */
+    @RequestMapping(value = "/updateApCheck", method = RequestMethod.GET)
+    public String updateApCheck() {
+        Long start = System.currentTimeMillis();
+        apCheckTask.updateCount();
+        return "cost: " + (System.currentTimeMillis() - start);
+    }
 }

+ 0 - 10
src/main/java/com/uas/platform/b2b/publicapi/model/TradeCount.java

@@ -111,14 +111,4 @@ public class TradeCount implements Serializable {
 
     }
 
-    /**
-     * 通过币别,总额获取交易额
-     *
-     * @param currency 币别
-     * @param amount 总额
-     */
-    public TradeCount(String currency, Double amount) {
-        this.currency = currency;
-        this.amount = new BigDecimal(amount);
-    }
 }

+ 3 - 2
src/main/java/com/uas/platform/b2b/service/PurchaseApCheckService.java

@@ -6,6 +6,7 @@ import com.uas.platform.b2b.model.PurchaseApCheckItem;
 import com.uas.platform.b2b.model.PurchaseApCheckTodo;
 import com.uas.platform.b2b.model.SearchFilter;
 import com.uas.platform.b2b.model.Vendor;
+import com.uas.platform.b2b.publicapi.model.ApCheckAmount;
 import com.uas.platform.b2b.publicapi.model.TradeCount;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.model.PageParams;
@@ -151,7 +152,7 @@ public interface PurchaseApCheckService {
      * @param customerUU 客户企业UU
      * @return 统计结果
      */
-    List<TradeCount> getDueTrade(Long enUU, Long customerUU);
+    List<ApCheckAmount> getDueTrade(Long enUU, Long customerUU);
 
     /**
      * 获取指定月份应收金额
@@ -163,5 +164,5 @@ public interface PurchaseApCheckService {
      * @param endDate 截止时间
      * @return 统计结果
      */
-    List<TradeCount> getThisMonthTrade(Long enUU, Long customerUU, String checkDate, Long fromDate, Long endDate);
+    List<ApCheckAmount> getThisMonthTrade(Long enUU, Long customerUU, String checkDate, Long fromDate, Long endDate);
 }

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

@@ -10,9 +10,8 @@ import com.uas.platform.b2b.model.ApcheckKeyWord;
 import com.uas.platform.b2b.model.DateFilter;
 import com.uas.platform.b2b.model.ErpProdIODetail;
 import com.uas.platform.b2b.model.ErpProdIo;
-import com.uas.platform.b2b.model.SearchFilter;
 import com.uas.platform.b2b.model.Vendor;
-import com.uas.platform.b2b.publicapi.model.TradeCount;
+import com.uas.platform.b2b.publicapi.model.ApCheckAmount;
 import com.uas.platform.b2b.service.ErpProdIODetailService;
 import com.uas.platform.b2b.service.PurchaseApCheckService;
 import com.uas.platform.b2b.support.CollectionUtil;
@@ -86,7 +85,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
         erpProdIo.setDetails(details);
         // 应收总额
        if (null != keyword.getCustomerUU()) {
-           List<TradeCount> totalTrades = apCheckService.getDueTrade(enUU, keyword.getCustomerUU());
+           List<ApCheckAmount> totalTrades = apCheckService.getDueTrade(enUU, keyword.getCustomerUU());
            List<Vendor> vendors = vendorDao.findByMyEnUUAndVendUU(keyword.getCustomerUU(), enUU);
            if (!CollectionUtil.isEmpty(totalTrades)) {
                erpProdIo.setTotalCount(totalTrades);
@@ -98,7 +97,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                }
            }
            // 本月应收
-           List<TradeCount> thisMonthTrades = apCheckService.getThisMonthTrade(enUU, keyword.getCustomerUU(), checkDate, fromDate, endDate);
+           List<ApCheckAmount> thisMonthTrades = apCheckService.getThisMonthTrade(enUU, keyword.getCustomerUU(), checkDate, fromDate, endDate);
            erpProdIo.setThisMonthCount(thisMonthTrades);
        }
 		return erpProdIo;

+ 7 - 5
src/main/java/com/uas/platform/b2b/service/impl/PurchaseApBillServiceImpl.java

@@ -1,6 +1,7 @@
 package com.uas.platform.b2b.service.impl;
 
 import com.alibaba.fastjson.JSON;
+import com.uas.platform.b2b.constant.StringConstant;
 import com.uas.platform.b2b.core.util.ThreadUtils;
 import com.uas.platform.b2b.dao.CommonDao;
 import com.uas.platform.b2b.dao.PurchaseApBillDao;
@@ -18,6 +19,7 @@ import com.uas.platform.b2b.model.PurchaseApBillItem;
 import com.uas.platform.b2b.model.SearchFilter;
 import com.uas.platform.b2b.model.Vendor;
 import com.uas.platform.b2b.ps.ProductUtils;
+import com.uas.platform.b2b.publicapi.model.ApCheckAmount;
 import com.uas.platform.b2b.publicapi.model.TradeCount;
 import com.uas.platform.b2b.search.SearchService;
 import com.uas.platform.b2b.service.ErpProdIODetailService;
@@ -232,11 +234,11 @@ public class PurchaseApBillServiceImpl implements PurchaseApBillService {
                 .forEach(customer -> {
                     Long vendorUU = customer.getVendEnUU();
                     if (!com.uas.ps.core.util.StringUtils.isEmpty(customer.getTotalCountString())) {
-                        List<TradeCount> tradeCounts = JSON.parseArray(customer.getTotalCountString(), TradeCount.class);
+                        List<ApCheckAmount> tradeCounts = JSON.parseArray(customer.getTotalCountString(), ApCheckAmount.class);
                         customer.setTotalCount(tradeCounts);
                     }
                     // 本月应收
-                    List<TradeCount> thisMonthTrades = purchaseApCheckService.getThisMonthTrade(vendorUU, enUU, checkDate, fromDate, endDate);
+                    List<ApCheckAmount> thisMonthTrades = purchaseApCheckService.getThisMonthTrade(vendorUU, enUU, checkDate, fromDate, endDate);
                     customer.setThisMonthCount(thisMonthTrades);
                 });
         }
@@ -262,7 +264,7 @@ public class PurchaseApBillServiceImpl implements PurchaseApBillService {
          */
         pageInfo.filter("myEnUU", SystemSession.getUser().getEnterprise().getUu());
         pageInfo.filter("apcheck", Constant.YES);
-        pageInfo.expression(PredicateUtils.ne("totalCountString", " ", true));
+        pageInfo.expression(PredicateUtils.ne("totalCountString", StringConstant.BLANK, true));
         pageInfo.expression(PredicateUtils.isNotNull("totalCountString"));
         if (!com.uas.ps.core.util.StringUtils.isEmpty(keyword)) {
             pageInfo.expression(PredicateUtils.like("vendorEnterprise.enName", keyword, true));
@@ -311,7 +313,7 @@ public class PurchaseApBillServiceImpl implements PurchaseApBillService {
         erpProdIo.setDetails(details);
         // 应收总额
         if (null != searchKeyWord.getVendorUU()) {
-            List<TradeCount> totalTrades = purchaseApCheckService.getDueTrade(searchKeyWord.getVendorUU(), enUU);
+            List<ApCheckAmount> totalTrades = purchaseApCheckService.getDueTrade(searchKeyWord.getVendorUU(), enUU);
             List<Vendor> vendors = vendorDao.findByMyEnUUAndVendUU(enUU, searchKeyWord.getVendorUU());
             erpProdIo.setVendorName(vendors.get(0).getVendorEnterprise().getEnName());
             if (!CollectionUtil.isEmpty(totalTrades)) {
@@ -324,7 +326,7 @@ public class PurchaseApBillServiceImpl implements PurchaseApBillService {
                 }
             }
             // 本月应收
-            List<TradeCount> thisMonthTrades = purchaseApCheckService.getThisMonthTrade(searchKeyWord.getVendorUU(), enUU, checkDate, fromDate, endDate);
+            List<ApCheckAmount> thisMonthTrades = purchaseApCheckService.getThisMonthTrade(searchKeyWord.getVendorUU(), enUU, checkDate, fromDate, endDate);
             erpProdIo.setThisMonthCount(thisMonthTrades);
         }
         return erpProdIo;

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

@@ -1,6 +1,7 @@
 package com.uas.platform.b2b.service.impl;
 
 import com.alibaba.fastjson.JSON;
+import com.uas.platform.b2b.constant.StringConstant;
 import com.uas.platform.b2b.core.util.ContextUtils;
 import com.uas.platform.b2b.core.util.DateFormatUtils;
 import com.uas.platform.b2b.core.util.DateUtils;
@@ -24,11 +25,13 @@ import com.uas.platform.b2b.model.SearchFilter;
 import com.uas.platform.b2b.model.SourceForApcheck;
 import com.uas.platform.b2b.model.Vendor;
 import com.uas.platform.b2b.model.util.UnCheckedCountSqls;
+import com.uas.platform.b2b.publicapi.model.ApCheckAmount;
 import com.uas.platform.b2b.publicapi.model.TradeCount;
 import com.uas.platform.b2b.search.SearchService;
 import com.uas.platform.b2b.service.OrderRedDotService;
 import com.uas.platform.b2b.service.PurchaseApCheckService;
 import com.uas.platform.b2b.service.UserService;
+import com.uas.platform.b2b.support.DecimalUtils;
 import com.uas.platform.b2b.support.SPageUtils;
 import com.uas.platform.b2b.support.SystemSession;
 import com.uas.platform.core.exception.IllegalOperatorException;
@@ -526,11 +529,11 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
                 .forEach(customer -> {
                     Long customerUU = customer.getMyEnUU();
                     if (!StringUtils.isEmpty(customer.getTotalCountString())) {
-                        List<TradeCount> tradeCounts = JSON.parseArray(customer.getTotalCountString(), TradeCount.class);
+                        List<ApCheckAmount> tradeCounts = JSON.parseArray(customer.getTotalCountString(), ApCheckAmount.class);
                         customer.setTotalCount(tradeCounts);
                     }
                     // 本月应收
-                    List<TradeCount> thisMonthTrades = getThisMonthTrade(enUU, customerUU, checkDate, fromDate, endDate);
+                    List<ApCheckAmount> thisMonthTrades = getThisMonthTrade(enUU, customerUU, checkDate, fromDate, endDate);
                     customer.setThisMonthCount(thisMonthTrades);
                 });
         }
@@ -562,7 +565,7 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
          */
         pageInfo.filter("vendEnUU", SystemSession.getUser().getEnterprise().getUu());
         pageInfo.filter("apcheck", Constant.YES);
-        pageInfo.expression(PredicateUtils.ne("totalCountString", "", true));
+        pageInfo.expression(PredicateUtils.ne("totalCountString", StringConstant.BLANK, true));
         pageInfo.expression(PredicateUtils.isNotNull("totalCountString"));
         if (filter != null) {
             pageInfo.expression(PredicateUtils.in("myEnUU", filter.getDistribute(), true));
@@ -586,7 +589,7 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
      * @return 统计结果
      */
     @Override
-    public List<TradeCount> getThisMonthTrade(Long enUU, Long customerUU, String checkDate, Long fromDate, Long endDate) {
+    public List<ApCheckAmount> getThisMonthTrade(Long enUU, Long customerUU, String checkDate, Long fromDate, Long endDate) {
         String sqlFromDate;
         String sqlEndDate;
         /*
@@ -614,49 +617,49 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
         } else {
             throw new IllegalOperatorException("请选择对账时间");
         }
-        List<TradeCount> totalTrades = new ArrayList<>();
+        List<ApCheckAmount> totalTrades = new ArrayList<>();
         ThreadUtils
             // 货款调账
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_ADJUSTMENT_COUNT_SQL, TradeCount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_ADJUSTMENT_COUNT_SQL, ApCheckAmount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
                 totalTrades.addAll(trades);
             })
             // 采购验收
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_SALE_ACCEPT_COUNT_SQL, TradeCount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_SALE_ACCEPT_COUNT_SQL, ApCheckAmount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
                 totalTrades.addAll(trades);
             })
             // 采购验退
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_SALE_RETURN_COUNT_SQL, TradeCount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_SALE_RETURN_COUNT_SQL, ApCheckAmount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
                 totalTrades.addAll(trades);
             })
             // 委外验收
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_MAKE_ACCEPT_COUNT_SQL, TradeCount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_MAKE_ACCEPT_COUNT_SQL, ApCheckAmount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
                 totalTrades.addAll(trades);
             })
             // 委外验退
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_MAKE_RETURN_COUNT_SQL, TradeCount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.THISMONTH_MAKE_RETURN_COUNT_SQL, ApCheckAmount.class, enUU, customerUU, sqlFromDate, sqlEndDate);
                 totalTrades.addAll(trades);
             })
             .run();
-        Double rmbCount = totalTrades.stream().filter(tradeCount -> RMB.equals(tradeCount.getCurrency()) && null != tradeCount.getAmount())
-            .mapToDouble(trade -> trade.getAmount().doubleValue()).sum();
-        Double usdCount = totalTrades.stream().filter(tradeCount -> USD.equals(tradeCount.getCurrency()) && null != tradeCount.getAmount())
-            .mapToDouble(trade -> trade.getAmount().doubleValue()).sum();
-        Double hkdCount = totalTrades.stream().filter(tradeCount -> HKD.equals(tradeCount.getCurrency()) && null != tradeCount.getAmount())
-            .mapToDouble(trade -> trade.getAmount().doubleValue()).sum();
-        List<TradeCount> resultCounts = new ArrayList<>();
+        Double rmbCount = totalTrades.stream().filter(tradeCount -> RMB.equals(tradeCount.getCurrency()))
+            .mapToDouble(ApCheckAmount::getCount).sum();
+        Double usdCount = totalTrades.stream().filter(tradeCount -> USD.equals(tradeCount.getCurrency()))
+            .mapToDouble(ApCheckAmount::getCount).sum();
+        Double hkdCount = totalTrades.stream().filter(tradeCount -> HKD.equals(tradeCount.getCurrency()))
+            .mapToDouble(ApCheckAmount::getCount).sum();
+        List<ApCheckAmount> resultCounts = new ArrayList<>();
         if (rmbCount > 0) {
-            resultCounts.add(new TradeCount(RMB, rmbCount));
+            resultCounts.add(new ApCheckAmount(RMB, DecimalUtils.decimalPoint(rmbCount, 2)));
         }
         if (usdCount > 0) {
-            resultCounts.add(new TradeCount(USD, usdCount));
+            resultCounts.add(new ApCheckAmount(USD, DecimalUtils.decimalPoint(usdCount, 2)));
         }
         if (hkdCount > 0) {
-            resultCounts.add(new TradeCount(HKD, hkdCount));
+            resultCounts.add(new ApCheckAmount(HKD, DecimalUtils.decimalPoint(hkdCount, 2)));
         }
         return resultCounts;
     }
@@ -669,50 +672,50 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
      * @return 统计结果
      */
     @Override
-    public List<TradeCount> getDueTrade(Long enUU, Long customerUU) {
-        List<TradeCount> totalTrades = new ArrayList<>();
+    public List<ApCheckAmount> getDueTrade(Long enUU, Long customerUU) {
+        List<ApCheckAmount> totalTrades = new ArrayList<>();
         ThreadUtils
             // 货款调账
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.ADJUSTMENT_COUNT_SQL, TradeCount.class, enUU, customerUU);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.ADJUSTMENT_COUNT_SQL, ApCheckAmount.class, enUU, customerUU);
                 totalTrades.addAll(trades);
             })
             // 采购验收
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.SALE_ACCEPT_COUNT_SQL, TradeCount.class, enUU, customerUU);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.SALE_ACCEPT_COUNT_SQL, ApCheckAmount.class, enUU, customerUU);
                 totalTrades.addAll(trades);
             })
             // 采购验退
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.SALE_RETURN_COUNT_SQL, TradeCount.class, enUU, customerUU);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.SALE_RETURN_COUNT_SQL, ApCheckAmount.class, enUU, customerUU);
                 totalTrades.addAll(trades);
             })
             // 委外验收
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.MAKE_ACCEPT_COUNT_SQL, TradeCount.class, enUU, customerUU);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.MAKE_ACCEPT_COUNT_SQL, ApCheckAmount.class, enUU, customerUU);
                 totalTrades.addAll(trades);
             })
             // 委外验退
             .task(() -> {
-                List<TradeCount> trades = commonDao.query(UnCheckedCountSqls.MAKE_RETURN_COUNT_SQL, TradeCount.class, enUU, customerUU);
+                List<ApCheckAmount> trades = commonDao.query(UnCheckedCountSqls.MAKE_RETURN_COUNT_SQL, ApCheckAmount.class, enUU, customerUU);
                 totalTrades.addAll(trades);
             })
             .run();
-        Double rmbCount = totalTrades.stream().filter(tradeCount -> RMB.equals(tradeCount.getCurrency()) && null != tradeCount.getAmount())
-            .mapToDouble(trade -> trade.getAmount().doubleValue()).sum();
-        Double usdCount = totalTrades.stream().filter(tradeCount -> USD.equals(tradeCount.getCurrency()) && null != tradeCount.getAmount())
-            .mapToDouble(trade -> trade.getAmount().doubleValue()).sum();
-        Double hkdCount = totalTrades.stream().filter(tradeCount -> HKD.equals(tradeCount.getCurrency()) && null != tradeCount.getAmount())
-            .mapToDouble(trade -> trade.getAmount().doubleValue()).sum();
-        List<TradeCount> resultCounts = new ArrayList<>();
+        Double rmbCount = totalTrades.stream().filter(tradeCount -> RMB.equals(tradeCount.getCurrency()))
+            .mapToDouble(ApCheckAmount::getCount).sum();
+        Double usdCount = totalTrades.stream().filter(tradeCount -> USD.equals(tradeCount.getCurrency()))
+            .mapToDouble(ApCheckAmount::getCount).sum();
+        Double hkdCount = totalTrades.stream().filter(tradeCount -> HKD.equals(tradeCount.getCurrency()))
+            .mapToDouble(ApCheckAmount::getCount).sum();
+        List<ApCheckAmount> resultCounts = new ArrayList<>();
         if (rmbCount > 0) {
-            resultCounts.add(new TradeCount(RMB, rmbCount));
+            resultCounts.add(new ApCheckAmount(RMB, DecimalUtils.decimalPoint(rmbCount, 2)));
         }
         if (usdCount > 0) {
-            resultCounts.add(new TradeCount(USD, usdCount));
+            resultCounts.add(new ApCheckAmount(USD, DecimalUtils.decimalPoint(usdCount, 2)));
         }
         if (hkdCount > 0) {
-            resultCounts.add(new TradeCount(HKD, hkdCount));
+            resultCounts.add(new ApCheckAmount(HKD, DecimalUtils.decimalPoint(hkdCount, 2)));
         }
         return resultCounts;
     }

+ 33 - 3
src/main/java/com/uas/platform/b2b/support/DecimalUtils.java

@@ -1,6 +1,10 @@
 package com.uas.platform.b2b.support;
 
+import com.uas.platform.core.exception.IllegalOperatorException;
+
+import java.math.BigDecimal;
 import java.text.DecimalFormat;
+import java.text.NumberFormat;
 
 /**
  * 平台数据小数点处理方式
@@ -19,14 +23,40 @@ public class DecimalUtils {
      * @param digit 小数点
      * @return 返回处理后的数据
      */
-    public static Double decimalPoint(Double oldValue, Integer digit) {
+    public static double decimalPoint(Double oldValue, Integer digit) {
         if (null != oldValue) {
             String str = "#.###############";
             String digitStr = str.substring(0, (2 + digit));
             DecimalFormat decimalFormat = new java.text.DecimalFormat(digitStr);
             return Double.valueOf(decimalFormat.format(oldValue));
-        } else {
-            return 0.00;
         }
+        return 0.00;
+    }
+
+    /**
+     * 传入double数据,根据需要保留的位数,四舍五入原则。
+     */
+    public static Double fractionNumHalfUp(Double value, Integer fraction) {
+        if (value == null) {
+            return null;
+        }
+        if (fraction == null || fraction < 0) {
+            throw new IllegalOperatorException("您传入的需要保留的有效位数是" + fraction + ",请核对信息");
+        }
+        NumberFormat numberFormat = NumberFormat.getInstance();
+        numberFormat.setMaximumFractionDigits(fraction);
+        numberFormat.setGroupingUsed(false);
+        BigDecimal bigDecimal = new BigDecimal(numberFormat.format(value));
+        return bigDecimal.setScale(fraction, BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+
+    private static Double formatDouble(double d, Integer fraction) {
+        NumberFormat nf = NumberFormat.getInstance();
+        //设置保留多少位小数
+        nf.setMaximumFractionDigits(fraction);
+        // 取消科学计数法
+        nf.setGroupingUsed(false);
+        //返回结果
+        return Double.valueOf(nf.format(d));
     }
 }

+ 2 - 1
src/main/java/com/uas/platform/b2b/task/ApCheckTask.java

@@ -5,6 +5,7 @@ import com.uas.platform.b2b.dao.CommonDao;
 import com.uas.platform.b2b.dao.CommunalLogDao;
 import com.uas.platform.b2b.erp.model.VendorInfo;
 import com.uas.platform.b2b.model.CommunalLog;
+import com.uas.platform.b2b.publicapi.model.ApCheckAmount;
 import com.uas.platform.b2b.publicapi.model.TradeCount;
 import com.uas.platform.b2b.service.PurchaseApCheckService;
 import com.uas.platform.b2b.support.CollectionUtil;
@@ -52,7 +53,7 @@ public class ApCheckTask {
         if (!CollectionUtil.isEmpty(vendorList)) {
             final int[] size = {0};
             vendorList.forEach(vendorInfo -> {
-                List<TradeCount> tradeCounts = apCheckService.getDueTrade(vendorInfo.getVenduu(), vendorInfo.getCustuu());
+                List<ApCheckAmount> tradeCounts = apCheckService.getDueTrade(vendorInfo.getVenduu(), vendorInfo.getCustuu());
                 String tradeString;
                 if (!CollectionUtil.isEmpty(tradeCounts)) {
                     tradeString = JSON.toJSONString(tradeCounts);

+ 17 - 56
src/main/webapp/resources/js/index/app.js

@@ -9654,18 +9654,14 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 pageParams.keyword = $scope.keyword;
                 if ($scope.active === 'all') {
                     pageParams.keyword = $scope.keyword
-                    var _fromDate = $scope.thisMouthOut + '-01 00:00:00'
-                    _fromDate = _fromDate.replace(/-/g,'/')
-                    var _d  = new Date(_fromDate)
+                    var _fromDate =  $scope.thisMouthOut + '-01 00:00:00'
+                    var _d = new Date(_fromDate)
                     _d.setDate(1)
                     _d.setMonth(_d.getMonth() + 1)
                     _d.setDate(_d.getDate() - 1)
                     var _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
-                    _endDate = _endDate.replace(/-/g, '/')
                     _endDate = new Date(_endDate).getTime()
-                    // _fromDate = _fromDate.replace(/-/g, '/')
                     _fromDate = new Date(_fromDate).getTime()
-
                     pageParams.searchFilter.fromDate =  _fromDate
                     pageParams.searchFilter.endDate = _endDate
                     FaApCheck.vendor(BaseService.parseParams(pageParams), function (page) {
@@ -10259,10 +10255,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         };
         $scope.addMouth = function(val) {
             var _sp = new Date()
-            var _time1 = $scope.thisMouth + '-01'
-            _time1 = _time1.replace(/-/g, '/')
-            var _time  = new Date(_time1)
-
+            var _time = new Date($scope.thisMouth)
             _time.setMonth(_time.getMonth() + val)
             _time.setDate(1)
             _time.setMonth(_time.getMonth() + 1)
@@ -10274,16 +10267,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             }
             $scope.thisMouth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
             $scope.apCheckCondition.$open = false
-            // $scope.searchOrder()
+            $scope.searchOrder()
         }
 
         $scope.addMouthOut = function(val) {
             var _sp = new Date()
-            // var _time = new Date($scope.thisMouthOut)
-            var _time1 = $scope.thisMouthOut + '-01'
-            _time1 = _time1.replace(/-/g, '/')
-            var _time  = new Date(_time1)
-            // var _time  = new Date($scope.thisMouthOut.replace(/-/g,'/'))
+            var _time = new Date($scope.thisMouthOut)
             _time.setMonth(_time.getMonth() + val)
             _time.setDate(1)
             _time.setMonth(_time.getMonth() + 1)
@@ -10294,8 +10283,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 $scope.MouthOutShow = true
             }
             $scope.thisMouthOut = _time.getFullYear() + '-' + (_time.getMonth() + 1)
-            // $scope.tableParams.page(1);
-            // $scope.tableParams.reload();
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
         }
 
         $scope.hideshowNotCheck = function() {
@@ -10304,9 +10293,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 
         $scope.$watch('thisMouthOut', function(newVal, oldVal) {
             var _fromDate = new Date()
-
             var _d = new Date(_fromDate)
-            // var _d  = new Date(_fromDate.replace(/-/g,'/'))
             _d.setDate(1)
             _d.setMonth(_d.getMonth() + 1)
             _d.setDate(_d.getDate() - 1)
@@ -10318,9 +10305,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 return
             }
             if (newVal !== oldVal) {
-                // var _d = new Date(newVal)
-                var _newVal = newVal.replace(/-/g,'/')
-                var _d  = new Date(_newVal)
+                var _d = new Date(newVal)
                 _d.setDate(1)
                 _d.setMonth(_d.getMonth() + 1)
                 _d.setDate(_d.getDate() - 1)
@@ -10337,7 +10322,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.$watch('thisMouth', function(newVal, oldVal) {
             var _fromDate = new Date()
             var _d = new Date(_fromDate)
-            // var _d  = new Date(_fromDate.replace(/-/g,'/'))
             _d.setDate(1)
             _d.setMonth(_d.getMonth() + 1)
             _d.setDate(_d.getDate() - 1)
@@ -10349,9 +10333,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 return
             }
             if (newVal !== oldVal) {
-                // var _d = new Date(newVal)
-                var _newVal = newVal.replace(/-/g,'/')
-                var _d  = new Date(_newVal)
+                var _d = new Date(newVal)
                 _d.setDate(1)
                 _d.setMonth(_d.getMonth() + 1)
                 _d.setDate(_d.getDate() - 1)
@@ -10493,15 +10475,11 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 if ($scope.active === 'all') {
                     pageParams.keyword = $scope.keyword
                     var _fromDate =  $scope.thisMouthOut + '-01 00:00:00'
-                    // var _d = new Date(_fromDate)
-                    _fromDate = _fromDate.replace(/-/g,'/')
-                    var _d  = new Date(_fromDate)
+                    var _d = new Date(_fromDate)
                     _d.setDate(1)
                     _d.setMonth(_d.getMonth() + 1)
                     _d.setDate(_d.getDate() - 1)
                     var _endDate = _d.getFullYear() + '-' + (_d.getMonth() + 1) + '-' + _d.getDate() + ' 00:00:00'
-                    _endDate = _endDate.replace(/-/g,'/')
-                    _fromDate = _fromDate.replace(/-/g,'/')
                     _endDate = new Date(_endDate).getTime()
                     _fromDate = new Date(_fromDate).getTime()
                     pageParams.searchFilter.fromDate =  _fromDate
@@ -11102,10 +11080,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         };
         $scope.addMouth = function(val) {
             var _sp = new Date()
-            // var _time = new Date($scope.thisMouth)
-            var _time = $scope.thisMouth + '-01'
-            _time = _time.replace(/-/g,'/')
-            _time  = new Date(_time)
+            var _time = new Date($scope.thisMouth)
             _time.setMonth(_time.getMonth() + val)
             _time.setDate(1)
             _time.setMonth(_time.getMonth() + 1)
@@ -11117,16 +11092,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             }
             $scope.thisMouth = _time.getFullYear() + '-' + (_time.getMonth() + 1)
             $scope.apCheckCondition.$open = false
-            // $scope.searchOrder()
+            $scope.searchOrder()
         }
 
         $scope.addMouthOut = function(val) {
             var _sp = new Date()
-            var _time = $scope.thisMouthOut + '-01'
-            _time = _time.replace(/-/g,'/')
-            _time  = new Date(_time)
-            // var _time = new Date($scope.thisMouthOut)
-            // var _time  = new Date($scope.thisMouthOut.replace(/-/g,'/'))
+            var _time = new Date($scope.thisMouthOut)
             _time.setMonth(_time.getMonth() + val)
             _time.setDate(1)
             _time.setMonth(_time.getMonth() + 1)
@@ -11137,8 +11108,8 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 $scope.MouthOutShow = true
             }
             $scope.thisMouthOut = _time.getFullYear() + '-' + (_time.getMonth() + 1)
-            // $scope.tableParams.page(1);
-            // $scope.tableParams.reload();
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
         }
 
         $scope.hideshowNotCheck = function() {
@@ -11148,7 +11119,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.$watch('thisMouthOut', function(newVal, oldVal) {
             var _fromDate = new Date()
             var _d = new Date(_fromDate)
-            // var _d  = new Date(_fromDate.replace(/-/g,'/'))
             _d.setDate(1)
             _d.setMonth(_d.getMonth() + 1)
             _d.setDate(_d.getDate() - 1)
@@ -11160,11 +11130,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 return
             }
             if (newVal !== oldVal) {
-                // var _d = new Date(newVal)
-                var _d = newVal + '-01'
-                _d = _d.replace(/-/g,'/')
-                _d  = new Date(_d)
-                // var _d  = new Date(newVal.replace(/-/g,'/'))
+                var _d = new Date(newVal)
                 _d.setDate(1)
                 _d.setMonth(_d.getMonth() + 1)
                 _d.setDate(_d.getDate() - 1)
@@ -11181,7 +11147,6 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         $scope.$watch('thisMouth', function(newVal, oldVal) {
             var _fromDate = new Date()
             var _d = new Date(_fromDate)
-            // var _d  = new Date(_fromDate.replace(/-/g,'/'))
             _d.setDate(1)
             _d.setMonth(_d.getMonth() + 1)
             _d.setDate(_d.getDate() - 1)
@@ -11193,11 +11158,7 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
                 return
             }
             if (newVal !== oldVal) {
-                // var _d = new Date(newVal)
-                var _d = newVal + '-01'
-                _d = _d.replace(/-/g,'/')
-                _d  = new Date(_d)
-                // var _d  = new Date(newVal.replace(/-/g,'/'))
+                var _d = new Date(newVal)
                 _d.setDate(1)
                 _d.setMonth(_d.getMonth() + 1)
                 _d.setDate(_d.getDate() - 1)

+ 3 - 3
src/main/webapp/resources/tpl/index/fa/arCheck.html

@@ -183,7 +183,7 @@
 	</div>
 
 	<div ng-hide="showNotCheck">
-		<div class="condition block" ng-show="!showNotCheck">
+		<div class="condition block"  ng-show="!showNotCheck">
 			<div class="search-bg condition block" style="padding: 10px 15px;">
 				<div class="row">
 					<div id="topSearch" ng-show="active !== 'all'" style="float: left">
@@ -283,7 +283,7 @@
 				</div>
 			</div>
 		</div>
-		<div  ng-if="active === 'all'">
+		<div ng-if="active === 'all'">
 			<table class="order-table block order-table2" ng-table="tableParams" width="100%" style="table-layout:fixed">
 				<thead>
 				<tr class="header">
@@ -326,7 +326,7 @@
 			</table>
 		</div>
 		<div ng-if="active !== 'all'">
-			<table class="order-table block" ng-table="tableParams" >
+			<table class="order-table block" ng-table="tableParams">
 				<thead>
 				<tr class="header">
 					<th width="150">对账期间</th>

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

@@ -250,7 +250,7 @@
 						<div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick"
 							 on-toggle="searchAdvance=open">
 							<input type="search" class="form-control input-sm" ng-model="keyword"
-								   ng-search="onSearch(keyword)" placeholder="输入单据编号、客户名称、物料名称搜索" style="width: 100%"/>
+								   ng-search="onSearch(keyword)" placeholder="输入单据编号、供应商名称、物料名称搜索" style="width: 100%"/>
 							<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
 						</div>
 					</div>