| | |
| | | BeanUtils.copyProperties(checkTemplate, checkTemplateQuery); |
| | | List<Integer> deptIds = JSONArray.parseArray(checkTemplate.getDeptId(), Integer.class); |
| | | checkTemplateQuery.setDeptId(deptIds) |
| | | .setAdjustCoefficient(checkTemplate.getAdjustCoefficient()+"") |
| | | .setAlarmScore(checkTemplate.getAlarmScore()+""); |
| | | //查询规则权重 |
| | | List<CheckTemplateRule> templateRuleList = checkTemplateRuleMapper.selectListByTemplateId(checkTemplate.getId()); |
| | |
| | | List<Integer> deptIds = JSONArray.parseArray(template.getDeptId(), Integer.class); |
| | | CheckTemplateQuery checkTemplateQuery = new CheckTemplateQuery(); |
| | | BeanUtils.copyProperties(template, checkTemplateQuery); |
| | | checkTemplateQuery.setDeptId(deptIds); |
| | | checkTemplateQuery.setDeptId(deptIds) |
| | | .setAdjustCoefficient(template.getAdjustCoefficient()+""); |
| | | checkTemplateList.add(checkTemplateQuery); |
| | | } |
| | | |
| | |
| | | checkTemplate.setDeptId(JSONArray.toJSONString(deptId)) |
| | | .setUpdateUserName(username) |
| | | .setCreateUserName(username) |
| | | .setAdjustCoefficient(new BigDecimal(checkTemplateDTO.getAdjustCoefficient()+"")) |
| | | //不填报警分数---->零分---->不报警 |
| | | .setAlarmScore(new BigDecimal(checkTemplateDTO.getAlarmScore() == null? "":checkTemplateDTO.getAlarmScore())); |
| | | int i = checkTemplateMapper.insertCheckTemplate(checkTemplate); |
| | |
| | | checkTemplate.setUpdateUserName(SecurityUtils.getUsername()); |
| | | List<Integer> deptId = checkTemplateDTO.getDeptId(); |
| | | Collections.sort(deptId); |
| | | checkTemplate.setDeptId(JSONArray.toJSONString(deptId)); |
| | | checkTemplate.setDeptId(JSONArray.toJSONString(deptId)) |
| | | .setAdjustCoefficient(new BigDecimal(checkTemplateDTO.getAdjustCoefficient()+"")); |
| | | int i = checkTemplateMapper.updateCheckTemplate(checkTemplate); |
| | | /** t_template_rule修改权重 */ |
| | | //先删除原数据 |