|
@@ -24,6 +24,7 @@ import com.ozs.common.utils.bean.BeanUtils;
|
|
import com.ozs.plan.doman.PlanQuarter;
|
|
import com.ozs.plan.doman.PlanQuarter;
|
|
import com.ozs.plan.doman.PlanYears;
|
|
import com.ozs.plan.doman.PlanYears;
|
|
import com.ozs.plan.doman.vo.requestVo.PlanYearsStandardVo;
|
|
import com.ozs.plan.doman.vo.requestVo.PlanYearsStandardVo;
|
|
|
|
+import com.ozs.plan.doman.vo.responseVo.PlanQuarterResponseVo;
|
|
import com.ozs.plan.doman.vo.responseVo.PlanYearsResponseVo;
|
|
import com.ozs.plan.doman.vo.responseVo.PlanYearsResponseVo;
|
|
import com.ozs.plan.mapper.PlanQuarterMapper;
|
|
import com.ozs.plan.mapper.PlanQuarterMapper;
|
|
import com.ozs.plan.mapper.PlanYearsMapper;
|
|
import com.ozs.plan.mapper.PlanYearsMapper;
|
|
@@ -41,7 +42,6 @@ import com.ozs.system.service.ISysDictTypeService;
|
|
import com.ozs.system.service.ISysUserService;
|
|
import com.ozs.system.service.ISysUserService;
|
|
import com.ozs.system.service.SysFileService;
|
|
import com.ozs.system.service.SysFileService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
-import org.apache.poi.ss.formula.functions.T;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -86,12 +86,14 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
private ISysUserService userService;
|
|
private ISysUserService userService;
|
|
@Autowired
|
|
@Autowired
|
|
private PmDemandMapper pmDemandMapper;
|
|
private PmDemandMapper pmDemandMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private PlanQuarterServiceImpl quartzServiceImpl;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Page selectPlanYearsList(PlanYearsStandardVo vo) {
|
|
public Page selectPlanYearsList(PlanYearsStandardVo vo) {
|
|
PlanYears ofYears = new PlanYears();
|
|
PlanYears ofYears = new PlanYears();
|
|
List<PlanYears> planYears;
|
|
List<PlanYears> planYears;
|
|
- List<PlanYears> planYearsList = new ArrayList<>();
|
|
|
|
|
|
+ List<PlanYearsResponseVo> planYearsList = new ArrayList<>();
|
|
try {
|
|
try {
|
|
BeanUtils.copyProperties(vo, ofYears);
|
|
BeanUtils.copyProperties(vo, ofYears);
|
|
planYears = planYearsMapper.selectPlanYearsList(ofYears);
|
|
planYears = planYearsMapper.selectPlanYearsList(ofYears);
|
|
@@ -104,9 +106,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<PlanYears> selectPlanYearsListEXP(PlanYearsStandardVo vo) {
|
|
|
|
|
|
+ public List<PlanYearsResponseVo> selectPlanYearsListEXP(PlanYearsStandardVo vo) {
|
|
List<PlanYears> list = new ArrayList<>();
|
|
List<PlanYears> list = new ArrayList<>();
|
|
- List<PlanYears> planYearsList = new ArrayList<>();
|
|
|
|
|
|
+ List<PlanYearsResponseVo> planYearsList = new ArrayList<>();
|
|
try {
|
|
try {
|
|
int num = 1;
|
|
int num = 1;
|
|
int size = 200;
|
|
int size = 200;
|
|
@@ -147,7 +149,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
public Page selectPlanYearsExamineList(PlanYearsStandardVo vo) {
|
|
public Page selectPlanYearsExamineList(PlanYearsStandardVo vo) {
|
|
PlanYears ofYears = new PlanYears();
|
|
PlanYears ofYears = new PlanYears();
|
|
List<PlanYears> planYears;
|
|
List<PlanYears> planYears;
|
|
- List<PlanYears> planYearsList = new ArrayList<>();
|
|
|
|
|
|
+ List<PlanYearsResponseVo> planYearsList = new ArrayList<>();
|
|
try {
|
|
try {
|
|
BeanUtils.copyProperties(vo, ofYears);
|
|
BeanUtils.copyProperties(vo, ofYears);
|
|
planYears = planYearsMapper.selectPlanYearsExamineList(ofYears);
|
|
planYears = planYearsMapper.selectPlanYearsExamineList(ofYears);
|
|
@@ -160,9 +162,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public List<PlanYears> selectPlanYearsExamineListEXP(PlanYearsStandardVo vo) {
|
|
|
|
|
|
+ public List<PlanYearsResponseVo> selectPlanYearsExamineListEXP(PlanYearsStandardVo vo) {
|
|
List<PlanYears> list = new ArrayList<>();
|
|
List<PlanYears> list = new ArrayList<>();
|
|
- List<PlanYears> planYearsList = new ArrayList<>();
|
|
|
|
|
|
+ List<PlanYearsResponseVo> planYearsList = new ArrayList<>();
|
|
try {
|
|
try {
|
|
int num = 1;
|
|
int num = 1;
|
|
int size = 200;
|
|
int size = 200;
|
|
@@ -507,7 +509,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public AjaxResult sendLetter(PlanYearsStandardVo yearsStandardVo) {
|
|
public AjaxResult sendLetter(PlanYearsStandardVo yearsStandardVo) {
|
|
- int review = planYearsMapper.sendLetter(yearsStandardVo.getPlanYearId());
|
|
|
|
|
|
+ int review = planYearsMapper.sendLetter(yearsStandardVo);
|
|
if (review != 1) {
|
|
if (review != 1) {
|
|
return AjaxResult.error("项目状态数据异常");
|
|
return AjaxResult.error("项目状态数据异常");
|
|
}
|
|
}
|
|
@@ -799,6 +801,38 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
return AjaxResult.success(pmDemands.size());
|
|
return AjaxResult.success(pmDemands.size());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public AjaxResult demandUnitWillManipulateTotal() {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 查询需求单位待办事项(计划待提交)
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public AjaxResult planWaitCommit() {
|
|
|
|
+ LambdaQueryWrapper<PlanYears> yearsLp = new LambdaQueryWrapper<PlanYears>();
|
|
|
|
+ yearsLp.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete);
|
|
|
|
+ yearsLp.eq(PlanYears::getProjectStatus, ProjectStatus.PLANWAITCOMMIT.getCode());
|
|
|
|
+ List<PlanYears> planYears = planYearsMapper.selectList(yearsLp);
|
|
|
|
+
|
|
|
|
+ LambdaQueryWrapper<PlanQuarter> quarterLp = new LambdaQueryWrapper<PlanQuarter>();
|
|
|
|
+ quarterLp.eq(PlanQuarter::getDelFlay, DataIsDelete.DataNOTDelete);
|
|
|
|
+ quarterLp.eq(PlanQuarter::getProjectStatus, ProjectStatus.PLANWAITCOMMIT.getCode());
|
|
|
|
+ List<PlanQuarter> planQuarters = planQuarterMapper.selectList(quarterLp);
|
|
|
|
+
|
|
|
|
+ List<PlanYearsResponseVo> yearsRes = changeTo(planYears);
|
|
|
|
+ List<PlanQuarterResponseVo> quarterRes = quartzServiceImpl.changeTo(planQuarters);
|
|
|
|
+ for (PlanYearsResponseVo yearsRe : yearsRes) {
|
|
|
|
+ PlanQuarterResponseVo responseVo = new PlanQuarterResponseVo();
|
|
|
|
+ BeanUtils.copyProperties(yearsRe, responseVo);
|
|
|
|
+ quarterRes.add(responseVo);
|
|
|
|
+ }
|
|
|
|
+ return AjaxResult.success(quarterRes);
|
|
|
|
+ }
|
|
|
|
+
|
|
//判断是否为超额计划
|
|
//判断是否为超额计划
|
|
public String isExcessOrNo(String projectType, BigDecimal evaluation) {
|
|
public String isExcessOrNo(String projectType, BigDecimal evaluation) {
|
|
BigDecimal threshold = new BigDecimal(0);
|
|
BigDecimal threshold = new BigDecimal(0);
|
|
@@ -826,15 +860,16 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
}
|
|
}
|
|
|
|
|
|
//字段赋值对应的名称
|
|
//字段赋值对应的名称
|
|
- public List<PlanYears> changeTo(List<PlanYears> planYears) {
|
|
|
|
-
|
|
|
|
|
|
+ public List<PlanYearsResponseVo> changeTo(List<PlanYears> planYears) {
|
|
|
|
+ //获取字典数据
|
|
HashMap<String, HashMap<String, String>> planEnums = dictTypeService.getAboutEnums();
|
|
HashMap<String, HashMap<String, String>> planEnums = dictTypeService.getAboutEnums();
|
|
HashMap<String, String> projectTypesMap = planEnums.get("projectTypes");
|
|
HashMap<String, String> projectTypesMap = planEnums.get("projectTypes");
|
|
HashMap<String, String> planPurchaseModesMap = planEnums.get("planPurchaseModes");
|
|
HashMap<String, String> planPurchaseModesMap = planEnums.get("planPurchaseModes");
|
|
HashMap<String, String> projectAttributes = planEnums.get("projectAttributes");
|
|
HashMap<String, String> projectAttributes = planEnums.get("projectAttributes");
|
|
HashMap<String, String> purchaseServices = planEnums.get("purchaseServices");
|
|
HashMap<String, String> purchaseServices = planEnums.get("purchaseServices");
|
|
- List<PlanYears> list = new ArrayList<PlanYears>();
|
|
|
|
|
|
+ List<PlanYearsResponseVo> list = new ArrayList<PlanYearsResponseVo>();
|
|
for (PlanYears planYear : planYears) {
|
|
for (PlanYears planYear : planYears) {
|
|
|
|
+ PlanYearsResponseVo responseVo = new PlanYearsResponseVo();
|
|
SysDeptResponseVo sysDeptResponseVo = (SysDeptResponseVo) deptService.selectDeptById(Long.valueOf(planYear.getPurchaseDeptId())).get("sysDept");
|
|
SysDeptResponseVo sysDeptResponseVo = (SysDeptResponseVo) deptService.selectDeptById(Long.valueOf(planYear.getPurchaseDeptId())).get("sysDept");
|
|
planYear.setPurchaseDeptName(sysDeptResponseVo.getDeptName());
|
|
planYear.setPurchaseDeptName(sysDeptResponseVo.getDeptName());
|
|
|
|
|
|
@@ -879,8 +914,8 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- list.add(planYear);
|
|
|
|
|
|
+ BeanUtils.copyProperties(planYear, responseVo);
|
|
|
|
+ list.add(responseVo);
|
|
}
|
|
}
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|