|  |  |  | 
|---|
|  |  |  | * @param intakeId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional(rollbackFor = Exception.class) | 
|---|
|  |  |  | public PrCommonIntakes addOrUpdateOftenUseIntake(Long operatorId, Long intakeId) { | 
|---|
|  |  |  | PrCommonIntakes po = prCommonIntakesDao.selectByOperatorAndIntake(operatorId, intakeId); | 
|---|
|  |  |  | if(po == null) { | 
|---|
|  |  |  | 
|---|
|  |  |  | jsonArr.add(jsonObj); | 
|---|
|  |  |  | return rmCommandHistoryDao.getUncloseParam(jsonArr.toJSONString(), intakeId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据取水口ID获取该取水口未关阀参数,平台选择取水口关阀使用 | 
|---|
|  |  |  | * @param intakeId | 
|---|
|  |  |  | * @param rtuAddr | 
|---|
|  |  |  | * @param code | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public VoUnclosedParam selectUncloseParamByCd(Long intakeId, String rtuAddr, String code) { | 
|---|
|  |  |  | JSONArray jsonArr = new JSONArray(); | 
|---|
|  |  |  | JSONObject jsonObj = new JSONObject(); | 
|---|
|  |  |  | jsonObj.put("rtuAddr", rtuAddr); | 
|---|
|  |  |  | jsonObj.put("isOnLine", true); | 
|---|
|  |  |  | jsonArr.add(jsonObj); | 
|---|
|  |  |  | return rmCommandHistoryDao.getUncloseParamByCd(jsonArr.toJSONString(), intakeId, code); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|