27 changed files with 918 additions and 24 deletions
@ -0,0 +1,11 @@ |
|||
package com.yxt.supervise.report.biz.reportcenter; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/10/26 14:37 |
|||
*/ |
|||
@Mapper |
|||
public class ReportCenterMapper { |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.yxt.supervise.report.biz.reportcenter; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.data.repository.query.Param; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/10/26 14:38 |
|||
*/ |
|||
@RestController("com.yxt.supervise.report.biz.reportcenter.ReportCenterRest") |
|||
@RequestMapping("/reportCenter") |
|||
public class ReportCenterRest { |
|||
@Autowired |
|||
ReportCenterService reportCenterService; |
|||
//在途
|
|||
@GetMapping("/getGoodsOnWay") |
|||
public ResultBean<Map<String, Object>> getSalesReport(@Param("date") String date) { |
|||
// System.out.println("@@@@@: " + date);
|
|||
return reportCenterService.getGoodsOnWay( date); |
|||
} |
|||
//阈值分析
|
|||
@PostMapping("/getThresholdAnalysis") |
|||
public ResultBean<Map<String, Object>> getThresholdAnalysis(@RequestBody Map<String,Object> date) { |
|||
// System.out.println("@@@@@: " + date);
|
|||
return reportCenterService.getThresholdAnalysis( date); |
|||
} |
|||
} |
@ -0,0 +1,121 @@ |
|||
package com.yxt.supervise.report.biz.reportcenter; |
|||
|
|||
import com.yxt.common.base.utils.JsonUtilJackson; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/10/26 14:38 |
|||
*/ |
|||
@Service |
|||
public class ReportCenterService { |
|||
public ResultBean<Map<String, Object>> getGoodsOnWay(String date) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
Map<String, Object> map = JsonUtilJackson.str2map(testData_getGoodsOnWay()); |
|||
return rb.success().setData(map); |
|||
} |
|||
|
|||
private String testData_getGoodsOnWay() { |
|||
return "{ " + " \"listGoodsOnWays\": { " + " \"orderAmount\": \"2213122元\", " + " \"arrivedGoodsValue\": \"2863112元\", " + " \"onWayGoodsValue\": \"1314530元\", " + " \"exceedGoodsValue\": \"2789323元\" " + " }, " + " \"analysisChartData\": [{ " + " \"value\": \"2313123\", " + " \"name\": \"订单总额\" " + " }, " + " { " + " \"value\": \"4359354\", " + " \"name\": \"实际到货价值\" " + " }, " + " { " + " \"value\": \"2313123\", " + " \"name\": \"在途货价值\" " + " }, " + " { " + " \"value\": \"56516849\", " + " \"name\": \"超出价值\" " + " } " + " ], " + " \"listArrivedEarlyWarning\": [{ " + " \"isDelay\": \"是\", " + " \"supplierName\": \"中粮可口可乐饮料(河北)有限公司\", " + " \"num\": 1, " + " \"supplierSid\": \"28\", " + " \"allArrivedDate\": \"1993-10-16\" " + " }, " + " { " + " \"isDelay\": \"否\", " + " \"supplierName\": \"中顺洁柔纸业股份有限公司\", " + " \"num\": 2, " + " \"supplierSid\": \"18\", " + " \"allArrivedDate\": \"1993-08-12\" " + " }, " + " { " + " \"isDelay\": \"是\", " + " \"supplierName\": \"今麦郎食品股份有限公司石家庄分公司\", " + " \"num\": 3, " + " \"supplierSid\": \"08\", " + " \"allArrivedDate\": \"2003-12-16\" " + " }, " + " { " + " \"isDelay\": \"是\", " + " \"supplierName\": \"农夫山泉股份有限公司\", " + " \"num\": 4, " + " \"supplierSid\": \"48\", " + " \"allArrivedDate\": \"2013-10-16\" " + " }, " + " { " + " \"isDelay\": \"否\", " + " \"supplierName\": \"北京百事可乐饮料有限公司\", " + " \"num\": 5, " + " \"supplierSid\": \"12\", " + " \"allArrivedDate\": \"2008-03-11\" " + " }, " + " { " + " \"isDelay\": \"是\", " + " \"supplierName\": \"今麦郎食品股份有限公司石家庄分公司\", " + " \"num\": 6, " + " \"supplierSid\": \"03\", " + " \"allArrivedDate\": \"1996-11-20\" " + " }, " + " { " + " \"isDelay\": \"是\", " + " \"supplierName\": \"农夫山泉股份有限公司\", " + " \"num\": 7, " + " \"supplierSid\": \"68\", " + " \"allArrivedDate\": \"2022-10-23\" " + " }, " + " { " + " \"isDelay\": \"否\", " + " \"supplierName\": \"北京百事可乐饮料有限公司\", " + " \"num\": 8, " + " \"supplierSid\": \"88\", " + " \"allArrivedDate\": \"2014-06-02\" " + " } " + " ] " + "} "; |
|||
} |
|||
public ResultBean<Map<String, Object>> getThresholdAnalysis(Map<String, Object> date) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
Map<String, Object> map = JsonUtilJackson.str2map(testData_getThresholdAnalysis()); |
|||
return rb.success().setData(map); |
|||
} |
|||
|
|||
private String testData_getThresholdAnalysis() { |
|||
return "{ " + |
|||
" \"date\": [ " + |
|||
" \"2023-01-01\", " + |
|||
" \"2023-01-02\", " + |
|||
" \"2023-01-03\", " + |
|||
" \"2023-01-04\", " + |
|||
" \"2023-01-05\", " + |
|||
" \"2023-01-06\", " + |
|||
" \"2023-01-07\" " + |
|||
" ], " + |
|||
" \"series\": [{ " + |
|||
" \"仓库货值\": [ " + |
|||
" 1234, " + |
|||
" 1234, " + |
|||
" 8675, " + |
|||
" 1324, " + |
|||
" 5342, " + |
|||
" 2343, " + |
|||
" 4356 " + |
|||
" ] " + |
|||
" }, " + |
|||
" { " + |
|||
" \"在途货值\": [ " + |
|||
" 1563, " + |
|||
" 1645, " + |
|||
" 5463, " + |
|||
" 2423, " + |
|||
" 5654, " + |
|||
" 7564, " + |
|||
" 2435 " + |
|||
" ] " + |
|||
" }, " + |
|||
" { " + |
|||
" \"门店货值\": [ " + |
|||
" 1332, " + |
|||
" 2823, " + |
|||
" 5116, " + |
|||
" 5648, " + |
|||
" 6548, " + |
|||
" 5484, " + |
|||
" 5498 " + |
|||
" ] " + |
|||
" }, " + |
|||
" { " + |
|||
" \"账户余额\": [ " + |
|||
" 5698, " + |
|||
" 6866, " + |
|||
" 6565, " + |
|||
" 5616, " + |
|||
" 5489, " + |
|||
" 4451, " + |
|||
" 8644 " + |
|||
" ] " + |
|||
" }, " + |
|||
" { " + |
|||
" \"应收账款\": [ " + |
|||
" 5988, " + |
|||
" 9988, " + |
|||
" 4648, " + |
|||
" 9984, " + |
|||
" 7961, " + |
|||
" 5684, " + |
|||
" 9884 " + |
|||
" ] " + |
|||
" }, " + |
|||
" { " + |
|||
" \"借款金额\": [ " + |
|||
" 5985, " + |
|||
" 7897, " + |
|||
" 8898, " + |
|||
" 8654, " + |
|||
" 4968, " + |
|||
" 9879, " + |
|||
" 9797 " + |
|||
" ] " + |
|||
" }, " + |
|||
" { " + |
|||
" \"阀值\": [ " + |
|||
" 30.3, " + |
|||
" 25.5, " + |
|||
" 23.6, " + |
|||
" 53.6, " + |
|||
" 56.1, " + |
|||
" 63.9, " + |
|||
" 34.6 " + |
|||
" ] " + |
|||
" } " + |
|||
" ] " + |
|||
"}"; |
|||
} |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.yxt.supervise.report.biz.supplierarrivalreport; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/4/19 13:40 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "销售信息", description = "销售信息") |
|||
@TableName("purchase_requisition_tobacco") |
|||
public class SupplierArrivalReport extends BaseEntity { |
|||
@ApiModelProperty("订单编号") |
|||
private String code; |
|||
@ApiModelProperty("订单时间") |
|||
//订单时间
|
|||
private String purchaseDate; |
|||
@ApiModelProperty("到货时间") |
|||
//到货时间
|
|||
private String arrivalDate; |
|||
@ApiModelProperty("供货商名称") |
|||
//供货商名称
|
|||
private String supplierName; |
|||
@ApiModelProperty("放款金额") |
|||
//放款金额
|
|||
private String loanAmount; |
|||
@ApiModelProperty("订单金额") |
|||
//订单金额
|
|||
private String orderAmount; |
|||
@ApiModelProperty("实际到货") |
|||
//实际到货
|
|||
private String actualArrival; |
|||
@ApiModelProperty("在途") |
|||
//在途
|
|||
private String transit; |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.yxt.supervise.report.biz.supplierarrivalreport; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/4/19 13:41 |
|||
*/ |
|||
@Data |
|||
public class SupplierArrivalReportQuery implements Query { |
|||
private String date; |
|||
} |
@ -0,0 +1,81 @@ |
|||
package com.yxt.supervise.report.biz.supplierarrivalreport; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/4/14 11:05 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/supplierarrivalreport") |
|||
public class SupplierArrivalReportRest { |
|||
@Autowired |
|||
SupplierArrivalReportService supplierArrivalReportService; |
|||
|
|||
/** |
|||
* 烟草订单明细 |
|||
* @param pq |
|||
* @return |
|||
*/ |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SupplierArrivalReportVo>>listPage(@RequestBody PagerQuery<SupplierArrivalReportQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<SupplierArrivalReportVo> pv = supplierArrivalReportService.listPage(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
/** |
|||
* 烟草商品到货明细 |
|||
* @param pq |
|||
* @return |
|||
*/ |
|||
@PostMapping("/arrivalGoodsYc") |
|||
public ResultBean<PagerVo<SupplierArrivalReportVo>>arrivalGoodsYc(@RequestBody PagerQuery<SupplierArrivalReportQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<SupplierArrivalReportVo> pv = supplierArrivalReportService.arrivalGoodsYc(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
/** |
|||
* 订单明细表 |
|||
* @param pq |
|||
* @return |
|||
*/ |
|||
@PostMapping("/supplierOrder") |
|||
public ResultBean<PagerVo<SupplierArrivalReportVo>>supplierOrder(@RequestBody PagerQuery<SupplierArrivalReportQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<SupplierArrivalReportVo> pv = supplierArrivalReportService.supplierOrder(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
/** |
|||
* 商品到货明细表 |
|||
* @param pq |
|||
* @return |
|||
*/ |
|||
@PostMapping("/arrivalGoods") |
|||
public ResultBean<PagerVo<SupplierArrivalReportVo>>arrivalGoods(@RequestBody PagerQuery<SupplierArrivalReportQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<SupplierArrivalReportVo> pv = supplierArrivalReportService.arrivalGoods(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
/** |
|||
* 供应商到货汇总 |
|||
* @param pq |
|||
* @return |
|||
*/ |
|||
@PostMapping("/supplierArrivalSummary") |
|||
public ResultBean<PagerVo<SupplierArrivalReportVo>>supplierArrivalSummary(@RequestBody PagerQuery<SupplierArrivalReportQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<SupplierArrivalReportVo> pv = supplierArrivalReportService.supplierArrival(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
} |
@ -0,0 +1,99 @@ |
|||
package com.yxt.supervise.report.biz.supplierarrivalreport; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.supervise.report.ds.supplychain.SupplyChainMapper; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/4/14 11:05 |
|||
*/ |
|||
@Service |
|||
public class SupplierArrivalReportService { |
|||
@Autowired |
|||
SupplyChainMapper supplyChainMapper; |
|||
|
|||
public PagerVo<SupplierArrivalReportVo> listPage(PagerQuery<SupplierArrivalReportQuery> pq) { |
|||
SupplierArrivalReportQuery query = pq.getParams(); |
|||
QueryWrapper<SupplierArrivalReport> qw = new QueryWrapper<>(); |
|||
if(query!=null) { |
|||
if (StringUtils.isNotBlank(query.getDate())) { |
|||
qw.eq("STR_TO_DATE(ba.createTime,'%Y-%m-%d')", query.getDate()); |
|||
} |
|||
} |
|||
IPage<SupplierArrivalReport> page = PagerUtil.queryToPage(pq); |
|||
IPage<SupplierArrivalReportVo> pagging = supplyChainMapper.listPage(page,qw); |
|||
PagerVo<SupplierArrivalReportVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public PagerVo<SupplierArrivalReportVo> arrivalGoodsYc(PagerQuery<SupplierArrivalReportQuery> pq) { |
|||
SupplierArrivalReportQuery query = pq.getParams(); |
|||
QueryWrapper<SupplierArrivalReport> qw = new QueryWrapper<>(); |
|||
if(query!=null) { |
|||
if (StringUtils.isNotBlank(query.getDate())) { |
|||
qw.eq("STR_TO_DATE(ba.createTime,'%Y-%m-%d')", query.getDate()); |
|||
} |
|||
} |
|||
IPage<SupplierArrivalReport> page = PagerUtil.queryToPage(pq); |
|||
IPage<SupplierArrivalReportVo> pagging = supplyChainMapper.arrivalGoodsYc(page,qw); |
|||
PagerVo<SupplierArrivalReportVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public PagerVo<SupplierArrivalReportVo> supplierOrder(PagerQuery<SupplierArrivalReportQuery> pq) { |
|||
SupplierArrivalReportQuery query = pq.getParams(); |
|||
QueryWrapper<SupplierArrivalReport> qw = new QueryWrapper<>(); |
|||
if(query!=null) { |
|||
if (StringUtils.isNotBlank(query.getDate())) { |
|||
qw.eq("STR_TO_DATE(re.createTime,'%Y-%m-%d')", query.getDate()); |
|||
} |
|||
} |
|||
IPage<SupplierArrivalReport> page = PagerUtil.queryToPage(pq); |
|||
IPage<SupplierArrivalReportVo> pagging = supplyChainMapper.supplierOrder(page,qw); |
|||
PagerVo<SupplierArrivalReportVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public PagerVo<SupplierArrivalReportVo> arrivalGoods(PagerQuery<SupplierArrivalReportQuery> pq) { |
|||
SupplierArrivalReportQuery query = pq.getParams(); |
|||
QueryWrapper<SupplierArrivalReport> qw = new QueryWrapper<>(); |
|||
if(query!=null) { |
|||
if (StringUtils.isNotBlank(query.getDate())) { |
|||
qw.eq("STR_TO_DATE(re.createTime,'%Y-%m-%d')", query.getDate()); |
|||
} |
|||
} |
|||
IPage<SupplierArrivalReport> page = PagerUtil.queryToPage(pq); |
|||
IPage<SupplierArrivalReportVo> pagging = supplyChainMapper.arrivalGoods(page,qw); |
|||
PagerVo<SupplierArrivalReportVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
public PagerVo<SupplierArrivalReportVo> supplierArrival(PagerQuery<SupplierArrivalReportQuery> pq) { |
|||
SupplierArrivalReportQuery query = pq.getParams(); |
|||
QueryWrapper<SupplierArrivalReport> qw = new QueryWrapper<>(); |
|||
// if(query!=null) {
|
|||
// if (StringUtils.isNotBlank(query.getDate())) {
|
|||
// qw.eq("STR_TO_DATE(re.createTime,'%Y-%m-%d')", query.getDate());
|
|||
// }
|
|||
// }
|
|||
IPage<SupplierArrivalReport> page = PagerUtil.queryToPage(pq); |
|||
IPage<SupplierArrivalReportVo> pagging = supplyChainMapper.supplierArrival(page,qw); |
|||
for(SupplierArrivalReportVo vo:pagging.getRecords()){ |
|||
if(vo.getLogo().equals("否")){ |
|||
vo.setExceed(vo.getActualArrival().subtract(vo.getOrderAmount())); |
|||
vo.setTransit(new BigDecimal(0)); |
|||
}else if(vo.getLogo().equals("是") ){ |
|||
vo.setTransit(vo.getOrderAmount().subtract(vo.getActualArrival())); |
|||
vo.setExceed(new BigDecimal(0)); |
|||
} |
|||
} |
|||
PagerVo<SupplierArrivalReportVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.yxt.supervise.report.biz.supplierarrivalreport; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/4/19 13:41 |
|||
*/ |
|||
@Data |
|||
public class SupplierArrivalReportVo implements Vo { |
|||
|
|||
@ApiModelProperty("订单编号") |
|||
private String code; |
|||
//订单时间
|
|||
@ApiModelProperty("订单时间") |
|||
private String purchaseDate; |
|||
//到货时间
|
|||
@ApiModelProperty("到货时间") |
|||
private String arrivalDate; |
|||
//供货商名称
|
|||
@ApiModelProperty("供货商名称") |
|||
private String supplierName; |
|||
//放款金额
|
|||
@ApiModelProperty("放款金额") |
|||
private String loanAmount; |
|||
//订单金额
|
|||
@ApiModelProperty("订单金额") |
|||
private BigDecimal orderAmount; |
|||
//实际到货
|
|||
@ApiModelProperty("实际到货") |
|||
private BigDecimal actualArrival; |
|||
//实际到货数量
|
|||
private String actualArrivalNumber; |
|||
//在途
|
|||
@ApiModelProperty("在途") |
|||
private BigDecimal transit; |
|||
//在途数量
|
|||
private String transitNumber; |
|||
//销售渠道
|
|||
private String storeName; |
|||
//订单到货价值
|
|||
private String orderArrivalAmount; |
|||
//超出
|
|||
private BigDecimal exceed; |
|||
//数量
|
|||
private String number; |
|||
//商品名
|
|||
private String proName; |
|||
//是否延期
|
|||
private String logo; |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.supervise.report.biz.system; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.report.feign.system.sysmenu.SysMenuFeign; |
|||
import com.yxt.supervise.report.feign.system.sysmenu.SysMenuQuery; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/10/26 9:54 |
|||
*/ |
|||
@RestController("com.yxt.supervise.report.biz.system.SysMenuRest") |
|||
@RequestMapping("v1/sysmenu") |
|||
public class SysMenuRest { |
|||
@Autowired |
|||
SysMenuFeign sysMenuFeign; |
|||
|
|||
|
|||
@ApiOperation("根据资源sid查询所有数据列表 ") |
|||
@PostMapping("/sourcemenutree") |
|||
public ResultBean<List<Map<String, Object>>> sourcemenutree(@RequestBody SysMenuQuery query){ |
|||
return sysMenuFeign.sourcemenutree(query); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.supervise.report.biz.system; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.report.feign.system.sysuser.SysUserFeign; |
|||
import com.yxt.supervise.system.sysuser.SysUserVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/10/25 9:51 |
|||
*/ |
|||
@RestController("com.yxt.supervise.report.biz.system.SysUserRest") |
|||
@RequestMapping("v1/sysuser") |
|||
public class SysUserRest { |
|||
@Autowired |
|||
SysUserFeign sysUserFeign; |
|||
@PostMapping(value = "/loginDetails", headers = "token") |
|||
@ApiOperation("根据token值获取登录后的用户信息") |
|||
public ResultBean<SysUserVo> loginDetails(HttpServletRequest httpServletRequest){ |
|||
httpServletRequest.getHeader("token"); |
|||
return sysUserFeign.loginDetailsNew(httpServletRequest.getHeader("token")); |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.yxt.supervise.report.ds.crm; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/10/17 9:06 |
|||
*/ |
|||
@Data |
|||
public class ProjectAccountVo implements Query { |
|||
private String id; |
|||
private String sid; |
|||
private String projectSid; |
|||
private String accountType; |
|||
private String accountNumber; |
|||
private String bank; |
|||
private String affiliateBank; |
|||
private BigDecimal balance=new BigDecimal(0); |
|||
private BigDecimal wBalance=new BigDecimal(0); |
|||
private String enterpriseSid; |
|||
private String enterpriseName; |
|||
|
|||
public BigDecimal getBalance() { |
|||
BigDecimal count=new BigDecimal(0); |
|||
if (null==balance){ |
|||
return balance=count; |
|||
} |
|||
// balance.divide(new BigDecimal(10000),2,BigDecimal.ROUND_HALF_UP);
|
|||
return balance; |
|||
} |
|||
|
|||
public BigDecimal getwBalance() { |
|||
BigDecimal count=new BigDecimal(0); |
|||
if (null==this.balance){ |
|||
return wBalance=count; |
|||
} |
|||
this.wBalance=balance.divide(new BigDecimal(10000),2,BigDecimal.ROUND_HALF_UP); |
|||
return wBalance; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
<?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.yxt.supervise.report.ds.supplychain.SupplyChainMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="listPage" resultType="com.yxt.supervise.report.biz.supplierarrivalreport.SupplierArrivalReportVo"> |
|||
SELECT |
|||
ba.code as code,ba.purchaseDate as purchaseDate,ba.arrivalDate as arrivalDate,ba.supplierName as supplierName,ROUND(sum(de.price),2) as orderAmount |
|||
FROM |
|||
purchase_requisition_tobacco ba |
|||
LEFT JOIN purchase_requisition_store st ON ba.sid = st.mainSid |
|||
LEFT JOIN purchase_requisition_tobacco_details de ON st.sid = de.mainSid |
|||
<where> ${ew.sqlSegment} </where> |
|||
GROUP BY ba.code |
|||
</select> |
|||
<select id="arrivalGoodsYc" resultType="com.yxt.supervise.report.biz.supplierarrivalreport.SupplierArrivalReportVo"> |
|||
SELECT |
|||
ba.supplierName as supplierName,ROUND(sum(de.price),2) as orderAmount,st.storeName |
|||
FROM |
|||
purchase_requisition_tobacco ba |
|||
LEFT JOIN purchase_requisition_store st ON ba.sid = st.mainSid |
|||
LEFT JOIN purchase_requisition_tobacco_details de ON st.sid = de.mainSid |
|||
<where> ${ew.sqlSegment} </where> |
|||
GROUP BY st.storeCode |
|||
</select> |
|||
<select id="supplierOrder" resultType="com.yxt.supervise.report.biz.supplierarrivalreport.SupplierArrivalReportVo"> |
|||
select re.supplierName ,re.code ,ROUND(sum(pro.totalPrice),2) as orderAmount,re.purchaseDate,re.arrivalDate from purchase_requisition re |
|||
left join purchase_requisition_pro pro on re.sid =pro.mainSid |
|||
<where> ${ew.sqlSegment} </where> |
|||
GROUP BY re.supplierCode |
|||
</select> |
|||
|
|||
<select id="arrivalGoods" resultType="com.yxt.supervise.report.biz.supplierarrivalreport.SupplierArrivalReportVo"> |
|||
select re.supplierName ,pro.proCode as code , ROUND(sum(pro.totalPrice),2) as orderAmount,pro.proName,pro.number |
|||
from purchase_requisition re |
|||
left join purchase_requisition_pro pro on re.sid =pro.mainSid |
|||
<where> ${ew.sqlSegment} </where> |
|||
GROUP BY pro.proCode |
|||
</select> |
|||
<select id="supplierArrival" resultType="com.yxt.supervise.report.biz.supplierarrivalreport.SupplierArrivalReportVo"> |
|||
SELECT |
|||
re.supplierName, |
|||
re.CODE, |
|||
case |
|||
when ROUND( sum( pro.totalPrice ), 2 )is null=1 then 0 |
|||
when ROUND( sum( pro.totalPrice ), 2 )is null=0 then ROUND( sum( pro.totalPrice ), 2 ) |
|||
end orderAmount, |
|||
re.purchaseDate, |
|||
re.arrivalDate , |
|||
sto.cole4, |
|||
case |
|||
when ROUND( sum(sto.colq16), 2 ) is null=1 then 0 |
|||
when ROUND( sum(sto.colq16), 2 ) is null=0 then ROUND( sum(sto.colq16), 2 ) |
|||
end actualArrival, |
|||
-- SIGN(sum( pro.totalPrice )-sum(sto.colq16)) as logo, |
|||
case |
|||
when SIGN(sum( pro.totalPrice )-sum(sto.colq16)) =-1 then '否' |
|||
when SIGN(sum( pro.totalPrice )-sum(sto.colq16)) =0 then '否' |
|||
when SIGN(sum( pro.totalPrice )-sum(sto.colq16)) =1 then '是' |
|||
when SIGN(sum( pro.totalPrice )-sum(sto.colq16)) is null=1 then '是' |
|||
end logo |
|||
FROM |
|||
purchase_requisition re |
|||
LEFT JOIN purchase_requisition_pro pro ON re.sid = pro.mainSid |
|||
LEFT JOIN gd_instorage sto on re.supplierOnlyCode =sto.supplierCodeUnified |
|||
GROUP BY |
|||
re.supplierOnlyCode |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,29 @@ |
|||
package com.yxt.supervise.report.feign.crm.projectinformation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestHeader; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/10/25 9:36 |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "supervise-crm-projectinformation", |
|||
name = "supervise-crm", |
|||
path = "v1/projectinformation") |
|||
public interface ProjectInformationFeign { |
|||
|
|||
@ApiOperation("查询全部") |
|||
@GetMapping("/listAll") |
|||
public ResultBean<List<ProjectInformationVo>> listAll(@RequestHeader("token") String token); |
|||
} |
@ -0,0 +1,69 @@ |
|||
package com.yxt.supervise.report.feign.crm.projectinformation; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import com.yxt.supervise.system.sysorganization.SysOrganizationVo; |
|||
import com.yxt.supervise.system.sysuser.SysUser; |
|||
import io.swagger.annotations.ApiModel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/4/25 9:29 |
|||
*/ |
|||
@ApiModel(value = "项目信息 视图数据对象", description = "项目信息 视图数据对象") |
|||
@Data |
|||
public class ProjectInformationVo implements Vo { |
|||
private String id ; |
|||
private String sid; |
|||
//项目名称
|
|||
private String entryName; |
|||
//所属行业
|
|||
private String industryName; |
|||
//项目类型
|
|||
private String typeName; |
|||
//授信额度
|
|||
private String creditLimit; |
|||
//贷款行
|
|||
private String bankName; |
|||
//客户经理
|
|||
private String bManagerName; |
|||
//签约日期
|
|||
private String signingDate; |
|||
//结束日期
|
|||
private String endDate; |
|||
//企业名称
|
|||
private String enterpriseName; |
|||
//联系人
|
|||
private String eContacts; |
|||
//监管负责人
|
|||
private String regulatoryLeader; |
|||
private String regulatorySupervisor; |
|||
|
|||
private String generalManager; |
|||
private String fillInDate; |
|||
private String bankSid; |
|||
private String managerSid; |
|||
private String enterpriseSid; |
|||
private String industrySid; |
|||
private String typeSid; |
|||
private String remarks; |
|||
private String engaDate; |
|||
private String url; |
|||
private BigDecimal useLimit; |
|||
private String loanDate; |
|||
private String useDate; |
|||
private String bankPledgeRate; |
|||
//状态名称
|
|||
private String stateName; |
|||
private String stateSid; |
|||
//状态说明
|
|||
private String stateRemarks; |
|||
private BigDecimal balance=new BigDecimal(0); |
|||
|
|||
//项目银行人
|
|||
private SysUser sysUser; |
|||
//银行
|
|||
private SysOrganizationVo sysOrganizationVo; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.report.feign.system.sysmenu; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/10/26 9:50 |
|||
*/ |
|||
@Api(tags = "菜单表") |
|||
@FeignClient( |
|||
contextId = "supervise-system-SysMenu", |
|||
name = "supervise-system", |
|||
path = "v1/sysmenu") |
|||
public interface SysMenuFeign { |
|||
@ApiOperation("根据资源sid查询所有数据列表 ") |
|||
@PostMapping("/sourcemenutree") |
|||
public ResultBean<List<Map<String, Object>>> sourcemenutree(@RequestBody SysMenuQuery query); |
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.yxt.supervise.report.feign.system.sysmenu; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SysMenuQuery.java <br/> |
|||
* Class: SysMenuQuery <br/> |
|||
* Description: 菜单表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:28 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "菜单表 查询条件", description = "菜单表 查询条件") |
|||
@Data |
|||
public class SysMenuQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("菜单名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("菜单路由路径(VUE)") |
|||
private String menuUrl; |
|||
|
|||
@ApiModelProperty("菜单对应的前端页面路径") |
|||
private String pageUrl; |
|||
|
|||
@ApiModelProperty("菜单图标地址") |
|||
private String iconUrl; |
|||
|
|||
@ApiModelProperty("资源sid") |
|||
private String sourceSid; |
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
@ApiModelProperty("角色sid") |
|||
private String roleSid; |
|||
|
|||
@ApiModelProperty("是否显示,默认为1显示,0为不显示") |
|||
private String isShow; |
|||
|
|||
@ApiModelProperty("排序号") |
|||
private Integer sortNo; |
|||
|
|||
@ApiModelProperty("上级sid") |
|||
private String pSid; |
|||
|
|||
@ApiModelProperty("前端页面路径重定向") |
|||
private Integer pageUrlRedirect; |
|||
|
|||
@ApiModelProperty("前端页面名称(vue组件名)") |
|||
private String pageName; |
|||
|
|||
@ApiModelProperty("前端页面别名") |
|||
private String pageAliasName; |
|||
|
|||
@ApiModelProperty("菜单类型(0左侧当行菜单,1页面中功能)") |
|||
private String menuType; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.yxt.supervise.report.feign.system.sysuser; |
|||
|
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.supervise.system.sysuser.SysUser; |
|||
import com.yxt.supervise.system.sysuser.SysUserDto; |
|||
import com.yxt.supervise.system.sysuser.SysUserVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author wangpengfei |
|||
* @date 2023/8/5 9:22 |
|||
*/ |
|||
@FeignClient( |
|||
contextId = "supervise-system-sysUser", |
|||
name = "supervise-system", |
|||
path = "v1/sysuser") |
|||
public interface SysUserFeign { |
|||
@PostMapping(value = "/loginDetailsNew") |
|||
@ApiOperation("根据token值获取登录后的用户信息") |
|||
public ResultBean<SysUserVo> loginDetailsNew(@RequestHeader("token") String token); |
|||
} |
Loading…
Reference in new issue