|
@@ -326,11 +326,11 @@ public class TargetManagementService {
|
|
|
ReportBaseInfo reportMom = dao.selectReportBaseInfoByCalcId(dto.getMomId());
|
|
|
|
|
|
if(null == reportChild && null == reportMom){
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, dto.getName() + "计算-分子或分母指标都不存在,请联系管理员!");
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "【" + dto.getName() + "】计算-分子和分母指标都不存在,请指定!");
|
|
|
}
|
|
|
|
|
|
if(null == dto.getStartTime() || null == dto.getEndTime()){
|
|
|
- return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, dto.getName() + "查询时间不存在,请检查!");
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "【" + dto.getName() + "】查询时间不存在,请检查!");
|
|
|
}
|
|
|
|
|
|
// 处理时间(1.时间跨度需要一年一年查询结果; 2.查询时间格式为年月日时分秒: yyyy-MM-DD 24H:mm:ss)
|
|
@@ -977,7 +977,7 @@ public class TargetManagementService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @Description 更新指标周期得分
|
|
|
+ * @Description 更新指标周期得分-自评分
|
|
|
* @Author hsh
|
|
|
* @param score 指标周期得分详情
|
|
|
* @return map
|
|
@@ -994,14 +994,83 @@ public class TargetManagementService {
|
|
|
UserInfo user = redis.getUserInfoByCode(TokenUtil.getInstance().getTokenUserId());
|
|
|
score.setAuthorId(user.getCode().trim());
|
|
|
score.setAuthorName(user.getName().trim());
|
|
|
+ score.setFlag("1");
|
|
|
int num;
|
|
|
if(null != s){
|
|
|
+ if("2".equals(s.getFlag())){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "指标已经内审不能再次更新指标周期自评分,请确认!");
|
|
|
+ }
|
|
|
num = scoreDao.updateTargetReportScoreById(score);
|
|
|
} else {
|
|
|
num = scoreDao.insert(score);
|
|
|
}
|
|
|
if(num > 0){
|
|
|
- resultMap.put("cg", "更新指标周期得分成功!");
|
|
|
+ resultMap.put("cg", "更新指标周期自评分成功!");
|
|
|
+ }
|
|
|
+ return ResultVoUtil.success(resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description 更新指标周期得分-内审得分
|
|
|
+ * @Author hsh
|
|
|
+ * @param score 指标周期得分详情
|
|
|
+ * @return map
|
|
|
+ * @Date 2024/12/30 16:45
|
|
|
+ */
|
|
|
+ public ResultVo<Map<String, Object>> updateTargetReportScoreByShf(ZbReportCycleScore score){
|
|
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
+ String id = score.getId();
|
|
|
+ String reportCycle = score.getReportCycle();
|
|
|
+ if(StringUtil.isBlank(id) || StringUtil.isBlank(reportCycle)){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "指标id或年度周期信息不全,请检查!");
|
|
|
+ }
|
|
|
+ ZbReportCycleScore s = scoreDao.selectZbReportCycleScoreByReportCycle(id, reportCycle);
|
|
|
+ if(null == s){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "指标报表得分信息不存在,请检查!");
|
|
|
+ }
|
|
|
+ if("3".equals(s.getFlag())){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "指标报表退审后未进行自评分不能进行审核,请检查!");
|
|
|
+ }
|
|
|
+ if(!("1".equals(s.getFlag()) || "2".equals(s.getFlag()))){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "指标报表未进行自评分不能进行审核,请检查!");
|
|
|
+ }
|
|
|
+ UserInfo user = redis.getUserInfoByCode(TokenUtil.getInstance().getTokenUserId());
|
|
|
+ score.setMainId(user.getCode().trim());
|
|
|
+ score.setMainName(user.getName().trim());
|
|
|
+ int num = scoreDao.updateTargetReportScoreById(score);
|
|
|
+ if(num > 0){
|
|
|
+ resultMap.put("cg", "更新指标周期内审得分成功!");
|
|
|
+ }
|
|
|
+ return ResultVoUtil.success(resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Description 取消审核指标周期得分-内审得分
|
|
|
+ * @Author hsh
|
|
|
+ * @param score 指标周期得分详情
|
|
|
+ * @return map
|
|
|
+ * @Date 2024/12/30 16:45
|
|
|
+ */
|
|
|
+ public ResultVo<Map<String, Object>> returnTargetReportScoreByShf(ZbReportCycleScore score){
|
|
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
+ String id = score.getId();
|
|
|
+ String reportCycle = score.getReportCycle();
|
|
|
+ if(StringUtil.isBlank(id) || StringUtil.isBlank(reportCycle)){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "指标id或年度周期信息不全,请检查!");
|
|
|
+ }
|
|
|
+ ZbReportCycleScore s = scoreDao.selectZbReportCycleScoreByReportCycle(id, reportCycle);
|
|
|
+ if(null == s){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "指标报表得分信息不存在,请检查!");
|
|
|
+ }
|
|
|
+ if(!"2".equals(s.getFlag())){
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "指标报表未进行审核不能取消审核,请检查!");
|
|
|
+ }
|
|
|
+ UserInfo user = redis.getUserInfoByCode(TokenUtil.getInstance().getTokenUserId());
|
|
|
+ score.setMainId(user.getCode().trim());
|
|
|
+ score.setMainName(user.getName().trim());
|
|
|
+ int num = scoreDao.returnTargetReportScoreById(score);
|
|
|
+ if(num > 0){
|
|
|
+ resultMap.put("cg", "取消审核指标周期内审得分成功!");
|
|
|
}
|
|
|
return ResultVoUtil.success(resultMap);
|
|
|
}
|
|
@@ -1032,6 +1101,7 @@ public class TargetManagementService {
|
|
|
public ResultVo<Map<String, Object>> selectScoreCyclePermissions(){
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
String permissions = scoreDao.selectScoreCyclePermissions();
|
|
|
+ resultMap.put("qx", permissions);
|
|
|
if("N".equals(permissions)){
|
|
|
// 不做计算指标得分的权限限制
|
|
|
resultMap.put("permissions", 0);
|