5 files modified
7 files added
| | |
| | | package cn.gistack.nky.service.impl; |
| | | |
| | | import cn.gistack.common.utils.CommonUtil; |
| | | import cn.gistack.common.utils.SpringContextUtil; |
| | | import cn.gistack.nky.resultpojo.HsybGetFuturePo; |
| | | import cn.gistack.nky.service.IHsybService; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | |
| | | private static String ONLINE = "http://10.42.7.148:50001"; |
| | | private static String LOCAL = "https://sk.hubeishuiyi.cn"; |
| | | private static String GET_FUTURE = ONLINE + "/hsybApi/api/fh-admin/skkr/getFuture"; |
| | | private static String GET_FUTURE = "/hsybApi/api/fh-admin/skkr/getFuture"; |
| | | |
| | | private static String AUTHORIZATION = "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJBRE1JTiIsIlVzZXJJZCI6IjEiLCJzY29wZSI6WyJhbGwiXSwiVXNlclJlYWxOYW1lIjoi6LaF57qn566h55CG5ZGYIiwiVXNlclh6cWhkbSI6IjQyMDUiLCJleHAiOjI1MTk3NzIwMTAsImp0aSI6ImExNTcxYzk1LTBkNjMtNDkyYi1iOWEyLTE2ZTIzNTQ5ZTY1ZiIsImNsaWVudF9pZCI6InVzZXItc2VydmljZSJ9.ebNVZrw9LbhKaj2w6RR8b2wccQiDkhvBeq79SxxCK-yWiOlIFqBkotTN4TNJg8umcpyYvLILwvqXWRJhffEtgi25sX2y6MqLIWM4kMZ9d8ptdnSmTpBPhltSiQOM0KFa1kl5nSDCBwYOLn-pESJglam76cjpgZNoC88x3iNHacdiXDItY0rtY85HrQ26uyJu9UovKtmYmZRHsIbGMpDta5Q1p4vfaCIr-YUayDrCweZJiQDEEcOSpWJ7O7RMk3pRkX_4UmPHFzrOI2lMp1jQIhxnSTE7EVAz_4z8h8r46muSkpF54Ic4XSawHKqdSLHx8T05LB0MpvOzWMPS6c1uHA"; |
| | | |
| | |
| | | |
| | | public HsybGetFuturePo apiRequest(String url, String jsonparams) { |
| | | |
| | | // 获取环境 |
| | | String activeProfile = SpringContextUtil.getActiveProfile(); |
| | | if (activeProfile.equals("dev")) { |
| | | url = LOCAL+ url ; |
| | | } |
| | | if (activeProfile.equals("prod")) { |
| | | url = ONLINE+ url ; |
| | | } |
| | | if (activeProfile.equals("test")) { |
| | | url = ONLINE + url; |
| | | } |
| | | |
| | | // Long param = Long.parseLong(jsonparams); |
| | | System.out.println("请求参数:" + jsonparams); |
| | | // 声明一个header变量 |
| | |
| | | package cn.gistack.nky.service.impl; |
| | | |
| | | import cn.gistack.common.utils.SpringContextUtil; |
| | | import cn.gistack.nky.entity.AlarmGet; |
| | | import cn.gistack.nky.entity.ArimaPredict; |
| | | import cn.gistack.nky.entity.HstPredict; |
| | |
| | | private static final String API_PREFIX = "http://10.42.7.146:9503/"; |
| | | private static final String LOCAL_API_PREFIX = "https://sk.hubeishuiyi.cn/warnIp/"; |
| | | // ARIMA预测接口URL |
| | | private static final String ARIMA_PREDICT = API_PREFIX + "predict/arimaPredict"; |
| | | private static final String ARIMA_PREDICT = "predict/arimaPredict"; |
| | | // ARIMA预测结果接口 |
| | | private static final String ARIMA_QUERY = API_PREFIX+"predict/arimaQuery"; |
| | | private static final String ARIMA_QUERY = "predict/arimaQuery"; |
| | | // HST预测接口URL |
| | | private static final String HST_PREDICT =API_PREFIX+ "predict/hstPredict"; |
| | | private static final String HST_PREDICT = "predict/hstPredict"; |
| | | // HST预测结果接口 |
| | | private static final String HST_QUERY =API_PREFIX+ "predict/hstQuery"; |
| | | private static final String HST_QUERY = "predict/hstQuery"; |
| | | |
| | | //按库传输数据接口 |
| | | private static final String ORIGIN_BATCHDATA = API_PREFIX + "origin/batchData"; |
| | | private static final String ORIGIN_BATCHDATA = "origin/batchData"; |
| | | |
| | | //判定异常 |
| | | private static final String ALARM_GET = API_PREFIX+"alarm/get"; |
| | | private static final String ALARM_GET = "alarm/get"; |
| | | |
| | | @Override |
| | | public Boolean arimaPredict(ArimaPredictReqPo po) { |
| | |
| | | * @return |
| | | */ |
| | | private JSONObject requestNkyApi(String url, String jsonparams) { |
| | | |
| | | // 获取环境 |
| | | String activeProfile = SpringContextUtil.getActiveProfile(); |
| | | if (activeProfile.equals("dev")) { |
| | | url = LOCAL_API_PREFIX+ url ; |
| | | } |
| | | if (activeProfile.equals("prod")) { |
| | | url = API_PREFIX+ url ; |
| | | } |
| | | if (activeProfile.equals("test")) { |
| | | url = API_PREFIX + url; |
| | | } |
| | | |
| | | // 声明一个header变量 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | // 设置为json格式 |
| | |
| | | package cn.gistack.nky.service.impl; |
| | | |
| | | import cn.gistack.common.utils.SpringContextUtil; |
| | | import cn.gistack.nky.resultpojo.DataBigResultPojo; |
| | | import cn.gistack.nky.resultpojo.DataResChildrenPo; |
| | | import cn.gistack.nky.resultpojo.DataResPo; |
| | |
| | | /** |
| | | * 实时渗压监测 |
| | | */ |
| | | private static final String LASTEST_OSMOTIC_PRESSURE =ONLINE + "/services/1234567890ABCDEFGHIJKLMN/monitor/lastest_osmotic_pressure/api?res_nm=&cd=&city_cd=&county_cd=&pageNo=1&pageSize=9999"; |
| | | private static final String LASTEST_OSMOTIC_PRESSURE = "/services/1234567890ABCDEFGHIJKLMN/monitor/lastest_osmotic_pressure/api?res_nm=&cd=&city_cd=&county_cd=&pageNo=1&pageSize=9999"; |
| | | |
| | | /** |
| | | * 位移监测 |
| | | */ |
| | | private static final String WY_API =ONLINE+ "/services/1234567890ABCDEFGHIJKLMN/monitor/wy/api?res_nm=&cd=&city_cd=&county_cd=&pageNo=1&pageSize=9999"; |
| | | private static final String WY_API ="/services/1234567890ABCDEFGHIJKLMN/monitor/wy/api?res_nm=&cd=&city_cd=&county_cd=&pageNo=1&pageSize=9999"; |
| | | |
| | | /** |
| | | * 渗流监测 |
| | | */ |
| | | private static final String SL_API =ONLINE + "/services/1234567890ABCDEFGHIJKLMN/monitor/sl/api?res_nm=&cd=&city_cd=&county_cd=&pageNo=1&pageSize=9999"; |
| | | private static final String SL_API ="/services/1234567890ABCDEFGHIJKLMN/monitor/sl/api?res_nm=&cd=&city_cd=&county_cd=&pageNo=1&pageSize=9999"; |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | private List<DataResChildrenPo> getData(String url, String type, Map<String, Object> params) { |
| | | // 获取环境 |
| | | String activeProfile = SpringContextUtil.getActiveProfile(); |
| | | if (activeProfile.equals("dev")) { |
| | | url = LOCAL+ url ; |
| | | } |
| | | if (activeProfile.equals("prod")) { |
| | | url = ONLINE+ url ; |
| | | } |
| | | if (activeProfile.equals("test")) { |
| | | url = ONLINE + url; |
| | | } |
| | | |
| | | HttpMethod method; |
| | | if (type.toLowerCase().equals("get".toLowerCase())) { |
| | | method = HttpMethod.GET; |
| | |
| | | } |
| | | |
| | | private List<DataResPo> getResData(String url, String type, Map<String, Object> params){ |
| | | |
| | | // 获取环境 |
| | | String activeProfile = SpringContextUtil.getActiveProfile(); |
| | | if (activeProfile.equals("dev")) { |
| | | url = LOCAL+ url ; |
| | | } |
| | | if (activeProfile.equals("prod")) { |
| | | url = ONLINE+ url ; |
| | | } |
| | | if (activeProfile.equals("test")) { |
| | | url = ONLINE + url; |
| | | } |
| | | |
| | | |
| | | HttpMethod method; |
| | | if (type.toLowerCase().equals("get".toLowerCase())) { |
| | | method = HttpMethod.GET; |
| New file |
| | |
| | | package cn.gistack.sm.resDataCheck.controller; |
| | | |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManage; |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManageDetail; |
| | | import cn.gistack.sm.resDataCheck.service.IQualityManageDetailService; |
| | | import cn.gistack.sm.resDataCheck.vo.QualityManageDetailVO; |
| | | import cn.gistack.sm.resDataCheck.vo.QualityManageVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Description: 数据规则校验 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = "数据质量管理明细") |
| | | @RestController |
| | | @RequestMapping("/resDataCheck/qualityManageDetail") |
| | | @AllArgsConstructor |
| | | public class QualityManageDetailController extends BladeController { |
| | | |
| | | private IQualityManageDetailService qualityManageDetailService; |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | | */ |
| | | @ApiOperation(value = "数据规则校验-分页列表查询", notes = "数据规则校验-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public R<IPage<QualityManageDetailVO>> queryPageList(Query query, QualityManageDetailVO qualityManageDetailVO) { |
| | | IPage<QualityManageDetailVO> pageList = qualityManageDetailService.selectCustomizePage(Condition.getPage(query), qualityManageDetailVO); |
| | | return R.data(pageList); |
| | | } |
| | | |
| | | /** |
| | | * 添加 |
| | | * |
| | | * @param qualityManageDetail |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "数据规则校验-添加", notes = "数据规则校验-添加") |
| | | @PostMapping(value = "/add") |
| | | public R add(@RequestBody QualityManageDetail qualityManageDetail) { |
| | | return R.data(qualityManageDetailService.save(qualityManageDetail)); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * |
| | | * @param QualityManageVO |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "数据规则校验-编辑", notes = "数据规则校验-编辑") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public R edit(@RequestBody QualityManageDetail QualityManageVO) { |
| | | return R.data(qualityManageDetailService.updateById(QualityManageVO)); |
| | | } |
| | | |
| | | /** |
| | | * 通过id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "数据规则校验-通过id删除", notes = "数据规则校验-通过id删除") |
| | | @PostMapping(value = "/delete") |
| | | public R delete(@RequestParam(name = "id", required = true) String id) { |
| | | return R.data(qualityManageDetailService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "数据规则校验-批量删除", notes = "数据规则校验-批量删除") |
| | | @PostMapping(value = "/deleteBatch") |
| | | public R deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | return R.data(qualityManageDetailService.removeByIds(Arrays.asList(ids.split(",")))); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.resDataCheck.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.springblade.core.mp.base.BaseEntity; |
| | | |
| | | /** |
| | | * @Description: 水库数据质量管理明细表 |
| | | */ |
| | | @Data |
| | | @TableName("SM_RES_DATA_QUALITY_MANAGE_DETAIL") |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="SM_RES_DATA_QUALITY_MANAGE_DETAIL对象", description="水库数据质量管理明细表") |
| | | public class QualityManageDetail extends BaseEntity { |
| | | |
| | | /** |
| | | * 水库id |
| | | */ |
| | | @ApiModelProperty("水库id") |
| | | private String resId; |
| | | |
| | | //水库名称 |
| | | private String resName; |
| | | |
| | | /** |
| | | * 规则id |
| | | */ |
| | | @ApiModelProperty("规则id") |
| | | private String ruleId; |
| | | |
| | | //规则名称 |
| | | private String ruleName; |
| | | |
| | | //规则描述 |
| | | private String ruleDescription; |
| | | /** |
| | | * 值 |
| | | */ |
| | | @ApiModelProperty("值") |
| | | private String val; |
| | | |
| | | //是否有闸 |
| | | private String isGate; |
| | | |
| | | //水库规模 |
| | | private String engScal; |
| | | |
| | | //是否病险 |
| | | private String isDanger; |
| | | |
| | | //市编码 |
| | | private String cityCode; |
| | | private String cityName; |
| | | private String countyCode; |
| | | private String countyName; |
| | | private String townCode; |
| | | private String townName; |
| | | |
| | | //注册登记号 |
| | | private String resRegCode; |
| | | |
| | | //实时水位 |
| | | private String rz; |
| | | |
| | | //堰顶高程 |
| | | private String tbWeirTopElevation; |
| | | |
| | | //主汛期限制水位 |
| | | private String tbFlseLimStag; |
| | | |
| | | //正常蓄水位 |
| | | private String tbNormPoolStag; |
| | | |
| | | |
| | | //控制运行水位 |
| | | private String tbControlZ; |
| | | |
| | | |
| | | //设计洪水位 |
| | | private String tbDesFlStag; |
| | | |
| | | |
| | | //校核洪水位 |
| | | private String tbCheckFlStag; |
| | | |
| | | |
| | | //坝顶高程 |
| | | private String tbDamTopElevation; |
| | | |
| | | //死水位 |
| | | private String tbDeadStag; |
| | | |
| | | //备注 |
| | | private String remark; |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.resDataCheck.mapper; |
| | | |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManage; |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManageDetail; |
| | | import cn.gistack.sm.resDataCheck.entity.Rules; |
| | | import cn.gistack.sm.resDataCheck.vo.QualityManageDetailVO; |
| | | import cn.gistack.sm.resDataCheck.vo.QualityManageVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: 数据校验规则 |
| | | */ |
| | | public interface QualityManageDetailMapper extends BaseMapper<QualityManageDetail> { |
| | | |
| | | List<QualityManageDetailVO> selectCustomizePage(IPage<QualityManageDetailVO> page, @Param("vo") QualityManageDetailVO qualityManageDetailVO); |
| | | |
| | | |
| | | Integer saveQualityManageDetail(@Param("rule")Rules rules, @Param("varStr") String varStr, @Param("whereStr") String whereStr); |
| | | } |
| 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.resDataCheck.mapper.QualityManageDetailMapper"> |
| | | |
| | | |
| | | <insert id="saveQualityManageDetail"> |
| | | |
| | | insert into |
| | | SM_RES_DATA_QUALITY_MANAGE_DETAIL |
| | | ( |
| | | res_id,rule_id,rule_name,rule_description,create_time,update_time,val, |
| | | is_gate,eng_scal,is_danger,town_code,town_name,county_code,county_name,city_code,city_name, |
| | | res_reg_code,res_name,rz,tb_weir_top_elevation,tb_norm_pool_stag,tb_control_z,tb_des_fl_stag,tb_dam_top_elevation,tb_dead_stag,remark |
| | | ) |
| | | select |
| | | distinct |
| | | a."guid" as res_id, |
| | | ${rule.id} AS rule_id, |
| | | ${rule.name}AS rule_name, |
| | | ${rule.description}AS rule_description, |
| | | NOW() AS create_time, |
| | | NOW() AS update_time, |
| | | ${varStr}, |
| | | a."is_gate" AS is_gate, |
| | | a."eng_scal" AS eng_scal, |
| | | dria."is_danger_res" AS is_danger, |
| | | |
| | | case when town."ad_grad" = 4 THEN town."ad_code" ELSE NULL END AS town_code, |
| | | case when town."ad_grad" = 4 THEN town."ad_name" ELSE NULL END AS town_name, |
| | | |
| | | case when town."ad_grad" = 3 THEN town."ad_code" |
| | | when county."ad_grad" = 3 THEN county."ad_code" END AS county_code, |
| | | |
| | | case when town."ad_grad" = 3 THEN town."ad_name" |
| | | when county."ad_grad" = 3 THEN county."ad_name" END AS county_name, |
| | | |
| | | case when town."ad_grad" = 2 THEN town."ad_code" |
| | | when county."ad_grad" = 2 THEN county."ad_code" |
| | | ELSE city."ad_code" END AS city_code, |
| | | |
| | | case when town."ad_grad" = 2 THEN town."ad_name" |
| | | when county."ad_grad" = 2 THEN county."ad_name" |
| | | ELSE city."ad_name" END AS city_name, |
| | | |
| | | a."res_reg_code" as res_reg_code, |
| | | a."name" as res_name, |
| | | f."rz" as rz, |
| | | g."tb_weir_top_elevation", |
| | | c."tb_norm_pool_stag", |
| | | b."tb_control_z", |
| | | c."tb_des_fl_stag", |
| | | h."tb_dam_top_elevation", |
| | | c."tb_dead_stag", |
| | | ${rule.description} as remark |
| | | |
| | | from SJZT_MD."att_res_base" a |
| | | |
| | | LEFT JOIN SJZT_MD."att_ad_base" town ON town."guid" = a."interior_ad_guid" |
| | | LEFT JOIN SJZT_MD."att_ad_base" county ON county."guid" = town."p_ad_code" |
| | | LEFT JOIN SJZT_MD."att_ad_base" city ON city."guid" = county."p_ad_code" |
| | | |
| | | left join SJZT_DW."dim_res_info_a" dria ON (dria."guid" = a."guid") |
| | | left join SJZT_MD."att_res_danger_manage_special" b on (a."guid" = b."res_guid") |
| | | left join SJZT_MD."att_res_stag_char" c on (a."guid" = c."res_guid") |
| | | left join SJZT_MD."att_res_flse_lim" d1 on (a."guid" = d1."res_guid" and d1."flood_season_name" = '前汛期') |
| | | left join SJZT_MD."att_res_flse_lim" d2 on (a."guid" = d2."res_guid" and d2."flood_season_name" = '中汛期') |
| | | left join SJZT_MD."att_res_flse_lim" d3 on (a."guid" = d3."res_guid" and d3."flood_season_name" = '后汛期') |
| | | left join SJZT_MD."att_st_base" e on (a."guid" = e."res_guid" and e."is_main_rsvr" = '1') |
| | | left join SJZT_MD."st_rsvr_r_last" f on (e."code" = f."stcd") |
| | | left join (select tmp."res_guid",max(tmp."tb_weir_top_elevation") "tb_weir_top_elevation" from SJZT_MD."att_res_rsb_norspi" tmp group by tmp."res_guid") g on (a."guid" = g."res_guid") |
| | | left join (select tmp2."res_guid",max(tmp2."tb_dam_top_elevation") "tb_dam_top_elevation" from SJZT_MD."att_res_water_block" tmp2 group by tmp2."res_guid") h on (a."guid" = h."res_guid") |
| | | ${whereStr} |
| | | </insert> |
| | | |
| | | |
| | | |
| | | |
| | | <select id="selectCustomizePage" resultType="cn.gistack.sm.resDataCheck.vo.QualityManageDetailVO"> |
| | | SELECT |
| | | RES_ID, |
| | | is_gate, |
| | | eng_scal, |
| | | is_danger, |
| | | town_code, |
| | | town_name, |
| | | county_code, |
| | | county_name, |
| | | city_code, |
| | | city_name, |
| | | res_reg_code, |
| | | res_name, |
| | | rz, |
| | | tb_weir_top_elevation, |
| | | tb_norm_pool_stag, |
| | | tb_control_z, |
| | | tb_des_fl_stag, |
| | | tb_dam_top_elevation, |
| | | tb_dead_stag, |
| | | replace(wm_concat(remark),',',';') as remark |
| | | from YWXT.SM_RES_DATA_QUALITY_MANAGE_DETAIL |
| | | where |
| | | 1=1 |
| | | <if test="vo.resId != null and vo.resId != ''"> |
| | | res_id = #{vo.resId} |
| | | </if> |
| | | <if test="vo.resName != null and vo.resName != ''"> |
| | | res_name LIKE CONCAT('%', #{vo.resName},'%') |
| | | </if> |
| | | <if test="vo.startTime != null and vo.startTime != ''"> |
| | | AND DATE_FORMAT(create_time,'%Y-%m-%d') >= #{vo.startTime} |
| | | </if> |
| | | <if test="vo.endTime != null and vo.endTime !='' "> |
| | | AND DATE_FORMAT(create_time,'%Y-%m-%d') <= #{vo.endTime} |
| | | </if> |
| | | <if test="vo.engScal != null and vo.engScal != ''"> |
| | | eng_scal = #{vo.engScal} |
| | | </if> |
| | | <if test="vo.cityCode != null and vo.cityCode != ''"> |
| | | city_code = #{vo.cityCode} |
| | | </if> |
| | | <if test="vo.countyCode != null and vo.countyCode != ''"> |
| | | county_code = #{vo.countyCode} |
| | | </if> |
| | | <if test="vo.townCode != null and vo.townCode != ''"> |
| | | town_code= #{vo.townCode} |
| | | </if> |
| | | GROUP BY |
| | | RES_ID, |
| | | is_gate, |
| | | eng_scal, |
| | | is_danger, |
| | | town_code, |
| | | town_name, |
| | | county_code, |
| | | county_name, |
| | | city_code, |
| | | city_name, |
| | | res_reg_code, |
| | | res_name, |
| | | rz, |
| | | tb_weir_top_elevation, |
| | | tb_norm_pool_stag, |
| | | tb_control_z, |
| | | tb_des_fl_stag, |
| | | tb_dam_top_elevation, |
| | | tb_dead_stag |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <insert id="addQualityManage"> |
| | | insert into SM_RES_DATA_QUALITY_MANAGE (res_id,rule_id,create_time,update_time,val) |
| | | select a."guid" as res_id,${ruleId} AS rule_id,NOW() AS create_time,NOW() AS update_time, ${varStr} |
| | | select distinct a."guid" as res_id,${ruleId} AS rule_id,NOW() AS create_time,NOW() AS update_time, ${varStr} |
| | | from SJZT_MD."att_res_base" a |
| | | left join SJZT_MD."att_res_danger_manage_special" b on (a."guid" = b."res_guid") |
| | | left join SJZT_MD."att_res_stag_char" c on (a."guid" = c."res_guid") |
| New file |
| | |
| | | package cn.gistack.sm.resDataCheck.service; |
| | | |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManage; |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManageDetail; |
| | | import cn.gistack.sm.resDataCheck.vo.QualityManageDetailVO; |
| | | import cn.gistack.sm.resDataCheck.vo.QualityManageVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | |
| | | public interface IQualityManageDetailService extends BaseService<QualityManageDetail> { |
| | | IPage<QualityManageDetailVO> selectCustomizePage(IPage<QualityManageDetailVO> page, QualityManageDetailVO qualityManageDetailVO); |
| | | |
| | | |
| | | Integer saveQualityManageDetail(Long ruleId, String varStr, String whereStr); |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.resDataCheck.service.impl; |
| | | |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManageDetail; |
| | | import cn.gistack.sm.resDataCheck.entity.Rules; |
| | | import cn.gistack.sm.resDataCheck.mapper.QualityManageDetailMapper; |
| | | import cn.gistack.sm.resDataCheck.service.IQualityManageDetailService; |
| | | import cn.gistack.sm.resDataCheck.service.IRulesService; |
| | | import cn.gistack.sm.resDataCheck.vo.QualityManageDetailVO; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class QualityManageDetailServiceImpl extends BaseServiceImpl<QualityManageDetailMapper, QualityManageDetail> implements IQualityManageDetailService { |
| | | private final IRulesService rulesService; |
| | | |
| | | @Override |
| | | public IPage<QualityManageDetailVO> selectCustomizePage(IPage<QualityManageDetailVO> page, QualityManageDetailVO qualityManageDetailVO) { |
| | | return page.setRecords(baseMapper.selectCustomizePage(page, qualityManageDetailVO)); |
| | | } |
| | | |
| | | @Override |
| | | public Integer saveQualityManageDetail(Long ruleId, String varStr, String whereStr) { |
| | | Rules rule = rulesService.getById(ruleId); |
| | | rule.setName(StringUtil.format("'{}'",rule.getName())); |
| | | rule.setDescription(StringUtil.format("'{}'",rule.getDescription())); |
| | | |
| | | return baseMapper.saveQualityManageDetail(rule, varStr, whereStr); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManage; |
| | | import cn.gistack.sm.resDataCheck.mapper.QualityManageMapper; |
| | | import cn.gistack.sm.resDataCheck.service.IQualityManageDetailService; |
| | | import cn.gistack.sm.resDataCheck.service.IQualityManageService; |
| | | import cn.gistack.sm.resDataCheck.vo.QualityManageVO; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class QualityManageServiceImpl extends BaseServiceImpl<QualityManageMapper, QualityManage> implements IQualityManageService { |
| | | |
| | | private final IQualityManageDetailService qualityManageDetailService; |
| | | |
| | | @Override |
| | | public IPage<QualityManageVO> selectCustomizePage(IPage<QualityManageVO> page, QualityManageVO qualityManageVO) { |
| | | return page.setRecords(baseMapper.selectCustomizePage(page,qualityManageVO)); |
| | |
| | | |
| | | @Override |
| | | public Integer addQualityManage(Long ruleId, String varStr, String whereStr) { |
| | | |
| | | qualityManageDetailService.saveQualityManageDetail(ruleId,varStr,whereStr); |
| | | |
| | | return baseMapper.addQualityManage(ruleId, varStr, whereStr); |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.gistack.sm.resDataCheck.vo; |
| | | |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManage; |
| | | import cn.gistack.sm.resDataCheck.entity.QualityManageDetail; |
| | | import lombok.Data; |
| | | import org.bouncycastle.cms.PasswordRecipientId; |
| | | |
| | | @Data |
| | | public class QualityManageDetailVO extends QualityManageDetail { |
| | | private String startTime; |
| | | private String endTime; |
| | | |
| | | } |