|
@@ -106,11 +106,13 @@ import com.ozs.pm.service.PmExpertFeedbackService;
|
|
|
import com.ozs.pm.service.PmProcurementDocumentsReviewService;
|
|
|
import com.ozs.pm.service.PmProjectConstructionService;
|
|
|
import com.ozs.pm.service.PmReleaseAnnouncementService;
|
|
|
+import com.ozs.system.domain.SysDeptOrgan;
|
|
|
import com.ozs.system.domain.SysFileInfo;
|
|
|
import com.ozs.system.domain.SysFileRef;
|
|
|
import com.ozs.system.domain.vo.SysRegionVO;
|
|
|
import com.ozs.system.domain.vo.responseVo.SysDeptResponseVo;
|
|
|
import com.ozs.system.mapper.SysDeptMapper;
|
|
|
+import com.ozs.system.mapper.SysDeptOrganMapper;
|
|
|
import com.ozs.system.mapper.SysFileRefMapper;
|
|
|
import com.ozs.system.mapper.SysRoleMapper;
|
|
|
import com.ozs.system.service.ISysDeptService;
|
|
@@ -229,6 +231,8 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
@Autowired
|
|
|
private ProvisionalPlanMapper provisionalPlanMapper;
|
|
|
@Autowired
|
|
|
+ private SysDeptOrganMapper sysDeptOrganMapper;
|
|
|
+ @Autowired
|
|
|
private PmExpertFeedbackService pmExpertFeedbackService;
|
|
|
@Autowired
|
|
|
private PmProcurementDocumentsReviewService pmProcurementDocumentsReviewService;
|
|
@@ -244,18 +248,56 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
*/
|
|
|
@Override
|
|
|
public PmDemandResVo selectPmDemandByDemandId(Long demandId, String detailType) {
|
|
|
+ //获取字典数据
|
|
|
+ HashMap<String, HashMap<String, String>> planEnums = dictTypeService.getAboutEnums();
|
|
|
+ HashMap<String, String> budgetAccountMap = planEnums.get("budgetAccount");
|
|
|
+
|
|
|
PmDemand pmDemand = this.getById(demandId);
|
|
|
if (pmDemand != null) {
|
|
|
PmDemandResVo vo = new PmDemandResVo();
|
|
|
vo.setProjectName(pmDemand.getProjectName());
|
|
|
vo.setDemandId(demandId);
|
|
|
BeanUtils.copyProperties(pmDemand, vo);
|
|
|
- if ("1".equals(detailType)) { //项目计划
|
|
|
+ //项目计划
|
|
|
+ if ("1".equals(detailType)) {
|
|
|
//project_type,evaluation 从原来计划里取
|
|
|
- ProvisionalPlan provisionalPlan = provisionalPlanMapper.seletById(pmDemand.getPlanId());
|
|
|
+ ProvisionalPlan provisionalPlan = provisionalPlanMapper.seletByPlanid(pmDemand.getPlanId());
|
|
|
if (provisionalPlan != null) {
|
|
|
vo.setProjectType(provisionalPlan.getProjectType());
|
|
|
vo.setEvaluation(provisionalPlan.getEvaluation().doubleValue());
|
|
|
+ //机关业务指导处(科)为id拼接
|
|
|
+ String organDivision = provisionalPlan.getOrganDivision();
|
|
|
+ if (!ObjectUtils.isEmpty(organDivision)) {
|
|
|
+ int length = organDivision.split(",").length;
|
|
|
+ SysDeptOrgan deptOrgan = new SysDeptOrgan();
|
|
|
+ if (length > 1) {
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
+ String[] split = organDivision.split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ deptOrgan = sysDeptOrganMapper.selectById(Long.valueOf(s));
|
|
|
+ if (!ObjectUtils.isEmpty(deptOrgan)) {
|
|
|
+ if (!organDivision.endsWith(s)) {
|
|
|
+ builder.append(deptOrgan.getOrganName() + ",");
|
|
|
+ } else {
|
|
|
+ builder.append(deptOrgan.getOrganName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ vo.setOrganDivisionStr(builder.toString());
|
|
|
+ } else if (length == 1) {
|
|
|
+ deptOrgan = sysDeptOrganMapper.selectById(Long.valueOf(organDivision));
|
|
|
+ if (!ObjectUtils.isEmpty(deptOrgan)) {
|
|
|
+ vo.setOrganDivisionStr(deptOrgan.getOrganName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //预算科目
|
|
|
+ for (Map.Entry<String, String> entry : budgetAccountMap.entrySet()) {
|
|
|
+ if (!ObjectUtils.isEmpty(provisionalPlan.getBudgetAccount()) && provisionalPlan.getBudgetAccount().equals(entry.getValue())) {
|
|
|
+ vo.setBudgetAccountStr(entry.getKey());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
SysDeptResponseVo sysDeptResponseVo = (SysDeptResponseVo) deptService.selectDeptById(vo.getPurchaseDeptId()).get("sysDept");
|
|
@@ -383,6 +425,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return vo;
|
|
|
} else {
|
|
|
return null;
|