19 changed files with 551 additions and 8 deletions
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.supervise.report.api.reportinventorydaygather; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.report.api.reportinventorydaystore.ReportInventoryDayStoreVo; |
||||
|
import com.yxt.supervise.report.api.reportinventorydaytobaccostore.ReportInventoryDayTobaccoStoreVo; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/6/27 14:05 |
||||
|
*/ |
||||
|
@Api(tags = "信息") |
||||
|
@FeignClient( |
||||
|
contextId = "supervise-report-reportinventorydaygather", |
||||
|
name = "supervise-report", |
||||
|
path = "reportinventory", |
||||
|
fallback = ReportInventoryDayGatherFeignFallback.class) |
||||
|
public interface ReportInventoryDayGatherFeign { |
||||
|
//
|
||||
|
@GetMapping("/getReportInventoryDayGathers") |
||||
|
@ResponseBody |
||||
|
public ResultBean<ReportInventoryDayGatherVo> getReportInventoryDayGathers(String orderDate); |
||||
|
@GetMapping("/getReportInventoryDayStores") |
||||
|
@ResponseBody |
||||
|
public ResultBean<ReportInventoryDayStoreVo> getReportInventoryDayStores(String orderDate); |
||||
|
@GetMapping("/getReportInventoryDayToStores") |
||||
|
@ResponseBody |
||||
|
public ResultBean<ReportInventoryDayTobaccoStoreVo> getReportInventoryDayToStores(String orderDate); |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.supervise.report.api.reportinventorydaygather; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.report.api.reportinventorydaystore.ReportInventoryDayStoreVo; |
||||
|
import com.yxt.supervise.report.api.reportinventorydaytobaccostore.ReportInventoryDayTobaccoStoreVo; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/6/27 14:06 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class ReportInventoryDayGatherFeignFallback implements ReportInventoryDayGatherFeign{ |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<ReportInventoryDayGatherVo> getReportInventoryDayGathers(String orderDate) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<ReportInventoryDayStoreVo> getReportInventoryDayStores(String orderDate) { |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ResultBean<ReportInventoryDayTobaccoStoreVo> getReportInventoryDayToStores(String orderDate) { |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.yxt.supervise.report.api.reportinventorydaytobaccostore; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.EntityWithId; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/6/27 8:48 |
||||
|
*/ |
||||
|
@ApiModel(value = "仓库库存报表-汇总", description = "仓库库存报表-汇总") |
||||
|
@TableName("report_inventory_day_tobacco_store") |
||||
|
@Data |
||||
|
public class ReportInventoryDayTobaccoStore extends EntityWithId { //记录创建时间
|
||||
|
private String createTime; |
||||
|
//备注说明
|
||||
|
private String remarks; |
||||
|
//单据日期
|
||||
|
private String orderDate; |
||||
|
//编号
|
||||
|
private String serialNumber; |
||||
|
//上报时间
|
||||
|
private String reportTime; |
||||
|
//仓库类型
|
||||
|
private String warehouseType; |
||||
|
//门店编号
|
||||
|
private String storeCode; |
||||
|
//[门店编号]门店名称
|
||||
|
private String storeCodeName; |
||||
|
//品种数量
|
||||
|
private String productCountNumber; |
||||
|
//货值
|
||||
|
private String productAmount; |
||||
|
//合计货值
|
||||
|
private String countAmount; |
||||
|
//合计品种数量
|
||||
|
private String countProductNumber; |
||||
|
|
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.supervise.report.api.reportinventorydaytobaccostore; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/6/27 8:48 |
||||
|
*/ |
||||
|
public class ReportInventoryDayTobaccoStoreDto implements Dto { |
||||
|
//记录创建时间
|
||||
|
private String createTime; |
||||
|
//备注说明
|
||||
|
private String remarks; |
||||
|
//单据日期
|
||||
|
private String orderDate; |
||||
|
//编号
|
||||
|
private String serialNumber; |
||||
|
//上报时间
|
||||
|
private String reportTime; |
||||
|
//仓库类型
|
||||
|
private String warehouseType; |
||||
|
//门店编号
|
||||
|
private String storeCode; |
||||
|
//[门店编号]门店名称
|
||||
|
private String storeCodeName; |
||||
|
//品种数量
|
||||
|
private String productCountNumber; |
||||
|
//货值
|
||||
|
private String productAmount; |
||||
|
//合计货值
|
||||
|
private String countAmount; |
||||
|
//合计品种数量
|
||||
|
private String countProductNumber; |
||||
|
|
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.supervise.report.api.reportinventorydaytobaccostore; |
||||
|
|
||||
|
import com.yxt.common.core.query.Query; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/6/27 8:49 |
||||
|
*/ |
||||
|
public class ReportInventoryDayTobaccoStoreQuery implements Query { |
||||
|
//记录创建时间
|
||||
|
private String createTime; |
||||
|
//备注说明
|
||||
|
private String remarks; |
||||
|
//单据日期
|
||||
|
private String orderDate; |
||||
|
//编号
|
||||
|
private String serialNumber; |
||||
|
//上报时间
|
||||
|
private String reportTime; |
||||
|
//仓库类型
|
||||
|
private String warehouseType; |
||||
|
//门店编号
|
||||
|
private String storeCode; |
||||
|
//[门店编号]门店名称
|
||||
|
private String storeCodeName; |
||||
|
//品种数量
|
||||
|
private String productCountNumber; |
||||
|
//货值
|
||||
|
private String productAmount; |
||||
|
//合计货值
|
||||
|
private String countAmount; |
||||
|
//合计品种数量
|
||||
|
private String countProductNumber; |
||||
|
|
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.yxt.supervise.report.api.reportinventorydaytobaccostore; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/6/27 8:49 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ReportInventoryDayTobaccoStoreVo implements Vo { |
||||
|
private String id; |
||||
|
//记录创建时间
|
||||
|
private String createTime; |
||||
|
//备注说明
|
||||
|
private String remarks; |
||||
|
//单据日期
|
||||
|
private String orderDate; |
||||
|
//编号
|
||||
|
private String serialNumber; |
||||
|
//上报时间
|
||||
|
private String reportTime; |
||||
|
//仓库类型
|
||||
|
private String warehouseType; |
||||
|
//门店编号
|
||||
|
private String storeCode; |
||||
|
//[门店编号]门店名称
|
||||
|
private String storeCodeName; |
||||
|
//品种数量
|
||||
|
private Integer productCountNumber; |
||||
|
//货值
|
||||
|
private BigDecimal productAmount; |
||||
|
//合计货值
|
||||
|
private BigDecimal countAmount; |
||||
|
//合计品种数量
|
||||
|
private BigDecimal countProductNumber; |
||||
|
private List<ReportInventoryDayTobaccoStoreVo> list; |
||||
|
} |
@ -0,0 +1,64 @@ |
|||||
|
package com.yxt.supervise.report.biz.reportinventory; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.report.api.reportinventorydaygather.ReportInventoryDayGatherVo; |
||||
|
import com.yxt.supervise.report.api.reportinventorydaystore.ReportInventoryDayStoreVo; |
||||
|
import com.yxt.supervise.report.api.reportinventorydaytobaccostore.ReportInventoryDayTobaccoStoreVo; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author wangpengfei |
||||
|
* @date 2023/6/27 17:43 |
||||
|
*/ |
||||
|
@RestController("com.yxt.supervise.report.biz.reportinventory.reportInventoryWxRest") |
||||
|
@RequestMapping("reportwxmpapi/reportinventory") |
||||
|
public class ReportInventoryWxRest { |
||||
|
@Autowired |
||||
|
private ReportInventoryDayGatherService reportInventoryDayGatherService; |
||||
|
@Autowired |
||||
|
private ReportInventoryDayStoreService reportInventoryDayStoreService; |
||||
|
@Autowired |
||||
|
private ReportInventoryDayTobaccoStoreService reportInventoryDayTobaccoStoreService; |
||||
|
|
||||
|
//
|
||||
|
@GetMapping("/getReportInventoryDayGather/{orderDate}") |
||||
|
public ResultBean<ReportInventoryDayGatherVo> getReportInventoryDayGather(@PathVariable("orderDate") String orderDate){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ReportInventoryDayGatherVo gather = reportInventoryDayGatherService.getReportInventoryDayGather(orderDate); |
||||
|
ReportInventoryDayStoreVo store = reportInventoryDayStoreService.getReportInventoryDayStore(orderDate); |
||||
|
ReportInventoryDayTobaccoStoreVo tobaccoStore = reportInventoryDayTobaccoStoreService.getReportInventoryDayToStore(orderDate); |
||||
|
List<Object> list =new ArrayList<>(); |
||||
|
list.add(gather); |
||||
|
list.add(store); |
||||
|
list.add(tobaccoStore); |
||||
|
// if(null==pv){
|
||||
|
// return rb.success().setData(new ArrayList<>());
|
||||
|
// }
|
||||
|
return rb.success().setData(list); |
||||
|
} |
||||
|
@GetMapping("/getReportInventoryDayStore/{orderDate}") |
||||
|
public ResultBean<ReportInventoryDayStoreVo> getReportInventoryDayStore(@PathVariable("orderDate") String orderDate){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ReportInventoryDayStoreVo pv = reportInventoryDayStoreService.getReportInventoryDayStore(orderDate); |
||||
|
if(null==pv){ |
||||
|
return rb.success().setData(new ArrayList<>()); |
||||
|
} |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
@GetMapping("/getReportInventoryDayToStore/{orderDate}") |
||||
|
public ResultBean<ReportInventoryDayTobaccoStoreVo> getReportInventoryDayToStore(@PathVariable("orderDate") String orderDate){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ReportInventoryDayTobaccoStoreVo pv = reportInventoryDayTobaccoStoreService.getReportInventoryDayToStore(orderDate); |
||||
|
if(null==pv){ |
||||
|
return rb.success().setData(new ArrayList<>()); |
||||
|
} |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue