| @@ -73,7 +73,7 @@ public class TenantInfoImpl implements TenantInfo { | |||
| "wx_user_visit", | |||
| "tt_goods_category", | |||
| "tt_merchant_poi", | |||
| "wx_finance_print_data" | |||
| }; | |||
| @@ -130,6 +130,7 @@ public class TenantInfoImpl implements TenantInfo { | |||
| "fengniao_map_config", | |||
| "tt_goods_category", | |||
| "tt_merchant_poi", | |||
| "wx_finance_print_data" | |||
| }; | |||
| @Override | |||
| @@ -144,3 +144,25 @@ ALTER TABLE wx_rent_contract ADD COLUMN revenue_jumps_remark varchar(1000) COMME | |||
| ALTER TABLE wx_rent_contract ADD COLUMN free_period_remark varchar(1000) COMMENT '免租期设置说明'; | |||
| ALTER TABLE wx_rent_contract DROP COLUMN bus_discount_ratio; | |||
| CREATE TABLE `wx_finance_print_data` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '数据项名称', | |||
| `is_del` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, | |||
| `remark` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注', | |||
| PRIMARY KEY (`id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | |||
| CREATE TABLE `wx_finance_print_template` ( | |||
| `id` bigint(20) NOT NULL COMMENT '主键ID', | |||
| `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', | |||
| `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', | |||
| `update_time` datetime DEFAULT NULL COMMENT '更新时间', | |||
| `create_time` datetime DEFAULT NULL COMMENT '创建时间', | |||
| `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '模板名称', | |||
| `is_del` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, | |||
| `content` text COLLATE utf8mb4_unicode_ci COMMENT '内容', | |||
| PRIMARY KEY (`id`) | |||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | |||
| @@ -60,6 +60,7 @@ public class TenantInfoImpl implements TenantInfo { | |||
| "wx_user_visit", | |||
| "tt_goods_category", | |||
| "tt_merchant_poi", | |||
| "wx_finance_print_data" | |||
| }; | |||
| private static String[] filterSubTables = new String[] { | |||
| @@ -104,6 +105,7 @@ public class TenantInfoImpl implements TenantInfo { | |||
| "fengniao_map_config", | |||
| "tt_goods_category", | |||
| "tt_merchant_poi", | |||
| "wx_finance_print_data" | |||
| }; | |||
| @Override | |||
| @@ -65,6 +65,7 @@ public class TenantInfoImpl implements TenantInfo { | |||
| "wx_user_visit", | |||
| "tt_goods_category", | |||
| "tt_merchant_poi", | |||
| "wx_finance_print_data" | |||
| }; | |||
| private static String[] filterSubTables = new String[] { | |||
| @@ -117,6 +118,7 @@ public class TenantInfoImpl implements TenantInfo { | |||
| "fengniao_map_config", | |||
| "tt_goods_category", | |||
| "tt_merchant_poi", | |||
| "wx_finance_print_data" | |||
| }; | |||
| @@ -65,6 +65,7 @@ public class TenantInfoImpl implements TenantInfo { | |||
| "wx_user_visit", | |||
| "tt_goods_category", | |||
| "tt_merchant_poi", | |||
| "wx_finance_print_data" | |||
| }; | |||
| private static String[] filterSubTables = new String[] { | |||
| @@ -117,6 +118,7 @@ public class TenantInfoImpl implements TenantInfo { | |||
| "fengniao_map_config", | |||
| "tt_goods_category", | |||
| "tt_merchant_poi", | |||
| "wx_finance_print_data" | |||
| }; | |||
| @@ -0,0 +1,28 @@ | |||
| package com.iformall.domain.po; | |||
| import com.baomidou.mybatisplus.annotation.IdType; | |||
| import com.baomidou.mybatisplus.annotation.TableId; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| @TableName(value = "wx_finance_print_data") | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxFinancePrintData extends BaseEntity { | |||
| private static final long serialVersionUID = 5442054213918470425L; | |||
| @TableId(type= IdType.AUTO) | |||
| protected Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="数据项名称",name="name") | |||
| private String name; | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="isDel") | |||
| private Integer isDel; | |||
| @io.swagger.annotations.ApiModelProperty(value="省",name="remark") | |||
| private String remark; | |||
| @io.swagger.annotations.ApiModelProperty(value="EnumFinancePrintDataType",name="type") | |||
| private Integer type; | |||
| } | |||
| @@ -0,0 +1,38 @@ | |||
| package com.iformall.domain.po; | |||
| import java.util.Date; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| /** | |||
| */ | |||
| @TableName(value = "wx_finance_print_template") | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxFinancePrintTemplate extends TenantEntity { | |||
| private static final long serialVersionUID = 7009117540201976664L; | |||
| @io.swagger.annotations.ApiModelProperty(value="id",name="id") | |||
| private Long id; | |||
| @io.swagger.annotations.ApiModelProperty(value="name",name="name") | |||
| private String name; | |||
| @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") | |||
| private Date createTime; | |||
| @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") | |||
| private Date updateTime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "isDel", name = "isDel") | |||
| private Integer isDel; | |||
| @io.swagger.annotations.ApiModelProperty(value = "单价", name = "content") | |||
| private String content; | |||
| } | |||
| @@ -0,0 +1,33 @@ | |||
| package com.iformall.enums; | |||
| public enum EnumFinancePrintDataType { | |||
| FINANCE_BILL(1,"财务账单"), | |||
| FINANCE_RECEIVE(2,"财务收款单") | |||
| ; | |||
| public static EnumFinancePrintDataType getEnum(Integer code) { | |||
| for (EnumFinancePrintDataType value : values()) { | |||
| if (value.getCode().equals(code)) { | |||
| return value; | |||
| } | |||
| } | |||
| return null; | |||
| } | |||
| private Integer code; | |||
| private String message; | |||
| EnumFinancePrintDataType(Integer code, String message) { | |||
| this.code = code; | |||
| this.message = message; | |||
| } | |||
| public Integer getCode() { | |||
| return code; | |||
| } | |||
| public String getMessage() { | |||
| return message; | |||
| } | |||
| } | |||
| @@ -0,0 +1,11 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxFinancePrintData; | |||
| import java.util.List; | |||
| public interface WxFinancePrintDataMapper extends CommonMapper<WxFinancePrintData, Long> { | |||
| List<WxFinancePrintData> findList(WxFinancePrintData wxMall); | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.WxFinancePrintTemplate; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.List; | |||
| /** | |||
| */ | |||
| public interface WxFinancePrintTemplateMapper extends CommonMapper<WxFinancePrintTemplate, Long> { | |||
| List<WxFinancePrintTemplate> findList(WxFinancePrintTemplate wxBillRent); | |||
| WxFinancePrintTemplate selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | |||
| void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | |||
| } | |||
| @@ -6,8 +6,6 @@ import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.dto.FinanceReceiveCalcuteDTO; | |||
| import com.iformall.domain.dto.FinanceSetOffCalcuteDTO; | |||
| import com.iformall.domain.dto.FinanceSetOffDTO; | |||
| @@ -29,13 +27,14 @@ import com.iformall.domain.vo.FinanceBillSetoffSum; | |||
| import com.iformall.domain.vo.FinanceSetOffDetailVo; | |||
| import com.iformall.domain.vo.WxFinanceReceiveVo; | |||
| import com.iformall.enums.EnumBillAllType; | |||
| import com.iformall.enums.EnumBillStatus; | |||
| import com.iformall.enums.EnumFinanceReceiveStatus; | |||
| import com.iformall.enums.EnumFinanceReceiveType; | |||
| import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBillPayWayMapper; | |||
| import com.iformall.mapper.WxEnergyFeesSetoffMapper; | |||
| import com.iformall.mapper.WxFinancePrintDataMapper; | |||
| import com.iformall.mapper.WxFinancePrintTemplateMapper; | |||
| import com.iformall.mapper.WxFinanceReceiveBillMapper; | |||
| import com.iformall.mapper.WxFinanceReceiveMapper; | |||
| import com.iformall.mapper.WxFinanceReceivePaywayMapper; | |||
| @@ -46,7 +45,6 @@ import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.WxShopService; | |||
| import com.iformall.service.helper.WxBillAllHelper; | |||
| import com.iformall.utils.Constant; | |||
| import com.iformall.utils.DateUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| @@ -81,6 +79,10 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||
| WxFinanceReceiveSetoffMapper wxFinanceReceiveSetoffMapper; | |||
| @Autowired | |||
| WxFinanceReceivePaywayMapper wxFinanceReceivePaywayMapper; | |||
| @Autowired | |||
| WxFinancePrintDataMapper wxFinancePrintDataMapper; | |||
| @Autowired | |||
| WxFinancePrintTemplateMapper wxFinancePrintTemplateMapper; | |||
| @Lazy | |||
| @Autowired | |||
| @@ -0,0 +1,51 @@ | |||
| <?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.iformall.mapper.WxFinancePrintDataMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinancePrintData"> | |||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||
| <result column="name" jdbcType="VARCHAR" property="name"/> | |||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||
| <result column="remark" jdbcType="VARCHAR" property="remark"/> | |||
| <result column="type" jdbcType="INTEGER" property="type"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`name`,`is_del`,`remark`,`type` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where id > 0 | |||
| <if test=" null != id "> | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != name "> | |||
| and `name` like concat('%', #{name},'%') | |||
| </if> | |||
| <if test=" null != isDel "> | |||
| and `is_del` = #{isDel} | |||
| </if> | |||
| <if test=" null != type "> | |||
| and `type` = #{type} | |||
| </if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxFinancePrintData" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_finance_print_data | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,58 @@ | |||
| <?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.iformall.mapper.WxFinancePrintTemplateMapper"> | |||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinancePrintTemplate"> | |||
| <id column="id" jdbcType="BIGINT" property="id"/> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> | |||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> | |||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | |||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | |||
| <result column="name" jdbcType="VARCHAR" property="name"/> | |||
| <result column="content" jdbcType="VARCHAR" property="content"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`price`,`content` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| where 1=1 | |||
| <if test=" null != id ">and `id` = #{id}</if> | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</if> | |||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | |||
| <if test=" null != ids "> | |||
| and id in | |||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||
| #{idItem} | |||
| </foreach> | |||
| </if> | |||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||
| </sql> | |||
| <select id="findList" parameterType="com.iformall.domain.po.WxFinancePrintTemplate" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_finance_print_template | |||
| <include refid="dynamicWhereConditions"/> | |||
| </select> | |||
| <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from wx_finance_print_template where id = #{id} and `tenant_id` = #{tenantId} | |||
| </select> | |||
| <update id = "setIsDel" parameterType="HashMap"> | |||
| update wx_finance_print_template set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | |||
| </update> | |||
| </mapper> | |||