
35 changed files with 1513 additions and 2 deletions
@ -0,0 +1,43 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.EntityWithId; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-08-16:28 |
||||
|
*/ |
||||
|
@TableName("crawl_sales_amount") |
||||
|
public class CrawlSalesAmount extends EntityWithId { |
||||
|
@ApiModelProperty("数据日期") |
||||
|
private String dataDate; |
||||
|
@ApiModelProperty("门店名称") |
||||
|
private String storeName; |
||||
|
@ApiModelProperty("实收金额") |
||||
|
private Double salesAmount; |
||||
|
|
||||
|
public String getDataDate() { |
||||
|
return dataDate; |
||||
|
} |
||||
|
|
||||
|
public void setDataDate(String dataDate) { |
||||
|
this.dataDate = dataDate; |
||||
|
} |
||||
|
|
||||
|
public String getStoreName() { |
||||
|
return storeName; |
||||
|
} |
||||
|
|
||||
|
public void setStoreName(String storeName) { |
||||
|
this.storeName = storeName; |
||||
|
} |
||||
|
|
||||
|
public Double getSalesAmount() { |
||||
|
return salesAmount; |
||||
|
} |
||||
|
|
||||
|
public void setSalesAmount(Double salesAmount) { |
||||
|
this.salesAmount = salesAmount; |
||||
|
} |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:03 |
||||
|
*/ |
||||
|
@ApiModel(value = "抓取的营业指标数据 传输对象") |
||||
|
public class CrawlSalesAmountDto implements Dto { |
||||
|
private String dataDate; |
||||
|
private String StoreName; |
||||
|
private Double salesAmount; |
||||
|
|
||||
|
public String getDataDate() { |
||||
|
return dataDate; |
||||
|
} |
||||
|
|
||||
|
public void setDataDate(String dataDate) { |
||||
|
this.dataDate = dataDate; |
||||
|
} |
||||
|
|
||||
|
public String getStoreName() { |
||||
|
return StoreName; |
||||
|
} |
||||
|
|
||||
|
public void setStoreName(String storeName) { |
||||
|
StoreName = storeName; |
||||
|
} |
||||
|
|
||||
|
public Double getSalesAmount() { |
||||
|
return salesAmount; |
||||
|
} |
||||
|
|
||||
|
public void setSalesAmount(Double salesAmount) { |
||||
|
this.salesAmount = salesAmount; |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:08 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface CrawlSalesAmountMapper extends BaseMapper<CrawlSalesAmount> { |
||||
|
CrawlSalesAmount select(); |
||||
|
|
||||
|
IPage<CrawlSalesAmountVo> selectPageVo(IPage<CrawlSalesAmount> page, @Param(Constants.WRAPPER) Wrapper<CrawlSalesAmount> qw); |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
<?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.dbcenter.zhj.crawl.biz.crawlSalesAmount.CrawlSalesAmountMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="select" resultType="com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount.CrawlSalesAmount"> |
||||
|
|
||||
|
</select> |
||||
|
|
||||
|
<select id="selectPageVo" resultType="com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount.CrawlSalesAmountVo"> |
||||
|
select b.name,a.storeName,a.dataDate,a.salesAmount |
||||
|
from crawl_sales_amount a |
||||
|
inner join enp_store s on a.storeName = s.name |
||||
|
inner join enp_brand b on s.enpSid = b.enpSid |
||||
|
<where> |
||||
|
${ew.sqlSegment} |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,72 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import com.yxt.common.core.query.Query; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:03 |
||||
|
*/ |
||||
|
@ApiModel(value = "抓取的营业指标数据 传输对象") |
||||
|
public class CrawlSalesAmountQuery implements Query { |
||||
|
private String dataDate; |
||||
|
@ApiModelProperty("门店名称") |
||||
|
private String StoreName; |
||||
|
private Double salesAmount; |
||||
|
@ApiModelProperty("品牌名称") |
||||
|
private String brandName; |
||||
|
@ApiModelProperty("开始时间") |
||||
|
private String fromTime; |
||||
|
@ApiModelProperty("结束时间") |
||||
|
private String endTime; |
||||
|
|
||||
|
public String getDataDate() { |
||||
|
return dataDate; |
||||
|
} |
||||
|
|
||||
|
public void setDataDate(String dataDate) { |
||||
|
this.dataDate = dataDate; |
||||
|
} |
||||
|
|
||||
|
public String getStoreName() { |
||||
|
return StoreName; |
||||
|
} |
||||
|
|
||||
|
public void setStoreName(String storeName) { |
||||
|
StoreName = storeName; |
||||
|
} |
||||
|
|
||||
|
public Double getSalesAmount() { |
||||
|
return salesAmount; |
||||
|
} |
||||
|
|
||||
|
public void setSalesAmount(Double salesAmount) { |
||||
|
this.salesAmount = salesAmount; |
||||
|
} |
||||
|
|
||||
|
public String getBrandName() { |
||||
|
return brandName; |
||||
|
} |
||||
|
|
||||
|
public void setBrandName(String brandName) { |
||||
|
this.brandName = brandName; |
||||
|
} |
||||
|
|
||||
|
public String getFromTime() { |
||||
|
return fromTime; |
||||
|
} |
||||
|
|
||||
|
public void setFromTime(String fromTime) { |
||||
|
this.fromTime = fromTime; |
||||
|
} |
||||
|
|
||||
|
public String getEndTime() { |
||||
|
return endTime; |
||||
|
} |
||||
|
|
||||
|
public void setEndTime(String endTime) { |
||||
|
this.endTime = endTime; |
||||
|
} |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount; |
||||
|
|
||||
|
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.Api; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-9:53 |
||||
|
*/ |
||||
|
@Api(tags = "抓取的营业指标数据") |
||||
|
@RestController |
||||
|
@RequestMapping("dbCenter/crawlAmount") |
||||
|
public class CrawlSalesAmountRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private CrawlSalesAmountService crawlSalesAmountService; |
||||
|
|
||||
|
@ApiOperation("新增") |
||||
|
@RequestMapping("/save") |
||||
|
public ResultBean save(@RequestBody CrawlSalesAmountDto dto){ |
||||
|
return crawlSalesAmountService.saveCrawlSalesAmount(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("统计查询分页") |
||||
|
@PostMapping("/listPage") |
||||
|
public ResultBean list(@RequestBody PagerQuery<CrawlSalesAmountQuery> pq){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<CrawlSalesAmountVo> pv = crawlSalesAmountService.listPageVo(pq); |
||||
|
return rb.success().setData(pv); |
||||
|
} |
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
||||
|
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.result.ResultBean; |
||||
|
import com.yxt.common.core.vo.PagerVo; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:07 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class CrawlSalesAmountService extends MybatisBaseService<CrawlSalesAmountMapper, CrawlSalesAmount> { |
||||
|
|
||||
|
@Autowired |
||||
|
private CrawlSalesAmountMapper salesAmountMapper; |
||||
|
|
||||
|
public ResultBean saveCrawlSalesAmount(CrawlSalesAmountDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
CrawlSalesAmount amount = new CrawlSalesAmount(); |
||||
|
BeanUtil.copyProperties(dto,amount); |
||||
|
int insert = salesAmountMapper.insert(amount); |
||||
|
if (insert == 0){ |
||||
|
return rb.setMsg("添加失败"); |
||||
|
} |
||||
|
return rb.success().setMsg("添加成功"); |
||||
|
} |
||||
|
|
||||
|
public PagerVo<CrawlSalesAmountVo> listPageVo(PagerQuery<CrawlSalesAmountQuery> pq){ |
||||
|
CrawlSalesAmountQuery query = pq.getParams(); |
||||
|
QueryWrapper<CrawlSalesAmount> qw = new QueryWrapper<>(); |
||||
|
if (query != null){ |
||||
|
if (query.getStoreName() != null){ |
||||
|
qw.eq("a.storeName",query.getStoreName()); |
||||
|
} |
||||
|
if (query.getFromTime() != null){ |
||||
|
qw.ge("a.dataDate",query.getFromTime()); |
||||
|
} |
||||
|
if (query.getEndTime() != null){ |
||||
|
qw.le("a.dataDate",query.getEndTime()); |
||||
|
} |
||||
|
if (query.getBrandName() != null){ |
||||
|
qw.eq("b.name",query.getBrandName()); |
||||
|
} |
||||
|
} |
||||
|
IPage<CrawlSalesAmount> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<CrawlSalesAmountVo> pagging = salesAmountMapper.selectPageVo(page, qw); |
||||
|
PagerVo<CrawlSalesAmountVo> pv = PagerUtil.pageToVo(pagging, null); |
||||
|
List<CrawlSalesAmountVo> records = pv.getRecords(); |
||||
|
for (CrawlSalesAmountVo record : records) { |
||||
|
record.setOils(record.getSalesAmount()*50*0.01); |
||||
|
record.setRice(record.getSalesAmount()*30*0.01); |
||||
|
record.setFace(record.getSalesAmount()*20*0.01); |
||||
|
record.setTotalCount(record.getOils()+record.getRice()+record.getFace()); |
||||
|
} |
||||
|
return pv; |
||||
|
} |
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount; |
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-11:25 |
||||
|
*/ |
||||
|
@ApiModel(value = "返回值 视图") |
||||
|
public class CrawlSalesAmountVo implements Vo { |
||||
|
|
||||
|
@ApiModelProperty("数据日期") |
||||
|
private String dataDate; |
||||
|
@ApiModelProperty("门店名称") |
||||
|
private String storeName; |
||||
|
@ApiModelProperty("实收金额") |
||||
|
private Double salesAmount; |
||||
|
|
||||
|
@ApiModelProperty("厂家") |
||||
|
private String vender; |
||||
|
@ApiModelProperty("品牌") |
||||
|
private String brandName; |
||||
|
@ApiModelProperty("油类成本占比") |
||||
|
private Double oils; |
||||
|
@ApiModelProperty("米类成本占比") |
||||
|
private Double rice; |
||||
|
@ApiModelProperty("面类成本占比") |
||||
|
private Double face; |
||||
|
@ApiModelProperty("合计成本金额") |
||||
|
private Double totalCount; |
||||
|
|
||||
|
public String getDataDate() { |
||||
|
return dataDate; |
||||
|
} |
||||
|
|
||||
|
public void setDataDate(String dataDate) { |
||||
|
this.dataDate = dataDate; |
||||
|
} |
||||
|
|
||||
|
public String getStoreName() { |
||||
|
return storeName; |
||||
|
} |
||||
|
|
||||
|
public void setStoreName(String storeName) { |
||||
|
this.storeName = storeName; |
||||
|
} |
||||
|
|
||||
|
public Double getSalesAmount() { |
||||
|
return salesAmount; |
||||
|
} |
||||
|
|
||||
|
public void setSalesAmount(Double salesAmount) { |
||||
|
this.salesAmount = salesAmount; |
||||
|
} |
||||
|
|
||||
|
public String getVender() { |
||||
|
return vender; |
||||
|
} |
||||
|
|
||||
|
public void setVender(String vender) { |
||||
|
this.vender = vender; |
||||
|
} |
||||
|
|
||||
|
public String getBrandName() { |
||||
|
return brandName; |
||||
|
} |
||||
|
|
||||
|
public void setBrandName(String brandName) { |
||||
|
this.brandName = brandName; |
||||
|
} |
||||
|
|
||||
|
public Double getOils() { |
||||
|
return oils; |
||||
|
} |
||||
|
|
||||
|
public void setOils(Double oils) { |
||||
|
this.oils = oils; |
||||
|
} |
||||
|
|
||||
|
public Double getRice() { |
||||
|
return rice; |
||||
|
} |
||||
|
|
||||
|
public void setRice(Double rice) { |
||||
|
this.rice = rice; |
||||
|
} |
||||
|
|
||||
|
public Double getFace() { |
||||
|
return face; |
||||
|
} |
||||
|
|
||||
|
public void setFace(Double face) { |
||||
|
this.face = face; |
||||
|
} |
||||
|
|
||||
|
public Double getTotalCount() { |
||||
|
return totalCount; |
||||
|
} |
||||
|
|
||||
|
public void setTotalCount(Double totalCount) { |
||||
|
this.totalCount = totalCount; |
||||
|
} |
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesDishes; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.EntityWithId; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-08-16:32 |
||||
|
*/ |
||||
|
@TableName("crawl_sales_dishes") |
||||
|
public class CrawlSalesDishes extends EntityWithId { |
||||
|
@ApiModelProperty("数据日期") |
||||
|
private String dataDate; |
||||
|
@ApiModelProperty("菜品名称") |
||||
|
private String dishesName; |
||||
|
@ApiModelProperty("规格单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("数量") |
||||
|
private Double salesCount; |
||||
|
@ApiModelProperty("单价") |
||||
|
private Double salesPrice; |
||||
|
|
||||
|
public String getDataDate() { |
||||
|
return dataDate; |
||||
|
} |
||||
|
|
||||
|
public void setDataDate(String dataDate) { |
||||
|
this.dataDate = dataDate; |
||||
|
} |
||||
|
|
||||
|
public String getDishesName() { |
||||
|
return dishesName; |
||||
|
} |
||||
|
|
||||
|
public void setDishesName(String dishesName) { |
||||
|
this.dishesName = dishesName; |
||||
|
} |
||||
|
|
||||
|
public String getUnit() { |
||||
|
return unit; |
||||
|
} |
||||
|
|
||||
|
public void setUnit(String unit) { |
||||
|
this.unit = unit; |
||||
|
} |
||||
|
|
||||
|
public Double getSalesCount() { |
||||
|
return salesCount; |
||||
|
} |
||||
|
|
||||
|
public void setSalesCount(Double salesCount) { |
||||
|
this.salesCount = salesCount; |
||||
|
} |
||||
|
|
||||
|
public Double getSalesPrice() { |
||||
|
return salesPrice; |
||||
|
} |
||||
|
|
||||
|
public void setSalesPrice(Double salesPrice) { |
||||
|
this.salesPrice = salesPrice; |
||||
|
} |
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesDishes; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:54 |
||||
|
*/ |
||||
|
@ApiModel(value = "抓取的菜品销量数据 传输对象") |
||||
|
public class CrawlSalesDishesDto implements Dto { |
||||
|
@ApiModelProperty("数据日期") |
||||
|
private String dataDate; |
||||
|
@ApiModelProperty("菜品名称") |
||||
|
private String dishesName; |
||||
|
@ApiModelProperty("规格单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("数量") |
||||
|
private Double salesCount; |
||||
|
@ApiModelProperty("单价") |
||||
|
private Double salesPrice; |
||||
|
|
||||
|
@ApiModelProperty("门店名称") |
||||
|
private String StoreName; |
||||
|
|
||||
|
public String getStoreName() { |
||||
|
return StoreName; |
||||
|
} |
||||
|
|
||||
|
public void setStoreName(String storeName) { |
||||
|
StoreName = storeName; |
||||
|
} |
||||
|
|
||||
|
public String getDataDate() { |
||||
|
return dataDate; |
||||
|
} |
||||
|
|
||||
|
public void setDataDate(String dataDate) { |
||||
|
this.dataDate = dataDate; |
||||
|
} |
||||
|
|
||||
|
public String getDishesName() { |
||||
|
return dishesName; |
||||
|
} |
||||
|
|
||||
|
public void setDishesName(String dishesName) { |
||||
|
this.dishesName = dishesName; |
||||
|
} |
||||
|
|
||||
|
public String getUnit() { |
||||
|
return unit; |
||||
|
} |
||||
|
|
||||
|
public void setUnit(String unit) { |
||||
|
this.unit = unit; |
||||
|
} |
||||
|
|
||||
|
public Double getSalesCount() { |
||||
|
return salesCount; |
||||
|
} |
||||
|
|
||||
|
public void setSalesCount(Double salesCount) { |
||||
|
this.salesCount = salesCount; |
||||
|
} |
||||
|
|
||||
|
public Double getSalesPrice() { |
||||
|
return salesPrice; |
||||
|
} |
||||
|
|
||||
|
public void setSalesPrice(Double salesPrice) { |
||||
|
this.salesPrice = salesPrice; |
||||
|
} |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesDishes; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-11:00 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface CrawlSalesDishesMapper extends BaseMapper<CrawlSalesDishes> { |
||||
|
|
||||
|
List<CrawlSalesDishes> selectSalesDishesList(CrawlSalesDishesDto dto); |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
<?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.dbcenter.zhj.crawl.biz.crawlSalesDishes.CrawlSalesDishesMapper"> |
||||
|
|
||||
|
<select id="selectSalesDishesList" resultType="com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesDishes.CrawlSalesDishes" parameterType="com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesDishes.CrawlSalesDishesDto"> |
||||
|
select d.dishesName,d.unit,d.salesCount,d.salesPrice from crawl_sales_amount a |
||||
|
inner join crawl_sales_dishes d on a.dataDate = d.dataDate |
||||
|
where a.storeName = #{StoreName} and d.dataDate = #{dataDate} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,32 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesDishes; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:56 |
||||
|
*/ |
||||
|
@Api(tags = "抓取的菜品销量数据") |
||||
|
@RestController |
||||
|
@RequestMapping("dbCenter/crawlDishes") |
||||
|
public class CrawlSalesDishesRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private CrawlSalesDishesService crawlSalesDishesService; |
||||
|
|
||||
|
@ApiOperation("新增") |
||||
|
@RequestMapping("/save") |
||||
|
public ResultBean save(@RequestBody CrawlSalesDishesDto dto){ |
||||
|
return crawlSalesDishesService.save(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("查询菜品销量信息") |
||||
|
@RequestMapping("/selectSalesDishes") |
||||
|
public ResultBean selectSalesDishesList(@RequestBody CrawlSalesDishesDto dto){ |
||||
|
return crawlSalesDishesService.selectSalesDishesList(dto); |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesDishes; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-11:00 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class CrawlSalesDishesService extends MybatisBaseService<CrawlSalesDishesMapper, CrawlSalesDishes> { |
||||
|
|
||||
|
@Autowired |
||||
|
private CrawlSalesDishesMapper crawlSalesDishesMapper; |
||||
|
|
||||
|
public ResultBean save(CrawlSalesDishesDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
CrawlSalesDishes dishes = new CrawlSalesDishes(); |
||||
|
BeanUtil.copyProperties(dto,dishes); |
||||
|
int insert = crawlSalesDishesMapper.insert(dishes); |
||||
|
if (insert == 0){ |
||||
|
return rb.setMsg("添加失败"); |
||||
|
} |
||||
|
return rb.success().setMsg("添加成功"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean selectSalesDishesList(CrawlSalesDishesDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
List<CrawlSalesDishes> crawlSalesDishes = crawlSalesDishesMapper.selectSalesDishesList(dto); |
||||
|
if (crawlSalesDishes == null || crawlSalesDishes.size() == 0){ |
||||
|
return rb.setMsg("此门店下没有销售数据"); |
||||
|
} |
||||
|
return rb.success().setData(crawlSalesDishes); |
||||
|
} |
||||
|
} |
@ -0,0 +1,93 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlpurchase; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:34 |
||||
|
*/ |
||||
|
@ApiModel(value = "抓取的采购数据 传输对象") |
||||
|
public class CrawlPurchaseDto implements Dto { |
||||
|
@ApiModelProperty("数据日期") |
||||
|
private String dataDate; |
||||
|
@ApiModelProperty("门店名称") |
||||
|
private String storeName; |
||||
|
@ApiModelProperty("采购日期") |
||||
|
private String purchaseDate; |
||||
|
@ApiModelProperty("物料名称") |
||||
|
private String materialName; |
||||
|
@ApiModelProperty("规格单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("采购数量") |
||||
|
private Double purchaseCount; |
||||
|
@ApiModelProperty("含税单位") |
||||
|
private Double taxPrice; |
||||
|
@ApiModelProperty("采购金额") |
||||
|
private Double purchaseAmount; |
||||
|
|
||||
|
public String getDataDate() { |
||||
|
return dataDate; |
||||
|
} |
||||
|
|
||||
|
public void setDataDate(String dataDate) { |
||||
|
this.dataDate = dataDate; |
||||
|
} |
||||
|
|
||||
|
public String getStoreName() { |
||||
|
return storeName; |
||||
|
} |
||||
|
|
||||
|
public void setStoreName(String storeName) { |
||||
|
this.storeName = storeName; |
||||
|
} |
||||
|
|
||||
|
public String getPurchaseDate() { |
||||
|
return purchaseDate; |
||||
|
} |
||||
|
|
||||
|
public void setPurchaseDate(String purchaseDate) { |
||||
|
this.purchaseDate = purchaseDate; |
||||
|
} |
||||
|
|
||||
|
public String getMaterialName() { |
||||
|
return materialName; |
||||
|
} |
||||
|
|
||||
|
public void setMaterialName(String materialName) { |
||||
|
this.materialName = materialName; |
||||
|
} |
||||
|
|
||||
|
public String getUnit() { |
||||
|
return unit; |
||||
|
} |
||||
|
|
||||
|
public void setUnit(String unit) { |
||||
|
this.unit = unit; |
||||
|
} |
||||
|
|
||||
|
public Double getPurchaseCount() { |
||||
|
return purchaseCount; |
||||
|
} |
||||
|
|
||||
|
public void setPurchaseCount(Double purchaseCount) { |
||||
|
this.purchaseCount = purchaseCount; |
||||
|
} |
||||
|
|
||||
|
public Double getTaxPrice() { |
||||
|
return taxPrice; |
||||
|
} |
||||
|
|
||||
|
public void setTaxPrice(Double taxPrice) { |
||||
|
this.taxPrice = taxPrice; |
||||
|
} |
||||
|
|
||||
|
public Double getPurchaseAmount() { |
||||
|
return purchaseAmount; |
||||
|
} |
||||
|
|
||||
|
public void setPurchaseAmount(Double purchaseAmount) { |
||||
|
this.purchaseAmount = purchaseAmount; |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlpurchase; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:41 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface CrawlPurchaseMapper extends BaseMapper<CrawlPurchase> { |
||||
|
List<CrawlPurchase> selectPurchaseList(CrawlPurchaseDto dto); |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
<?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.dbcenter.zhj.crawl.biz.crawlpurchase.CrawlPurchaseMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="selectPurchaseList" resultType="com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlpurchase.CrawlPurchase" parameterType="com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlpurchase.CrawlPurchase"> |
||||
|
select * from crawl_purchase where storeName = #{storeName} and purchaseDate = #{purchaseDate} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,35 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlpurchase; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount.CrawlSalesAmountDto; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:37 |
||||
|
*/ |
||||
|
@Api(tags = "抓取的采购数据") |
||||
|
@RestController |
||||
|
@RequestMapping("dbCenter/crawlPurchase") |
||||
|
public class CrawlPurchaseRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private CrawlPurchaseService crawlPurchaseService; |
||||
|
|
||||
|
@ApiOperation("新增") |
||||
|
@RequestMapping("/save") |
||||
|
public ResultBean save(@RequestBody CrawlPurchaseDto dto){ |
||||
|
return crawlPurchaseService.save(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("查询采购信息") |
||||
|
@RequestMapping("/selectPurchaseList") |
||||
|
public ResultBean selectPurchaseList(@RequestBody CrawlPurchaseDto dto){ |
||||
|
return crawlPurchaseService.selectPurchaseList(dto); |
||||
|
} |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlpurchase; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import com.yxt.supervise.dbcenter.zhj.crawl.biz.crawlSalesAmount.CrawlSalesAmountDto; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-10:40 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class CrawlPurchaseService extends MybatisBaseService<CrawlPurchaseMapper, CrawlPurchase> { |
||||
|
|
||||
|
@Autowired |
||||
|
private CrawlPurchaseMapper crawlPurchaseMapper; |
||||
|
|
||||
|
public ResultBean save(CrawlPurchaseDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
CrawlPurchase purchase = new CrawlPurchase(); |
||||
|
BeanUtil.copyProperties(dto,purchase); |
||||
|
int insert = crawlPurchaseMapper.insert(purchase); |
||||
|
if (insert == 0){ |
||||
|
return rb.setMsg("添加失败"); |
||||
|
} |
||||
|
return rb.success().setMsg("添加成功"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean selectPurchaseList(CrawlPurchaseDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
List<CrawlPurchase> crawlPurchases = crawlPurchaseMapper.selectPurchaseList(dto); |
||||
|
if (crawlPurchases == null || crawlPurchases.size() == 0){ |
||||
|
return rb.setMsg("该店当天没有采购信息"); |
||||
|
} |
||||
|
return rb.success().setData(crawlPurchases); |
||||
|
} |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.dishesInfo; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-9:35 |
||||
|
*/ |
||||
|
@TableName("dishes_info") |
||||
|
public class DishesInfo extends BaseEntity { |
||||
|
@ApiModelProperty("菜品编码") |
||||
|
private String code; |
||||
|
@ApiModelProperty("菜品名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("规划单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("销售单位") |
||||
|
private Double sellingPrice; |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getUnit() { |
||||
|
return unit; |
||||
|
} |
||||
|
|
||||
|
public void setUnit(String unit) { |
||||
|
this.unit = unit; |
||||
|
} |
||||
|
|
||||
|
public Double getSellingPrice() { |
||||
|
return sellingPrice; |
||||
|
} |
||||
|
|
||||
|
public void setSellingPrice(Double sellingPrice) { |
||||
|
this.sellingPrice = sellingPrice; |
||||
|
} |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.dishesInfo; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-15:20 |
||||
|
*/ |
||||
|
@ApiModel(value = "菜品信息 传输对象") |
||||
|
public class DishesInfoDto implements Dto { |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty("菜品编码") |
||||
|
private String code; |
||||
|
@ApiModelProperty("菜品名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("规格单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("销售单位") |
||||
|
private Double sellingPrice; |
||||
|
@ApiModelProperty("备注") |
||||
|
private String remarks; |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getSid() { |
||||
|
return sid; |
||||
|
} |
||||
|
|
||||
|
public void setSid(String sid) { |
||||
|
this.sid = sid; |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getUnit() { |
||||
|
return unit; |
||||
|
} |
||||
|
|
||||
|
public void setUnit(String unit) { |
||||
|
this.unit = unit; |
||||
|
} |
||||
|
|
||||
|
public Double getSellingPrice() { |
||||
|
return sellingPrice; |
||||
|
} |
||||
|
|
||||
|
public void setSellingPrice(Double sellingPrice) { |
||||
|
this.sellingPrice = sellingPrice; |
||||
|
} |
||||
|
|
||||
|
public String getRemarks() { |
||||
|
return remarks; |
||||
|
} |
||||
|
|
||||
|
public void setRemarks(String remarks) { |
||||
|
this.remarks = remarks; |
||||
|
} |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.dishesInfo; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-15:27 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface DishesInfoMapper extends BaseMapper<DishesInfo> { |
||||
|
List<DishesInfo> selectDishesInfoList(); |
||||
|
} |
@ -0,0 +1,7 @@ |
|||||
|
<?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.dbcenter.zhj.crawl.biz.dishesInfo.DishesInfoMapper"> |
||||
|
<select id="selectDishesInfoList" resultType="com.yxt.supervise.dbcenter.zhj.crawl.biz.dishesInfo.DishesInfo"> |
||||
|
select * from dishes_info |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,48 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.dishesInfo; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-15:18 |
||||
|
*/ |
||||
|
@Api("菜品信息") |
||||
|
@RestController |
||||
|
@RequestMapping("dbCenter/dishesInfo") |
||||
|
public class DishesInfoRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private DishesInfoService dishesInfoService; |
||||
|
|
||||
|
@ApiOperation("新增菜品") |
||||
|
@RequestMapping("/save") |
||||
|
public ResultBean save(@RequestBody DishesInfoDto dto){ |
||||
|
return dishesInfoService.save(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("修改菜品") |
||||
|
@RequestMapping("/alterDishesInfo") |
||||
|
public ResultBean alterDishesInfo(@RequestBody DishesInfoDto dto){ |
||||
|
return dishesInfoService.alterDishesInfo(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("删除菜品") |
||||
|
@RequestMapping("/deleteDishesInfo/{sid}") |
||||
|
public ResultBean deleteDishesInfo(@PathVariable String sid){ |
||||
|
return dishesInfoService.deleteDishesInfo(sid); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("查询现在所有菜品") |
||||
|
@RequestMapping("/selectDishesInfoList") |
||||
|
public ResultBean selectDishesInfoList(){ |
||||
|
return dishesInfoService.selectDishesInfoList(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.dishesInfo; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-15:27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DishesInfoService extends MybatisBaseService<DishesInfoMapper, DishesInfo> { |
||||
|
|
||||
|
@Autowired |
||||
|
private DishesInfoMapper dishesInfoMapper; |
||||
|
|
||||
|
public ResultBean save(DishesInfoDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
DishesInfo info = new DishesInfo(); |
||||
|
BeanUtil.copyProperties(dto,info,"id","sid"); |
||||
|
int insert = dishesInfoMapper.insert(info); |
||||
|
if (insert == 0){ |
||||
|
return rb.setMsg("添加失败"); |
||||
|
} |
||||
|
return rb.success().setMsg("添加成功"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean alterDishesInfo(DishesInfoDto dto){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
String sid = dto.getSid(); |
||||
|
DishesInfo dishesInfo = fetchBySid(sid); |
||||
|
BeanUtil.copyProperties(dto,dishesInfo,"id","sid"); |
||||
|
int i = dishesInfoMapper.updateById(dishesInfo); |
||||
|
if (i == 0){ |
||||
|
return rb.setMsg("修改失败"); |
||||
|
} |
||||
|
return rb.success().setMsg("修改成功"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean deleteDishesInfo(String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
int delete = dishesInfoMapper.delete(new QueryWrapper<DishesInfo>().eq("sid", sid)); |
||||
|
if (delete == 0){ |
||||
|
return rb.setMsg("删除失败"); |
||||
|
} |
||||
|
return rb.success().setMsg("删除成功"); |
||||
|
} |
||||
|
|
||||
|
public ResultBean selectDishesInfoList(){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
List<DishesInfo> dishesInfos = dishesInfoMapper.selectDishesInfoList(); |
||||
|
return rb.success().setData(dishesInfos); |
||||
|
} |
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpBrand; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-9:39 |
||||
|
*/ |
||||
|
@TableName("enp_brand") |
||||
|
public class EnpBrand extends BaseEntity { |
||||
|
@ApiModelProperty("品牌编码") |
||||
|
private String code; |
||||
|
@ApiModelProperty("品牌名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("所属企业Sid") |
||||
|
private String enpSid; |
||||
|
@ApiModelProperty("所属企业编码") |
||||
|
private String enpCode; |
||||
|
@ApiModelProperty("所属企业名称") |
||||
|
private String enpName; |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getEnpSid() { |
||||
|
return enpSid; |
||||
|
} |
||||
|
|
||||
|
public void setEnpSid(String enpSid) { |
||||
|
this.enpSid = enpSid; |
||||
|
} |
||||
|
|
||||
|
public String getEnpCode() { |
||||
|
return enpCode; |
||||
|
} |
||||
|
|
||||
|
public void setEnpCode(String enpCode) { |
||||
|
this.enpCode = enpCode; |
||||
|
} |
||||
|
|
||||
|
public String getEnpName() { |
||||
|
return enpName; |
||||
|
} |
||||
|
|
||||
|
public void setEnpName(String enpName) { |
||||
|
this.enpName = enpName; |
||||
|
} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpInfo; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-9:45 |
||||
|
*/ |
||||
|
@TableName("enp_info") |
||||
|
public class EnpInfo extends BaseEntity { |
||||
|
@ApiModelProperty("企业名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("企业编码") |
||||
|
private String code; |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
} |
@ -0,0 +1,62 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpInfo; |
||||
|
|
||||
|
import com.yxt.common.core.dto.Dto; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-15:57 |
||||
|
*/ |
||||
|
@ApiModel("企业/集团信息 传输对象") |
||||
|
public class EnpInfoDto implements Dto { |
||||
|
private String id; |
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty("企业名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("企业编码") |
||||
|
private String code; |
||||
|
@ApiModelProperty("备注") |
||||
|
private String remarks; |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getSid() { |
||||
|
return sid; |
||||
|
} |
||||
|
|
||||
|
public void setSid(String sid) { |
||||
|
this.sid = sid; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getRemarks() { |
||||
|
return remarks; |
||||
|
} |
||||
|
|
||||
|
public void setRemarks(String remarks) { |
||||
|
this.remarks = remarks; |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpInfo; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-16:17 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface EnpInfoMapper extends BaseMapper<EnpInfo> { |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpInfo; |
||||
|
|
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-16:01 |
||||
|
*/ |
||||
|
@Api("企业/集团信息") |
||||
|
@RestController |
||||
|
@RequestMapping("dbCenter/enpInfo") |
||||
|
public class EnpInfoRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private EnpInfoService enpInfoService; |
||||
|
|
||||
|
@ApiOperation("新增企业") |
||||
|
@RequestMapping("/save") |
||||
|
public ResultBean save(@RequestBody EnpInfoDto enpInfoDto){ |
||||
|
return enpInfoService.save(enpInfoDto); |
||||
|
} |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpInfo; |
||||
|
|
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-16:14 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class EnpInfoService extends MybatisBaseService<EnpInfoMapper, EnpInfo>{ |
||||
|
|
||||
|
public ResultBean save(EnpInfoDto enpInfoDto){ |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -0,0 +1,93 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.enpStore; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-9:46 |
||||
|
*/ |
||||
|
@TableName("enp_store") |
||||
|
public class EnpStore extends BaseEntity { |
||||
|
@ApiModelProperty("门店编码") |
||||
|
private String code; |
||||
|
@ApiModelProperty("门店名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("所属企业Sid") |
||||
|
private String enpSid; |
||||
|
@ApiModelProperty("所属企业编码") |
||||
|
private String enpCode; |
||||
|
@ApiModelProperty("所属企业名称") |
||||
|
private String enpName; |
||||
|
@ApiModelProperty("所属品牌Sid") |
||||
|
private String brandSid; |
||||
|
@ApiModelProperty("所属品牌编码") |
||||
|
private String brandCode; |
||||
|
@ApiModelProperty("所属品牌名称") |
||||
|
private String brandName; |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getEnpSid() { |
||||
|
return enpSid; |
||||
|
} |
||||
|
|
||||
|
public void setEnpSid(String enpSid) { |
||||
|
this.enpSid = enpSid; |
||||
|
} |
||||
|
|
||||
|
public String getEnpCode() { |
||||
|
return enpCode; |
||||
|
} |
||||
|
|
||||
|
public void setEnpCode(String enpCode) { |
||||
|
this.enpCode = enpCode; |
||||
|
} |
||||
|
|
||||
|
public String getEnpName() { |
||||
|
return enpName; |
||||
|
} |
||||
|
|
||||
|
public void setEnpName(String enpName) { |
||||
|
this.enpName = enpName; |
||||
|
} |
||||
|
|
||||
|
public String getBrandSid() { |
||||
|
return brandSid; |
||||
|
} |
||||
|
|
||||
|
public void setBrandSid(String brandSid) { |
||||
|
this.brandSid = brandSid; |
||||
|
} |
||||
|
|
||||
|
public String getBrandCode() { |
||||
|
return brandCode; |
||||
|
} |
||||
|
|
||||
|
public void setBrandCode(String brandCode) { |
||||
|
this.brandCode = brandCode; |
||||
|
} |
||||
|
|
||||
|
public String getBrandName() { |
||||
|
return brandName; |
||||
|
} |
||||
|
|
||||
|
public void setBrandName(String brandName) { |
||||
|
this.brandName = brandName; |
||||
|
} |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.yxt.supervise.dbcenter.zhj.crawl.biz.materialInfo; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.yxt.common.core.domain.BaseEntity; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
|
||||
|
/** |
||||
|
* @author shkstart |
||||
|
* @create 2023-05-09-9:50 |
||||
|
*/ |
||||
|
@TableName("material_info") |
||||
|
public class MaterialInfo extends BaseEntity { |
||||
|
@ApiModelProperty("物料编码") |
||||
|
private String code; |
||||
|
@ApiModelProperty("物料名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("规格单位") |
||||
|
private String unit; |
||||
|
@ApiModelProperty("含税单位") |
||||
|
private String taxPrice; |
||||
|
} |
Loading…
Reference in new issue