Browse Source

报表数据调整

master
lzh 2 years ago
parent
commit
9aea565868
  1. 3
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmdMapper.java
  2. 2
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageMapper.java
  3. 4
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYcMapper.java
  4. 5
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesReportdayService.java
  5. 2
      yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/ReportCenterRest.java

3
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageJmdMapper.java

@ -51,8 +51,7 @@ import java.util.Map;
public interface GdInstorageJmdMapper extends BaseMapper<GdInstorageJmd> {
@Delete("delete from gd_instorage_jmd where orderDate=#{orderDate} ")
void clearByOrderDate(@Param("orderDate") String orderDate);
@Select("SELECT IFNULL(sum(colq16),0) as amount FROM gd_instorage_jmd where orderDate=#{orderDate} ")
@Select("SELECT CONVERT(IFNULL(sum(colq16),0),DECIMAL(12,2)) as amount FROM gd_instorage_jmd where orderDate=#{orderDate} ")
double amountOfDay(@Param("orderDate") String orderDate);
@Select("select colb1 storeCode,colc2 name,sum(colq16) amount from gd_instorage_jmd gij where orderDate=#{orderDate} GROUP BY colb1,colc2 ")

2
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageMapper.java

@ -50,6 +50,6 @@ public interface GdInstorageMapper extends BaseMapper<GdInstorage> {
@Delete("delete from gd_instorage where orderDate=#{orderDate} ")
void clearByOrderDate(@Param("orderDate") String orderDate);
@Select("select sum(colq16) as amount from gd_instorage where orderDate=#{orderDate}")
@Select("select CONVERT(IFNULL(sum(colq16),0),DECIMAL(12,2)) as amount from gd_instorage where orderDate=#{orderDate}")
double amountOfDay(@Param("orderDate") String orderDate);
}

4
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdinstorage/GdInstorageYcMapper.java

@ -52,12 +52,12 @@ public interface GdInstorageYcMapper extends BaseMapper<GdInstorageYc> {
@Delete("delete from gd_instorage_yc where orderDate=#{orderDate} ")
void clearByOrderDate(@Param("orderDate") String orderDate);
@Select("select IFNULL(sum(t.colq16),0) as amount from ( " +
@Select("select CONVERT(IFNULL(sum(t.colq16),0),DECIMAL(12,2)) as amount from ( " +
" select gig.* from gd_instorage_yc gig left join store_index si on gig.colb1=si.code " +
" where gig.orderDate=#{orderDate} and (si.`type` ='连锁外加盟(销配结算)' OR si.`type` ='连锁外加盟(销配结算)' ) ) t ")
double amountOfDayJmd(@Param("orderDate") String orderDate);
@Select("select colb1 storeCode,colc2 name,IFNULL(sum(colq16),0) amount from gd_instorage_yc giy where orderDate=#{orderDate} " +
@Select("select colb1 storeCode,colc2 name,CONVERT(IFNULL(sum(colq16),0),DECIMAL(12,2)) amount from gd_instorage_yc giy where orderDate=#{orderDate} " +
"and colb1 in (select code from store_index si where si.`type` ='连锁外加盟(销配结算)' OR si.`type` ='连锁外加盟(销配结算)' ) " +
"group by colb1,colc2 order by colb1 ")
List<Map<String, Object>> listOfJmdStoreDay(@Param("orderDate") String orderDate);

5
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/GdSalesReportdayService.java

@ -197,6 +197,9 @@ public class GdSalesReportdayService extends ServiceImpl<GdSalesReportdayMapper,
* @return
*/
public ResultBean<Map<String, Object>> getSalesReport(String customerSid, String orderDate, String type) {
if (StrUtil.isBlank(orderDate)) {
orderDate = DateUtil.format(DateUtil.offsetDay(new Date(), -1), "yyyy-MM-dd");
}
ResultBean rb = ResultBean.fireFail();
Map<String, Object> map = new HashMap<>();
double xsLwlsd = gdSalesService.amountOfLwlsdDay(orderDate); // 连网连锁店
@ -257,7 +260,7 @@ public class GdSalesReportdayService extends ServiceImpl<GdSalesReportdayMapper,
String dateago = dayAgo(orderDate, -(i - 1));
System.out.println("xx " + dateago);
double rkje = gdInstorageService.amountOfDay(dateago); //入库金额
double xsje = xsLwlsd + xsLsnjm;
double xsje = gdSalesService.amountOfDay(dateago);
financialAnalysisChartData.add(CollUtil.newArrayList(dateago, "" + rkje, "" + xsje));
}
map.put("financialAnalysisChartData", financialAnalysisChartData);

2
yxt_supervise/supervise-portal/supervise-portal-biz/src/main/java/com/yxt/supervise/portal/biz/gdsales/ReportCenterRest.java

@ -59,7 +59,7 @@ public class ReportCenterRest {
public ResultBean<Map<String, Object>> getSalesReport(@Param("customerSid") String customerSid,
@Param("date") String date,
@Param("type") String type) {
System.out.println("@@@@@: " + date);
// System.out.println("@@@@@: " + date);
return gdSalesReportdayService.getSalesReport(customerSid, date, type);
}
}

Loading…
Cancel
Save