| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.controller.basic; | package com.iformall.controller.basic; | ||||
| import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.annotation.TenantIgnore; | import com.iformall.annotation.TenantIgnore; | ||||
| @@ -199,9 +200,13 @@ public class WxMerchantController extends BaseController { | |||||
| sq.updateTenantInfo(wxMerchant); | sq.updateTenantInfo(wxMerchant); | ||||
| sq.setShopNumber(wxMerchant.getSearchKey()); | sq.setShopNumber(wxMerchant.getSearchKey()); | ||||
| List<Long> ids = wxMerchantService.getShopMerchantIds(sq); | List<Long> ids = wxMerchantService.getShopMerchantIds(sq); | ||||
| if (null != ids) { | |||||
| if (null != ids && ids.size() > 0 ) { | |||||
| wxMerchant.setIds(ids); | wxMerchant.setIds(ids); | ||||
| wxMerchant.setQueryCondition("m.id in ("+StringUtils.join(ids,",")+") or m.name like '%"+wxMerchant.getSearchKey()+"%' "); | |||||
| }else { | |||||
| wxMerchant.setName(wxMerchant.getSearchKey()); | |||||
| } | } | ||||
| wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | wxMerchant.setSortColumns(BaseEntity.SortField.TopTime_DESC); | ||||
| wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | wxMerchant.setIsPrivate(EnumYesOrNo.NO.getCode()); | ||||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | WxUserDataRule dataRule = this.getCurrentDataFloors(); | ||||
| @@ -2,6 +2,7 @@ package com.iformall.controller.contract; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxFlowModel; | import com.iformall.domain.po.WxFlowModel; | ||||
| import com.iformall.domain.po.WxMerchant; | |||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| import com.iformall.domain.vo.WxRentPropertyContractVo; | import com.iformall.domain.vo.WxRentPropertyContractVo; | ||||
| @@ -11,6 +12,8 @@ import com.iformall.enums.EnumFlowKey; | |||||
| import com.iformall.enums.EnumRentAgileType; | import com.iformall.enums.EnumRentAgileType; | ||||
| import com.iformall.enums.EnumRentShopType; | import com.iformall.enums.EnumRentShopType; | ||||
| import com.iformall.service.WxFlowService; | import com.iformall.service.WxFlowService; | ||||
| import com.iformall.service.WxShopService; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||
| @@ -25,8 +28,11 @@ public class WxContractBaseController extends BaseController{ | |||||
| @Autowired | @Autowired | ||||
| private WxFlowService wxFlowService; | private WxFlowService wxFlowService; | ||||
| @Autowired | |||||
| private WxShopService wxShopService; | |||||
| protected Map<String,Object> generateFlowParams(EnumFlowKey flowType,EnumFlowContractType contractType,EnumRentAgileType agileType,String remark,Long contractId,Long wholeProperyId) { | |||||
| protected Map<String,Object> generateFlowParams(WxMerchant merchant,EnumFlowKey flowType,EnumFlowContractType contractType,EnumRentAgileType agileType,String remark,Long contractId,Long wholeProperyId) { | |||||
| Map<String,Object> map = new HashMap<String,Object>(); | Map<String,Object> map = new HashMap<String,Object>(); | ||||
| map.put("businessType", flowType.getCode()); | map.put("businessType", flowType.getCode()); | ||||
| map.put("remark", remark); | map.put("remark", remark); | ||||
| @@ -60,6 +66,11 @@ public class WxContractBaseController extends BaseController{ | |||||
| variablesList.add(agileTypeMap); | variablesList.add(agileTypeMap); | ||||
| } | } | ||||
| Map rentNameMap = new HashMap<String,Object>(); | |||||
| rentNameMap.put("key","rentName"); | |||||
| rentNameMap.put("value",wxShopService.getRentName(merchant)); | |||||
| variablesList.add(rentNameMap); | |||||
| map.put("variables", variablesList); | map.put("variables", variablesList); | ||||
| return map; | return map; | ||||
| } | } | ||||
| @@ -483,10 +483,12 @@ public class WxPropertyContractController extends WxContractBaseController { | |||||
| if (null != map) { | if (null != map) { | ||||
| remark = (String) map.get("remark"); | remark = (String) map.get("remark"); | ||||
| } | } | ||||
| WxMerchant merchant = wxMerchantService.selectById(contract.getMerchantId()); | |||||
| if(contract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue()) { | if(contract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue()) { | ||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_CONTRACT, EnumFlowContractType.PROPERTY,null, remark, contract.getId(),null)); | |||||
| contract.setFlowParams(generateFlowParams(merchant,EnumFlowKey.NEW_PRO_CONTRACT, EnumFlowContractType.PROPERTY,null, remark, contract.getId(),null)); | |||||
| }else { | }else { | ||||
| contract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_PRO_CONTRACT, EnumFlowContractType.WHOLE_SHOP,null, remark, contract.getId(),null)); | |||||
| contract.setFlowParams(generateFlowParams(merchant,EnumFlowKey.NEW_PRO_CONTRACT, EnumFlowContractType.WHOLE_SHOP,null, remark, contract.getId(),null)); | |||||
| } | } | ||||
| return wxPropertyContractService.apply(contract,user); | return wxPropertyContractService.apply(contract,user); | ||||
| } | } | ||||
| @@ -658,11 +658,13 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| } | } | ||||
| } | } | ||||
| WxMerchant merchant = wxMerchantService.selectById(rentContract.getMerchantId()); | |||||
| if(rentContract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue() || | if(rentContract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue() || | ||||
| rentContract.getOperationType().intValue() == EnumContractOperationType.JINMAO.getCode().intValue()) { | rentContract.getOperationType().intValue() == EnumContractOperationType.JINMAO.getCode().intValue()) { | ||||
| rentContract.setFlowParams(generateFlowParams(EnumFlowKey.NEW_RENT_CONTRACT, EnumFlowContractType.RENT,EnumRentAgileType.getEnum(rentContract.getAgileType()), wxRentContract.getRemark(), wxRentContract.getId(),null)); | |||||
| rentContract.setFlowParams(generateFlowParams(merchant,EnumFlowKey.NEW_RENT_CONTRACT, EnumFlowContractType.RENT,EnumRentAgileType.getEnum(rentContract.getAgileType()), wxRentContract.getRemark(), wxRentContract.getId(),null)); | |||||
| }else if(rentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()){ | }else if(rentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()){ | ||||
| rentContract.setFlowParams(generateFlowParams(EnumFlowKey.NNEW_RENT_CONTRACT, EnumFlowContractType.WHOLE_SHOP, EnumRentAgileType.getEnum(rentContract.getAgileType()),wxRentContract.getRemark(), wxRentContract.getId(),wxRentContract.getPropertyId())); | |||||
| rentContract.setFlowParams(generateFlowParams(merchant,EnumFlowKey.NNEW_RENT_CONTRACT, EnumFlowContractType.WHOLE_SHOP, EnumRentAgileType.getEnum(rentContract.getAgileType()),wxRentContract.getRemark(), wxRentContract.getId(),wxRentContract.getPropertyId())); | |||||
| }else { | }else { | ||||
| return new ResultData(Result.ERROR,"合同操作类型非法。"); | return new ResultData(Result.ERROR,"合同操作类型非法。"); | ||||
| } | } | ||||
| @@ -482,9 +482,9 @@ public class WxEnergyController extends BaseController { | |||||
| //得到当前用户ID | //得到当前用户ID | ||||
| MallUserInfo user = getUser(); | MallUserInfo user = getUser(); | ||||
| //request.getParameter("timeId"); | //request.getParameter("timeId"); | ||||
| wxEnergyService.importReading(mFile, user, request, response); | |||||
| wxEnergyService.importFeesShop(mFile, user, request, response); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("importReading error.",e); | |||||
| logger.error("importFeesShop error.",e); | |||||
| throw new MallinkException(Result.ERROR,e.getMessage()); | throw new MallinkException(Result.ERROR,e.getMessage()); | ||||
| } | } | ||||
| } | } | ||||
| @@ -697,32 +697,7 @@ public class WxAllBillController extends BillBaseController { | |||||
| if (StringUtils.isNotBlank(be.getCusName())) { | if (StringUtils.isNotBlank(be.getCusName())) { | ||||
| return be.getCusName(); | return be.getCusName(); | ||||
| }else { | }else { | ||||
| //如果不是虚拟商户,则取商户的名称 | |||||
| if (m.getIsPrivate() == EnumYesOrNo.NO.getCode()) { | |||||
| return m.getName(); | |||||
| }else { | |||||
| if (StringUtils.isBlank(m.getCreateShopNumber())) { | |||||
| return m.getName(); | |||||
| } | |||||
| WxShop shop = wxShopSerivce.getShopByShopNumber(m, m.getCreateShopNumber()) ; | |||||
| if (null != shop ) { | |||||
| //查询租户和业主 | |||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| suq.updateTenantInfo(be); | |||||
| suq.setShopId(shop.getId()); | |||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | |||||
| suq.setSortColumns("type desc"); | |||||
| WxShopUsers wsu = wxShopSerivce.getOneShopUsers(suq); | |||||
| if (null != wsu) { | |||||
| return wsu.getName(); | |||||
| }else { | |||||
| return m.getName(); | |||||
| } | |||||
| }else { | |||||
| return m.getName(); | |||||
| } | |||||
| } | |||||
| return wxShopSerivce.getRentName(m); | |||||
| } | } | ||||
| } | } | ||||
| @@ -814,7 +789,15 @@ public class WxAllBillController extends BillBaseController { | |||||
| record.setEnergyFeesIds(feesIdList);; | record.setEnergyFeesIds(feesIdList);; | ||||
| } | } | ||||
| record.setIsPreview(EnumYesOrNo.NO.getCode()); | record.setIsPreview(EnumYesOrNo.NO.getCode()); | ||||
| record.setSortColumns("status asc, starttime asc , merchant_id desc"); | |||||
| record.setSortColumns("starttime asc , merchant_id desc"); | |||||
| //未收明细表根据收款日查询 | |||||
| if (record.getNeedPayNoDays() == EnumYesOrNo.YES.getCode() && null != record.getReceiveDateEnd()) { | |||||
| record.setReceiveDate(record.getReceiveDateEnd()); | |||||
| record.setNeedPayNoDays(null); | |||||
| } | |||||
| return new ResultData(wxAllBillService.listAsPage(record, pageNum, pageSize)); | return new ResultData(wxAllBillService.listAsPage(record, pageNum, pageSize)); | ||||
| } | } | ||||
| @@ -859,6 +842,11 @@ public class WxAllBillController extends BillBaseController { | |||||
| } | } | ||||
| } | } | ||||
| record.setIsPreview(EnumYesOrNo.NO.getCode()); | record.setIsPreview(EnumYesOrNo.NO.getCode()); | ||||
| //未收明细表根据收款日查询 | |||||
| if (record.getNeedPayNoDays() == EnumYesOrNo.YES.getCode() && null != record.getReceiveDateEnd()) { | |||||
| record.setReceiveDate(record.getReceiveDateEnd()); | |||||
| record.setNeedPayNoDays(null); | |||||
| } | |||||
| return new ResultData(wxAllBillService.getBillMonthSum(record)); | return new ResultData(wxAllBillService.getBillMonthSum(record)); | ||||
| } | } | ||||
| @@ -73,6 +73,14 @@ public class WxAllBill extends TenantEntity { | |||||
| @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "8") | @Excel(name = "实际应收总金额(元)", width = 20, orderNum = "8") | ||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额(做了减免之后和need可能不一样)",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额(做了减免之后和need可能不一样)",name="receivePay") | ||||
| public String receivePay; | public String receivePay; | ||||
| @TableField(exist = false) | |||||
| public String cutOffPay; | |||||
| public String getCutOffPay() { | |||||
| if (StringUtils.isNotBlank(needPay) && StringUtils.isNotBlank(receivePay)) { | |||||
| return new BigDecimal(needPay).subtract(new BigDecimal(receivePay)).toPlainString(); | |||||
| } | |||||
| return "0"; | |||||
| } | |||||
| @Excel(name = "实收账款(元)", width = 20, orderNum = "9") | @Excel(name = "实收账款(元)", width = 20, orderNum = "9") | ||||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | ||||
| @@ -419,4 +427,6 @@ public class WxAllBill extends TenantEntity { | |||||
| private String queryShopNumber; | private String queryShopNumber; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String rentName; | private String rentName; | ||||
| @TableField(exist = false) | |||||
| private Date receiveDateEnd; | |||||
| } | } | ||||
| @@ -191,5 +191,7 @@ public class WxFinanceReceive extends TenantEntity { | |||||
| private Long finishId; | private Long finishId; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Map<String, Object> flowParams; | private Map<String, Object> flowParams; | ||||
| @TableField(exist = false) | |||||
| private String rentName; | |||||
| } | } | ||||
| @@ -149,4 +149,6 @@ public class WxFinanceReceiveBill extends TenantEntity { | |||||
| private Integer noReduce; | private Integer noReduce; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> merchantIdList; | private List<Long> merchantIdList; | ||||
| @TableField(exist = false) | |||||
| private String rentName; | |||||
| } | } | ||||
| @@ -506,4 +506,6 @@ public class WxMerchant extends TenantEntity { | |||||
| private List<Integer> privateRentShopTypeList; | private List<Integer> privateRentShopTypeList; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<String> createShopNumberList; | private List<String> createShopNumberList; | ||||
| @TableField(exist = false) | |||||
| public String queryCondition; | |||||
| } | } | ||||
| @@ -19,6 +19,9 @@ public class WxBillSum implements Serializable { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String energyFeesName; | private String energyFeesName; | ||||
| //减免总金额 | |||||
| private String cutOffPay = "0"; | |||||
| //应收总金额 | //应收总金额 | ||||
| private String needPay = "0"; | private String needPay = "0"; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @@ -160,6 +160,7 @@ public class WxFinanceReceiveVo implements Serializable { | |||||
| this.merchantName = receive.getMerchantName(); | this.merchantName = receive.getMerchantName(); | ||||
| this.payMoney = receive.getPayMoney(); | this.payMoney = receive.getPayMoney(); | ||||
| this.receiveDate = receive.getReceiveDate(); | this.receiveDate = receive.getReceiveDate(); | ||||
| this.rentName = receive.getRentName(); | |||||
| if (null != receiveBill) { | if (null != receiveBill) { | ||||
| this.rid = receiveBill.getId(); | this.rid = receiveBill.getId(); | ||||
| this.receiveId = receiveBill.getReceiveId(); | this.receiveId = receiveBill.getReceiveId(); | ||||
| @@ -172,4 +173,7 @@ public class WxFinanceReceiveVo implements Serializable { | |||||
| this.endtime = receiveBill.getEndtime(); | this.endtime = receiveBill.getEndtime(); | ||||
| } | } | ||||
| } | } | ||||
| @TableField(exist = false) | |||||
| private String rentName; | |||||
| } | } | ||||
| @@ -140,5 +140,7 @@ public interface WxShopService { | |||||
| void saveOrUpdateShopUsersPerson(WxShopUsersPerson wxShopUsers); | void saveOrUpdateShopUsersPerson(WxShopUsersPerson wxShopUsers); | ||||
| void deleteShopUsersPerson(WxShopUsersPerson wxShopUsers); | void deleteShopUsersPerson(WxShopUsersPerson wxShopUsers); | ||||
| String getRentName(WxMerchant merchant); | |||||
| } | } | ||||
| @@ -603,6 +603,7 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||||
| for (int i = 0 ; i < realRentList.size() ; i ++) { | for (int i = 0 ; i < realRentList.size() ; i ++) { | ||||
| WxAllBill rbrent = realRentList.get(i); | WxAllBill rbrent = realRentList.get(i); | ||||
| rbrent.setEndtime(rentContract.getEndContractTime()); | |||||
| wxAllBillMapper.updateById(rbrent); | wxAllBillMapper.updateById(rbrent); | ||||
| } | } | ||||
| @@ -644,6 +645,7 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||||
| for (int i = 0 ; i < realRentList.size() ; i ++) { | for (int i = 0 ; i < realRentList.size() ; i ++) { | ||||
| WxAllBill rbrent = realRentList.get(i); | WxAllBill rbrent = realRentList.get(i); | ||||
| rbrent.setEndtime(propertyContract.getEndContractTime()); | |||||
| wxAllBillMapper.updateById(rbrent); | wxAllBillMapper.updateById(rbrent); | ||||
| } | } | ||||
| @@ -482,6 +482,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| WxMerchant merchant = merchantMap.get(fr.getMerchantId()); | WxMerchant merchant = merchantMap.get(fr.getMerchantId()); | ||||
| if (null != merchant) { | if (null != merchant) { | ||||
| fr.setMerchantName(merchant.getName()); | fr.setMerchantName(merchant.getName()); | ||||
| fr.setRentName(wxShopService.getRentName(merchant)); | |||||
| } | } | ||||
| } | } | ||||
| @@ -580,6 +581,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| WxMerchant merchant = merchantMap.get(fr.getMerchantId()); | WxMerchant merchant = merchantMap.get(fr.getMerchantId()); | ||||
| if (null != merchant) { | if (null != merchant) { | ||||
| fr.setMerchantName(merchant.getName()); | fr.setMerchantName(merchant.getName()); | ||||
| fr.setRentName(wxShopService.getRentName(merchant)); | |||||
| } | } | ||||
| String shopNumber = shopNumberMap.get(fr.getMerchantId()); | String shopNumber = shopNumberMap.get(fr.getMerchantId()); | ||||
| fr.setShopNumber(shopNumber); | fr.setShopNumber(shopNumber); | ||||
| @@ -1124,4 +1124,32 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| public void deleteShopUsersPerson(WxShopUsersPerson record) { | public void deleteShopUsersPerson(WxShopUsersPerson record) { | ||||
| wxShopUsersPersonMapper.deleteById(record.getId()); | wxShopUsersPersonMapper.deleteById(record.getId()); | ||||
| } | } | ||||
| @Override | |||||
| public String getRentName(WxMerchant merchant) { | |||||
| if (merchant.getIsPrivate() == EnumYesOrNo.NO.getCode()) { | |||||
| return merchant.getName(); | |||||
| }else { | |||||
| if (StringUtils.isBlank(merchant.getCreateShopNumber())) { | |||||
| return merchant.getName(); | |||||
| } | |||||
| WxShop shop = this.getShopByShopNumber(merchant, merchant.getCreateShopNumber()) ; | |||||
| if (null != shop ) { | |||||
| //查询租户和业主 | |||||
| WxShopUsers suq = new WxShopUsers(); | |||||
| suq.updateTenantInfo(merchant); | |||||
| suq.setShopId(shop.getId()); | |||||
| suq.setStatus(EnumShopUsersStatus.LIVE.getCode()); | |||||
| suq.setSortColumns("type desc"); | |||||
| WxShopUsers wsu = this.getOneShopUsers(suq); | |||||
| if (null != wsu) { | |||||
| return wsu.getName(); | |||||
| }else { | |||||
| return merchant.getName(); | |||||
| } | |||||
| }else { | |||||
| return merchant.getName(); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -209,6 +209,7 @@ | |||||
| </select> | </select> | ||||
| <resultMap id="SumBaseResultMap" type="com.iformall.domain.vo.WxBillSum"> | <resultMap id="SumBaseResultMap" type="com.iformall.domain.vo.WxBillSum"> | ||||
| <result column="cut_off_pay" jdbcType="VARCHAR" property="cutOffPay"/> | |||||
| <result column="receive_pay" jdbcType="VARCHAR" property="needPay"/> | <result column="receive_pay" jdbcType="VARCHAR" property="needPay"/> | ||||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | <result column="paid" jdbcType="VARCHAR" property="paid" /> | ||||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | ||||
| @@ -219,6 +220,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxAllBill" resultMap="SumBaseResultMap"> | <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxAllBill" resultMap="SumBaseResultMap"> | ||||
| select | select | ||||
| sum(CAST(need_pay AS DECIMAL(20,2))-CAST(receive_pay AS DECIMAL(20,2))) cut_off_pay , | |||||
| sum(CAST(receive_pay AS DECIMAL(20,2))) receive_pay , | sum(CAST(receive_pay AS DECIMAL(20,2))) receive_pay , | ||||
| sum(CAST(ifnull(pay,'0') AS DECIMAL(20,2))) paid, | sum(CAST(ifnull(pay,'0') AS DECIMAL(20,2))) paid, | ||||
| min(starttime) min_date, | min(starttime) min_date, | ||||
| @@ -231,6 +233,7 @@ | |||||
| <select id="getFeesBillSum" parameterType="com.iformall.domain.po.WxAllBill" resultMap="SumBaseResultMap"> | <select id="getFeesBillSum" parameterType="com.iformall.domain.po.WxAllBill" resultMap="SumBaseResultMap"> | ||||
| select | select | ||||
| energy_fees_id, | energy_fees_id, | ||||
| sum(CAST(need_pay AS DECIMAL(20,2))-CAST(receive_pay AS DECIMAL(20,2))) cut_off_pay , | |||||
| sum(CAST(receive_pay AS DECIMAL(20,2))) receive_pay , | sum(CAST(receive_pay AS DECIMAL(20,2))) receive_pay , | ||||
| sum(CAST(ifnull(pay,'0') AS DECIMAL(20,2))) paid, | sum(CAST(ifnull(pay,'0') AS DECIMAL(20,2))) paid, | ||||
| min(starttime) min_date, | min(starttime) min_date, | ||||
| @@ -187,10 +187,10 @@ | |||||
| and m.`create_shop_type` = #{createShopType} | and m.`create_shop_type` = #{createShopType} | ||||
| </if> | </if> | ||||
| <if test=" null != searchKey and '' != searchKey "> | |||||
| and (m.`name` like concat('%', #{searchKey},'%') or m.`link_phone` like concat('%', #{searchKey},'%')) | |||||
| </if> | |||||
| <if test=" null != queryCondition and '' != queryCondition"> | |||||
| and ( #{queryCondition} ) | |||||
| </if> | |||||
| <if test=" null != privateRentShopTypeList and privateRentShopTypeList.size > 0"> | <if test=" null != privateRentShopTypeList and privateRentShopTypeList.size > 0"> | ||||
| and m.`create_shop_type` in | and m.`create_shop_type` in | ||||
| <foreach collection="privateRentShopTypeList" index="index" item="prstItem" open="(" separator="," close=")"> | <foreach collection="privateRentShopTypeList" index="index" item="prstItem" open="(" separator="," close=")"> | ||||