| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.AbstractServiceCmdListener; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | String paramIn = CommonCache.getAndRemoveValue("payFeePre" + reqJson.getString("oId")); |
| | | JSONObject paramObj = JSONObject.parseObject(paramIn); |
| | |
| | | |
| | | //处理现金账户 |
| | | dealAccount(paramObj); |
| | | |
| | | paramObj.put("detailId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | |
| | | //处理 优惠折扣 |
| | | addDiscount(paramObj); |
| | |
| | | //获取bId |
| | | String bId = feeDetailDtoList.get(0).getbId(); |
| | | //获取优惠 |
| | | List<ComputeDiscountDto> computeDiscountDtos = (List<ComputeDiscountDto>) paramObj.get("computeDiscountDtos"); |
| | | if (computeDiscountDtos != null) { |
| | | for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) { |
| | | //List<ComputeDiscountDto> computeDiscountDtos = (List<ComputeDiscountDto>) paramObj.get("computeDiscountDtos"); |
| | | JSONArray computeDiscountDtos = paramObj.getJSONArray("computeDiscountDtos"); |
| | | ComputeDiscountDto computeDiscountDto = null; |
| | | if (computeDiscountDtos != null && computeDiscountDtos.size()> 0) { |
| | | for (int accountIndex = 0; accountIndex < computeDiscountDtos.size(); accountIndex++) { |
| | | computeDiscountDto = BeanConvertUtil.covertBean(computeDiscountDtos.getJSONObject(accountIndex), ComputeDiscountDto.class); |
| | | if (!StringUtil.isEmpty(computeDiscountDto.getArdId())) { |
| | | ApplyRoomDiscountPo applyRoomDiscountPo = new ApplyRoomDiscountPo(); |
| | | //将业务id更新到空置房优惠里面 |