| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFloorShareMeterV1InnerServiceSMO; |
| | | import com.java110.po.floorShareMeter.FloorShareMeterPo; |
| | | import com.java110.utils.exception.CmdException; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private IFloorShareMeterV1InnerServiceSMO floorShareMeterV1InnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "fsmId", "fsmId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "configId", "请求报文中未包含费用项"); |
| | | Assert.hasKeyAndValue(reqJson, "sharePrice", "请求报文中未包含公摊单价"); |
| | | super.validateProperty(cmdDataFlowContext); |
| | | |
| | | } |
| | |
| | | @Override |
| | | @Java110Transactional |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException { |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setConfigId(reqJson.getString("configId")); |
| | | List<FeeConfigDto> feeConfigDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | Assert.listOnlyOne(feeConfigDtos, "未包含费用项"); |
| | | |
| | | FloorShareMeterPo floorShareMeterPo = BeanConvertUtil.covertBean(reqJson, FloorShareMeterPo.class); |
| | | floorShareMeterPo.setConfigName(feeConfigDtos.get(0).getFeeName()); |
| | | int flag = floorShareMeterV1InnerServiceSMOImpl.updateFloorShareMeter(floorShareMeterPo); |
| | | |
| | | if (flag < 1) { |