Bläddra i källkod

Merge remote-tracking branch 'origin/dev' into dev

zhouy 7 år sedan
förälder
incheckning
b86adfaa70
30 ändrade filer med 352 tillägg och 51 borttagningar
  1. 8 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/MoneyReportColltroller.java
  2. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/AccountDetailsViewMapper.java
  3. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/AcountbalanceViewMapper.java
  4. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/CustomerCheckViewMapper.java
  5. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaydetailViewMapper.java
  6. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecdetailViewMapper.java
  7. 1 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VendorAcountViewMapper.java
  8. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/RecdetailView.java
  9. 8 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/MoneyReportService.java
  10. 48 13
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/MoneyReportServiceImpl.java
  11. 12 0
      applications/money/money-server/src/main/resources/mapper/AccountDetailsViewMapper.xml
  12. 12 0
      applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml
  13. 12 0
      applications/money/money-server/src/main/resources/mapper/CustomerCheckViewMapper.xml
  14. 12 0
      applications/money/money-server/src/main/resources/mapper/PaydetailViewMapper.xml
  15. 12 0
      applications/money/money-server/src/main/resources/mapper/RecdetailViewMapper.xml
  16. 12 0
      applications/money/money-server/src/main/resources/mapper/VendorAcountViewMapper.xml
  17. 4 8
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  18. 6 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  19. 2 2
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdIODetailDTO.java
  20. 9 0
      framework/core/src/main/java/com/usoftchina/saas/utils/DateUtils.java
  21. 14 0
      framework/core/src/main/java/com/usoftchina/saas/utils/StringUtils.java
  22. 10 0
      frontend/saas-web/app/view/core/base/ImportWindow.js
  23. 16 0
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  24. 4 2
      frontend/saas-web/app/view/core/form/MultiCombo.js
  25. 51 9
      frontend/saas-web/app/view/core/query/QueryFormPanel.js
  26. 1 0
      frontend/saas-web/app/view/core/query/QueryPanel.js
  27. 12 0
      frontend/saas-web/app/view/core/query/QueryPanel.scss
  28. 28 0
      frontend/saas-web/app/view/core/query/QueryPanelController.js
  29. 1 1
      frontend/saas-web/app/view/money/report/RecDetail.js
  30. 48 0
      pom.xml

+ 8 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/MoneyReportColltroller.java

