| @@ -20,6 +20,7 @@ import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
| import java.util.HashMap; | import java.util.HashMap; | ||||
| import java.util.List; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| @@ -176,6 +177,36 @@ public class WxFinanceController extends BaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @GetMapping("getMerchantAdvance") | |||||
| public ResultData getMerchantAdvance(@ModelAttribute WxFinanceAdvance record) { | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| if (null == record.getMerchantId()) { | |||||
| return new ResultData(Result.ERROR,"请选择商户"); | |||||
| } | |||||
| record.setIsDel(EnumYesOrNo.NO.getCode()); | |||||
| List<WxFinanceAdvance> advanceList = wxFinanceService.getMerchantAdvanceGroupSumList(record); | |||||
| BigDecimal total = new BigDecimal(0); | |||||
| Map retMap = new HashMap(); | |||||
| if (null != advanceList && advanceList.size() > 0 ) { | |||||
| WxFinanceAdvanceType fat = new WxFinanceAdvanceType(); | |||||
| fat.updateTenantInfo(record); | |||||
| Map<Long, WxFinanceAdvanceType> advanceTypMap = wxFinanceService.getAdvanceTypeMap(fat); | |||||
| for (int i = 0 ; i < advanceList.size() ; i++) { | |||||
| WxFinanceAdvance at = advanceList.get(i); | |||||
| if (null != advanceTypMap) { | |||||
| WxFinanceAdvanceType wfat = advanceTypMap.get(at.getAdvanceTypeId()); | |||||
| if (null != wfat) { | |||||
| at.setAdvanceTypeName(wfat.getName()); | |||||
| } | |||||
| total.add(new BigDecimal(at.getRemainMoney())); | |||||
| } | |||||
| } | |||||
| } | |||||
| retMap.put("total", total); | |||||
| retMap.put("details", advanceList); | |||||
| return new ResultData(retMap); | |||||
| } | |||||
| @ApiOperation("新增收款单") | @ApiOperation("新增收款单") | ||||
| @PostMapping("createReceive") | @PostMapping("createReceive") | ||||
| public ResultData createReceive(@RequestBody WxFinanceAdvanceType record) { | public ResultData createReceive(@RequestBody WxFinanceAdvanceType record) { | ||||
| @@ -13,6 +13,7 @@ import com.iformall.domain.dto.WxBillReceiveUpdateDTO; | |||||
| import com.iformall.domain.po.SysConfig; | import com.iformall.domain.po.SysConfig; | ||||
| import com.iformall.domain.po.WxBillAction; | import com.iformall.domain.po.WxBillAction; | ||||
| import com.iformall.domain.po.WxBillPayWay; | import com.iformall.domain.po.WxBillPayWay; | ||||
| import com.iformall.domain.po.WxEnergyFees; | |||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxUserDataRule; | import com.iformall.domain.po.WxUserDataRule; | ||||
| import com.iformall.domain.po.base.WxBillBaseEntity; | import com.iformall.domain.po.base.WxBillBaseEntity; | ||||
| @@ -31,9 +32,11 @@ import com.iformall.enums.EnumYesOrNo; | |||||
| import com.iformall.service.ExcelService; | import com.iformall.service.ExcelService; | ||||
| import com.iformall.service.SysConfigService; | import com.iformall.service.SysConfigService; | ||||
| import com.iformall.service.WxBillActionService; | import com.iformall.service.WxBillActionService; | ||||
| import com.iformall.service.WxEnergyService; | |||||
| import com.iformall.service.WxFinanceService; | import com.iformall.service.WxFinanceService; | ||||
| import com.iformall.service.WxMerchantService; | import com.iformall.service.WxMerchantService; | ||||
| import com.iformall.service.WxPayAccountBillService; | import com.iformall.service.WxPayAccountBillService; | ||||
| import com.iformall.service.WxShopService; | |||||
| import com.iformall.service.helper.WxBillAllHelper; | import com.iformall.service.helper.WxBillAllHelper; | ||||
| import com.iformall.utils.Constant; | import com.iformall.utils.Constant; | ||||
| @@ -84,6 +87,12 @@ public class WxBillAllController extends BillBaseController { | |||||
| @Autowired | @Autowired | ||||
| WxFinanceService wxFinanceService; | WxFinanceService wxFinanceService; | ||||
| @Autowired | |||||
| WxShopService wxShopSerivce; | |||||
| @Autowired | |||||
| WxEnergyService wxEnergyService; | |||||
| /** | /** | ||||
| * 商户账单汇总计费列表 | * 商户账单汇总计费列表 | ||||
| * @param wxMerchant | * @param wxMerchant | ||||
| @@ -712,6 +721,44 @@ public class WxBillAllController extends BillBaseController { | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| //商户可以缴费账单,临期账单以内都可以缴费 | |||||
| @GetMapping("merchantPayBills") | |||||
| public ResultData merchantPayBills(@ModelAttribute WxMerchant wxMerchant) { | |||||
| if (null == wxMerchant.getId()) { | |||||
| return new ResultData(Result.ERROR,"请选择商户"); | |||||
| } | |||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||||
| wxMerchant.setNeedPayPreDays(getNearBillBeforeDays()); | |||||
| List<WxBillBaseEntity> list = billAllHelper.getMerchantBillList(wxMerchant); | |||||
| if (null != list && list.size() > 0 ) { | |||||
| List<Long> merchnatIds = new ArrayList<Long>(); | |||||
| merchnatIds.add(wxMerchant.getId()); | |||||
| Map<Long, String> msMap = wxShopSerivce.getMerchantShopNumberMap(wxMerchant, merchnatIds, EnumYesOrNo.NO.getCode()); | |||||
| String shopNumber = ""; | |||||
| if (null != msMap) { | |||||
| shopNumber = msMap.get(wxMerchant.getId()); | |||||
| } | |||||
| WxMerchant m = wxMerchantService.selectById(wxMerchant.getId()); | |||||
| WxEnergyFees fq = new WxEnergyFees(); | |||||
| fq.updateTenantInfo(m); | |||||
| Map<Long, WxEnergyFees> feesMap = wxEnergyService.getFeesMap(fq); | |||||
| for (int i = 0 ; i < list.size(); i++) { | |||||
| WxBillBaseEntity be = list.get(i); | |||||
| if (StringUtils.isBlank(be.getShopNumber())) { | |||||
| be.setShopNumber(shopNumber); | |||||
| } | |||||
| if (null != feesMap) { | |||||
| WxEnergyFees fees = feesMap.get(be.getEnergyFeesId()); | |||||
| if (null != fees) { | |||||
| be.setEnergyFeesName(fees.getName()); | |||||
| } | |||||
| } | |||||
| be.setMerchantName(m.getName()); | |||||
| } | |||||
| } | |||||
| return new ResultData(); | |||||
| } | |||||
| //###################################### 老代码 ###################################### | //###################################### 老代码 ###################################### | ||||
| // | // | ||||
| @@ -27,7 +27,8 @@ public class UrlCheck { | |||||
| || url.contains("/merchantPoi/importPoi") | || url.contains("/merchantPoi/importPoi") | ||||
| || url.contains("/merchantPoi/addLocationInfo") | || url.contains("/merchantPoi/addLocationInfo") | ||||
| || url.contains("/merchantPoi/importMerchantInitByPoi") | || url.contains("/merchantPoi/importMerchantInitByPoi") | ||||
| || url.contains("/couponPassword/importPrice"); | |||||
| || url.contains("/couponPassword/importPrice") | |||||
| || url.contains("/energy/readingCalcuteExport"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -23,9 +23,6 @@ import java.util.List; | |||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class WxBillDeposit extends WxBillBaseEntity { | public class WxBillDeposit extends WxBillBaseEntity { | ||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| @Excel(name = "租金合同ID", width = 20, orderNum = "1") | @Excel(name = "租金合同ID", width = 20, orderNum = "1") | ||||
| @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") | @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") | ||||
| private Long rentContractId; | private Long rentContractId; | ||||
| @@ -102,10 +102,6 @@ public class WxBillProperty extends WxBillBaseEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer allPeriod; | private Integer allPeriod; | ||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| //@Excel(name = "押金状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6", "无押金_0"}, width = 20, orderNum = "3") | //@Excel(name = "押金状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6", "无押金_0"}, width = 20, orderNum = "3") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer depositStatus; | private Integer depositStatus; | ||||
| @@ -26,9 +26,6 @@ import java.util.List; | |||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class WxBillPropertyDeposit extends WxBillBaseEntity { | public class WxBillPropertyDeposit extends WxBillBaseEntity { | ||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| @Excel(name = "物业合同ID", width = 20, orderNum = "1") | @Excel(name = "物业合同ID", width = 20, orderNum = "1") | ||||
| @io.swagger.annotations.ApiModelProperty(value="物业合同ID",name="propertyContractId") | @io.swagger.annotations.ApiModelProperty(value="物业合同ID",name="propertyContractId") | ||||
| private Long propertyContractId; | private Long propertyContractId; | ||||
| @@ -169,10 +169,6 @@ public class WxBillRent extends WxBillBaseEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer allPeriod; | private Integer allPeriod; | ||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| //@Excel(name = "押金状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6", "无押金_0"}, width = 20, orderNum = "3") | //@Excel(name = "押金状态", replace = {"欠缴_1", "待缴_2", "已结清_3", "未到期_4", "已退还_5", "失效_6", "无押金_0"}, width = 20, orderNum = "3") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer depositStatus; | private Integer depositStatus; | ||||
| @@ -27,10 +27,6 @@ import java.util.List; | |||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class WxBillRentManage extends WxBillBaseEntity { | public class WxBillRentManage extends WxBillBaseEntity { | ||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| @TableField(exist = false) | |||||
| private String shopNumber; | |||||
| @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") | @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") | ||||
| private Long rentContractId; | private Long rentContractId; | ||||
| @@ -469,4 +469,7 @@ public class WxMerchant extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Long shopId; | private Long shopId; | ||||
| @TableField(exist = false) | |||||
| private Integer needPayPreDays; | |||||
| } | } | ||||
| @@ -141,6 +141,10 @@ public class WxBillBaseEntity extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| public Long floor; | public Long floor; | ||||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||||
| @TableField(exist = false) | |||||
| public String shopNumber; | |||||
| //滞纳金 | //滞纳金 | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| public String billLatePay; | public String billLatePay; | ||||
| @@ -186,4 +190,7 @@ public class WxBillBaseEntity extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| public Integer notifyed; | public Integer notifyed; | ||||
| @TableField(exist = false) | |||||
| private Date needPayStartDay; | |||||
| } | } | ||||
| @@ -15,5 +15,7 @@ public interface WxFinanceAdvanceMapper extends CommonMapper<WxFinanceAdvance, L | |||||
| WxFinanceAdvance selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | WxFinanceAdvance selectById(@Param("id")Long id,@Param("tenantId")String tenantId); | ||||
| void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); | ||||
| List<WxFinanceAdvance> getMerchantAdvanceGroupSumList(WxFinanceAdvance wxBillRent); | |||||
| } | } | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.service; | package com.iformall.service; | ||||
| import java.util.List; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.po.MallUserInfo; | import com.iformall.domain.po.MallUserInfo; | ||||
| @@ -32,6 +33,7 @@ public interface WxFinanceService { | |||||
| WxFinanceAdvance getAdvanceById(TenantEntity tenantEntity,Long id); | WxFinanceAdvance getAdvanceById(TenantEntity tenantEntity,Long id); | ||||
| void saveOrUpdateAdvance(WxFinanceAdvance record,MallUserInfo user); | void saveOrUpdateAdvance(WxFinanceAdvance record,MallUserInfo user); | ||||
| void updateAdvanceIsDel(WxFinanceAdvance record); | void updateAdvanceIsDel(WxFinanceAdvance record); | ||||
| List<WxFinanceAdvance> getMerchantAdvanceGroupSumList(WxFinanceAdvance record); | |||||
| //收款 | //收款 | ||||
| PageInfo<WxFinanceReceive> receiveListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | PageInfo<WxFinanceReceive> receiveListAsPage(WxFinanceReceive record, Integer pageIndex, Integer pageSize); | ||||
| @@ -129,6 +129,10 @@ public class WxBillAllHelper { | |||||
| bill.setNearBillLastTime(getDateBefore(wxMerchant.getNearBillBeforeDays())); | bill.setNearBillLastTime(getDateBefore(wxMerchant.getNearBillBeforeDays())); | ||||
| } | } | ||||
| bill.setStatus(wxMerchant.getBillStatus()); | bill.setStatus(wxMerchant.getBillStatus()); | ||||
| if (null != wxMerchant.getNeedPayPreDays()) { | |||||
| bill.setNeedPayStartDay(getDateBefore(wxMerchant.getNeedPayPreDays())); | |||||
| } | |||||
| } | } | ||||
| public WxBillSum getBillRentSum(WxMerchant wxMerchant,Date starttime, Date enttime) { | public WxBillSum getBillRentSum(WxMerchant wxMerchant,Date starttime, Date enttime) { | ||||
| @@ -561,6 +565,75 @@ public class WxBillAllHelper { | |||||
| return null; | return null; | ||||
| } | } | ||||
| public List<WxBillBaseEntity> getMerchantBillList(WxMerchant wxMerchant) { | |||||
| List<WxBillBaseEntity> retList = new ArrayList<WxBillBaseEntity>(); | |||||
| WxBillRent wxBillRent = new WxBillRent(); | |||||
| updateQueryParm(wxMerchant, wxBillRent,wxMerchant.getStarttime(),wxMerchant.getEndtime()); | |||||
| wxBillRent.setSortColumns("starttime asc"); | |||||
| PageInfo<WxBillRent> rentpage = wxBillRentService.listAsPage(wxBillRent, 1, 30); | |||||
| if (null != rentpage && null != rentpage.getList() && rentpage.getList().size() > 0 ) { | |||||
| retList.addAll(rentpage.getList()); | |||||
| } | |||||
| WxBillRentManage wxBillRentManage = new WxBillRentManage(); | |||||
| updateQueryParm(wxMerchant, wxBillRentManage,wxMerchant.getStarttime(),wxMerchant.getEndtime()); | |||||
| wxBillRentManage.setSortColumns("starttime asc"); | |||||
| PageInfo<WxBillRentManage> managepage = wxBillRentManageService.listAsPage(wxBillRentManage, 1, 30); | |||||
| if (null != managepage && null != managepage.getList() && managepage.getList().size() > 0 ) { | |||||
| retList.addAll(managepage.getList()); | |||||
| } | |||||
| WxBillDeposit wxBillDeposit = new WxBillDeposit(); | |||||
| updateQueryParm(wxMerchant, wxBillDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime()); | |||||
| wxBillDeposit.setSortColumns("starttime asc"); | |||||
| PageInfo<WxBillDeposit> rentdepostpage = wxBillRentDepositService.listAsPage(wxBillDeposit, 1, 30); | |||||
| if (null != rentdepostpage && null != rentdepostpage.getList() && rentdepostpage.getList().size() > 0 ) { | |||||
| retList.addAll(rentdepostpage.getList()); | |||||
| } | |||||
| WxBillProperty wxBillProperty = new WxBillProperty(); | |||||
| updateQueryParm(wxMerchant, wxBillProperty,wxMerchant.getStarttime(),wxMerchant.getEndtime()); | |||||
| wxBillProperty.setSortColumns("starttime asc"); | |||||
| PageInfo<WxBillProperty> propertypage = wxBillPropertyService.listAsPage(wxBillProperty, 1, 30); | |||||
| if (null != propertypage && null != propertypage.getList() && propertypage.getList().size() > 0 ) { | |||||
| retList.addAll(propertypage.getList()); | |||||
| } | |||||
| WxBillPropertyDeposit wxBillPropertyDeposit = new WxBillPropertyDeposit(); | |||||
| updateQueryParm(wxMerchant, wxBillPropertyDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime()); | |||||
| wxBillPropertyDeposit.setSortColumns("starttime asc"); | |||||
| PageInfo<WxBillPropertyDeposit> propertyDepositpage = wxBillPropertyDepositService.listAsPage(wxBillPropertyDeposit, 1, 30); | |||||
| if (null != propertyDepositpage && null != propertyDepositpage.getList() && propertyDepositpage.getList().size() > 0 ) { | |||||
| retList.addAll(propertyDepositpage.getList()); | |||||
| } | |||||
| WxBillDaily wxBillDaily = new WxBillDaily(); | |||||
| updateQueryParm(wxMerchant, wxBillDaily,wxMerchant.getStarttime(),wxMerchant.getEndtime()); | |||||
| wxBillDaily.setSortColumns("starttime asc"); | |||||
| PageInfo<WxBillDaily> dailypage = wxBillDailyService.listAsPage(wxBillDaily, 1, 30); | |||||
| if (null != dailypage && null != dailypage.getList() && dailypage.getList().size() > 0 ) { | |||||
| retList.addAll(dailypage.getList()); | |||||
| } | |||||
| WxBillOther wxBillOther = new WxBillOther(); | |||||
| updateQueryParm(wxMerchant, wxBillOther,wxMerchant.getStarttime(),wxMerchant.getEndtime()); | |||||
| wxBillOther.setSortColumns("starttime asc"); | |||||
| PageInfo<WxBillOther> otherpage = wxBillOtherService.listAsPage(wxBillOther, 1, 30); | |||||
| if (null != otherpage && null != otherpage.getList() && otherpage.getList().size() > 0 ) { | |||||
| retList.addAll(otherpage.getList()); | |||||
| } | |||||
| WxBillOtherDeposit wxBillOtherDeposit = new WxBillOtherDeposit(); | |||||
| updateQueryParm(wxMerchant, wxBillOtherDeposit,wxMerchant.getStarttime(),wxMerchant.getEndtime()); | |||||
| wxBillOtherDeposit.setSortColumns("starttime asc"); | |||||
| PageInfo<WxBillOtherDeposit> odpage = wxBillOtherDepositService.listAsPage(wxBillOtherDeposit, 1, 30); | |||||
| if (null != odpage && null != odpage.getList() && odpage.getList().size() > 0 ) { | |||||
| retList.addAll(odpage.getList()); | |||||
| } | |||||
| return retList; | |||||
| } | |||||
| public WxBillSum getBillSum(EnumBillAllType billType,WxMerchant wxMerchant,Date starttime, Date enttime) { | public WxBillSum getBillSum(EnumBillAllType billType,WxMerchant wxMerchant,Date starttime, Date enttime) { | ||||
| if (billType == EnumBillAllType.RENT) { | if (billType == EnumBillAllType.RENT) { | ||||
| return this.getBillRentSum(wxMerchant, starttime, enttime); | return this.getBillRentSum(wxMerchant, starttime, enttime); | ||||
| @@ -295,8 +295,12 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| @Override | @Override | ||||
| public void updateAdvanceIsDel(WxFinanceAdvance record) { | public void updateAdvanceIsDel(WxFinanceAdvance record) { | ||||
| // TODO Auto-generated method stub | |||||
| wxFinanceAdvanceMapper.setIsDel(record.getId(), record.getTenantId(), record.getIsDel()); | |||||
| } | |||||
| @Override | |||||
| public List<WxFinanceAdvance> getMerchantAdvanceGroupSumList(WxFinanceAdvance record) { | |||||
| return wxFinanceAdvanceMapper.getMerchantAdvanceGroupSumList(record); | |||||
| } | } | ||||
| @@ -308,4 +312,6 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| } | } | ||||
| @@ -1335,6 +1335,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| initQueryParam(record,hasRentContractInfo, merchantRentMap); | initQueryParam(record,hasRentContractInfo, merchantRentMap); | ||||
| PageInfo<WxMerchant> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | PageInfo<WxMerchant> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantMapper.findList(record)); | ||||
| if (null != pageInfo && null != pageInfo.getList()) { | if (null != pageInfo && null != pageInfo.getList()) { | ||||
| Map<Long, String> merchantShopNumber = wxShopService.getMerchantShopNumberMap(record, null, record.getIsDel()); | |||||
| for (WxMerchant merchant : pageInfo.getList()) { | for (WxMerchant merchant : pageInfo.getList()) { | ||||
| if (hasRentContractInfo) { | if (hasRentContractInfo) { | ||||
| WxRentContract contract = merchantRentMap.get(merchant.getId()); | WxRentContract contract = merchantRentMap.get(merchant.getId()); | ||||
| @@ -1343,6 +1344,10 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| merchant.setRentalEndDate(contract.getRentalEndDate()); | merchant.setRentalEndDate(contract.getRentalEndDate()); | ||||
| } | } | ||||
| } | } | ||||
| if (null != merchantShopNumber) { | |||||
| String shopNumber = merchantShopNumber.get(merchant.getId()); | |||||
| merchant.setShopNumber(shopNumber); | |||||
| } | |||||
| // if (record.getRentShopType() != null) { | // if (record.getRentShopType() != null) { | ||||
| // List<Map<String, Object>> shops = new ArrayList<>(); | // List<Map<String, Object>> shops = new ArrayList<>(); | ||||
| // WxMerchantShop wxMerchantShop = new WxMerchantShop(); | // WxMerchantShop wxMerchantShop = new WxMerchantShop(); | ||||
| @@ -142,6 +142,9 @@ | |||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||||
| </if> | |||||
| <if test=" null != buildWay ">and br.`build_way` = #{buildWay}</if> | <if test=" null != buildWay ">and br.`build_way` = #{buildWay}</if> | ||||
| <if test=" null != energyReadingCalcuteId ">and br.`energy_reading_calcuteId` = #{energyReadingCalcuteId}</if> | <if test=" null != energyReadingCalcuteId ">and br.`energy_reading_calcuteId` = #{energyReadingCalcuteId}</if> | ||||
| <if test=" null != energyReadingId ">and br.`energy_reading_id` = #{energyReadingId}</if> | <if test=" null != energyReadingId ">and br.`energy_reading_id` = #{energyReadingId}</if> | ||||
| @@ -172,6 +172,9 @@ | |||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||||
| </if> | |||||
| <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | ||||
| <if test=" null != merchantIds "> | <if test=" null != merchantIds "> | ||||
| and br.`merchant_id` in | and br.`merchant_id` in | ||||
| @@ -141,6 +141,9 @@ | |||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||||
| </if> | |||||
| <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | ||||
| <if test=" null != merchantIds "> | <if test=" null != merchantIds "> | ||||
| and br.`merchant_id` in | and br.`merchant_id` in | ||||
| @@ -134,6 +134,9 @@ | |||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||||
| </if> | |||||
| <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | ||||
| <if test=" null != merchantIds "> | <if test=" null != merchantIds "> | ||||
| and br.`merchant_id` in | and br.`merchant_id` in | ||||
| @@ -140,6 +140,9 @@ | |||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||||
| </if> | |||||
| <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | ||||
| <if test=" null != merchantIds "> | <if test=" null != merchantIds "> | ||||
| and br.`merchant_id` in | and br.`merchant_id` in | ||||
| @@ -166,6 +166,9 @@ | |||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||||
| </if> | |||||
| <if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if> | <if test=" null != rentShopType ">and br.`rent_shop_type` = #{rentShopType}</if> | ||||
| <if test=" null != propertyContractId ">and br.`property_contract_id` = #{propertyContractId}</if> | <if test=" null != propertyContractId ">and br.`property_contract_id` = #{propertyContractId}</if> | ||||
| <if test=" null != payWay ">and br.`pay_way` = #{payWay}</if> | <if test=" null != payWay ">and br.`pay_way` = #{payWay}</if> | ||||
| @@ -149,6 +149,9 @@ | |||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||||
| </if> | |||||
| <if test=" null != manageFeeType ">and br.`manage_fee_type` = #{manageFeeType}</if> | <if test=" null != manageFeeType ">and br.`manage_fee_type` = #{manageFeeType}</if> | ||||
| <if test=" null != hasMerchant ">and br.`merchant_id` is not null</if> | <if test=" null != hasMerchant ">and br.`merchant_id` is not null</if> | ||||
| <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | ||||
| @@ -165,6 +165,9 @@ | |||||
| <if test=" null != nearBillLastTime and null != oweBillLastTime"> | <if test=" null != nearBillLastTime and null != oweBillLastTime"> | ||||
| and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | and (br.`starttime` > #{oweBillLastTime} and br.`starttime` <= #{nearBillLastTime} and br.status not in (3,6,7)) | ||||
| </if> | </if> | ||||
| <if test=" null != needPayStartDay"> | |||||
| and (br.`starttime` <= #{needPayStartDay} and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7)) | |||||
| </if> | |||||
| <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | <if test=" 1 == notifyed ">and (br.`last_owe_call_time` is not null and br.`receive_pay` - br.`pay` > 0 and br.status not in (3,6,7) )</if> | ||||
| <if test=" null != rentContractIdList "> | <if test=" null != rentContractIdList "> | ||||
| and br.`rent_contract_id` in | and br.`rent_contract_id` in | ||||
| @@ -63,6 +63,13 @@ | |||||
| <update id = "setIsDel" parameterType="HashMap"> | <update id = "setIsDel" parameterType="HashMap"> | ||||
| update wx_finance_advance set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | update wx_finance_advance set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} | ||||
| </update> | </update> | ||||
| <select id="getMerchantAdvanceGroupSumList" parameterType="com.iformall.domain.po.WxFinanceAdvance" resultMap="BaseResultMap"> | |||||
| select advance_type_id,sum(CAST(money AS DECIMAL(20,4))) as money, sum(CAST(remain_money AS DECIMAL(20,4))) as remain_money | |||||
| from wx_finance_advance | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| group by advance_type_id | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||