|
|
@@ -91,6 +91,7 @@ public class MoneyReportServiceImpl implements MoneyReportService {
|
|
|
List list = null;
|
|
|
Long companyId = BaseContextHolder.getCompanyId();
|
|
|
String con = req.getFinalCondition();
|
|
|
+ String cons = this.getDate(con);
|
|
|
String calculateFieldsSql = req.getCalculateFieldsSql();
|
|
|
JSONArray arr = null;
|
|
|
if (null == con) {
|
|
|
@@ -103,14 +104,12 @@ public class MoneyReportServiceImpl implements MoneyReportService {
|
|
|
list = vendorAcountViewMapper.selectByCondition(con, companyId);
|
|
|
if (list.size() >0) {
|
|
|
VendorAcountView vendorAcountView = (VendorAcountView) list.get(0);
|
|
|
+ //取时间
|
|
|
+
|
|
|
Integer vid = new Integer(0);
|
|
|
vid = vendorAcountViewMapper.getId(vendorAcountView.getPi_vendcode(), Long.valueOf(vendorAcountView.getCompanyId()));
|
|
|
- Integer ym = Integer.valueOf(req.getYm());
|
|
|
- VendOrCustAdd vendOrCustAdd = vendorAcountViewMapper.selectVendAdd(vid, ym, Long.valueOf(vendorAcountView.getCompanyId()));
|
|
|
+ VendOrCustAdd vendOrCustAdd = vendorAcountViewMapper.selectVendAdd(vid, cons, Long.valueOf(vendorAcountView.getCompanyId()));
|
|
|
if (vendOrCustAdd != null) {
|
|
|
- vendOrCustAdd.setNowbalance((vendOrCustAdd.getBeginamount() == null ? new Double(0) : vendOrCustAdd.getBeginamount())
|
|
|
- + (vendOrCustAdd.getNowamount() == null ? new Double(0) : vendOrCustAdd.getNowamount())
|
|
|
- - (vendOrCustAdd.getNowpay() == null ? new Double(0) : vendOrCustAdd.getNowpay()));
|
|
|
//封装成list
|
|
|
Map<String, Double> map1 = new HashMap<>();
|
|
|
map1.put("beginamount", vendOrCustAdd.getBeginamount());
|
|
|
@@ -154,12 +153,8 @@ public class MoneyReportServiceImpl implements MoneyReportService {
|
|
|
Integer vid = new Integer(0);
|
|
|
|
|
|
vid = customerCheckViewMapper.getId(customerCheckView.getPi_custcode(), Long.valueOf(customerCheckView.getCompanyId()));
|
|
|
- Integer ym = Integer.valueOf(req.getYm());
|
|
|
- VendOrCustAdd vendOrCustAdd = customerCheckViewMapper.selectCustAdd(vid, ym, Long.valueOf(customerCheckView.getCompanyId()));
|
|
|
+ VendOrCustAdd vendOrCustAdd = customerCheckViewMapper.selectCustAdd(vid, cons, Long.valueOf(customerCheckView.getCompanyId()));
|
|
|
if (vendOrCustAdd != null) {
|
|
|
- vendOrCustAdd.setNowbalance((vendOrCustAdd.getBeginamount() == null ? new Double(0) : vendOrCustAdd.getBeginamount())
|
|
|
- + (vendOrCustAdd.getNowamount() == null ? new Double(0) : vendOrCustAdd.getNowamount())
|
|
|
- - (vendOrCustAdd.getNowpay() == null ? new Double(0) : vendOrCustAdd.getNowpay()));
|
|
|
//封装成list
|
|
|
Map<String, Double> map1 = new HashMap<>();
|
|
|
map1.put("beginamount", vendOrCustAdd.getBeginamount());
|
|
|
@@ -200,4 +195,10 @@ public class MoneyReportServiceImpl implements MoneyReportService {
|
|
|
}
|
|
|
return map;
|
|
|
}
|
|
|
+
|
|
|
+ public String getDate(String cons){
|
|
|
+ String date = cons.substring(8, 64);
|
|
|
+ System.out.println("date:" + date);
|
|
|
+ return date;
|
|
|
+ }
|
|
|
}
|