|
@@ -3,9 +3,11 @@ package com.hssx.cloudmodel.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
|
+import com.hssx.cloudmodel.entity.Company;
|
|
import com.hssx.cloudmodel.entity.Project;
|
|
import com.hssx.cloudmodel.entity.Project;
|
|
import com.hssx.cloudmodel.entity.ProjectUser;
|
|
import com.hssx.cloudmodel.entity.ProjectUser;
|
|
import com.hssx.cloudmodel.entity.User;
|
|
import com.hssx.cloudmodel.entity.User;
|
|
|
|
+import com.hssx.cloudmodel.mapper.CompanyMapper;
|
|
import com.hssx.cloudmodel.mapper.ProjectMapper;
|
|
import com.hssx.cloudmodel.mapper.ProjectMapper;
|
|
import com.hssx.cloudmodel.mapper.ProjectUserMapper;
|
|
import com.hssx.cloudmodel.mapper.ProjectUserMapper;
|
|
import com.hssx.cloudmodel.mapper.UserMapper;
|
|
import com.hssx.cloudmodel.mapper.UserMapper;
|
|
@@ -39,6 +41,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
ProjectUserMapper projectUserMapper;
|
|
ProjectUserMapper projectUserMapper;
|
|
@Autowired
|
|
@Autowired
|
|
UserMapper userMapper;
|
|
UserMapper userMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ CompanyMapper companyMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg addAndUpdateProject(Project project, Integer flag, User user) {
|
|
public HttpRespMsg addAndUpdateProject(Project project, Integer flag, User user) {
|
|
@@ -57,8 +61,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
count += num;
|
|
count += num;
|
|
}
|
|
}
|
|
long time = System.currentTimeMillis();
|
|
long time = System.currentTimeMillis();
|
|
|
|
+ Company company = companyMapper.selectById(user.getCompanyId());
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
String seq = sdf.format(time) + String.format("%04d", count);
|
|
String seq = sdf.format(time) + String.format("%04d", count);
|
|
|
|
+ project.setCreatorId(user.getId());
|
|
|
|
+ project.setCreator(user.getUsername());
|
|
|
|
+ project.setOwnerCompany(user.getCompanyId());
|
|
|
|
+ project.setOwnerCompanyName(company.getCompanyName());
|
|
project.setProjectNo("YMXM"+seq);
|
|
project.setProjectNo("YMXM"+seq);
|
|
project.setCreatorId(user.getId());
|
|
project.setCreatorId(user.getId());
|
|
project.setCreator(user.getUsername());
|
|
project.setCreator(user.getUsername());
|
|
@@ -129,4 +138,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
msg.data = users;
|
|
msg.data = users;
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public HttpRespMsg getProjectDetail(Project project) {
|
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
+ msg.data = projectMapper.getProjectById(project.getId());
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
}
|
|
}
|