소스 검색

[add] 结算模板初始化

BKGin 6 달 전
부모
커밋
c5415e271e

+ 1 - 0
.gitignore

@@ -18,6 +18,7 @@ target/
 *.iws
 *.iml
 *.ipr
+/logs/
 
 ### NetBeans ###
 /nbproject/private/

+ 116 - 0
yiqi-admin/src/main/java/com/yiqi/admin/controller/settlement/SettlementFactoryRateController.java

@@ -0,0 +1,116 @@
+package com.yiqi.admin.controller.settlement;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import com.yiqi.common.constant.UrlConstants;
+import com.yiqi.settlement.domain.SettlementFactoryRate;
+import com.yiqi.settlement.service.ISettlementFactoryRateService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+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;
+import com.yiqi.common.annotation.Log;
+import com.yiqi.common.core.controller.BaseController;
+import com.yiqi.common.core.domain.AjaxResult;
+import com.yiqi.common.enums.BusinessType;
+import com.yiqi.common.utils.poi.ExcelUtil;
+import com.yiqi.common.core.page.TableDataInfo;
+
+/**
+ * 门店结算费率配置Controller
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+@Api(tags = "管理后台 - 门店结算费率配置")
+@RestController
+@RequestMapping(UrlConstants.managerApi + "/settlement/factory/rate")
+public class SettlementFactoryRateController extends BaseController {
+    @Autowired
+    private ISettlementFactoryRateService settlementFactoryRateService;
+
+
+    //<editor-folder desc="基础函数">
+/**
+ * 查询门店结算费率配置列表
+ */
+@PreAuthorize("@ss.hasPermi('system:rate:list')")
+@GetMapping("/list")
+    @ApiOperation(value = "查询门店结算费率配置列表")
+    public TableDataInfo list(SettlementFactoryRate settlementFactoryRate) {
+        startPage();
+        List<SettlementFactoryRate> list = settlementFactoryRateService.selectSettlementFactoryRateList(settlementFactoryRate);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出门店结算费率配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:export')")
+    @Log(title = "门店结算费率配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出门店结算费率配置列表")
+    public void export(HttpServletResponse response, SettlementFactoryRate settlementFactoryRate) {
+        List<SettlementFactoryRate> list = settlementFactoryRateService.selectSettlementFactoryRateList(settlementFactoryRate);
+        ExcelUtil<SettlementFactoryRate> util = new ExcelUtil<SettlementFactoryRate>(SettlementFactoryRate. class);
+        util.exportExcel(response, list, "门店结算费率配置数据");
+    }
+
+    /**
+     * 获取门店结算费率配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取门店结算费率配置详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(settlementFactoryRateService.selectSettlementFactoryRateById(id));
+    }
+
+    /**
+     * 新增门店结算费率配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:add')")
+    @Log(title = "门店结算费率配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增门店结算费率配置")
+    public AjaxResult add(@RequestBody SettlementFactoryRate settlementFactoryRate) {
+        settlementFactoryRate.setCreateById(getUserId());
+        settlementFactoryRate.setCreateBy(getUsername());
+        return toAjax(settlementFactoryRateService.insertSettlementFactoryRate(settlementFactoryRate));
+    }
+
+    /**
+     * 修改门店结算费率配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:edit')")
+    @Log(title = "门店结算费率配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改门店结算费率配置")
+    public AjaxResult edit(@RequestBody SettlementFactoryRate settlementFactoryRate) {
+        settlementFactoryRate.setUpdateById(getUserId());
+        settlementFactoryRate.setUpdateBy(getUsername());
+        return toAjax(settlementFactoryRateService.updateSettlementFactoryRate(settlementFactoryRate));
+    }
+
+    /**
+     * 删除门店结算费率配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:remove')")
+    @Log(title = "门店结算费率配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除门店结算费率配置")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(settlementFactoryRateService.deleteSettlementFactoryRateByIds(ids));
+    }
+
+
+    //</editor-folder>
+}

+ 116 - 0
yiqi-admin/src/main/java/com/yiqi/admin/controller/settlement/SettlementStoreRateController.java

@@ -0,0 +1,116 @@
+package com.yiqi.admin.controller.settlement;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import com.yiqi.common.constant.UrlConstants;
+import com.yiqi.settlement.domain.SettlementStoreRate;
+import com.yiqi.settlement.service.ISettlementStoreRateService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+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;
+import com.yiqi.common.annotation.Log;
+import com.yiqi.common.core.controller.BaseController;
+import com.yiqi.common.core.domain.AjaxResult;
+import com.yiqi.common.enums.BusinessType;
+import com.yiqi.common.utils.poi.ExcelUtil;
+import com.yiqi.common.core.page.TableDataInfo;
+
+/**
+ * 门店结算费率配置Controller
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+@Api(tags = "管理后台 - 门店结算费率配置")
+@RestController
+@RequestMapping(UrlConstants.managerApi + "/settlement/store/rate")
+public class SettlementStoreRateController extends BaseController {
+    @Autowired
+    private ISettlementStoreRateService settlementStoreRateService;
+
+
+    //<editor-folder desc="基础函数">
+/**
+ * 查询门店结算费率配置列表
+ */
+@PreAuthorize("@ss.hasPermi('system:rate:list')")
+@GetMapping("/list")
+    @ApiOperation(value = "查询门店结算费率配置列表")
+    public TableDataInfo list(SettlementStoreRate settlementStoreRate) {
+        startPage();
+        List<SettlementStoreRate> list = settlementStoreRateService.selectSettlementStoreRateList(settlementStoreRate);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出门店结算费率配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:export')")
+    @Log(title = "门店结算费率配置", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出门店结算费率配置列表")
+    public void export(HttpServletResponse response, SettlementStoreRate settlementStoreRate) {
+        List<SettlementStoreRate> list = settlementStoreRateService.selectSettlementStoreRateList(settlementStoreRate);
+        ExcelUtil<SettlementStoreRate> util = new ExcelUtil<SettlementStoreRate>(SettlementStoreRate. class);
+        util.exportExcel(response, list, "门店结算费率配置数据");
+    }
+
+    /**
+     * 获取门店结算费率配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取门店结算费率配置详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(settlementStoreRateService.selectSettlementStoreRateById(id));
+    }
+
+    /**
+     * 新增门店结算费率配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:add')")
+    @Log(title = "门店结算费率配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增门店结算费率配置")
+    public AjaxResult add(@RequestBody SettlementStoreRate settlementStoreRate) {
+        settlementStoreRate.setCreateById(getUserId());
+        settlementStoreRate.setCreateBy(getUsername());
+        return toAjax(settlementStoreRateService.insertSettlementStoreRate(settlementStoreRate));
+    }
+
+    /**
+     * 修改门店结算费率配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:edit')")
+    @Log(title = "门店结算费率配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改门店结算费率配置")
+    public AjaxResult edit(@RequestBody SettlementStoreRate settlementStoreRate) {
+        settlementStoreRate.setUpdateById(getUserId());
+        settlementStoreRate.setUpdateBy(getUsername());
+        return toAjax(settlementStoreRateService.updateSettlementStoreRate(settlementStoreRate));
+    }
+
+    /**
+     * 删除门店结算费率配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:rate:remove')")
+    @Log(title = "门店结算费率配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除门店结算费率配置")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(settlementStoreRateService.deleteSettlementStoreRateByIds(ids));
+    }
+
+
+    //</editor-folder>
+}

+ 84 - 0
yiqi-common/src/main/java/com/yiqi/settlement/domain/SettlementFactoryRate.java

@@ -0,0 +1,84 @@
+package com.yiqi.settlement.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.yiqi.common.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.yiqi.common.core.domain.BaseEntity;
+import lombok.Data;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+
+/**
+ * 门店结算费率配置对象 settlement_factory_rate
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+@ApiModel("门店结算费率配置")
+@TableName("settlement_factory_rate")
+@Data
+public class SettlementFactoryRate extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @ApiModelProperty("主键ID")
+    @TableId(type = IdType.AUTO)
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    /**
+     * 工厂ID
+     */
+    @Excel(name = "工厂ID")
+    @ApiModelProperty("工厂ID")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long factoryId;
+
+    /**
+     * 材料费率
+     */
+    @Excel(name = "材料费率")
+    @ApiModelProperty("材料费率")
+    private BigDecimal materialRate;
+
+    /**
+     * 系统管理费率
+     */
+    @Excel(name = "系统管理费率")
+    @ApiModelProperty("系统管理费率")
+    private BigDecimal managementRate;
+
+    /**
+     * 押金费率
+     */
+    @Excel(name = "押金费率")
+    @ApiModelProperty("押金费率")
+    private BigDecimal depositRate;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty("开始时间")
+    private Date startDate;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty("结束时间")
+    private Date endDate;
+
+
+}

+ 133 - 0
yiqi-common/src/main/java/com/yiqi/settlement/domain/SettlementStoreRate.java

@@ -0,0 +1,133 @@
+package com.yiqi.settlement.domain;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.yiqi.common.annotation.Excel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.yiqi.common.core.domain.BaseEntity;
+import lombok.Data;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+
+/**
+ * 门店结算费率配置对象 settlement_store_rate
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+@ApiModel("门店结算费率配置")
+@TableName("settlement_store_rate")
+@Data
+public class SettlementStoreRate extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @ApiModelProperty("主键ID")
+    @TableId(type = IdType.AUTO)
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long id;
+
+    /**
+     * 门店ID
+     */
+    @Excel(name = "门店ID")
+    @ApiModelProperty("门店ID")
+    @JsonSerialize(using = ToStringSerializer.class)
+    private Long storeId;
+
+    /**
+     * 工厂结算费率
+     */
+    @Excel(name = "工厂结算费率")
+    @ApiModelProperty("工厂结算费率")
+    private BigDecimal factoryRate;
+
+    /**
+     * 材料费率
+     */
+    @Excel(name = "材料费率")
+    @ApiModelProperty("材料费率")
+    private BigDecimal materialRate;
+
+    /**
+     * 会员卡押金费率
+     */
+    @Excel(name = "会员卡押金费率")
+    @ApiModelProperty("会员卡押金费率")
+    private BigDecimal cardDepositRate;
+
+    /**
+     * 福利押金费率
+     */
+    @Excel(name = "福利押金费率")
+    @ApiModelProperty("福利押金费率")
+    private BigDecimal welfareDepositRate;
+
+    /**
+     * 卡密押金费率
+     */
+    @Excel(name = "卡密押金费率")
+    @ApiModelProperty("卡密押金费率")
+    private BigDecimal passwordDepositRate;
+
+    /**
+     * 异店消费费率
+     */
+    @Excel(name = "异店消费费率")
+    @ApiModelProperty("异店消费费率")
+    private BigDecimal otherConsumeRate;
+
+    /**
+     * 支付宝支付费率
+     */
+    @Excel(name = "支付宝支付费率")
+    @ApiModelProperty("支付宝支付费率")
+    private BigDecimal aliPayRate;
+
+    /**
+     * 微信支付费率
+     */
+    @Excel(name = "微信支付费率")
+    @ApiModelProperty("微信支付费率")
+    private BigDecimal wxPayRate;
+
+    /**
+     * 系统管理费率
+     */
+    @Excel(name = "系统管理费率")
+    @ApiModelProperty("系统管理费率")
+    private BigDecimal managementRate;
+
+    /**
+     * 洗衣费率
+     */
+    @Excel(name = "洗衣费率")
+    @ApiModelProperty("洗衣费率")
+    private BigDecimal washRate;
+
+    /**
+     * 开始时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty("开始时间")
+    private Date startDate;
+
+    /**
+     * 结束时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty("结束时间")
+    private Date endDate;
+
+
+}

+ 68 - 0
yiqi-common/src/main/java/com/yiqi/settlement/service/ISettlementFactoryRateService.java

@@ -0,0 +1,68 @@
+package com.yiqi.settlement.service;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yiqi.settlement.domain.SettlementFactoryRate;
+
+/**
+ * 门店结算费率配置Service接口
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+public interface ISettlementFactoryRateService extends IService<SettlementFactoryRate> {
+
+    //<editor-folder desc="基础函数">
+
+    /**
+     * 查询门店结算费率配置
+     *
+     * @param id 门店结算费率配置主键
+     * @return 门店结算费率配置
+     */
+    public SettlementFactoryRate selectSettlementFactoryRateById(Long id);
+
+    /**
+     * 查询门店结算费率配置列表
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 门店结算费率配置集合
+     */
+    public List<SettlementFactoryRate> selectSettlementFactoryRateList(SettlementFactoryRate settlementFactoryRate);
+
+    /**
+     * 新增门店结算费率配置
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 结果
+     */
+    public int insertSettlementFactoryRate(SettlementFactoryRate settlementFactoryRate);
+
+    /**
+     * 修改门店结算费率配置
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 结果
+     */
+    public int updateSettlementFactoryRate(SettlementFactoryRate settlementFactoryRate);
+
+    /**
+     * 批量删除门店结算费率配置
+     *
+     * @param ids 需要删除的门店结算费率配置主键集合
+     * @return 结果
+     */
+    public int deleteSettlementFactoryRateByIds(Long[] ids);
+
+    /**
+     * 删除门店结算费率配置信息
+     *
+     * @param id 门店结算费率配置主键
+     * @return 结果
+     */
+    public int deleteSettlementFactoryRateById(Long id);
+
+
+    //</editor-folder>
+}

+ 66 - 0
yiqi-common/src/main/java/com/yiqi/settlement/service/ISettlementStoreRateService.java

@@ -0,0 +1,66 @@
+package com.yiqi.settlement.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yiqi.settlement.domain.SettlementStoreRate;
+
+/**
+ * 门店结算费率配置Service接口
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+public interface ISettlementStoreRateService extends IService<SettlementStoreRate> {
+
+    //<editor-folder desc="基础函数">
+    /**
+     * 查询门店结算费率配置
+     *
+     * @param id 门店结算费率配置主键
+     * @return 门店结算费率配置
+     */
+    public SettlementStoreRate selectSettlementStoreRateById(Long id);
+
+    /**
+     * 查询门店结算费率配置列表
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 门店结算费率配置集合
+     */
+    public List<SettlementStoreRate> selectSettlementStoreRateList(SettlementStoreRate settlementStoreRate);
+
+    /**
+     * 新增门店结算费率配置
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 结果
+     */
+    public int insertSettlementStoreRate(SettlementStoreRate settlementStoreRate);
+
+    /**
+     * 修改门店结算费率配置
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 结果
+     */
+    public int updateSettlementStoreRate(SettlementStoreRate settlementStoreRate);
+
+    /**
+     * 批量删除门店结算费率配置
+     *
+     * @param ids 需要删除的门店结算费率配置主键集合
+     * @return 结果
+     */
+    public int deleteSettlementStoreRateByIds(Long[] ids);
+
+    /**
+     * 删除门店结算费率配置信息
+     *
+     * @param id 门店结算费率配置主键
+     * @return 结果
+     */
+    public int deleteSettlementStoreRateById(Long id);
+
+
+    //</editor-folder>
+}

