Sfoglia il codice sorgente

Merge commit 'ae3b56bbe42914b3096eca4ad3335fda6c1b9340' into release

release_toaliyun_real
luozukai 6 anni fa
parent
commit
b306a4b4f1
4 ha cambiato i file con 27 aggiunte e 27 eliminazioni
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java
  2. +20
    -20
      mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java
  4. +5
    -5
      mallinkService/src/main/resources/mapper/WxBusinessMapper.xml

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/rent/WxBillSettleController.java Vedi File

@@ -60,7 +60,7 @@ public class WxBillSettleController extends BaseController {
@SystemControllerLog(description = "账单管理-结算单-id查找") @SystemControllerLog(description = "账单管理-结算单-id查找")
public ResultData findById(Long id) { public ResultData findById(Long id) {
logger.debug("[" + getIpAddr() + "] WxBillSettleController::findById"); logger.debug("[" + getIpAddr() + "] WxBillSettleController::findById");
return new ResultData(Result.SUCCESS, "查询成功", wxBillSettleService.getById(id, EnumFilterSettle.NO.getCode()));
return new ResultData(Result.SUCCESS, "查询成功", wxBillSettleService.getById(id, EnumFilterSettle.YES.getCode()));
} }


@PostMapping("addOrUpdate") @PostMapping("addOrUpdate")


+ 20
- 20
mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java Vedi File

@@ -170,9 +170,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillRent dbBill = wxBillRentMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillRent dbBill = wxBillRentMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getOwe());
wxBillRent.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent);
@@ -187,9 +187,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillDeposit dbBill = wxBillDepositMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillDeposit dbBill = wxBillDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getOwe());
wxBillRent.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillDepositMapper.updateByPrimaryKeySelective(wxBillRent); wxBillDepositMapper.updateByPrimaryKeySelective(wxBillRent);
@@ -204,9 +204,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
wxBillOtherDeposit.setPay(dbBill.getOwe());
wxBillOtherDeposit.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillOtherDeposit); wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillOtherDeposit);
@@ -221,9 +221,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
propertyDeposit.setPay(dbBill.getOwe());
propertyDeposit.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillPropertyDepositMapper.updateByPrimaryKeySelective(propertyDeposit); wxBillPropertyDepositMapper.updateByPrimaryKeySelective(propertyDeposit);
@@ -239,9 +239,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillProperty dbBill = wxBillPropertyMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillProperty dbBill = wxBillPropertyMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getOwe());
wxBillRent.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillPropertyMapper.updateByPrimaryKeySelective(wxBillRent); wxBillPropertyMapper.updateByPrimaryKeySelective(wxBillRent);
@@ -256,9 +256,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
propertyDeposit.setPay(dbBill.getOwe());
propertyDeposit.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillPropertyDepositMapper.updateByPrimaryKeySelective(propertyDeposit); wxBillPropertyDepositMapper.updateByPrimaryKeySelective(propertyDeposit);
@@ -273,9 +273,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOther dbBill = wxBillOtherMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillOther dbBill = wxBillOtherMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getOwe());
wxBillRent.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillOtherMapper.updateByPrimaryKeySelective(wxBillRent); wxBillOtherMapper.updateByPrimaryKeySelective(wxBillRent);
@@ -290,9 +290,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getOwe());
wxBillRent.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillRent); wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillRent);
@@ -315,9 +315,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getOwe());
wxBillRent.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillRent); wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillRent);
@@ -332,9 +332,9 @@ public class WxBillSettleServiceImpl implements WxBillSettleService {
if(EnumBillRentStatus.PAID.getCode().equals(status)){ if(EnumBillRentStatus.PAID.getCode().equals(status)){
WxBillDaily dbBill = wxBillDailyMapper.selectByPrimaryKey(wxBillRent.getId()); WxBillDaily dbBill = wxBillDailyMapper.selectByPrimaryKey(wxBillRent.getId());
if(dbBill!=null) { if(dbBill!=null) {
wxBillRent.setPay(dbBill.getOwe());
wxBillRent.setPay(dbBill.getReceivePay());
wxBillRent.setPayDate(new Date()); wxBillRent.setPayDate(new Date());
addBillAction(bill.getBillId(), dbBill.getOwe());
addBillAction(bill.getBillId(), dbBill.getReceivePay());
} }
} }
wxBillDailyMapper.updateByPrimaryKeySelective(wxBillRent); wxBillDailyMapper.updateByPrimaryKeySelective(wxBillRent);


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java Vedi File

@@ -132,7 +132,7 @@ public class WxBusinessServiceImpl implements WxBusinessService {
e.put("rent",0); e.put("rent",0);
}else { }else {
BigDecimal area = new BigDecimal(e.get("area").toString()); BigDecimal area = new BigDecimal(e.get("area").toString());
if (area.longValue() > 0) {
if (area.doubleValue() > 0) {
BigDecimal areaRatio = businessSumMoney.divide(area, 2, BigDecimal.ROUND_HALF_UP).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP); BigDecimal areaRatio = businessSumMoney.divide(area, 2, BigDecimal.ROUND_HALF_UP).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP);
e.put("rent", areaRatio.toBigInteger()); e.put("rent", areaRatio.toBigInteger());
} }


+ 5
- 5
mallinkService/src/main/resources/mapper/WxBusinessMapper.xml Vedi File

@@ -86,13 +86,13 @@
round( round(
(select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt))
from wx_merchant m from wx_merchant m
left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
/100,2) volume, /100,2) volume,
round( round(
(select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt))
from wx_merchant m from wx_merchant m
left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
/ /
(select if(sum(ws.operation_area) is null,0,sum(ws.operation_area)) (select if(sum(ws.operation_area) is null,0,sum(ws.operation_area))
from wx_merchant m from wx_merchant m
@@ -105,15 +105,15 @@
from wx_merchant m from wx_merchant m
left join wx_merchant_shop mtd on mtd.merchant_id = m.id left join wx_merchant_shop mtd on mtd.merchant_id = m.id
left join wx_shop ws on(mtd.shop_id = ws.id) left join wx_shop ws on(mtd.shop_id = ws.id)
where m.business_id = b.id and m.tenant_id=456 and m.status = 1 and m.is_del = 0 )area,
where m.business_id = b.id and m.tenant_id=#{tenantId} and m.status = 1 and m.is_del = 0 )area,
round( round(
(select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt)) (select if(sum(mtd.trade_amt) is null,0,sum(mtd.trade_amt))
from wx_merchant m from wx_merchant m
left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) /
left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 ) /
(select sum(mtd.trade_count) (select sum(mtd.trade_count)
from wx_merchant m from wx_merchant m
left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and mtd.report_date between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
left join wx_merchant_trade_daily mtd on mtd.merchant_id = m.id where m.business_id = b.id and m.tenant_id=#{tenantId} and STR_TO_DATE(mtd.report_date,'%Y-%m-%d') between #{startdate} and #{enddate} and m.status = 1 and m.is_del = 0 )
/100,2) comPrice /100,2) comPrice
from wx_business b from wx_business b


Caricamento…
Annulla
Salva