| | |
| | | package com.dy.pipIrrProject.intakeController; |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerTrampMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrIntakeControllerMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrIntakeController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public Integer deleteTrampController(Long controllerId) { |
| | | return prControllerTrampMapper.deleteByPrimaryKey(controllerId); |
| | | } |
| | | |
| | | /** |
| | | * 清空流浪控制器 |
| | | * @param |
| | | * @return |
| | | */ |
| | | public Integer emptyTrampController() { |
| | | return prControllerTrampMapper.emptyTrampController(); |
| | | } |
| | | |
| | | //流浪控制器增 |
| | | public Integer addTrampController(PrControllerTramp record){ |
| | | return prControllerTrampMapper.insertSelective(record); |
| | | } |
| | | |
| | | |
| | | /*流浪控制器查*/ |
| | | public QueryResultVo<List<PrControllerTramp>> getTrampControllers(TrampControllerQueryVo queryVo){ |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | Long itemTotal = prControllerTrampMapper.getTrampControllersCount(params); |
| | | |
| | | QueryResultVo<List<PrControllerTramp>> rsVo = new QueryResultVo<>(); |
| | | rsVo.pageSize = queryVo.pageSize; |
| | | rsVo.pageCurr = queryVo.pageCurr; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = prControllerTrampMapper.getTrampControllers(params); |
| | | |
| | | return rsVo; |
| | | } |
| | | /** |
| | | * 修改绑定记录通过取水口 |
| | | * @param record |
| | | * @return |
| | | */ |
| | | public Integer updateBindRecord(PrIntakeController record){ |
| | | return prIntakeControllerMapper.updateByIntakeSelective(record); |
| | | } |
| | | } |