Compare commits

...

2 Commits

  1. 4
      blade-service/logpm-report/pom.xml
  2. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/IndexCountController.java
  3. 20
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/BillDataMapper.java
  4. 35
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/BillDataMapper.xml
  5. 1
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/IndexCountMapper.xml
  6. 41
      blade-service/logpm-report/src/main/java/com/logpm/report/service/BillingService.java
  7. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/InLibraryDeliverService.java
  8. 61
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/BillingServiceImpl.java
  9. 4
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/InLibraryDeliverServiceImpl.java
  10. 9
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/IndexCountServiceImpl.java
  11. 42
      blade-service/logpm-report/src/main/java/com/logpm/report/typepage/TimeType.java
  12. 31
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/BillingDataVo.java
  13. 20
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/DetailMoneyVo.java

4
blade-service/logpm-report/pom.xml

@ -30,9 +30,11 @@
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-report-api</artifactId>
<artifactId>logpm-basicdata-api</artifactId>
<version>3.2.0.RELEASE</version>
</dependency>
</dependencies>
<build>

2
blade-service/logpm-report/src/main/java/com/logpm/report/controller/IndexCountController.java

@ -40,7 +40,7 @@ public class IndexCountController {
return R.data(theNumberOfShelvesInTheLibrary);
}
@GetMapping("/index_number_No_the_library")
@GetMapping("/index_number_in_the_library")
@ApiOperation(value = "定制品在库订单未上架总数",tags = "定制品在库订单未上架总数")
public R<Integer> getTheNumberOfShelvesNoTheLibrary(@RequestParam("id") Long id){
Integer theNumberOfShelvesInTheLibrary= inLibraryDeliverService.theNumberOfShelvesInTheLibrary(id,1);

20
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/BillDataMapper.java

@ -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);
}

35
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/BillDataMapper.xml

@ -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 &gt; #{param.startDate}
</if>
<if test="param.endDate != null and date.endDate != '' ">
and create_time &lt; #{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>

1
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/IndexCountMapper.xml

@ -49,5 +49,6 @@
and a.order_package_status <![CDATA[ <= ]]> #{orderPackageStatus}
GROUP BY b.type_service
</select>
<select id="numberOfAbnormalWorkOrdersInTheMonth" resultType="java.lang.Integer"></select>
</mapper>

41
blade-service/logpm-report/src/main/java/com/logpm/report/service/BillingService.java

@ -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();
}

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/InLibraryDeliverService.java

@ -1,8 +1,6 @@
package com.logpm.report.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.models.auth.In;
/**
* @author wzy
@ -10,7 +8,6 @@ import io.swagger.models.auth.In;
*/
public interface InLibraryDeliverService {
IPage<InLibraryDeliverService> DistributionParcelListPage( ) ;
Integer indexCount(Long id);

61
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/BillingServiceImpl.java

@ -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;
}
}

4
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/InLibraryDeliverServiceImpl.java

@ -13,10 +13,6 @@ public class InLibraryDeliverServiceImpl implements InLibraryDeliverService {
private InLibraryDeliverMapper inLibraryDeliverMapper;
@Override
public IPage<InLibraryDeliverService> DistributionParcelListPage() {
return null;
}
/***
* 总在库数

9
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/IndexCountServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.report.service.impl;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.report.mapper.IndexCountMapper;
import com.logpm.report.service.IndexCountService;
import com.logpm.report.vo.IndexCountVO;
@ -10,6 +11,7 @@ import lombok.AllArgsConstructor;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
@ -18,6 +20,7 @@ import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
import static org.springblade.common.constant.stockup.StockupTypeConstant.*;
/**
@ -31,6 +34,10 @@ public class IndexCountServiceImpl implements IndexCountService {
private InLibraryDeliverServiceImpl inLibraryDeliverService;
@Autowired
private IBasicdataWarehouseClient warehouseClient;
/**
* 首页统计数据
*/
@ -43,6 +50,8 @@ public class IndexCountServiceImpl implements IndexCountService {
indexCountVo.setInboundAndOutboundQuantity(inboundAndOutboundQuantityTheMonth(warehouseId));
indexCountVo.setInStoreData(inStoreData(warehouseId));
return indexCountVo;
}

42
blade-service/logpm-report/src/main/java/com/logpm/report/typepage/TimeType.java

@ -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;
}
}

31
blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/BillingDataVo.java

@ -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;
}

20
blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/DetailMoneyVo.java

@ -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…
Cancel
Save