| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.controller.rent; | package com.iformall.controller.rent; | ||||
| import com.alibaba.fastjson.JSONArray; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| @@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.*; | |||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.util.ArrayList; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| /** | /** | ||||
| @@ -51,6 +53,22 @@ public class WxBillAllController extends BaseController { | |||||
| wxBillAll = new WxBillAll(); | wxBillAll = new WxBillAll(); | ||||
| } | } | ||||
| wxBillAll.setTenantId(getTenantId()); | wxBillAll.setTenantId(getTenantId()); | ||||
| if(StringUtils.isNotBlank(wxBillAll.getStatusListStr())){ | |||||
| wxBillAll.setStatusList(new ArrayList<>()); | |||||
| JSONArray jsonArray = JSONArray.parseArray(wxBillAll.getStatusListStr()); | |||||
| for (int i = 0; i <jsonArray.size() ; i++) { | |||||
| Integer o = (Integer) jsonArray.get(i); | |||||
| wxBillAll.getStatusList().add(o); | |||||
| } | |||||
| } | |||||
| if(StringUtils.isNotBlank(wxBillAll.getTypeListStr())){ | |||||
| wxBillAll.setTypeList(new ArrayList<>()); | |||||
| JSONArray jsonArray = JSONArray.parseArray(wxBillAll.getTypeListStr()); | |||||
| for (int i = 0; i <jsonArray.size() ; i++) { | |||||
| Integer o = (Integer) jsonArray.get(i); | |||||
| wxBillAll.getTypeList().add(o); | |||||
| } | |||||
| } | |||||
| Map<String, Object> result = wxBillAllService.listAsPage(wxBillAll, pageNum, pageSize); | Map<String, Object> result = wxBillAllService.listAsPage(wxBillAll, pageNum, pageSize); | ||||
| return new ResultData(result); | return new ResultData(result); | ||||
| } | } | ||||
| @@ -129,6 +129,7 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| return true; | return true; | ||||
| if ("com.iformall.mapper.WxBillPropertyMapper.insertBillAction".equals(ms.getId())) | if ("com.iformall.mapper.WxBillPropertyMapper.insertBillAction".equals(ms.getId())) | ||||
| return true; | return true; | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,24 @@ | |||||
| DROP TABLE IF EXISTS `mall_sale_type` ; | |||||
| CREATE TABLE `mall_sale_type` ( | |||||
| `id` bigint(64) NOT NULL, | |||||
| `name` varchar(32) DEFAULT NULL COMMENT '销售类型', | |||||
| `type` tinyint(2) DEFAULT NULL COMMENT '资源类型1:尊享全能版 2:尊享营销版 3.速享版', | |||||
| `period` tinyint(2) DEFAULT NULL COMMENT '有效期(单位月)', | |||||
| `menus` json DEFAULT NULL COMMENT '菜单列表', | |||||
| PRIMARY KEY (`id`), | |||||
| UNIQUE `id_UNIQUE` USING BTREE (`id`) comment '' | |||||
| ) ENGINE=`InnoDB` ROW_FORMAT=DYNAMIC COMMENT='系统销售表' CHECKSUM=0 DELAY_KEY_WRITE=0; | |||||
| INSERT INTO `mall_sale_type` | |||||
| (`id`,`name`, `type`, `period`, `menus`) | |||||
| VALUES | |||||
| (1, '尊享全能版', 1, 12, | |||||
| '[1,2,3,4,5,6,7,8,9,10,50,101,102,103,104,105,106,107,108,201,202,203,204,205,206,211,212,221,222,251,299,300,301,302,303,304,305,306,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,501,502,503,504,505,506,507,508,509,511,512,513,521,522,523,531,532,533,591,592,595,601,602,603,604,605,606,607,608,609,610,611,612,621,622,623,624,625,626,627,641,642,643,644,645,651,661,662,663,671,672,673,674,681,682,683,684,685,691,692,693,694,695,701,702,711,712,713,901,902,903,931,932,951,952,961,962,965,966,967,968]' | |||||
| ), | |||||
| (2, '尊享营销版', 2, 12, | |||||
| '[1,2,4,5,6,7,8,9,10,50,101,102,103,104,105,106,107,201,202,203,204,205,211,212,221,222,251,409,410,411,416,501,502,503,504,505,506,507,508,509,511,512,513,521,522,523,531,532,533,591,595,601,602,603,604,605,606,607,608,609,610,611,612,621,622,623,624,625,626,627,641,642,643,644,645,651,661,662,663,671,672,673,674,681,682,683,684,685,691,692,693,694,695,701,702,711,712,713,901,902,903,931,932,951,961]' | |||||
| ), | |||||
| (3, '速享版', 3, 1, | |||||
| '[2,4,5,6,7,10,50,201,202,205,211,212,221,222,251,409,410,411,416,501,502,503,504,505,506,507,508,511,512,513,521,522,523,531,532,533,591,592,601,602,603,604,605,606,607,608,609,610,611,612,621,622,623,624,625,626,641,642,643,644,645,651,661,662,663,671,672,673,674,681,682,683,684,685,691,692,693,694,695,701,702,711,712,713,901,902,903,931,932]' | |||||
| ) | |||||
| ; | |||||
| @@ -0,0 +1,2 @@ | |||||
| alter table wx_bill_settle_record | |||||
| add column `desc` VARCHAR (800) NULL DEFAULT NULL COMMENT '描述'; | |||||
| @@ -7,6 +7,7 @@ import lombok.EqualsAndHashCode; | |||||
| import lombok.ToString; | import lombok.ToString; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.util.ArrayList; | |||||
| import java.util.List; | import java.util.List; | ||||
| /** | /** | ||||
| @@ -44,6 +45,11 @@ public class WxBillAll extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="商户Id",name="merchantId") | @io.swagger.annotations.ApiModelProperty(value="商户Id",name="merchantId") | ||||
| private Long merchantId; | private Long merchantId; | ||||
| @Transient | |||||
| private String statusListStr; | |||||
| @Transient | |||||
| private String typeListStr; | |||||
| @io.swagger.annotations.ApiModelProperty(value="多个状态",name="statusList") | @io.swagger.annotations.ApiModelProperty(value="多个状态",name="statusList") | ||||
| private List<Integer> statusList; | private List<Integer> statusList; | ||||
| @@ -227,8 +227,12 @@ import java.util.stream.Collectors; | |||||
| } | } | ||||
| if (StringUtils.isBlank(record.getCoverPicture())) { | if (StringUtils.isBlank(record.getCoverPicture())) { | ||||
| List<String> strList = new ArrayList<String>(); | List<String> strList = new ArrayList<String>(); | ||||
| strList.add(record.getCoverImg()); | |||||
| record.setCoverPicture(JSONArray.toJSONString(strList)); | |||||
| if (StringUtils.isNotBlank(record.getCoverImg())) { | |||||
| strList.add(record.getCoverImg()); | |||||
| } | |||||
| if (strList.size() > 1) { | |||||
| record.setCoverPicture(JSONArray.toJSONString(strList)); | |||||
| } | |||||
| } | } | ||||
| if (record.getValidType() != null) { | if (record.getValidType() != null) { | ||||
| @@ -1193,8 +1193,13 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| needpayFront = getNeedPayMoney(wxRentContract,priceArrs[index-1],billTimeVo.getStartDate(),endDate,i,billTimeVoList.size(),saveDb,dayType,receivePeriod); | needpayFront = getNeedPayMoney(wxRentContract,priceArrs[index-1],billTimeVo.getStartDate(),endDate,i,billTimeVoList.size(),saveDb,dayType,receivePeriod); | ||||
| }else{ | }else{ | ||||
| if(billTimeVo.getStartDate().before(endDate)){ | if(billTimeVo.getStartDate().before(endDate)){ | ||||
| needpayFront = getNeedPayMoney(wxRentContract, priceArrs[index - 1], billTimeVo.getStartDate(), DateUtils.getDaySet(endDate,Calendar.DATE,-1), i, billTimeVoList.size(), saveDb,dayType,receivePeriod); | |||||
| needpayAfter = getNeedPayMoney(wxRentContract, priceArrs[index], endDate, billTimeVo.getEndDate(), i, billTimeVoList.size(), saveDb,dayType,receivePeriod); | |||||
| if (EnumRentContractType.RENT_BY_JOINT.getCode().equals(wxRentContract.getType()) && EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())) { | |||||
| //设置跳点率为年周期 price不变 | |||||
| needpayFront = priceArrs[index - 1]; | |||||
| }else { | |||||
| needpayFront = getNeedPayMoney(wxRentContract, priceArrs[index - 1], billTimeVo.getStartDate(), DateUtils.getDaySet(endDate, Calendar.DATE, -1), i, billTimeVoList.size(), saveDb, dayType, receivePeriod); | |||||
| needpayAfter = getNeedPayMoney(wxRentContract, priceArrs[index], endDate, billTimeVo.getEndDate(), i, billTimeVoList.size(), saveDb, dayType, receivePeriod); | |||||
| } | |||||
| }else{ | }else{ | ||||
| needpayFront = getNeedPayMoney(wxRentContract, priceArrs[index], billTimeVo.getStartDate(), billTimeVo.getEndDate(), i, billTimeVoList.size(), saveDb,dayType,receivePeriod); | needpayFront = getNeedPayMoney(wxRentContract, priceArrs[index], billTimeVo.getStartDate(), billTimeVo.getEndDate(), i, billTimeVoList.size(), saveDb,dayType,receivePeriod); | ||||
| } | } | ||||
| @@ -642,9 +642,12 @@ | |||||
| <if test=" null == sortColumns"> order by totalOwe desc </if> | <if test=" null == sortColumns"> order by totalOwe desc </if> | ||||
| </select> | </select> | ||||
| <!--union all | |||||
| select pay_amount money,mm.id from wx_profit_sharing_order pso | |||||
| left join wx_merchant mm on pso.merchant_id=mm.id | |||||
| where pso.sharing_status !=5 | |||||
| --> | |||||
| <select id="getReceiveAndPayBillAsPage" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap"> | <select id="getReceiveAndPayBillAsPage" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap"> | ||||
| select m.id,m.name,ws.shop_number shopNumber,ws.type,m.link_person linkPerson,m.link_phone linkPhone, | select m.id,m.name,ws.shop_number shopNumber,ws.type,m.link_person linkPerson,m.link_phone linkPhone, | ||||
| xb.title business,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate, | xb.title business,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate, | ||||
| @@ -676,19 +679,6 @@ | |||||
| left join wx_c_user cu on cu.id = cs.owner_id | left join wx_c_user cu on cu.id = cs.owner_id | ||||
| where ms.order_type in(3,0) and ms.status = 0 | where ms.order_type in(3,0) and ms.status = 0 | ||||
| union all | union all | ||||
| select ms.subsidy money,mm.id | |||||
| from wx_merchant_subsidy ms | |||||
| left join wx_coupon_order co on co.id = ms.coupon_order_id | |||||
| left join wx_coupon c on c.id = co.coupon_id | |||||
| left join wx_merchant mm on mm.id = ms.merchant_id | |||||
| left join wx_card_spend cs on cs.order_id = ms.order_id | |||||
| left join wx_c_user cu on cu.id = cs.owner_id | |||||
| where ms.order_type in(3,0) and ms.status = 0 | |||||
| union all | |||||
| select pay_amount money,mm.id from wx_profit_sharing_order pso | |||||
| left join wx_merchant mm on pso.merchant_id=mm.id | |||||
| where pso.sharing_status !=5 | |||||
| union all | |||||
| select merchant_id id,receive_pay money from wx_bill_rent_deposit where status = 3 | select merchant_id id,receive_pay money from wx_bill_rent_deposit where status = 3 | ||||
| union all | union all | ||||
| select merchant_id id,receive_pay money from wx_bill_property_deposit where status = 3 | select merchant_id id,receive_pay money from wx_bill_property_deposit where status = 3 | ||||
| @@ -725,19 +715,6 @@ | |||||
| left join wx_c_user cu on cu.id = cs.owner_id | left join wx_c_user cu on cu.id = cs.owner_id | ||||
| where ms.order_type in(3,0) and ms.status = 0 | where ms.order_type in(3,0) and ms.status = 0 | ||||
| union all | union all | ||||
| select ms.subsidy money,mm.id | |||||
| from wx_merchant_subsidy ms | |||||
| left join wx_coupon_order co on co.id = ms.coupon_order_id | |||||
| left join wx_coupon c on c.id = co.coupon_id | |||||
| left join wx_merchant mm on mm.id = ms.merchant_id | |||||
| left join wx_card_spend cs on cs.order_id = ms.order_id | |||||
| left join wx_c_user cu on cu.id = cs.owner_id | |||||
| where ms.order_type in(3,0) and ms.status = 0 | |||||
| union all | |||||
| select pay_amount money,mm.id from wx_profit_sharing_order pso | |||||
| left join wx_merchant mm on pso.merchant_id=mm.id | |||||
| where pso.sharing_status !=5 | |||||
| union all | |||||
| select merchant_id id,receive_pay money from wx_bill_rent_deposit where status = 3 | select merchant_id id,receive_pay money from wx_bill_rent_deposit where status = 3 | ||||
| union all | union all | ||||
| select merchant_id id,receive_pay money from wx_bill_property_deposit where status = 3 | select merchant_id id,receive_pay money from wx_bill_property_deposit where status = 3 | ||||
| @@ -778,7 +755,9 @@ | |||||
| rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime | rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime | ||||
| from wx_bill_other_deposit where tenant_id=#{tenantId} | from wx_bill_other_deposit where tenant_id=#{tenantId} | ||||
| ) bill | ) bill | ||||
| where 1=1 | |||||
| <if test=" null != status"> and bill.status = #{status} </if> | <if test=" null != status"> and bill.status = #{status} </if> | ||||
| <if test=" null != merchantId">and bill.merchant_id=#{merchantId}</if> | |||||
| </select> | </select> | ||||