Compare commits
2 Commits
d79b170d9f
...
4882f8a447
Author | SHA1 | Date |
---|---|---|
big-y | 4882f8a447 | 8 months ago |
big-y | 62b9bf2f21 | 8 months ago |
13 changed files with 264 additions and 9 deletions
@ -0,0 +1,20 @@
|
||||
package com.logpm.report.mapper; |
||||
|
||||
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.List; |
||||
|
||||
@Mapper |
||||
public interface BillDataMapper { |
||||
|
||||
Integer billCount(@Param("warehouseId") Long warehouseId, @Param("timeType") Integer timeType, @Param("date")List<Object> date); |
||||
BigDecimal billMoney(@Param("warehouseId") Long warehouseId,@Param("timeType") Integer timeType, @Param("date")List<Object> date); |
||||
BigDecimal detailMoney(@Param("warehouseId") Long warehouseId,@Param("detailMoney") Integer timeType, @Param("date")List<Object> date); |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="com.logpm.report.mapper.BillDataMapper"> |
||||
|
||||
|
||||
<select id="billCount" resultType="java.lang.Integer"> |
||||
select count(*) billCount |
||||
from |
||||
logpm_platform.logpm_warehouse_waybill |
||||
where freeze_status = 1 |
||||
<where> |
||||
<if test="warehouseId!=null"> |
||||
and |
||||
where destination_warehouse_id = #{warehouseId} |
||||
</if> |
||||
<if test="timeType !=null "> |
||||
<choose> |
||||
<when test="timeType == 2"> |
||||
<if test="param.startDate != null and date.startDate != '' "> |
||||
and create_time > #{param.startDate} |
||||
</if> |
||||
<if test="param.endDate != null and date.endDate != '' "> |
||||
and create_time < #{param.endDate} |
||||
</if> |
||||
</when> |
||||
</choose> |
||||
|
||||
</if> |
||||
</where> |
||||
|
||||
|
||||
</select> |
||||
<select id="billMoney" resultType="java.math.BigDecimal"></select> |
||||
<select id="detailMoney" resultType="java.math.BigDecimal"></select> |
||||
</mapper> |
@ -0,0 +1,41 @@
|
||||
package com.logpm.report.service; |
||||
|
||||
import com.logpm.report.vo.indexCount.BillingDataVo; |
||||
import com.logpm.report.vo.indexCount.DetailMoneyVo; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.List; |
||||
|
||||
public interface BillingService { |
||||
|
||||
/** |
||||
* 获取开单数 |
||||
* @param TType |
||||
* @return Integer |
||||
*/ |
||||
Integer BillCount(Integer TType); |
||||
|
||||
/** |
||||
* 获取开单收入 |
||||
* @param TType |
||||
* @return BigDecimal |
||||
*/ |
||||
BigDecimal BillMoney(Integer TType); |
||||
|
||||
/** |
||||
* 获取开单收入明细 |
||||
* @param TType |
||||
* @return List |
||||
*/ |
||||
List<DetailMoneyVo> DetailType(Integer TType); |
||||
|
||||
|
||||
/** |
||||
* 获取全部开单数据 |
||||
* @return |
||||
*/ |
||||
BillingDataVo BillData(); |
||||
|
||||
|
||||
|
||||
} |
@ -0,0 +1,61 @@
|
||||
package com.logpm.report.service.impl; |
||||
|
||||
import com.logpm.basicdata.entity.BasicdataWarehouseEntity; |
||||
import com.logpm.basicdata.feign.IBasicdataWarehouseClient; |
||||
import com.logpm.report.service.BillingService; |
||||
import com.logpm.report.vo.indexCount.BillingDataVo; |
||||
import com.logpm.report.vo.indexCount.DetailMoneyVo; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@Service |
||||
@AllArgsConstructor |
||||
public class BillingServiceImpl implements BillingService { |
||||
|
||||
private IBasicdataWarehouseClient warehouseClient; |
||||
|
||||
|
||||
|
||||
|
||||
@Override |
||||
public Integer BillCount(Integer TType) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public BigDecimal BillMoney(Integer TType) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public List<DetailMoneyVo> DetailType(Integer TType) { |
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public BillingDataVo BillData() { |
||||
return null; |
||||
} |
||||
|
||||
/** |
||||
* 获取用户仓库id |
||||
* @return |
||||
*/ |
||||
private List<Long> getWarehouse(){ |
||||
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
||||
List<Long> ls = new ArrayList<>(); |
||||
if (myCurrentWarehouse !=null){ |
||||
ls.add(myCurrentWarehouse.getId()); |
||||
}else { |
||||
List<BasicdataWarehouseEntity> myWarehouseList = warehouseClient.getMyWarehouseList(); |
||||
for (BasicdataWarehouseEntity warehouse : myWarehouseList) { |
||||
ls.add( warehouse.getId()); |
||||
} |
||||
} |
||||
return ls; |
||||
} |
||||
} |
@ -0,0 +1,42 @@
|
||||
package com.logpm.report.typepage; |
||||
|
||||
/** |
||||
* 首页数据时间分类 |
||||
*/ |
||||
public enum TimeType { |
||||
|
||||
all("总的","1"), |
||||
moon("当月","2"), |
||||
day("当日","3"); |
||||
/** |
||||
* 状态 |
||||
*/ |
||||
private String name; |
||||
|
||||
/** |
||||
* 值 |
||||
*/ |
||||
private String value; |
||||
|
||||
TimeType(String name, String value) { |
||||
this.name = name; |
||||
this.value = value; |
||||
} |
||||
|
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
|
||||
public String getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public void setValue(String value) { |
||||
this.value = value; |
||||
} |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.logpm.report.vo.indexCount; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.List; |
||||
|
||||
public class BillingDataVo { |
||||
|
||||
@ApiModelProperty("开单总数") |
||||
private Integer allCount; |
||||
|
||||
@ApiModelProperty("当月开单") |
||||
private Integer moonCount; |
||||
|
||||
@ApiModelProperty("当日开单") |
||||
private Integer dayCount; |
||||
|
||||
@ApiModelProperty("开单总收入") |
||||
private BigDecimal allMoney; |
||||
@ApiModelProperty("开单月收入") |
||||
private BigDecimal moonMoney; |
||||
|
||||
@ApiModelProperty("开单日收入") |
||||
private BigDecimal dayMoney; |
||||
|
||||
@ApiModelProperty("明细收入:当月/当日") |
||||
private List<DetailMoneyVo> detailList; |
||||
|
||||
|
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.logpm.report.vo.indexCount; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
|
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
public class DetailMoneyVo { |
||||
@ApiModelProperty("干线") |
||||
private BigDecimal gan; |
||||
@ApiModelProperty("仓储") |
||||
private BigDecimal ware; |
||||
@ApiModelProperty("配送") |
||||
private BigDecimal sent; |
||||
@ApiModelProperty("提货") |
||||
private BigDecimal delivery; |
||||
@ApiModelProperty("安装") |
||||
private BigDecimal installation; |
||||
|
||||
} |
Loading…
Reference in new issue