@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Map;
+
 /**
  * @author heqw
  * @date 2018/11/9 14:21
@@ -24,42 +26,42 @@ public class MoneyReportColltroller {
     //供应商对账
     @GetMapping("/vendorCheck")
     public Result vendorCheck(PageRequest page, ListReqDTO req) {
-        PageInfo listData = moneyReportService.vendorCheck(page, req);
+        Map<String, Object> listData = moneyReportService.vendorCheck(page, req);
         return Result.success(listData);
     }
 
     //应付账款明细
     @GetMapping("/payDetail")
     public Result payDetail(PageRequest page, ListReqDTO req) {
-        PageInfo listData = moneyReportService.payDetail(page, req);
+        Map<String, Object> listData = moneyReportService.payDetail(page, req);
         return Result.success(listData);
     }
 
     //应收款明细表
     @GetMapping("/recDetail")
     public Result recDetail(PageRequest page, ListReqDTO req) {
-        PageInfo listData = moneyReportService.recDetail(page, req);
+        Map<String, Object> listData = moneyReportService.recDetail(page, req);
         return Result.success(listData);
     }
 
     //资金账号余额表
     @GetMapping("/accountBalance")
     public Result acountBalance(PageRequest page, ListReqDTO req) {
-        PageInfo listData = moneyReportService.acountBalance(page, req);
+        Map<String, Object> listData = moneyReportService.acountBalance(page, req);
         return Result.success(listData);
     }
 
     //客户对账单
     @GetMapping("/customercheck")
     public Result customercheck(PageRequest page, ListReqDTO req) {
-        PageInfo listData = moneyReportService.customercheck(page, req);
+        Map<String, Object> listData = moneyReportService.customercheck(page, req);
         return Result.success(listData);
     }
 
     //冲账明细表
     @GetMapping("/accountdetails")
     public Result accountdetails(PageRequest page, ListReqDTO req) {
-        PageInfo listData = moneyReportService.accountdetails(page, req);
+        Map<String, Object> listData = moneyReportService.accountdetails(page, req);
         return Result.success(listData);
     }
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/AccountDetailsViewMapper.java

@@ -7,4 +7,5 @@ import java.util.List;
 
 public interface AccountDetailsViewMapper {
     List<AccountDetailsView> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/AcountbalanceViewMapper.java

@@ -7,4 +7,5 @@ import java.util.List;
 
 public interface AcountbalanceViewMapper {
     List<AcountbalanceView> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/CustomerCheckViewMapper.java

@@ -8,4 +8,5 @@ import java.util.List;
 
 public interface CustomerCheckViewMapper {
     List<CustomerCheckView> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaydetailViewMapper.java

@@ -7,4 +7,5 @@ import java.util.List;
 
 public interface PaydetailViewMapper {
     List<PaydetailView> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/RecdetailViewMapper.java

@@ -7,4 +7,5 @@ import java.util.List;
 
 public interface RecdetailViewMapper {
     List<RecdetailView> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
 }

+ 1 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VendorAcountViewMapper.java

@@ -7,4 +7,5 @@ import java.util.List;
 
 public interface VendorAcountViewMapper {
     List<VendorAcountView> selectByCondition(@Param("con")String con, @Param("companyId")Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
 }

+ 4 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/RecdetailView.java

@@ -32,6 +32,10 @@ public class RecdetailView {
     private String pi_remark;
     private Integer companyId;
 
+    public Date getMustdate() {
+        return mustdate;
+    }
+
     public void setMustdate(Date mustdate) {
         this.mustdate = mustdate;
     }

+ 8 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/MoneyReportService.java

@@ -4,15 +4,17 @@ import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
 
+import java.util.Map;
+
 /**
  * @author heqw
  * @date 2018/11/9 14:50
  **/
 public interface MoneyReportService {
-    PageInfo vendorCheck(PageRequest page, ListReqDTO req);
-    PageInfo payDetail(PageRequest page, ListReqDTO req);
-    PageInfo recDetail(PageRequest page, ListReqDTO req);
-    PageInfo acountBalance(PageRequest page, ListReqDTO req);
-    PageInfo customercheck(PageRequest page, ListReqDTO req);
-    PageInfo accountdetails(PageRequest page, ListReqDTO req);
+    Map<String, Object> vendorCheck(PageRequest page, ListReqDTO req);
+    Map<String, Object> payDetail(PageRequest page, ListReqDTO req);
+    Map<String, Object> recDetail(PageRequest page, ListReqDTO req);
+    Map<String, Object> acountBalance(PageRequest page, ListReqDTO req);
+    Map<String, Object> customercheck(PageRequest page, ListReqDTO req);
+    Map<String, Object> accountdetails(PageRequest page, ListReqDTO req);
 }

+ 48 - 13
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/MoneyReportServiceImpl.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.money.service.impl;
 
