| @@ -208,12 +208,12 @@ public class WxCarController extends BaseController { | |||||
| Integer amtCount = wxCouponCarService.getAmtCountByTemplateId(templateId); | Integer amtCount = wxCouponCarService.getAmtCountByTemplateId(templateId); | ||||
| Integer availCount = wxCouponCarService.getAvaibleCountByTemplateId(templateId); | Integer availCount = wxCouponCarService.getAvaibleCountByTemplateId(templateId); | ||||
| if (amtCount >= amount) { | if (amtCount >= amount) { | ||||
| logger.error("已达到停车厂商优免券数量限制"); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "已达到停车厂商优免券数量限制"); | |||||
| logger.error("总库存已达到停车厂商优免券数量限制"); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "总库存已达到停车厂商优免券数量限制"); | |||||
| } | } | ||||
| if (availCount >= avaliavleNum) { | if (availCount >= avaliavleNum) { | ||||
| logger.error("已达到停车厂商优免券数量限制"); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "已达到停车厂商优免券数量限制"); | |||||
| logger.error("可用库存已达到停车厂商优免券数量限制"); | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "可用库存已达到停车厂商优免券数量限制"); | |||||
| } | } | ||||
| // check End | // check End | ||||
| coupon.setTenantId(user.getTenantId()); | coupon.setTenantId(user.getTenantId()); | ||||
| @@ -20,7 +20,7 @@ public interface WxBillDepositMapper extends CommonMapper<WxBillDeposit, Long> { | |||||
| Map<String,Object> queryOweInfoAll(Map<String,Object> params); | Map<String,Object> queryOweInfoAll(Map<String,Object> params); | ||||
| Map<String,Object> queryPayInfoAll(Map<String,Object> params); | |||||
| Map<String,Object> queryPayInfoAllTotal(Map<String,Object> params); | |||||
| void updateNotPaidStatus(Map<String,Object> params); | void updateNotPaidStatus(Map<String,Object> params); | ||||
| @@ -19,7 +19,7 @@ public interface WxBillOtherMapper extends CommonMapper<WxBillOther, Long> { | |||||
| List<Map<String,Object>> queryBillList(WxBillOther record); | List<Map<String,Object>> queryBillList(WxBillOther record); | ||||
| Map<String,Object> queryPayInfo(Map<String,Object> params); | |||||
| Map<String,Object> queryPayInfoTotal(Map<String,Object> params); | |||||
| Map<String,Object> queryOweInfo(Map<String,Object> params); | Map<String,Object> queryOweInfo(Map<String,Object> params); | ||||
| } | } | ||||
| @@ -20,6 +20,8 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long> | |||||
| Map<String,Object> queryPayInfo(Map<String,Object> params); | Map<String,Object> queryPayInfo(Map<String,Object> params); | ||||
| Map<String,Object> queryPayInfoTotal(Map<String,Object> params); | |||||
| Map<String,Object> queryOweInfo(Map<String,Object> params); | Map<String,Object> queryOweInfo(Map<String,Object> params); | ||||
| void updateNotPaidStatus(Map<String,Object> params); | void updateNotPaidStatus(Map<String,Object> params); | ||||
| @@ -18,6 +18,8 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> { | |||||
| Map<String,Object> queryPayInfo(Map<String,Object> params); | Map<String,Object> queryPayInfo(Map<String,Object> params); | ||||
| Map<String,Object> queryPayInfoTotal(Map<String,Object> params); | |||||
| Map<String,Object> queryOweInfo(Map<String,Object> params); | Map<String,Object> queryOweInfo(Map<String,Object> params); | ||||
| void updateNotPaidStatus(Map<String,Object> params); | void updateNotPaidStatus(Map<String,Object> params); | ||||
| @@ -2294,6 +2294,12 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| return new ResultData(datamap); | return new ResultData(datamap); | ||||
| } | } | ||||
| public static void main(String[] args) { | |||||
| double a = 0.0; | |||||
| System.out.println(a==0.0); | |||||
| System.out.println(); | |||||
| } | |||||
| /** | /** | ||||
| * 费用收缴数据 | * 费用收缴数据 | ||||
| * @param tenantId | * @param tenantId | ||||
| @@ -2305,12 +2311,12 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| startDate = DateUtils.getFirstDayForCurrMonth(startDate); | startDate = DateUtils.getFirstDayForCurrMonth(startDate); | ||||
| Date endDate = DateUtils.getLastDayForMonth(startDate); | Date endDate = DateUtils.getLastDayForMonth(startDate); | ||||
| //租金收缴率 | |||||
| //租金收缴率 ysje 应收金额 ssje 实收金额 zjsjl收缴率 | |||||
| Map<String, Object> params = new HashMap<>(); | Map<String, Object> params = new HashMap<>(); | ||||
| params.put("tenantId", tenantId); | params.put("tenantId", tenantId); | ||||
| params.put("startdate", DateUtils.date2String(startDate,"yyyy-MM-dd") + " 00:00:00"); | params.put("startdate", DateUtils.date2String(startDate,"yyyy-MM-dd") + " 00:00:00"); | ||||
| params.put("enddate", DateUtils.date2String(endDate,"yyyy-MM-dd") + " 23:59:59"); | params.put("enddate", DateUtils.date2String(endDate,"yyyy-MM-dd") + " 23:59:59"); | ||||
| Map<String, Object> payinfo = wxBillRentMapper.queryPayInfo(params); | |||||
| Map<String, Object> payinfo = wxBillRentMapper.queryPayInfoTotal(params); | |||||
| if (payinfo != null) { | if (payinfo != null) { | ||||
| BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | ||||
| BigDecimal pay = (BigDecimal) payinfo.get("pay"); | BigDecimal pay = (BigDecimal) payinfo.get("pay"); | ||||
| @@ -2332,7 +2338,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| } | } | ||||
| //物业费收缴率 | //物业费收缴率 | ||||
| payinfo = wxBillPropertyMapper.queryPayInfo(params); | |||||
| payinfo = wxBillPropertyMapper.queryPayInfoTotal(params); | |||||
| if (payinfo != null) { | if (payinfo != null) { | ||||
| BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | ||||
| BigDecimal pay = (BigDecimal) payinfo.get("pay"); | BigDecimal pay = (BigDecimal) payinfo.get("pay"); | ||||
| @@ -2354,7 +2360,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| } | } | ||||
| //押金收缴率 | //押金收缴率 | ||||
| payinfo = wxBillDepositMapper.queryPayInfoAll(params); | |||||
| payinfo = wxBillDepositMapper.queryPayInfoAllTotal(params); | |||||
| if (payinfo != null) { | if (payinfo != null) { | ||||
| BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | ||||
| BigDecimal pay = (BigDecimal) payinfo.get("pay"); | BigDecimal pay = (BigDecimal) payinfo.get("pay"); | ||||
| @@ -2363,7 +2369,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue(); | double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue(); | ||||
| datamap.put("depositysje", receivepay); | datamap.put("depositysje", receivepay); | ||||
| datamap.put("depositssje", pay); | datamap.put("depositssje", pay); | ||||
| datamap.put("propertyzjsjl", zjcjl); | |||||
| datamap.put("depositzjsjl", zjcjl); | |||||
| } else { | } else { | ||||
| datamap.put("depositysje", 0); | datamap.put("depositysje", 0); | ||||
| datamap.put("depositssje", 0); | datamap.put("depositssje", 0); | ||||
| @@ -2376,7 +2382,7 @@ public class WxChartServiceImpl implements WxChartDataService { | |||||
| } | } | ||||
| //其他费用收缴率 | //其他费用收缴率 | ||||
| payinfo = wxBillOtherMapper.queryPayInfo(params); | |||||
| payinfo = wxBillOtherMapper.queryPayInfoTotal(params); | |||||
| if (payinfo != null) { | if (payinfo != null) { | ||||
| BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | BigDecimal receivepay = (BigDecimal) payinfo.get("receivepay"); | ||||
| BigDecimal pay = (BigDecimal) payinfo.get("pay"); | BigDecimal pay = (BigDecimal) payinfo.get("pay"); | ||||
| @@ -198,8 +198,8 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | ||||
| //账单审批 | //账单审批 | ||||
| Integer billType = (Integer) getVariableByKey(variables, "billType"); | Integer billType = (Integer) getVariableByKey(variables, "billType"); | ||||
| Long oldPrice = Long.parseLong((String) getVariableByKey(variables, "oldPrice")); | |||||
| Long newPrice =Long.parseLong((String) getVariableByKey(variables, "newPrice")); | |||||
| Long oldPrice = Long.parseLong(getVariableByKey(variables, "oldPrice").toString()); | |||||
| Long newPrice = Long.parseLong(getVariableByKey(variables, "newPrice").toString()); | |||||
| Date updateDate = new Date(); | Date updateDate = new Date(); | ||||
| MallUserInfo mallUserInfo = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute("userSession"); | MallUserInfo mallUserInfo = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute("userSession"); | ||||
| if (billType.equals(EnumBillTypeParam.RENT.getCode())) { | if (billType.equals(EnumBillTypeParam.RENT.getCode())) { | ||||
| @@ -1086,7 +1086,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| wxBillRent.setExpiredDay(0L); | wxBillRent.setExpiredDay(0L); | ||||
| } | } | ||||
| } | } | ||||
| wxBillRent.setRevenue(needpay); | |||||
| wxBillRent.setRevenue(0L); | |||||
| wxBillRent.setTenantId(wxMerchant.getTenantId()); | wxBillRent.setTenantId(wxMerchant.getTenantId()); | ||||
| wxBillRent.setIsDel(0); | wxBillRent.setIsDel(0); | ||||
| wxBillRent.setMerchantId(wxMerchant.getId()); | wxBillRent.setMerchantId(wxMerchant.getId()); | ||||
| @@ -114,6 +114,8 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| String[] couponArray = couponId.split("-"); | String[] couponArray = couponId.split("-"); | ||||
| //保存coupon_channel | //保存coupon_channel | ||||
| WxCoupon wxCoupon = wxCouponMapper.selectByPrimaryKey(Long.parseLong(couponArray[1])); | WxCoupon wxCoupon = wxCouponMapper.selectByPrimaryKey(Long.parseLong(couponArray[1])); | ||||
| if(wxCoupon == null) | |||||
| System.out.println("------------"+couponArray[1]); | |||||
| WxCouponChannel wxCouponChannel = new WxCouponChannel(); | WxCouponChannel wxCouponChannel = new WxCouponChannel(); | ||||
| wxCouponChannel.setId(idWorker.nextId()); | wxCouponChannel.setId(idWorker.nextId()); | ||||
| wxCouponChannel.setBeginTime(record.getBeginTime()); | wxCouponChannel.setBeginTime(record.getBeginTime()); | ||||
| @@ -546,5 +546,6 @@ | |||||
| left join wx_merchant_shop ms on ms.`merchant_id` = m.id | left join wx_merchant_shop ms on ms.`merchant_id` = m.id | ||||
| left join wx_shop ws on ms.`shop_id` = ws.id | left join wx_shop ws on ms.`shop_id` = ws.id | ||||
| where m.status=1 and m.tenant_id = #{tenantId} | where m.status=1 and m.tenant_id = #{tenantId} | ||||
| order by totalOwe desc | |||||
| </select> | </select> | ||||
| </mapper> | </mapper> | ||||
| @@ -97,19 +97,18 @@ | |||||
| group by tenant_id | group by tenant_id | ||||
| </select> | </select> | ||||
| <select id="queryPayInfoAll" resultType="hashmap" parameterType="hashmap"> | |||||
| <select id="queryPayInfoAllTotal" resultType="hashmap" parameterType="hashmap"> | |||||
| select sum(res.receivepay) receivepay,sum(res.pay) pay,res.tenant_id from | select sum(res.receivepay) receivepay,sum(res.pay) pay,res.tenant_id from | ||||
| ( | ( | ||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent_deposit | select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent_deposit | ||||
| where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} | |||||
| union all | union all | ||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property_deposit | select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property_deposit | ||||
| where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} | |||||
| union all | union all | ||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_other_deposit | select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_other_deposit | ||||
| where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} | |||||
| ) res | ) res | ||||
| group by res.tenant_id | |||||
| </select> | </select> | ||||
| <select id="queryOweInfoAll" resultType="hashmap" parameterType="hashmap"> | <select id="queryOweInfoAll" resultType="hashmap" parameterType="hashmap"> | ||||
| @@ -98,10 +98,17 @@ | |||||
| </update> | </update> | ||||
| <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | |||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_other | |||||
| where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} | |||||
| <select id="queryPayInfoTotal" resultType="hashmap" parameterType="hashmap"> | |||||
| select sum(t.receivepay),receivepay,sum(t.pay) pay from | |||||
| ( | |||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_other | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} | |||||
| group by tenant_id | group by tenant_id | ||||
| union | |||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_daily | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} | |||||
| group by tenant_id | |||||
| ) t | |||||
| </select> | </select> | ||||
| @@ -116,10 +116,17 @@ | |||||
| <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property | select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property | ||||
| where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} and is_preview = 0 | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0 | |||||
| group by tenant_id | group by tenant_id | ||||
| </select> | </select> | ||||
| <select id="queryPayInfoTotal" resultType="hashmap" parameterType="hashmap"> | |||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_property | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0 | |||||
| </select> | |||||
| <select id="queryOweInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryOweInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_property | select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_property | ||||
| where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0 | where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0 | ||||
| @@ -124,6 +124,12 @@ | |||||
| group by tenant_id | group by tenant_id | ||||
| </select> | </select> | ||||
| <select id="queryPayInfoTotal" resultType="hashmap" parameterType="hashmap"> | |||||
| select IFNULL(sum(receive_pay),0) receivepay,IFNULL(sum(pay),0) pay,tenant_id from wx_bill_rent | |||||
| where tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0 | |||||
| </select> | |||||
| <select id="queryOweInfo" resultType="hashmap" parameterType="hashmap"> | <select id="queryOweInfo" resultType="hashmap" parameterType="hashmap"> | ||||
| select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_rent | select IFNULL(sum(owe),0) owe,tenant_id from wx_bill_rent | ||||
| where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0 | where status = 1 and tenant_id=#{tenantId} and receive_date between #{startdate} and #{enddate} and is_preview = 0 | ||||
| @@ -765,12 +765,7 @@ | |||||
| </select> | </select> | ||||
| <select id="findCouponByTopic" parameterType="com.iformall.domain.po.WxTopic" resultType="com.iformall.domain.po.WxCoupon"> | <select id="findCouponByTopic" parameterType="com.iformall.domain.po.WxTopic" resultType="com.iformall.domain.po.WxCoupon"> | ||||
| select ct.id as id, | |||||
| wc.tenant_id,wc.`type`,wc.`cover_img`,wc.`title`,wc.`sub_title`,wc.`sale_price`,wc.`use_price`,wc.`use_limit_quantity`,wc.`send_type`, | |||||
| wc.`valid_type`,wc.`valid_start_date`,wc.`valid_end_date`,wc.`valid_days`,wc.`detail`,wc.`price`,wc.`unit`,wc.`remain_inventory`,wc.`inventory`, | |||||
| wc.`remark`,wc.`status`,wc.`create_date`,wc.`update_date`,wc.`business`,wc.`sub_business`,wc.`support_transfer`,wc.`subsidy_num`,wc.`subsidy_type`, | |||||
| wc.`press_limit_num`, wc.`press_limit_hours`, wc.`auto_refund`,wc.`credit_price`,wc.`credit_refund` | |||||
| ,wc.title as couponName,wc.`cover_img` as couponPic,wc.id as couponId from wx_coupon_channel ct left join | |||||
| select wc.* from wx_coupon_channel ct left join | |||||
| wx_coupon wc on wc.id = ct.coupon_id | wx_coupon wc on wc.id = ct.coupon_id | ||||
| where ct.`sub_target_id` = #{id} | where ct.`sub_target_id` = #{id} | ||||
| </select> | </select> | ||||
| @@ -361,11 +361,11 @@ | |||||
| </if> | </if> | ||||
| <if test="startDate != null"> | <if test="startDate != null"> | ||||
| AND co.create_date > #{startTime,jdbcType=TIMESTAMP} | |||||
| AND co.create_date > #{startDate,jdbcType=TIMESTAMP} | |||||
| </if> | </if> | ||||
| <if test="endDate != null"> | <if test="endDate != null"> | ||||
| AND co.create_date < #{endTime,jdbcType=TIMESTAMP} | |||||
| AND co.create_date < #{endDate,jdbcType=TIMESTAMP} | |||||
| </if> | </if> | ||||
| <if test=" null != id "> | <if test=" null != id "> | ||||