| | |
| | | import com.java110.intf.fee.ITempCarFeeConfigAttrV1InnerServiceSMO; |
| | | import com.java110.intf.fee.ITempCarFeeConfigV1InnerServiceSMO; |
| | | import com.java110.po.fee.PayFeeConfigPo; |
| | | import com.java110.po.tempCarFeeConfig.TempCarFeeConfigPo; |
| | | import com.java110.po.tempCarFeeConfigAttr.TempCarFeeConfigAttrPo; |
| | | import com.java110.utils.constant.FeeConfigConstant; |
| | | import com.java110.po.tempCarFee.TempCarFeeConfigPo; |
| | | import com.java110.po.tempCarFee.TempCarFeeConfigAttrPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | reqJson.put("feeConfigId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId)); |
| | | reqJson.put("configId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_configId)); |
| | | TempCarFeeConfigPo tempCarFeeConfigPo = BeanConvertUtil.covertBean(reqJson, TempCarFeeConfigPo.class); |
| | | |
| | | //处理房屋属性 |
| | | dealAttr(reqJson, context); |
| | | |
| | | int flag = tempCarFeeConfigV1InnerServiceSMOImpl.saveTempCarFeeConfig(tempCarFeeConfigPo); |
| | | if (flag < 1) { |
| | | throw new CmdException("保存临时收费失败"); |
| | | } |
| | | |
| | | |
| | | //补费用项数据 |
| | | PayFeeConfigPo payFeeConfigPo = new PayFeeConfigPo(); |
| | | payFeeConfigPo.setAdditionalAmount("0"); |
| | |
| | | if (flag < 1) { |
| | | throw new CmdException("保存临时收费失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void dealAttr(JSONObject reqJson, ICmdDataFlowContext context) { |
| | | |
| | | if (!reqJson.containsKey("attrs")) { |
| | | return; |
| | | } |
| | | |
| | | JSONArray attrs = reqJson.getJSONArray("attrs"); |
| | | if (attrs == null || attrs.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | |
| | | JSONObject attr = null; |
| | | int flag = 0; |
| | | for (int attrIndex = 0; attrIndex < attrs.size(); attrIndex++) { |
| | |
| | | throw new CmdException("保存临时收费失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |