| @@ -10,7 +10,6 @@ import com.iformall.domain.po.msg.MailMsg; | |||
| import com.iformall.domain.vo.OweMerchantVo; | |||
| import com.iformall.domain.vo.WxBillAll; | |||
| import com.iformall.domain.vo.WxBillAllVo; | |||
| import com.iformall.domain.vo.WxNotRentShopVo; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.*; | |||
| @@ -19,10 +18,8 @@ import com.iformall.service.*; | |||
| import org.apache.commons.collections.CollectionUtils; | |||
| import org.apache.commons.collections.map.HashedMap; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.BeanUtils; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -30,7 +27,6 @@ import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| import java.math.RoundingMode; | |||
| import java.util.*; | |||
| import java.util.stream.Collectors; | |||
| @@ -263,9 +259,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| Date date = new Date(); | |||
| wxBillOtherDeposit.setPayDate(date); | |||
| Integer owe = (Integer) bill.get("owe"); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillOtherDeposit.setPay(wxBillOtherDeposit.getPay() + owe); | |||
| wxBillOtherDeposit.setOwe(0); | |||
| wxBillOtherDeposit.setOwe(0L); | |||
| wxBillOtherDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); | |||
| wxBillOtherDeposit.setUpdatetime(date); | |||
| wxBillOtherDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| @@ -305,9 +301,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| Date date = new Date(); | |||
| wxBillOther.setPayDate(date); | |||
| Integer owe = (Integer) bill.get("owe"); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillOther.setPay(wxBillOther.getPay()+owe); | |||
| wxBillOther.setOwe(0); | |||
| wxBillOther.setOwe(0L); | |||
| wxBillOther.setStatus(EnumBillDailyStatus.PAID.getCode()); | |||
| wxBillOther.setUpdatetime(date); | |||
| wxBillOther.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| @@ -347,9 +343,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| Date date = new Date(); | |||
| wxBillDaily.setPayDate(date); | |||
| Integer owe = (Integer) bill.get("owe"); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillDaily.setPay(wxBillDaily.getPay()+owe); | |||
| wxBillDaily.setOwe(0); | |||
| wxBillDaily.setOwe(0L); | |||
| wxBillDaily.setStatus(EnumBillDailyStatus.PAID.getCode()); | |||
| wxBillDaily.setUpdatetime(date); | |||
| wxBillDaily.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| @@ -390,9 +386,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| Date date = new Date(); | |||
| wxBillPropertyDeposit.setPayDate(date); | |||
| Integer owe = (Integer) bill.get("owe"); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillPropertyDeposit.setPay(wxBillPropertyDeposit.getPay()+owe); | |||
| wxBillPropertyDeposit.setOwe(0); | |||
| wxBillPropertyDeposit.setOwe(0L); | |||
| wxBillPropertyDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); | |||
| wxBillPropertyDeposit.setUpdatetime(date); | |||
| wxBillPropertyDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| @@ -433,9 +429,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| Date date = new Date(); | |||
| property.setPayDate(date); | |||
| Integer owe = (Integer) bill.get("owe"); | |||
| Long owe = (Long) bill.get("owe"); | |||
| property.setPay(property.getPay()+owe); | |||
| property.setOwe(0); | |||
| property.setOwe(0L); | |||
| property.setStatus(EnumBillDailyStatus.PAID.getCode()); | |||
| property.setUpdatetime(date); | |||
| property.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| @@ -476,9 +472,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| Date date = new Date(); | |||
| wxBillDeposit.setPayDate(date); | |||
| Integer owe = (Integer) bill.get("owe"); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillDeposit.setPay(wxBillDeposit.getPay()+owe); | |||
| wxBillDeposit.setOwe(0); | |||
| wxBillDeposit.setOwe(0L); | |||
| wxBillDeposit.setStatus(EnumBillDailyStatus.PAID.getCode()); | |||
| wxBillDeposit.setUpdatetime(date); | |||
| wxBillDeposit.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| @@ -519,9 +515,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| } | |||
| Date date = new Date(); | |||
| wxBillRent.setPayDate(date); | |||
| Integer owe = (Integer) bill.get("owe"); | |||
| Long owe = (Long) bill.get("owe"); | |||
| wxBillRent.setPay(wxBillRent.getPay()+owe); | |||
| wxBillRent.setOwe(0); | |||
| wxBillRent.setOwe(0L); | |||
| wxBillRent.setStatus(EnumBillDailyStatus.PAID.getCode()); | |||
| wxBillRent.setUpdatetime(date); | |||
| wxBillRent.setPayWay(EnumBillPayWay.WECHAT_PAY.getCode()); | |||
| @@ -617,7 +613,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| }else if(type.intValue() == 2){ | |||
| return wxBillPropertyMapper.oweBillCount(contractId); | |||
| } | |||
| return 0l; | |||
| return 0L; | |||
| } | |||
| public Map<Long, List<Map<String, Object>>> toMap(List<Map<String, Object>> mapList){ | |||
| @@ -143,7 +143,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| if(wxBillDaily==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillDaily.getPay(); | |||
| Long addpay = wxBillDaily.getPay(); | |||
| wxBillDaily.setPayDate(record.getPayDate()); | |||
| wxBillDaily.setPay(record.getPay()); | |||
| wxBillDaily.setReceivePay(record.getReceivePay()); | |||
| @@ -128,7 +128,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||
| if(wxBillDeposit==null){ | |||
| return new ResultData(ErrorCode.BILL_RENT_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillDeposit.getPay(); | |||
| Long addpay = wxBillDeposit.getPay(); | |||
| wxBillDeposit.setPayDate(record.getPayDate()); | |||
| wxBillDeposit.setPay(record.getPay()); | |||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | |||
| @@ -144,7 +144,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| if (wxBillOtherDeposit == null) { | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillOtherDeposit.getPay(); | |||
| Long addpay = wxBillOtherDeposit.getPay(); | |||
| wxBillOtherDeposit.setPayDate(record.getPayDate()); | |||
| wxBillOtherDeposit.setPay(record.getPay()); | |||
| wxBillOtherDeposit.setReceivePay(record.getReceivePay()); | |||
| @@ -143,7 +143,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| if(wxBillOther==null){ | |||
| return new ResultData(ErrorCode.BILL_ROUTINE_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillOther.getPay(); | |||
| Long addpay = wxBillOther.getPay(); | |||
| wxBillOther.setPayDate(record.getPayDate()); | |||
| wxBillOther.setPay(record.getPay()); | |||
| wxBillOther.setReceivePay(record.getReceivePay()); | |||
| @@ -128,7 +128,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||
| if(record==null){ | |||
| return new ResultData(ErrorCode.BILL_PROPERTY_DEPOSIT_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillDeposit.getPay(); | |||
| Long addpay = wxBillDeposit.getPay(); | |||
| wxBillDeposit.setPayDate(record.getPayDate()); | |||
| wxBillDeposit.setPay(record.getPay()); | |||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | |||
| @@ -127,7 +127,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| if(property==null){ | |||
| return new ResultData(ErrorCode.BILL_PROPERTY_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = property.getPay(); | |||
| Long addpay = property.getPay(); | |||
| property.setRevenue(record.getRevenue()); | |||
| property.setLatePayRatio(record.getLatePayRatio()); | |||
| property.setLatePayTime(record.getLatePayTime()); | |||
| @@ -127,7 +127,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| if(wxBillRent==null){ | |||
| return new ResultData(ErrorCode.BILL_RENT_IS_NOT_FOUND); | |||
| } | |||
| Integer addpay = wxBillRent.getPay(); | |||
| Long addpay = wxBillRent.getPay(); | |||
| wxBillRent.setRevenue(record.getRevenue()); | |||
| wxBillRent.setLatePayRatio(record.getLatePayRatio()); | |||
| wxBillRent.setLatePayTime(record.getLatePayTime()); | |||
| @@ -198,8 +198,8 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | |||
| //账单审批 | |||
| Integer billType = (Integer) getVariableByKey(variables, "billType"); | |||
| Integer oldPrice = (Integer) getVariableByKey(variables, "oldPrice"); | |||
| Integer newPrice = (Integer) getVariableByKey(variables, "newPrice"); | |||
| Long oldPrice = (Long) getVariableByKey(variables, "oldPrice"); | |||
| Long newPrice = (Long) getVariableByKey(variables, "newPrice"); | |||
| Date updateDate = new Date(); | |||
| MallUserInfo mallUserInfo = (MallUserInfo) SecurityUtils.getSubject().getSession().getAttribute("userSession"); | |||
| if (billType.equals(EnumBillTypeParam.RENT.getCode())) { | |||
| @@ -308,7 +308,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| } | |||
| } | |||
| public void updateDailyBill(Long businessId, Integer newPrice, Date updateDate) { | |||
| public void updateDailyBill(Long businessId, Long newPrice, Date updateDate) { | |||
| WxBillDaily dbBill = wxBillDailyMapper.selectByPrimaryKey(businessId); | |||
| WxBillDaily wxBillDaily = new WxBillDaily(); | |||
| wxBillDaily.setId(businessId); | |||
| @@ -321,7 +321,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||
| wxBillDailyMapper.updateByPrimaryKeySelective(wxBillDaily); | |||
| } | |||
| public void addBillAction(Long billId, Integer oldPrice, Integer newPrice, MallUserInfo mallUserInfo) { | |||
| public void addBillAction(Long billId, Long oldPrice, Long newPrice, MallUserInfo mallUserInfo) { | |||
| WxBillAction wxBillAction = new WxBillAction(); | |||
| wxBillAction.setBillId(billId); | |||
| wxBillAction.setOldPrice(oldPrice); | |||
| @@ -371,8 +371,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| WxBillPropertyDeposit wxBillDeposit = new WxBillPropertyDeposit(); | |||
| wxBillDeposit.setId(idWorker.nextId()); | |||
| wxBillDeposit.setPropertyContractId(wxPropertyContract.getId()); | |||
| wxBillDeposit.setPay(0); | |||
| int needpay = wxPropertyContract.getDeposit(); | |||
| wxBillDeposit.setPay(0L); | |||
| Long needpay = wxPropertyContract.getDeposit(); | |||
| wxBillDeposit.setNeedPay(needpay); | |||
| wxBillDeposit.setReceivePay(needpay); | |||
| wxBillDeposit.setOwe(needpay); | |||
| @@ -421,7 +421,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| } | |||
| } | |||
| public List<WxBillProperty> buildRentMonth(WxMerchant wxMerchant, Long userId, WxPropertyContract wxPropertyContract, int receivePeriod, Integer lease, Date rentalStartDate, Integer price,Integer isPreview) { | |||
| public List<WxBillProperty> buildRentMonth(WxMerchant wxMerchant, Long userId, WxPropertyContract wxPropertyContract, int receivePeriod, Integer lease, Date rentalStartDate, Long price, Integer isPreview) { | |||
| String adjustRatio = wxPropertyContract.getAdjustRatio(); | |||
| String rentInfo = wxPropertyContract.getRentInfo(); | |||
| Map<String, Object> shopInfo = new HashMap<>(); | |||
| @@ -435,7 +435,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| List<Integer> integers = JSONArray.parseArray(adjustRatio, Integer.class); | |||
| integers.add(0, 0); | |||
| int size = integers.size(); | |||
| int[] priceArr = new int[size]; | |||
| long[] priceArr = new long[size]; | |||
| priceArr[0] = price; | |||
| double priceD = price; | |||
| for (int i = 1; i < size; i++) { | |||
| @@ -488,7 +488,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| return false; | |||
| } | |||
| public Map<String, Object> buildRent(int lease, int receivePeriod, int price, Date startdate, int dayType, WxPropertyContract wxPropertyContract, Long userId, WxMerchant wxMerchant, int billcount, Integer isPreview, Map<String, Object> shopInfo,boolean isLastYesr) { | |||
| public Map<String, Object> buildRent(int lease, int receivePeriod, long price, Date startdate, int dayType, WxPropertyContract wxPropertyContract, Long userId, WxMerchant wxMerchant, int billcount, Integer isPreview, Map<String, Object> shopInfo, boolean isLastYesr) { | |||
| Map<String,Object> resultMap = new HashedMap(); | |||
| List<WxBillProperty> resultList = new ArrayList<>(); | |||
| int extralease = lease % receivePeriod; | |||
| @@ -510,8 +510,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| wxBillProperty.setId(idWorker.nextId()); | |||
| wxBillProperty.setPropertyContractId(wxPropertyContract.getId()); | |||
| wxBillProperty.setPay(0); | |||
| int needpay = price * receivePeriod; | |||
| wxBillProperty.setPay(0L); | |||
| long needpay = new BigDecimal(price).multiply(new BigDecimal(receivePeriod)).longValue(); | |||
| Date date = new Date(); | |||
| Calendar instance = Calendar.getInstance(); | |||
| @@ -751,7 +751,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| int receivePeriod = wxPropertyContract.getReceivePeriod().intValue(); | |||
| Integer lease = wxPropertyContract.getLease(); | |||
| Date rentalStartDate = propertyContract.getRentalStartDate(); | |||
| Integer price = propertyContract.getPrice(); | |||
| Long price = propertyContract.getPrice(); | |||
| //按月计租 | |||
| if (propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode()) | |||
| @@ -524,8 +524,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| WxBillDeposit wxBillDeposit = new WxBillDeposit(); | |||
| wxBillDeposit.setId(idWorker.nextId()); | |||
| wxBillDeposit.setRentContractId(wxRentContract.getId()); | |||
| wxBillDeposit.setPay(0); | |||
| int needpay = wxRentContract.getDeposit(); | |||
| wxBillDeposit.setPay(0L); | |||
| long needpay = wxRentContract.getDeposit(); | |||
| wxBillDeposit.setReceivePay(needpay); | |||
| wxBillDeposit.setNeedPay(needpay); | |||
| wxBillDeposit.setOwe(needpay); | |||
| @@ -854,9 +854,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||
| wxBillRent.setId(idWorker.nextId()); | |||
| wxBillRent.setRentContractId(wxRentContract.getId()); | |||
| wxBillRent.setPay(0); | |||
| wxBillRent.setPay(0L); | |||
| //System.out.println("-----------price:"+price+",receivePeriod:"+receivePeriod); | |||
| int needpay = price * receivePeriod; | |||
| long needpay = new BigDecimal(price).multiply(new BigDecimal(receivePeriod)).longValue(); | |||
| //System.out.println("--------needpay:"+needpay); | |||
| Calendar instance = Calendar.getInstance(); | |||