소스 검색

投资明细列表修改

anderx 3 년 전
부모
커밋
62e1a3f29c

+ 15 - 0
src/main/java/com/goafanti/ambSystem/controller/AmbInvestApiController.java

@@ -144,4 +144,19 @@ public class AmbInvestApiController extends CertifyApiController {
 		return res;
 	}
 
+	/**
+	 * 投资明细列表
+	 * @return
+	 */
+	@RequestMapping(value="/AmbIncomeDtailsList",method = RequestMethod.GET)
+	public Result AmbIncomeDtailsList(Long id){
+		Result res =new Result();
+		if (id==null){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"当前阿米巴","当前阿米巴"));
+			return res;
+		}
+		res.data(ambInvestService.AmbIncomeDtailsList(id));
+		return res;
+	}
+
 }

+ 2 - 0
src/main/java/com/goafanti/ambSystem/service/AmbInvestService.java

@@ -25,4 +25,6 @@ public interface AmbInvestService {
     List<AmbSystem> getInvestAmbList(Long id);
 
     List<OutInvestList> AmbInvestDtailsList(Long id);
+
+    List<OutInvestList> AmbIncomeDtailsList(Long id);
 }

+ 11 - 4
src/main/java/com/goafanti/ambSystem/service/Impl/AmbInvestServiceImpl.java

@@ -78,15 +78,17 @@ public class AmbInvestServiceImpl extends BaseMybatisDao<AmbInvestMapper> implem
             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());
+            if(other.getLeader()!=null){
+                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();
             aid=myAmb.getLeader();
         }
-            asyncUtils.addNoticAndEmail(aid,notceType ,str.toString());
+           if(aid!=null) asyncUtils.addNoticAndEmail(aid,notceType ,str.toString());
     }
 
     @Override
@@ -187,4 +189,9 @@ public class AmbInvestServiceImpl extends BaseMybatisDao<AmbInvestMapper> implem
 
         return ambInvestMapper.selectAmbInvestDtailsList(id);
     }
+
+    @Override
+    public List<OutInvestList> AmbIncomeDtailsList(Long id) {
+        return ambInvestMapper.selectAmbIncomeDtailsList(id);
+    }
 }

+ 4 - 0
src/main/java/com/goafanti/common/dao/AmbInvestMapper.java

@@ -21,4 +21,8 @@ public interface AmbInvestMapper {
     Integer selectCountAmountById(Long id);
 
     List<OutInvestList> selectAmbInvestDtailsList(Long id);
+
+
+
+    List<OutInvestList> selectAmbIncomeDtailsList(Long id);
 }

+ 2 - 2
src/main/java/com/goafanti/common/mapper/AmbInvestMapper.xml

@@ -167,7 +167,7 @@
            b.name initiateName,c.name acceptName,d.name operator
     from amb_invest  a left join amb_system b on a.initiate_amb_id =b.id
     left join amb_system c on a.accept_amb_id =c.id left join admin d on a.operator =d.id
-    where a.accept_amb_id = #{id} and a.status =2
-
+    where (a.accept_amb_id = #{id} or a.initiate_amb_id= #{id})
+      and a.status =2
   </select>
 </mapper>