winter 1 год назад
Родитель
Сommit
e8aed266e0
12 измененных файлов: 366 добавлений и 22 удалений
  1. +27
    -12
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java
  2. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/rent/WxAllBillController.java
  3. +121
    -0
      mallinkAdmin/src/main/resources/db/migration/V202408000000001.sql
  4. +4
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java
  5. +75
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxFinanceFinish.java
  6. +38
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumFinanceFinishStatus.java
  7. +16
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxFinanceFinishMapper.java
  8. +4
    -1
      mallinkService/src/main/java/com/iformall/service/WxFinanceService.java
  9. +1
    -1
      mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java
  10. +10
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java
  11. +7
    -2
      mallinkService/src/main/resources/mapper/WxAllBillMapper.xml
  12. +62
    -0
      mallinkService/src/main/resources/mapper/WxFinanceFinishMapper.xml

+ 27
- 12
mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java Просмотреть файл

@@ -10,6 +10,7 @@ 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.WxFinanceFinish;
import com.iformall.domain.po.WxFinancePrintData; import com.iformall.domain.po.WxFinancePrintData;
import com.iformall.domain.po.WxFinancePrintTemplate; import com.iformall.domain.po.WxFinancePrintTemplate;
import com.iformall.domain.po.WxFinanceReceive; import com.iformall.domain.po.WxFinanceReceive;
@@ -18,6 +19,7 @@ import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.vo.FinanceBillSetoffSum; import com.iformall.domain.vo.FinanceBillSetoffSum;
import com.iformall.domain.vo.WxFinanceReceiveVo; import com.iformall.domain.vo.WxFinanceReceiveVo;
import com.iformall.enums.EnumBillAllType; import com.iformall.enums.EnumBillAllType;
import com.iformall.enums.EnumFinanceFinishStatus;
import com.iformall.enums.EnumFinanceReceiveStatus; import com.iformall.enums.EnumFinanceReceiveStatus;
import com.iformall.enums.EnumFinanceReceiveType; import com.iformall.enums.EnumFinanceReceiveType;
import com.iformall.enums.EnumYesOrNo; import com.iformall.enums.EnumYesOrNo;
@@ -244,18 +246,6 @@ public class WxFinanceController extends BaseController {
return new ResultData(list); return new ResultData(list);
} }
@GetMapping("receiveSetoffStatus")
public ResultData receiveSetoffStatus() {
List<Map> list = new ArrayList<Map>();
for (EnumFinanceReceiveStatus t : EnumFinanceReceiveStatus.getSetoff()) {
Map m = new HashMap();
m.put("id", t.getCode());
m.put("name", t.getMessage());
list.add(m);
}
return new ResultData(list);
}
@GetMapping("receiveTypes") @GetMapping("receiveTypes")
public ResultData receiveTypes() { public ResultData receiveTypes() {
List<Map> list = new ArrayList<Map>(); List<Map> list = new ArrayList<Map>();
@@ -361,4 +351,29 @@ public class WxFinanceController extends BaseController {
return new ResultData(this.getTenantInfo().getTenantId()); return new ResultData(this.getTenantInfo().getTenantId());
} }
@GetMapping("finishStatus")
public ResultData receiveSetoffStatus() {
List<Map> list = new ArrayList<Map>();
for (EnumFinanceFinishStatus t : EnumFinanceFinishStatus.values()) {
Map m = new HashMap();
m.put("id", t.getCode());
m.put("name", t.getMessage());
list.add(m);
}
return new ResultData(list);
}
@ApiOperation("过账列表")
@GetMapping("finishList")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
})
public ResultData finishList(@ModelAttribute WxFinanceFinish record, Integer pageNum, Integer pageSize) {
record.updateTenantInfo(getTenantInfo());
record.setSortColumns(BaseEntity.SortField.CreateTime_DESC);
PageInfo<WxFinanceFinish> page = wxFinanceService.finishListAsPage(record, pageNum, pageSize);
return new ResultData(page);
}
} }

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/rent/WxAllBillController.java Просмотреть файл

