|
@@ -3,6 +3,7 @@ package com.minpay.shouhuo;
|
|
|
import com.minpay.common.bean.User;
|
|
|
import com.minpay.common.format.IFormatService;
|
|
|
import com.minpay.common.service.ILogService;
|
|
|
+import com.minpay.common.util.CommonUtil;
|
|
|
import com.minpay.common.util.DateUtil;
|
|
|
import com.minpay.db.table.mapper.VmOrderInfMapper;
|
|
|
import com.minpay.db.table.model.VmOrderInf;
|
|
@@ -21,6 +22,7 @@ import com.startup.minpay.frame.target.MINParam;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -79,12 +81,24 @@ public class invCardManageAction implements IMINAction {
|
|
|
Date weekFristDate = cal.getTime();
|
|
|
String weekDate = DateUtil.format(weekFristDate,"yyyyMMdd");
|
|
|
//按时间查询
|
|
|
+ String time = null;
|
|
|
if("0".equals(dateFlag)) {
|
|
|
m.put("nowDate", nowDate);
|
|
|
+ Date parse = new SimpleDateFormat("yyyyMMdd").parse(nowDate);
|
|
|
+ String dateString = new SimpleDateFormat("yyyy-MM-dd").format(parse);
|
|
|
+ time = dateString;
|
|
|
}else if("1".equals(dateFlag)) {
|
|
|
m.put("yesDate", yesDate);
|
|
|
+ Date parse = new SimpleDateFormat("yyyyMMdd").parse(yesDate);
|
|
|
+ String dateString = new SimpleDateFormat("yyyy-MM-dd").format(parse);
|
|
|
+ time = dateString;
|
|
|
}else if("2".equals(dateFlag)) {
|
|
|
m.put("weekDate", weekDate);
|
|
|
+ Date parse = new SimpleDateFormat("yyyyMMdd").parse(weekDate);
|
|
|
+ String dateString = new SimpleDateFormat("yyyy-MM-dd").format(parse);
|
|
|
+ Date parseb = new SimpleDateFormat("yyyyMMdd").parse(nowDate);
|
|
|
+ String dateStringb = new SimpleDateFormat("yyyy-MM-dd").format(parseb);
|
|
|
+ time = dateString.concat(" 至 ").concat(dateStringb);
|
|
|
}
|
|
|
//查询累计收入
|
|
|
String countIncome = Service.lookup(IMINDataBaseService.class)
|
|
@@ -92,12 +106,12 @@ public class invCardManageAction implements IMINAction {
|
|
|
//查询预估利润
|
|
|
String predictIncome = Service.lookup(IMINDataBaseService.class)
|
|
|
.getMybatisMapper(OrderManageMapper.class).selectPredictIncome(m);
|
|
|
- BigDecimal ljsr=new BigDecimal(countIncome);
|
|
|
- BigDecimal ljzf=new BigDecimal(predictIncome);
|
|
|
- predictIncome = (ljsr.subtract(ljzf)).toString();
|
|
|
+
|
|
|
+ predictIncome = CommonUtil.subtract(countIncome,predictIncome);
|
|
|
//返回数据
|
|
|
- res.set("countIncome", ljsr);
|
|
|
+ res.set("countIncome", countIncome);
|
|
|
res.set("predictIncome", predictIncome);
|
|
|
+ res.set("time", time);
|
|
|
return res;
|
|
|
}
|
|
|
|