|
|
|
@@ -32,6 +32,7 @@ import com.iformall.service.WxBillActionService; |
|
|
|
import com.iformall.service.WxBillOtherDepositService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
import com.iformall.service.WxPayAccountBillService; |
|
|
|
import com.iformall.service.helper.WxBillAllHelper; |
|
|
|
import com.iformall.utils.DateUtils; |
|
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
@@ -80,6 +81,10 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements |
|
|
|
@Lazy |
|
|
|
@Autowired |
|
|
|
WxMerchantService wxMerchantService; |
|
|
|
|
|
|
|
@Lazy |
|
|
|
@Autowired |
|
|
|
WxBillAllHelper wxBillAllHelper; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxBillOtherDeposit> listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize) { |
|
|
|
@@ -570,5 +575,37 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements |
|
|
|
this.addBillAction(EnumBillAction.BAD, dto.getBillTypeValue(),dto.getId(), |
|
|
|
badMoney, badMoney,null,null,dto.getRemark(), user); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void stopMerchantBills(WxMerchant wxMerchant, MallUserInfo userInfo) { |
|
|
|
WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit(); |
|
|
|
wxBillRent.setMerchantId(wxMerchant.getId()); |
|
|
|
wxBillRent.updateTenantInfo(wxMerchant); |
|
|
|
List<WxBillOtherDeposit> brList = wxBillOtherDepositMapper.findList(wxBillRent); |
|
|
|
List<WxBillOtherDeposit> realRentList = new ArrayList<WxBillOtherDeposit>(); |
|
|
|
List<WxBillAction> actionList = new ArrayList<WxBillAction>(); |
|
|
|
Date current = DateUtils.getDayEnd(new Date()); |
|
|
|
if (null != brList && brList.size() > 0 ) { |
|
|
|
for (int i = 0 ; i < brList.size() ; i ++ ) { |
|
|
|
WxBillOtherDeposit brent = brList.get(i); |
|
|
|
WxBillAction action = new WxBillAction(); |
|
|
|
boolean isUpdate = wxBillAllHelper.billEndCalcute(2,current, brent, action, true); |
|
|
|
if (isUpdate) { |
|
|
|
realRentList.add(brent); |
|
|
|
actionList.add(action); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0 ; i < realRentList.size() ; i ++) { |
|
|
|
WxBillOtherDeposit rbrent = realRentList.get(i); |
|
|
|
wxBillOtherDepositMapper.updateById(rbrent); |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0 ; i < actionList.size() ; i ++) { |
|
|
|
WxBillAction ba = actionList.get(i); |
|
|
|
this.addBillAction(ba, userInfo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |