| @@ -2,6 +2,7 @@ package com.iformall.controller.market; | |||||
| import com.aliyun.openservices.shade.com.alibaba.fastjson.JSON; | import com.aliyun.openservices.shade.com.alibaba.fastjson.JSON; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.annotation.TenantIgnore; | |||||
| import com.iformall.common.Result; | import com.iformall.common.Result; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| @@ -9,6 +10,8 @@ import com.iformall.domain.dto.FinanceSetOffDTO; | |||||
| import com.iformall.domain.po.WxAllBill; | import com.iformall.domain.po.WxAllBill; | ||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxEnergyFees; | import com.iformall.domain.po.WxEnergyFees; | ||||
| import com.iformall.domain.po.WxFinancePrintData; | |||||
| import com.iformall.domain.po.WxFinancePrintTemplate; | |||||
| import com.iformall.domain.po.WxFinanceReceive; | import com.iformall.domain.po.WxFinanceReceive; | ||||
| import com.iformall.domain.po.WxFinanceReceiveSetoff; | import com.iformall.domain.po.WxFinanceReceiveSetoff; | ||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| @@ -313,4 +316,28 @@ public class WxFinanceController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @ApiOperation("打印项列表") | |||||
| @GetMapping("printDatas") | |||||
| @TenantIgnore | |||||
| public ResultData printDatas(@ModelAttribute WxFinancePrintData record) { | |||||
| record.setSortColumns("sort asc"); | |||||
| return new ResultData(wxFinanceService.printDataList(record)); | |||||
| } | |||||
| @ApiOperation("打印项列表") | |||||
| @GetMapping("printTemplates") | |||||
| @TenantIgnore | |||||
| public ResultData printTemplates(@ModelAttribute WxFinancePrintTemplate record) { | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| return new ResultData(wxFinanceService.printTemplateList(record)); | |||||
| } | |||||
| @ApiOperation("打印项列表") | |||||
| @GetMapping("templateDetail") | |||||
| @TenantIgnore | |||||
| public ResultData templateDetail(@ModelAttribute WxFinancePrintTemplate record) { | |||||
| record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); | |||||
| return new ResultData(wxFinanceService.getTemplateById(record.getId())); | |||||
| } | |||||
| } | } | ||||
| @@ -225,7 +225,9 @@ public class WxAllBillController extends BillBaseController { | |||||
| public ResultData billTypes() { | public ResultData billTypes() { | ||||
| Map<Integer,String> tmap = new HashMap<Integer,String>(); | Map<Integer,String> tmap = new HashMap<Integer,String>(); | ||||
| for (EnumBillAllType t : EnumBillAllType.values()) { | for (EnumBillAllType t : EnumBillAllType.values()) { | ||||
| tmap.put(t.getCode(), t.getMessage()); | |||||
| if (t.isShow()) { | |||||
| tmap.put(t.getCode(), t.getMessage()); | |||||
| } | |||||
| } | } | ||||
| return new ResultData(tmap); | return new ResultData(tmap); | ||||
| } | } | ||||
| @@ -150,6 +150,7 @@ CREATE TABLE `wx_finance_print_data` ( | |||||
| `is_del` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, | `is_del` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, | ||||
| `remark` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注', | `remark` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注', | ||||
| `type` int(1) NOT NULL COMMENT '类型', | `type` int(1) NOT NULL COMMENT '类型', | ||||
| `sort` int(1) NOT NULL DEFAULT '0' COMMENT '排序', | |||||
| PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | ||||
| @@ -162,6 +163,7 @@ CREATE TABLE `wx_finance_print_template` ( | |||||
| `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '模板名称', | `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '模板名称', | ||||
| `is_del` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, | `is_del` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL, | ||||
| `content` text COLLATE utf8mb4_unicode_ci COMMENT '内容', | `content` text COLLATE utf8mb4_unicode_ci COMMENT '内容', | ||||
| `type` int(1) NOT NULL COMMENT '类型', | |||||
| PRIMARY KEY (`id`) | PRIMARY KEY (`id`) | ||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='租赁合同'; | ||||
| @@ -25,4 +25,6 @@ public class WxFinancePrintData extends BaseEntity { | |||||
| private String remark; | private String remark; | ||||
| @io.swagger.annotations.ApiModelProperty(value="EnumFinancePrintDataType",name="type") | @io.swagger.annotations.ApiModelProperty(value="EnumFinancePrintDataType",name="type") | ||||
| private Integer type; | private Integer type; | ||||
| @io.swagger.annotations.ApiModelProperty(value="排序",name="sort") | |||||
| private Integer sort; | |||||
| } | } | ||||
| @@ -33,6 +33,9 @@ public class WxFinancePrintTemplate extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "isDel", name = "isDel") | @io.swagger.annotations.ApiModelProperty(value = "isDel", name = "isDel") | ||||
| private Integer isDel; | private Integer isDel; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "EnumFinancePrintDataType", name = "type") | |||||
| private Integer type; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "单价", name = "content") | @io.swagger.annotations.ApiModelProperty(value = "单价", name = "content") | ||||
| private String content; | private String content; | ||||
| } | } | ||||
| @@ -5,16 +5,16 @@ import java.util.List; | |||||
| public enum EnumBillAllType { | public enum EnumBillAllType { | ||||
| RENT(1,"租金",1L,false), | |||||
| RENT_BUSSINESS_MANAGE(11,"商业管理费",2L,false), | |||||
| RENT_OPERATION_MANAGE(12,"运营管理费",3L,false), | |||||
| RENT_DEPOSIT(13,"租赁押金",null,true), | |||||
| PROPERTY(2,"物业",5L,false), | |||||
| PROPERTY_DEPOSIT(21,"物业押金",6L,true), | |||||
| DAILY(3, "能耗(水电空调)费",null,false), | |||||
| OTHER(4, "其他费用",null,false), | |||||
| OTHER_DEPOSIT(5, "其他押金",null,true), | |||||
| ADVANCE(6,"预收",null,true) | |||||
| RENT(1,"租金",1L,false,true), | |||||
| RENT_BUSSINESS_MANAGE(11,"商业管理费",2L,false,true), | |||||
| RENT_OPERATION_MANAGE(12,"运营管理费",3L,false,true), | |||||
| RENT_DEPOSIT(13,"租赁押金",null,true,true), | |||||
| PROPERTY(2,"物业",5L,false,true), | |||||
| PROPERTY_DEPOSIT(21,"物业押金",6L,true,true), | |||||
| DAILY(3, "能耗(水电空调)费",null,false,true), | |||||
| OTHER(4, "其他费用",null,false,true), | |||||
| OTHER_DEPOSIT(5, "其他押金",null,true,true), | |||||
| ADVANCE(6,"预收",null,true,false)//没有形成真正的账单 | |||||
| ; | ; | ||||
| public static EnumBillAllType getEnum(Integer code) { | public static EnumBillAllType getEnum(Integer code) { | ||||
| @@ -30,12 +30,14 @@ public enum EnumBillAllType { | |||||
| private String message; | private String message; | ||||
| private Long energyFeesId;//wx_energy_fees(费用科目)里的id,不可配置的有这个 | private Long energyFeesId;//wx_energy_fees(费用科目)里的id,不可配置的有这个 | ||||
| private boolean isFixedPrice;//是否强制为一次性费用 | private boolean isFixedPrice;//是否强制为一次性费用 | ||||
| private boolean isShow;//是否显示为查询条件 | |||||
| EnumBillAllType(Integer code, String message,Long energyFeesId,boolean isFixedPrice) { | |||||
| EnumBillAllType(Integer code, String message,Long energyFeesId,boolean isFixedPrice,boolean isShow) { | |||||
| this.code = code; | this.code = code; | ||||
| this.message = message; | this.message = message; | ||||
| this.energyFeesId = energyFeesId; | this.energyFeesId = energyFeesId; | ||||
| this.isFixedPrice = isFixedPrice; | this.isFixedPrice = isFixedPrice; | ||||
| this.isShow = isShow; | |||||
| } | } | ||||
| public Integer getCode() { | public Integer getCode() { | ||||
| @@ -53,6 +55,10 @@ public enum EnumBillAllType { | |||||
| public boolean isFixedPrice() { | public boolean isFixedPrice() { | ||||
| return isFixedPrice; | return isFixedPrice; | ||||
| } | } | ||||
| public boolean isShow() { | |||||
| return isShow; | |||||
| } | |||||
| public static EnumBillAllType[] getSystemTypes() { | public static EnumBillAllType[] getSystemTypes() { | ||||
| EnumBillAllType[] ret = new EnumBillAllType[] {RENT,RENT_BUSSINESS_MANAGE,RENT_OPERATION_MANAGE, | EnumBillAllType[] ret = new EnumBillAllType[] {RENT,RENT_BUSSINESS_MANAGE,RENT_OPERATION_MANAGE, | ||||
| @@ -12,8 +12,6 @@ public interface WxFinancePrintTemplateMapper extends CommonMapper<WxFinancePrin | |||||
| List<WxFinancePrintTemplate> findList(WxFinancePrintTemplate wxBillRent); | 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); | void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | ||||
| } | } | ||||
| @@ -7,6 +7,8 @@ import com.iformall.domain.dto.FinanceSetOffDTO; | |||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| import com.iformall.domain.po.WxAllBill; | import com.iformall.domain.po.WxAllBill; | ||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxFinancePrintData; | |||||
| import com.iformall.domain.po.WxFinancePrintTemplate; | |||||
| import com.iformall.domain.po.WxFinanceReceive; | import com.iformall.domain.po.WxFinanceReceive; | ||||
| import com.iformall.domain.po.WxFinanceReceiveBill; | import com.iformall.domain.po.WxFinanceReceiveBill; | ||||
| import com.iformall.domain.po.WxFinanceReceiveSetoff; | import com.iformall.domain.po.WxFinanceReceiveSetoff; | ||||
| @@ -39,4 +41,13 @@ public interface WxFinanceService { | |||||
| void createAdvance(WxFinanceReceive record,MallUserInfo user); | void createAdvance(WxFinanceReceive record,MallUserInfo user); | ||||
| PageInfo<WxFinanceReceiveSetoff> receiveSetoffListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | PageInfo<WxFinanceReceiveSetoff> receiveSetoffListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | ||||
| //打印 | |||||
| List<WxFinancePrintData> printDataList(WxFinancePrintData record); | |||||
| List<WxFinancePrintTemplate> printTemplateList(WxFinancePrintTemplate record); | |||||
| WxFinancePrintTemplate getTemplateById(Long id); | |||||
| } | } | ||||
| @@ -15,6 +15,8 @@ import com.iformall.domain.po.WxAllBill; | |||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxEnergyFees; | import com.iformall.domain.po.WxEnergyFees; | ||||
| import com.iformall.domain.po.WxEnergyFeesSetoff; | import com.iformall.domain.po.WxEnergyFeesSetoff; | ||||
| import com.iformall.domain.po.WxFinancePrintData; | |||||
| import com.iformall.domain.po.WxFinancePrintTemplate; | |||||
| import com.iformall.domain.po.WxFinanceReceive; | import com.iformall.domain.po.WxFinanceReceive; | ||||
| import com.iformall.domain.po.WxFinanceReceiveBill; | import com.iformall.domain.po.WxFinanceReceiveBill; | ||||
| import com.iformall.domain.po.WxFinanceReceivePayway; | import com.iformall.domain.po.WxFinanceReceivePayway; | ||||
| @@ -854,6 +856,21 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| return page; | return page; | ||||
| } | } | ||||
| @Override | |||||
| public List<WxFinancePrintData> printDataList(WxFinancePrintData record) { | |||||
| return wxFinancePrintDataMapper.findList(record); | |||||
| } | |||||
| @Override | |||||
| public List<WxFinancePrintTemplate> printTemplateList(WxFinancePrintTemplate record) { | |||||
| return wxFinancePrintTemplateMapper.findList(record); | |||||
| } | |||||
| @Override | |||||
| public WxFinancePrintTemplate getTemplateById(Long id) { | |||||
| return wxFinancePrintTemplateMapper.selectById(id); | |||||
| } | |||||
| @@ -7,6 +7,7 @@ | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="remark" jdbcType="VARCHAR" property="remark"/> | <result column="remark" jdbcType="VARCHAR" property="remark"/> | ||||
| <result column="type" jdbcType="INTEGER" property="type"/> | <result column="type" jdbcType="INTEGER" property="type"/> | ||||
| <result column="sort" jdbcType="INTEGER" property="sort"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| @@ -31,6 +32,10 @@ | |||||
| <if test=" null != type "> | <if test=" null != type "> | ||||
| and `type` = #{type} | and `type` = #{type} | ||||
| </if> | </if> | ||||
| <if test=" null != sort "> | |||||
| and `sort` = #{sort} | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| @@ -8,12 +8,13 @@ | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> | ||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="type" jdbcType="INTEGER" property="type"/> | |||||
| <result column="name" jdbcType="VARCHAR" property="name"/> | <result column="name" jdbcType="VARCHAR" property="name"/> | ||||
| <result column="content" jdbcType="VARCHAR" property="content"/> | <result column="content" jdbcType="VARCHAR" property="content"/> | ||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`price`,`content` | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`type`,`name`,`price`,`content` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -27,7 +28,7 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != name and '' != name ">and name like concat('%', #{name},'%')</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 != isDel ">and `is_del` = #{isDel}</if> | ||||
| <if test=" null != type ">and `type` = #{type}</if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -44,12 +45,6 @@ | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </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 id = "setIsDel" parameterType="HashMap"> | ||||
| update wx_finance_print_template set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | update wx_finance_print_template set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | ||||
| </update> | </update> | ||||