|
@@ -25,6 +25,7 @@ import com.hotent.surveyinfo.manager.*;
|
|
|
import com.hotent.surveyinfo.model.*;
|
|
import com.hotent.surveyinfo.model.*;
|
|
|
import com.hotent.uc.api.model.IUser;
|
|
import com.hotent.uc.api.model.IUser;
|
|
|
import com.hotent.uc.manager.OrgManager;
|
|
import com.hotent.uc.manager.OrgManager;
|
|
|
|
|
+import com.hotent.uc.manager.UserManager;
|
|
|
import com.hotent.uc.util.ContextUtil;
|
|
import com.hotent.uc.util.ContextUtil;
|
|
|
import com.hotent.util.AreaCodeUtil;
|
|
import com.hotent.util.AreaCodeUtil;
|
|
|
import com.hotent.util.CopyUtil;
|
|
import com.hotent.util.CopyUtil;
|
|
@@ -190,6 +191,9 @@ public class CostProjectApprovalManagerImpl extends BaseManagerImpl<CostProjectA
|
|
|
private CostVerifyProjectTemplateManager costVerifyProjectTemplateManager;
|
|
private CostVerifyProjectTemplateManager costVerifyProjectTemplateManager;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private UserManager userManager;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public CostProjectApprovalDetailResp getDetail(String id) {
|
|
public CostProjectApprovalDetailResp getDetail(String id) {
|
|
|
CostProjectApproval costProjectApproval = this.get(id);
|
|
CostProjectApproval costProjectApproval = this.get(id);
|
|
@@ -224,6 +228,44 @@ public class CostProjectApprovalManagerImpl extends BaseManagerImpl<CostProjectA
|
|
|
if (ObjectUtil.isNotEmpty(costProjectApproval.getOrgId())) {
|
|
if (ObjectUtil.isNotEmpty(costProjectApproval.getOrgId())) {
|
|
|
detailResp.setOrgName(orgManager.get(costProjectApproval.getOrgId()).getName());
|
|
detailResp.setOrgName(orgManager.get(costProjectApproval.getOrgId()).getName());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 反查负责人名称
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(costProjectApproval.getLeaderId())) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ com.hotent.uc.model.User user = userManager.get(costProjectApproval.getLeaderId());
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(user)) {
|
|
|
|
|
+ detailResp.setLeaderName(user.getFullname());
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ // 记录异常但不影响主流程
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 反查项目组成员名称
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(costProjectApproval.getProjectMembers())) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ String[] memberIds = costProjectApproval.getProjectMembers().split(",");
|
|
|
|
|
+ if (memberIds.length > 0) {
|
|
|
|
|
+ StringBuilder memberNames = new StringBuilder();
|
|
|
|
|
+ for (int i = 0; i < memberIds.length; i++) {
|
|
|
|
|
+ String memberId = memberIds[i].trim();
|
|
|
|
|
+ if (StringUtil.isNotEmpty(memberId)) {
|
|
|
|
|
+ com.hotent.uc.model.User user = userManager.get(memberId);
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(user)) {
|
|
|
|
|
+ if (i > 0) {
|
|
|
|
|
+ memberNames.append(",");
|
|
|
|
|
+ }
|
|
|
|
|
+ memberNames.append(user.getFullname());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ detailResp.setProjectMembersName(memberNames.toString());
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ // 记录异常但不影响主流程
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
CostProjectTaskProccess taskProccess = costProjectTaskProccessManager.getOne(
|
|
CostProjectTaskProccess taskProccess = costProjectTaskProccessManager.getOne(
|
|
|
new QueryWrapper<CostProjectTaskProccess>().eq("project_id", costProjectApproval.getProjectId())
|
|
new QueryWrapper<CostProjectTaskProccess>().eq("project_id", costProjectApproval.getProjectId())
|
|
|
);
|
|
);
|
|
@@ -488,7 +530,7 @@ public class CostProjectApprovalManagerImpl extends BaseManagerImpl<CostProjectA
|
|
|
IUser currentUser = ContextUtil.getCurrentUser();
|
|
IUser currentUser = ContextUtil.getCurrentUser();
|
|
|
AuditedUnit unit = auditedUnitManager.getOne(
|
|
AuditedUnit unit = auditedUnitManager.getOne(
|
|
|
new LambdaQueryWrapper<AuditedUnit>()
|
|
new LambdaQueryWrapper<AuditedUnit>()
|
|
|
- .eq(AuditedUnit::getUserId, currentUser.getUserId())
|
|
|
|
|
|
|
+ .eq(AuditedUnit::getAccount, currentUser.getUserId())
|
|
|
.eq(AuditedUnit::getIsDeleted, "0")
|
|
.eq(AuditedUnit::getIsDeleted, "0")
|
|
|
);
|
|
);
|
|
|
|
|
|