@@ -617,7 +617,7 @@ public class WxAllBillController extends BillBaseController {
return new ResultData(Result.ERROR,"请选择商户"); return new ResultData(Result.ERROR,"请选择商户");
} }
wxMerchant.updateTenantInfo(getTenantInfo()); wxMerchant.updateTenantInfo(getTenantInfo());
wxMerchant.setNeedPayPreDays(getNearBillBeforeDays());
wxMerchant.setToPayMerchant(EnumYesOrNo.YES.getCode());
List<WxAllBill> list = billAllHelper.getMerchantBillList(wxMerchant); List<WxAllBill> list = billAllHelper.getMerchantBillList(wxMerchant);
if (null != list && list.size() > 0 ) { if (null != list && list.size() > 0 ) {
List<Long> merchnatIds = new ArrayList<Long>(); List<Long> merchnatIds = new ArrayList<Long>();


+ 121
- 0
mallinkAdmin/src/main/resources/db/migration/V202408000000001.sql Просмотреть файл

@@ -774,5 +774,126 @@ alter table wx_finance_receive_97 add column rent_shop_type int(1) not null
alter table wx_finance_receive_98 add column rent_shop_type int(1) not null comment '店铺多经'; alter table wx_finance_receive_98 add column rent_shop_type int(1) not null comment '店铺多经';
alter table wx_finance_receive_99 add column rent_shop_type int(1) not null comment '店铺多经'; alter table wx_finance_receive_99 add column rent_shop_type int(1) not null comment '店铺多经';


ALTER TABLE wx_all_bill_0 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_1 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_2 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_3 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_4 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_5 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_6 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_7 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_8 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_9 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_10 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_11 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_12 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_13 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_14 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_15 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_16 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_17 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_18 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_19 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_20 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_21 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_22 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_23 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_24 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_25 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_26 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_27 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_28 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_29 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_30 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_31 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_32 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_33 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_34 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_35 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_36 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_37 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_38 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_39 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_40 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_41 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_42 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_43 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_44 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_45 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_46 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_47 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_48 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_49 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_50 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_51 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_52 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_53 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_54 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_55 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_56 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_57 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_58 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_59 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_60 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_61 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_62 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_63 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_64 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_65 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_66 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_67 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_68 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_69 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_70 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_71 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_72 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_73 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_74 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_75 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_76 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_77 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_78 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_79 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_80 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_81 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_82 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_83 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_84 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_85 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_86 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_87 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_88 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_89 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_90 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_91 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_92 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_93 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_94 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_95 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_96 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_97 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_98 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';
ALTER TABLE wx_all_bill_99 ADD COLUMN finish_id BIGINT(20) COMMENT '结账id';


CREATE TABLE `wx_finance_finish` (
`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',
`create_time` timestamp NULL DEFAULT NULL,
`update_time` timestamp NULL DEFAULT NULL,
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_by_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '创建人名称',
`update_by` bigint(20) DEFAULT NULL COMMENT '更新人',
`update_by_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人名称',
`status` int(3) NOT NULL COMMENT '状态',
`remark` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
`back_remark` varchar(300) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '反审核备注',
`start_date` timestamp NULL DEFAULT NULL COMMENT '开始日期',
`end_date` timestamp NULL DEFAULT NULL COMMENT '结束日期',
`name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '支付给商户金额',
PRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='能耗表';





+ 4
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxAllBill.java Просмотреть файл

@@ -200,6 +200,8 @@ public class WxAllBill extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value = "能源抄表ID", name = "energyReadingId") @io.swagger.annotations.ApiModelProperty(value = "能源抄表ID", name = "energyReadingId")
private Long energyReadingId; private Long energyReadingId;
@io.swagger.annotations.ApiModelProperty(value = "结账ID", name = "finishId")
private Long finishId;
@io.swagger.annotations.ApiModelProperty(value="楼座号",name="building") @io.swagger.annotations.ApiModelProperty(value="楼座号",name="building")
@TableField(exist = false) @TableField(exist = false)
@@ -303,6 +305,7 @@ public class WxAllBill extends TenantEntity {
private Integer limitEnd; private Integer limitEnd;
@TableField(exist = false) @TableField(exist = false)
private Long feesStandarsId; private Long feesStandarsId;
@TableField(exist = false)
public Integer toPayMerchant;
} }

+ 75
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxFinanceFinish.java Просмотреть файл

@@ -0,0 +1,75 @@
package com.iformall.domain.po;

import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.enums.EnumFinanceCashierType;
import com.iformall.enums.EnumFinanceReceiveStatus;
import com.iformall.enums.EnumFinanceReceiveType;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
*/
@TableName(value = "wx_finance_finish")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class WxFinanceFinish extends TenantEntity {

private static final long serialVersionUID = 7009117540201976664L;

@io.swagger.annotations.ApiModelProperty(value="id",name="id")
private Long id;

@io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime")
private Date createTime;
@TableField(exist = false)
private Date createTimeBegin;
@TableField(exist = false)
private Date createTimeEnd;
@io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime")
private Date updateTime;
@io.swagger.annotations.ApiModelProperty(value="createBy",name="createBy")
private Long createBy;
@io.swagger.annotations.ApiModelProperty(value="createByName",name="createByName")
private String createByName;
@io.swagger.annotations.ApiModelProperty(value="updateBy",name="updateBy")
private Long updateBy;
@io.swagger.annotations.ApiModelProperty(value="updateByName",name="updateByName")
private String updateByName;
@io.swagger.annotations.ApiModelProperty(value = "状态EnumFinanceFinishStatus", name = "status")
private Integer status;
@TableField(exist = false)
private String statusName;
public String getStatusName() {
if (null != status) {
return EnumFinanceReceiveStatus.getEnum(status).getMessage();
}
return null;
}
@io.swagger.annotations.ApiModelProperty(value = "remark", name = "remark")
private String remark;
@io.swagger.annotations.ApiModelProperty(value = "remark", name = "remark")
private String backRemark;
@io.swagger.annotations.ApiModelProperty(value = "startDate", name = "startDate")
private Date startDate;
@io.swagger.annotations.ApiModelProperty(value = "endDate", name = "endDate")
private Date endDate;
@io.swagger.annotations.ApiModelProperty(value = "name", name = "name")
private String name;
}

+ 38
- 0
mallinkService/src/main/java/com/iformall/enums/EnumFinanceFinishStatus.java Просмотреть файл

@@ -0,0 +1,38 @@
package com.iformall.enums;

/**
*/

public enum EnumFinanceFinishStatus {

READY(1,"待审核结账"),
COMPLETE(2,"已审核结账"),
REREADY(3, "重新结账中")
;

public static EnumFinanceFinishStatus getEnum(Integer code) {
for (EnumFinanceFinishStatus value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumFinanceFinishStatus(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 16
- 0
mallinkService/src/main/java/com/iformall/mapper/WxFinanceFinishMapper.java Просмотреть файл

@@ -0,0 +1,16 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxFinanceFinish;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
*/
public interface WxFinanceFinishMapper extends CommonMapper<WxFinanceFinish, Long> {

List<WxFinanceFinish> findList(WxFinanceFinish wxBillRent);

WxFinanceFinish selectById(@Param("id")Long id,@Param("tenantId")String tenantId);
}

+ 4
- 1
mallinkService/src/main/java/com/iformall/service/WxFinanceService.java Просмотреть файл

@@ -7,10 +7,10 @@ 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.WxFinanceFinish;
import com.iformall.domain.po.WxFinancePrintData; import com.iformall.domain.po.WxFinancePrintData;
import com.iformall.domain.po.WxFinancePrintTemplate; 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.WxFinanceReceiveSetoff; import com.iformall.domain.po.WxFinanceReceiveSetoff;
import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.FinanceBillSetoffSum; import com.iformall.domain.vo.FinanceBillSetoffSum;
@@ -46,4 +46,7 @@ public interface WxFinanceService {
List<WxFinancePrintData> printDataList(WxFinancePrintData record); List<WxFinancePrintData> printDataList(WxFinancePrintData record);
List<WxFinancePrintTemplate> printTemplateList(WxFinancePrintTemplate record); List<WxFinancePrintTemplate> printTemplateList(WxFinancePrintTemplate record);
WxFinancePrintTemplate getTemplateById(Long id); WxFinancePrintTemplate getTemplateById(Long id);
//结账
PageInfo<WxFinanceFinish> finishListAsPage(WxFinanceFinish record, Integer pageIndex, Integer pageSize);
} }

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/helper/WxBillAllHelper.java Просмотреть файл

@@ -99,6 +99,7 @@ public class WxBillAllHelper {
if (null != wxMerchant.getNeedPayPreDays()) { if (null != wxMerchant.getNeedPayPreDays()) {
bill.setNeedPayStartDay(getDateBefore(wxMerchant.getNeedPayPreDays())); bill.setNeedPayStartDay(getDateBefore(wxMerchant.getNeedPayPreDays()));
} }
bill.setToPayMerchant(wxMerchant.getToPayMerchant());
} }
public WxBillSum getBillSum(WxMerchant wxMerchant,Date starttime, Date enttime) { public WxBillSum getBillSum(WxMerchant wxMerchant,Date starttime, Date enttime) {
@@ -216,7 +217,6 @@ public class WxBillAllHelper {
} }
public List<WxAllBill> getMerchantBillList(WxMerchant wxMerchant) { public List<WxAllBill> getMerchantBillList(WxMerchant wxMerchant) {
WxAllBill wxBillRent = new WxAllBill(); WxAllBill wxBillRent = new WxAllBill();
updateQueryParm(wxMerchant, wxBillRent,wxMerchant.getStarttime(),wxMerchant.getEndtime()); updateQueryParm(wxMerchant, wxBillRent,wxMerchant.getStarttime(),wxMerchant.getEndtime());
wxBillRent.setSortColumns("starttime asc"); wxBillRent.setSortColumns("starttime asc");


+ 10
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java Просмотреть файл

@@ -15,6 +15,7 @@ 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.WxFinanceFinish;
import com.iformall.domain.po.WxFinancePrintData; import com.iformall.domain.po.WxFinancePrintData;
import com.iformall.domain.po.WxFinancePrintTemplate; import com.iformall.domain.po.WxFinancePrintTemplate;
import com.iformall.domain.po.WxFinanceReceive; import com.iformall.domain.po.WxFinanceReceive;
@@ -37,6 +38,7 @@ import com.iformall.enums.EnumYesOrNo;
import com.iformall.exception.MallinkException; import com.iformall.exception.MallinkException;
import com.iformall.mapper.WxBillPayWayMapper; import com.iformall.mapper.WxBillPayWayMapper;
import com.iformall.mapper.WxEnergyFeesSetoffMapper; import com.iformall.mapper.WxEnergyFeesSetoffMapper;
import com.iformall.mapper.WxFinanceFinishMapper;
import com.iformall.mapper.WxFinancePrintDataMapper; import com.iformall.mapper.WxFinancePrintDataMapper;
import com.iformall.mapper.WxFinancePrintTemplateMapper; import com.iformall.mapper.WxFinancePrintTemplateMapper;
import com.iformall.mapper.WxFinanceReceiveBillMapper; import com.iformall.mapper.WxFinanceReceiveBillMapper;
@@ -89,7 +91,9 @@ public class WxFinanceServiceImpl implements WxFinanceService {
WxFinancePrintDataMapper wxFinancePrintDataMapper; WxFinancePrintDataMapper wxFinancePrintDataMapper;
@Autowired @Autowired
WxFinancePrintTemplateMapper wxFinancePrintTemplateMapper; WxFinancePrintTemplateMapper wxFinancePrintTemplateMapper;

@Autowired
WxFinanceFinishMapper wxFinanceFinishMapper;
@Lazy @Lazy
@Autowired @Autowired
WxEnergyService wxEnergyService; WxEnergyService wxEnergyService;
@@ -1009,9 +1013,11 @@ public class WxFinanceServiceImpl implements WxFinanceService {
return wxFinancePrintTemplateMapper.selectById(id); return wxFinancePrintTemplateMapper.selectById(id);
} }





@Override
public PageInfo<WxFinanceFinish> finishListAsPage(WxFinanceFinish record, Integer pageIndex, Integer pageSize) {
PageInfo<WxFinanceFinish> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFinanceFinishMapper.findList(record));
return page;
}




} }

+ 7
- 2
mallinkService/src/main/resources/mapper/WxAllBillMapper.xml Просмотреть файл

@@ -41,6 +41,7 @@
<result column="parent_bill_id" jdbcType="BIGINT" property="parentBillId"/> <result column="parent_bill_id" jdbcType="BIGINT" property="parentBillId"/>
<result column="energy_reading_calcuteId" jdbcType="BIGINT" property="energyReadingCalcuteId" /> <result column="energy_reading_calcuteId" jdbcType="BIGINT" property="energyReadingCalcuteId" />
<result column="energy_reading_id" jdbcType="BIGINT" property="energyReadingId" /> <result column="energy_reading_id" jdbcType="BIGINT" property="energyReadingId" />
<result column="finish_id" jdbcType="BIGINT" property="finishId" />
</resultMap> </resultMap>


@@ -48,7 +49,7 @@
`id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`rent_shop_type`,`createtime`,`create_by`,`create_by_name`,`updatetime`,`update_by`,`update_by_name`, `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`rent_shop_type`,`createtime`,`create_by`,`create_by_name`,`updatetime`,`update_by`,`update_by_name`,
`price_detail`,`need_pay`,`receive_pay`,`pay`,`bill_type`,`pay_way`,`pay_date`,`set_off`,`starttime`,`endtime`,`status`,`energy_fees_id`,`return_pay`, `price_detail`,`need_pay`,`receive_pay`,`pay`,`bill_type`,`pay_way`,`pay_date`,`set_off`,`starttime`,`endtime`,`status`,`energy_fees_id`,`return_pay`,
`bill_remark`,`last_owe_call_time`,`last_owe_call_user`,`bussiness_manage_fee_need_pay`,`operating_manage_fee_need_pay`,`shop_id`,`shop_number`, `bill_remark`,`last_owe_call_time`,`last_owe_call_user`,`bussiness_manage_fee_need_pay`,`operating_manage_fee_need_pay`,`shop_id`,`shop_number`,
`is_preview`,`shop_info`,`rent_contract_id`,`property_contract_id`,`parent_bill_id`,`energy_reading_calcuteId`,`energy_reading_id`
`is_preview`,`shop_info`,`rent_contract_id`,`property_contract_id`,`parent_bill_id`,`energy_reading_calcuteId`,`energy_reading_id`,`finish_id`
</sql> </sql>


<sql id="dynamicWhereConditions"> <sql id="dynamicWhereConditions">
@@ -81,6 +82,9 @@
<if test=" null != needPayStartDay"> <if test=" null != needPayStartDay">
and (`starttime` &lt;= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7)) and (`starttime` &lt;= #{needPayStartDay} and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7))
</if> </if>
<if test=" null != toPayMerchant">
and (and `receive_pay` - `pay` - IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &lt; 0 or status in (8,9))
</if>
<if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7) )</if> <if test=" 1 == notifyed ">and (`last_owe_call_time` is not null and `receive_pay` - `pay`- IFNULL(`set_off`,'0') + IFNULL(`return_pay`,'0') &gt; 0 and status not in (3,6,7) )</if>
<if test=" null != hasMerchant ">and `merchant_id` is not null</if> <if test=" null != hasMerchant ">and `merchant_id` is not null</if>
<if test=" 1 == hasParentBillId ">and `parent_bill_id` is not null</if> <if test=" 1 == hasParentBillId ">and `parent_bill_id` is not null</if>
@@ -89,6 +93,7 @@
<if test=" 0 == hasFeesStardarsId ">and `energy_fees_id` is null</if> <if test=" 0 == hasFeesStardarsId ">and `energy_fees_id` is null</if>
<if test=" null != energyReadingCalcuteId ">and `energy_reading_calcuteId` = #{energyReadingCalcuteId}</if> <if test=" null != energyReadingCalcuteId ">and `energy_reading_calcuteId` = #{energyReadingCalcuteId}</if>
<if test=" null != energyReadingId ">and `energy_reading_id` = #{energyReadingId}</if> <if test=" null != energyReadingId ">and `energy_reading_id` = #{energyReadingId}</if>
<if test=" null != finishId ">and `finish_id` = #{finishId}</if>
<if test=" null != rentContractIdList "> <if test=" null != rentContractIdList ">
and `rent_contract_id` in and `rent_contract_id` in
<foreach collection="rentContractIdList" index="index" item="ridItem" open="(" separator="," close=")"> <foreach collection="rentContractIdList" index="index" item="ridItem" open="(" separator="," close=")">
@@ -254,7 +259,7 @@
#{item.starttime},#{item.endtime},#{item.status},#{item.energyFeesId},#{item.returnPay},#{item.billRemark}, #{item.starttime},#{item.endtime},#{item.status},#{item.energyFeesId},#{item.returnPay},#{item.billRemark},
#{item.lastOweCallTime},#{item.lastOweCallUser},#{item.bussinessManageFeeNeedPay},#{item.operatingManageFeeNeedPay}, #{item.lastOweCallTime},#{item.lastOweCallUser},#{item.bussinessManageFeeNeedPay},#{item.operatingManageFeeNeedPay},
#{item.shopId},#{item.shopNumber},#{item.isPreview},#{item.shopInfo},#{item.rentContractId},#{item.propertyContractId}, #{item.shopId},#{item.shopNumber},#{item.isPreview},#{item.shopInfo},#{item.rentContractId},#{item.propertyContractId},
#{item.parentBillId},#{item.energyReadingCalcuteId},#{item.energyReadingId}
#{item.parentBillId},#{item.energyReadingCalcuteId},#{item.energyReadingId},#{item.finishId}
) )
</foreach> </foreach>
</insert> </insert>


+ 62
- 0
mallinkService/src/main/resources/mapper/WxFinanceFinishMapper.xml Просмотреть файл

@@ -0,0 +1,62 @@
<?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.WxFinanceFinishMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinanceFinish">
<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="create_by" jdbcType="BIGINT" property="createBy"/>
<result column="create_by_name" jdbcType="VARCHAR" property="createByName"/>
<result column="update_by" jdbcType="BIGINT" property="updateBy"/>
<result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="back_remark" jdbcType="VARCHAR" property="backRemark"/>
<result column="start_date" jdbcType="TIMESTAMP" property="startDate"/>
<result column="end_date" jdbcType="TIMESTAMP" property="endDate"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`create_by`,`create_by_name`,`update_by`,`update_by_name`,
`status`,`remark`,`back_remark`,`start_date`,`end_date`,`name`
</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 != status ">and `status` = #{status}</if>
<if test=" null != name and ''!=name">
and `name` like concat('%', #{name},'%')
</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.WxFinanceFinish" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_finance_finish
<include refid="dynamicWhereConditions"/>
</select>
<select id="selectById" parameterType="HashMap" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_finance_finish where id = #{id} and `tenant_id` = #{tenantId}
</select>
</mapper>


Загрузка…
Отмена
Сохранить