+import com.alibaba.fastjson.JSONArray;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
@@ -9,8 +10,11 @@ import com.usoftchina.saas.money.service.MoneyReportService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author heqw
@@ -32,36 +36,36 @@ public class MoneyReportServiceImpl implements MoneyReportService {
     private AccountDetailsViewMapper accountDetailsViewMapper;
 
     @Override
-    public PageInfo vendorCheck(PageRequest page, ListReqDTO req) {
+    public Map<String, Object> vendorCheck(PageRequest page, ListReqDTO req) {
         return getListDATA(page, req, "Supplier");
     }
 
     @Override
-    public PageInfo payDetail(PageRequest page, ListReqDTO req) {
+    public Map<String, Object> payDetail(PageRequest page, ListReqDTO req) {
         return getListDATA(page, req, "payDetail");
     }
 
     @Override
-    public PageInfo recDetail(PageRequest page, ListReqDTO req) {
+    public Map<String, Object> recDetail(PageRequest page, ListReqDTO req) {
         return getListDATA(page, req, "recDetail");
     }
 
     @Override
-    public PageInfo acountBalance(PageRequest page, ListReqDTO req) {
+    public Map<String, Object> acountBalance(PageRequest page, ListReqDTO req) {
         return getListDATA(page, req, "acountBalance");
     }
 
     @Override
-    public PageInfo customercheck(PageRequest page, ListReqDTO req) {
+    public Map<String, Object> customercheck(PageRequest page, ListReqDTO req) {
         return getListDATA(page, req, "customercheck");
     }
 
     @Override
-    public PageInfo accountdetails(PageRequest page, ListReqDTO req) {
+    public Map<String, Object> accountdetails(PageRequest page, ListReqDTO req) {
         return getListDATA(page, req, "accountdetails");
     }
 
-    private PageInfo getListDATA(PageRequest page, ListReqDTO req, String type) {
+    private Map<String, Object> getListDATA(PageRequest page, ListReqDTO req, String type) {
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -70,34 +74,65 @@ public class MoneyReportServiceImpl implements MoneyReportService {
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
 
-
         //查询数据
-        List list = getListByType(req, type);
+        Map<String, Object> map = getListByType(req, type);
         //取分页信息
-        PageInfo lists = new PageInfo(list);
-        return lists;
+        PageInfo lists = new PageInfo((List) map.get("list"));
+        map.remove("list");
+        map.put("list", lists);
+        return map;
     }
 
-    private List getListByType(ListReqDTO req, String type) {
+    private Map<String, Object> getListByType(ListReqDTO req, String type) {
         List list = null;
         Long companyId = BaseContextHolder.getCompanyId();
         String con = req.getFinalCondition();
+        String calculateFieldsSql = req.getCalculateFieldsSql();
+        JSONArray arr = null;
         if (null == con) {
             con = "1=1";
         }
+
+        String res = null;
         if ("Supplier".equals(type)) {
             list = vendorAcountViewMapper.selectByCondition(con, companyId);
+            if (!StringUtils.isEmpty(calculateFieldsSql)) {
+                res = vendorAcountViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+            }
         } else if("payDetail".equals(type)){
             list = paydetailViewMapper.selectByCondition(con, companyId);
+            if (!StringUtils.isEmpty(calculateFieldsSql)) {
+                res = paydetailViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+            }
         }else if("recDetail".equals(type)){
             list = recdetailViewMapper.selectByCondition(con, companyId);
+            if (!StringUtils.isEmpty(calculateFieldsSql)) {
+                res = recdetailViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+            }
         }else if ("acountBalance".equals(type)){
             list = acountbalanceViewMapper.selectByCondition(con, companyId);
+            if (!StringUtils.isEmpty(calculateFieldsSql)) {
+                res = acountbalanceViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+            }
         }else if ("customercheck".equals(type)){
             list = customerCheckViewMapper.selectByCondition(con, companyId);
+            if (!StringUtils.isEmpty(calculateFieldsSql)) {
+                res = customerCheckViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+            }
         }else if ("accountdetails".equals(type)){
             list = accountDetailsViewMapper.selectByCondition(con, companyId);
+            if (!StringUtils.isEmpty(calculateFieldsSql)) {
+                res = accountDetailsViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+            }
+        }
+
+        try {
+            arr = JSONArray.parseArray(res);
+        } catch (Exception e) {
         }
-        return list;
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("list", list);
+        map.put("calculate", arr);
+        return map;
     }
 }

+ 12 - 0
applications/money/money-server/src/main/resources/mapper/AccountDetailsViewMapper.xml

@@ -24,4 +24,16 @@
     </where>
     order by date desc
   </select>
+
+  <select id="selectCalculateFields" resultType="string">
+    select   ${fields}  from account_details_view
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+  </select>
 </mapper>

+ 12 - 0
applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml

@@ -30,4 +30,16 @@
     order by bankname asc, date desc, bankid desc
   </select>
 
+  <select id="selectCalculateFields" resultType="string">
+    select   ${fields}  from acountbalance_view
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+  </select>
+
 </mapper>

+ 12 - 0
applications/money/money-server/src/main/resources/mapper/CustomerCheckViewMapper.xml

@@ -33,4 +33,16 @@
         order by pi_custname asc, pi_date desc, pi_custcode desc
     </select>
 
+    <select id="selectCalculateFields" resultType="string">
+        select   ${fields}  from customer_amount_view
+        <where>
+            <if test="con != null">
+                ${con}
+            </if>
+            <if test="companyId != null">
+                and  companyId = #{companyId}
+            </if>
+        </where>
+    </select>
+
 </mapper>

+ 12 - 0
applications/money/money-server/src/main/resources/mapper/PaydetailViewMapper.xml

@@ -32,4 +32,16 @@
     order by pi_vendname asc, pb_date desc,pi_vendcode desc
   </select>
 
+  <select id="selectCalculateFields" resultType="string">
+    select   ${fields}  from paydetail_view
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+  </select>
+
 </mapper>

+ 12 - 0
applications/money/money-server/src/main/resources/mapper/RecdetailViewMapper.xml

@@ -31,4 +31,16 @@
     </where>
     order by pi_custname asc, rb_date desc, pi_custcode desc
   </select>
+
+  <select id="selectCalculateFields" resultType="string">
+    select   ${fields}  from recdetail_view
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+  </select>
 </mapper>

+ 12 - 0
applications/money/money-server/src/main/resources/mapper/VendorAcountViewMapper.xml

@@ -34,4 +34,16 @@
     </where>
     order by pi_vendname asc, pi_date desc, pi_vendcode desc
   </select>
+
+  <select id="selectCalculateFields" resultType="string">
+    select   ${fields}  from vendor_acount_view
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+  </select>
 </mapper>

+ 4 - 8
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java

@@ -171,8 +171,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             //日志记录
             messageLogService.save(baseDTO);
             return baseDTO;
-        }else{
-            //setUpdateInfo(prodInOut);
         }
         //更新操作
         getMapper().updateByPrimaryKeySelective(prodInOut);
@@ -181,7 +179,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             ProdIODetail detail = BeanMapper.map(item, ProdIODetail.class);
             detail.setUpdaterId(userId);
             detail.setUpdateTime(new Date());
-//            detail.setUpdater(userName);
             if (StringUtils.isEmpty(detail.getId()) || "0".equals(detail.getId().toString())) {
                 detail.setCompanyId(companyId);
                 detail.setCreatorId(userId);
@@ -448,9 +445,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setCompanyId(sourcePi.getCompanyId());
         targetPi.setCreateTime(new Date());
         targetPi.setCreatorId(userId);
-//        targetPi.setCreator(userName);
+        targetPi.setCreatorName(userName);
         targetPi.setUpdaterId(userId);
-//        targetPi.setUpdater(userName);
+        targetPi.setUpdaterName(userName);
         targetPi.setUpdateTime(new Date());
 
         //保存数据
@@ -485,9 +482,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  targetPid.setCompanyId(sourcePid.getCompanyId());
                  targetPid.setCreateTime(new Date());
                  targetPid.setCreatorId(userId);
-//                 targetPid.setCreator(userName);
+                 targetPid.setCreatorName(userName);
                  targetPid.setUpdaterId(userId);
-//                 targetPid.setUpdater(userName);
+                 targetPid.setUpdaterName(userName);
                  targetPid.setUpdateTime(new Date());
                  //本次转单数
                  targetPid.setPd_outqty(pdInqty-pdYqty);
@@ -514,7 +511,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             }
             prodInOut.setPi_statuscode(Status.CLOSE.name());
             prodInOut.setPi_status(Status.CLOSE.getDisplay());
-            //setUpdateInfo(prodInOut);
             getMapper().updateByPrimaryKeySelective(prodInOut);
             docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
             //日志

+ 6 - 4
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -442,9 +442,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         prodInOut.setCompanyId(purchase.getCompanyId());
         prodInOut.setCreatorId(userId);
         prodInOut.setCreateTime(new Date());
-//        prodInOut.setCreator(userName);
+        prodInOut.setCreatorName(userName);
         prodInOut.setUpdaterId(userId);
-//        prodInOut.setUpdater(userName);
+        prodInOut.setUpdaterName(userName);
         prodInOut.setUpdateTime(new Date());
         prodInOutMapper.insertSelective(prodInOut);
         //插入验收单从表
@@ -472,10 +472,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 prodIODetail.setCompanyId(purchaseDetail.getCompanyId());
                 prodIODetail.setCreatorId(userId);
                 prodIODetail.setCreateTime(new Date());
-//                prodIODetail.setCreator(userName);
+                prodIODetail.setCreatorName(userName);
                 prodIODetail.setUpdaterId(userId);
                 prodIODetail.setUpdateTime(new Date());
-//                prodIODetail.setUpdater(userName);
+                prodIODetail.setUpdaterName(userName);
                 //本次转单数
                 prodIODetail.setPd_inqty(pdQty-pdYqty);
                 prodIODetailMapper.insertSelective(prodIODetail);
@@ -484,6 +484,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
             }
         }
+        //取默认仓库
+        prodIODetailMapper.getDefaultWarehouseByProduct(pi_id);
         //采购验收单相关计算
         prodInOutService.calcProdInout(pi_id,"采购验收单");
         //日志记录到采购单

+ 2 - 2
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/ProdIODetailDTO.java

@@ -52,13 +52,13 @@ public class ProdIODetailDTO implements Serializable {
 
     private Double pd_nettotal;
 
-    private Integer pd_whid;
+    private Long pd_whid;
 
     private String pd_whcode;
 
     private String pd_whname;
 
-    private Integer pd_inwhid;
+    private Long pd_inwhid;
 
     private String pd_inwhcode;
 

+ 9 - 0
framework/core/src/main/java/com/usoftchina/saas/utils/DateUtils.java

@@ -231,6 +231,15 @@ public class DateUtils {
         return format(new Date(), null);
     }
 
+    /**
+     * 当前时间
+     *
+     * @return <h3>String</h3>
+     */
+    public static String getCurrentDate(String format) {
+        return format(new Date(), format);
+    }
+
     /**
      * 截取指定日期的年月
      *

+ 14 - 0
framework/core/src/main/java/com/usoftchina/saas/utils/StringUtils.java

@@ -1,10 +1,14 @@
 package com.usoftchina.saas.utils;
 
+import java.util.Date;
+
 /**
  * @author yingp
  * @date 2018/10/10
  */
 public abstract class StringUtils extends org.springframework.util.StringUtils{
+
+    private final static String BUSINESSCODE_PREFIX = "SAASTRADE";
     /**
      * 为空取值
      *
@@ -25,4 +29,14 @@ public abstract class StringUtils extends org.springframework.util.StringUtils{
     public static String nullIf(String target) {
         return nullIf(target, "");
     }
+    /**
+    * @Description 随机生成企业执照号
+    * @Param: []
+    * @return: java.lang.String
+    * @Author: guq
+    * @Date: 2018/11/22
+    */
+    public static String createBusinessCode() {
+        return BUSINESSCODE_PREFIX + DateUtils.getCurrentDate("yyyyMMdd") + (int)(Math.random()*1000 + 1000);
+    }
 }

+ 10 - 0
frontend/saas-web/app/view/core/base/ImportWindow.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.core.base.ImportWindow', {
+    extend: 'Ext.window.Window',
+    xtype: 'importwindow',
+
+    initComponent: function() {
+        var me = this;
+        me.callParent(arguments);
+    }
+
+});

+ 16 - 0
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -179,6 +179,22 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                                 grid.selModel.deselectAll();
                                 grid.selModel.select(grid.selectRecordArr);
                                 grid.selModel.noChange = false;
+                                //刷新展示数据
+                                var dataCount = grid.selectRecordArr.length,msg;
+                                var display = b.ownerCt.child('#displayItem');
+                                if (dataCount === 0) {
+                                    msg = b.ownerCt.emptyMsg;
+                                } else {
+                                    msg = Ext.String.format(
+                                        b.ownerCt.displayMsg,
+                                        1,
+                                        dataCount,
+                                        dataCount
+                                    );
+                                }
+                                display.setText(msg);
+                                b.ownerCt.child('#inputItem').setValue(1);
+                                b.ownerCt.child("#afterTextItem").setText('页,共'+dataCount+'页');
                             }else{
                                 grid.selModel.noChange = true;
                                 grid.selModel.deselectAll();

+ 4 - 2
frontend/saas-web/app/view/core/form/MultiCombo.js

@@ -148,8 +148,10 @@ Ext.define('saas.view.core.form.MultiCombo', {
     hideMenu: function(b) {
         if (this.hasVisibleMenu()) {
             var target=b.parentEvent.relatedTarget;
-            if(!((target.className && target.className.indexOf('x-menu')!=-1) || (target.name && target.name.indexOf(this.name)!=-1))){
-                this.menu.hide();
+            if(target){
+                if(!((target.className && target.className.indexOf('x-menu')!=-1) || (target.name && target.name.indexOf(this.name)!=-1))){
+                    this.menu.hide();
+                }
             }
         }
         return this;

+ 51 - 9
frontend/saas-web/app/view/core/query/QueryFormPanel.js

@@ -8,6 +8,10 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
     bodyPadding: '14 10 0 10',
     labelSeparator : ':',
 
+    requires: [
+        'Ext.container.ButtonGroup'
+    ],
+
     cls: 'x-queryform',
 
     defaults:{
@@ -19,16 +23,54 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
 	},
 
     dockedItems: [{
+        width:110,
+        height: 40,
         xtype: 'toolbar',
-        dock: 'bottom',
-        items: ['->', {
-        //     xtype: 'button',
-        //     text: '更多查询',
-        //     handler: 'moreQuery'
-        // }, {
-            xtype: 'button',
-            text: '查询',
-            handler: 'onQuery'
+        dock: 'right',
+        items: [{
+            margin:'8 0 0 0',
+            xtype: 'buttongroup',
+            cls:'x-query-buttongroup',
+            items:[{
+                height:24,
+                width:50,
+                style:'min-width: 0px;min-height: 0px;',
+                xtype: 'button',
+                text: '查询',
+                handler: 'onQuery',
+            },{
+                height:24,
+                style:'min-width: 0px;min-height: 0px;border-color: #fff;background-color: #fff; height: 24px;width: 24px;margin-top: -4px;',
+                xtype: 'button',
+                iconCls:'x-fa fa-caret-square-o-down',
+                handler: 'showMore',
+                name:'showMore',
+                tooltip:'更多',
+                listeners:{
+                    afterrender:function(b){
+                        var columnWidthCount = 0;
+                        var items = b.ownerCt.ownerCt.ownerCt.items.items;
+                        Ext.each(items, function(item, index){
+                            if(item.xtype != 'hidden'){
+                                columnWidthCount+= item.columnWidth
+                            }
+                        });
+                        columnWidthCount = Math.ceil(columnWidthCount);
+                        if(columnWidthCount<=1){
+                            b.hide();
+                        }
+                    }
+                }
+            },{
+                name:'hideMore',
+                hidden:true,
+                height:24,
+                tooltip:'隐藏',
+                style:'min-width: 0px;min-height: 0px;border-color: #fff;background-color: #fff; height: 24px;width: 24px;margin-top: -4px;',
+                xtype: 'button',
+                iconCls:'x-fa fa-caret-square-o-up',
+                handler: 'hideMore'
+            }]
         },'->']
     }],
 

+ 1 - 0
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -16,6 +16,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
         reference: 'queryform',
         xtype: 'core-query-queryformpanel',
         width: '100%',
+        height:56,
         margin: '0 0 12 0',
     }, {
         // margin: '12 0 0 0',

+ 12 - 0
frontend/saas-web/app/view/core/query/QueryPanel.scss

@@ -3,6 +3,7 @@
     .x-panel-bodyWrap {
 
         .x-panel-body {
+            overflow: hidden !important;
             cursor: pointer;
 
             .x-box-inner {
@@ -18,6 +19,7 @@
                                 padding: 6px 0 16px 8px;
 
                                 .x-box-inner {
+                                    height: 36px !important;
                                     background: #FFFFFF;
         
                                 }
@@ -49,4 +51,14 @@
             }
         }
     }
+}
+
+.x-query-buttongroup{
+    border: 1px solid #ffffff !important;
+    .x-btn-group-body-default-framed .x-table-layout{
+        border-spacing: 2px !important;
+    }
+    .x-btn-default-toolbar-small .x-btn-inner-default-toolbar-small{
+        height:24px !important;
+    }
 }

+ 28 - 0
frontend/saas-web/app/view/core/query/QueryPanelController.js

@@ -22,6 +22,34 @@ Ext.define('saas.view.core.query.QueryPanelController', {
         viewModel.set('moreQuery', false);
         queryGrid.store.loadPage(1);
     },
+    showMore:function (){
+        var me = this,
+        queryPanel = me.getView(),
+        queryForm = queryPanel.down('core-query-queryformpanel');
+        var items = queryForm.items.items;
+        var columnWidthCount = 0;
+        Ext.each(items, function(item, index){
+            if(item.xtype != 'hidden'){
+                columnWidthCount+= item.columnWidth
+            }
+        });
+        columnWidthCount = Math.ceil(columnWidthCount);
+        if(columnWidthCount>1){
+            //展开
+            queryForm.animate({dynamic: true, duration: 500, to: {height: (24+42*columnWidthCount)+'px'}})
+            queryForm.dockedItems.items[0].down('[name=showMore]').hide();
+            queryForm.dockedItems.items[0].down('[name=hideMore]').show();
+        }
+    },
+    hideMore:function (){
+        var me = this,
+        queryPanel = me.getView(),
+        queryForm = queryPanel.down('core-query-queryformpanel');
+        //收缩
+        queryForm.animate({dynamic: true, duration: 500, to: {height: '56px'}})
+        queryForm.dockedItems.items[0].down('[name=hideMore]').hide();
+        queryForm.dockedItems.items[0].down('[name=showMore]').show();
+    },
     onMoreQuery: function() {
         var me = this,
         queryPanel = me.getView(),

+ 1 - 1
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -80,7 +80,7 @@ Ext.define('saas.view.money.report.RecDetail', {
         },{
             text:'本期收款金额',
             xtype: 'numbercolumn',
-            dataIndex:'pb_pdamount',
+            dataIndex:'rb_rdamount',
             xtype: 'numbercolumn',
             width: 110,
             renderer : function(v) {

+ 48 - 0
pom.xml

@@ -446,5 +446,53 @@
                 </pluginManagement>
             </build>
         </profile>
+        <profile>
+            <!-- mvn deploy -P docker-prod -->
+            <id>docker-prod</id>
+            <properties>
+                <docker.repository>10.10.100.200:5000</docker.repository>
+            </properties>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <!-- Docker maven plugin -->
+                        <plugin>
+                            <groupId>com.spotify</groupId>
+                            <artifactId>docker-maven-plugin</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
+                                <registryUrl>${docker.repository}</registryUrl>
+                                <pushImage>true</pushImage>
+                                <forceTags>true</forceTags>
+                                <imageName>
+                                    ${docker.repository}/${docker.registry.name}/${project.artifactId}:${project.version}
+                                </imageName>
+                                <imageTags>
+                                    <imageTag>latest</imageTag>
+                                </imageTags>
+                                <resources>
+                                    <resource>
+                                        <targetPath>/</targetPath>
+                                        <directory>${project.build.directory}</directory>
+                                        <include>${project.build.finalName}.jar</include>
+                                    </resource>
+                                </resources>
+                            </configuration>
+                            <executions>
+                                <execution>
+                                    <id>build-image</id>
+                                    <phase>package</phase>
+                                    <goals>
+                                        <goal>build</goal>
+                                    </goals>
+                                </execution>
+                            </executions>
+                        </plugin>
+                        <!-- Docker maven plugin -->
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
     </profiles>
 </project>