Browse Source

新创建的账户开立的类与xml和方法

chb 7 years ago
parent
commit
d814a28ebc
20 changed files with 699 additions and 221 deletions
  1. 37 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/AccountMaintenanceDao.java
  2. 3 3
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/AccountOpenDao.java
  3. 11 4
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/test.java
  4. 1 1
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/AccountOpeningRecord.java
  5. 2 14
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/CapitalTransfer.java
  6. 42 26
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/PromptLetter.java
  7. 16 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/User.java
  8. 108 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/AccountMaintenance.xml
  9. 31 56
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/AccountOpenMapper.xml
  10. 11 10
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/CapitalTransferMapper.xml
  11. 15 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/AccountMaintenanceMapper.java
  12. 1 5
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/AccountOpenMapper.java
  13. 226 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/AccountMaintenanceService.java
  14. 36 61
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/AccountOpenService.java
  15. 12 14
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/CapitalTransferService.java
  16. 119 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/AccountMaintenanceAction.java
  17. 7 3
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/AccountOpenAction.java
  18. 2 4
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/CapitalTransferAction.java
  19. 17 18
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/PromptLetterAction.java
  20. 2 2
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/ValuationAccountingAction.java

+ 37 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/AccountMaintenanceDao.java

@@ -0,0 +1,37 @@
+package com.fuzamei.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.fuzamei.entity.AccountOpeningRecord;
+import com.fuzamei.mapperInterface.AccountMaintenanceMapper;
+@Repository
+public class AccountMaintenanceDao {
+	@Autowired
+	private AccountMaintenanceMapper accountMaintenanceMapper;
+	
+	
+	public  void  insertIntoAccountMaintenanceInfo(Map<String, Object> map) {
+		accountMaintenanceMapper.insertIntoAccountMaintenanceInfo(map);
+	}
+	public  void  insertAccountMaintenanceInfoFuJianBiao(Map<String, Object> map) {
+		accountMaintenanceMapper.insertAccountMaintenanceInfoFuJianBiao(map);
+	}
+	public  void  insertAccountMaintenanceInfoOperationHistory(Map<String, Object> map) {
+		accountMaintenanceMapper.insertAccountMaintenanceInfoOperationHistory(map);
+	}
+	public List<AccountOpeningRecord> selectAccountMaintenanceInfo(Map<String, Object> map){
+		return accountMaintenanceMapper.selectAccountMaintenanceInfo(map);
+	}
+	public  int selectCountAccountMaintenancePage() {
+		return accountMaintenanceMapper.selectCountAccountMaintenancePage();
+	}
+	
+	
+	
+	
+	
+}

+ 3 - 3
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/AccountOpenDao.java

