33 files modified
1 files renamed
6 files added
1 files deleted
| | |
| | | |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import cn.gistack.sm.sjztdw.excel.DbExcelImport; |
| | | import cn.gistack.sm.sjztdw.service.IDbPersonReportService; |
| | | import cn.gistack.sm.sjztdw.service.IDwsResFormDiService; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import cn.gistack.sm.sjztdw.vo.ListVO; |
| | | import io.undertow.websockets.jsr.annotated.DecoderUtils; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Base64; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @AllArgsConstructor |
| | | public class DbPersonReportController extends BladeController { |
| | | |
| | | private IDbPersonReportService dbPersonReportService; |
| | | private IDwsResFormDiService dbPersonReportService; |
| | | |
| | | /** |
| | | * 导入模板 |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("import-data") |
| | | public R importData(MultipartFile file,String resGuid,String ch) { |
| | | public R importData(MultipartFile file,String resGuid,@RequestParam("ch") String ch) { |
| | | |
| | | DbExcelImport dbExcelImport = new DbExcelImport(dbPersonReportService,resGuid,ch); |
| | | ExcelUtil.save(file, dbExcelImport, DbExcel.class); |
| | | return R.success("操作成功"); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody DbExcelVO dbExcel){ |
| | | Boolean b = dbPersonReportService.update(dbExcel); |
| | | return R.status(b); |
| | | } |
| | | |
| | | @PostMapping("/remove") |
| | | public R remove(@RequestBody DbExcelVO dbExcelVO){ |
| | | Boolean b = dbPersonReportService.remove(dbExcelVO); |
| | | return R.status(b); |
| | | } |
| | | |
| | | @PostMapping("/removeBatch") |
| | | public R removeBatch(@RequestBody ListVO list){ |
| | | Boolean b = dbPersonReportService.removeBatch(list.getList()); |
| | | return R.status(b); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | package cn.gistack.sm.sjztdw.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName("\"dws_res_form_di\"") |
| | | public class DwsResFormDi { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | @TableField(value = "\"city_nm\"") |
| | | private String cityNm; |
| | | |
| | | @TableField(value = "\"city_cd\"") |
| | | private String cityCd; |
| | | |
| | | @TableField(value = "\"county_nm\"") |
| | | private String countyNm; |
| | | |
| | | @TableField(value = "\"county_cd\"") |
| | | private String countyCd; |
| | | |
| | | @TableField(value = "\"town_nm\"") |
| | | private String townNm; |
| | | |
| | | @TableField(value = "\"town_cd\"") |
| | | private String townCd; |
| | | |
| | | @TableField(value = "\"res_nm\"") |
| | | private String resNm; |
| | | |
| | | @TableField(value = "\"res_cd\"") |
| | | private String resCd; |
| | | |
| | | @TableField(value = "\"res_reg_cd\"") |
| | | private String resRegCd; |
| | | |
| | | @TableField(value = "\"ch\"") |
| | | private String ch; |
| | | |
| | | |
| | | @TableField(value = "\"dt\"") |
| | | private String dt; |
| | | |
| | | |
| | | //SJZT_DW dws_rain_res_di表 drp |
| | | @TableField(value = "\"drp\"") |
| | | private String drp; |
| | | |
| | | //SJZT_DW dws_water_res_z_eight_detail_all表 rz 字段 |
| | | |
| | | @TableField(value = "\"rz\"") |
| | | private String rz; |
| | | |
| | | //SJZT_DW dws_water_res_z_eight_detail_all表 low_z 字段 |
| | | |
| | | @TableField(value = "\"low_z\"") |
| | | private String lowZ; |
| | | |
| | | //SJZT_DW dws_res_press_di 存avg_value |
| | | |
| | | @TableField(value = "\"sy_value\"") |
| | | private String syValue; |
| | | |
| | | //SJZT_DW dws_res_sl_di 存avg_spqn_value |
| | | @TableField(value = "\"sl_value\"") |
| | | private String slValue; |
| | | |
| | | } |
| | |
| | | //雨情测站编码 |
| | | private String resNm; |
| | | |
| | | @TableField(value = "\"res_nm\"") |
| | | @TableField(value = "\"eng_scal\"") |
| | | private String engScal; |
| | | |
| | | @TableField(value = "\"res_lon\"") |
| | |
| | | //监测水位 |
| | | private String rz; |
| | | |
| | | @TableField(value = "\"pat_dt\"") |
| | | @TableField(value = "\"par_dt\"") |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | //分区日期 |
| | |
| | | package cn.gistack.sm.sjztdw.excel; |
| | | |
| | | import cn.gistack.sm.sjztdw.service.IDbPersonReportService; |
| | | import cn.gistack.sm.sjztdw.service.IDwsResFormDiService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springblade.core.excel.support.ExcelImporter; |
| | | |
| | |
| | | @RequiredArgsConstructor |
| | | public class DbExcelImport implements ExcelImporter<DbExcel> { |
| | | |
| | | private final IDbPersonReportService service; |
| | | private final IDwsResFormDiService service; |
| | | |
| | | private final String resGuid; |
| | | |
| | |
| | | |
| | | import cn.gistack.common.node.TreeNode; |
| | | import cn.gistack.sm.sjztdw.entity.DwsRainResDi; |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import cn.gistack.sm.sjztmd.entity.AttAdBase; |
| | | import cn.gistack.sm.sjztmd.vo.AttAdBaseVO; |
| | | import cn.gistack.sm.sjztmd.vo.PersonVO; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.MapKey; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @DS("ztdw") |
| | | public interface DwsRainResDiMapper extends BaseMapper<DwsRainResDi> { |
| | | |
| | | |
| | | Integer updateCustomize(@Param("entity") DwsRainResDi dwsRainResDi); |
| | | |
| | | Integer updateByBasic(@Param("entity") DbExcelVO dbExcel); |
| | | |
| | | Integer removeByBasic(@Param("entity") DbExcelVO dbExcelVO); |
| | | } |
| | |
| | | AND "res_cd" = #{entity.resCd} |
| | | </if> |
| | | </update> |
| | | |
| | | |
| | | |
| | | <update id="updateByBasic"> |
| | | UPDATE SJZT_DW."dws_res_press_di" SET |
| | | "avg_value" = #{entity.avgValue} |
| | | WHERE |
| | | "cd" = #{entity.cd} |
| | | AND "is_tb" = 'y' |
| | | AND "dt" = #{entity.monitorDate} |
| | | AND "res_cd" = #{entity.resCd} |
| | | </update> |
| | | |
| | | |
| | | |
| | | |
| | | <delete id="removeByBasic"> |
| | | DELETE FROM SJZT_DW."dws_res_press_di" |
| | | WHERE |
| | | "cd" = #{entity.cd} |
| | | AND "is_tb" = 'y' |
| | | AND "dt" = #{entity.monitorDate} |
| | | AND "res_cd" = #{entity.resCd} |
| | | |
| | | </delete> |
| | | </mapper> |
| New file |
| | |
| | | package cn.gistack.sm.sjztdw.mapper; |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsResFormDi; |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import cn.gistack.sm.sjztmd.vo.AttResAdVO; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @DS("ztdw") |
| | | public interface DwsResFormDiMapper extends BaseMapper<DwsResFormDi> { |
| | | |
| | | |
| | | Integer save(@Param("excel") DbExcel dbExcel,@Param("res") AttResAdVO resAd,@Param("ch") String ch); |
| | | |
| | | Integer edit(@Param("entity") DbExcelVO dbExcel); |
| | | |
| | | Integer remove(@Param("entity")DbExcelVO dbExcelVO); |
| | | |
| | | Integer updateCustomize(@Param("excel") DbExcel dbExcel,@Param("res") AttResAdVO resAd, @Param("ch") String ch); |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.gistack.sm.sjztdw.mapper.DwsResFormDiMapper"> |
| | | |
| | | <insert id="save" parameterType="cn.gistack.sm.sjztdw.entity.DwsResFormDi"> |
| | | INSERT INTO SJZT_DW."dws_res_form_di" |
| | | ( |
| | | "city_nm", |
| | | "city_cd", |
| | | "county_nm", |
| | | "county_cd", |
| | | "town_nm", |
| | | "town_cd", |
| | | "res_nm", |
| | | "res_cd", |
| | | "res_reg_cd", |
| | | "ch", |
| | | "dt", |
| | | "drp", |
| | | "rz", |
| | | "low_z", |
| | | "sy_value", |
| | | "sl_value" |
| | | ) |
| | | VALUES |
| | | ( |
| | | #{res.cityName}, |
| | | #{res.cityCode}, |
| | | #{res.countyName}, |
| | | #{res.countyCode}, |
| | | #{res.townName}, |
| | | #{res.townCode}, |
| | | #{res.resName}, |
| | | #{res.resGuid}, |
| | | #{res.resRegCode}, |
| | | #{ch}, |
| | | #{excel.monitorDate}, |
| | | #{excel.drp,jdbcType=VARCHAR}, |
| | | #{excel.rz,jdbcType=VARCHAR}, |
| | | #{excel.lowZ,jdbcType=VARCHAR}, |
| | | #{excel.avgValue,jdbcType=VARCHAR}, |
| | | #{excel.avgSpqnValue,jdbcType=VARCHAR} |
| | | ) |
| | | |
| | | </insert> |
| | | <update id="edit"> |
| | | UPDATE SJZT_DW."dws_res_form_di" |
| | | SET |
| | | "drp" = #{entity.drp,jdbcType=VARCHAR}, |
| | | "rz" = #{entity.rz,jdbcType=VARCHAR}, |
| | | "low_z" = #{entity.lowZ,jdbcType=VARCHAR}, |
| | | "sy_value" = #{entity.avgValue,jdbcType=VARCHAR}, |
| | | "sl_value" = #{entity.avgSpqnValue,jdbcType=VARCHAR} |
| | | WHERE |
| | | "res_cd" = #{entity.resCd} |
| | | AND "dt" = #{entity.monitorDate} |
| | | AND "ch" = #{entity.ch} |
| | | </update> |
| | | <update id="updateCustomize"> |
| | | UPDATE SJZT_DW."dws_res_form_di" |
| | | SET |
| | | "drp" = #{excel.drp}, |
| | | "rz" = #{excel.rz}, |
| | | "low_z" = #{excel.lowZ}, |
| | | "sy_value" = #{excel.avgValue}, |
| | | "sl_value" = #{excel.avgSpqnValue} |
| | | WHERE |
| | | "res_cd" = #{res.resGuid} |
| | | AND "dt" = #{excel.monitorDate} |
| | | AND "ch" = #{ch} |
| | | </update> |
| | | <delete id="remove"> |
| | | DELETE FROM |
| | | SJZT_DW."dws_res_form_di" |
| | | WHERE |
| | | "res_cd" = #{entity.resCd} |
| | | AND "dt" = #{entity.monitorDate} |
| | | AND "ch" = #{entity.ch} |
| | | |
| | | </delete> |
| | | </mapper> |
| | |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsRainResDi; |
| | | import cn.gistack.sm.sjztdw.entity.DwsResPressDi; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @DS("ztdw") |
| | | public interface DwsResPressDiMapper extends BaseMapper<DwsResPressDi> { |
| | | |
| | | |
| | | Integer updateCustomize(@Param("entity") DwsResPressDi dwsResPressDi); |
| | | |
| | | Integer updateByBasic(@Param("entity") DbExcelVO dbExcel); |
| | | |
| | | Integer removeByBasic(@Param("entity") DbExcelVO dbExcelVO); |
| | | } |
| | |
| | | "drp" = #{entity.drp} |
| | | </if> |
| | | WHERE 1=1 |
| | | <if test="entity.isTb != null and entity.isTb != ''"> |
| | | AND "is_tb" = #{entity.isTb} |
| | | </if> |
| | | AND "is_tb" = 'y' |
| | | <if test="entity.dt != null"> |
| | | AND "dt" = #{entity.dt} |
| | | </if> |
| | |
| | | |
| | | |
| | | </update> |
| | | <update id="updateByBasic"> |
| | | UPDATE SJZT_DW."dws_rain_res_di" SET |
| | | <if test="entity.drp != null and entity.drp !='' "> |
| | | "drp" = #{entity.drp} |
| | | </if> |
| | | WHERE 1=1 |
| | | AND "is_tb" = 'y' |
| | | AND "dt" = #{entity.monitorDate} |
| | | AND "res_cd" = #{entity.resCd} |
| | | </update> |
| | | |
| | | |
| | | <delete id="removeByBasic"> |
| | | DELETE FROM SJZT_DW."dws_rain_res_di" |
| | | where |
| | | "is_tb" = 'y' |
| | | AND "dt" = #{entity.monitorDate} |
| | | AND "res_cd" = #{entity.resCd} |
| | | </delete> |
| | | </mapper> |
| | |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsResPressDi; |
| | | import cn.gistack.sm.sjztdw.entity.DwsResSlDi; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @DS("ztdw") |
| | | public interface DwsResSlDiMapper extends BaseMapper<DwsResSlDi> { |
| | | |
| | | |
| | | Integer updateCustomize(@Param("entity") DwsResSlDi dwsResSlDi); |
| | | |
| | | Integer updateByBasic(@Param("entity") DbExcelVO dbExcel); |
| | | |
| | | Integer removeByBasic(@Param("entity") DbExcelVO dbExcelVO); |
| | | } |
| | |
| | | </if> |
| | | |
| | | </update> |
| | | <update id="updateByBasic"> |
| | | |
| | | UPDATE SJZT_DW."dws_res_sl_di" SET |
| | | "avg_spqn_value" = #{entity.avgSpqnValue} |
| | | WHERE |
| | | "cd" = #{entity.cd} |
| | | AND "is_tb" = 'y' |
| | | AND "dt" = #{entity.monitorDate} |
| | | AND "res_cd" = #{entity.resCd} |
| | | AND "cd" = #{entity.cd} |
| | | </update> |
| | | <delete id="removeByBasic"> |
| | | DELETE FROM SJZT_DW."dws_res_sl_di" |
| | | WHERE |
| | | "cd" = #{entity.cd} |
| | | AND "is_tb" = 'y' |
| | | AND "dt" = #{entity.monitorDate} |
| | | AND "res_cd" = #{entity.resCd} |
| | | AND "cd" = #{entity.cd} |
| | | </delete> |
| | | </mapper> |
| | |
| | | package cn.gistack.sm.sjztdw.mapper; |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsWaterResZEightDetailAll; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @DS("ztdw") |
| | | public interface DwsWaterResZEightDetailAllMapper extends BaseMapper<DwsWaterResZEightDetailAll> { |
| | | |
| | | |
| | | Integer updateCustomize(@Param("entity") DwsWaterResZEightDetailAll dwsWaterResZEightDetailAll); |
| | | |
| | | Integer updateByBasic(@Param("entity") DbExcelVO dbExcel); |
| | | |
| | | Integer removeByBasic(@Param("entity") DbExcelVO dbExcelVO); |
| | | } |
| | |
| | | AND "st_cd" = #{entity.stCd} |
| | | </if> |
| | | </update> |
| | | |
| | | <update id="updateByBasic"> |
| | | UPDATE SJZT_DW."dws_water_res_z_eight_detail_all" SET |
| | | "rz" = #{entity.rz}, |
| | | "low_z" = #{entity.lowZ} |
| | | WHERE |
| | | "is_tb" = 'y' |
| | | AND "collect_dt" = #{entity.monitorDate} |
| | | AND "res_cd" = #{entity.resCd} |
| | | </update> |
| | | |
| | | <delete id="removeByBasic"> |
| | | DELETE FROM SJZT_DW."dws_water_res_z_eight_detail_all" |
| | | WHERE |
| | | "is_tb" = 'y' |
| | | AND DATE_FORMAT("collect_dt",'%Y-%m-%d') = DATE_FORMAT(#{entity.monitorDate},'%Y-%m-%d') |
| | | AND "res_cd" = #{entity.resCd} |
| | | </delete> |
| | | </mapper> |
| | |
| | | package cn.gistack.sm.sjztdw.service; |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsRainResDi; |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface IDwsRainResDiService extends IService<DwsRainResDi> { |
| | | Integer updateCustomize(DwsRainResDi dwsRainResDi); |
| | | |
| | | Integer updateByBasic(DbExcelVO dbExcel); |
| | | |
| | | Integer removeByBasic(DbExcelVO dbExcelVO); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztdw.service; |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsResFormDi; |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface IDwsResFormDiService extends IService<DwsResFormDi> { |
| | | |
| | | void importDbPersonData(List<DbExcel> data, String resGuid,String ch); |
| | | |
| | | Boolean update(DbExcelVO dbExcel); |
| | | |
| | | Boolean remove(DbExcelVO dbExcelVO); |
| | | |
| | | Boolean removeBatch(List<DbExcelVO> list); |
| | | } |
| | |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsRainResDi; |
| | | import cn.gistack.sm.sjztdw.entity.DwsResPressDi; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface IDwsResPressDiService extends IService<DwsResPressDi> { |
| | | Integer updateCustomize(DwsResPressDi dwsResPressDi); |
| | | |
| | | Integer updateByBasic(DbExcelVO dbExcel); |
| | | |
| | | Integer removeByBasic(DbExcelVO dbExcelVO); |
| | | } |
| | |
| | | package cn.gistack.sm.sjztdw.service; |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsResSlDi; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface IDwsResSlDiService extends IService<DwsResSlDi> { |
| | | Integer updateCustomize(DwsResSlDi dwsResSlDi); |
| | | |
| | | Integer updateByBasic(DbExcelVO dbExcel); |
| | | |
| | | Integer removeByBasic(DbExcelVO dbExcelVO); |
| | | } |
| | |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsRainResDi; |
| | | import cn.gistack.sm.sjztdw.entity.DwsWaterResZEightDetailAll; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | public interface IDwsWaterResZEightDetailAllService extends IService<DwsWaterResZEightDetailAll> { |
| | | Integer updateCustomize(DwsWaterResZEightDetailAll dwsWaterResZEightDetailAll); |
| | | |
| | | Integer updateByBasic(DbExcelVO dbExcel); |
| | | |
| | | Integer removeByBasic(DbExcelVO dbExcelVO); |
| | | } |
| | |
| | | package cn.gistack.sm.sjztdw.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsRainResDi; |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import cn.gistack.sm.sjztdw.mapper.DwsRainResDiMapper; |
| | | import cn.gistack.sm.sjztdw.service.IDwsRainResDiService; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public Integer updateCustomize(DwsRainResDi dwsRainResDi) { |
| | | return baseMapper.updateCustomize(dwsRainResDi); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateByBasic(DbExcelVO dbExcel) { |
| | | return baseMapper.updateByBasic(dbExcel); |
| | | } |
| | | |
| | | @Override |
| | | public Integer removeByBasic(DbExcelVO dbExcelVO) { |
| | | return baseMapper.removeByBasic(dbExcelVO); |
| | | } |
| | | } |
| File was renamed from skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztdw/service/impl/DbPersonReportServiceImpl.java |
| | |
| | | package cn.gistack.sm.sjztdw.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztdw.entity.DwsRainResDi; |
| | | import cn.gistack.sm.sjztdw.entity.DwsResPressDi; |
| | | import cn.gistack.sm.sjztdw.entity.DwsResSlDi; |
| | | import cn.gistack.sm.sjztdw.entity.DwsWaterResZEightDetailAll; |
| | | import cn.gistack.sm.sjztdw.entity.*; |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import cn.gistack.sm.sjztdw.mapper.DwsResFormDiMapper; |
| | | import cn.gistack.sm.sjztdw.service.*; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import cn.gistack.sm.sjztmd.service.IAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.vo.AttResAdVO; |
| | | import cn.gistack.sm.sjztods.entity.DsmSpgSpprmp; |
| | |
| | | import cn.gistack.sm.sjztods.service.IDsmSpgSpprmpService; |
| | | import cn.gistack.sm.sjztods.service.IDsmSpgSpqnmpService; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Service |
| | | @AllArgsConstructor |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DbPersonReportServiceImpl implements IDbPersonReportService { |
| | | @DS("ztdw") |
| | | public class DwsResFormDiServiceImpl extends ServiceImpl<DwsResFormDiMapper, DwsResFormDi> implements IDwsResFormDiService { |
| | | private IAttResBaseService attResBaseService; |
| | | |
| | | //日数据监测 |
| | | private IDwsRainResDiService dwsRainResDiService; |
| | | private IDwsWaterResZEightDetailAllService dwsWaterResZEightDetailAllService; |
| | | private IDwsResPressDiService dwsResPressDiService; |
| | | private IDwsResSlDiService dwsResSlDiService; |
| | | |
| | | |
| | | //测点表 |
| | | private IDsmSpgSpqnmpService dsmSpgSpqnmpService; |
| | | private IDsmSpgSpprmpService dsmSpgSpprmpService; |
| | | |
| | |
| | | |
| | | data.forEach(dbExcel->{ |
| | | |
| | | //存雨情数据 |
| | | saveDayRainFall(dbExcel,resAd); |
| | | if (StringUtil.isBlank(dbExcel.getRz())){ |
| | | dbExcel.setRz(""); |
| | | } |
| | | if (StringUtil.isBlank(dbExcel.getDrp())){ |
| | | dbExcel.setDrp(""); |
| | | } |
| | | if (StringUtil.isBlank(dbExcel.getLowZ())){ |
| | | dbExcel.setLowZ(""); |
| | | } |
| | | if (StringUtil.isBlank(dbExcel.getAvgValue())){ |
| | | dbExcel.setAvgValue(""); |
| | | } |
| | | if (StringUtil.isBlank(dbExcel.getAvgSpqnValue())){ |
| | | dbExcel.setAvgSpqnValue(""); |
| | | } |
| | | |
| | | //存水位数据 |
| | | saveWaterLevel(dbExcel,resAd); |
| | | //存总表数据 |
| | | Integer i = baseMapper.updateCustomize(dbExcel,resAd,ch); |
| | | if (i<=0){ |
| | | baseMapper.save(dbExcel,resAd,ch); |
| | | } |
| | | |
| | | //存渗压数据 |
| | | saveSy(dbExcel,resAd,dsmSpgSpprmpList); |
| | | if (StringUtil.isNotBlank(dbExcel.getDrp())){ |
| | | //存雨情数据 |
| | | saveDayRainFall(dbExcel,resAd); |
| | | } |
| | | |
| | | if (StringUtil.isNotBlank(dbExcel.getRz()) || StringUtil.isNotBlank(dbExcel.getLowZ())){ |
| | | //存水位数据 |
| | | saveWaterLevel(dbExcel,resAd); |
| | | } |
| | | |
| | | //存渗流数据 |
| | | saveSl(dbExcel,resAd,dsmSpgSpqnmpList); |
| | | if (StringUtil.isNotBlank(dbExcel.getAvgValue())){ |
| | | //存渗压数据 |
| | | saveSy(dbExcel,resAd,dsmSpgSpprmpList); |
| | | } |
| | | |
| | | if (StringUtil.isNotBlank(dbExcel.getAvgSpqnValue())){ |
| | | //存渗流数据 |
| | | saveSl(dbExcel,resAd,dsmSpgSpqnmpList); |
| | | } |
| | | |
| | | |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean update(DbExcelVO dbExcel) { |
| | | |
| | | |
| | | baseMapper.edit(dbExcel); |
| | | |
| | | //根据日期更新数据 |
| | | if (StringUtil.isNotBlank(dbExcel.getMonitorDate())){ |
| | | |
| | | |
| | | |
| | | Integer a = dwsRainResDiService.updateByBasic(dbExcel); |
| | | Integer b = dwsWaterResZEightDetailAllService.updateByBasic(dbExcel); |
| | | |
| | | Integer c = dwsResPressDiService.updateByBasic(dbExcel); |
| | | Integer d = dwsResSlDiService.updateByBasic(dbExcel); |
| | | |
| | | boolean b1 = a > 0; |
| | | boolean b2 = b > 0; |
| | | boolean b3 = c > 0; |
| | | boolean b4 = d > 0; |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean remove(DbExcelVO dbExcelVO) { |
| | | |
| | | baseMapper.remove(dbExcelVO); |
| | | |
| | | //根据日期删除数据 |
| | | if (StringUtil.isNotBlank(dbExcelVO.getMonitorDate())){ |
| | | Integer a = dwsRainResDiService.removeByBasic(dbExcelVO); |
| | | Integer b = dwsWaterResZEightDetailAllService.removeByBasic(dbExcelVO); |
| | | Integer c = dwsResPressDiService.removeByBasic(dbExcelVO); |
| | | Integer d = dwsResSlDiService.removeByBasic(dbExcelVO); |
| | | |
| | | boolean b1 = a > 0; |
| | | boolean b2 = b > 0; |
| | | boolean b3 = c > 0; |
| | | boolean b4 = d > 0; |
| | | |
| | | return b1&&b2&&b3&&b4; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean removeBatch(List<DbExcelVO> list) { |
| | | |
| | | list.forEach(e->{ |
| | | remove(e); |
| | | }); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | private void saveSy(DbExcel dbExcel, AttResAdVO resAd,List<DsmSpgSpprmp> list) { |
| | | try { |
| | | //excel数据应是按测压管从小到大 |
| | | List<String> avgValueList = Arrays.asList(dbExcel.getAvgValue().split(",")); |
| | | |
| | | //excel数据应是按测压管从小到大 |
| | | List<String> avgValueList = Arrays.asList(dbExcel.getAvgValue().split(",")); |
| | | //有渗压站才添加 |
| | | if (list !=null && list.size()>0){ |
| | | for (int i = 0; i < avgValueList.size(); i++) { |
| | | String avgValue = avgValueList.get(i); |
| | | DsmSpgSpprmp dsmSpgSpprmp = list.get(i); |
| | | |
| | | //有渗压站才添加 |
| | | if (list !=null && list.size()>0){ |
| | | for (int i = 0; i < avgValueList.size(); i++) { |
| | | String avgValue = avgValueList.get(i); |
| | | DsmSpgSpprmp dsmSpgSpprmp = list.get(i); |
| | | DwsResPressDi dwsResPressDi = new DwsResPressDi(); |
| | | //站点编码 |
| | | dwsResPressDi.setCd(dsmSpgSpprmp.getMpcd()); |
| | | //站点名称 |
| | | dwsResPressDi.setCdNm(dsmSpgSpprmp.getMpcd()); |
| | | |
| | | DwsResPressDi dwsResPressDi = new DwsResPressDi(); |
| | | //站点编码 |
| | | dwsResPressDi.setCd(dsmSpgSpprmp.getMpcd()); |
| | | //站点名称 |
| | | dwsResPressDi.setCdNm(dsmSpgSpprmp.getMpcd()); |
| | | dwsResPressDi.setResCd(resAd.getResGuid()); |
| | | dwsResPressDi.setResNm(resAd.getResName()); |
| | | dwsResPressDi.setAvgValue(avgValue); |
| | | |
| | | dwsResPressDi.setResCd(resAd.getResGuid()); |
| | | dwsResPressDi.setResNm(resAd.getResName()); |
| | | dwsResPressDi.setAvgValue(avgValue); |
| | | Date date = dateFormatString(dbExcel.getMonitorDate(), "yyyy-MM-dd"); |
| | | dwsResPressDi.setDt(date); |
| | | dwsResPressDi.setIsTb("y"); |
| | | |
| | | Date date = dateFormatString(dbExcel.getMonitorDate(), "yyyy-MM-dd"); |
| | | dwsResPressDi.setDt(date); |
| | | dwsResPressDi.setIsTb("y"); |
| | | |
| | | Integer result = dwsResPressDiService.updateCustomize(dwsResPressDi); |
| | | if (result<=0){ |
| | | dwsResPressDiService.save(dwsResPressDi); |
| | | Integer result = dwsResPressDiService.updateCustomize(dwsResPressDi); |
| | | if (result<=0){ |
| | | dwsResPressDiService.save(dwsResPressDi); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | throw new RuntimeException("表格渗压数据个数超过当前水库断面测点个数"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | dwsWaterResZEightDetailAll.setResourceFlag("人工"); |
| | | dwsWaterResZEightDetailAll.setIsTb("y"); |
| | | |
| | | Date date = dateFormatString(dbExcel.getMonitorDate(), "yyyy-MM-dd 08:00:00"); |
| | | Date date = dateFormatString(dbExcel.getMonitorDate() + " 08:00:00", "yyyy-MM-dd 08:00:00"); |
| | | dwsWaterResZEightDetailAll.setDt(date); |
| | | dwsWaterResZEightDetailAll.setTm(date); |
| | | dwsWaterResZEightDetailAll.setCollectDt(date); |
| | |
| | | import cn.gistack.sm.sjztdw.entity.DwsResPressDi; |
| | | import cn.gistack.sm.sjztdw.mapper.DwsResPressDiMapper; |
| | | import cn.gistack.sm.sjztdw.service.IDwsResPressDiService; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import cn.gistack.sm.sjztods.entity.DsmSpgSpprmp; |
| | | import cn.gistack.sm.sjztods.service.IDsmSpgSpprmpService; |
| | | 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.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @DS("ztdw") |
| | | @AllArgsConstructor |
| | | public class DwsResPressDiServiceImpl extends ServiceImpl<DwsResPressDiMapper, DwsResPressDi> implements IDwsResPressDiService { |
| | | |
| | | private final IDsmSpgSpprmpService dsmSpgSpprmpService; |
| | | |
| | | @Override |
| | | public Integer updateCustomize(DwsResPressDi dwsResPressDi) { |
| | | return baseMapper.updateCustomize(dwsResPressDi); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateByBasic(DbExcelVO dbExcel) { |
| | | DsmSpgSpprmp paramSy = new DsmSpgSpprmp(); |
| | | paramSy.setCh(dbExcel.getCh()); |
| | | paramSy.setRscd(dbExcel.getResRegCode()); |
| | | |
| | | //根据水库注册登记码,断面获取渗压站列表,并按测点编号从小到大排序 |
| | | List<DsmSpgSpprmp> list = dsmSpgSpprmpService.getList(paramSy); |
| | | |
| | | //excel数据应是按测压管从小到大 |
| | | List<String> avgValueList = Arrays.asList(dbExcel.getAvgValue().split(",")); |
| | | |
| | | //更新渗压站数据 |
| | | if (list !=null && list.size()>0){ |
| | | for (int i = 0; i < avgValueList.size(); i++) { |
| | | String avgValue = avgValueList.get(i); |
| | | DsmSpgSpprmp dsmSpgSpprmp = list.get(i); |
| | | |
| | | DbExcelVO updateParams = new DbExcelVO(); |
| | | |
| | | updateParams.setResCd(dbExcel.getResCd()); |
| | | updateParams.setCd(dsmSpgSpprmp.getMpcd()); |
| | | updateParams.setMonitorDate(dbExcel.getMonitorDate()); |
| | | updateParams.setAvgValue(avgValue); |
| | | |
| | | baseMapper.updateByBasic(updateParams); |
| | | |
| | | } |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public Integer removeByBasic(DbExcelVO dbExcelVO) { |
| | | return baseMapper.removeByBasic(dbExcelVO); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | import cn.gistack.sm.sjztdw.entity.DwsWaterResZEightDetailAll; |
| | | import cn.gistack.sm.sjztdw.mapper.DwsWaterResZEightDetailAllMapper; |
| | | import cn.gistack.sm.sjztdw.service.IDwsWaterResZEightDetailAllService; |
| | | import cn.gistack.sm.sjztdw.vo.DbExcelVO; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public Integer updateCustomize(DwsWaterResZEightDetailAll dwsWaterResZEightDetailAll) { |
| | | return baseMapper.updateCustomize(dwsWaterResZEightDetailAll); |
| | | } |
| | | |
| | | @Override |
| | | public Integer updateByBasic(DbExcelVO dbExcel) { |
| | | return baseMapper.updateByBasic(dbExcel); |
| | | } |
| | | |
| | | @Override |
| | | public Integer removeByBasic(DbExcelVO dbExcelVO) { |
| | | return baseMapper.removeByBasic(dbExcelVO); |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztdw.vo; |
| | | |
| | | import cn.gistack.sm.sjztdw.excel.DbExcel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class DbExcelVO extends DbExcel { |
| | | |
| | | //水库编码 |
| | | private String resCd; |
| | | |
| | | private String resRegCode; |
| | | |
| | | |
| | | //测点编码 |
| | | private String cd; |
| | | |
| | | private String ch; |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.sjztdw.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ListVO { |
| | | List<DbExcelVO> list; |
| | | } |
| | |
| | | return R.status(tbAttResBaseService.auditByGuid(tbAttResBase)); |
| | | } |
| | | |
| | | |
| | | //初始化数据 |
| | | @GetMapping(value = "/initTbData") |
| | | public R initTbData(){ |
| | | tbAttResBaseService.initTbData(); |
| | | return R.status(true); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="getListByRegion" resultType="cn.gistack.sm.sjztmd.entity.AttResBase"> |
| | | SELECT arb."guid",arb."code",arb."name",arb."ad_guid",arb."eng_scal",arb."res_loc" FROM "att_res_base" arb |
| | | SELECT |
| | | arb."guid", |
| | | arb."code", |
| | | arb."name", |
| | | arb."ad_guid", |
| | | arb."eng_scal", |
| | | arb."res_loc" , |
| | | arb."res_reg_code" |
| | | FROM "att_res_base" arb |
| | | left join "att_ad_base" aab on aab."guid" = arb."interior_ad_guid" |
| | | left join "att_ad_base" aa on aab."p_ad_code" = aa."ad_code" |
| | | left join "att_ad_base" ab on aa."p_ad_code" = ab."ad_code" |
| | |
| | | @DS("zt") |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | Boolean getFinalCheckStateCheckLoadingByGuid(@Param("guid") String resGuid); |
| | | |
| | | Integer initTbAttResBase(); |
| | | |
| | | Integer initTbAttResStagChar(); |
| | | } |
| | |
| | | WHERE "guid" = #{tbAttResBase.guid} |
| | | </update> |
| | | |
| | | |
| | | <!--查询水库基础填报数据--> |
| | | <select id="getTbAttResBaseInfo" resultType="java.util.Map"> |
| | | SELECT 'tb_att_res_base' AS name,ifnull("check_state",-1) as value FROM "tb_att_res_base" WHERE "guid" = #{resGuid} |
| | |
| | | (SELECT if(ifnull(sum("check_state"),-1)>0,1,0) as value FROM "tb_file_storage_location" WHERE "res_guid" = #{guid} limit 1) |
| | | ) a |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!--初始化水库基础信息--> |
| | | <update id="initTbAttResBase"> |
| | | UPDATE SJZT_MD."tb_att_res_base" tarb |
| | | JOIN SJZT_MD."att_res_base" arb on tarb."guid" = arb."guid" |
| | | JOIN SJZT_ODS."yg_rsvr_b" yrb on yrb."id" = tarb."guid" |
| | | JOIN ( |
| | | select |
| | | REPLACE( |
| | | REPLACE( |
| | | REPLACE( |
| | | REPLACE( |
| | | REPLACE( |
| | | REPLACE( |
| | | REPLACE( |
| | | REPLACE( |
| | | REPLACE( |
| | | REPLACE( |
| | | "res_func",'防洪','1' |
| | | ),'灌溉','2' |
| | | ),'供水','3' |
| | | ),'发电','4' |
| | | ),'航运','5' |
| | | ),'防凌','6' |
| | | ),'生态','7' |
| | | ),'旅游','8' |
| | | ),'养殖','9' |
| | | ),'其他','10' |
| | | ) "res_func","guid" |
| | | FROM SJZT_MD."att_res_base" |
| | | ) arbResFunc on arbResFunc."guid" = tarb."guid" |
| | | |
| | | join ( |
| | | SELECT |
| | | rrbl."res_guid", |
| | | abb."name" |
| | | FROM |
| | | SJZT_MD."rel_res_bas_loc" rrbl |
| | | LEFT JOIN SJZT_MD."att_bas_base" abb ON abb."code" = rrbl."bas_guid" |
| | | ) bas on bas."res_guid" = tarb."guid" |
| | | |
| | | SET |
| | | tarb."res_scal" = |
| | | case |
| | | when arb."eng_scal" = '大(1)型' THEN 1 |
| | | when arb."eng_scal" = '大(2)型' THEN 2 |
| | | when arb."eng_scal" = '中型' THEN 3 |
| | | when arb."eng_scal" = '小(1)型' THEN 4 |
| | | when arb."eng_scal" = '小(2)型' THEN 5 |
| | | END, |
| | | |
| | | tarb."build_address" = arb."res_loc", |
| | | tarb."eng_grad" = arb."eng_grad", |
| | | tarb."lgtd" = arb."center_long", |
| | | tarb."lttd" = arb."center_lat", |
| | | |
| | | tarb."elevation_system" = |
| | | case |
| | | when yrb."height_base_std_tp" = 1 THEN '56黄海高程' |
| | | when yrb."height_base_std_tp" = 2 THEN '85黄海高程' |
| | | when yrb."height_base_std_tp" = 3 THEN '吴淞高程' |
| | | when yrb."height_base_std_tp" = 4 THEN '珠江高程' |
| | | when yrb."height_base_std_tp" = 5 THEN '其他' |
| | | END, |
| | | |
| | | tarb."bas_code" = arb."bas_name", |
| | | tarb."river_sys_code" = |
| | | case |
| | | when arb."bas_guid" = '乌江水系' THEN '0035FE' |
| | | when arb."bas_guid" = '汉江水系' THEN '0035FG' |
| | | when arb."bas_guid" = '洞庭湖水系' THEN '0035FF' |
| | | when arb."bas_guid" = '淮河干流水系' THEN '0034EA' |
| | | when arb."bas_guid" = '长江干流水系' THEN '0035FA' |
| | | END, |
| | | tarb."com_control_bas" = bas."name", |
| | | tarb."res_func" = arbResFunc."res_func", |
| | | --工程始建时间,下闸蓄水时间没找到 |
| | | tarb."industry_dept" = |
| | | case |
| | | when arb."industry_dept" = '水利部门' THEN '1' |
| | | when arb."industry_dept" = '能源部门' THEN '2' |
| | | when arb."industry_dept" = '交通部门' THEN '3' |
| | | when arb."industry_dept" = '住建部门' THEN '4' |
| | | when arb."industry_dept" = '农业部门' THEN '5' |
| | | when arb."industry_dept" = '林业部门' THEN '6' |
| | | when arb."industry_dept" = '旅游部门' THEN '7' |
| | | when arb."industry_dept" = '司法部门' THEN '8' |
| | | when arb."industry_dept" = '国资委' THEN '9' |
| | | when arb."industry_dept" = '其他' THEN '10,' |
| | | END |
| | | WHERE tarb."final_state" = -1 |
| | | |
| | | |
| | | </update> |
| | | |
| | | |
| | | |
| | | <sql id="getAttResStagChar"> |
| | | SELECT |
| | | tarb."guid", |
| | | arsc."con_area", |
| | | NULL, |
| | | arsc."moyear_fl_age", |
| | | NULL, |
| | | arsc."tb_chec_fl_stag", |
| | | arsc."tb_des_fl_stag", |
| | | arsc."tb_flpr_high_stag", |
| | | arsc."tb_norm_pool_stag", |
| | | arsc."tb_dead_stag", |
| | | arsc."tb_tot_cap", |
| | | arsc."stor_fl_cap", |
| | | arsc."flco_cap", |
| | | arsc."ben_res_cap", |
| | | arsc."tb_dead_cap", |
| | | arsc."des_fl_flow_max", |
| | | arsc."chec_fl_flow_max", |
| | | null, |
| | | |
| | | arsc."des_fl_stand", |
| | | arsc."des_fl_flow", |
| | | NULL, |
| | | NULL, |
| | | NULL, |
| | | NULL, |
| | | NULL, |
| | | NULL, |
| | | |
| | | arsc."chec_fl_stand", |
| | | arsc."chec_fl_flow", |
| | | NULL, |
| | | NULL, |
| | | NULL, |
| | | NULL, |
| | | NULL, |
| | | NULL, |
| | | |
| | | beforeArfl."tb_flse_lim_stag", |
| | | NULL, |
| | | NULL, |
| | | |
| | | midArfl."tb_flse_lim_stag", |
| | | NULL, |
| | | NULL, |
| | | |
| | | afterArfl."tb_flse_lim_stag", |
| | | NULL, |
| | | NULL, |
| | | |
| | | '0' as "check_state", |
| | | NOW() as "create_time" |
| | | |
| | | |
| | | FROM |
| | | SJZT_MD."tb_att_res_base" tarb |
| | | LEFT JOIN SJZT_MD."att_res_stag_char" arsc on arsc."res_guid" = tarb."guid" |
| | | LEFT JOIN SJZT_MD."att_res_flse_lim" beforeArfl on beforeArfl."res_guid" = tarb."guid" and beforeArfl."flood_season_name" = '前汛期' |
| | | LEFT JOIN SJZT_MD."att_res_flse_lim" midArfl on midArfl."res_guid" = tarb."guid" and midArfl."flood_season_name" = '中汛期' |
| | | LEFT JOIN SJZT_MD."att_res_flse_lim" afterArfl on afterArfl."res_guid" = tarb."guid" and afterArfl."flood_season_name" = '后汛期' |
| | | WHERE tarb."final_state" = -1 |
| | | </sql> |
| | | |
| | | |
| | | |
| | | <insert id="initTbAttResStagChar"> |
| | | INSERT INTO SJZT_MD."tb_att_res_stag_char" |
| | | ( |
| | | "res_guid", |
| | | "con_area", |
| | | "moyear_rain_avg", |
| | | "moyear_fl_avg", |
| | | "adjust_prop", |
| | | "chec_fl_stag", |
| | | "des_fl_stag", |
| | | "fl_con_top_stag", |
| | | "cor_norm_stag", |
| | | "dead_stag", |
| | | "total_cap", |
| | | "flpr_cap", |
| | | "fl_stor_cap", |
| | | "adjust_stor_cap", |
| | | "dead_cap", |
| | | "des_flood_flow_max", |
| | | "chec_flood_flow_max", |
| | | "down_waco_safe_disc", |
| | | |
| | | "des_fl_sta", |
| | | "des_fl_flow", |
| | | "des_fl_1h_cap", |
| | | "des_fl_3h_cap", |
| | | "des_fl_6h_cap", |
| | | "des_fl_12h_cap", |
| | | "des_fl_1day_cap", |
| | | "des_fl_3day_cap", |
| | | |
| | | "chec_fl_sta", |
| | | "chec_fl_flow", |
| | | "chec_fl_1h_cap", |
| | | "chec_fl_3h_cap", |
| | | "chec_fl_6h_cap", |
| | | "chec_fl_12h_cap", |
| | | "chec_fl_1day_cap", |
| | | "chec_fl_3day_cap", |
| | | |
| | | |
| | | "before_flood_stag", |
| | | "before_flood_start", |
| | | "before_flood_end", |
| | | |
| | | "mid_flood_stag", |
| | | "mid_flood_start", |
| | | "mid_flood_end", |
| | | |
| | | "after_flood_stag", |
| | | "after_flood_start", |
| | | "after_flood_end", |
| | | |
| | | "check_state", |
| | | "create_time" |
| | | |
| | | ) |
| | | <include refid="getAttResStagChar"></include> |
| | | |
| | | |
| | | |
| | | </insert> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | * @param state 状态值 |
| | | */ |
| | | Boolean updateFinalState(String resGuid, int state); |
| | | |
| | | void initTbData(); |
| | | } |
| | |
| | | //更新 |
| | | return updateById(tbAttResBase); |
| | | } |
| | | |
| | | @Override |
| | | public void initTbData() { |
| | | initTbAttResBase(); |
| | | |
| | | initTbAttResStagChar(); |
| | | } |
| | | |
| | | /** |
| | | * 初始化填报水文特征表 |
| | | */ |
| | | private Integer initTbAttResStagChar() { |
| | | return baseMapper.initTbAttResStagChar(); |
| | | } |
| | | |
| | | /** |
| | | * 初始化水库基础信息填报表 |
| | | */ |
| | | private Integer initTbAttResBase() { |
| | | Integer i = baseMapper.initTbAttResBase(); |
| | | return i; |
| | | } |
| | | } |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | |
| | | @PostMapping("/insert") |
| | | public R insert(DsmSpgSpqnmp dsmSpgSpqnmp){ |
| | | dsmSpgSpqnmp.setIsTb("y"); |
| | | dsmSpgSpqnmp.setDtuptm(DateUtil.now()); |
| | | Boolean b = dsmSpgSpqnmpService.save(dsmSpgSpqnmp); |
| | | return R.status(b); |
| | | } |
| | |
| | | |
| | | <update id="updateCustomize"> |
| | | UPDATE |
| | | SJZT_DW."dsm_spg_pztb" |
| | | SJZT_ODS."dsm_spg_pztb" |
| | | SET |
| | | "ch" = #{entity.ch}, |
| | | "ofax" = #{entity.ofax}, |
| | |
| | | <delete id="removeCustomize"> |
| | | DELETE |
| | | FROM |
| | | SJZT_DW."dsm_spg_pztb" |
| | | SJZT_ODS."dsm_spg_pztb" |
| | | where |
| | | "is_tb" = 'y' |
| | | AND "mpcd" in |
| | |
| | | <update id="updateCustomize"> |
| | | |
| | | UPDATE |
| | | SJZT_DW."dsm_spg_spprmp" |
| | | SJZT_ODS."dsm_spg_spprmp" |
| | | SET |
| | | "ch" = #{entity.ch}, |
| | | "ofax" = #{entity.ofax}, |
| | |
| | | <delete id="removeCustomize"> |
| | | DELETE |
| | | FROM |
| | | SJZT_DW."dsm_spg_spprmp" |
| | | SJZT_ODS."dsm_spg_spprmp" |
| | | where |
| | | "is_tb" = 'y' |
| | | AND "mpcd" in |
| | |
| | | |
| | | Boolean updateCustomize(@Param("entity") DsmSpgSpqnmp dsmSpgSpqnmp); |
| | | |
| | | List<DsmSpgSpqnmp> getList(@Param("entity") DsmSpgSpqnmp paramSl); |
| | | List<DsmSpgSpqnmp> getList(@Param("params") DsmSpgSpqnmp paramSl); |
| | | |
| | | Boolean removeCustomize(@Param("ids") String ids); |
| | | } |
| | |
| | | <update id="updateCustomize"> |
| | | |
| | | UPDATE |
| | | SJZT_DW."dsm_spg_spqnmp" |
| | | SJZT_ODS."dsm_spg_spqnmp" |
| | | SET |
| | | "ch" = #{entity.ch}, |
| | | "ofax" = #{entity.ofax}, |
| | |
| | | <delete id="removeCustomize"> |
| | | DELETE |
| | | FROM |
| | | SJZT_DW."dsm_spg_spqnmp" |
| | | SJZT_ODS."dsm_spg_spqnmp" |
| | | where |
| | | "is_tb" = 'y' |
| | | AND "mpcd" in |
| | |
| | | url: ${blade.datasource.dev.zt.url} |
| | | username: ${blade.datasource.dev.zt.username} |
| | | password: ${blade.datasource.dev.zt.password} |
| | | ztdw: |
| | | url: ${blade.datasource.dev.ztdw.url} |
| | | username: ${blade.datasource.dev.ztdw.username} |
| | | password: ${blade.datasource.dev.ztdw.password} |
| | | # 智能外呼数据库 |
| | | ztznwh: |
| | | url: ${blade.datasource.dev.ztznwh.url} |
| | |
| | | url: ${blade.datasource.prod.zt.url} |
| | | username: ${blade.datasource.prod.zt.username} |
| | | password: ${blade.datasource.prod.zt.password} |
| | | ztdw: |
| | | url: ${blade.datasource.prod.ztdw.url} |
| | | username: ${blade.datasource.prod.ztdw.username} |
| | | password: ${blade.datasource.prod.ztdw.password} |
| | | # 智能外呼数据库 |
| | | ztznwh: |
| | | url: ${blade.datasource.prod.ztznwh.url} |
| | |
| | | url: ${blade.datasource.test.zt.url} |
| | | username: ${blade.datasource.test.zt.username} |
| | | password: ${blade.datasource.test.zt.password} |
| | | ztdw: |
| | | url: ${blade.datasource.test.ztdw.url} |
| | | username: ${blade.datasource.test.ztdw.username} |
| | | password: ${blade.datasource.test.ztdw.password} |
| | | # 智能外呼数据库 |
| | | ztznwh: |
| | | url: ${blade.datasource.test.ztznwh.url} |