|
@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
@RestController("com.yxt.supervise.report.biz.reportinventory.reportInventoryRest") |
|
|
@RestController("com.yxt.supervise.report.biz.reportinventory.reportInventoryRest") |
|
|
@RequestMapping("/reportinventory") |
|
|
@RequestMapping("/reportinventory") |
|
@ -29,41 +30,44 @@ public class ReportInventoryRest implements ReportInventoryDayGatherFeign { |
|
|
@GetMapping("/kcReport") |
|
|
@GetMapping("/kcReport") |
|
|
public ResultBean kcReport(@RequestParam("orderDate") String orderDate) { |
|
|
public ResultBean kcReport(@RequestParam("orderDate") String orderDate) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
if(StringUtils.isBlank(orderDate)){ |
|
|
if (StringUtils.isBlank(orderDate)) { |
|
|
return rb.setMsg("数据日期不可为空"); |
|
|
return rb.setMsg("数据日期不可为空"); |
|
|
} |
|
|
} |
|
|
if(10!=orderDate.length()) |
|
|
if (10 != orderDate.length()) |
|
|
return rb.setMsg("数据日期格式不正确"); |
|
|
return rb.setMsg("数据日期格式不正确"); |
|
|
|
|
|
|
|
|
reportInventoryService.buildInventoryReportByDay(orderDate); |
|
|
reportInventoryService.buildInventoryReportByDay(orderDate); |
|
|
return rb.success(); |
|
|
return rb.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//
|
|
|
//
|
|
|
@GetMapping("/getReportInventoryDayGather/{orderDate}") |
|
|
@GetMapping("/getReportInventoryDayGather/{orderDate}") |
|
|
public ResultBean<ReportInventoryDayGatherVo> getReportInventoryDayGather(@PathVariable("orderDate") String orderDate){ |
|
|
public ResultBean<ReportInventoryDayGatherVo> getReportInventoryDayGather(@PathVariable("orderDate") String orderDate) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ReportInventoryDayGatherVo pv = reportInventoryDayGatherService.getReportInventoryDayGather(orderDate); |
|
|
ReportInventoryDayGatherVo pv = reportInventoryDayGatherService.getReportInventoryDayGather(orderDate); |
|
|
if(null==pv){ |
|
|
if (null == pv) { |
|
|
return rb.success().setData(new ArrayList<>()); |
|
|
return rb.success().setData(new ArrayList<>()); |
|
|
} |
|
|
} |
|
|
pv.setDownloadUrl("https://supervise.yxtsoft.com/downfile/kchzb/库存汇总表"+orderDate+".xlsx"); |
|
|
pv.setDownloadUrl("https://supervise.yxtsoft.com/downfile/kchzb/库存汇总表" + orderDate + ".xlsx"); |
|
|
pv.setTitle("36524质物库存汇总"); |
|
|
pv.setTitle("36524质物库存汇总"); |
|
|
return rb.success().setData(pv); |
|
|
return rb.success().setData(pv); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/getReportInventoryDayStore/{orderDate}") |
|
|
@GetMapping("/getReportInventoryDayStore/{orderDate}") |
|
|
public ResultBean<ReportInventoryDayStoreVo> getReportInventoryDayStore(@PathVariable("orderDate") String orderDate){ |
|
|
public ResultBean<ReportInventoryDayStoreVo> getReportInventoryDayStore(@PathVariable("orderDate") String orderDate) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ReportInventoryDayStoreVo pv = reportInventoryDayStoreService.getReportInventoryDayStore(orderDate); |
|
|
ReportInventoryDayStoreVo pv = reportInventoryDayStoreService.getReportInventoryDayStore(orderDate); |
|
|
if(null==pv){ |
|
|
if (null == pv) { |
|
|
return rb.success().setData(new ArrayList<>()); |
|
|
return rb.success().setData(new ArrayList<>()); |
|
|
} |
|
|
} |
|
|
return rb.success().setData(pv); |
|
|
return rb.success().setData(pv); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@GetMapping("/getReportInventoryDayToStore/{orderDate}") |
|
|
@GetMapping("/getReportInventoryDayToStore/{orderDate}") |
|
|
public ResultBean<ReportInventoryDayTobaccoStoreVo> getReportInventoryDayToStore(@PathVariable("orderDate") String orderDate){ |
|
|
public ResultBean<ReportInventoryDayTobaccoStoreVo> getReportInventoryDayToStore(@PathVariable("orderDate") String orderDate) { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ReportInventoryDayTobaccoStoreVo pv = reportInventoryDayTobaccoStoreService.getReportInventoryDayToStore(orderDate); |
|
|
ReportInventoryDayTobaccoStoreVo pv = reportInventoryDayTobaccoStoreService.getReportInventoryDayToStore(orderDate); |
|
|
if(null==pv){ |
|
|
if (null == pv) { |
|
|
return rb.success().setData(new ArrayList<>()); |
|
|
return rb.success().setData(new ArrayList<>()); |
|
|
} |
|
|
} |
|
|
return rb.success().setData(pv); |
|
|
return rb.success().setData(pv); |
|
@ -79,12 +83,13 @@ public class ReportInventoryRest implements ReportInventoryDayGatherFeign { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 门店商品库存导出到Excel |
|
|
* 门店商品库存导出到Excel |
|
|
|
|
|
* |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/xlsxMdspkc") |
|
|
@GetMapping("/xlsxMdspkc") |
|
|
public ResultBean<String> xlsxMdspkc() { |
|
|
public ResultBean<String> xlsxMdspkc() { |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
String xlsxUrl = reportInventoryService.xlsxMdspkc(); |
|
|
List<String> xlsxUrl = reportInventoryService.xlsxMdspkc(); |
|
|
return rb.success().setData(xlsxUrl); |
|
|
return rb.success().setData(xlsxUrl); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|