Browse Source

[合同][修改][开发结算单]

release_toaliyun_real
luozukai 6 years ago
parent
commit
90f9c24d3c
6 changed files with 50 additions and 10 deletions
  1. +0
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java
  2. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillSettle.java
  3. +1
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillSettleMapper.java
  4. +32
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java
  5. +1
    -1
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml
  6. +12
    -7
      mallinkService/src/main/resources/mapper/WxBillSettleMapper.xml

+ 0
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java View File

@@ -192,7 +192,6 @@ public class WxBillRent extends BaseEntity {
private String latePayMoneyBefore;
@Transient
private String latePayMoneyUpdate;
@Transient
private String busDiscountRatio;

@io.swagger.annotations.ApiModelProperty(value = "冻结状态,0正常1冻结", name = "freeze")


+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillSettle.java View File

@@ -93,4 +93,8 @@ public class WxBillSettle extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="流向 0流入 1流出",name="direction")
private Integer direction;

@Transient
private Integer limitStart;
@Transient
private Integer limitEnd;
}

+ 1
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillSettleMapper.java View File

@@ -11,6 +11,7 @@ public interface WxBillSettleMapper extends CommonMapper<WxBillSettle, Long> {

List<WxBillSettle> findList(WxBillSettle wxBillSettle);


void update(WxBillSettle record);




+ 32
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java View File

@@ -12,6 +12,7 @@ import com.iformall.service.ExcelService;
import com.iformall.service.WxBillSettleService;
import com.iformall.service.WxFlowService;
import com.iformall.utils.DateUtils;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -20,6 +21,7 @@ import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
* @author luozukai
@@ -58,7 +60,36 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {

@Override
public PageInfo<WxBillSettle> listAsPage(WxBillSettle record, Integer pageIndex, Integer pageSize) {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBillSettleMapper.findList(record));
record.setLimitStart(0);
record.setLimitEnd(Integer.MAX_VALUE);
List totalList = wxBillSettleMapper.findList(record);
if(CollectionUtils.isEmpty(totalList)){
PageHelper.startPage(pageIndex, pageSize);
PageInfo<WxBillSettle> pageInfo = new PageInfo(new ArrayList());
pageInfo.setPages(0);
pageInfo.setTotal(0);
PageHelper.clearPage();
return pageInfo;
}

int total = totalList.size();
int pages;
if(total % pageSize == 0){
pages = total / pageSize;
}else{
pages = total / pageSize +1;
}
record.setLimitStart((pageIndex -1) * pageSize);
record.setLimitEnd(pageSize);
List<WxBillSettle> list = wxBillSettleMapper.findList(record);

PageHelper.startPage(pageIndex, pageSize);
PageInfo<WxBillSettle> pageInfo = new PageInfo(list);
pageInfo.setPages(pages);
pageInfo.setTotal(total);
PageHelper.clearPage();
return pageInfo;

}

@Override


+ 1
- 1
mallinkService/src/main/resources/mapper/WxBillRentMapper.xml View File

@@ -105,7 +105,7 @@
r.pay_ratio,br.`revenue`,r.`late_pay_ratio`,br.`late_pay_time`,br.`period`,br.`rent_contract_id`,
d.receive_pay deposit,d.`status`
deposit_status,br.late_pay_price,br.shop_info,br.pay_way,br.late_pay_status,br.`comments`,br.starttime,br.endtime,
r.late_pay_day,r.late_pay_ratio,br.bus_discount_ratio,br.freeze
r.late_pay_day,r.late_pay_ratio,br.bus_discount_ratio,br.freeze,br.join_rent_price
from wx_bill_rent br
left join wx_shop s on br.shop_id=s.id
left join wx_rent_contract r on br.rent_contract_id=r.id


+ 12
- 7
mallinkService/src/main/resources/mapper/WxBillSettleMapper.xml View File

@@ -36,13 +36,15 @@
<if test=" null != settleNumber and settleNumber !='' ">and tt.`settle_number` = #{settleNumber}</if>
<if test=" null != status and status !=''">and tt.`status` = #{status}</if>
<if test=" null != applyStatus and applyStatus !=''">and tt.`apply_status` = #{applyStatus}</if>
<if test=" null != direction and direction !=''">
<if test="0 == direction">
balance >0
</if>
<if test="1 == direction">
balance &lt;0
</if>
<if test="0 == direction">
and (tt.receiveMoney-tt.payMoney-
(select IFNULL(sum(settle_money),0) from wx_bill_settle_record where settle_id = tt.id)
) >0
</if>
<if test="1 == direction">
and (tt.receiveMoney-tt.payMoney-
(select IFNULL(sum(settle_money),0) from wx_bill_settle_record where settle_id = tt.id)
) &lt;0
</if>

<if test=" null != sortColumns">order by ${sortColumns}</if>
@@ -133,6 +135,9 @@
) tt

<include refid="dynamicWhereConditions"/>
<if test="null != limitStart and null != limitEnd">
limit #{limitStart},#{limitEnd}
</if>
</select>




Loading…
Cancel
Save