| | |
| | | import cn.gistack.sm.sjztdw.entity.DwsResSlDi; |
| | | import cn.gistack.sm.sjztdw.mapper.DwsResSlDiMapper; |
| | | import cn.gistack.sm.sjztdw.service.IDwsResSlDiService; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import cn.gistack.sm.sjztods.entity.DsmSpgSpqnmp; |
| | | import cn.gistack.sm.sjztods.service.IDsmSpgSpqnmpService; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @DS("ztdw") |
| | | @AllArgsConstructor |
| | | public class DwsResSlDiServiceImpl extends ServiceImpl<DwsResSlDiMapper, DwsResSlDi> implements IDwsResSlDiService { |
| | | |
| | | private IDsmSpgSpqnmpService dsmSpgSpqnmpService; |
| | | |
| | | @Override |
| | | public Integer updateCustomize(DwsResSlDi dwsResSlDi) { |
| | | return baseMapper.updateCustomize(dwsResSlDi); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateByBasic(DbExcelVO dbExcel) { |
| | | |
| | | //从渗流测点表中根据断面和水库注册登记码获取测点编码 |
| | | DsmSpgSpqnmp paramSl = new DsmSpgSpqnmp(); |
| | | paramSl.setCh(dbExcel.getCh()); |
| | | paramSl.setRscd(dbExcel.getResRegCode()); |
| | | List<DsmSpgSpqnmp> list = dsmSpgSpqnmpService.getList(paramSl); |
| | | |
| | | |
| | | //有渗流站点才添加 |
| | | if (list != null && list.size()>0){ |
| | | String cd = ""; |
| | | |
| | | if (list != null && list.size()>0){ |
| | | cd = list.get(0).getMpcd(); |
| | | } |
| | | |
| | | DbExcelVO updateParams = new DbExcelVO(); |
| | | |
| | | |
| | | updateParams.setAvgSpqnValue(dbExcel.getAvgSpqnValue()); |
| | | |
| | | updateParams.setCd(cd); |
| | | updateParams.setMonitorDate(dbExcel.getMonitorDate()); |
| | | updateParams.setResCd(dbExcel.getResCd()); |
| | | |
| | | return baseMapper.updateByBasic(updateParams); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public Integer removeByBasic(DbExcelVO dbExcelVO) { |
| | | return baseMapper.removeByBasic(dbExcelVO); |
| | | } |
| | | } |