| | |
| | | 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); |
| | | } |
| | | |
| | | //增 |
| | | 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; |
| | | } |
| | | } |