|
|
@@ -9,6 +9,7 @@ import com.goafanti.common.dao.AmbInvestLogMapper;
|
|
|
import com.goafanti.common.dao.AmbInvestMapper;
|
|
|
import com.goafanti.common.dao.AmbSystemMapper;
|
|
|
import com.goafanti.common.enums.NoticeStatus;
|
|
|
+import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.AmbInvest;
|
|
|
import com.goafanti.common.model.AmbInvestLog;
|
|
|
import com.goafanti.common.model.AmbSystem;
|
|
|
@@ -62,12 +63,15 @@ public class AmbInvestServiceImpl extends BaseMybatisDao<AmbInvestMapper> implem
|
|
|
String aid="";
|
|
|
if (i==1){
|
|
|
aid=myAmb.getAccountant();
|
|
|
- str=str.append("[").append(myAmb.getName()).append("]负责人发起了对[").append(other.getName()).append("]"+"的金额投资,请及时确认!");
|
|
|
+ str=str.append("[").append(myAmb.getName()).append("]负责人发起了对[").append(other.getName()).append("]的金额投资,请及时确认!");
|
|
|
notceType=NoticeStatus.AMB_INVEST_START.getCode();
|
|
|
}else if (i==2){
|
|
|
str=str.append("发起的对[").append(other.getName()).append("]"+"的金额投资,已通过审核!");
|
|
|
notceType=NoticeStatus.AMB_INVEST_YES.getCode();
|
|
|
aid=myAmb.getLeader();
|
|
|
+ StringBuffer str2=new StringBuffer()
|
|
|
+ .append("[").append(myAmb.getName()).append("]负责人对[").append(other.getName()).append("]的金额投资已完成,请及时确认!");
|
|
|
+ asyncUtils.addNoticAndEmail(other.getLeader(),notceType ,str2.toString());
|
|
|
}else if (i==3){
|
|
|
str=str.append("发起的对[").append(other.getName()).append("]"+"的金额投资,已拒绝,请及时修改!");
|
|
|
notceType=NoticeStatus.AMB_INVEST_NO.getCode();
|
|
|
@@ -121,6 +125,9 @@ public class AmbInvestServiceImpl extends BaseMybatisDao<AmbInvestMapper> implem
|
|
|
@Transactional
|
|
|
public int updateExamineTransfer(InputAmbInvest in) {
|
|
|
AmbInvest ambInvest = ambInvestMapper.selectByPrimaryKey(in.getId());
|
|
|
+ if (ambInvest.getStatus()==2){
|
|
|
+ throw new BusinessException("重复通过。");
|
|
|
+ }
|
|
|
AmbSystem myAmb = ambSystemMapper.selectByPrimaryKey(ambInvest.getInitiateAmbId());
|
|
|
AmbSystem other=ambSystemMapper.selectByPrimaryKey(ambInvest.getAcceptAmbId());
|
|
|
AmbInvest newAmbInvest=new AmbInvest();
|