| | |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.fee.FeeDetailDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.fee.feeMonth.IPayFeeMonth; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeDetailInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | |
| | | @Autowired |
| | | private IFeeDetailInnerServiceSMO feeDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPayFeeMonth payFeeMonthImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | // super.validatePageInfo(pd); |
| | |
| | | |
| | | Assert.listOnlyOne(feeDtos, "未查询到费用信息 或查询到多条" + reqJson); |
| | | |
| | | // if ("T".equals(feeDtos.get(0).getIsDefault())) { |
| | | // throw new IllegalArgumentException("当前费用为默认费用不能做删除"); |
| | | // } |
| | | |
| | | String feeValidate = MappingCache.getValue("DELETE_FEE_VALIDATE"); |
| | | if ("ON".equals(feeValidate)) { |
| | |
| | | PayFeePo payFeePo = BeanConvertUtil.covertBean(businessUnit, PayFeePo.class); |
| | | |
| | | int flag = payFeeV1InnerServiceSMOImpl.deletePayFee(payFeePo); |
| | | |
| | | PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(businessUnit, PayFeeDetailPo.class); |
| | | int flag2 = payFeeDetailV1InnerServiceSMOImpl.deletePayFeeDetailNew(payFeeDetailPo); |
| | | if (flag < 1 || flag2 < 1) { |
| | | if (flag < 1) { |
| | | throw new IllegalArgumentException("删除失败"); |
| | | } |
| | | |
| | | PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(businessUnit, PayFeeDetailPo.class); |
| | | List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(BeanConvertUtil.covertBean(payFeeDetailPo, FeeDetailDto.class)); |
| | | if(feeDetailDtos != null && feeDetailDtos.size() > 0) { |
| | | int flag2 = payFeeDetailV1InnerServiceSMOImpl.deletePayFeeDetailNew(payFeeDetailPo); |
| | | if (flag2 < 1) { |
| | | throw new IllegalArgumentException("删除失败"); |
| | | } |
| | | } |
| | | |
| | | //todo 离散的月 |
| | | payFeeMonthImpl.deleteFeeMonth(payFeePo.getFeeId(),payFeePo.getCommunityId()); |
| | | } |
| | | } |