|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrTemp.delSome; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoTmp.DeleteMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voTmp.VoStLossAmountDay; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voTmp.VoStLossAmountMonth; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voTmp.VoStLossAmountYear; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private void setDao(DeleteMapper dao){ | 
|---|
|  |  |  | this.dao = dao; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void delStLossDay(){ | 
|---|
|  |  |  | VoStLossAmountDay first = null ; | 
|---|
|  |  |  | List<VoStLossAmountDay> list = dao.selectAllStLossDay() ; | 
|---|
|  |  |  | if(list != null && list.size() > 0){ | 
|---|
|  |  |  | for(VoStLossAmountDay vo : list){ | 
|---|
|  |  |  | if(first == null){ | 
|---|
|  |  |  | first = vo ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | if(first.intakeId.longValue() != vo.intakeId.longValue()){ | 
|---|
|  |  |  | //取水口变了 | 
|---|
|  |  |  | first = vo ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | if(!first.dt.equals(vo.dt)) { | 
|---|
|  |  |  | //日期变了 | 
|---|
|  |  |  | first = vo ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | //同一个取水口同日期 | 
|---|
|  |  |  | doDelStLossDay(vo.id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void delStLossMonth(){ | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | int doDelStLossDay(Long id){ | 
|---|
|  |  |  | return dao.deleteStLossDayById(id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | int doDelStLossMonth(Long id){ | 
|---|
|  |  |  | return dao.deleteStLossMonthById(id) ; | 
|---|
|  |  |  | } | 
|---|