@@ -21,7 +21,7 @@ public class AccountOpenDao {
 		public  int  serchCountPage(){//总页数
 			return  mapperDao.serchCountPage();
 		}
-		public List<PromptLetter> selectPromptLetter(Map<String, Object> map){//查询风险提示函
+		public List<PromptLetter> selectPromptLetter(Map<String, Object> map){//查询风险提示函  管理人接收人
 			return mapperDao.selectPromptLetter(map);
 		}
 		public  int  serchCountPage2(){//总页
@@ -33,7 +33,7 @@ public class AccountOpenDao {
 		public void insertOperationHistory(Map<String, Object> map) {//插入到操作记录表     公共用
 			mapperDao.insertOperationHistory(map);
 		}
-		public List<PromptLetter> selectTishihan(Map<String, Object> map){//查询风险提示函3
+		public List<PromptLetter> selectTishihan(Map<String, Object> map){//查询风险提示函3   发送人
 			return mapperDao.selectTishihan(map);
 		}
 		public void insertTrueFalseSelect(Map<String, Object> map) {//真伪查询   记录插入到附件表
@@ -58,7 +58,7 @@ public class AccountOpenDao {
 		public List<AccountOpeningRecord> selectAccountopenNoPage(Map<String, Object> map){////账户开立 通过点击查看  供应下载页面  
 			return  mapperDao.selectAccountopenNoPage(map);		
          }
-		
+		////////////////////////////////////////////////////////////////////////////////////////////////
 		
 		
 		

+ 11 - 4
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/test.java

@@ -10,6 +10,8 @@ import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 
 public class test {
 /*public static void main(String[] args) {
@@ -31,14 +33,19 @@ public static void main(String[] args) throws MalformedURLException  {
 	System.out.println(ss+"哈jhvbebhvbhvhvb");
 	System.out.println( System.currentTimeMillis()+"eeeeee");*/
 
-	  String photoUrl = "https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png";                                      
+	/*  String photoUrl = "https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png";                                      
 	  String fileName = photoUrl.substring(photoUrl.lastIndexOf("/"));   
       //System.out.println("fileName---->"+fileName);  
       String filePath = "D:\\picture";    
       File file = saveUrlAs(photoUrl, filePath + fileName,"GET");    
-      System.out.println("zzz" + file);  
-	
-	
+      System.out.println("zzz" + file);*/  
+      //System.out.println(Math.round(Math.random()*8999+100));
+	SimpleDateFormat sdf=new SimpleDateFormat("MMddHHmmss");
+	String str=sdf.format(new Date()).substring(6)+Math.round(Math.random()*8999+100);
+	System.out.println(str+"随机数是");
+	 SimpleDateFormat df = new SimpleDateFormat("yyyyMMHHmmss");
+	    String ss=  df.format(new Date());
+	    System.out.println(ss+"shijian ");
     }   
 	
 public static File saveUrlAs(String url,String filePath,String method){  

+ 1 - 1
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/AccountOpeningRecord.java

@@ -8,9 +8,9 @@ public class AccountOpeningRecord {
 	private int customer_id;//客户编号
 	private String customer_name;//客户名称
 	private String bank_account;//银行账号
-	private String basic_data_id;//客户基本资料id
 	private String letter_of_commitment_id;//账户承诺书id
 	private String application_id;//开户申请书id
+	private String basic_data_id;//其他凭证id
 	private long update_time;//更新时间
 	private int  status_id;//状态id
 	private String hash;//哈希码

+ 2 - 14
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/CapitalTransfer.java

@@ -6,10 +6,10 @@ public class CapitalTransfer {
 	private int fund_id;//基金id
 	private int custodian;//管理人
 	private String  fund_name;//基金名称
-	private double account_balance;//账户余额
+	//private double account_balance;//账户余额   去掉 放到用户表里
 	private double sum_of_money;//划款金额
 	private int  basis_of_payment;//划款依据
-	private String drawing_account;//划款账户
+	//private String drawing_account;//划款账户  去掉 放到用户表里
 	private long apply_time;//申请时间
 	private long handle_time;//处理时间
 	private int status_id;//状态id
@@ -65,12 +65,6 @@ public class CapitalTransfer {
 	public void setFund_name(String fund_name) {
 		this.fund_name = fund_name;
 	}
-	public double getAccount_balance() {
-		return account_balance;
-	}
-	public void setAccount_balance(double account_balance) {
-		this.account_balance = account_balance;
-	}
 	public double getSum_of_money() {
 		return sum_of_money;
 	}
@@ -83,12 +77,6 @@ public class CapitalTransfer {
 	public void setBasis_of_payment(int basis_of_payment) {
 		this.basis_of_payment = basis_of_payment;
 	}
-	public String getDrawing_account() {
-		return drawing_account;
-	}
-	public void setDrawing_account(String drawing_account) {
-		this.drawing_account = drawing_account;
-	}	
 	public long getHandle_time() {
 		return handle_time;
 	}

+ 42 - 26
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/PromptLetter.java

@@ -3,78 +3,94 @@ package com.fuzamei.entity;
 import java.util.Date;
 //提示函表
 public class PromptLetter {
-	private int id;//主键id
-	private int prompt_letter_id;//提示函id
+	private Integer id;//主键id
+	private Integer prompt_letter_id;//提示函id
 	private String prompt_letter_name;//提示函名称
 	private String send_person;//发送人
 	private String receive_person;//接收人
-	private long send_time;//发送时间
-	private long receive_time;//接收时间
+	private Long send_time;//发送时间
+	private Long receive_time;//接收时间
 	private String hash;//哈希码
 	
 	private String attachment_name;/**附件表账号名称**/
+	private String person_name;/**用户表管理人名字**/
+
 	
-	
-	public int getId() {
-		return id;
-	}
-	public String getAttachment_name() {
-		return attachment_name;
+	public String getPerson_name() {
+		return person_name;
 	}
-	public void setAttachment_name(String attachment_name) {
-		this.attachment_name = attachment_name;
+	public void setPerson_name(String person_name) {
+		this.person_name = person_name;
 	}
-	public void setId(int id) {
+
+	public void setId(Integer id) {
 		this.id = id;
 	}
-	public int getPrompt_letter_id() {
+	public Integer getId() {
+		return id;
+	}
+
+	public Integer getPrompt_letter_id() {
 		return prompt_letter_id;
 	}
-	public void setPrompt_letter_id(int prompt_letter_id) {
+	public void setPrompt_letter_id(Integer prompt_letter_id) {
 		this.prompt_letter_id = prompt_letter_id;
 	}
+
 	public String getPrompt_letter_name() {
 		return prompt_letter_name;
 	}
+
 	public void setPrompt_letter_name(String prompt_letter_name) {
 		this.prompt_letter_name = prompt_letter_name;
 	}
+
 	public String getSend_person() {
 		return send_person;
 	}
+
 	public void setSend_person(String send_person) {
 		this.send_person = send_person;
 	}
+
 	public String getReceive_person() {
 		return receive_person;
 	}
+
 	public void setReceive_person(String receive_person) {
 		this.receive_person = receive_person;
 	}
-	public long getSend_time() {
+
+	public Long getSend_time() {
 		return send_time;
 	}
-	public void setSend_time(long send_time) {
+
+	public void setSend_time(Long send_time) {
 		this.send_time = send_time;
 	}
-	public long getReceive_time() {
+
+	public Long getReceive_time() {
 		return receive_time;
 	}
-	public void setReceive_time(long receive_time) {
+
+	public void setReceive_time(Long receive_time) {
 		this.receive_time = receive_time;
 	}
+
 	public String getHash() {
 		return hash;
 	}
+
 	public void setHash(String hash) {
 		this.hash = hash;
 	}
-	
-	
-	
-	
-	
-	
-	
+
+	public String getAttachment_name() {
+		return attachment_name;
+	}
+
+	public void setAttachment_name(String attachment_name) {
+		this.attachment_name = attachment_name;
+	}
 	
 }

+ 16 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/User.java

@@ -33,6 +33,22 @@ public class User implements Serializable{
 	@NotBlank(message = "签名不能为空字符串或者null",groups = {SIGN.class})
 	private String sign;			//注册时候的签名
 	
+	private double account_balance;//账户余额
+	private String drawing_account;//划款账户
+	
+	
+	public double getAccount_balance() {
+		return account_balance;
+	}
+	public void setAccount_balance(double account_balance) {
+		this.account_balance = account_balance;
+	}
+	public String getDrawing_account() {
+		return drawing_account;
+	}
+	public void setDrawing_account(String drawing_account) {
+		this.drawing_account = drawing_account;
+	}
 	public int getId() {
 		return id;
 	}

+ 108 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/AccountMaintenance.xml

@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fuzamei.mapperInterface.AccountMaintenanceMapper"> 
+    <!--查询账户开立信息维护   列表-->
+	<select id="selectAccountMaintenanceInfo" parameterType="java.util.Map" resultType="com.fuzamei.entity.AccountOpeningRecord">
+		select 
+			customer_id,
+			customer_name,
+			bank_account,
+			f.attachment_name as basic_data_id,
+			f1.attachment_name as letter_of_commitment_id,
+			f2.attachment_name as application_id,
+			update_time,s.status_name 
+		from  
+			      account_opening_record a
+		LEFT JOIN  attachment f
+		
+			on a.basic_data_id=f.attachment_id 
+	  	LEFT JOIN	attachment f1
+	  	on	a.letter_of_commitment_id = f1.attachment_id 
+	  	LEFT JOIN attachment f2
+	  	on	a.application_id= f2.attachment_id 
+	  	LEFT JOIN status s
+	  	on a.status_id = s.status_id
+	 <where>
+		    <if test="customer_name!='' and customer_name!=null ">
+			  customer_name=#{customer_name}
+			</if>
+			<if test="bank_account!='' and bank_account!=null">
+			  and bank_account=#{bank_account}
+			</if>
+		   	<if test="startTime!='' and endTime != ''">
+			  and a.update_time  between #{startTime} and #{endTime}
+			</if>
+	 </where>
+	             order by update_time desc
+	            limit #{startPage},#{rowNum}
+	</select>
+	
+	<!--查询账户维护开立信息总页数  返回一个int类型  -->
+	<select id="selectCountAccountMaintenancePage" resultType="int">
+	  select count(*) from account_opening_record
+	</select>
+	
+	<!-- 添加上传账户维护信息表 -->
+    <insert id="insertIntoAccountMaintenanceInfo" parameterType="java.util.Map">
+    	   insert into account_opening_record(
+	              customer_id,
+	              customer_name,
+	              bank_account,
+	              basic_data_id,
+	              letter_of_commitment_id,
+	              application_id,
+	              update_time,
+	              status_id,
+	              hash)
+	       values(
+	            #{customer_id},
+	            #{customer_name},
+	            #{bank_account},
+	            #{basicAttachment_id},
+	            #{letterAttachment_id},
+	            #{applicationAttachment_id},
+	            #{update_time},
+	            #{status_id},
+	            #{hash}
+	            )
+    </insert>
+    
+    <!-- 上传其他凭证,承诺书,开户申请书    经办支行添加创建账号和客户名称  上传到附件表--> 
+	<insert id="insertAccountMaintenanceInfoFuJianBiao" parameterType="java.util.Map">
+	     	   <!--  插入到附件表-->
+		   insert into attachment (
+		                attachment_id,
+		                attachment_name,
+		                url,
+		                upload_person_id,
+		                create_time) 
+		          values(
+		               #{attachment_id},
+		               #{attachment_name},
+		               #{url},
+		               #{upload_person_id},
+		               #{create_time} )
+	</insert>
+	
+	<!-- 当经办支行进行账户开立维护上传的时候往(操作记录表)中插入一条数据    可公用-->
+	<insert id="insertAccountMaintenanceInfoOperationHistory">
+			insert into 
+				operation_history(operator_type_id,
+								  operator_account,
+								  operator_role,
+								  operator_person,
+								  operator_time,
+								  hash)
+			values(#{operatorTypeId},
+				   #{operatorAccount},
+				   #{operatorRole},
+				   #{operatorPerson},
+				   #{operatorTime},
+				   #{hash})
+	</insert>
+
+
+
+
+
+</mapper>

+ 31 - 56
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/AccountOpenMapper.xml

@@ -23,9 +23,11 @@
 	</where>
 	   order by update_time desc
 	   limit #{startNum},10 -->
+	<!--查询账户开立  返回总页数-->
 	<select id="serchCountPage" resultType="int">
 	  select count(*)  from account_opening_record  
 	</select>
+	<!--查询资金划转 返回总页数  -->
 	<select id="serchCountPage2" resultType="int">
 	  select count(*)  from prompt_letter
 	</select>
@@ -64,30 +66,25 @@
 	   limit #{startPage},#{rowNum}
 	</select> -->
 	<!-- ************************************************************************************************** -->
-	<!--提示函  管理人接收的 列表 -->
+	<!--提示函  管理人接收的 列表   没用左链接不可以话在改-->
+	<!-- select   t.prompt_letter_id,f.attachment_name,  t.receive_time ,f.url from  prompt_letter t left join attachment f on t.prompt_letter_id=f.attachment_id    order by receive_time desc -->
 	<select id="selectPromptLetter" parameterType="java.util.Map" resultType="com.fuzamei.entity.PromptLetter">
-	 select  t.prompt_letter_id,
+	 select  
+	         t.prompt_letter_id,
              f.attachment_name,
-			 t.receive_time
-       from  prompt_letter t,
-             attachment f ,
-			 t_user y 
-		<where>
-		    t.prompt_letter_id=f.attachment_id 
-	      and   
-	         f.attachment_id =user_id
-		  <if test="startTime!='' and endTime != ''">
-		  and receive_time   between #{startTime} and #{endTime}
-		  </if>
-		</where>
+			 t.receive_time,
+			 f.url
+       from  
+       		prompt_letter t,
+             attachment f 
+       where
+		    t.prompt_letter_id=f.attachment_id and receive_time between #{startTime} and #{endTime}
 		      order by receive_time desc
 	          limit #{startPage},#{rowNum}
 	</select>
 	<!--*********************************************************************************************  -->
 	<!-- 提示函  插入管理人账号     -->
 	<insert id="insertTiShiHanOrUserOrOtherTable" parameterType="java.util.Map">
-	     insert  into  t_user(account) values(#{account})
-	  
 	    <!--先注释有改动 -->
 	    <!--  insert into attachment (
 	                attachment_id,
@@ -133,31 +130,11 @@
 			values(#{attachmentId},
 				   #{attachmentName},
 				   #{url},
-				   #{user_id},
+				   #{upload_person_id},
 				   #{create_time})
 	</insert> 
 	
-	
-	
-	
-	<!--暂时不用<select id="">
-		select    y.account,
-		          f.attachment_name ,
-				  f.url,
-		  from    t_user y   left  join  attachment f
-		        on 
-				  y.user_id= f.attachment_id
-		        left join   
-		          prompt_letter t
-		        on 
-		        f.attachment_id=t.prompt_letter_id 	 
-		      <where>
-		      	<if test="account!='' and account != ''">
-		      		y.account=#{account}
-		      	</if>
-              </where>
-	</select> -->
-	<!-- 当经办支行进行账户开立上传的时候往(操作记录表)中插入一条数据    公用-->
+    <!-- 当经办支行进行账户开立上传的时候往(操作记录表)中插入一条数据    公用-->
 	<insert id="insertOperationHistory">
 		insert into 
 			operation_history(operator_type_id,
@@ -173,23 +150,26 @@
 			   #{operatorTime},
 			   #{hash})
 	</insert>
-	<!--根据管理人账号查询出来  关系到附件表的id 上传的时候有插入到附件表和操作记录表-->
+	
+	<!--根据id查询出来   管理人 关系到附件表的id 上传的时候有插入到附件表和操作记录表-->
 	<select id="selectTishihanById" parameterType="java.util.Map" resultType="com.fuzamei.entity.User">
-		select  y.account from t_user y, attachment f where  y.user_id=f.attachment_id
+		select  y.person_name from t_user y, attachment f where  y.user_id=f.attachment_id
 	</select>
 	<!--**********************************************************************************************  -->
 	<!--发送记录查询风险提示函 ,省分行托管中心风管岗   发送时间列biao-->
 	<select id="selectTishihan" parameterType="java.util.Map" resultType="com.fuzamei.entity.PromptLetter">
-		select  t.prompt_letter_id ,
-		        y.person_name, 
-		        f.attachment_name ,
-		        t.send_time 
-		  from  prompt_letter t, 
-		        attachment f ,
-                t_user y
+	   select  
+	           t.prompt_letter_id , 
+	           y.person_name, 
+	           f.attachment_name,
+	           t.send_time 
+		from  
+		      prompt_letter t left join 
+              attachment f  
+          on  t.prompt_letter_id=f.attachment_id left join  t_user y
+		  on  t.send_person =user_id        
+	            
 		<where>
-		      t.prompt_letter_id=f.attachment_id  
-		 and  f.attachment_id =user_id 
 		    <if test="startTime!='' and endTime != ''">
 		    	and	send_time  between #{startTime} and #{endTime}
 		   </if>
@@ -256,7 +236,7 @@
 		               #{upload_person_id},
 		               #{create_time} )
 	</insert>
-<!-- *******************代替上面的用左链接************************************************* -->
+<!-- *******************代替上面的,用左链接************************************************* -->
  <select id="queryAllAccountOpening" resultType="com.fuzamei.entity.AccountOpeningRecord">
 	select 
 			customer_id,
@@ -310,13 +290,8 @@
 	  	on	a.letter_of_commitment_id = f1.attachment_id 
 	  	left  join attachment f2
 	  	on	a.application_id= f2.attachment_id 
-	  where
-		   customer_id=#{customer_id}
-		and
-		   customer_name=#{customer_name}
-		and 
-		 bank_account=#{bank_account}
 
+		 where  customer_id=#{customer_id}
 </select>
 	
 	

+ 11 - 10
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/CapitalTransferMapper.xml

@@ -118,11 +118,11 @@
 					   url,
 					   upload_person_id,
 					   create_time)
-		values(#{attachmentId},
-			   #{attachmentName},
+		values(#{attachment_id},
+			   #{attachment_name},
 			   #{url},
-			   #{userId},
-			   #{createTime})
+			   #{upload_person_id},
+			   #{create_time})
 	</insert>
     
     <!-- 当划转资金时  往操作记录表中插入一条数据 -->
@@ -134,11 +134,11 @@
 							  operator_person,
 							  operator_time,
 							  hash)
-		values(#{operatorTypeId},
-			   #{operatorAccount},
-			   #{operatorRole},
-			   #{operatorPerson},
-			   #{operatorTime},
+		values(#{operator_type_id},
+			   #{operator_account},
+			   #{operator_role},
+			   #{operator_person},
+			   #{operator_time},
 			   #{hash})
 	</insert>
     <!--**************************************  -->
@@ -149,7 +149,8 @@
 						   check_person,
 						   check_opinion,
 						   check_time,
-						   check_result,relation) 		
+						   check_result,
+						   relation) 		
 				values( #{fund_id},
 				       #{check_department},
 				       #{check_person},

+ 15 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/AccountMaintenanceMapper.java

@@ -0,0 +1,15 @@
+package com.fuzamei.mapperInterface;
+
+import java.util.List;
+import java.util.Map;
+
+import com.fuzamei.entity.AccountOpeningRecord;
+
+public interface AccountMaintenanceMapper {
+	public  void  insertIntoAccountMaintenanceInfo(Map<String, Object> map);//添加上传(文件)账户维护信息表 
+	public  void  insertAccountMaintenanceInfoFuJianBiao(Map<String, Object> map);//账户维护开立 上传一份数据到附件表
+	public  void  insertAccountMaintenanceInfoOperationHistory(Map<String, Object> map);//当经办支行进行账户开立维护上传文件的时候往(操作记录表)也插入一条数据
+	public List<AccountOpeningRecord> selectAccountMaintenanceInfo(Map<String, Object> map);//查询账户开立信息维护列表
+	public  int selectCountAccountMaintenancePage();//查询账户维护开立信息总页数  返回一个int类型
+	
+}

+ 1 - 5
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/AccountOpenMapper.java

@@ -11,20 +11,16 @@ public interface AccountOpenMapper {
 	public List<AccountOpeningRecord> queryAllAccountOpening(Map<String, Object> map);//查询账户开立列表
 	public  int serchCountPage();//总页数
 	public  int serchCountPage2();//提示函总页数
-	
 	public List<AccountOpeningRecord> selectAccountopenNoPage(Map<String, Object> map);//账户开立 通过点击查看  供应下载页面  
-	
 	public List<PromptLetter> selectPromptLetter(Map<String, Object> map);//查询风险提示函列表
 	public void insertOperationHistory(Map<String, Object> map);//账户开立上传的时候也往操作记录表插入一条数据     多方法公用
 	public void insertTiShiHanOrUserOrOtherTable(Map<String, Object> map);//插入管理人账号 还要往附件表,提示函表,操作记录表里也要加数据
-	//
 	public List<PromptLetter> selectTishihan(Map<String, Object> map);//查询风险提示函3 ,省分行拓托管中心风管岗
 	public void insertTrueFalseSelect(Map<String, Object> map);//真伪查询   记录插入到附件表
 	public void insertAccountUploadFile(Map<String, Object> map);//<!-- 上传客户资料,承诺书,开户申请书    经办支行添加创建账号和客户名称 -->
 	public void insertAccountUploadFileFuJianBiao(Map<String, Object> map);//<!-- 上传客户资料,承诺书,开户申请书    经办支行添加创建账号和客户名称 -->上传到附件表
-	
 	public void insertIntoPromptLetterTable(Map<String, Object> map);//数据往提示函插入
 	public void insertIntoAttachmentTable(Map<String, Object> map);//提示函数据在往附件表也插入
-	
+	////////////////////////////////////////////////////////////////////////////////////////
 	
 }

+ 226 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/AccountMaintenanceService.java

@@ -0,0 +1,226 @@
+package com.fuzamei.service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.fuzamei.dao.AccountMaintenanceDao;
+import com.fuzamei.entity.AccountOpeningRecord;
+import com.fuzamei.utils.PageDTO;
+
+@Service
+public class AccountMaintenanceService {
+   @Autowired
+   private AccountMaintenanceDao  accountMaintenanceDao;
+   private static final int ROW_NUM = 10; // 分页每页显示数据的数量
+    @Transactional
+	public void insertIntoAccountINfo(Map<String, Object> map) {
+		String customer_id="";   //ID   暂时注释
+		String customer_name="";//客户名称
+		String bank_account="";//银行账号
+		String hash="";//上传三个文件  应该产生几个hash值??????
+	
+		//省略几个直接put进去
+		String basicAttachment_id="";    //基本资料附件id
+		String basicAttachment_name="";  //基本资料附件名称
+		String basicUrl="";              //基本资料附件url
+		String basicUpload_person_id=""; //基本资料附件上传人的id
+	    long basicCreate_time=0;      //基本资料附件添加的时间
+		
+	    String  letterAttachment_id="";    //承诺书附件id
+		String letterAttachment_name="";  //承诺书附件名称
+		String letterUrl="";              //承诺书附件url
+		String letterUpload_person_id=""; //承诺书附件上传人的id
+	    long letterCreate_time=0;      //承诺书附件添加的时间
+	    
+	    String applicationAttachment_id="";    //开户申请书附件id
+		String applicationAttachment_name="";  //开户申请书附件名称
+		String applicationUrl="";              //开户申请书附件url
+		String applicationUpload_person_id=""; //开户申请书附件上传人的id
+	    long applicationCreate_time=0;      //开户申请书附件添加的时间
+	
+	    if (!"".equals(map.get("customer_id")) && map.get("customer_id") != null) { 
+	    	customer_id = String.valueOf(map.get("customer_id"));
+		}
+		if (!"".equals(map.get("customer_name")) && map.get("customer_name") != null) { 
+			customer_name = (String) map.get("customer_name");
+		}
+		if (!"".equals(map.get("bank_account")) && map.get("bank_account") != null) { 
+			bank_account = (String) map.get("bank_account");
+		}
+		
+		if (!"".equals(map.get("basicAttachment_id")) && map.get("basicAttachment_id") != null) { 
+			basicAttachment_id = String.valueOf(map.get("basicAttachment_id"));
+		}
+		if (!"".equals(map.get("basicAttachment_name")) && map.get("basicAttachment_name") != null) { 
+			basicAttachment_name = (String) map.get("basicAttachment_name");
+		}
+		if (!"".equals(map.get("basicUrl")) && map.get("basicUrl") != null) { 
+			basicUrl = (String) map.get("basicUrl");
+		}
+		if (!"".equals(map.get("basicUpload_person_id")) && map.get("basicUpload_person_id") != null) { 
+			basicUpload_person_id = (String) map.get("basicUpload_person_id");
+		}
+		if (!"".equals(map.get("basicCreate_time")) && map.get("basicCreate_time") != null) { 
+			basicCreate_time = (Long) map.get("basicCreate_time");
+		}
+		
+		if (!"".equals(map.get("letterAttachment_id")) && map.get("letterAttachment_id") != null) { 
+			letterAttachment_id =  String.valueOf(map.get("letterAttachment_id"));
+		}
+		if (!"".equals(map.get("letterAttachment_name")) && map.get("letterAttachment_name") != null) { 
+			letterAttachment_name = (String) map.get("letterAttachment_name");
+		}
+		if (!"".equals(map.get("letterUrl")) && map.get("letterUrl") != null) { 
+			letterUrl = (String) map.get("letterUrl");
+		}
+		if (!"".equals(map.get("letterUpload_person_id")) && map.get("letterUpload_person_id") != null) { 
+			letterUpload_person_id = (String) map.get("letterUpload_person_id");
+		}
+		if (!"".equals(map.get("letterCreate_time")) && map.get("letterCreate_time") != null) { 
+			letterCreate_time = (Long) map.get("letterCreate_time");
+		}
+		
+		if (!"".equals(map.get("applicationAttachment_id")) && map.get("applicationAttachment_id") != null) { 
+			applicationAttachment_id = String.valueOf(map.get("applicationAttachment_id"));
+		}
+		if (!"".equals(map.get("applicationAttachment_name")) && map.get("applicationAttachment_name") != null) { 
+			applicationAttachment_name = (String) map.get("applicationAttachment_name");
+		}
+		if (!"".equals(map.get("applicationUrl")) && map.get("applicationUrl") != null) { 
+			applicationUrl = (String) map.get("applicationUrl");
+		}
+		if (!"".equals(map.get("applicationUpload_person_id")) && map.get("applicationUpload_person_id") != null) { 
+			applicationUpload_person_id = (String) map.get("applicationUpload_person_id");
+		}
+		if (!"".equals(map.get("applicationCreate_time")) && map.get("applicationCreate_time") != null) { 
+			applicationCreate_time = (Long) map.get("applicationCreate_time");
+		}
+		
+		 SimpleDateFormat df = new SimpleDateFormat("yyyyMMHHmmss");
+		    String ss=  df.format(new Date());
+	    
+		    Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
+			  mapToDao.put("customer_id", "201712"+Math.round(Math.random()*8999+100));//ID先写成随机数   到时候不行在改
+			  mapToDao.put("customer_name",customer_name );
+			  mapToDao.put("bank_account","622707"+ss);//银行帐号 产生不能一样    这里是用Date时间做账号   18位数     //直接put进来  Action  可以不要
+			  mapToDao.put("basicAttachment_id", basicAttachment_id);//基本资料id
+			  mapToDao.put("letterAttachment_id", letterAttachment_id);//承诺书id    
+			  mapToDao.put("applicationAttachment_id", applicationAttachment_id);//申请书id
+			  mapToDao.put("update_time",  System.currentTimeMillis());//更新时间
+			  mapToDao.put("status_id",  9);//状态写的是死值    9状态代表已完成  刚注册的用户账号就能使用  
+			  mapToDao.put("hash","ccccccc");//哈希值暂时写的是个字符串死值
+			      accountMaintenanceDao.insertIntoAccountMaintenanceInfo(mapToDao);
+	    
+			  
+			  Map<String, Object> mapToDaoBasic = new LinkedHashMap<String, Object>();  
+				  mapToDaoBasic.put("attachment_id", basicAttachment_id);
+				  mapToDaoBasic.put("attachment_name", basicAttachment_name);
+				  mapToDaoBasic.put("url", basicUrl);  
+				  mapToDaoBasic.put("upload_person_id", 10085);//写的是死值  到时候在改    先将上传人的id号写死,到时候需要动态获取这个信息
+				  mapToDaoBasic.put("create_time", mapToDao.get("update_time"));
+				  accountMaintenanceDao.insertAccountMaintenanceInfoFuJianBiao(mapToDaoBasic);//上传其他凭证      到附件表
+			
+			 
+			 Map<String, Object> mapToDaoLetter = new LinkedHashMap<String, Object>();  
+				 mapToDaoLetter.put("attachment_id", letterAttachment_id);
+				 mapToDaoLetter.put("attachment_name", letterAttachment_name);
+				 mapToDaoLetter.put("url", letterUrl);
+				 mapToDaoLetter.put("upload_person_id", 10085);//写的是死值   到时候在改     待改动  先将上传人的id号写死,到时候需要动态获取这个信息
+				 mapToDaoLetter.put("create_time", mapToDao.get("update_time"));
+				 accountMaintenanceDao.insertAccountMaintenanceInfoFuJianBiao(mapToDaoLetter);//上传承诺书的       到附件表
+			   
+			 Map<String, Object> mapToDaoApplication = new LinkedHashMap<String, Object>();  
+				 mapToDaoApplication.put("attachment_id", applicationAttachment_id);
+				 mapToDaoApplication.put("attachment_name", applicationAttachment_name);
+				 mapToDaoApplication.put("url", applicationUrl);
+				 mapToDaoApplication.put("upload_person_id", 10085);//写的是死值    到时候在改  ??    待改动  先将上传人的id号写死,到时候需要动态获取这个信息
+				 mapToDaoApplication.put("create_time", mapToDao.get("update_time"));
+				 accountMaintenanceDao.insertAccountMaintenanceInfoFuJianBiao(mapToDaoApplication);//上传开户申请书的       到附件表
+			     
+			//还要将账户开立添加上传的这个操作信息插入到操作记录表中
+			Map<String, Object> mapToOperationHistory = new LinkedHashMap<String,Object>();
+				mapToOperationHistory.put("operatorTypeId", 1001);						//
+				mapToOperationHistory.put("operatorAccount", 500000255);				//操作账号先定死
+				mapToOperationHistory.put("operatorRole", "经办支行");						//创建这个操作的角色只能是经办支行
+				mapToOperationHistory.put("operatorPerson", "张五");						//操作人先写死
+				mapToOperationHistory.put("operatorTime", mapToDao.get("update_time")); //操作时间为当前操作时间
+				mapToOperationHistory.put("hash", "操作hash值");	                       //写的时死值
+				accountMaintenanceDao.insertAccountMaintenanceInfoOperationHistory(mapToOperationHistory);           //将账户开立添加上传的操作记录信息插入到操作记录表中     
+	}
+    
+    public  PageDTO selectAccountMaintenanceInfo(Map<String,Object> map) {
+    	int page = 1; // 默认页是第一页
+		String customer_name = ""; // 
+		String bank_account = ""; // 
+		long startTime = 0; // 开始时间默认0
+		long endTime = Long.MAX_VALUE; // 结束时间默认Long最大值
+		if (!"".equals(map.get("page")) && map.get("page") != null) { // 等于空就直接取第一页
+			try {
+				page = Integer.parseInt((String) map.get("page"));
+				if (page < 1) {
+					page = 1;
+				}
+			} catch (NumberFormatException e) {
+				page = 1; // 数据解析异常page还是1
+			}
+		}
+		if (!"".equals(map.get("customer_name")) && map.get("customer_name") != null) { // 等于空就直接取空值
+			customer_name = (String) map.get("customer_name");
+		}
+		if (!"".equals(map.get("bank_account")) && map.get("bank_account") != null) { // 等于空就直接取空值
+			bank_account = (String) map.get("bank_account");
+		}
+		if (!"".equals(map.get("startTime")) && map.get("startTime") != null) { // 等于空就直接取空值
+			try {
+				startTime = Long.parseLong((String) map.get("startTime"));
+			} catch (NumberFormatException e) {
+				startTime = 0; // 数据解析异常startTime还是0
+			}
+		}
+		if (!"".equals(map.get("endTime")) && map.get("endTime") != null) { // 等于空就直接取空值
+			try {
+				endTime = Long.parseLong((String) map.get("endTime"));
+			} catch (NumberFormatException e) {
+				endTime = Long.MAX_VALUE; // 数据解析异常endTime还是9223372036854775807L
+			}
+		}
+		PageDTO pageDto = new PageDTO(); // 创建分页对象
+		Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
+		mapToDao.put("startPage", (page - 1) * ROW_NUM);
+		mapToDao.put("customer_name", customer_name);
+		mapToDao.put("bank_account", bank_account);
+		if (startTime <= endTime) {
+			mapToDao.put("startTime", startTime);
+			mapToDao.put("endTime", endTime);
+		} else {
+			mapToDao.put("startTime", startTime);
+			mapToDao.put("endTime", Long.MAX_VALUE);
+		}
+		mapToDao.put("rowNum", ROW_NUM); // 默认每页显示数据是10条,可根据需求修改分页数量
+
+		int count = accountMaintenanceDao.selectCountAccountMaintenancePage();
+		List<AccountOpeningRecord> list=accountMaintenanceDao.selectAccountMaintenanceInfo(mapToDao);
+		pageDto.setTotal(count);
+		pageDto.setRows(list);
+		return pageDto;
+	
+    }
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+
+}

+ 36 - 61
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/AccountOpenService.java

@@ -12,9 +12,13 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
 import com.fuzamei.dao.AccountOpenDao;
+import com.fuzamei.dao.UserAuthoricationDao;
 import com.fuzamei.entity.AccountOpeningRecord;
+import com.fuzamei.entity.ProjectFile;
 import com.fuzamei.entity.PromptLetter;
 import com.fuzamei.entity.User;
+import com.fuzamei.entity.UserDetail;
+import com.fuzamei.utils.HashXiZhiUtil;
 import com.fuzamei.utils.PageDTO;
 
 
@@ -22,8 +26,14 @@ import com.fuzamei.utils.PageDTO;
 public class AccountOpenService {
 	@Autowired
    private AccountOpenDao  accountOpenDao;
+
 	private static final int ROW_NUM = 10; // 分页每页显示数据的数量
-    public PageDTO queryAllAccountOpening(Map<String, Object> map) {//查询账户开立表
+	/**
+	 * 账户开立列
+	 * @param map
+	 * @return
+	 */
+     public PageDTO queryAllAccountOpening(Map<String, Object> map) {//查询账户开立表
     	int page = 1; // 默认页是第一页
 		String customer_name = ""; // 
 		String bank_account = ""; // 
@@ -39,7 +49,6 @@ public class AccountOpenService {
 				page = 1; // 数据解析异常page还是1
 			}
 		}
-		//StringUtils.isEmpty(map); //StringUtils  
 
 		if (!"".equals(map.get("customer_name")) && map.get("customer_name") != null) { // 等于空就直接取空值
 			customer_name = (String) map.get("customer_name");
@@ -81,9 +90,11 @@ public class AccountOpenService {
 		pageDto.setRows(list);
 		return pageDto;
 	}
+     
+	
     ////////////////////////////////////////////////////////////
 	/**
-	 * 提示函  管理人
+	 * 提示函  管理人接收列
 	 * @param map
 	 * @return
 	 */
@@ -198,31 +209,24 @@ public class AccountOpenService {
      * @param map
      */
 	@Transactional
-	public void insertTiShiHanOrUserOrOtherTable(Map<String, Object> map) {//只上传了id到数据库   待修改哦
+	public void insertTiShiHanOrUserOrOtherTable(Map<String, Object> map) {
 	    Integer prompt_letter_id=null;
 	    String prompt_letter_name="";
 	    Integer  send_person=null;
 	    Integer receive_person=null;
 	    long send_time=0;
 	    long receive_time=0;
-	    String  hash="";
-
+	    String hash="";
+	    
 		String url="";					//url路径名称
 		String attachmentName="";		//附件名称
 	    
-	 /*   String attachment_id="";    //附件id
-	    String attachment_name="";  //附件名称
-	    String url="";              //附件url
-	    String user_id=""; //附件上传人的id
-	    long create_time=0;   */   //附件添加的时间
 		 if (!"".equals(map.get("url")) && map.get("url") != null) { 
 			 url = (String) map.get("url");
 			}
 	    if (!"".equals(map.get("attachmentName")) && map.get("attachmentName") != null) { 
 	    	attachmentName = (String) map.get("attachmentName");
 		}
-	  
-	
 	    if (!"".equals(map.get("prompt_letter_id")) && map.get("prompt_letter_id") != null) { 
 	    	prompt_letter_id = Integer.parseInt((String) map.get("prompt_letter_id"));
 		}
@@ -244,38 +248,22 @@ public class AccountOpenService {
 	    if (!"".equals(map.get("hash")) && map.get("hash") != null) { 
 	    	hash = (String) map.get("hash");
 		}
-	    
-	/*	
-		if (!"".equals(map.get("attachment_id")) && map.get("attachment_id") != null) { 
-			attachment_id = (String) map.get("attachment_id");
-		}
-		if (!"".equals(map.get("attachment_name")) && map.get("attachment_name") != null) { 
-			attachment_name = (String) map.get("attachment_name");
-		}
-		if (!"".equals(map.get("url")) && map.get("url") != null) { 
-			url = (String) map.get("url");
-		}
-		if (!"".equals(map.get("user_id")) && map.get("user_id") != null) {   
-			user_id = (String) map.get("user_id");
-		}
-		if (!"".equals(map.get("create_time")) && map.get("create_time") != null) { 
-			create_time = (Long) map.get("create_time");
-		}*/
+	    	//Math.round(Math.random()*8999+1000)随机数
 		 Map<String, Object> mapToDao2 = new LinkedHashMap<String, Object>();
 		  mapToDao2.put("prompt_letter_id", prompt_letter_id);//提示函 id
-		  mapToDao2.put("prompt_letter_name","提示名称");//提示函名称 先写死  没弄明白
-		  mapToDao2.put("send_person",2 );//发送人暂时写死的  
-		  mapToDao2.put("receive_person",11);//接收人 暂时写死的 
+		  mapToDao2.put("prompt_letter_name",attachmentName);//提示函名称    目前写的是文件名称   
+		  mapToDao2.put("send_person",666);//发送人暂时写死的  ??  是不是应该获取登陆人的id???? 
+		  mapToDao2.put("receive_person",999);//接收人应该是?? ??? 接收人写哪个  不是很清楚// 产品说写死 ,目前就往一个人那里发函上传文件
+		  mapToDao2.put("send_time",System.currentTimeMillis());//发送时间 
 		  mapToDao2.put("receive_time", System.currentTimeMillis());//接收时间
-		  mapToDao2.put("send_time",System.currentTimeMillis());//发送时间
-		  mapToDao2.put("hash", "21a5s2e4x5x");//hash值 暂写死
+		  mapToDao2.put("hash",hash);//hash值可以插入了
 		  accountOpenDao.insertIntoPromptLetterTable(mapToDao2);//将账号插入提示函表
 		  
 		  Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
-		  mapToDao.put("attachment_id",(int)Math.round(Math.random()*8999+100));//附件id   目前写死写的是个随机数  待修改
+		  mapToDao.put("attachmentId",prompt_letter_id);//附件id   目前写的是上面输入的管理人账号一样
 		  mapToDao.put("attachmentName",attachmentName );//附件名称  拿到了
 		  mapToDao.put("url", url);//附件url   后面有下载的   需要地址
-		  mapToDao.put("upload_person_id", 123321123);//附件人上传的id这里写的是死值
+		  mapToDao.put("upload_person_id", 10121);//附件人上传的id这里写的是死值   待改动  先将上传人的id号写死,到时候需要动态获取这个信息   应该写谁这个附件上传人id
 		  mapToDao.put("create_time", (Long)mapToDao2.get("send_time") );//附件添加时间,这里应该写发送时间  目前写的是死值//System.currentTimeMillis()
 		  accountOpenDao.insertIntoAttachmentTable(mapToDao);//将数据添加到附件表数据库里
 		  
@@ -285,7 +273,7 @@ public class AccountOpenService {
 			mapToOperation.put("operatorRole", "经办支行9");						//创建这个操作的角色  目前是写死
 			mapToOperation.put("operatorPerson", "操作人小王");						//操作人先写死
 			mapToOperation.put("operatorTime",(Long)mapToDao2.get("send_time")); //操作时间为当前操作时间
-			mapToOperation.put("hash", "d9892a2s3d4f5g");	                    //写的时死值
+			mapToOperation.put("hash", hash);//这里的哈希值和上面插入提示函的哈希值一样	                    //写的时死值
 			accountOpenDao.insertOperationHistory(mapToOperation);           //将提示函泛函添加上传的操作记录信息插入到操作记录表中     
 	}
 	
@@ -318,10 +306,10 @@ public class AccountOpenService {
 		}
 	    
 		Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
-		  mapToDao.put("attachment_id", 123456);//附件id   目前写死
+		  mapToDao.put("attachment_id", 123456);//附件id  目前写死
 		  mapToDao.put("attachment_name", attachment_name);//附件名称    暂时没写
 		  mapToDao.put("url", url);//附件url   后面有下载的   需要地址
-		  mapToDao.put("upload_person_id", 223346);//附件人上传的id这里写的是死值
+		  mapToDao.put("upload_person_id", 223346);//附件人上传的id这里写的是死值   待修改
 		  mapToDao.put("create_time", System.currentTimeMillis());//附件添加时间,这里应该写添加得到的当前系统时间  
 		  accountOpenDao.insertAccountUploadFileFuJianBiao(mapToDao);//把数据插入到 (附件表)里
 		  
@@ -348,8 +336,6 @@ public class AccountOpenService {
 		String bank_account="";//银行账号
 		
 		//省略几个直接put进去
-		
-		 
 		String basicAttachment_id="";    //基本资料附件id
 		String basicAttachment_name="";  //基本资料附件名称
 		String basicUrl="";              //基本资料附件url
@@ -439,10 +425,10 @@ public class AccountOpenService {
 			  mapToDao.put("customer_name",customer_name );
 			  mapToDao.put("bank_account","6223"+ss);//银行帐号 产生不能一样    这里是用Date时间做账号   18位数     //直接put进来  Action  可以不要
 			  mapToDao.put("basicAttachment_id", basicAttachment_id);//基本资料id
-			  mapToDao.put("letterAttachment_id", letterAttachment_id);//承诺书id   这三个id为空  
+			  mapToDao.put("letterAttachment_id", letterAttachment_id);//承诺书id    
 			  mapToDao.put("applicationAttachment_id", applicationAttachment_id);//申请书id
 			  mapToDao.put("update_time",  System.currentTimeMillis());//更新时间
-			  mapToDao.put("status_id",  9);//状态写的是死值    9状态代表已完成
+			  mapToDao.put("status_id",  9);//状态写的是死值    9状态代表已完成  刚注册的用户账号就能使用  
 			  mapToDao.put("hash","1aaa2bbb3ccc");//哈希值暂时写的是个字符串死值
 			  accountOpenDao.insertAccountUploadFile(mapToDao);//把数据插入到开户表里
 			  
@@ -450,7 +436,7 @@ public class AccountOpenService {
 			  mapToDaoBasic.put("attachment_id", basicAttachment_id);
 			  mapToDaoBasic.put("attachment_name", basicAttachment_name);
 			  mapToDaoBasic.put("url", basicUrl);  
-			  mapToDaoBasic.put("upload_person_id", 10085);//写的是死值  到时候在改
+			  mapToDaoBasic.put("upload_person_id", 10085);//写的是死值  到时候在改    先将上传人的id号写死,到时候需要动态获取这个信息
 			  mapToDaoBasic.put("create_time", mapToDao.get("update_time"));
 			  accountOpenDao.insertAccountUploadFileFuJianBiao(mapToDaoBasic);//上传基本资料的      到附件表
 		
@@ -459,7 +445,7 @@ public class AccountOpenService {
 			 mapToDaoLetter.put("attachment_id", letterAttachment_id);
 			 mapToDaoLetter.put("attachment_name", letterAttachment_name);
 			 mapToDaoLetter.put("url", letterUrl);
-			 mapToDaoLetter.put("upload_person_id", 10086);//写的是死值   到时候在改
+			 mapToDaoLetter.put("upload_person_id", 10085);//写的是死值   到时候在改     待改动  先将上传人的id号写死,到时候需要动态获取这个信息
 			 mapToDaoLetter.put("create_time", mapToDao.get("update_time"));
 		     accountOpenDao.insertAccountUploadFileFuJianBiao(mapToDaoLetter);//上传承诺书的       到附件表
 		   
@@ -467,7 +453,7 @@ public class AccountOpenService {
 			 mapToDaoApplication.put("attachment_id", applicationAttachment_id);
 			 mapToDaoApplication.put("attachment_name", applicationAttachment_name);
 			 mapToDaoApplication.put("url", applicationUrl);
-			 mapToDaoApplication.put("upload_person_id", 10087);//写的是死值    到时候在改
+			 mapToDaoApplication.put("upload_person_id", 10085);//写的是死值    到时候在改  ??    待改动  先将上传人的id号写死,到时候需要动态获取这个信息
 			 mapToDaoApplication.put("create_time", mapToDao.get("update_time"));
 		     accountOpenDao.insertAccountUploadFileFuJianBiao(mapToDaoApplication);//上传开户申请书的       到附件表
 		     
@@ -478,7 +464,7 @@ public class AccountOpenService {
 			mapToOperationHistory.put("operatorRole", "经办支行");						//创建这个操作的角色只能是经办支行
 			mapToOperationHistory.put("operatorPerson", "张五");						//操作人先写死
 			mapToOperationHistory.put("operatorTime", mapToDao.get("update_time")); //操作时间为当前操作时间
-			mapToOperationHistory.put("hash", "11a2s3d4f5g");	                    //写的时死值
+			mapToOperationHistory.put("hash", "操作hash");	                       //写的时死值
 			accountOpenDao.insertOperationHistory(mapToOperationHistory);           //将账户开立添加上传的操作记录信息插入到操作记录表中     
 		     
 		   
@@ -486,26 +472,15 @@ public class AccountOpenService {
 	//账户开立  下载页面
 	public Map<String, Object> selectAccountopenNoPage(Map<String, Object> map){
 			Integer customer_id=null;   //ID
-			String customer_name="";//客户名称
-			String bank_account="";//银行账号
-			if(!"".equals(map.get("customer_id")) && null!=map.get("customer_id")){
+			
+		   if(!"".equals(map.get("customer_id")) && null!=map.get("customer_id")){
 				customer_id = Integer.parseInt((String)map.get("customer_id"));
 			}
-			if (!"".equals(map.get("customer_name")) && map.get("customer_name") != null) { 
-				customer_name = (String) map.get("customer_name");
-			}
-			if (!"".equals(map.get("bank_account")) && map.get("bank_account") != null) { 
-				bank_account = (String) map.get("bank_account");
-			}
 			Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
 			 mapToDao.put("customer_id", customer_id);
-			 mapToDao.put("customer_name", customer_name);
-			 mapToDao.put("bank_account", bank_account);
 			 List<AccountOpeningRecord> AccountOpenlist=accountOpenDao.selectAccountopenNoPage(mapToDao);
 			 Map<String, Object> AccountOpenAction = new LinkedHashMap<String, Object>();
 			 AccountOpenAction.put("customer_id", customer_id);
-			 AccountOpenAction.put("customer_name", customer_name);
-			 AccountOpenAction.put("bank_account", bank_account);
 			 AccountOpenAction.put("AccountOpenlist", AccountOpenlist);
 	        
 			 return AccountOpenAction;

+ 12 - 14
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/CapitalTransferService.java

@@ -90,28 +90,24 @@ public class CapitalTransferService {
 	}
 	//资金划转   点击查看 详情
 	public Map<String, Object>  selectChaKanZiJinHuaZhuan(Map<String, Object> map){
-		int fund_id=0;
-		//int user_id=0;
-		if (!"".equals(map.get("fund_id")) && map.get("fund_id") != null) { 
+		 int fund_id=0;
+		 if (!"".equals(map.get("fund_id")) && map.get("fund_id") != null) { 
 			fund_id =  Integer.parseInt((String)map.get("fund_id"));
-		}
-		/*if (!"".equals(map.get("user_id")) && map.get("user_id") != null) { 
-			user_id =  Integer.parseInt((String)map.get("user_id"));
-		}*/
-		
-		
+		 }
 		 Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
 		  mapToDao.put("fund_id", fund_id);//附件名称    暂时没写
-		  //mapToDao.put("user_id", user_id);
 		  List<CapitalTransfer> list=capitalTransferDao.selectChaKanZiJinHuaZhuan(mapToDao);
 		  List<CapitalTransferCheck> lis= capitalTransferDao.selectCapitalTransferRecord(mapToDao);
-		  //List<User> user=capitalTransferDao.selectByPersonName(mapToDao);
 		  Map<String, Object> map1=new LinkedHashMap<String, Object>();
 		  map1.put("CapitalTransfer", list);//管理人persont_name取不到值  稍做修改 
 		  map1.put("CapitalTransferCheck", lis);
-		 // map1.put("user", user); 
 		return map1;
 	}
+	
+	/**
+	 * 将审核意见插入到审核表
+	 * @param map
+	 */
 	@Transactional
 	public void insertCheckTransfer(Map<String, Object> map) {
 		String check_department="";		//审核部门
@@ -132,9 +128,11 @@ public class CapitalTransferService {
 		}
 		if (!"".equals(map.get("check_result")) && map.get("check_result") != null) { 
 			check_result = Integer.parseInt((String)map.get("check_result"));
-	     
-		
 		}
+		//判断
+		
+		
+		
 		if (!"".equals(map.get("check_opinion")) && map.get("check_opinion") != null) { 
 			check_opinion = (String)map.get("check_opinion");
 	    }

+ 119 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/AccountMaintenanceAction.java

@@ -0,0 +1,119 @@
+package com.fuzamei.web;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.fuzamei.service.AccountMaintenanceService;
+import com.fuzamei.utils.HashXiZhiUtil;
+import com.fuzamei.utils.JSONUtil;
+import com.fuzamei.utils.PageDTO;
+
+@Controller
+@RequestMapping(value = "/AccountMaintenance")
+public class AccountMaintenanceAction {
+	@Autowired
+	private AccountMaintenanceService  accountMaintenanceService;//注入service
+
+	/**  
+    *  账户开立 添加客户名称和银行账号  上传3份资料  分别插入  附件表  操作记录表,账户开立表
+    *  需要完成【申请输】【账户承诺书】【其他凭证】3个文件的上传,插入账务开立表1条数据,插入附件表3条数据,还有插入操作历史1条数据)
+    * @param  
+    * @param   
+    * @throws Exception  
+    */
+   @RequestMapping(value="/uploadOrInsertAccountMaintenance",method=RequestMethod.POST)  
+   @ResponseBody  
+   public Map<String,Object> uploadOrInsertBankAccount(@RequestParam("basic_data_id") MultipartFile file,
+		@RequestParam("letter_of_commitment_id") MultipartFile file2 ,
+   		@RequestParam("application_id") MultipartFile file3, HttpServletRequest request,
+   	    @RequestParam("customer_name") String customer_name,
+   	    @RequestParam("bank_account") String bank_account) throws IOException{
+	   try {
+		   String path = "D:\\tomcate\\apache-tomcat-8.5.24\\webapps"+request.getServletContext().getContextPath()+"\\testCeshi";  
+             File dir = new File(path);          
+             if(!dir.exists()){  
+                 dir.mkdirs();   
+             }  
+             Map<String, Object> map = new LinkedHashMap<String, Object>();
+             map.put("customer_name", customer_name);  
+             map.put("bank_account", bank_account);//可以不要  不输入参数   直接在service里put进去   后台插入要求格式以622707开头
+		     //同时上传三个文件 应该对几个文件产生几个哈希值??????
+             //其他凭证 
+             String fileName = file.getOriginalFilename();  
+             String pathFile=path+"/"+fileName;
+             File newfile = new File(pathFile); 
+             file.transferTo(newfile);
+             map.put("basicAttachment_id", 1001);//附件id暂时写死
+     		 map.put("basicAttachment_name", fileName);
+     	     map.put("basicUrl","\\testCeshi"+fileName);
+     	     
+     	     //账户承诺书
+    	     String fileName2 = file2.getOriginalFilename();  
+             String pathFile2=path+"/"+fileName2;
+             File newfile2 = new File(pathFile2); 
+             file2.transferTo(newfile2);
+             map.put("letterAttachment_id", 1002);//附件id暂时写死
+    		 map.put("letterAttachment_name", fileName2);
+    	     map.put("letterUrl","\\testCeshi"+fileName2);
+    	     //开户申请书
+        	 String fileName3 = file3.getOriginalFilename();  
+             String pathFile3=path+"/"+fileName3;
+             File newfile3 = new File(pathFile3); 
+             file3.transferTo(newfile3);
+             map.put("applicationAttachment_id", 1003);//附件id暂时写死
+     	     map.put("applicationAttachment_name", fileName3);
+     	     map.put("applicationUrl","\\testCeshi"+fileName3);
+     	     
+
+     	    accountMaintenanceService.insertIntoAccountINfo(map);//将经办支行提交的所有数据信息通过map传入service层先进行校验
+     	   return JSONUtil.getJsonMap(200, true, "上传成功",null); //返回给前端一个map进行前段提示
+	} catch (Exception e) {
+		   return JSONUtil.getJsonMap(500, false, "上传出错"+e.getMessage(),null); //返回给前端一个map进行前段提示
+	}
+	
+   }
+   
+   /**
+    * 查询账户维护信息 列表
+    * @param data
+    * @return
+    */
+    @PostMapping(value = "/selectAccountMaintenanceInfo")//@PostMapping此注解 提交方式为post
+	@ResponseBody
+	public Map<String, Object> selectAccountMaintenanceInfo(@RequestBody String data) {
+		//System.out.println("查询账户维护开立信息列表");
+		Map<String, Object> mapResult = new LinkedHashMap<String, Object>();
+		Map<String, Object> map = JSONUtil.jsonToMap(data);
+		PageDTO pageDto=accountMaintenanceService.selectAccountMaintenanceInfo(map);
+		mapResult = JSONUtil.getJsonMap(200, true, "操作查询成功", pageDto);
+
+		return mapResult;
+	}
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+	
+}

+ 7 - 3
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/AccountOpenAction.java

@@ -18,9 +18,11 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 
+import com.alibaba.fastjson.JSON;
 import com.fuzamei.service.AccountOpenService;
 import com.fuzamei.utils.JSONUtil;
 import com.fuzamei.utils.PageDTO;
+import com.fuzamei.utils.ValidationUtil;
 
 @Controller
 @RequestMapping(value = "/Account")
@@ -29,6 +31,7 @@ public class AccountOpenAction {
 
 	@Autowired
 	private AccountOpenService  accountService;//注入service
+	private static final int ROW_NUM = 10; // 分页每页显示数据的数量(固定10条数据)
     /**
      * 查询账户开立
      * @param data
@@ -45,11 +48,13 @@ public class AccountOpenAction {
 
 		return mapResult;
 	}
+	
 	/**
 	 * 查询提示函   管理人接收列表
 	 * @param data
 	 * @return
 	 */
+	
 	@RequestMapping(value = "/selectPromptLetter", method = RequestMethod.POST)
 	@ResponseBody
 	public Map<String, Object> selectPromptLetter(@RequestBody String data) {
@@ -63,7 +68,7 @@ public class AccountOpenAction {
 	}
 	
 	/**
-	 * 查询提示函 发送人的列表
+	 * 查询提示函 发送人的列表   还没做好
 	 * @param data
 	 * @return
 	 */
@@ -87,7 +92,7 @@ public class AccountOpenAction {
 	@ResponseBody
 	public Map<String, Object> selectAccountopenNoPage(@RequestBody String data){
 		
-		System.out.println("账户开立查看....");
+		//System.out.println("账户开立查看....");
 		Map<String, Object> map = JSONUtil.jsonToMap(data);	// 将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
 		
 		Map<String, Object> mapFromService = accountService.selectAccountopenNoPage(map); //这里不要分页,只要service传过来一个map对象即可
@@ -122,7 +127,6 @@ public class AccountOpenAction {
              map.put("customer_name", customer_name);  
              map.put("bank_account", bank_account);//可以不要  不输入参数   直接在service里put进去
      
-		    
             //基本资料 
             String fileName = file.getOriginalFilename();  
             String pathFile=path+"/"+fileName;

+ 2 - 4
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/CapitalTransferAction.java

@@ -43,7 +43,7 @@ public class CapitalTransferAction {
 	}
 	
 	/**{ 
-	    "fund_id":"1005"   postman 传id
+	    "fund_id":"1005"   postman 传id
        }
 	 * 资金划转查看详情
 	 * @param data
@@ -70,10 +70,8 @@ public class CapitalTransferAction {
 	public Map<String,Object> insertCheckTransfer(@RequestBody String data){
 		
 		try {
-			System.out.println("添加到业务审核总表信息....");
-			
+			//System.out.println("添加到划转审核总表信息....");
 			Map<String, Object> map = JSONUtil.jsonToMap(data);		//将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
-			
 			capitalTransferService.insertCheckTransfer(map);
 			
 			return JSONUtil.getJsonMap(200, true, "添加审核意见成功", null);

+ 17 - 18
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/PromptLetterAction.java

@@ -82,14 +82,14 @@ public class PromptLetterAction {
         }  
         out.close();  
     } */
-	/**
-	 * 风险提示函发函  上传
-	 * @param file
-	 * @param request
-	 * @param prompt_letter_id
-	 * @return
-	 * @throws IOException
-	 */
+		/**
+		 * 风险提示函发函  上传
+		 * @param file
+		 * @param request
+		 * @param prompt_letter_id
+		 * @return
+		 * @throws IOException
+		 */
 	    @RequestMapping(value="/uploadFile",method=RequestMethod.POST)  
 	    @ResponseBody  
 	    public Map<String,Object> upload(@RequestParam("file") MultipartFile file,HttpServletRequest request,@RequestParam("prompt_letter_id") String prompt_letter_id) throws IOException{  
@@ -103,24 +103,25 @@ public class PromptLetterAction {
 	            String pathFile=path+"/"+fileName;
 	            File newfile = new File(pathFile); 
 	            file.transferTo(newfile);
+	          String hash = HashXiZhiUtil.getMD5Checksum(pathFile);//上传(文件)之后产生哈希值      是对文件产生哈希值
+	          System.out.println(hash+"上传提示函的哈希值是");
 	            //MultipartFile自带的解析方法 
 	    		Map<String, Object> map = new LinkedHashMap<String, Object>();
 	    		map.put("prompt_letter_id",prompt_letter_id);//有问题   待改动 
+	    		map.put("hash", hash);//上传的文件产生的哈希值插入到提示函表
 	    		
 	    		//map.put("fileName", fileName);
 	    		map.put("url","/Content/"+fileName);
 				map.put("attachmentName", fileName);
-	            accountService.insertTiShiHanOrUserOrOtherTable(map);
-	            
+	            accountService.insertTiShiHanOrUserOrOtherTable(map);//在插入数据库
+	    	    
 	            Map<String, Object>	mapResult=JSONUtil.getJsonMap(200, true, "上传提示函成功", null);
-				return mapResult ;
+				return mapResult;
 			}
 	       catch (Exception e) {
 				Map<String, Object> mapResult=JSONUtil.getJsonMap(500, true, "上传提示函失败"+e.getMessage(), null);
 				return mapResult;
 			}
-		
-	    	
 	    }  
 	
     /**  
@@ -178,7 +179,6 @@ public class PromptLetterAction {
                dir.mkdirs();  
            }  
            //MultipartFile自带的解析方法  
-           
            String fileName = file.getOriginalFilename();  
            String pathFile=path+"/"+fileName;
            File newfile = new File(pathFile); 
@@ -187,11 +187,11 @@ public class PromptLetterAction {
    		   Map<String, Object> map = new LinkedHashMap<String, Object>();
    		   map.put("fileName", fileName);
    		   map.put("url",fileName);
+          accountService.insertTrueFalseSelect(map);
            
-           accountService.insertTrueFalseSelect(map);
-           //上传文件之后才会产生一条哈希值的
+           //是上传文件之后才会产生一条哈希值的
           // HashXiZhiUtil.getMd5("D:\\xiangnu\\123.doc");
-           HashXiZhiUtil.getMD5Checksum(pathFile);//调用方法 对(文件)产生一条哈希值
+         String hash=HashXiZhiUtil.getMD5Checksum(pathFile);//调用方法 对(文件)产生一条哈希值
         System.out.println( HashXiZhiUtil.getMD5Checksum(pathFile)+"--哈希值");//自己测试的
        	Map<String, Object> mapResult=JSONUtil.getJsonMap(200, true, "上传成功", null);//将查询出来的结果封装成map数据返回
             return mapResult ;
@@ -204,5 +204,4 @@ public class PromptLetterAction {
     
 
  
-	
 }

+ 2 - 2
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/ValuationAccountingAction.java

@@ -36,7 +36,7 @@ import com.fuzamei.service.ValuationAccountingService;
 import com.fuzamei.utils.JSONUtil;
 import com.fuzamei.utils.MapUtil;
 import com.fuzamei.utils.PageDTO;
-import com.fuzamei.utils.RelativePathUtil;
+//import com.fuzamei.utils.RelativePathUtil;
 import com.fuzamei.utils.ValidationUtil;
 
 /**
@@ -269,7 +269,7 @@ public class ValuationAccountingAction {
 			Integer attachmentId = attachmentService.generateAtachmentId();					//生成一个不重复的附件Id号==================>>生成id号的机制待定TODO
 			
 			String path = request.getServletContext().getRealPath("");							//上传文件顶级父类的绝对路径============================>>路径机制待定TODO	
-			String relativePath = RelativePathUtil.formatPath("/"+userId,"");					//生成默认的相对路径格式================================>>路径机制待定TODO
+			//String relativePath = RelativePathUtil.formatPath("/"+userId,"");					//生成默认的相对路径格式================================>>路径机制待定TODO