|
@@ -36,6 +36,7 @@ import com.ozs.system.domain.vo.responseVo.SysDeptResponseVo;
|
|
|
import com.ozs.system.mapper.SysDeptMapper;
|
|
|
import com.ozs.system.mapper.SysFileRefMapper;
|
|
|
import com.ozs.system.service.ISysDeptService;
|
|
|
+import com.ozs.system.service.ISysDictDataService;
|
|
|
import com.ozs.system.service.ISysDictTypeService;
|
|
|
import com.ozs.system.service.ISysUserService;
|
|
|
import com.ozs.system.service.SysFileService;
|
|
@@ -46,8 +47,6 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.validation.Validator;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
@@ -78,6 +77,8 @@ public class PlanQuarterServiceImpl extends ServiceImpl<PlanQuarterMapper, PlanQ
|
|
|
@Autowired
|
|
|
private ISysDictTypeService dictTypeService;
|
|
|
@Autowired
|
|
|
+ private ISysDictDataService dictDataService;
|
|
|
+ @Autowired
|
|
|
private ISysDeptService deptService;
|
|
|
@Autowired
|
|
|
SysFileRefMapper sysFileRefMapper;
|
|
@@ -686,21 +687,52 @@ public class PlanQuarterServiceImpl extends ServiceImpl<PlanQuarterMapper, PlanQ
|
|
|
}
|
|
|
//获取字典数据
|
|
|
HashMap<String, HashMap<String, String>> planEnums = dictTypeService.getAboutEnums();
|
|
|
- HashMap<String, String> projectTypesMap = planEnums.get("projectTypes");
|
|
|
+ //项目属性
|
|
|
HashMap<String, String> projectAttributes = planEnums.get("projectAttributes");
|
|
|
+ //项目审核状态
|
|
|
+ HashMap<String, String> projectStatusMap = planEnums.get("projectStatus");
|
|
|
+ //项目类型
|
|
|
+ HashMap<String, String> projectTypesMap = planEnums.get("projectTypes");
|
|
|
+ //预算科目
|
|
|
+ HashMap<String, String> budgetAccountMap = planEnums.get("budgetAccount");
|
|
|
+ //采购服务站
|
|
|
+ HashMap<String, String> purchaseServicesMap = planEnums.get("purchaseServices");
|
|
|
+
|
|
|
List<PlanQuarterResponseVo> list = new ArrayList<PlanQuarterResponseVo>();
|
|
|
for (PlanQuarter planQuarter : planQuarters) {
|
|
|
PlanQuarterResponseVo responseVo = new PlanQuarterResponseVo();
|
|
|
SysDeptResponseVo sysDeptResponseVo = (SysDeptResponseVo) deptService.selectDeptById(Long.valueOf(planQuarter.getPurchaseDeptId())).get("sysDept");
|
|
|
planQuarter.setPurchaseDeptName(sysDeptResponseVo.getDeptName());
|
|
|
|
|
|
+ //预算科目
|
|
|
+ for (Map.Entry<String, String> entry : budgetAccountMap.entrySet()) {
|
|
|
+ if (!ObjectUtils.isEmpty(planQuarter.getBudgetAccount()) && planQuarter.getBudgetAccount().equals(entry.getValue())) {
|
|
|
+ planQuarter.setBudgetAccountStr(entry.getKey());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //采购服务站
|
|
|
+ for (Map.Entry<String, String> entry : purchaseServicesMap.entrySet()) {
|
|
|
+ if (!ObjectUtils.isEmpty(planQuarter.getPurchaseServices()) && planQuarter.getPurchaseServices().equals(entry.getValue())) {
|
|
|
+ planQuarter.setPurchaseServicesStr(entry.getKey());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //项目审核状态
|
|
|
+ for (Map.Entry<String, String> entry : projectStatusMap.entrySet()) {
|
|
|
+ if (!ObjectUtils.isEmpty(planQuarter.getProjectStatus()) && planQuarter.getProjectStatus().equals(entry.getValue())) {
|
|
|
+ planQuarter.setProjectStatusStr(entry.getKey());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //项目类型
|
|
|
for (Map.Entry<String, String> entry : projectTypesMap.entrySet()) {
|
|
|
- if (planQuarter.getProjectType().equals(entry.getValue())) {
|
|
|
+ if (!ObjectUtils.isEmpty(planQuarter.getProjectType()) && planQuarter.getProjectType().equals(entry.getValue())) {
|
|
|
planQuarter.setProjectTypeStr(entry.getKey());
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- //项目属性是拼接的
|
|
|
+ //项目属性为value拼接
|
|
|
if (!ObjectUtils.isEmpty(planQuarter.getProjectAttr())) {
|
|
|
if (planQuarter.getProjectAttr().length() > 1) {
|
|
|
StringBuilder builder = new StringBuilder();
|
|
@@ -727,6 +759,33 @@ public class PlanQuarterServiceImpl extends ServiceImpl<PlanQuarterMapper, PlanQ
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //机关业务指导处(科)为id拼接
|
|
|
+ String organDivision = planQuarter.getOrganDivision();
|
|
|
+ if (!ObjectUtils.isEmpty(organDivision)) {
|
|
|
+ int length = organDivision.split(",").length;
|
|
|
+ SysDept sysDept = new SysDept();
|
|
|
+ if (length > 1) {
|
|
|
+ StringBuilder builder = new StringBuilder();
|
|
|
+ String[] split = organDivision.split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ sysDept = deptService.selectById(Long.valueOf(s));
|
|
|
+ if (!ObjectUtils.isEmpty(sysDept)) {
|
|
|
+ if (!organDivision.endsWith(s)) {
|
|
|
+ builder.append(sysDept.getDeptName() + ",");
|
|
|
+ } else {
|
|
|
+ builder.append(sysDept.getDeptName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ planQuarter.setOrganDivisionStr(builder.toString());
|
|
|
+ } else if (length == 1) {
|
|
|
+ sysDept = deptService.selectById(Long.valueOf(organDivision));
|
|
|
+ if (!ObjectUtils.isEmpty(sysDept)) {
|
|
|
+ planQuarter.setOrganDivisionStr(sysDept.getDeptName());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
BeanUtils.copyProperties(planQuarter, responseVo);
|
|
|
|
|
|
try {
|