|
@@ -1,6 +1,9 @@
|
|
|
package com.ruoyi.system.service.impl;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
+
|
|
|
+import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.system.domain.investment.ZxInvestment;
|
|
@@ -9,6 +12,8 @@ import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.system.mapper.ZxInvestmentMapper;
|
|
|
import com.ruoyi.system.service.IZxInvestmentService;
|
|
|
|
|
|
+import static com.ruoyi.common.constant.CommonConstants.*;
|
|
|
+
|
|
|
/**
|
|
|
* 政协委员招商引资Service业务层处理
|
|
|
*
|
|
@@ -67,10 +72,18 @@ public class ZxInvestmentServiceImpl implements IZxInvestmentService
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@Override
|
|
|
- public int updateZxInvestment(ZxInvestment zxInvestment)
|
|
|
+ public AjaxResult updateZxInvestment(ZxInvestment zxInvestment)
|
|
|
{
|
|
|
+ ZxInvestment zxInvestmentNew = zxInvestmentMapper.selectZxInvestmentByInvestmentId(zxInvestment.getInvestmentId());
|
|
|
+ if (zxInvestment.getType().equals(TWO) && !Objects.equals(zxInvestmentNew.getType(), ONE)){
|
|
|
+ return AjaxResult.error("已签约或已审核");
|
|
|
+ }
|
|
|
+ if (zxInvestment.getType().equals(THR) && !Objects.equals(zxInvestmentNew.getType(), TWO)){
|
|
|
+ return AjaxResult.error("项目未已审核");
|
|
|
+ }
|
|
|
zxInvestment.setUpdateTime(DateUtils.getNowDate());
|
|
|
- return zxInvestmentMapper.updateZxInvestment(zxInvestment);
|
|
|
+ zxInvestmentMapper.updateZxInvestment(zxInvestment);
|
|
|
+ return AjaxResult.success();
|
|
|
}
|
|
|
|
|
|
/**
|