|
@@ -5111,6 +5111,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
//titles.add("关联任务");
|
|
|
titles.add(MessageUtils.message("excel.assTask"));
|
|
|
}
|
|
|
+ //依斯倍,导出带服务
|
|
|
+ List<SapProjectService> serviceList = null;
|
|
|
+ if (companyId == 3092) {
|
|
|
+ titles.add("服务");
|
|
|
+ serviceList = sapProjectServiceMapper.selectList(new QueryWrapper<SapProjectService>().eq("company_id", companyId));
|
|
|
+ }
|
|
|
// titles.add("工作日期");
|
|
|
// titles.add("工作时长(小时)");
|
|
|
titles.add(MessageUtils.message("entry.workDate"));
|
|
@@ -5383,6 +5389,21 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
if (company.getPackageProject() == 1) {
|
|
|
item.add((String) map.get("taskName"));
|
|
|
}
|
|
|
+ //依斯倍,导出带服务
|
|
|
+ if (companyId == 3092) {
|
|
|
+ Integer sapServiceId = (Integer) map.get("sapServiceId");
|
|
|
+ if (sapServiceId != null) {
|
|
|
+ Optional<SapProjectService> first = serviceList.stream().filter(d->d.getId().equals(sapServiceId)).findFirst();
|
|
|
+ if (first.isPresent()) {
|
|
|
+ SapProjectService divItem = first.get();
|
|
|
+ item.add(divItem.getServiceName());
|
|
|
+ } else {
|
|
|
+ item.add("");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ item.add("");
|
|
|
+ }
|
|
|
+ }
|
|
|
item.add(new SimpleDateFormat("yyyy-MM-dd")
|
|
|
.format((java.sql.Date) map.get("createDate")));
|
|
|
item.add(map.get("duration").toString());
|
|
@@ -5450,6 +5471,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
audit.setOperatorId(splitItems[0]);
|
|
|
audit.setOperateDate(operateDate);
|
|
|
audit.setMsg(splitItems[2]);
|
|
|
+ String auditMsg = audit.getMsg();
|
|
|
|
|
|
if (company.getIsInternational() == 1) {
|
|
|
operateDate = operateDate.plusSeconds(offsetSeconds);
|
|
@@ -5459,22 +5481,27 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
if(needCorpWxTranslate){
|
|
|
Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(audit.getOperatorId())).findFirst();
|
|
|
if(first.isPresent()){
|
|
|
- if(audit.getMsg().contains("提交了")){
|
|
|
- int i = audit.getMsg().indexOf("提");
|
|
|
- String substring = audit.getMsg().substring(0, i);
|
|
|
- msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
|
|
|
- }else if(audit.getMsg().contains("审核通过了")){
|
|
|
- int i = audit.getMsg().indexOf("审");
|
|
|
- String substring = audit.getMsg().substring(0, i);
|
|
|
- msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
|
|
|
- }else if(audit.getMsg().contains("驳回了")) {
|
|
|
- int i = audit.getMsg().indexOf("驳");
|
|
|
- String substring = audit.getMsg().substring(0, i);
|
|
|
- msg = time+" " + audit.getMsg().replaceAll(substring,"\\$userName="+first.get().getCorpwxUserid()+"\\$");
|
|
|
+ String corpwxUserId = first.get().getCorpwxUserid();
|
|
|
+ if (auditMsg.contains(corpwxUserId)) {
|
|
|
+ if(auditMsg.contains("提交了")){
|
|
|
+ int i = auditMsg.indexOf("提");
|
|
|
+ String substring = auditMsg.substring(0, i);
|
|
|
+ msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"\\$");
|
|
|
+ }else if(auditMsg.contains("审核通过了")){
|
|
|
+ int i = auditMsg.indexOf("审");
|
|
|
+ String substring = auditMsg.substring(0, i);
|
|
|
+ msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"\\$");
|
|
|
+ }else if(auditMsg.contains("驳回了")) {
|
|
|
+ int i = auditMsg.indexOf("驳");
|
|
|
+ String substring = auditMsg.substring(0, i);
|
|
|
+ msg = time+" " + auditMsg.replace(substring,"\\$userName="+corpwxUserId+"\\$");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ msg = time+" " + auditMsg;
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
|
- msg = time+" " + audit.getMsg();
|
|
|
+ msg = time+" " + auditMsg;
|
|
|
}
|
|
|
if (!isFirst) {
|
|
|
sb.append("->");
|
|
@@ -5486,6 +5513,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
item.add(sb.toString());
|
|
|
}
|
|
|
+ item.add((String) map.get("content"));
|
|
|
if(stateKey==1){
|
|
|
Integer state = (Integer) map.get("state");
|
|
|
switch (state){
|
|
@@ -7603,7 +7631,17 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
return httpRespMsg;
|
|
|
}
|
|
|
|
|
|
- public void cancelReportPushSap(String reportIds,User user){
|
|
|
+ @Override
|
|
|
+ public HttpRespMsg cannelAllReport() {
|
|
|
+ List<ReportPushLog> list = reportPushLogService.list();
|
|
|
+ List<Integer> collect = list.stream().map(ReportPushLog::getReportId).distinct().collect(Collectors.toList());
|
|
|
+ String s = collect.stream().map(m -> String.valueOf(m)).collect(Collectors.joining(","));
|
|
|
+ User user = userMapper.selectById(request.getHeader("token"));
|
|
|
+ cancelReportPushSap(s,user);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void cancelReportPushSap(String reportIds, User user){
|
|
|
if(!StringUtils.isEmpty(reportIds)){
|
|
|
LocalDateTime localDateTime=LocalDateTime.now();
|
|
|
List<SapSyncLog> sapSyncLogs=new ArrayList<>();
|
|
@@ -7636,6 +7674,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}else{
|
|
|
result = WebServiceUtils.requestByXml("https://my601432.sapbyd.cn/sap/bc/srt/scs/sap/yyatr5vf6y_deleteemployeetime?sap-vhost=my601432.sapbyd.cn", sb.toString(), 0, "_BYDHOST", "Welcome1");
|
|
|
}
|
|
|
+// result = WebServiceUtils.requestByXml("https://my601432.sapbyd.cn/sap/bc/srt/scs/sap/yyatr5vf6y_deleteemployeetime?sap-vhost=my601432.sapbyd.cn", sb.toString(), 0, "_BYDHOST", "Welcome1");
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|