|
@@ -5082,20 +5082,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
//数据行
|
|
|
//读取工作内容
|
|
|
String workContent = null;
|
|
|
- if (withCheckIn!=null) {
|
|
|
- int workContentIndex = projectNameStartIndex -1;
|
|
|
- if (row.getCell(workContentIndex) == null) {
|
|
|
- //msg.setError("第"+dataCount+"行缺少工作内容");工作内容为必填项
|
|
|
- msg.setError(MessageUtils.message("data.LackWorkContentByRow",dataCount));
|
|
|
- return msg;
|
|
|
- }
|
|
|
- workContent = row.getCell(workContentIndex).getStringCellValue().trim();
|
|
|
- if (StringUtils.isEmpty(workContent)) {
|
|
|
- //msg.setError("第"+dataCount+"行缺少工作内容");
|
|
|
- msg.setError(MessageUtils.message("data.LackWorkContentByRow",dataCount));
|
|
|
- return msg;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
for (int i=1;i<projectNameStartIndex+projectList.size(); i++) {
|
|
|
if (row.getCell(i) != null) {
|
|
@@ -5130,6 +5117,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
return msg;
|
|
|
}
|
|
|
User reportCreator = any.get();
|
|
|
+ double curRowTotalTime = 0;
|
|
|
for (int i=projectNameStartIndex; i < projectNameStartIndex + projectList.size(); i++) {
|
|
|
if (row.getCell(i) == null) {
|
|
|
continue;
|
|
@@ -5190,6 +5178,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
report.setCreateDate(LocalDate.parse(reportDate, dtf));
|
|
|
report.setCost(reportCreator.getCost()==null?new BigDecimal(0) : reportCreator.getCost().multiply(new BigDecimal(time)));
|
|
|
reportList.add(report);
|
|
|
+ curRowTotalTime += time;
|
|
|
} else if (time < 0) {
|
|
|
//msg.setError(username + "的工时存在负数,请检查修改");
|
|
|
msg.setError(MessageUtils.message("report.negativeError",username));
|
|
@@ -5197,6 +5186,23 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //导入工时大于0时,需要有工作内容
|
|
|
+ if (curRowTotalTime > 0) {
|
|
|
+ if (withCheckIn!=null) {
|
|
|
+ int workContentIndex = projectNameStartIndex -1;
|
|
|
+ if (row.getCell(workContentIndex) == null) {
|
|
|
+ //msg.setError("第"+dataCount+"行缺少工作内容");工作内容为必填项
|
|
|
+ msg.setError(MessageUtils.message("data.LackWorkContentByRow",dataCount));
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+ workContent = row.getCell(workContentIndex).getStringCellValue().trim();
|
|
|
+ if (StringUtils.isEmpty(workContent)) {
|
|
|
+ //msg.setError("第"+dataCount+"行缺少工作内容");
|
|
|
+ msg.setError(MessageUtils.message("data.LackWorkContentByRow",dataCount));
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -6463,12 +6469,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
projectAuditorName = "$userName=" + userItem.getDingdingUserid() + "$";
|
|
|
}
|
|
|
- item.add("待项目审核人" + "(" + projectAuditorName + ")审核");
|
|
|
+ item.add("待"+(companyId == 469?"部门主管":"项目审核人") + "(" + projectAuditorName + ")审核");
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- item.add("待项目审核人" + "(" + projectAuditorName + ")审核");
|
|
|
+ item.add("待"+(companyId == 469?"部门主管":"项目审核人") + "(" + projectAuditorName + ")审核");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -6478,8 +6484,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
}
|
|
|
|
|
|
if (timeType.getEnableNewWeeklyfill() == 1) {
|
|
|
-// String createDate = new SimpleDateFormat("yyyy-MM-dd")
|
|
|
-// .format((java.sql.Date) map.get("createDate"));
|
|
|
ReportBatch batchItem = reportBatchMapper.selectOne(new QueryWrapper<ReportBatch>().eq("creator_id", map.get("creatorId")).eq("start_date", createDate).last("limit 1"));
|
|
|
if (batchItem != null) {
|
|
|
item.add(batchItem.getSummary());
|