+ 67 - 0
yiqi-core/src/main/java/com/yiqi/settlement/mapper/SettlementFactoryRateMapper.java

@@ -0,0 +1,67 @@
+package com.yiqi.settlement.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yiqi.settlement.domain.SettlementFactoryRate;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 门店结算费率配置Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+@Mapper
+public interface SettlementFactoryRateMapper extends BaseMapper<SettlementFactoryRate> {
+    //<editor-folder desc="基础韩素">
+
+    /**
+     * 查询门店结算费率配置
+     *
+     * @param id 门店结算费率配置主键
+     * @return 门店结算费率配置
+     */
+    public SettlementFactoryRate selectSettlementFactoryRateById(Long id);
+
+    /**
+     * 查询门店结算费率配置列表
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 门店结算费率配置集合
+     */
+    public List<SettlementFactoryRate> selectSettlementFactoryRateList(SettlementFactoryRate settlementFactoryRate);
+
+    /**
+     * 新增门店结算费率配置
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 结果
+     */
+    public int insertSettlementFactoryRate(SettlementFactoryRate settlementFactoryRate);
+
+    /**
+     * 修改门店结算费率配置
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 结果
+     */
+    public int updateSettlementFactoryRate(SettlementFactoryRate settlementFactoryRate);
+
+    /**
+     * 删除门店结算费率配置
+     *
+     * @param id 门店结算费率配置主键
+     * @return 结果
+     */
+    public int deleteSettlementFactoryRateById(Long id);
+
+    /**
+     * 批量删除门店结算费率配置
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSettlementFactoryRateByIds(Long[] ids);
+    //</editor-folder>
+}

+ 67 - 0
yiqi-core/src/main/java/com/yiqi/settlement/mapper/SettlementStoreRateMapper.java

@@ -0,0 +1,67 @@
+package com.yiqi.settlement.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yiqi.settlement.domain.SettlementStoreRate;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 门店结算费率配置Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+@Mapper
+public interface SettlementStoreRateMapper extends BaseMapper<SettlementStoreRate> {
+    //<editor-folder desc="基础韩素">
+
+    /**
+     * 查询门店结算费率配置
+     *
+     * @param id 门店结算费率配置主键
+     * @return 门店结算费率配置
+     */
+    public SettlementStoreRate selectSettlementStoreRateById(Long id);
+
+    /**
+     * 查询门店结算费率配置列表
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 门店结算费率配置集合
+     */
+    public List<SettlementStoreRate> selectSettlementStoreRateList(SettlementStoreRate settlementStoreRate);
+
+    /**
+     * 新增门店结算费率配置
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 结果
+     */
+    public int insertSettlementStoreRate(SettlementStoreRate settlementStoreRate);
+
+    /**
+     * 修改门店结算费率配置
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 结果
+     */
+    public int updateSettlementStoreRate(SettlementStoreRate settlementStoreRate);
+
+    /**
+     * 删除门店结算费率配置
+     *
+     * @param id 门店结算费率配置主键
+     * @return 结果
+     */
+    public int deleteSettlementStoreRateById(Long id);
+
+    /**
+     * 批量删除门店结算费率配置
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSettlementStoreRateByIds(Long[] ids);
+    //</editor-folder>
+}

+ 97 - 0
yiqi-core/src/main/java/com/yiqi/settlement/service/impl/SettlementFactoryRateServiceImpl.java

@@ -0,0 +1,97 @@
+package com.yiqi.settlement.service.impl;
+
+import java.util.List;
+
+import com.yiqi.common.utils.DateUtils;
+import com.yiqi.common.utils.SecurityUtils;
+import com.yiqi.settlement.domain.SettlementFactoryRate;
+import com.yiqi.settlement.mapper.SettlementFactoryRateMapper;
+import com.yiqi.settlement.service.ISettlementFactoryRateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * 门店结算费率配置Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+@Service
+public class SettlementFactoryRateServiceImpl extends ServiceImpl<SettlementFactoryRateMapper, SettlementFactoryRate> implements ISettlementFactoryRateService {
+
+    //<editor-folder desc="基础韩素">
+
+    /**
+     * 查询门店结算费率配置
+     *
+     * @param id 门店结算费率配置主键
+     * @return 门店结算费率配置
+     */
+    @Override
+    public SettlementFactoryRate selectSettlementFactoryRateById(Long id) {
+        return baseMapper.selectSettlementFactoryRateById(id);
+    }
+
+    /**
+     * 查询门店结算费率配置列表
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 门店结算费率配置
+     */
+    @Override
+    public List<SettlementFactoryRate> selectSettlementFactoryRateList(SettlementFactoryRate settlementFactoryRate) {
+        return baseMapper.selectSettlementFactoryRateList(settlementFactoryRate);
+    }
+
+    /**
+     * 新增门店结算费率配置
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 结果
+     */
+    @Override
+    public int insertSettlementFactoryRate(SettlementFactoryRate settlementFactoryRate) {
+        settlementFactoryRate.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertSettlementFactoryRate(settlementFactoryRate);
+    }
+
+    /**
+     * 修改门店结算费率配置
+     *
+     * @param settlementFactoryRate 门店结算费率配置
+     * @return 结果
+     */
+    @Override
+    public int updateSettlementFactoryRate(SettlementFactoryRate settlementFactoryRate) {
+        settlementFactoryRate.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateSettlementFactoryRate(settlementFactoryRate);
+    }
+
+    /**
+     * 批量删除门店结算费率配置
+     *
+     * @param ids 需要删除的门店结算费率配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSettlementFactoryRateByIds(Long[] ids) {
+        return baseMapper.deleteSettlementFactoryRateByIds(ids);
+    }
+
+    /**
+     * 删除门店结算费率配置信息
+     *
+     * @param id 门店结算费率配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSettlementFactoryRateById(Long id) {
+        return baseMapper.deleteSettlementFactoryRateById(id);
+    }
+
+
+    //</editor-folder>
+
+}

+ 97 - 0
yiqi-core/src/main/java/com/yiqi/settlement/service/impl/SettlementStoreRateServiceImpl.java

@@ -0,0 +1,97 @@
+package com.yiqi.settlement.service.impl;
+
+import java.util.List;
+
+import com.yiqi.common.utils.DateUtils;
+import com.yiqi.common.utils.SecurityUtils;
+import com.yiqi.settlement.domain.SettlementStoreRate;
+import com.yiqi.settlement.mapper.SettlementStoreRateMapper;
+import com.yiqi.settlement.service.ISettlementStoreRateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * 门店结算费率配置Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-09-03
+ */
+@Service
+public class SettlementStoreRateServiceImpl extends ServiceImpl<SettlementStoreRateMapper, SettlementStoreRate> implements ISettlementStoreRateService {
+
+    //<editor-folder desc="基础韩素">
+
+    /**
+     * 查询门店结算费率配置
+     *
+     * @param id 门店结算费率配置主键
+     * @return 门店结算费率配置
+     */
+    @Override
+    public SettlementStoreRate selectSettlementStoreRateById(Long id) {
+        return baseMapper.selectSettlementStoreRateById(id);
+    }
+
+    /**
+     * 查询门店结算费率配置列表
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 门店结算费率配置
+     */
+    @Override
+    public List<SettlementStoreRate> selectSettlementStoreRateList(SettlementStoreRate settlementStoreRate) {
+        return baseMapper.selectSettlementStoreRateList(settlementStoreRate);
+    }
+
+    /**
+     * 新增门店结算费率配置
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 结果
+     */
+    @Override
+    public int insertSettlementStoreRate(SettlementStoreRate settlementStoreRate) {
+        settlementStoreRate.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertSettlementStoreRate(settlementStoreRate);
+    }
+
+    /**
+     * 修改门店结算费率配置
+     *
+     * @param settlementStoreRate 门店结算费率配置
+     * @return 结果
+     */
+    @Override
+    public int updateSettlementStoreRate(SettlementStoreRate settlementStoreRate) {
+        settlementStoreRate.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateSettlementStoreRate(settlementStoreRate);
+    }
+
+    /**
+     * 批量删除门店结算费率配置
+     *
+     * @param ids 需要删除的门店结算费率配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSettlementStoreRateByIds(Long[] ids) {
+        return baseMapper.deleteSettlementStoreRateByIds(ids);
+    }
+
+    /**
+     * 删除门店结算费率配置信息
+     *
+     * @param id 门店结算费率配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSettlementStoreRateById(Long id) {
+        return baseMapper.deleteSettlementStoreRateById(id);
+    }
+
+
+    //</editor-folder>
+
+}

+ 194 - 0
yiqi-core/src/main/resources/mapper/settlement/SettlementFactoryRateMapper.xml

@@ -0,0 +1,194 @@
+<?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.yiqi.settlement.mapper.SettlementFactoryRateMapper">
+
+    <resultMap type="SettlementFactoryRate" id="SettlementFactoryRateResult">
+        <result property="id" column="id"/>
+        <result property="factoryId" column="factory_id"/>
+        <result property="materialRate" column="material_rate"/>
+        <result property="managementRate" column="management_rate"/>
+        <result property="depositRate" column="deposit_rate"/>
+        <result property="startDate" column="start_date"/>
+        <result property="endDate" column="end_date"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateById" column="update_by_id"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+
+    <sql id="selectSettlementFactoryRateVo">
+        select id,
+               factory_id,
+               material_rate,
+               management_rate,
+               deposit_rate,
+               start_date,
+               end_date,
+               create_by_id,
+               create_by,
+               create_time,
+               update_by_id,
+               update_by,
+               update_time,
+               remark
+        from settlement_factory_rate
+    </sql>
+
+    <select id="selectSettlementFactoryRateList" parameterType="SettlementFactoryRate"
+            resultMap="SettlementFactoryRateResult">
+        <include refid="selectSettlementFactoryRateVo"/>
+        <where>
+            <if test="factoryId != null ">
+                and factory_id = #{factoryId}
+            </if>
+            <if test="materialRate != null ">
+                and material_rate = #{materialRate}
+            </if>
+            <if test="managementRate != null ">
+                and management_rate = #{managementRate}
+            </if>
+            <if test="depositRate != null ">
+                and deposit_rate = #{depositRate}
+            </if>
+            <if test="startDate != null ">
+                and start_date = #{startDate}
+            </if>
+            <if test="endDate != null ">
+                and end_date = #{endDate}
+            </if>
+        </where>
+    </select>
+
+    <select id="selectSettlementFactoryRateById" parameterType="Long"
+            resultMap="SettlementFactoryRateResult">
+        <include refid="selectSettlementFactoryRateVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertSettlementFactoryRate" parameterType="SettlementFactoryRate" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into settlement_factory_rate
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="factoryId != null">factory_id,
+            </if>
+            <if test="materialRate != null">material_rate,
+            </if>
+            <if test="managementRate != null">management_rate,
+            </if>
+            <if test="depositRate != null">deposit_rate,
+            </if>
+            <if test="startDate != null">start_date,
+            </if>
+            <if test="endDate != null">end_date,
+            </if>
+            <if test="createById != null">create_by_id,
+            </if>
+            <if test="createBy != null">create_by,
+            </if>
+            <if test="createTime != null">create_time,
+            </if>
+            <if test="updateById != null">update_by_id,
+            </if>
+            <if test="updateBy != null">update_by,
+            </if>
+            <if test="updateTime != null">update_time,
+            </if>
+            <if test="remark != null">remark,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="factoryId != null">#{factoryId},
+            </if>
+            <if test="materialRate != null">#{materialRate},
+            </if>
+            <if test="managementRate != null">#{managementRate},
+            </if>
+            <if test="depositRate != null">#{depositRate},
+            </if>
+            <if test="startDate != null">#{startDate},
+            </if>
+            <if test="endDate != null">#{endDate},
+            </if>
+            <if test="createById != null">#{createById},
+            </if>
+            <if test="createBy != null">#{createBy},
+            </if>
+            <if test="createTime != null">#{createTime},
+            </if>
+            <if test="updateById != null">#{updateById},
+            </if>
+            <if test="updateBy != null">#{updateBy},
+            </if>
+            <if test="updateTime != null">#{updateTime},
+            </if>
+            <if test="remark != null">#{remark},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateSettlementFactoryRate" parameterType="SettlementFactoryRate">
+        update settlement_factory_rate
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="factoryId != null">factory_id =
+                #{factoryId},
+            </if>
+            <if test="materialRate != null">material_rate =
+                #{materialRate},
+            </if>
+            <if test="managementRate != null">management_rate =
+                #{managementRate},
+            </if>
+            <if test="depositRate != null">deposit_rate =
+                #{depositRate},
+            </if>
+            <if test="startDate != null">start_date =
+                #{startDate},
+            </if>
+            <if test="endDate != null">end_date =
+                #{endDate},
+            </if>
+            <if test="createById != null">create_by_id =
+                #{createById},
+            </if>
+            <if test="createBy != null">create_by =
+                #{createBy},
+            </if>
+            <if test="createTime != null">create_time =
+                #{createTime},
+            </if>
+            <if test="updateById != null">update_by_id =
+                #{updateById},
+            </if>
+            <if test="updateBy != null">update_by =
+                #{updateBy},
+            </if>
+            <if test="updateTime != null">update_time =
+                #{updateTime},
+            </if>
+            <if test="remark != null">remark =
+                #{remark},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSettlementFactoryRateById" parameterType="Long">
+        delete
+        from settlement_factory_rate
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteSettlementFactoryRateByIds" parameterType="String">
+        delete from settlement_factory_rate where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+
+</mapper>

+ 278 - 0
yiqi-core/src/main/resources/mapper/settlement/SettlementStoreRateMapper.xml

@@ -0,0 +1,278 @@
+<?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.yiqi.settlement.mapper.SettlementStoreRateMapper">
+
+    <resultMap type="SettlementStoreRate" id="SettlementStoreRateResult">
+        <result property="id" column="id"/>
+        <result property="storeId" column="store_id"/>
+        <result property="factoryRate" column="factory_rate"/>
+        <result property="materialRate" column="material_rate"/>
+        <result property="cardDepositRate" column="card_deposit_rate"/>
+        <result property="welfareDepositRate" column="welfare_deposit_rate"/>
+        <result property="passwordDepositRate" column="password_deposit_rate"/>
+        <result property="otherConsumeRate" column="other_consume_rate"/>
+        <result property="aliPayRate" column="ali_pay_rate"/>
+        <result property="wxPayRate" column="wx_pay_rate"/>
+        <result property="managementRate" column="management_rate"/>
+        <result property="washRate" column="wash_rate"/>
+        <result property="startDate" column="start_date"/>
+        <result property="endDate" column="end_date"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateById" column="update_by_id"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+
+    <sql id="selectSettlementStoreRateVo">
+        select id,
+               store_id,
+               factory_rate,
+               material_rate,
+               card_deposit_rate,
+               welfare_deposit_rate,
+               password_deposit_rate,
+               other_consume_rate,
+               ali_pay_rate,
+               wx_pay_rate,
+               management_rate,
+               wash_rate,
+               start_date,
+               end_date,
+               create_by_id,
+               create_by,
+               create_time,
+               update_by_id,
+               update_by,
+               update_time,
+               remark
+        from settlement_store_rate
+    </sql>
+
+    <select id="selectSettlementStoreRateList" parameterType="SettlementStoreRate"
+            resultMap="SettlementStoreRateResult">
+        <include refid="selectSettlementStoreRateVo"/>
+        <where>
+            <if test="storeId != null ">
+                and store_id = #{storeId}
+            </if>
+            <if test="factoryRate != null ">
+                and factory_rate = #{factoryRate}
+            </if>
+            <if test="materialRate != null ">
+                and material_rate = #{materialRate}
+            </if>
+            <if test="cardDepositRate != null ">
+                and card_deposit_rate = #{cardDepositRate}
+            </if>
+            <if test="welfareDepositRate != null ">
+                and welfare_deposit_rate = #{welfareDepositRate}
+            </if>
+            <if test="passwordDepositRate != null ">
+                and password_deposit_rate = #{passwordDepositRate}
+            </if>
+            <if test="otherConsumeRate != null ">
+                and other_consume_rate = #{otherConsumeRate}
+            </if>
+            <if test="aliPayRate != null ">
+                and ali_pay_rate = #{aliPayRate}
+            </if>
+            <if test="wxPayRate != null ">
+                and wx_pay_rate = #{wxPayRate}
+            </if>
+            <if test="managementRate != null ">
+                and management_rate = #{managementRate}
+            </if>
+            <if test="washRate != null ">
+                and wash_rate = #{washRate}
+            </if>
+            <if test="startDate != null ">
+                and start_date = #{startDate}
+            </if>
+            <if test="endDate != null ">
+                and end_date = #{endDate}
+            </if>
+        </where>
+    </select>
+
+    <select id="selectSettlementStoreRateById" parameterType="Long"
+            resultMap="SettlementStoreRateResult">
+        <include refid="selectSettlementStoreRateVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertSettlementStoreRate" parameterType="SettlementStoreRate" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into settlement_store_rate
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="storeId != null">store_id,
+            </if>
+            <if test="factoryRate != null">factory_rate,
+            </if>
+            <if test="materialRate != null">material_rate,
+            </if>
+            <if test="cardDepositRate != null">card_deposit_rate,
+            </if>
+            <if test="welfareDepositRate != null">welfare_deposit_rate,
+            </if>
+            <if test="passwordDepositRate != null">password_deposit_rate,
+            </if>
+            <if test="otherConsumeRate != null">other_consume_rate,
+            </if>
+            <if test="aliPayRate != null">ali_pay_rate,
+            </if>
+            <if test="wxPayRate != null">wx_pay_rate,
+            </if>
+            <if test="managementRate != null">management_rate,
+            </if>
+            <if test="washRate != null">wash_rate,
+            </if>
+            <if test="startDate != null">start_date,
+            </if>
+            <if test="endDate != null">end_date,
+            </if>
+            <if test="createById != null">create_by_id,
+            </if>
+            <if test="createBy != null">create_by,
+            </if>
+            <if test="createTime != null">create_time,
+            </if>
+            <if test="updateById != null">update_by_id,
+            </if>
+            <if test="updateBy != null">update_by,
+            </if>
+            <if test="updateTime != null">update_time,
+            </if>
+            <if test="remark != null">remark,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="storeId != null">#{storeId},
+            </if>
+            <if test="factoryRate != null">#{factoryRate},
+            </if>
+            <if test="materialRate != null">#{materialRate},
+            </if>
+            <if test="cardDepositRate != null">#{cardDepositRate},
+            </if>
+            <if test="welfareDepositRate != null">#{welfareDepositRate},
+            </if>
+            <if test="passwordDepositRate != null">#{passwordDepositRate},
+            </if>
+            <if test="otherConsumeRate != null">#{otherConsumeRate},
+            </if>
+            <if test="aliPayRate != null">#{aliPayRate},
+            </if>
+            <if test="wxPayRate != null">#{wxPayRate},
+            </if>
+            <if test="managementRate != null">#{managementRate},
+            </if>
+            <if test="washRate != null">#{washRate},
+            </if>
+            <if test="startDate != null">#{startDate},
+            </if>
+            <if test="endDate != null">#{endDate},
+            </if>
+            <if test="createById != null">#{createById},
+            </if>
+            <if test="createBy != null">#{createBy},
+            </if>
+            <if test="createTime != null">#{createTime},
+            </if>
+            <if test="updateById != null">#{updateById},
+            </if>
+            <if test="updateBy != null">#{updateBy},
+            </if>
+            <if test="updateTime != null">#{updateTime},
+            </if>
+            <if test="remark != null">#{remark},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateSettlementStoreRate" parameterType="SettlementStoreRate">
+        update settlement_store_rate
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="storeId != null">store_id =
+                #{storeId},
+            </if>
+            <if test="factoryRate != null">factory_rate =
+                #{factoryRate},
+            </if>
+            <if test="materialRate != null">material_rate =
+                #{materialRate},
+            </if>
+            <if test="cardDepositRate != null">card_deposit_rate =
+                #{cardDepositRate},
+            </if>
+            <if test="welfareDepositRate != null">welfare_deposit_rate =
+                #{welfareDepositRate},
+            </if>
+            <if test="passwordDepositRate != null">password_deposit_rate =
+                #{passwordDepositRate},
+            </if>
+            <if test="otherConsumeRate != null">other_consume_rate =
+                #{otherConsumeRate},
+            </if>
+            <if test="aliPayRate != null">ali_pay_rate =
+                #{aliPayRate},
+            </if>
+            <if test="wxPayRate != null">wx_pay_rate =
+                #{wxPayRate},
+            </if>
+            <if test="managementRate != null">management_rate =
+                #{managementRate},
+            </if>
+            <if test="washRate != null">wash_rate =
+                #{washRate},
+            </if>
+            <if test="startDate != null">start_date =
+                #{startDate},
+            </if>
+            <if test="endDate != null">end_date =
+                #{endDate},
+            </if>
+            <if test="createById != null">create_by_id =
+                #{createById},
+            </if>
+            <if test="createBy != null">create_by =
+                #{createBy},
+            </if>
+            <if test="createTime != null">create_time =
+                #{createTime},
+            </if>
+            <if test="updateById != null">update_by_id =
+                #{updateById},
+            </if>
+            <if test="updateBy != null">update_by =
+                #{updateBy},
+            </if>
+            <if test="updateTime != null">update_time =
+                #{updateTime},
+            </if>
+            <if test="remark != null">remark =
+                #{remark},
+            </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSettlementStoreRateById" parameterType="Long">
+        delete
+        from settlement_store_rate
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteSettlementStoreRateByIds" parameterType="String">
+        delete from settlement_store_rate where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+
+</mapper>