| | |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.fee.FeeDetailDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.feeDiscount.FeeDiscountDto; |
| | | import com.java110.dto.feeDiscount.FeeDiscountRuleDto; |
| | | import com.java110.dto.feeDiscount.FeeDiscountSpecDto; |
| | | import com.java110.dto.onlinePay.OnlinePayDto; |
| | | import com.java110.dto.fee.FeeDiscountDto; |
| | | import com.java110.dto.fee.FeeDiscountRuleDto; |
| | | import com.java110.dto.fee.FeeDiscountSpecDto; |
| | | import com.java110.dto.fee.FeeReceiptDetailDto; |
| | | import com.java110.dto.wechat.OnlinePayDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import com.java110.dto.payFeeConfigDiscount.PayFeeConfigDiscountDto; |
| | | import com.java110.dto.payFeeDetailDiscount.PayFeeDetailDiscountDto; |
| | | import com.java110.dto.returnPayFee.ReturnPayFeeDto; |
| | | import com.java110.dto.payFee.PayFeeConfigDiscountDto; |
| | | import com.java110.dto.payFee.PayFeeDetailDiscountDto; |
| | | import com.java110.dto.payFee.ReturnPayFeeDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.acct.IAccountDetailInnerServiceSMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | |
| | | import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.po.account.AccountPo; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.po.account.AccountDetailPo; |
| | | import com.java110.po.fee.PayFeeDetailPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.po.onlinePay.OnlinePayPo; |
| | | import com.java110.po.payFeeDetailDiscount.PayFeeDetailDiscountPo; |
| | | import com.java110.po.returnPayFee.ReturnPayFeePo; |
| | | import com.java110.po.fee.FeeReceiptPo; |
| | | import com.java110.po.fee.FeeReceiptDetailPo; |
| | | import com.java110.po.wechat.OnlinePayPo; |
| | | import com.java110.po.payFee.PayFeeDetailDiscountPo; |
| | | import com.java110.po.payFee.ReturnPayFeePo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | @Autowired |
| | | private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | private static final String SPEC_RATE = "89002020980015"; //赠送月份 |
| | | |
| | | private static final String SPEC_MONTH = "89002020980014"; //月份 |
| | |
| | | reqJson.put("endTime", DateUtil.getFormatTimeString(feeDetailDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A)); |
| | | reqJson.put("payOrderId", feeDetailDto.getPayOrderId()); |
| | | // todo 添加退费明细 |
| | | addFeeDetail(reqJson,returnPayFeeDtos.get(0)); |
| | | addFeeDetail(reqJson, returnPayFeeDtos.get(0)); |
| | | reqJson.put("state", "1100"); |
| | | String receivableAmount = (String) reqJson.get("receivableAmount"); |
| | | String receivedAmount = (String) reqJson.get("receivedAmount"); |
| | |
| | | reqJson.put("configId", feeDto1.getConfigId()); |
| | | reqJson.put("payerObjType", feeDto1.getPayerObjType()); |
| | | reqJson.put("feeId", feeDto1.getFeeId()); |
| | | if ("888800010006".equals(feeDto1.getFeeTypeCds())) { |
| | | reqJson.put("state", "2009001"); |
| | | //1003006 周期性费用 2006012 一次性费用 4012024 间接性费用 |
| | | if ("2006012".equals(feeDto1.getFeeFlag()) || "888800010006".equals(feeDto1.getFeeTypeCd())) { //888800010006 押金 |
| | | reqJson.put("state", "2009001"); //2007001 收费未开始 2008001 有效 2009001 收费结束 |
| | | } else { |
| | | reqJson.put("state", "2008001"); |
| | | } |
| | |
| | | businessReturnPayFee.putAll(BeanConvertUtil.beanCovertMap(feeDetailDtos.get(0))); |
| | | businessReturnPayFee.putAll(paramInJson); |
| | | PayFeeDetailPo returnPayFeePo = BeanConvertUtil.covertBean(businessReturnPayFee, PayFeeDetailPo.class); |
| | | returnPayFeePo.setPrimeRate(feeDetailDtos.get(0).getPrimeRate()); |
| | | int flag = payFeeDetailV1InnerServiceSMOImpl.updatePayFeeDetailNew(returnPayFeePo); |
| | | if (flag < 1) { |
| | | throw new CmdException("更新数据失败"); |
| | | } |
| | | |
| | | // todo 将收据删除 |
| | | FeeReceiptDetailDto feeReceiptDetailDto = new FeeReceiptDetailDto(); |
| | | feeReceiptDetailDto.setDetailId(returnPayFeePo.getDetailId()); |
| | | feeReceiptDetailDto.setCommunityId(returnPayFeePo.getCommunityId()); |
| | | int count = feeReceiptDetailInnerServiceSMOImpl.queryFeeReceiptDetailsCount(feeReceiptDetailDto); |
| | | if (count != 1) { |
| | | return; |
| | | } |
| | | FeeReceiptDetailPo feeReceiptDetailPo = new FeeReceiptDetailPo(); |
| | | feeReceiptDetailPo.setDetailId(returnPayFeePo.getDetailId()); |
| | | feeReceiptDetailPo.setCommunityId(returnPayFeePo.getCommunityId()); |
| | | feeReceiptDetailInnerServiceSMOImpl.deleteFeeReceiptDetail(feeReceiptDetailPo); |
| | | } |
| | | |
| | | /** |
| | | * 添加退费单 |
| | | * |
| | | * @param paramInJson |
| | | * @param returnPayFeeDto |
| | | */ |
| | | public void addFeeDetail(JSONObject paramInJson,ReturnPayFeeDto returnPayFeeDto) { |
| | | public void addFeeDetail(JSONObject paramInJson, ReturnPayFeeDto returnPayFeeDto) { |
| | | JSONObject businessReturnPayFee = new JSONObject(); |
| | | businessReturnPayFee.putAll(paramInJson); |
| | | businessReturnPayFee.put("detailId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |