Quellcode durchsuchen

fix bill

release_toaliyun_real
winter vor 4 Jahren
Ursprung
Commit
a0a5710b91
5 geänderte Dateien mit 181 neuen und 146 gelöschten Zeilen
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java
  2. +8
    -3
      mallinkService/src/main/java/com/iformall/mapper/WxBillAllMapper.java
  3. +95
    -33
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  4. +76
    -108
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml
  5. +1
    -1
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java Datei anzeigen

@@ -82,7 +82,7 @@ public class WxBillAll extends TenantEntity {
private Integer totalOwe;

private List<Integer> billTypeList;
private List<Long> merchantIdList;

@TableField(exist = false)
@SortColumn(column = "rentReceivePay")


+ 8
- 3
mallinkService/src/main/java/com/iformall/mapper/WxBillAllMapper.java Datei anzeigen

@@ -19,14 +19,19 @@ import org.apache.ibatis.annotations.Param;
public interface WxBillAllMapper {


List<WxBillAllVo> list(WxBillAll record);
List<WxBillAllVo> listRentBill(WxBillAll record);
List<WxBillAllVo> listRentDepositBill(WxBillAll record);
List<WxBillAllVo> listPropertyBill(WxBillAll record);
List<WxBillAllVo> listPropertyDepositBill(WxBillAll record);
List<WxBillAllVo> listDailyBill(WxBillAll record);
List<WxBillAllVo> listOtherBill(WxBillAll record);
List<WxBillAllVo> listOtherDepositBill(WxBillAll record);

Map<String,Object> queryOweInfo(WxBillAll record);

Map<String,Object> queryPaidInfo(WxBillAll record);

//List<Map<String,Object>> listData(WxBillAll wxBillAll);
List<Map<String,Object>> listRentBillData(WxBillAll wxBillAll);
List<Map<String,Object>> listRentDepositBillData(WxBillAll wxBillAll);
List<Map<String,Object>> listPropertyBillData(WxBillAll wxBillAll);


+ 95
- 33
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Datei anzeigen

@@ -158,6 +158,9 @@ public class WxBillAllServiceImpl implements WxBillAllService {
@Autowired
WxPayBillMapper wxPayBillMapper;
@Autowired
WxMerchantMapper wxMerchantMapper;

@Override
public Map<String, Object> listAsPage(WxBillAll record, Integer pageIndex, Integer pageSize) {
@@ -167,7 +170,8 @@ public class WxBillAllServiceImpl implements WxBillAllService {
List<Integer> typeList = JSONArray.parseArray(record.getTypeStr(), Integer.class);
record.setTypeList(typeList);
}
PageInfo<WxBillAllVo> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBillAllMapper.list(record));
PageHelper.startPage(pageIndex, pageSize);
PageInfo<WxBillAllVo> pageInfo = new PageInfo<>(list(record));

//手续费 = 合同应收+手续费+滞纳金
pageInfo.getList().stream().forEach(e -> {
@@ -179,6 +183,67 @@ public class WxBillAllServiceImpl implements WxBillAllService {
result.put("pageInfo", pageInfo);
return result;
}
private List<WxBillAllVo> list(WxBillAll wxBillAll) {
List<WxBillAllVo> retList = null;
wxBillAll.setBillTypeValue(EnumBillQueryType.getRealType(wxBillAll.getBillTypeValue()));
if (!StringUtils.isBlank(wxBillAll.getMerchantName())) {
WxMerchant wxMerchantQ = new WxMerchant();
wxMerchantQ.setName(StringUtils.trimToNull(wxBillAll.getMerchantName()));
List<Long> mids = wxMerchantMapper.findIdList(wxMerchantQ);
if (null != mids && mids.size() > 0 ) {
wxBillAll.setMerchantIdList(mids);
}
}
if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.RENT.getCode());
retList = wxBillAllMapper.listRentBill(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_DEPOSIT.getCode());
retList = wxBillAllMapper.listRentDepositBill(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY.getCode());
retList = wxBillAllMapper.listPropertyBill(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY_DEPOSIT.getCode());
retList = wxBillAllMapper.listPropertyDepositBill(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.WATER_POWER_AIR.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.WATER_POWER_AIR.getCode());
retList = wxBillAllMapper.listDailyBill(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER.getCode());
retList = wxBillAllMapper.listOtherBill(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER_DEPOSIT.getCode());
retList = wxBillAllMapper.listOtherDepositBill(wxBillAll);
} else {
logger.info("账单不存在");
}
if (null != retList && retList.size() > 0 ){
for (int i = 0 ; i < retList.size(); i ++) {
WxBillAllVo vo = retList.get(i);
if( null!= vo.getMerchantId() ) {
WxMerchant wxMerchantQ = new WxMerchant();
wxMerchantQ.setId(vo.getMerchantId());
List<WxMerchant> mlist = wxMerchantMapper.findIdNameList(wxMerchantQ);
if (null != mlist && mlist.size() > 0 ) {
vo.setMerchantName(mlist.get(0).getName());
}
}
if (null != vo.getShopId()) {
Map param = new HashMap();
param.put("id", vo.getShopId());
Map<String, Object> shop = wxShopMapper.getMerchantShopByShopId(param);
if ( null != shop) {
vo.setShopNumber((String)shop.get("shopNumber"));
vo.setManager((String)shop.get("manager"));
vo.setManagerPhone((String)shop.get("managerPhone"));
}
}
}
}
return retList;
}

public void cmputeTotalMoney(WxPayAccountBill wxPayAccountBill, WxBillAllVo e) {
if (e.getReceivePay() != null) {
@@ -227,35 +292,33 @@ public class WxBillAllServiceImpl implements WxBillAllService {
public List<Map<String, Object>> listBill(WxBillAll wxBillAll,WxMerchant wxMerchant,boolean hasShop,boolean hasPayBill,boolean hasReceivePay){
List<Map<String, Object>> maps = null;
//账单类型
if (wxBillAll.getBillTypeValue() != null) {
wxBillAll.setBillTypeValue(EnumBillQueryType.getRealType(wxBillAll.getBillTypeValue()));
if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.RENT.getCode());
maps = wxBillAllMapper.listRentBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_DEPOSIT.getCode());
maps = wxBillAllMapper.listRentDepositBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY.getCode());
maps = wxBillAllMapper.listPropertyBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY_DEPOSIT.getCode());
maps = wxBillAllMapper.listPropertyDepositBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.WATER_POWER_AIR.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.WATER_POWER_AIR.getCode());
maps = wxBillAllMapper.listDailyBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER.getCode());
maps = wxBillAllMapper.listOtherBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER_DEPOSIT.getCode());
maps = wxBillAllMapper.listOtherDepositBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.SETTLE.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.SETTLE.getCode());
maps = wxBillAllMapper.listSettleBillData(wxBillAll);
} else {
logger.info("账单不存在");
}
wxBillAll.setBillTypeValue(EnumBillQueryType.getRealType(wxBillAll.getBillTypeValue()));
if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.RENT.getCode());
maps = wxBillAllMapper.listRentBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.RENT_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.RENT_DEPOSIT.getCode());
maps = wxBillAllMapper.listRentDepositBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY.getCode());
maps = wxBillAllMapper.listPropertyBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.PROPERTY_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.PROPERTY_DEPOSIT.getCode());
maps = wxBillAllMapper.listPropertyDepositBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.WATER_POWER_AIR.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.WATER_POWER_AIR.getCode());
maps = wxBillAllMapper.listDailyBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER.getCode());
maps = wxBillAllMapper.listOtherBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.OTHER_DEPOSIT.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.OTHER_DEPOSIT.getCode());
maps = wxBillAllMapper.listOtherDepositBillData(wxBillAll);
} else if (wxBillAll.getBillTypeValue().equals(EnumBillQueryType.SETTLE.getCode())) {
wxBillAll.setBillTypeValue(EnumBillQueryType.SETTLE.getCode());
maps = wxBillAllMapper.listSettleBillData(wxBillAll);
} else {
logger.info("账单不存在");
}
if (null != maps) {
for (Map<String, Object> map : maps) {
@@ -395,8 +458,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {

@Override
public void exportBill(HttpServletRequest request, HttpServletResponse response, WxBillAll wxBillAll) {

Map<Long, List<WxBillAllVo>> collect = wxBillAllMapper.list(wxBillAll)
Map<Long, List<WxBillAllVo>> collect = list(wxBillAll)
.stream().filter(b -> null != b.getMerchantId())
.collect(Collectors.groupingBy(WxBillAllVo::getMerchantId));
Set<Map.Entry<Long, List<WxBillAllVo>>> entries = collect.entrySet();
@@ -827,7 +889,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
result.put("endtime", " ");
}
Integer filterHasPay = wxBillAll.getFilterHasPay();
List<WxBillAllVo> list = wxBillAllMapper.list(wxBillAll);
List<WxBillAllVo> list = list(wxBillAll);
if (!list.isEmpty()) {
//租金总额
Long rentSum = list.stream().filter(b -> b.getBillTypeValue().equals(EnumBillTypeParam.RENT.getCode()))


+ 76
- 108
mallinkService/src/main/resources/mapper/WxBillAllMapper.xml Datei anzeigen

@@ -46,112 +46,8 @@
<result column="service_charge_pay" property="serviceChargePay"/>

</resultMap>


<select id="list" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">

select
bill.id,bill.tenant_id tenantId,bill.parent_tenant_id parentTenantId,bill.merchant_id merchantId,bill.shop_id shopId,
bill.bill_type_value billTypeValue,bill.bill_type billType,bill.need_pay needPay,
bill.receive_pay receivePay,bill.pay,bill.owe,bill.receive_date receiveDate,
bill.pay_date payDate,expired_day expiredDay,bill.status,bill.starttime,
bill.endtime,bill.name,bill.rent_shop_type rentShopType,m.name merchantName,
s.shop_number shopNumber, s.manager, s.manager_phone managerPhone,bill.shop_info
shopInfo,bill.comments,bill.price_detail,updatetime,bill.freeze,bill.late_pay_price,bill.service_charge_pay
from (
select id,merchant_id,shop_id,tenant_id,parent_tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,''
price_detail,updatetime,freeze,ifnull(late_pay_price,0) late_pay_price,service_charge_pay
from wx_bill_rent
where is_preview = 0
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
union all
select id,merchant_id,shop_id,tenant_id,parent_tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze,0
late_pay_price,0 service_charge_pay
from wx_bill_rent_deposit
where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
union all
select id,merchant_id,shop_id,tenant_id,parent_tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,''
price_detail,updatetime,freeze,ifnull(late_pay_price,0) late_pay_price,service_charge_pay
from wx_bill_property
where is_preview = 0
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
union all
select id,merchant_id,shop_id,tenant_id,parent_tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze,0
late_pay_price,0 service_charge_pay
from wx_bill_property_deposit
where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
union all
select id,merchant_id,shop_id,tenant_id,parent_tenant_id,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name,
case when type=1 then 5 when type=2 then 6 else 9 end bill_type_value,
case when type=1 then '水费' when type=2 then '电费' else '空调费' end bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info, NULL comments,price_detail,updatetime,freeze,0 late_pay_price,service_charge_pay
from wx_bill_daily where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
union all
select id,merchant_id,shop_id,tenant_id,parent_tenant_id,name,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze,0 late_pay_price,service_charge_pay
from wx_bill_other
where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
union all
select id,merchant_id,shop_id,tenant_id,parent_tenant_id,comments as name,8 bill_type_value,concat('其他押金-',comments) as
bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze,0 late_pay_price,service_charge_pay
from wx_bill_other_deposit
where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
) bill
left join wx_merchant m on bill.merchant_id=m.id
left join wx_shop s on bill.shop_id=s.id
where 1=1
<sql id = "billConditionSql" >
<if test=" null != tenantId and '' != tenantId">
and bill.`tenant_id` = #{tenantId}
</if>
@@ -161,7 +57,6 @@
<if test=" null != month and ''!=month">
and date_format(bill.receive_date,'%Y-%m')=#{month}
</if>
<if test=" null != merchantName and ''!=merchantName ">and m.`name` like concat('%',#{merchantName},'%')</if>
<if test=" null != billTypeValue ">and bill.bill_type_value = #{billTypeValue}</if>
<if test=" null != status ">and bill.`status` = #{status}</if>
<if test=" null != rentShopType ">and bill.rent_shop_type = #{rentShopType}</if>
@@ -186,11 +81,85 @@
</if>
<if test=" null != freeze ">and bill.freeze = #{freeze}</if>
<if test=" null != id ">and bill.id = #{id}</if>
<if test=" null != merchantIdList ">
and bill.`merchant_id` in
<foreach collection="merchantIdList" index="index" item="merchantIdItem" open="(" separator="," close=")">
#{merchantIdItem}
</foreach>
</if>
<if test=" null != sortColumns"> order by ${sortColumns} </if>
<if test=" null == sortColumns"> order by bill.receive_date,bill.id desc,bill.merchant_id,bill.status</if>
</sql>

<select id="listRentBill" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">
select id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'租金' name,1 billTypeValue,'租金' billType,
need_pay needPay,receive_pay receivePay,pay,owe,receive_date receiveDate,pay_date payDate,expired_day expiredDay,status,starttime,
endtime,rent_shop_type rentShopType,
case when shop_info is null then '[]' else shop_info end shopInfo,
comments,'' price_detail,updatetime,freeze,ifnull(late_pay_price,0) late_pay_price,service_charge_pay
from wx_bill_rent bill
where is_preview = 0
<include refid="billConditionSql"/>
</select>
<select id="listRentDepositBill" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">
select id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'租赁押金' name,2 billTypeValue,'租赁押金' billType,
need_pay needPay,receive_pay receivePay,pay,owe,receive_date receiveDate,pay_date payDate,expired_day expiredDay,status,starttime,
endtime,rent_shop_type rentShopType,shop_info shopInfo,NULL comments,'' price_detail,updatetime,freeze,0 late_pay_price,0 service_charge_pay
from wx_bill_rent_deposit bill
where bill.`tenant_id` = #{tenantId}
<include refid="billConditionSql"/>
</select>
<select id="listPropertyBill" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">
select id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'物业费' name,3 billTypeValue,'物业费' billType,
need_pay needPay,receive_pay receivePay,pay,owe,receive_date receiveDate,pay_date payDate,expired_day expiredDay,status,starttime,
endtime,rent_shop_type rentShopType,case when shop_info is null then '[]' else shop_info end shopInfo,comments,'' price_detail,updatetime,
freeze,ifnull(late_pay_price,0) late_pay_price,service_charge_pay
from wx_bill_property bill
where is_preview = 0
<include refid="billConditionSql"/>
</select>
<select id="listPropertyDepositBill" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">
select id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,'物业押金' name,4 billTypeValue,'物业押金' billType,
need_pay needPay,receive_pay receivePay,pay,owe,receive_date receiveDate,pay_date payDate,expired_day expiredDay,status,starttime,
endtime,rent_shop_type rentShopType,shop_info shopInfo,NULL comments,'' price_detail,updatetime,freeze,0 late_pay_price,0 service_charge_pay
from wx_bill_property_deposit bill
where bill.`tenant_id` = #{tenantId}
<include refid="billConditionSql"/>
</select>
<select id="listDailyBill" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">
select id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,case when type=1 then '水费' when type=2 then '电费' else '空调费' end name,
case when type=1 then 5 when type=2 then 6 else 9 end billTypeValue,
case when type=1 then '水费' when type=2 then '电费' else '空调费' end billType,
0 as needPay,receive_pay receivePay,pay,owe,receive_date receiveDate,pay_date payDate,expired_day expiredDay,status,starttime,endtime,
rent_shop_type rentShopType,'[]' shopInfo, NULL comments,price_detail,updatetime,freeze,0 late_pay_price,service_charge_pay
from wx_bill_daily bill
where bill.`tenant_id` = #{tenantId}
<include refid="billConditionSql"/>
</select>
<select id="listOtherBill" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">
select id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,name,7 billTypeValue,concat('其他费用-',name) as billType,
0 as need_pay needPay,receive_pay receivePay,pay,owe,receive_date receiveDate,pay_date payDate,expired_day expiredDay,status,starttime,endtime,
rent_shop_type rentShopType,'[]' shopInfo,comments,'' price_detail,updatetime,freeze,0 late_pay_price,service_charge_pay
from wx_bill_other bill
where bill.`tenant_id` = #{tenantId}
<include refid="billConditionSql"/>
</select>
<select id="listOtherDepositBill" parameterType="com.iformall.domain.vo.WxBillAll" resultMap="allVoResultMap">
select id,merchant_id merchantId,shop_id shopId,tenant_id tenantId,parent_tenant_id parentTenantId,comments as name,8 billTypeValue,concat('其他押金-',comments) as
billType,0 as needPay,receive_pay receivePay,pay,owe,receive_date receiveDate,pay_date payDate,expired_day expiredDay,status,starttime,endtime,
rent_shop_type rentShopType,'[]' shopInfo,comments,'' price_detail,updatetime,freeze,0 late_pay_price,service_charge_pay
from wx_bill_other_deposit bill
where bill.`tenant_id` = #{tenantId}
<include refid="billConditionSql"/>
</select>
<select id="queryOweInfo" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap">
@@ -327,7 +296,6 @@
#{status}
</foreach>
</if>
<if test="null!=starttime and null!=endtime and ''!=starttime and ''!=endtime ">
and DATE_FORMAT(bill.receive_date,'%Y-%m') between #{starttime} and #{endtime}
</if>


+ 1
- 1
mallinkService/src/main/resources/mapper/WxShopMapper.xml Datei anzeigen

@@ -430,7 +430,7 @@
<select id="getMerchantShopByShopId" resultType="hashmap" parameterType="hashmap">
select
s.id,s.build_area buildArea,s.operation_area operationArea,s.shop_number shopNumber
s.id,s.build_area buildArea,s.operation_area operationArea,s.shop_number shopNumber, s.manager, s.manager_phone managerPhone
from wx_shop s
where s.id = #{id} and s.is_del=0
</select>


Laden…
Abbrechen
Speichern