|
@@ -5122,12 +5122,19 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
report.setWorkingTime(time);
|
|
report.setWorkingTime(time);
|
|
report.setMultiWorktime(timeType.getMultiWorktime());
|
|
report.setMultiWorktime(timeType.getMultiWorktime());
|
|
report.setFillUserid(user.getId());
|
|
report.setFillUserid(user.getId());
|
|
- if (timeType.getNeedDeptAudit() == 0) {
|
|
|
|
- report.setState(1);//导入的直接算审核通过
|
|
|
|
|
|
+ //赛元微电子,导入的按照项目审核的模式进行
|
|
|
|
+ if (company.getId() == 469) {
|
|
|
|
+ report.setState(0);//待审核员审核
|
|
} else {
|
|
} else {
|
|
- report.setState(-1);//待部门上级审核员审核
|
|
|
|
- report.setDepartmentAuditState(1);//部门已审核,到上层领导审核
|
|
|
|
|
|
+ if (timeType.getNeedDeptAudit() == 0) {
|
|
|
|
+ report.setState(1);//导入的直接算审核通过
|
|
|
|
+ } else {
|
|
|
|
+ //赛元微电子,导入的按照项目审核的模式进行
|
|
|
|
+ report.setState(-1);
|
|
|
|
+ report.setDepartmentAuditState(1);//部门已审核,到上层领导审核
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
report.setCreateDate(LocalDate.parse(reportDate, dtf));
|
|
report.setCreateDate(LocalDate.parse(reportDate, dtf));
|
|
report.setCost(reportCreator.getCost()==null?new BigDecimal(0) : reportCreator.getCost().multiply(new BigDecimal(time)));
|
|
report.setCost(reportCreator.getCost()==null?new BigDecimal(0) : reportCreator.getCost().multiply(new BigDecimal(time)));
|
|
reportList.add(report);
|
|
reportList.add(report);
|
|
@@ -5969,12 +5976,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
List<UserDailyWorkItem> noReportUserList = (List<UserDailyWorkItem>)noReportMsg.data;
|
|
List<UserDailyWorkItem> noReportUserList = (List<UserDailyWorkItem>)noReportMsg.data;
|
|
//追加到最后
|
|
//追加到最后
|
|
for (UserDailyWorkItem item : noReportUserList) {
|
|
for (UserDailyWorkItem item : noReportUserList) {
|
|
- HashMap mapItem = item.toHashMap();
|
|
|
|
- mapItem.put("duration", 0);
|
|
|
|
- mapItem.put("isOvertime", 0);
|
|
|
|
- mapItem.put("createDate", item.getCreateDate());
|
|
|
|
- mapItem.put("state", 99);
|
|
|
|
- allReportByDate.add(mapItem);
|
|
|
|
|
|
+ if (!"请假".equals(item.status)) {
|
|
|
|
+ HashMap mapItem = item.toHashMap();
|
|
|
|
+ mapItem.put("duration", 0);
|
|
|
|
+ mapItem.put("isOvertime", 0);
|
|
|
|
+ mapItem.put("createDate", item.getCreateDate());
|
|
|
|
+ mapItem.put("state", 99);
|
|
|
|
+ allReportByDate.add(mapItem);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
for (Map<String, Object> map : allReportByDate) {
|
|
for (Map<String, Object> map : allReportByDate) {
|
|
@@ -6358,23 +6367,56 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
//项目审核或分组审核
|
|
//项目审核或分组审核
|
|
- if (String.valueOf(map.get("projectAuditState")).equals("0") || String.valueOf(map.get("groupAuditState")).equals("0")) {
|
|
|
|
- String projectAuditorName = map.get("projectAuditorName") + "";
|
|
|
|
- String projectAuditorId = map.get("projectAuditorId") + "";
|
|
|
|
- if (needCorpWxTranslate||(dingding!=null&&dingding.getContactNeedTranslate()==1)) {
|
|
|
|
|
|
+ if (timeType.getReportAuditType() == 7) {
|
|
|
|
+ //项目和部门并行审核模式
|
|
|
|
+ String str = "待";
|
|
|
|
+ if (String.valueOf(map.get("projectAuditState")).equals("0")) {
|
|
|
|
+ String projectAuditorName = map.get("projectAuditorName") + "";
|
|
|
|
+ if (needCorpWxTranslate) {
|
|
|
|
+ for (User userItem : userList) {
|
|
|
|
+ if (userItem.getId().equals(map.get("projectAuditorId"))) {
|
|
|
|
+ projectAuditorName = "$userName=" + userItem.getCorpwxRealUserid() + "$";
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ str += "项目审核人("+projectAuditorName+")";
|
|
|
|
+ }
|
|
|
|
+ if (String.valueOf(map.get("departmentAuditState")).equals("0")) {
|
|
|
|
+ String deptAuditorId = map.get("deptAuditorName") + "";
|
|
for (User userItem : userList) {
|
|
for (User userItem : userList) {
|
|
- if (userItem.getId().equals(projectAuditorId)) {
|
|
|
|
- if(needCorpWxTranslate){
|
|
|
|
- projectAuditorName = "$userName=" + userItem.getCorpwxUserid() + "$";
|
|
|
|
- }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
|
- projectAuditorName = "$userName=" + userItem.getDingdingUserid() + "$";
|
|
|
|
|
|
+ if (userItem.getId().equals(deptAuditorId)) {
|
|
|
|
+ String deptAuditorName = userItem.getName();
|
|
|
|
+ if (needCorpWxTranslate) {
|
|
|
|
+ deptAuditorName = "$userName=" + userItem.getCorpwxRealUserid() + "$";
|
|
}
|
|
}
|
|
- item.add("待项目审核人" + "(" + projectAuditorName + ")审核");
|
|
|
|
|
|
+ if (str.length() > 1) str += "、";
|
|
|
|
+ str += "部门审核人("+deptAuditorName+")";
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- item.add("待项目审核人" + "(" + projectAuditorName + ")审核");
|
|
|
|
|
|
+ }
|
|
|
|
+ str += "审核";
|
|
|
|
+ item.add(str);
|
|
|
|
+ } else {
|
|
|
|
+ if (String.valueOf(map.get("projectAuditState")).equals("0") || String.valueOf(map.get("groupAuditState")).equals("0")) {
|
|
|
|
+ String projectAuditorName = map.get("projectAuditorName") + "";
|
|
|
|
+ String projectAuditorId = map.get("projectAuditorId") + "";
|
|
|
|
+ if (needCorpWxTranslate||(dingding!=null&&dingding.getContactNeedTranslate()==1)) {
|
|
|
|
+ for (User userItem : userList) {
|
|
|
|
+ if (userItem.getId().equals(projectAuditorId)) {
|
|
|
|
+ if(needCorpWxTranslate){
|
|
|
|
+ projectAuditorName = "$userName=" + userItem.getCorpwxUserid() + "$";
|
|
|
|
+ }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
|
+ projectAuditorName = "$userName=" + userItem.getDingdingUserid() + "$";
|
|
|
|
+ }
|
|
|
|
+ item.add("待项目审核人" + "(" + projectAuditorName + ")审核");
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ item.add("待项目审核人" + "(" + projectAuditorName + ")审核");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -6985,7 +7027,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
//发送个人微信通知
|
|
//发送个人微信通知
|
|
pushReject(str, reporter, user.getName(), reason);
|
|
pushReject(str, reporter, user.getName(), reason);
|
|
}
|
|
}
|
|
-
|
|
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
//httpRespMsg.setError("验证失败");
|
|
//httpRespMsg.setError("验证失败");
|
|
httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
@@ -9826,4 +9867,17 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
}
|
|
}
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public HttpRespMsg batchDenyHisReport(Integer reportAuditLogId, String reason, HttpServletRequest request) {
|
|
|
|
+ List<ReportAlogMembdate> list = reportAlogMembdateMapper.selectList(new QueryWrapper<ReportAlogMembdate>().eq("rlog_id", reportAuditLogId));
|
|
|
|
+ for (ReportAlogMembdate logMembItem : list) {
|
|
|
|
+ HttpRespMsg msg = denyHisReport(logMembItem.getId(), reason, request);
|
|
|
|
+ if (msg.code.equals("error")) {
|
|
|
|
+ //异常需要跳出
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new HttpRespMsg();
|
|
|
|
+ }
|
|
}
|
|
}
|