|
@@ -13,6 +13,7 @@ import com.jeeplus.modules.isignature.service.ISignatureDocumentService;
|
|
|
import com.jeeplus.modules.projectAccessory.dao.ProjectAccessoryDao;
|
|
|
import com.jeeplus.modules.projectAccessory.entity.CollectAccessoryInfo;
|
|
|
import com.jeeplus.modules.sys.dao.WorkattachmentDao;
|
|
|
+import com.jeeplus.modules.sys.entity.User;
|
|
|
import com.jeeplus.modules.sys.entity.Workattachment;
|
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
|
import com.jeeplus.modules.utils.ViewFileUtil;
|
|
@@ -362,9 +363,12 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
|
|
|
public List<WorkClientAttachment> getAttachmentList(WorkClientAttachment workClientAttachment){
|
|
|
List<WorkClientAttachment> list = workClientAttachmentDao.findList(workClientAttachment);
|
|
|
CollectAccessoryInfo cAInfo = new CollectAccessoryInfo();
|
|
|
- cAInfo.setOfficeId(UserUtils.getUser().getOffice().getId());
|
|
|
- cAInfo.setCompanyId(UserUtils.getUser().getCompany().getId());
|
|
|
- cAInfo.setCreateBy(UserUtils.getUser());
|
|
|
+ User loginUser = UserUtils.getUser();
|
|
|
+ if(StringUtils.isNotBlank(loginUser.getId())){
|
|
|
+ cAInfo.setOfficeId(loginUser.getOffice().getId());
|
|
|
+ cAInfo.setCompanyId(loginUser.getCompany().getId());
|
|
|
+ cAInfo.setCreateBy(loginUser);
|
|
|
+ }
|
|
|
//遍历附件信息,判定改附件信息是否被收藏
|
|
|
for (WorkClientAttachment info: list) {
|
|
|
cAInfo.setUrl(info.getUrl());
|
|
@@ -388,9 +392,12 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
|
|
|
public List<WorkClientAttachment> getAttachmentListOnProjectAccessory(WorkClientAttachment workClientAttachment){
|
|
|
List<WorkClientAttachment> list = workClientAttachmentDao.getList(workClientAttachment);
|
|
|
CollectAccessoryInfo cAInfo = new CollectAccessoryInfo();
|
|
|
- cAInfo.setOfficeId(UserUtils.getUser().getOffice().getId());
|
|
|
- cAInfo.setCompanyId(UserUtils.getUser().getCompany().getId());
|
|
|
- cAInfo.setCreateBy(UserUtils.getUser());
|
|
|
+ User loginUser = UserUtils.getUser();
|
|
|
+ if(StringUtils.isNotBlank(loginUser.getId())){
|
|
|
+ cAInfo.setOfficeId(loginUser.getOffice().getId());
|
|
|
+ cAInfo.setCompanyId(loginUser.getCompany().getId());
|
|
|
+ cAInfo.setCreateBy(loginUser);
|
|
|
+ }
|
|
|
//遍历附件信息,判定改附件信息是否被收藏
|
|
|
for (WorkClientAttachment info: list) {
|
|
|
cAInfo.setUrl(info.getUrl());
|
|
@@ -414,9 +421,12 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
|
|
|
public List<WorkClientAttachment> getList(WorkClientAttachment workClientAttachment){
|
|
|
List<WorkClientAttachment> list = workClientAttachmentDao.getList(workClientAttachment);
|
|
|
CollectAccessoryInfo cAInfo = new CollectAccessoryInfo();
|
|
|
- cAInfo.setOfficeId(UserUtils.getUser().getOffice().getId());
|
|
|
- cAInfo.setCompanyId(UserUtils.getUser().getCompany().getId());
|
|
|
- cAInfo.setCreateBy(UserUtils.getUser());
|
|
|
+ User loginUser = UserUtils.getUser();
|
|
|
+ if(StringUtils.isNotBlank(loginUser.getId())){
|
|
|
+ cAInfo.setOfficeId(loginUser.getOffice().getId());
|
|
|
+ cAInfo.setCompanyId(loginUser.getCompany().getId());
|
|
|
+ cAInfo.setCreateBy(loginUser);
|
|
|
+ }
|
|
|
//遍历附件信息,判定改附件信息是否被收藏
|
|
|
for (WorkClientAttachment info: list) {
|
|
|
cAInfo.setUrl(info.getUrl());
|