|
@@ -11,11 +11,10 @@ import com.ruoyi.common.core.domain.model.LoginUser;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
-import com.ruoyi.system.domain.project.BmProject;
|
|
|
|
-import com.ruoyi.system.domain.project.BmProjectStatus;
|
|
|
|
|
|
+import com.ruoyi.system.domain.project.*;
|
|
import com.ruoyi.system.domain.vo.BmDeptPlanVo;
|
|
import com.ruoyi.system.domain.vo.BmDeptPlanVo;
|
|
import com.ruoyi.system.mapper.SysDictDataMapper;
|
|
import com.ruoyi.system.mapper.SysDictDataMapper;
|
|
-import com.ruoyi.system.mapper.project.BmProjectMapper;
|
|
|
|
|
|
+import com.ruoyi.system.mapper.project.*;
|
|
import com.ruoyi.system.service.project.IBmProjectService;
|
|
import com.ruoyi.system.service.project.IBmProjectService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -37,6 +36,40 @@ public class BmProjectServiceImpl implements IBmProjectService {
|
|
@Autowired
|
|
@Autowired
|
|
private SysDictDataMapper dictDataMapper;
|
|
private SysDictDataMapper dictDataMapper;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmProjectInfoMapper bmProjectInfoMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmProjectPersionMapper bmProjectPersionMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmProjectInvestorMapper bmProjectInvestorMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmCompanyShareholderMapper bmCompanyShareholderMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmProjectOrderinfoMapper bmProjectOrderinfoMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmProjectConstructionMapper bmProjectConstructionMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmConstructionRateMapper bmConstructionRateMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmConstructionEqMapper bmConstructionEqMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmConstructionPayMapper bmConstructionPayMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmConstructionPayInfoMapper bmConstructionPayInfoMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private BmProjectProductMapper bmProjectProductMapper;
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询项目(添加线索)
|
|
* 查询项目(添加线索)
|
|
*
|
|
*
|
|
@@ -140,16 +173,67 @@ public class BmProjectServiceImpl implements IBmProjectService {
|
|
if (projectStatus.equals(EXAMINE_COMMIT) && code.equals(EXAMINE_BACK)) {
|
|
if (projectStatus.equals(EXAMINE_COMMIT) && code.equals(EXAMINE_BACK)) {
|
|
return AjaxResult.error("无法继续驳回");
|
|
return AjaxResult.error("无法继续驳回");
|
|
}
|
|
}
|
|
- if((projectStatus & 1) == 0 && code.equals(EXAMINE_COMMIT) ){
|
|
|
|
- //是偶数并且还是提交审核
|
|
|
|
- return AjaxResult.error("正在等待审核");
|
|
|
|
- }else if ((projectStatus & 1) == 1 && code.equals(EXAMINE_BACK)){
|
|
|
|
- //是奇数并且还是驳回审核或者审核通过
|
|
|
|
- return AjaxResult.error("当前已审核通过");
|
|
|
|
- }else if ((projectStatus & 1) == 1 && code.equals(EXAMINE_PASS)){
|
|
|
|
- //是奇数并且还是驳回审核或者审核通过
|
|
|
|
- return AjaxResult.error("当前已审核通过");
|
|
|
|
- }
|
|
|
|
|
|
+ if ((projectStatus & 1) == 0 && code.equals(EXAMINE_COMMIT)) {
|
|
|
|
+ //是偶数并且还是提交审核
|
|
|
|
+ return AjaxResult.error("正在等待审核");
|
|
|
|
+ } else if ((projectStatus & 1) == 1 && code.equals(EXAMINE_BACK)) {
|
|
|
|
+ //是奇数并且还是驳回审核
|
|
|
|
+ return AjaxResult.error("当前已审核通过");
|
|
|
|
+ } else if ((projectStatus & 1) == 1 && code.equals(EXAMINE_PASS)) {
|
|
|
|
+ //是奇数并且还是审核通过
|
|
|
|
+ return AjaxResult.error("当前已审核通过");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //如果是提交审核判断相应信息是否填写
|
|
|
|
+ if (code.equals(EXAMINE_COMMIT)) {
|
|
|
|
+ if (projectStatus.equals(EXAMINE_COMMIT)) {
|
|
|
|
+ //当前是新增线索,然后提交线索,需要判断是否有对应的bm_project_info中id和bm_project_persion中id或者bm_project_investor中id
|
|
|
|
+ BmProjectInfo bmProjectInfo = bmProjectInfoMapper.selectBmProjectInfoById(projectId);
|
|
|
|
+ if (bmProjectInfo != null) {
|
|
|
|
+ BmProjectInvestor bmProjectInvestor = bmProjectInvestorMapper.selectBmProjectInvestorByProjectId(projectId);
|
|
|
|
+ BmProjectPersion bmProjectPersion = bmProjectPersionMapper.selectBmProjectPersionByProjectId(projectId);
|
|
|
|
+ if (bmProjectInvestor == null && bmProjectPersion == null) {
|
|
|
|
+ return AjaxResult.error("信息不全,请补全后重新提交");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ return AjaxResult.error("信息不全,请补全后重新提交");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (projectStatus.equals(EXAMINE_PASS)) {
|
|
|
|
+ //提交签约审核申请,判断bm_company_shareholder和bm_project_orderinfo
|
|
|
|
+ BmProjectOrderinfo bmProjectOrderinfo = bmProjectOrderinfoMapper.selectBmProjectOrderinfoById(projectId);
|
|
|
|
+ if (bmProjectOrderinfo != null) {
|
|
|
|
+ BmCompanyShareholder bmCompanyShareholder = bmCompanyShareholderMapper.selectBmCompanyShareholderByProjectId(projectId);
|
|
|
|
+ if (bmCompanyShareholder == null) {
|
|
|
|
+ return AjaxResult.error("信息不全,请补全后重新提交");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ return AjaxResult.error("信息不全,请补全后重新提交");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (projectStatus.equals(EXAMINE_FIVE)) {
|
|
|
|
+ //提交在建信息审核申请
|
|
|
|
+ //判断bm_project_construction/bm_construction_rate/bm_construction_eq/bm_construction_pay/bm_construction_payinfo
|
|
|
|
+ BmProjectConstruction bmProjectConstruction = bmProjectConstructionMapper.selectBmProjectConstructionById(projectId);
|
|
|
|
+ BmConstructionRate bmConstructionRate = bmConstructionRateMapper.selectBmConstructionRateById(projectId);
|
|
|
|
+ BmConstructionEq bmConstructionEq = bmConstructionEqMapper.selectBmConstructionEqByProjectId(projectId);
|
|
|
|
+ BmConstructionPay bmConstructionPay = bmConstructionPayMapper.selectBmConstructionPayByProjectId(projectId);
|
|
|
|
+ BmConstructionPayInfo bmConstructionPayInfo = bmConstructionPayInfoMapper.selectBmConstructionPayInfoById(projectId);
|
|
|
|
+ if (bmProjectConstruction == null || bmConstructionRate == null || bmConstructionEq == null || bmConstructionPay == null || bmConstructionPayInfo == null) {
|
|
|
|
+ return AjaxResult.error("信息不全,请补全后重新提交");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (projectStatus.equals(EXAMINE_SEVEN)){
|
|
|
|
+ //提交投产审核判断bm_project_product
|
|
|
|
+ BmProjectProduct bmProjectProduct = bmProjectProductMapper.selectBmProjectProductById(projectId);
|
|
|
|
+ if (bmProjectProduct == null){
|
|
|
|
+ return AjaxResult.error("信息不全,请补全后重新提交");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
//查询项目状态最多有多少个
|
|
//查询项目状态最多有多少个
|
|
List<SysDictData> dictDataList = dictDataMapper.selectDictDataByType("project_status");
|
|
List<SysDictData> dictDataList = dictDataMapper.selectDictDataByType("project_status");
|
|
|
|
|
|
@@ -164,11 +248,21 @@ public class BmProjectServiceImpl implements IBmProjectService {
|
|
BmProject bmProjectNew = new BmProject();
|
|
BmProject bmProjectNew = new BmProject();
|
|
bmProjectNew.setId(projectId);
|
|
bmProjectNew.setId(projectId);
|
|
bmProjectNew.setProjectStatus(projectStatus);
|
|
bmProjectNew.setProjectStatus(projectStatus);
|
|
- if (dictDataList.size() > 0){
|
|
|
|
|
|
+ if (dictDataList.size() > 0) {
|
|
for (SysDictData sysDictData : dictDataList) {
|
|
for (SysDictData sysDictData : dictDataList) {
|
|
- if (sysDictData.getDictValue().equals(projectStatus.toString())){
|
|
|
|
|
|
+ if (sysDictData.getDictValue().equals(projectStatus.toString())) {
|
|
StringBuilder sb = new StringBuilder(DateUtils.getTime());
|
|
StringBuilder sb = new StringBuilder(DateUtils.getTime());
|
|
- sb.append("<br>").append("[").append(sysDictData.getDictLabel()).append("]");
|
|
|
|
|
|
+ sb.append("<br>").append("[");
|
|
|
|
+ if (code.equals(EXAMINE_BACK)){
|
|
|
|
+ //如果是驳回,保存驳回建议
|
|
|
|
+ String remark = bmProjectStatus.getRemark();
|
|
|
|
+ if (StringUtils.isNotBlank(remark)){
|
|
|
|
+ sb.append(remark);
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ sb.append(sysDictData.getDictLabel());
|
|
|
|
+ }
|
|
|
|
+ sb.append("]");
|
|
bmProjectNew.setRemark(sb.toString());
|
|
bmProjectNew.setRemark(sb.toString());
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -182,6 +276,7 @@ public class BmProjectServiceImpl implements IBmProjectService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 首页查询待审核列表
|
|
* 首页查询待审核列表
|
|
|
|
+ *
|
|
* @param bmProject
|
|
* @param bmProject
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -193,6 +288,7 @@ public class BmProjectServiceImpl implements IBmProjectService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 统计分析公共查询列表
|
|
* 统计分析公共查询列表
|
|
|
|
+ *
|
|
* @param ids
|
|
* @param ids
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -204,48 +300,50 @@ public class BmProjectServiceImpl implements IBmProjectService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 统计分析-在谈线索-柱状图
|
|
* 统计分析-在谈线索-柱状图
|
|
|
|
+ *
|
|
* @param year
|
|
* @param year
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> selectProjectEharts(String year) {
|
|
public Map<String, Object> selectProjectEharts(String year) {
|
|
List<BmDeptPlanVo> bmDeptPlanVos = bmProjectMapper.selectProjectEharts(year);
|
|
List<BmDeptPlanVo> bmDeptPlanVos = bmProjectMapper.selectProjectEharts(year);
|
|
- Map<String, Object> map = new HashMap<>(2);
|
|
|
|
|
|
+ Map<String, Object> map = new HashMap<>(2);
|
|
List<String> deptName = new ArrayList<>();
|
|
List<String> deptName = new ArrayList<>();
|
|
List<Integer> successMission = new ArrayList<>();
|
|
List<Integer> successMission = new ArrayList<>();
|
|
- if (bmDeptPlanVos.size() > 0){
|
|
|
|
|
|
+ if (bmDeptPlanVos.size() > 0) {
|
|
for (BmDeptPlanVo bmDeptPlanVo : bmDeptPlanVos) {
|
|
for (BmDeptPlanVo bmDeptPlanVo : bmDeptPlanVos) {
|
|
deptName.add(bmDeptPlanVo.getDeptName());
|
|
deptName.add(bmDeptPlanVo.getDeptName());
|
|
successMission.add(bmDeptPlanVo.getSuccessMission());
|
|
successMission.add(bmDeptPlanVo.getSuccessMission());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- map.put("x",deptName);
|
|
|
|
- map.put("y",successMission);
|
|
|
|
|
|
+ map.put("x", deptName);
|
|
|
|
+ map.put("y", successMission);
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 统计分析-签约项目-柱状图
|
|
* 统计分析-签约项目-柱状图
|
|
|
|
+ *
|
|
* @param year
|
|
* @param year
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> selectProjectContractEharts(String year) {
|
|
public Map<String, Object> selectProjectContractEharts(String year) {
|
|
List<BmDeptPlanVo> bmDeptPlanVos = bmProjectMapper.selectProjectContractEharts(year);
|
|
List<BmDeptPlanVo> bmDeptPlanVos = bmProjectMapper.selectProjectContractEharts(year);
|
|
- Map<String, Object> map = new HashMap<>(3);
|
|
|
|
|
|
+ Map<String, Object> map = new HashMap<>(3);
|
|
List<String> deptName = new ArrayList<>();
|
|
List<String> deptName = new ArrayList<>();
|
|
List<Integer> successMission = new ArrayList<>();
|
|
List<Integer> successMission = new ArrayList<>();
|
|
List<BigDecimal> totAmt = new ArrayList<>();
|
|
List<BigDecimal> totAmt = new ArrayList<>();
|
|
- if (bmDeptPlanVos.size() > 0){
|
|
|
|
|
|
+ if (bmDeptPlanVos.size() > 0) {
|
|
for (BmDeptPlanVo bmDeptPlanVo : bmDeptPlanVos) {
|
|
for (BmDeptPlanVo bmDeptPlanVo : bmDeptPlanVos) {
|
|
deptName.add(bmDeptPlanVo.getDeptName());
|
|
deptName.add(bmDeptPlanVo.getDeptName());
|
|
successMission.add(bmDeptPlanVo.getSuccessMission());
|
|
successMission.add(bmDeptPlanVo.getSuccessMission());
|
|
totAmt.add(bmDeptPlanVo.getTotAmt());
|
|
totAmt.add(bmDeptPlanVo.getTotAmt());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- map.put("x",deptName);
|
|
|
|
- map.put("y1",successMission);
|
|
|
|
- map.put("y2",totAmt);
|
|
|
|
|
|
+ map.put("x", deptName);
|
|
|
|
+ map.put("y1", successMission);
|
|
|
|
+ map.put("y2", totAmt);
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
}
|
|
}
|