|
|
@@ -29,6 +29,7 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.Validator;
|
|
|
import java.io.ByteArrayOutputStream;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.zip.ZipOutputStream;
|
|
|
@@ -78,7 +79,6 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
|
|
public AjaxResult details(Long id) {
|
|
|
ProjectTask projectTask = projectTaskMapper.selectByPrimaryKey(id);
|
|
|
ProjectTaskOut out= new ProjectTaskOut();
|
|
|
-
|
|
|
if (projectTask!=null){
|
|
|
BeanUtils.copyBeanProp(out, projectTask);
|
|
|
List<ProjectStaff> projectStaffs = projectStaffMapper.selectByPid(id);
|
|
|
@@ -131,6 +131,7 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
|
|
StringBuilder successMsg = new StringBuilder();
|
|
|
StringBuilder failureMsg = new StringBuilder();
|
|
|
Long company = deptService.selectCompanyByDeptId();
|
|
|
+ List<Long> pids = new ArrayList<Long>();
|
|
|
for (ProjectTaskListOut p : list)
|
|
|
{
|
|
|
try
|
|
|
@@ -179,6 +180,9 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
|
|
p.setAdminName(sysUser.getNickName());
|
|
|
}
|
|
|
projectTaskMapper.updateByPrimaryKeySelective(p);
|
|
|
+ if (pids.contains(p.getId())){
|
|
|
+ pids.add(p.getId());
|
|
|
+ }
|
|
|
successNum++;
|
|
|
successMsg.append("<br/>" + successNum + "、项目: " + projectTask.getName() + " 更新成功");
|
|
|
}
|
|
|
@@ -205,6 +209,12 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
|
|
{
|
|
|
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
|
|
}
|
|
|
+ if (!pids.isEmpty()){
|
|
|
+ for (Long pid : pids) {
|
|
|
+ projectStaffRecordMapper.updateSumDurationProject(pid);
|
|
|
+ projectStaffRecordMapper.updateSumDurationStaff(pid);
|
|
|
+ }
|
|
|
+ }
|
|
|
return successMsg.toString();
|
|
|
}
|
|
|
|