developrelease_toaliyun_real
| @@ -113,7 +113,7 @@ fm: | |||||
| exception: false | exception: false | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 1 | deploy: 1 | ||||
| open: true | |||||
| open: false | |||||
| ueditor: | ueditor: | ||||
| config: config.json | config: config.json | ||||
| @@ -97,7 +97,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 3 | deploy: 3 | ||||
| open: true | |||||
| open: false | |||||
| ueditor: | ueditor: | ||||
| config: config.json | config: config.json | ||||
| @@ -97,7 +97,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 2 | deploy: 2 | ||||
| open: true | |||||
| open: false | |||||
| ueditor: | ueditor: | ||||
| config: config.json | config: config.json | ||||
| @@ -87,7 +87,7 @@ fm: | |||||
| exception: false | exception: false | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 1 | deploy: 1 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -90,7 +90,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 3 | deploy: 3 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -90,7 +90,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 2 | deploy: 2 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -353,9 +353,15 @@ public class WxUserGrantController extends BaseController { | |||||
| WxCUser user = getUser(); | WxCUser user = getUser(); | ||||
| if (user != null) { | if (user != null) { | ||||
| logger.debug(user.toString()); | |||||
| boolean bFirstNickName = false; | |||||
| if(StringUtils.isBlank(user.getNickName())) { | |||||
| bFirstNickName = true; | |||||
| } | |||||
| WxMaService wxMaService = getWeappService(user.getAppId()); | WxMaService wxMaService = getWeappService(user.getAppId()); | ||||
| logger.debug(user.toString()); | |||||
| String session_key = user.getSessionKey(); | String session_key = user.getSessionKey(); | ||||
| try { | try { | ||||
| // 解密用户信息 | // 解密用户信息 | ||||
| @@ -371,10 +377,13 @@ public class WxUserGrantController extends BaseController { | |||||
| user.setLanguage(userInfo.getLanguage()); | user.setLanguage(userInfo.getLanguage()); | ||||
| wxCUserService.saveOrUpdate(user); | wxCUserService.saveOrUpdate(user); | ||||
| // 成长值 | |||||
| wxScoreRulesService.addScore(EnumScoreType.WECHAT_PERSION, user); | |||||
| //增加积分 | |||||
| addCredit(user, EnumScoreType.WECHAT_PERSION); | |||||
| if(bFirstNickName) { | |||||
| // 首次获取昵称 | |||||
| // 成长值 | |||||
| wxScoreRulesService.addScore(EnumScoreType.WECHAT_PERSION, user); | |||||
| //增加积分 | |||||
| addCredit(user, EnumScoreType.WECHAT_PERSION); | |||||
| } | |||||
| resultMap.put("openId", user.getOpenId()); | resultMap.put("openId", user.getOpenId()); | ||||
| resultMap.put("unionId", user.getUnionId()); | resultMap.put("unionId", user.getUnionId()); | ||||
| @@ -388,7 +397,7 @@ public class WxUserGrantController extends BaseController { | |||||
| return new ResultData(ErrorCode.DB_FAIL.getCode(), "解密并保存出错", resultMap); | return new ResultData(ErrorCode.DB_FAIL.getCode(), "解密并保存出错", resultMap); | ||||
| } | } | ||||
| } else { | } else { | ||||
| return new ResultData(ErrorCode.USER_IS_EMPTY); | |||||
| return new ResultData(ErrorCode.USER_LOGIN_FAILED); | |||||
| } | } | ||||
| } | } | ||||
| @@ -416,6 +425,15 @@ public class WxUserGrantController extends BaseController { | |||||
| WxCUser user = getUser(); | WxCUser user = getUser(); | ||||
| if (user == null) { | |||||
| return new ResultData(ErrorCode.USER_IS_EMPTY); | |||||
| } | |||||
| boolean isFirstPhone = false; | |||||
| if(StringUtils.isBlank(user.getPhone())) { | |||||
| isFirstPhone = true; | |||||
| } | |||||
| WxMaService wxMaService = getWeappService(user.getAppId()); | WxMaService wxMaService = getWeappService(user.getAppId()); | ||||
| String session_key = user.getSessionKey(); | String session_key = user.getSessionKey(); | ||||
| @@ -429,10 +447,13 @@ public class WxUserGrantController extends BaseController { | |||||
| user.setCountryCode(phoneNoInfo.getCountryCode()); | user.setCountryCode(phoneNoInfo.getCountryCode()); | ||||
| wxCUserService.saveOrUpdate(user); | wxCUserService.saveOrUpdate(user); | ||||
| // 成长值 | |||||
| user.setScore(user.getScore() + wxScoreRulesService.addScore(EnumScoreType.WECHAT_PHONE, user)); | |||||
| //增加积分 | |||||
| addCredit(user, EnumScoreType.WECHAT_PHONE); | |||||
| if(isFirstPhone) { | |||||
| // 首次授权, 增加成长值及积分 | |||||
| // 成长值 | |||||
| user.setScore(wxScoreRulesService.addScore(EnumScoreType.WECHAT_PHONE, user)); | |||||
| //增加积分 | |||||
| addCredit(user, EnumScoreType.WECHAT_PHONE); | |||||
| } | |||||
| resultMap.put("msg", "授权手机成功!"); | resultMap.put("msg", "授权手机成功!"); | ||||
| resultMap.put("phone", phoneNoInfo.getPhoneNumber()); | resultMap.put("phone", phoneNoInfo.getPhoneNumber()); | ||||
| @@ -87,7 +87,7 @@ fm: | |||||
| exception: false | exception: false | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 1 | deploy: 1 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -90,7 +90,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 3 | deploy: 3 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -90,7 +90,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 2 | deploy: 2 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -106,7 +106,7 @@ fm: | |||||
| exception: false | exception: false | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 1 | deploy: 1 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -81,7 +81,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 3 | deploy: 3 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -91,7 +91,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 2 | deploy: 2 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -89,7 +89,7 @@ fm: | |||||
| exception: false | exception: false | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 1 | deploy: 1 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -91,7 +91,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 3 | deploy: 3 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -91,7 +91,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 2 | deploy: 2 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -190,6 +190,7 @@ public enum ErrorCode{ | |||||
| WE_RUN_DATA_DECODE_ERR(11008, "运动信息解密失败"), | WE_RUN_DATA_DECODE_ERR(11008, "运动信息解密失败"), | ||||
| MP_TEMPLATE_SEND_FAILED(11009, "公众号模板消息发送失败"), | MP_TEMPLATE_SEND_FAILED(11009, "公众号模板消息发送失败"), | ||||
| UNIFORM_SEND_FAILED(11010, "小程序统一消息发送失败"), | UNIFORM_SEND_FAILED(11010, "小程序统一消息发送失败"), | ||||
| USER_LOGIN_FAILED(11011, "微信用户未登录或登录有问题"), | |||||
| /** | /** | ||||
| @@ -22,6 +22,8 @@ public class WxCreditHistory implements Serializable { | |||||
| protected List<Long> ids; | protected List<Long> ids; | ||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| @Transient | |||||
| protected List<Long> merchantIds; | |||||
| @Transient | @Transient | ||||
| @io.swagger.annotations.ApiModelProperty(value="开始时间",name="startTime") | @io.swagger.annotations.ApiModelProperty(value="开始时间",name="startTime") | ||||
| @@ -189,6 +189,8 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| record.setCreateDate(new Date()); | record.setCreateDate(new Date()); | ||||
| //根据merchantIds判断券对应的商户是否为多商户 来赋值merchantId | |||||
| setMerchantId(record); | |||||
| wxCreditHistoryMapper.insertSelective(record); | wxCreditHistoryMapper.insertSelective(record); | ||||
| //将计算出来新的总积分 更新到两张用户表里 | //将计算出来新的总积分 更新到两张用户表里 | ||||
| if (wxCUser != null) { | if (wxCUser != null) { | ||||
| @@ -210,6 +212,16 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||||
| return record; | return record; | ||||
| } | } | ||||
| private void setMerchantId(WxCreditHistory record) { | |||||
| if (record.getMerchantIds() != null && record.getMerchantIds().size() > 0) { | |||||
| if (record.getMerchantIds().size() == 1) { | |||||
| record.setMerchantId(record.getMerchantIds().get(0)); | |||||
| } else { | |||||
| record.setMerchantId(Long.valueOf(EnumMerchantType.MERCHANT_MORE.getCode())); | |||||
| } | |||||
| } | |||||
| } | |||||
| @Override | @Override | ||||
| public void deleteById(Long id) { | public void deleteById(Long id) { | ||||
| wxCreditHistoryMapper.deleteByPrimaryKey(id); | wxCreditHistoryMapper.deleteByPrimaryKey(id); | ||||
| @@ -605,7 +605,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); | Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); | ||||
| wxBillProperty.setReceiveDate(receiveDate); | wxBillProperty.setReceiveDate(receiveDate); | ||||
| wxBillProperty.setStarttime(receiveDate); | wxBillProperty.setStarttime(receiveDate); | ||||
| wxBillProperty.setEndtime(DateUtils.getLastDayForMonth(receiveDate,receivePeriod * i)); | |||||
| wxBillProperty.setEndtime(DateUtils.getLastDayForMonth(wxBillProperty.getStarttime(),receivePeriod * i)); | |||||
| instance.clear(); | instance.clear(); | ||||
| instance.setTime(receiveDate); | instance.setTime(receiveDate); | ||||
| @@ -613,38 +613,37 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| instance.add(Calendar.DAY_OF_MONTH, -1); | instance.add(Calendar.DAY_OF_MONTH, -1); | ||||
| wxBillProperty.setEndtime(instance.getTime()); | wxBillProperty.setEndtime(instance.getTime()); | ||||
| }else if(i == paycount - 1) {//最后周期 | }else if(i == paycount - 1) {//最后周期 | ||||
| //receivePeriod * i 得到开始日期 | |||||
| Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); | Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); | ||||
| wxBillProperty.setReceiveDate(receiveDate); | wxBillProperty.setReceiveDate(receiveDate); | ||||
| wxBillProperty.setStarttime(receiveDate); | wxBillProperty.setStarttime(receiveDate); | ||||
| //得到开始日期第一天 | |||||
| Date firstDay = DateUtils.getFirstDayForCurrMonth(wxBillProperty.getStarttime()); | Date firstDay = DateUtils.getFirstDayForCurrMonth(wxBillProperty.getStarttime()); | ||||
| instance.clear(); | instance.clear(); | ||||
| instance.setTime(firstDay); | instance.setTime(firstDay); | ||||
| //最后一期有余,加上残月,(不整除时,最后一个月有余,否则为0) | |||||
| if(isFirstDay(wxPropertyContract.getRentalStartDate())){ | |||||
| if(receivePeriod > 1) { | |||||
| if(isLastYesr && extralease > 0) { | |||||
| //若最后一期有余,带上残月,(不整除时,最后一个月有余,否则extralease=0) | |||||
| if(isFirstDay(wxPropertyContract.getRentalStartDate())){ //月第一天起租 | |||||
| if(receivePeriod > 1){ | |||||
| if(isLastYesr && extralease > 0){ | |||||
| instance.add(dayType, extralease); | instance.add(dayType, extralease); | ||||
| }else{ | }else{ | ||||
| instance.add(dayType, receivePeriod); | instance.add(dayType, receivePeriod); | ||||
| } | } | ||||
| }else { | |||||
| }else{ | |||||
| instance.add(dayType, receivePeriod); | instance.add(dayType, receivePeriod); | ||||
| } | } | ||||
| }else{ | }else{ | ||||
| if(receivePeriod > 1) { | |||||
| if(isLastYesr) { | |||||
| instance.add(dayType, extralease); | |||||
| }else{ | |||||
| instance.add(dayType, receivePeriod); | |||||
| } | |||||
| } | |||||
| if(isLastYesr) { | if(isLastYesr) { | ||||
| instance.add(dayType, extralease); | |||||
| instance.add(Calendar.DAY_OF_MONTH, rentStartDateInt - 1); | instance.add(Calendar.DAY_OF_MONTH, rentStartDateInt - 1); | ||||
| }else{ | |||||
| instance.add(dayType, receivePeriod); | |||||
| } | } | ||||
| } | } | ||||
| //先减一个月 后加上残月 | |||||
| instance.add(Calendar.DAY_OF_MONTH, -1); | instance.add(Calendar.DAY_OF_MONTH, -1); | ||||
| wxBillProperty.setEndtime(instance.getTime()); | wxBillProperty.setEndtime(instance.getTime()); | ||||
| @@ -662,15 +661,11 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| needPayDouble += price * receivePeriod; | needPayDouble += price * receivePeriod; | ||||
| } | } | ||||
| }else{ | }else{ | ||||
| if(receivePeriod > 1) { | |||||
| if(isLastYesr) { | |||||
| needPayDouble += price * extralease; | |||||
| }else{ | |||||
| needPayDouble += price * receivePeriod; | |||||
| } | |||||
| } | |||||
| if(isLastYesr) { | if(isLastYesr) { | ||||
| needPayDouble += price * extralease; | |||||
| needPayDouble += oneDayProce * endDateInt; | needPayDouble += oneDayProce * endDateInt; | ||||
| }else{ | |||||
| needPayDouble += price * receivePeriod; | |||||
| } | } | ||||
| } | } | ||||
| DecimalFormat format = new DecimalFormat("0"); | DecimalFormat format = new DecimalFormat("0"); | ||||
| @@ -970,51 +970,43 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| wxBillRent.setStarttime(receiveDate); | wxBillRent.setStarttime(receiveDate); | ||||
| wxBillRent.setEndtime(DateUtils.getLastDayForMonth(wxBillRent.getStarttime(),receivePeriod * i)); | wxBillRent.setEndtime(DateUtils.getLastDayForMonth(wxBillRent.getStarttime(),receivePeriod * i)); | ||||
| // instance.clear(); | |||||
| // instance.setTime(receiveDate); | |||||
| // instance.add(dayType, receivePeriod); | |||||
| // instance.add(Calendar.DAY_OF_MONTH, -1); | |||||
| // wxBillRent.setEndtime(instance.getTime()); | |||||
| instance.clear(); | |||||
| instance.setTime(receiveDate); | |||||
| instance.add(dayType, receivePeriod); | |||||
| instance.add(Calendar.DAY_OF_MONTH, -1); | |||||
| wxBillRent.setEndtime(instance.getTime()); | |||||
| }else if(i == paycount - 1) {//最后周期 | }else if(i == paycount - 1) {//最后周期 | ||||
| //receivePeriod * i 得到开始日期 | |||||
| Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); | Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); | ||||
| wxBillRent.setReceiveDate(receiveDate); | wxBillRent.setReceiveDate(receiveDate); | ||||
| wxBillRent.setStarttime(receiveDate); | wxBillRent.setStarttime(receiveDate); | ||||
| //得到开始日期第一天 | |||||
| Date firstDay = DateUtils.getFirstDayForCurrMonth(wxBillRent.getStarttime()); | Date firstDay = DateUtils.getFirstDayForCurrMonth(wxBillRent.getStarttime()); | ||||
| instance.clear(); | instance.clear(); | ||||
| instance.setTime(firstDay); | instance.setTime(firstDay); | ||||
| if(new SimpleDateFormat("yyyy-MM-dd").format(wxBillRent.getEndtime()).equals("2020-02-29")){ | |||||
| System.out.println( "-----------"+receivePeriod * i); | |||||
| System.out.println("-----------"+new SimpleDateFormat("yyyy-MM-dd").format(wxBillRent.getReceiveDate())); | |||||
| System.out.println("-----------"+new SimpleDateFormat("yyyy-MM-dd").format(wxBillRent.getEndtime())); | |||||
| System.out.println(); | |||||
| } | |||||
| //最后一期有余,加上残月,(不整除时,最后一个月有余,否则为0) | |||||
| if(isFirstDay(wxRentContract.getRentalStartDate())){ | |||||
| if(receivePeriod > 1) { | |||||
| if(isLastYesr && extralease > 0) { | |||||
| //若最后一期有余,带上残月,(不整除时,最后一个月有余,否则extralease=0) | |||||
| if(isFirstDay(wxRentContract.getRentalStartDate())){ //月第一天起租 | |||||
| if(receivePeriod > 1){ | |||||
| if(isLastYesr && extralease > 0){ | |||||
| instance.add(dayType, extralease); | instance.add(dayType, extralease); | ||||
| }else{ | }else{ | ||||
| instance.add(dayType, receivePeriod); | instance.add(dayType, receivePeriod); | ||||
| } | } | ||||
| }else { | |||||
| }else{ | |||||
| instance.add(dayType, receivePeriod); | instance.add(dayType, receivePeriod); | ||||
| } | } | ||||
| }else{ | }else{ | ||||
| if(receivePeriod > 1) { | |||||
| if(isLastYesr) { | |||||
| instance.add(dayType, extralease); | |||||
| }else{ | |||||
| instance.add(dayType, receivePeriod); | |||||
| } | |||||
| } | |||||
| if(isLastYesr) { | if(isLastYesr) { | ||||
| instance.add(dayType, extralease); | |||||
| instance.add(Calendar.DAY_OF_MONTH, rentStartDateInt - 1); | instance.add(Calendar.DAY_OF_MONTH, rentStartDateInt - 1); | ||||
| }else{ | |||||
| instance.add(dayType, receivePeriod); | |||||
| } | } | ||||
| } | } | ||||
| //先减一个月 后加上残月 | |||||
| instance.add(Calendar.DAY_OF_MONTH, -1); | instance.add(Calendar.DAY_OF_MONTH, -1); | ||||
| wxBillRent.setEndtime(instance.getTime()); | wxBillRent.setEndtime(instance.getTime()); | ||||
| @@ -1032,15 +1024,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| needPayDouble += price * receivePeriod; | needPayDouble += price * receivePeriod; | ||||
| } | } | ||||
| }else{ | }else{ | ||||
| if(receivePeriod > 1) { | |||||
| if(isLastYesr) { | |||||
| needPayDouble += price * extralease; | |||||
| }else{ | |||||
| needPayDouble += price * receivePeriod; | |||||
| } | |||||
| } | |||||
| if(isLastYesr) { | if(isLastYesr) { | ||||
| needPayDouble += price * extralease; | |||||
| needPayDouble += oneDayProce * endDateInt; | needPayDouble += oneDayProce * endDateInt; | ||||
| }else{ | |||||
| needPayDouble += price * receivePeriod; | |||||
| } | } | ||||
| } | } | ||||
| DecimalFormat format = new DecimalFormat("0"); | DecimalFormat format = new DecimalFormat("0"); | ||||
| @@ -2038,3 +2026,4 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| @@ -106,7 +106,7 @@ fm: | |||||
| exception: false | exception: false | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 1 | deploy: 1 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -91,7 +91,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 3 | deploy: 3 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| @@ -91,7 +91,7 @@ fm: | |||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | ||||
| deploy: 2 | deploy: 2 | ||||
| open: true | |||||
| open: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||