|
|
@@ -10,7 +10,6 @@ import com.goafanti.common.dao.AdminMapper;
|
|
|
import com.goafanti.common.dao.FinanceCountMapper;
|
|
|
import com.goafanti.common.dao.PublicReleaseMapper;
|
|
|
import com.goafanti.common.model.AdminUserCount;
|
|
|
-import com.goafanti.common.model.FinanceCount;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -202,7 +201,7 @@ public class AdminStatisticsServiceImpl implements AdminStatisticsService {
|
|
|
public Object financeInfo(String startTime, String endTime) {
|
|
|
String aid = TokenManager.getAdminId();
|
|
|
OutFinanceCount financeCount=adminMapper.financeInfo(aid, startTime, endTime);
|
|
|
- Integer rangePublicCount = publicReleaseMapper.selectByaidAndDate(aid, startTime, endTime);
|
|
|
+ Integer rangePublicCount = publicReleaseMapper.selectCountByaidAndDate(aid, startTime, endTime);
|
|
|
financeCount.setRangePublicCount(rangePublicCount);
|
|
|
BigDecimal rangeReceivables=adminMapper.selectFinanceReceivablesCount(aid,startTime,endTime);
|
|
|
if (rangeReceivables==null)rangeReceivables=new BigDecimal(0);
|
|
|
@@ -221,9 +220,44 @@ public class AdminStatisticsServiceImpl implements AdminStatisticsService {
|
|
|
Map<String,Object> map=new LinkedHashMap<>();
|
|
|
Days days = new Days();
|
|
|
List<String> thisMonth = getThisMonth(days);
|
|
|
- List<FinanceCount> financeCounts = financeCountMapper.financeLists(aid, days.firstDay, days.endDay+"23:59:59");
|
|
|
- publicReleaseMapper.selectByaidAndDate(aid, days.firstDay, days.endDay+"23:59:59");
|
|
|
+ List<Integer> orderList=new ArrayList<>();
|
|
|
+ List<Integer> expenseList=new ArrayList<>();
|
|
|
+ List<Integer> invoiceList=new ArrayList<>();
|
|
|
+ List<Integer> memberList=new ArrayList<>();
|
|
|
+ List<Integer> paymentList=new ArrayList<>();
|
|
|
+ List<Integer> publicList=new ArrayList<>();
|
|
|
+ List<OutFinanceCount> financeCounts = financeCountMapper.financeLists(aid, days.firstDay, days.endDay+"23:59:59");
|
|
|
+ List<OutFinanceCount> pList = publicReleaseMapper.selectByaidAndDate(aid, days.firstDay, days.endDay + "23:59:59");
|
|
|
+ int orderCount=0,expenseCount=0, invoiceCount=0,memberCount=0,paymentCount=0,publicCount=0;
|
|
|
+ for (String e : thisMonth) {
|
|
|
+ for (OutFinanceCount f : financeCounts) {
|
|
|
+ if (e.equals(f.getDates())){
|
|
|
+ orderCount+=f.getOrderCount();
|
|
|
+ expenseCount+=f.getExpenseCount();
|
|
|
+ invoiceCount+=f.getInvoiceCount();
|
|
|
+ memberCount+=f.getMemberCount();
|
|
|
+ paymentCount+=f.getPaymentCount();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (OutFinanceCount p : pList) {
|
|
|
+ if (e.equals(p.getDates())){
|
|
|
+ publicCount+=p.getPublicCount();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ orderList.add(orderCount);
|
|
|
+ expenseList.add(expenseCount);
|
|
|
+ invoiceList.add(invoiceCount);
|
|
|
+ memberList.add(memberCount);
|
|
|
+ paymentList.add(paymentCount);
|
|
|
+ publicList.add(publicCount);
|
|
|
+ }
|
|
|
map.put("dates",thisMonth);
|
|
|
+ map.put("orderList",orderList);
|
|
|
+ map.put("expenseList",expenseList);
|
|
|
+ map.put("invoiceList",invoiceList);
|
|
|
+ map.put("memberList",memberList);
|
|
|
+ map.put("paymentList",paymentList);
|
|
|
+ map.put("publicList",publicList);
|
|
|
return map;
|
|
|
}
|
|
|
|