Merge remote-tracking branch 'origin/jtdev' into jtdev
33 files modified
5 files added
| | |
| | | social: |
| | | enabled: true |
| | | domain: http://127.0.0.1:1888 |
| | | |
| | | #oauth2统一单点登录 |
| | | oauth: |
| | | config: |
| | | client-id: hbxskkey |
| | | client-secret: hbxsksecret |
| | | app-key: uaq775d4a7ufmefyf7sm16vs |
| | | app-secret: qjq1qizyo1baoyvzdlbu226hkhrs4vl2 |
| | | server-url-prefix: http://10.42.6.99:30000/api/IAM |
| | | token-url: ${oauth.config.server-url-prefix}/cas/oauth2.0/accessToken |
| | | profile-url: ${oauth.config.server-url-prefix}/api-auth/inspur/cas/oauth2.0/profile |
| | | redirect-uri: http://10.10.3.99:32182/api/blade-auth/oauth/tokenLoginUI |
| | | redirect-web-uri: http://10.10.3.99:32182/#/tokenlogin |
| | | redirect-exit-uri: http://10.10.3.99:32182/#/index |
| | |
| | | /** |
| | | * nacos prod 地址 |
| | | */ |
| | | String NACOS_PROD_ADDR = "127.0.0.1:8888"; |
| | | // String NACOS_PROD_ADDR = "nacos01.zhsk.svc.cluster.local:8848"; |
| | | String NACOS_PROD_ADDR = "nacos.zhsk:8848"; |
| | | |
| | | String NACOS_USERNAME = "nacos"; |
| | | |
| | |
| | | /** |
| | | * nacos test 地址 |
| | | */ |
| | | String NACOS_TEST_ADDR = "172.30.0.48:8848"; |
| | | String NACOS_TEST_ADDR = "127.0.0.1:8888"; |
| | | |
| | | /** |
| | | * sentinel dev 地址 |
| | |
| | | private String createAlarmType; |
| | | |
| | | /** |
| | | * 校验规则名称 |
| | | */ |
| | | private String ruleName; |
| | | |
| | | /** |
| | | * 是否导出 |
| | | */ |
| | | private Integer isExport; |
| | |
| | | return R.data(alarmRuleService.getDetail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 通过告警规则类型查询生成告警规则类型 |
| | | * @param alarmRuleType |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="通过告警规则类型查询生成告警规则类型", notes="通过告警规则类型查询生成告警规则类型") |
| | | @GetMapping(value = "/getCreateRuleType") |
| | | public R getCreateRuleType(String alarmRuleType) { |
| | | return R.data(alarmRuleService.getCreateRuleType(alarmRuleType)); |
| | | } |
| | | |
| | | /** |
| | | * 通过成告警规则类型查询告警规则名称 |
| | | * @param createAlarmType |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="通过成告警规则类型查询告警规则名称", notes="通过成告警规则类型查询告警规则名称") |
| | | @GetMapping(value = "/getAlarmRuleName") |
| | | public R getAlarmRuleName(String createAlarmType) { |
| | | return R.data(alarmRuleService.getAlarmRuleName(createAlarmType)); |
| | | } |
| | | |
| | | } |
| | |
| | | <select id="selectAlarmRecordPage" resultType="cn.gistack.alerts.alarmRule.vo.AlarmRecordVO"> |
| | | select |
| | | sar.*, |
| | | sar1.type,sar1.alarm_rule_type as alarmRuleType,sar1.create_alarm_type as createAlarmType, |
| | | sar1.type,sar1.alarm_rule_type as alarmRuleType,sar1.create_alarm_type as createAlarmType,sar1.rule_name as ruleName, |
| | | arb."name" as reservoirName,aab."ad_name" as areaName |
| | | from YWXT.sm_alarm_record sar |
| | | left join YWXT.sm_alarm_rule sar1 on sar.alarm_rule_id = sar1.id and sar1.is_deleted = 0 |
| | |
| | | <if test="alarmRecord.createAlarmType!=null and alarmRecord.createAlarmType!=''"> |
| | | and sar1.create_alarm_type = #{alarmRecord.createAlarmType} |
| | | </if> |
| | | <if test="alarmRecord.ruleName!=null and alarmRecord.ruleName!=''"> |
| | | and sar1.rule_name = #{alarmRecord.ruleName} |
| | | </if> |
| | | order by sar.id desc |
| | | </select> |
| | | |
| | |
| | | import cn.gistack.alerts.alarmRule.entity.AlarmRule; |
| | | import cn.gistack.alerts.alarmRule.vo.AlarmRuleDetailVO; |
| | | import cn.gistack.alerts.alarmRule.vo.AlarmRuleVO; |
| | | import cn.gistack.system.entity.DictBiz; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @return |
| | | */ |
| | | List<String> getAlarmRuleDetailListByAlarmRuleId(@Param("id") String alarmRuleId); |
| | | |
| | | /** |
| | | * 通过告警规则类型查询生成告警规则类型 |
| | | * @param alarmRuleType |
| | | * @return |
| | | */ |
| | | List<DictBiz> getCreateRuleType(@Param("alarmRuleType") String alarmRuleType); |
| | | |
| | | /** |
| | | * 通过成告警规则类型查询告警规则名称 |
| | | * @param createAlarmType |
| | | * @return |
| | | */ |
| | | List<DictBiz> getAlarmRuleName(@Param("createAlarmType") String createAlarmType); |
| | | } |
| | |
| | | <if test="alarmRule.ruleName!=null and alarmRule.ruleName!=''"> |
| | | and sar.rule_name like concat(concat('%',#{alarmRule.ruleName}),'%') |
| | | </if> |
| | | <if test="alarmRule.target!=null and alarmRule.target!=''"> |
| | | and sar.target = #{alarmRule.target} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--通过id查询--> |
| | |
| | | where sard.alarm_rule_id = #{id} |
| | | </select> |
| | | |
| | | <!--通过告警规则类型查询生成告警规则类型--> |
| | | <select id="getCreateRuleType" resultType="cn.gistack.system.entity.DictBiz"> |
| | | select create_alarm_type as dictValue,create_alarm_type as dictKey from sm_alarm_rule |
| | | where is_deleted =0 |
| | | and alarm_rule_type = #{alarmRuleType} |
| | | group by create_alarm_type |
| | | </select> |
| | | |
| | | <!--通过成告警规则类型查询告警规则名称--> |
| | | <select id="getAlarmRuleName" resultType="cn.gistack.system.entity.DictBiz"> |
| | | select rule_name as dictValue,rule_name as dictKey from sm_alarm_rule |
| | | where is_deleted =0 |
| | | and create_alarm_type = #{createAlarmType} |
| | | group by rule_name |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | * @return |
| | | */ |
| | | List<String> getAlarmRuleDetailList(String alarmRuleId); |
| | | |
| | | /** |
| | | * 通过告警规则类型查询生成告警规则类型 |
| | | * @param alarmRuleType |
| | | * @return |
| | | */ |
| | | Object getCreateRuleType(String alarmRuleType); |
| | | |
| | | /** |
| | | * 通过成告警规则类型查询告警规则名称 |
| | | * @param createAlarmType |
| | | * @return |
| | | */ |
| | | Object getAlarmRuleName(String createAlarmType); |
| | | } |
| | |
| | | public List<String> getAlarmRuleDetailList(String alarmRuleId) { |
| | | return baseMapper.getAlarmRuleDetailListByAlarmRuleId(alarmRuleId); |
| | | } |
| | | |
| | | /** |
| | | * 通过告警规则类型查询生成告警规则类型 |
| | | * @param alarmRuleType |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getCreateRuleType(String alarmRuleType) { |
| | | return baseMapper.getCreateRuleType(alarmRuleType); |
| | | } |
| | | |
| | | /** |
| | | * 通过成告警规则类型查询告警规则名称 |
| | | * @param createAlarmType |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object getAlarmRuleName(String createAlarmType) { |
| | | return baseMapper.getAlarmRuleName(createAlarmType); |
| | | } |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | // /** |
| | | // * 发送合并水库名短信 |
| | | // * @param smsRequestTemplate |
| | | // */ |
| | | // @Override |
| | | // public void sendMergeSignMsg(SmsRequestTemplate smsRequestTemplate) { |
| | | // // 取出数据 |
| | | // SMSSendRequest request = new SMSSendRequest(); |
| | | // SmsTemplate smsTemplate = smsRequestTemplate.getSmsTemplate(); |
| | | // request.setTemplateId(smsTemplate.getTemplateId()); |
| | | // List<List<String>> templateContent = smsRequestTemplate.getTemplateContent(); |
| | | // List<Temp> tempList = new ArrayList<>(); |
| | | // // 合并数据 |
| | | // for (List<String> list : templateContent) { |
| | | // Temp temp = new Temp(); |
| | | // temp.setPhone(list.get(1)); |
| | | // temp.setReservoirCode(list.get(0)); |
| | | // temp.setReservoirName(list.get(3)); |
| | | // temp.setAlarmRecordId(list.get(list.size()-1)); |
| | | // // 放入临时集合 |
| | | // tempList.add(temp); |
| | | // } |
| | | // // 按手机号分组 |
| | | // Map<String, List<Temp>> listMap = tempList.stream().collect(Collectors.groupingBy(Temp::getPhone)); |
| | | // // 短信发送行数据 |
| | | // List<String> rowList = new ArrayList<>(); |
| | | // // 告警记录详情数据 |
| | | // List<AlarmRecordDetailVO> alarmRecordDetailList = new ArrayList<>(); |
| | | // // 遍历 map 发送短信,组装数据 |
| | | // listMap.forEach((s, temps) -> { |
| | | // StringBuilder builder = new StringBuilder(); |
| | | // StringBuilder smsRecordBuilder = new StringBuilder(); |
| | | // builder.append(s).append(","); |
| | | // // 如果一人对应水库数量超过30个,则分批发送 |
| | | // List<List<Temp>> lists = Lists.partition(new ArrayList<>(temps), 30); |
| | | // for (List<Temp> list : lists) { |
| | | // // 遍历 |
| | | // for (Temp temp : list) { |
| | | // builder.append(temp.getReservoirName()).append(","); |
| | | // smsRecordBuilder.append(temp.getReservoirName()).append(","); |
| | | // AlarmRecordDetailVO alarmRecordDetail = new AlarmRecordDetailVO(); |
| | | // alarmRecordDetail.setReservoirNumber(temp.getReservoirCode()); |
| | | // alarmRecordDetail.setAlarmRecordId(Long.parseLong(temp.getAlarmRecordId())); |
| | | // alarmRecordDetail.setAlarmMode("短信"); |
| | | // alarmRecordDetail.setPhone(temp.getPhone()); |
| | | // alarmRecordDetail.setReservoirName(temp.getReservoirName()); |
| | | // // 加入集合 |
| | | // alarmRecordDetailList.add(alarmRecordDetail); |
| | | // } |
| | | // String row = builder.substring(0, builder.length() - 1); |
| | | // rowList.add(row); |
| | | // } |
| | | // }); |
| | | // // 批量发送短信 |
| | | // mergeBatchSendSms(smsRequestTemplate,request,smsTemplate,rowList,alarmRecordDetailList); |
| | | // } |
| | | |
| | | /** |
| | | * 批量发送合并水库的短信 |
| | | */ |
| | | public void mergeBatchSendSms(SmsRequestTemplate smsRequestTemplate, |
| | | SMSSendRequest request, |
| | | SmsTemplate smsTemplate, |
| | | List<String> rowList, |
| | | List<AlarmRecordDetailVO> alarmRecordDetailList) { |
| | | // 组装数据 |
| | | String[] titleArr = smsRequestTemplate.getTitle().split(","); |
| | | String[][] dyns = new String[rowList.size() + 1][titleArr.length]; |
| | | dyns[0] = titleArr; |
| | | int rowNum = 1; |
| | | for (String row : rowList) { |
| | | String[] cols = row.split(","); |
| | | dyns[rowNum++] = cols; |
| | | } |
| | | //请求参数 |
| | | ComResult<DynSMSSendDataResult> resultComResult = sendDynSMSSendDataResultComResult(smsTemplate.getTemplateId(), dyns); |
| | | // 先保存结果记录 |
| | | SmsResult smsResult = saveSendResult(resultComResult.getCode().toString(),resultComResult.getMsg(),request, rowList.size()); |
| | | List<AlarmRecordDetail> alarmRecordDetailArrayList = new ArrayList<>(); |
| | | // 遍历 |
| | | for (AlarmRecordDetailVO alarmRecordDetailVO : alarmRecordDetailList) { |
| | | // 设置手机号 |
| | | request.setUserNumber(alarmRecordDetailVO.getPhone()); |
| | | // 内容处理 |
| | | String str = smsTemplate.getContent().replaceAll("\\{.+?\\}", "%s"); |
| | | // 格式转换 |
| | | String formatContent = String.format(str, alarmRecordDetailVO.getReservoirName().split(",")); |
| | | // 设置内容 |
| | | request.setMessageContent(formatContent); |
| | | // 保存短信发送记录 |
| | | SmsRecord smsRecord = saveSendRecord(request, resultComResult.getCode().toString(), resultComResult.getMsg(), smsResult.getId()); |
| | | AlarmRecordDetail alarmRecordDetail1 = new AlarmRecordDetail(); |
| | | // 短信内容拼接(完成发送的结果信息) |
| | | alarmRecordDetail1.setAlarmContent(formatContent); |
| | | alarmRecordDetail1.setSendRecordId(smsRecord.getId()); |
| | | alarmRecordDetail1.setCreateTime(new Date()); |
| | | alarmRecordDetail1.setReservoirNumber(alarmRecordDetailVO.getReservoirNumber()); |
| | | alarmRecordDetail1.setAlarmRecordId(alarmRecordDetailVO.getAlarmRecordId()); |
| | | alarmRecordDetail1.setAlarmMode(alarmRecordDetailVO.getAlarmMode()); |
| | | alarmRecordDetail1.setPhone(alarmRecordDetailVO.getPhone()); |
| | | alarmRecordDetailArrayList.add(alarmRecordDetail1); |
| | | } |
| | | // 保存告警记录详情信息 |
| | | boolean save = alarmRecordDetailService.saveBatch(alarmRecordDetailArrayList); |
| | | } |
| | | |
| | | /** |
| | | * 批量发送短信(集合数据) |
| | | * @param map (保护参数 1:短信模板id 2:数据集合 list<Map<String,Object>>) |
| New file |
| | |
| | | #服务器端口 |
| | | server: |
| | | port: 8111 |
| | | |
| | | #数据源配置 |
| | | #spring: |
| | | # datasource: |
| | | # url: ${blade.datasource.test.url} |
| | | # username: ${blade.datasource.test.username} |
| | | # password: ${blade.datasource.test.password} |
| | | |
| | | #多数据源配置 |
| | | spring: |
| | | #排除DruidDataSourceAutoConfigure |
| | | autoconfigure: |
| | | exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
| | | datasource: |
| | | dynamic: |
| | | #设置默认的数据源或者数据源组,默认值即为master |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: ${blade.datasource.test.url} |
| | | username: ${blade.datasource.test.username} |
| | | password: ${blade.datasource.test.password} |
| | | zt: |
| | | url: ${blade.datasource.test.zt.url} |
| | | username: ${blade.datasource.test.zt.username} |
| | | password: ${blade.datasource.test.zt.password} |
| | | # 智能外呼数据库 |
| | | ztznwh: |
| | | url: ${blade.datasource.test.ztznwh.url} |
| | | username: ${blade.datasource.test.ztznwh.username} |
| | | password: ${blade.datasource.test.ztznwh.password} |
| | | ## 定时器数据源 |
| | | xxljob: |
| | | url: ${blade.datasource.test.xxljob.url} |
| | | username: ${blade.datasource.test.xxljob.username} |
| | | password: ${blade.datasource.test.xxljob.password} |
| | | ## 智能外呼数据源(mysql) |
| | | znwh: |
| | | driver-class-name: ${blade.datasource.test.znwh.driver-class-name} |
| | | url: ${blade.datasource.test.znwh.url} |
| | | username: ${blade.datasource.test.znwh.username} |
| | | password: ${blade.datasource.test.znwh.password} |
| | | main: |
| | | allow-circular-references: true |
| | | getui: |
| | | appId: "zyUET0RTBHAzLyMhV7dY32" |
| | | appKey: "wuY8226sbu66P6tF9T0Fj5" |
| | | appSecret: "IN3UEIeUccAiYgcBTLcK3A" |
| | | masterSecret: "vlhKpASV66AJEfWnCgFsB2" |
| | | # Url前缀 |
| | | baseUrl: "https://restapi.getui.com/v2/" |
| New file |
| | |
| | | #服务器端口 |
| | | server: |
| | | port: 8115 |
| | | |
| | | #数据源配置 |
| | | #spring: |
| | | # datasource: |
| | | # url: ${blade.datasource.test.url} |
| | | # username: ${blade.datasource.test.username} |
| | | # password: ${blade.datasource.test.password} |
| | | |
| | | #多数据源配置 |
| | | spring: |
| | | rabbitmq: |
| | | host: 10.42.7.146 |
| | | port: 5672 |
| | | username: algo |
| | | password: P6#yzdd7 |
| | | virtual-host: / |
| | | #排除DruidDataSourceAutoConfigure |
| | | autoconfigure: |
| | | exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
| | | datasource: |
| | | dynamic: |
| | | #设置默认的数据源或者数据源组,默认值即为master |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: ${blade.datasource.test.url} |
| | | username: ${blade.datasource.test.username} |
| | | password: ${blade.datasource.test.password} |
| | | zt: |
| | | url: ${blade.datasource.test.zt.url} |
| | | username: ${blade.datasource.test.zt.username} |
| | | password: ${blade.datasource.test.zt.password} |
| | | |
| | | main: |
| | | allow-circular-references: true |
| | | |
| New file |
| | |
| | | #服务器端口 |
| | | server: |
| | | port: 8120 |
| | | |
| | | #数据源配置 |
| | | #spring: |
| | | # datasource: |
| | | # url: ${blade.datasource.test.url} |
| | | # username: ${blade.datasource.test.username} |
| | | # password: ${blade.datasource.test.password} |
| | | |
| | | #多数据源配置 |
| | | spring: |
| | | #排除DruidDataSourceAutoConfigure |
| | | autoconfigure: |
| | | exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
| | | datasource: |
| | | dynamic: |
| | | #设置默认的数据源或者数据源组,默认值即为master |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: ${blade.datasource.test.url} |
| | | username: ${blade.datasource.test.username} |
| | | password: ${blade.datasource.test.password} |
| | | zt: |
| | | url: ${blade.datasource.test.zt.url} |
| | | username: ${blade.datasource.test.zt.username} |
| | | password: ${blade.datasource.test.zt.password} |
| | | |
| | | main: |
| | | allow-circular-references: true |
| | | |
| | | yunPwd: |
| | | config: |
| | | url-prefix: http://10.10.1.1 |
| | |
| | | private Date waterStorageTm; |
| | | |
| | | /** |
| | | * 最终填报状态(总状态)(0:填写中,1:审核中,2:审核通过) |
| | | * 最终填报状态(总状态)(-1:未填写 0:填写中,1:审核通过) |
| | | */ |
| | | @ApiModelProperty(value = "填报状态(0:填写中,1:审核中,2:审核通过) ") |
| | | @TableField("\"check_state\"") |
| | | @ApiModelProperty(value = "填报状态(-1:未填写 0:填写中,1:审核通过) ") |
| | | @TableField("\"final_state\"") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Integer finalState; |
| | | |
| | |
| | | private String isRsvr; |
| | | |
| | | /** |
| | | * 是否有大坝安全监测水平位移 |
| | | * 是否有大坝安全监测位移 |
| | | */ |
| | | @ApiModelProperty(value = "是否有大坝安全监测水平位移") |
| | | @ApiModelProperty(value = "是否有大坝安全监测位移") |
| | | @TableField("\"is_gnss_horizontal\"") |
| | | private String isGnssHorizontal; |
| | | |
| | | /** |
| | | * 是否有大坝安全监测垂直位移 |
| | | */ |
| | | @ApiModelProperty(value = "是否有大坝安全监测垂直位移") |
| | | @TableField("\"is_gnss_vertical\"") |
| | | private String isGnssVertical; |
| | | // |
| | | // /** |
| | | // * 是否有大坝安全监测垂直位移 |
| | | // */ |
| | | // @ApiModelProperty(value = "是否有大坝安全监测垂直位移") |
| | | // @TableField("\"is_gnss_vertical\"") |
| | | // private String isGnssVertical; |
| | | |
| | | /** |
| | | * 是否有大坝安全监测渗透压力 |
| | |
| | | private String isTermites; |
| | | |
| | | /** |
| | | * 填报状态(0:填写中,1:审核中,2:审核通过) |
| | | * 填报状态(0:未完成 2:已完成) |
| | | */ |
| | | @ApiModelProperty(value = "填报状态(0:填写中,1:审核中,2:审核通过) ") |
| | | @ApiModelProperty(value = "填报状态(0:未完成 2:已完成) ") |
| | | @TableField("\"check_state\"") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Integer checkState; |
| | | |
| | | /** |
| | | * 审核记录 |
| | | */ |
| | | @ApiModelProperty(value = "审核记录 ") |
| | | @TableField("\"check_log\"") |
| | | private String checkLog; |
| | | // |
| | | // /** |
| | | // * 审核记录 |
| | | // */ |
| | | // @ApiModelProperty(value = "审核记录 ") |
| | | // @TableField("\"check_log\"") |
| | | // private String checkLog; |
| | | |
| | | /** |
| | | * 创建时间 |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 操作记录 |
| | | */ |
| | | @ApiModelProperty(value = "操作记录 ") |
| | | @TableField("\"log\"") |
| | | private String log; |
| | | // |
| | | // /** |
| | | // * 操作记录 |
| | | // */ |
| | | // @ApiModelProperty(value = "操作记录 ") |
| | | // @TableField("\"log\"") |
| | | // private String log; |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "输水道型式") |
| | | @TableField("\"aqueduct_type\"") |
| | | private Integer aqueductType; |
| | | private String aqueductType; |
| | | |
| | | /** |
| | | * 输水道长度 |
| | |
| | | List<Map<String, Object>> getTbInfo(@Param("resGuid") String resGuid, |
| | | @Param("tableNameColumn") String tableNameColumn, |
| | | @Param("tableName") String tableName); |
| | | |
| | | /** |
| | | * 查询水库基本详情,水位特征,挡水,输水,泄洪建筑物,电站,水库效益,工程运用,管理体制,安全鉴定和除险加固,信息化建设,文件夹存储位置所有状态的一个总状态 |
| | | * 规则:1.一个未填写则标记总状态为未填写 2. 只要一个填写了就标记为已填写中 3.只有所有的都审核通过了才标记为完成 |
| | | * @param guid 水库guid |
| | | * @return |
| | | */ |
| | | @DS("zt") |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | Boolean getFinalCheckStateByGuid(@Param("guid")String guid); |
| | | } |
| | |
| | | |
| | | <!--查询水库其他填报数据--> |
| | | <select id="getTbInfo" resultType="java.util.Map"> |
| | | SELECT ${tableNameColumn} AS name,ifnull("check_state",-1) as value FROM ${tableName} WHERE "res_guid" = #{resGuid} |
| | | SELECT ${tableNameColumn} AS name,ifnull("check_state",-1) as value FROM ${tableName} WHERE "res_guid" = #{resGuid} limit 1 |
| | | </select> |
| | | |
| | | <!--查询水库基本详情,水位特征,挡水,输水,泄洪建筑物,电站,水库效益,工程运用,管理体制,安全鉴定和除险加固,信息化建设,文件夹存储位置所有状态的一个总状态--> |
| | | <select id="getFinalCheckStateByGuid" resultType="java.lang.Boolean"> |
| | | select if(sum(value)<28,false,true) from ( |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_base" WHERE "guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_eng_bene" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_infomation_project" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_mgr_sys_b" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_power_station" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_project_utilize" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_rsb_norspi" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_rsb_spillway" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_rsb_verspi" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_safety_monitor" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_stag_char" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_water_block" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_att_res_water_delivery" WHERE "res_guid" = #{guid} limit 1 )union all |
| | | (SELECT ifnull(sum("check_state"),-1) as value FROM "tb_file_storage_location" WHERE "res_guid" = #{guid} limit 1) |
| | | ) a |
| | | </select> |
| | | </mapper> |
| | |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getAllWaterFillInfoByResGuid(String resGuid); |
| | | |
| | | /** |
| | | * 更新水库信息填报最终状态 |
| | | * @param resGuid 水库编码 |
| | | * @param state 状态值 |
| | | */ |
| | | Boolean updateFinalState(String resGuid, int state); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResBase tbAttResBase) { |
| | | // 设置填报数据表的最终填报状态 |
| | | if (tbAttResBase.getCheckState()!=4) { |
| | | tbAttResBase.setFinalState(0); |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResBase detail = baseMapper.getDetailByGuid(tbAttResBase.getGuid()); |
| | | // 更新审核日志 |
| | |
| | | // 驳回情况下将状态修改回0即已填写未提交状态 |
| | | if (tbAttResBase.getCheckState()==3){ |
| | | tbAttResBase.setCheckState(0); |
| | | // 只要一个退回则设置为填写中... |
| | | tbAttResBase.setFinalState(0); |
| | | } |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResBase); |
| | | if (i>0){ |
| | | // 如果是审核通过需要判断其他报表是否都已填报并审核通过 |
| | | if (tbAttResBase.getCheckState()==2){ |
| | | Boolean flag = baseMapper.getFinalCheckStateByGuid(tbAttResBase.getGuid()); |
| | | if (flag){ |
| | | TbAttResBase tbAttResBase1 = new TbAttResBase(); |
| | | tbAttResBase1.setFinalState(1); |
| | | tbAttResBase1.setGuid(tbAttResBase.getGuid()); |
| | | updateById(tbAttResBase1); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | // 查询水库基础填报数据 |
| | | CompletableFuture<List<Map<String,Object>>> tbAttResBaseInfo = getTbAttResBaseInfo("tb_att_res_base",resGuid, executor); |
| | | // 查询水库其他填报数据 |
| | | CompletableFuture<List<Map<String,Object>>> tbAttResBuildInfo = getTbInfo("tb_att_res_build_info",resGuid,executor); |
| | | // CompletableFuture<List<Map<String,Object>>> tbAttResBuildInfo = getTbInfo("tb_att_res_build_info",resGuid,executor); |
| | | CompletableFuture<List<Map<String,Object>>> tbAttResEngBene = getTbInfo("tb_att_res_eng_bene",resGuid,executor); |
| | | CompletableFuture<List<Map<String,Object>>> tbAttResInfomationProject = getTbInfo("tb_att_res_infomation_project",resGuid,executor); |
| | | CompletableFuture<List<Map<String,Object>>> tbAttResMgrSysB = getTbInfo("tb_att_res_mgr_sys_b",resGuid,executor); |
| | |
| | | CompletableFuture<List<Map<String,Object>>> tbAttResStagChar = getTbInfo("tb_att_res_stag_char",resGuid,executor); |
| | | CompletableFuture<List<Map<String,Object>>> tbAttResWaterBlock = getTbInfo("tb_att_res_water_block",resGuid,executor); |
| | | CompletableFuture<List<Map<String,Object>>> tbAttResWaterDelivery = getTbInfo("tb_att_res_water_delivery",resGuid,executor); |
| | | CompletableFuture<List<Map<String,Object>>> tbFileStorageLocation = getTbInfo("tb_file_storage_location",resGuid,executor); |
| | | //等待所有任务执行完成 |
| | | try { |
| | | CompletableFuture.allOf( |
| | | tbAttResBaseInfo, |
| | | tbAttResBuildInfo, |
| | | tbFileStorageLocation, |
| | | tbAttResEngBene, |
| | | tbAttResInfomationProject, |
| | | tbAttResMgrSysB, |
| | |
| | | tbAttResWaterDelivery).get(); |
| | | // 数据处理 |
| | | list.addAll(tbAttResBaseInfo.get()); |
| | | list.addAll(tbAttResBuildInfo.get()); |
| | | list.addAll(tbAttResEngBene.get()); |
| | | list.addAll(tbAttResInfomationProject.get()); |
| | | list.addAll(tbAttResMgrSysB.get()); |
| | |
| | | list.addAll(tbAttResStagChar.get()); |
| | | list.addAll(tbAttResWaterBlock.get()); |
| | | list.addAll(tbAttResWaterDelivery.get()); |
| | | list.addAll(tbFileStorageLocation.get()); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } catch (ExecutionException e) { |
| | |
| | | return tbInfo; |
| | | },executor); |
| | | } |
| | | |
| | | /** |
| | | * 更新水库信息填报最终状态 |
| | | * @param resGuid 水库编码 |
| | | * @param state 状态值 |
| | | */ |
| | | @Override |
| | | public Boolean updateFinalState(String resGuid, int state) { |
| | | TbAttResBase tbAttResBase = new TbAttResBase(); |
| | | tbAttResBase.setGuid(resGuid); |
| | | if (state==2){ |
| | | // 审核通过,判断是否已全部通过审核 |
| | | Boolean flag = baseMapper.getFinalCheckStateByGuid(resGuid); |
| | | if (flag){ |
| | | tbAttResBase.setFinalState(1); |
| | | }else { |
| | | tbAttResBase.setFinalState(0); |
| | | } |
| | | }else { |
| | | tbAttResBase.setFinalState(0); |
| | | } |
| | | //更新 |
| | | return updateById(tbAttResBase); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResBuildInfo; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResBuildInfoMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBuildInfoService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResBuildInfo); |
| | | if (i>0){ |
| | | tbAttResBaseService.updateFinalState(tbAttResBuildInfo.getResGuid(),0); |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResBuildInfo tbAttResBuildInfo) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResBuildInfo.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResBuildInfo detail = baseMapper.getDetailByResGuid(tbAttResBuildInfo.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResBuildInfo); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResBuildInfo.getResGuid(),tbAttResBuildInfo.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResEngBene; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResEngBeneMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResEngBeneService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResEngBene tbAttResEngBene) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResEngBene.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResEngBene detail = baseMapper.getDetailByResGuid(tbAttResEngBene.getResGuid()); |
| | | // 更新日志 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResEngBene); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResEngBene.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResEngBene tbAttResEngBene) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResEngBene.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResEngBene detail = baseMapper.getDetailByResGuid(tbAttResEngBene.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResEngBene); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResEngBene.getResGuid(), tbAttResEngBene.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResInformationProject.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResInformationProject.getCheckLog()?"":":" + newTbAttResInformationProject.getCheckLog()); |
| | | // fillName = "退回" + (null==newTbAttResInformationProject.getCheckLog()?"":":" + newTbAttResInformationProject.getCheckLog()); |
| | | } |
| | | |
| | | // 拼接 |
| | |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResInformationProject.setCheckLog(builder.toString()); |
| | | // newTbAttResInformationProject.setCheckLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | stringBuilder.append(builder); |
| | | // StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog()); |
| | | // stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResInformationProject.setCheckLog(stringBuilder.toString()); |
| | | // newTbAttResInformationProject.setCheckLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | |
| | | fillName = "审核"; |
| | | } |
| | | if (newTbAttResInformationProject.getCheckState()==3){ |
| | | fillName = "退回" + (null==newTbAttResInformationProject.getCheckLog()?"":":" + newTbAttResInformationProject.getCheckLog()); |
| | | // fillName = "退回" + (null==newTbAttResInformationProject.getCheckLog()?"":":" + newTbAttResInformationProject.getCheckLog()); |
| | | } |
| | | // 管理员编辑 |
| | | if (newTbAttResInformationProject.getCheckState()==4){ |
| | |
| | | // 判断是否存在 |
| | | if (null==oldAbAttResBase){ |
| | | // 填报 |
| | | newTbAttResInformationProject.setLog(builder.toString()); |
| | | // newTbAttResInformationProject.setLog(builder.toString()); |
| | | }else { |
| | | StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | stringBuilder.append(builder); |
| | | // StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog()); |
| | | // stringBuilder.append(builder); |
| | | // 填报 |
| | | newTbAttResInformationProject.setLog(stringBuilder.toString()); |
| | | // newTbAttResInformationProject.setLog(stringBuilder.toString()); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResMgrSysB; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResMgrSysBMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResMgrSysBService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResMgrSysB tbAttResMgrSysB) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResMgrSysB.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResMgrSysB detail = baseMapper.getDetailByResGuid(tbAttResMgrSysB.getResGuid()); |
| | | // 更新日志 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResMgrSysB); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResMgrSysB.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResMgrSysB tbAttResMgrSysB) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResMgrSysB.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResMgrSysB detail = baseMapper.getDetailByResGuid(tbAttResMgrSysB.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResMgrSysB); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResMgrSysB.getResGuid(), tbAttResMgrSysB.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | import cn.gistack.sm.intelligentCall.entity.Scene; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResPowerStation; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResPowerStationMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResPowerStationService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(List<TbAttResPowerStation> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResPowerStation> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(oldList,newList); |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return flag; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | boolean updateFlag = true; |
| | | boolean removeFlag = true; |
| | | if (addList.size()>0){ |
| | | //如果是中途管理员编辑新增了一个,将状态设置为和原有的状态一致 |
| | | // 批量新增 |
| | | addFlag = saveBatch(addList); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(List<TbAttResPowerStation> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResPowerStation> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | setUpdateCheckLog(oldList,newList); |
| | | // 更新数据 |
| | | boolean batch = updateBatchById(newList); |
| | | if (batch){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), newList.get(0).getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return batch; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | if (newTbAttResPowerStation.getCheckState()==4){ |
| | | fillName = "编辑"; |
| | | // 找到相关的 guid 数据 |
| | | for (TbAttResPowerStation tbAttResPowerStation : oldList) { |
| | | if (tbAttResPowerStation.getGuid().equals(newTbAttResPowerStation.getGuid())){ |
| | | newTbAttResPowerStation.setCheckState(tbAttResPowerStation.getCheckState()); |
| | | } |
| | | if (oldList.size()>0) { |
| | | newTbAttResPowerStation.setCheckState(oldList.get(0).getCheckState()); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResProjectUtilize; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResProjectUtilizeMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResProjectUtilizeService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResProjectUtilize tbAttResProjectUtilize) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResProjectUtilize.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResProjectUtilize detail = baseMapper.getDetailByResGuid(tbAttResProjectUtilize.getResGuid()); |
| | | // 更新日志 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResProjectUtilize); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResProjectUtilize.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResProjectUtilize tbAttResProjectUtilize) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResProjectUtilize.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResProjectUtilize detail = baseMapper.getDetailByResGuid(tbAttResProjectUtilize.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResProjectUtilize); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResProjectUtilize.getResGuid(), tbAttResProjectUtilize.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbNorspiMapper; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbVerspiMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbNorspiService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbSpillwayService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbVerspiService; |
| | |
| | | @Autowired |
| | | private ITbAttResRsbSpillwayService tbAttResRsbSpillwayService; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(List<TbAttResRsbNorspi> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | String resGuid = newList.get(0).getResGuid(); |
| | | // 查询是否存在 |
| | | List<TbAttResRsbNorspi> oldList = baseMapper.getDetailByResGuid(resGuid); |
| | |
| | | setUpdateLog(oldList,newList); |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return flag; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(List<TbAttResRsbNorspi> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResRsbNorspi> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | setUpdateCheckLog(oldList,newList); |
| | | // 更新数据 |
| | | boolean batch = updateBatchById(newList); |
| | | if (batch){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), newList.get(0).getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return batch; |
| | | } |
| | |
| | | if (newTbAttResRsbNorspi.getCheckState()==4){ |
| | | fillName = "编辑"; |
| | | // 找到相关的 guid 数据 |
| | | for (TbAttResRsbNorspi tbAttResRsbNorspi : oldList) { |
| | | if (tbAttResRsbNorspi.getGuid().equals(newTbAttResRsbNorspi.getGuid())){ |
| | | newTbAttResRsbNorspi.setCheckState(tbAttResRsbNorspi.getCheckState()); |
| | | } |
| | | if (oldList.size()>0) { |
| | | newTbAttResRsbNorspi.setCheckState(oldList.get(0).getCheckState()); |
| | | } |
| | | } |
| | | |
| | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbSpillway; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbSpillway; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbSpillwayMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbSpillwayService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(List<TbAttResRsbSpillway> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResRsbSpillway> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(oldList,newList); |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return flag; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(List<TbAttResRsbSpillway> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResRsbSpillway> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | setUpdateCheckLog(oldList,newList); |
| | | // 更新数据 |
| | | boolean batch = updateBatchById(newList); |
| | | // 返回 |
| | | return batch; |
| | | if (batch){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), newList.get(0).getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | if (newTbAttResRsbSpillway.getCheckState()==4){ |
| | | fillName = "编辑"; |
| | | // 找到相关的 guid 数据 |
| | | for (TbAttResRsbSpillway tbAttResRsbSpillway : oldList) { |
| | | if (tbAttResRsbSpillway.getGuid().equals(newTbAttResRsbSpillway.getGuid())){ |
| | | newTbAttResRsbSpillway.setCheckState(tbAttResRsbSpillway.getCheckState()); |
| | | } |
| | | if (oldList.size()>0){ |
| | | newTbAttResRsbSpillway.setCheckState(oldList.get(0).getCheckState()); |
| | | } |
| | | } |
| | | |
| | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResRsbVerspi; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResRsbVerspiMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResRsbVerspiService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(List<TbAttResRsbVerspi> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResRsbVerspi> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(oldList,newList); |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return flag; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(List<TbAttResRsbVerspi> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResRsbVerspi> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | setUpdateCheckLog(oldList,newList); |
| | | // 更新数据 |
| | | boolean batch = updateBatchById(newList); |
| | | if (batch){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), newList.get(0).getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return batch; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | if (newTbAttResRsbVerspi.getCheckState()==4){ |
| | | fillName = "编辑"; |
| | | // 找到相关的 guid 数据 |
| | | for (TbAttResRsbVerspi tbAttResRsbVerspi : oldList) { |
| | | if (tbAttResRsbVerspi.getGuid().equals(newTbAttResRsbVerspi.getGuid())){ |
| | | newTbAttResRsbVerspi.setCheckState(tbAttResRsbVerspi.getCheckState()); |
| | | } |
| | | if (oldList.size()>0){ |
| | | newTbAttResRsbVerspi.setCheckState(oldList.get(0).getCheckState()); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResSafetyMonitor; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResSafetyMonitorMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResSafetyMonitorService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResSafetyMonitor tbAttResSafetyMonitor) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResSafetyMonitor.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResSafetyMonitor detail = baseMapper.getDetailByResGuid(tbAttResSafetyMonitor.getResGuid()); |
| | | // 更新日志 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResSafetyMonitor); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResSafetyMonitor.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResSafetyMonitor tbAttResSafetyMonitor) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResSafetyMonitor.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResSafetyMonitor detail = baseMapper.getDetailByResGuid(tbAttResSafetyMonitor.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResSafetyMonitor); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResSafetyMonitor.getResGuid(), tbAttResSafetyMonitor.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResStagChar; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResStagCharMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResStagCharService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbAttResStagChar tbAttResStagChar) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResStagChar.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResStagChar detail = baseMapper.getDetailByResGuid(tbAttResStagChar.getResGuid()); |
| | | // 更新日志 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbAttResStagChar); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbAttResStagChar tbAttResStagChar) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbAttResStagChar.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbAttResStagChar detail = baseMapper.getDetailByResGuid(tbAttResStagChar.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbAttResStagChar); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(), tbAttResStagChar.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterBlock; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterBlock; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResWaterBlockMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResWaterBlockService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(List<TbAttResWaterBlock> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResWaterBlock> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(oldList,newList); |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return flag; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(List<TbAttResWaterBlock> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResWaterBlock> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | setUpdateCheckLog(oldList,newList); |
| | | // 更新数据 |
| | | boolean batch = updateBatchById(newList); |
| | | if (batch){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), newList.get(0).getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return batch; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | if (newTbAttResWaterBlock.getCheckState()==4){ |
| | | fillName = "编辑"; |
| | | // 找到相关的 guid 数据 |
| | | for (TbAttResWaterBlock tbAttResWaterBlock : oldList) { |
| | | if (tbAttResWaterBlock.getGuid().equals(newTbAttResWaterBlock.getGuid())){ |
| | | newTbAttResWaterBlock.setCheckState(tbAttResWaterBlock.getCheckState()); |
| | | } |
| | | if (oldList.size()>0){ |
| | | newTbAttResWaterBlock.setCheckState(oldList.get(0).getCheckState()); |
| | | } |
| | | } |
| | | |
| | |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterDelivery; |
| | | import cn.gistack.sm.sjztmd.entity.TbAttResWaterDelivery; |
| | | import cn.gistack.sm.sjztmd.mapper.TbAttResWaterDeliveryMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResWaterDeliveryService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(List<TbAttResWaterDelivery> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResWaterDelivery> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新日志 |
| | | setUpdateLog(oldList,newList); |
| | | // 创建或更新数据 |
| | | boolean flag = addOrUpdate(oldList,newList); |
| | | if (flag){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return flag; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(List<TbAttResWaterDelivery> newList) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (newList.get(0).getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | List<TbAttResWaterDelivery> oldList = baseMapper.getDetailByResGuid(newList.get(0).getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | setUpdateCheckLog(oldList,newList); |
| | | // 更新数据 |
| | | boolean batch = updateBatchById(newList); |
| | | if (batch){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(newList.get(0).getResGuid(), newList.get(0).getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | // 返回 |
| | | return batch; |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | if (newTbAttResWaterDelivery.getCheckState()==4){ |
| | | fillName = "编辑"; |
| | | // 找到相关的 guid 数据 |
| | | for (TbAttResWaterDelivery tbAttResWaterDelivery : oldList) { |
| | | if (tbAttResWaterDelivery.getGuid().equals(newTbAttResWaterDelivery.getGuid())){ |
| | | newTbAttResWaterDelivery.setCheckState(tbAttResWaterDelivery.getCheckState()); |
| | | } |
| | | if (oldList.size()>0) { |
| | | newTbAttResWaterDelivery.setCheckState(oldList.get(0).getCheckState()); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.TbFileStorageLocation; |
| | | import cn.gistack.sm.sjztmd.mapper.TbFileStorageLocationMapper; |
| | | import cn.gistack.sm.sjztmd.service.ITbAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.ITbFileStorageLocationService; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private ITbAttResBaseService tbAttResBaseService; |
| | | |
| | | /** |
| | | * 查询水库填报详情信息 |
| | | * @param guid |
| | |
| | | */ |
| | | @Override |
| | | public boolean updateByGuid(TbFileStorageLocation tbFileStorageLocation) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbFileStorageLocation.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbFileStorageLocation detail = baseMapper.getDetailByResGuid(tbFileStorageLocation.getResGuid()); |
| | | // 更新日志 |
| | |
| | | // 修改 |
| | | int i = addOrUpdateByGuid(detail,tbFileStorageLocation); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbFileStorageLocation.getResGuid(), 0); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | */ |
| | | @Override |
| | | public boolean auditByGuid(TbFileStorageLocation tbFileStorageLocation) { |
| | | boolean edit = false; |
| | | // 编辑标记 |
| | | if (tbFileStorageLocation.getCheckState()==4){ |
| | | edit = true; |
| | | } |
| | | // 查询是否存在 |
| | | TbFileStorageLocation detail = baseMapper.getDetailByResGuid(tbFileStorageLocation.getResGuid()); |
| | | // 更新操作日志 |
| | |
| | | // 更新数据 |
| | | int i = baseMapper.updateById(tbFileStorageLocation); |
| | | if (i>0){ |
| | | if (!edit) { |
| | | tbAttResBaseService.updateFinalState(tbFileStorageLocation.getResGuid(), tbFileStorageLocation.getCheckState()); |
| | | } |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | password: ${blade.datasource.prod.znwh.password} |
| | | main: |
| | | allow-circular-references: true |
| | | #xxl: |
| | | # job: |
| | | # accessToken: '' |
| | | # admin: |
| | | # ### 调度中心部署根地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册; |
| | | # addresses: http://127.0.0.1:7009/xxl-job-admin |
| | | # executor: |
| | | # ### 执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册 |
| | | # appname: blade-xxljob |
| | | # ### 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务"; |
| | | # ip: 127.0.0.1 |
| | | # ### 执行器运行日志文件存储磁盘路径 [选填] :需要对该路径拥有读写权限;为空则使用默认路径; |
| | | # logpath: ../data/applogs/xxl-job/jobhandler |
| | | # ### 执行器日志文件保存天数 [选填] : 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能; |
| | | # logretentiondays: -1 |
| | | # ### 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口; |
| | | # port: 7018 |
| New file |
| | |
| | | #服务器端口 |
| | | server: |
| | | port: 8110 |
| | | |
| | | #数据源配置 |
| | | #spring: |
| | | # datasource: |
| | | # url: ${blade.datasource.test.url} |
| | | # username: ${blade.datasource.test.username} |
| | | # password: ${blade.datasource.test.password} |
| | | |
| | | #多数据源配置 |
| | | spring: |
| | | #排除DruidDataSourceAutoConfigure |
| | | autoconfigure: |
| | | exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
| | | datasource: |
| | | dynamic: |
| | | #设置默认的数据源或者数据源组,默认值即为master |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: ${blade.datasource.test.url} |
| | | username: ${blade.datasource.test.username} |
| | | password: ${blade.datasource.test.password} |
| | | zt: |
| | | url: ${blade.datasource.test.zt.url} |
| | | username: ${blade.datasource.test.zt.username} |
| | | password: ${blade.datasource.test.zt.password} |
| | | # 智能外呼数据库 |
| | | ztznwh: |
| | | url: ${blade.datasource.test.ztznwh.url} |
| | | username: ${blade.datasource.test.ztznwh.username} |
| | | password: ${blade.datasource.test.ztznwh.password} |
| | | ## 定时器数据源 |
| | | xxljob: |
| | | url: ${blade.datasource.test.xxljob.url} |
| | | username: ${blade.datasource.test.xxljob.username} |
| | | password: ${blade.datasource.test.xxljob.password} |
| | | ## 智能外呼数据源(mysql) |
| | | znwh: |
| | | driver-class-name: ${blade.datasource.test.znwh.driver-class-name} |
| | | url: ${blade.datasource.test.znwh.url} |
| | | username: ${blade.datasource.test.znwh.username} |
| | | password: ${blade.datasource.test.znwh.password} |
| | | main: |
| | | allow-circular-references: true |
| | |
| | | userService.save(saveUser); |
| | | } |
| | | } else { |
| | | //在,看status状态,若为1则删除用户。0更新? |
| | | if (accountBean.getStatus().equals("1")) { |
| | | userService.removeUser(accountBean.getPrincipalId()); |
| | | } else { //更新 |
| | | //在,看status状态,若为1则删除用户。0更新? 先不删除 |
| | | // if (accountBean.getStatus().equals("1")) { |
| | | // userService.removeUser(accountBean.getPrincipalId()); |
| | | // } else { //更新 |
| | | //设置姓名 |
| | | one.setRealName(accountBean.getAttributes().get("realName")); |
| | | one.setName(accountBean.getAttributes().get("realName")); |
| | | userService.updateUser(one); |
| | | } |
| | | // } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | #多数据源配置 |
| | | spring: |
| | | #排除DruidDataSourceAutoConfigure |
| | | autoconfigure: |
| | | exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
| | | datasource: |
| | | dynamic: |
| | | #设置默认的数据源或者数据源组,默认值即为master |
| | | primary: master |
| | | datasource: |
| | | master: |
| | | url: ${blade.datasource.test.url} |
| | | username: ${blade.datasource.test.username} |
| | | password: ${blade.datasource.test.password} |
| | | zt: |
| | | url: ${blade.datasource.test.zt.url} |
| | | username: ${blade.datasource.test.zt.username} |
| | | password: ${blade.datasource.test.zt.password} |
| | | # 智能外呼数据库 |
| | | ztznwh: |
| | | url: ${blade.datasource.test.ztznwh.url} |
| | | username: ${blade.datasource.test.ztznwh.username} |
| | | password: ${blade.datasource.test.ztznwh.password} |
| | | ## 定时器数据源 |
| | | xxljob: |
| | | url: ${blade.datasource.test.xxljob.url} |
| | | username: ${blade.datasource.test.xxljob.username} |
| | | password: ${blade.datasource.test.xxljob.password} |
| | | main: |
| | | allow-circular-references: true |
| | | |
| | | xxl: |
| | | job: |
| | | accessToken: '' |
| | | admin: |
| | | addresses: ${xxl.job.test.addresses} |
| | | executor: |
| | | appname: blade-xxljob |
| | | ip: ${xxl.job.test.ip} |
| | | logpath: ${xxl.job.test.logpath} |
| | | logretentiondays: -1 |
| | | port: ${xxl.job.test.port} |