Browse Source

账户开立
资金划转
真伪查询
提示函
初始版本提交

chb 7 years ago
parent
commit
de497bff6d
18 changed files with 1783 additions and 0 deletions
  1. 45 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/AccountOpenDao.java
  2. 25 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/CapitalTransferDao.java
  3. 103 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/test.java
  4. 87 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/AccountOpeningRecord.java
  5. 91 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/CapitalTransfer.java
  6. 58 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/CapitalTransferCheck.java
  7. 77 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/PromptLetter.java
  8. 180 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/AccountOpenMapper.xml
  9. 46 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/CapitalTransferMapper.xml
  10. 26 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/AccountOpenMapper.java
  11. 19 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/CapitalTransferMapper.java
  12. 400 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/AccountOpenService.java
  13. 83 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/CapitalTransferService.java
  14. 76 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/utils/HashCodeUtil.java
  15. 71 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/utils/HashXiZhiUtil.java
  16. 145 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/AccountOpenAction.java
  17. 38 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/CapitalTransferAction.java
  18. 213 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/PromptLetterAction.java

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

@@ -0,0 +1,45 @@
+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.entity.PromptLetter;
+import com.fuzamei.entity.User;
+import com.fuzamei.mapperInterface.AccountOpenMapper;
+@Repository
+public class AccountOpenDao {
+	@Autowired
+	private AccountOpenMapper mapperDao;
+ 
+		public List<AccountOpeningRecord> queryAllAccountOpening(Map<String, Object> map){//查询账户开立列表
+			return  mapperDao.queryAllAccountOpening(map);		
+         }
+		public  int  serchCountPage(){//总页数
+			return  mapperDao.serchCountPage();
+		}
+		public List<PromptLetter> selectPromptLetter(Map<String, Object> map){//查询风险提示函
+			return mapperDao.selectPromptLetter(map);
+		}
+		public  int  serchCountPage2(){//总页数
+			return  mapperDao.serchCountPage2();
+		}
+		public void insertTiShiHanOrUser(Map<String, Object> map) {//插入管理人账号
+			mapperDao.insertTiShiHanOrUser(map);
+		}
+		public List<PromptLetter> selectTishihan(Map<String, Object> map){//查询风险提示函3
+			return mapperDao.selectTishihan(map);
+		}
+		public void insertTrueFalseSelect(Map<String, Object> map) {//真伪查询   记录插入到附件表
+			mapperDao.insertTiShiHanOrUser(map);
+		}
+		public void insertAccountUploadFile(Map<String, Object> map) {//<!-- 上传客户资料,承诺书,开户申请书    经办支行添加创建账号和客户名称 -->
+			mapperDao.insertAccountUploadFile(map);
+		}
+		public void insertAccountUploadFileFuJianBiao(Map<String, Object> map) {//<!-- 上传客户资料,承诺书,开户申请书    经办支行添加创建账号和客户名称    到附件表-->
+			mapperDao.insertAccountUploadFileFuJianBiao(map);
+		}
+}

+ 25 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/CapitalTransferDao.java

@@ -0,0 +1,25 @@
+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.CapitalTransfer;
+import com.fuzamei.mapperInterface.CapitalTransferMapper;
+
+@Repository
+public class CapitalTransferDao {
+	@Autowired
+    private CapitalTransferMapper   capitalTransferMapper;
+	
+	
+	public List<CapitalTransfer> selectCapitalTransferTable(Map<String, Object> map){//查询资金划转列表
+		return capitalTransferMapper.selectCapitalTransferTable(map);
+	}
+	public int  selectCapitalTransferPage() {//查询资金划转表  总页数
+		return  capitalTransferMapper.selectCapitalTransferPage() ;
+	}
+	
+}

+ 103 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/test.java

@@ -0,0 +1,103 @@
+package com.fuzamei.dao;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+
+public class test {
+/*public static void main(String[] args) {
+	System.out.println(Math.round(Math.random()*8999+1000));
+}*/
+
+public static void main(String[] args) throws MalformedURLException  {
+	/*SimpleDateFormat sdf=new SimpleDateFormat("MMddHHmmss");
+	String str=sdf.format(new Date()).substring(6)+Math.round(Math.random()*8999+1000);
+	System.out.println(str);
+	System.out.println("201712"+Math.round(Math.random()*8999+100));*/
+   /* String number= new String("0000");
+	String length=String.valueOf(businessOrder.getId());
+	String before=number.substring(length.length());
+	String rear=before+businessOrder.getId();
+	String orderNo=dateFormat.format(now)+rear;*/
+	/*  SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
+		    String ss=  df.format(new Date());
+	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 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);  
+	
+	
+    }   
+	
+public static File saveUrlAs(String url,String filePath,String method){  
+    //System.out.println("fileName---->"+filePath);  
+    //创建不同的文件夹目录  
+    File file=new File(filePath);  
+    //判断文件夹是否存在  
+    if (!file.exists())  
+   {  
+       //如果文件夹不存在,则创建新的的文件夹  
+        file.mkdirs();  
+   }  
+    FileOutputStream fileOut = null;  
+    HttpURLConnection conn = null;  
+    InputStream inputStream = null;  
+    try  
+   {  
+        // 建立链接  
+        URL httpUrl=new URL(url);  
+        conn=(HttpURLConnection) httpUrl.openConnection();  
+        //以Post方式提交表单,默认get方式  
+        conn.setRequestMethod(method);  
+        conn.setDoInput(true);    
+        conn.setDoOutput(true);  
+        // post方式不能使用缓存   
+        conn.setUseCaches(false);  
+        //连接指定的资源   
+        conn.connect();  
+        //获取网络输入流  
+        inputStream=conn.getInputStream();  
+        BufferedInputStream bis = new BufferedInputStream(inputStream);  
+        //判断文件的保存路径后面是否以/结尾  
+        if (!filePath.endsWith("/")) {  
+            filePath += "/";  
+            }  
+        //写入到文件(注意文件保存路径的后面一定要加上文件的名称)  
+        fileOut = new FileOutputStream(filePath+"123.png");  
+        BufferedOutputStream bos = new BufferedOutputStream(fileOut);  
+          
+        byte[] buf = new byte[4096];  
+        int length = bis.read(buf);  
+        //保存文件  
+        while(length != -1)  
+        {  
+            bos.write(buf, 0, length);  
+            length = bis.read(buf);  
+        }  
+        bos.close();  
+        bis.close();  
+        conn.disconnect();  
+   } catch (Exception e)  
+   {  
+        e.printStackTrace();  
+        System.out.println("抛出异常!!");  
+   }  
+      
+    return file;  
+      
+}  
+
+
+}

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

@@ -0,0 +1,87 @@
+package com.fuzamei.entity;
+
+import java.util.Date;
+//开户记录表
+public class AccountOpeningRecord {
+	
+	private int  id;//主键id
+	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 long update_time;//更新时间
+	private int  status_id;//状态id
+	private String hash;//哈希码
+	
+	public int getId() {
+		return id;
+	}
+	public void setId(int id) {
+		this.id = id;
+	}
+	public int getCustomer_id() {
+		return customer_id;
+	}
+	public void setCustomer_id(int customer_id) {
+		this.customer_id = customer_id;
+	}
+	public String getCustomer_name() {
+		return customer_name;
+	}
+	public void setCustomer_name(String customer_name) {
+		this.customer_name = customer_name;
+	}
+	public String getBank_account() {
+		return bank_account;
+	}
+	public void setBank_account(String bank_account) {
+		this.bank_account = bank_account;
+	}
+
+	public String getBasic_data_id() {
+		return basic_data_id;
+	}
+	public void setBasic_data_id(String basic_data_id) {
+		this.basic_data_id = basic_data_id;
+	}
+	public String getLetter_of_commitment_id() {
+		return letter_of_commitment_id;
+	}
+	public void setLetter_of_commitment_id(String letter_of_commitment_id) {
+		this.letter_of_commitment_id = letter_of_commitment_id;
+	}
+	public String getApplication_id() {
+		return application_id;
+	}
+	public void setApplication_id(String application_id) {
+		this.application_id = application_id;
+	}
+	public long getUpdate_time() {
+		return update_time;
+	}
+	public void setUpdate_time(long update_time) {
+		this.update_time = update_time;
+	}
+	public int getStatus_id() {
+		return status_id;
+	}
+	public void setStatus_id(int status_id) {
+		this.status_id = status_id;
+	}
+	public String getHash() {
+		return hash;
+	}
+	public void setHash(String hash) {
+		this.hash = hash;
+	}
+	@Override
+	public String toString() {
+		return "AccountOpeningRecord [id=" + id + ", customer_id=" + customer_id + ", customer_name=" + customer_name
+				+ ", bank_account=" + bank_account + ", basic_data_id=" + basic_data_id + ", letter_of_commitment_id="
+				+ letter_of_commitment_id + ", application_id=" + application_id + ", update_time=" + update_time
+				+ ", status_id=" + status_id + ", hash=" + hash + "]";
+	}
+	
+}

+ 91 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/CapitalTransfer.java

@@ -0,0 +1,91 @@
+package com.fuzamei.entity;
+
+import java.util.Date;
+//资金划转表
+public class CapitalTransfer {
+	private int id;//主键id
+	private int fund_id;//基金id
+	private int custodian;//管理人
+	private String  fund_name;//基金名称
+	private double account_balance;//账户余额
+	private double sum_of_money;//划款金额
+	private String basis_of_payment;//划款依据
+	private String drawing_account;//划款账户
+	private long apply_time;//申请时间
+	private long handle_time;//处理时间
+	private int status_id;//状态id
+	
+	public int getId() {
+		return id;
+	}
+	public void setId(int id) {
+		this.id = id;
+	}
+	public int getFund_id() {
+		return fund_id;
+	}
+	public void setFund_id(int fund_id) {
+		this.fund_id = fund_id;
+	}
+	public int getCustodian() {
+		return custodian;
+	}
+	public void setCustodian(int custodian) {
+		this.custodian = custodian;
+	}
+	public long getApply_time() {
+		return apply_time;
+	}
+	public String getFund_name() {
+		return fund_name;
+	}
+	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;
+	}
+	public void setSum_of_money(double sum_of_money) {
+		this.sum_of_money = sum_of_money;
+	}
+	public String getBasis_of_payment() {
+		return basis_of_payment;
+	}
+	public void setBasis_of_payment(String 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;
+	}
+	public void setHandle_time(long handle_time) {
+		this.handle_time = handle_time;
+	}
+	public void setApply_time(long apply_time) {
+		this.apply_time = apply_time;
+	}
+	public int getStatus_id() {
+		return status_id;
+	}
+	public void setStatus_id(int status_id) {
+		this.status_id = status_id;
+	}
+	
+	
+	
+	
+	
+	
+	
+}

+ 58 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/CapitalTransferCheck.java

@@ -0,0 +1,58 @@
+package com.fuzamei.entity;
+
+import java.util.Date;
+//划转资金审核表
+public class CapitalTransferCheck {
+	private int id;//主键id
+	private int fund_id;//基金id
+	private String check_department;//审核部门
+	private String check_person;//审核人员
+	private String check_opinin;//审核意见
+	private long check_time;//审核时间
+	private String check_result;//结果
+	public int getId() {
+		return id;
+	}
+	public void setId(int id) {
+		this.id = id;
+	}
+	public int getFund_id() {
+		return fund_id;
+	}
+	public void setFund_id(int fund_id) {
+		this.fund_id = fund_id;
+	}
+	public String getCheck_department() {
+		return check_department;
+	}
+	public void setCheck_department(String check_department) {
+		this.check_department = check_department;
+	}
+	public String getCheck_person() {
+		return check_person;
+	}
+	public void setCheck_person(String check_person) {
+		this.check_person = check_person;
+	}
+	public String getCheck_opinin() {
+		return check_opinin;
+	}
+	public void setCheck_opinin(String check_opinin) {
+		this.check_opinin = check_opinin;
+	}
+	public long getCheck_time() {
+		return check_time;
+	}
+	public void setCheck_time(long check_time) {
+		this.check_time = check_time;
+	}
+	public String getCheck_result() {
+		return check_result;
+	}
+	public void setCheck_result(String check_result) {
+		this.check_result = check_result;
+	}
+	
+	
+	
+}

+ 77 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/PromptLetter.java

@@ -0,0 +1,77 @@
+package com.fuzamei.entity;
+
+import java.util.Date;
+//提示函表
+public class PromptLetter extends User{
+	private int id;//主键id
+	private int prompt_letter_id;//提示函id
+	//private int  userid;//用户表的外键
+	private String prompt_letter_name;//提示函名称
+	private String send_person;//发送人
+	private String receive_person;//接收人
+	private long send_time;//发送时间
+	private long receive_time;//接收时间
+	private String hash;//哈希码
+	public int getId() {
+		return id;
+	}
+	public void setId(int id) {
+		this.id = id;
+	}
+	public int getPrompt_letter_id() {
+		return prompt_letter_id;
+	}
+	public void setPrompt_letter_id(int prompt_letter_id) {
+		this.prompt_letter_id = prompt_letter_id;
+	}
+/*	public int getUserid() {
+		return userid;
+	}
+	public void setUserid(int userid) {
+		this.userid = userid;
+	}*/
+	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() {
+		return send_time;
+	}
+	public void setSend_time(long send_time) {
+		this.send_time = send_time;
+	}
+	public long getReceive_time() {
+		return 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;
+	}
+	
+	
+	
+	
+	
+	
+	
+	
+}

+ 180 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/AccountOpenMapper.xml

@@ -0,0 +1,180 @@
+<?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.AccountOpenMapper"> 
+	<!-- <select id="queryAllAccountOpening" parameterType="java.util.Map"  resultType="com.fuzamei.entity.AccountOpeningRecord">
+		select customer_id,customer_name,bank_account,basic_data_id,letter_of_commitment_id,application_id,update_time,s.status_name from status s,account_opening_record a where s.status_id=a.status_id      
+	</select> -->
+<!-- 	<select id="serchCountPage" resultType="int">
+	  select count(*)  from account_opening_record 
+	</select>
+   账户开立分页
+	<select id="queryAllAccountOpening" parameterType="java.util.Map" resultType="com.fuzamei.entity.AccountOpeningRecord">
+		select customer_id,customer_name,bank_account,basic_data_id,letter_of_commitment_id,application_id,update_time,s.status_name  from account_opening_record a left join status s on s.status_id=a.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  between #{startTime} and #{endTime}
+		</if>
+	</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>
+   <!-- 账户开立带分页-->
+	<select id="queryAllAccountOpening"  resultType="com.fuzamei.entity.AccountOpeningRecord">
+		select 
+			customer_id,
+			customer_name,
+			bank_account,
+			attachment_name as basic_data_id,
+			attachment_name as letter_of_commitment_id,
+			attachment_name as application_id,
+			update_time,s.status_name 
+		from  
+			account_opening_record a, attachment f,status s  
+	 
+	 <where>
+	  		a.basic_data_id=f.attachment_id 
+	  	and 
+	  		a.letter_of_commitment_id = f.attachment_id 
+	  	and 
+	  		a.application_id= f.attachment_id 
+	  	and  
+	  		s.status_id=a.status_id 
+		<if test="customer_name!='' and customer_name!=null ">
+		 and  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>
+	<!-- ************************************************************************************************** -->
+	<select id="selectPromptLetter" parameterType="java.util.Map" resultType="com.fuzamei.entity.PromptLetter">
+		select   prompt_letter_id , prompt_letter_name ,receive_time  from prompt_letter 
+		<where>
+		  <if test="startTime!='' and endTime != ''">
+		   receive_time   between #{startTime} and #{endTime}
+		  </if>
+		</where>
+		      order by receive_time desc
+	          limit #{startPage},#{rowNum}
+	</select>
+	<!--*********************************************************************************************  -->
+	<!-- 提示函  插入管理人账号  附件   上传-->
+	<insert id="insertTiShiHanOrUser" parameterType="java.util.Map">
+	     <!-- insert  into  t_user(user_id) VALUES (#{user_id}); -->
+	     insert  into  prompt_letter(prompt_letter_id) VALUES (#{prompt_letter_id});<!--还需要改动2017/12/20  -->
+	     
+	     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>
+	<!--根据管理人账号查询管理人名字 -->
+	<select id="selectTishihanById" parameterType="java.util.Map" resultType="com.fuzamei.entity.User">
+		select  person_name  from t_user where user_id=#{user_id};
+	</select>
+	<!--**********************************************************************************************  -->
+	<!--查询风险提示函3 ,省分行托管中心风管岗  -->
+	<select id="selectTishihan" parameterType="java.util.Map" resultType="com.fuzamei.entity.PromptLetter">
+		select  t.prompt_letter_id , y.person_name, t.prompt_letter_name ,t.receive_time from prompt_letter t,t_user y 
+		<where>
+		   t.send_person=y.user_id
+		    <if test="startTime!='' and endTime != ''">
+		    	and	receive_time  between #{startTime} and #{endTime}
+		   </if>
+		</where>
+		      order by receive_time desc
+	          limit #{startPage},#{rowNum}
+	</select>
+	<!--***********************************************************************************************  -->
+	<!-- 真伪查询   上传服务器   附件表记录插入-->
+	<insert id="insertTrueFalseSelect" 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>
+	<!--**************************************************************************************************************  -->
+	<!-- 上传客户资料,承诺书,开户申请书    经办支行创建添加账号和客户名称   useGeneratedKeys="true" 返回主键  -->
+	<insert id="insertAccountUploadFile"   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="insertAccountUploadFileFuJianBiao" 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>
+	
+	
+	
+	
+	
+	
+	
+
+	
+</mapper>

+ 46 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/CapitalTransferMapper.xml

@@ -0,0 +1,46 @@
+<?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.entity.CapitalTransfer"> 
+    <!--查询资金划转表  省分行托管中心指令业务岗 -->
+	<select id="selectCapitalTransferTable" parameterType="java.util.Map" resultType="com.fuzamei.entity.CapitalTransfer">
+		select  
+		       z.fund_id,
+		       y.person_name,
+		       z.fund_name,
+		       z.account_balance,
+		       z.sum_of_money,
+		       z.basis_of_payment,
+		       z.drawing_account,
+		       z.apply_time,
+		       z.handle_time ,
+		       t.status_name 
+	    from   capital_transfer z ,
+	           status  t ,
+	           t_user y
+	   <where>
+	          z.status_id =t.status_id
+	        and 
+	           y.user_id=z.custodian
+	         
+	      <if test="fund_name!='' and fund_name!= null">
+	          and fund_name=#{fund_name}
+	      </if>
+	      <if test="status_name!='' and status_name!=null">
+	          and status_name=#{status_name}
+	      </if>
+	      <if test="startTime!='' and endTime != ''">
+		     and apply_time  between #{startTime} and #{endTime}
+		  </if>
+	   </where>
+	        order by apply_time desc
+	        limit #{startPage},#{rowNum}
+	</select>
+	<!--查询资金划转表   返回查询总条数 -->
+    <select id="selectCapitalTransferPage" resultType="int">
+    		select count(*)  from capital_transfer
+    </select>
+
+
+
+
+</mapper>

+ 26 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/AccountOpenMapper.java

@@ -0,0 +1,26 @@
+package com.fuzamei.mapperInterface;
+
+import java.util.List;
+import java.util.Map;
+
+import com.fuzamei.entity.AccountOpeningRecord;
+import com.fuzamei.entity.PromptLetter;
+import com.fuzamei.entity.User;
+
+public interface AccountOpenMapper {
+	public List<AccountOpeningRecord> queryAllAccountOpening(Map<String, Object> map);//查询账户开立列表
+	public  int serchCountPage();//总页数
+	public  int serchCountPage2();//提示函总页数
+	public List<PromptLetter> selectPromptLetter(Map<String, Object> map);//查询风险提示函
+	public void insertTiShiHanOrUser(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);//<!-- 上传客户资料,承诺书,开户申请书    经办支行添加创建账号和客户名称 -->上传到附件表
+	
+	
+	
+	
+	
+}

+ 19 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/CapitalTransferMapper.java

@@ -0,0 +1,19 @@
+package com.fuzamei.mapperInterface;
+
+import java.util.List;
+import java.util.Map;
+
+import com.fuzamei.entity.CapitalTransfer;
+
+public interface CapitalTransferMapper {
+
+	public List<CapitalTransfer> selectCapitalTransferTable(Map<String, Object> map);//查询资金划转列表
+    public int  selectCapitalTransferPage();//查询资金划转表     总页数
+	
+	
+	
+	
+	
+	
+	
+}

+ 400 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/AccountOpenService.java

@@ -0,0 +1,400 @@
+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.AccountOpenDao;
+import com.fuzamei.entity.AccountOpeningRecord;
+import com.fuzamei.entity.PromptLetter;
+import com.fuzamei.entity.User;
+import com.fuzamei.utils.PageDTO;
+
+
+@Service
+public class AccountOpenService {
+	@Autowired
+   private AccountOpenDao  accountOpenDao;
+	private static final int ROW_NUM = 10; // 分页每页显示数据的数量
+    public PageDTO queryAllAccountOpening(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 = accountOpenDao.serchCountPage();
+		List<AccountOpeningRecord> list=accountOpenDao.queryAllAccountOpening(mapToDao);
+		pageDto.setTotal(count);
+		pageDto.setRows(list);
+		return pageDto;
+	}
+    ////////////////////////////////////////////////////////////
+	public PageDTO selectPromptLetter(Map<String, Object> map){//查询风险提示函
+		int page = 1; // 默认页是第一页
+		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("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);
+		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 = accountOpenDao.serchCountPage2();
+		List<PromptLetter> list=accountOpenDao.selectPromptLetter(mapToDao);
+		pageDto.setTotal(count);
+		pageDto.setRows(list);
+		return pageDto;
+
+	}
+   //////////////////////////////////////////////////////////////////////////////
+
+	public PageDTO selectTishihan(Map<String, Object> map){//查询风险提示函
+		int page = 1; // 默认页是第一页
+		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("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; 
+			}
+		}
+		PageDTO pageDto = new PageDTO(); // 创建分页对象
+		Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
+		mapToDao.put("startPage", (page - 1) * ROW_NUM);
+		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 = accountOpenDao.serchCountPage2();
+		List<PromptLetter> list=accountOpenDao.selectTishihan(mapToDao);
+		pageDto.setTotal(count);
+		pageDto.setRows(list);
+		return pageDto;
+
+	}
+/////////////////////////////////////////////////////////////////////////////////
+	@Transactional
+	public void insertTiShiHanOrUser(Map<String, Object> map) {//只上传了id到数据库   待修改哦
+	    String   prompt_letter_id="";  // 提示函id
+	   
+	    
+	    String attachment_id="";    //附件id
+	    String attachment_name="";  //附件名称
+	    String url="";              //附件url
+	    String upload_person_id=""; //附件上传人的id
+	    long create_time=0;      //附件添加的时间
+	    
+		if (!"".equals(map.get("prompt_letter_id")) && map.get("prompt_letter_id") != null) { 
+			prompt_letter_id = (String) map.get("prompt_letter_id");
+		}
+		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("upload_person_id")) && map.get("upload_person_id") != null) {   
+			upload_person_id = (String) map.get("upload_person_id");
+		}
+		if (!"".equals(map.get("create_time")) && map.get("create_time") != null) { 
+			create_time = (Long) map.get("create_time");
+		}
+		 Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
+		  mapToDao.put("prompt_letter_id", prompt_letter_id);//提示函id
+		  //mapToDao.put("hash","1a2b3c4d5e");//先注视
+		  
+		  mapToDao.put("attachment_id", 110120119);//附件id   目前写死
+		  mapToDao.put("attachment_name", attachment_name);//附件名称    暂时没写
+		  mapToDao.put("url", url);//附件url   后面有下载的   需要地址
+		  mapToDao.put("upload_person_id", 111222333);//附件人上传的id这里写的是死值
+		  mapToDao.put("create_time", System.currentTimeMillis());//附件添加时间,这里应该写添加得到的当前系统时间  目前写的是死值
+		
+		  accountOpenDao.insertTiShiHanOrUser(mapToDao);//将数据添加到数据库里
+	}
+	@Transactional
+	public void insertTrueFalseSelect(Map<String, Object> map) {
+	    String attachment_id="";    //附件id
+	    String attachment_name="";  //附件名称
+	    String url="";              //附件url
+	    String upload_person_id=""; //附件上传人的id
+	    long create_time=0;      //附件添加的时间
+	
+		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("upload_person_id")) && map.get("upload_person_id") != null) {   
+			upload_person_id = (String) map.get("upload_person_id");
+		}
+		if (!"".equals(map.get("create_time")) && map.get("create_time") != null) { 
+			create_time = (Long) map.get("create_time");
+		}
+	    
+		Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
+		  mapToDao.put("attachment_id", 123456789);//附件id   目前写死
+		  mapToDao.put("attachment_name", attachment_name);//附件名称    暂时没写
+		  mapToDao.put("url", url);//附件url   后面有下载的   需要地址
+		  mapToDao.put("upload_person_id", 223344);//附件人上传的id这里写的是死值
+		  mapToDao.put("create_time", System.currentTimeMillis());//附件添加时间,这里应该写添加得到的当前系统时间  
+	    
+		  accountOpenDao.insertTrueFalseSelect(mapToDao);//把数据插入到附件表里
+	    
+	
+	}
+	@Transactional
+	public void insertAccountUploadFile(Map<String, Object> map) {
+		String customer_id="";   //ID
+		String customer_name="";//客户名称
+		String bank_account="";//银行账号
+		
+		//省略几个直接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");
+		}/*else {
+			throw  new RuntimeException("银行账号是空");
+		}*/
+		
+		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");
+		}
+		 //Math.round(Math.random()*8999+1000);
+	
+		    SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
+		    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","6223"+ss);//银行帐号 产生不能一样    这里是用Date时间做账号   18位数     //直接put进来  Action  可以不要
+			  mapToDao.put("basicAttachment_id", basicAttachment_id);//基本资料id
+			  mapToDao.put("letterAttachment_id", letterAttachment_id);//承诺书id   这三个id为空  
+			  mapToDao.put("applicationAttachment_id", applicationAttachment_id);//申请书id
+			  mapToDao.put("update_time",  System.currentTimeMillis());//更新时间
+			  mapToDao.put("status_id",  9);//状态写的是死值    9状态代表已完成
+			  mapToDao.put("hash","1aaa2bbb3ccc");//哈希值暂时写的是个字符串死值
+			  accountOpenDao.insertAccountUploadFile(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);//写的是死值  到时候在改
+			  mapToDaoBasic.put("create_time", mapToDao.get("update_time"));
+			  accountOpenDao.insertAccountUploadFileFuJianBiao(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", 10086);//写的是死值   到时候在改
+			 mapToDaoLetter.put("create_time", mapToDao.get("update_time"));
+		     accountOpenDao.insertAccountUploadFileFuJianBiao(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", 10087);//写的是死值    到时候在改
+			 mapToDaoApplication.put("create_time", mapToDao.get("update_time"));
+		     accountOpenDao.insertAccountUploadFileFuJianBiao(mapToDaoApplication);//上传开户申请书的       到附件表
+		     
+		   
+	}
+	
+	
+	
+	
+	
+	
+	
+	
+}

+ 83 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/CapitalTransferService.java

@@ -0,0 +1,83 @@
+package com.fuzamei.service;
+
+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 com.fuzamei.dao.CapitalTransferDao;
+import com.fuzamei.entity.CapitalTransfer;
+import com.fuzamei.utils.PageDTO;
+
+@Service
+public class CapitalTransferService {
+    @Autowired
+    private   CapitalTransferDao  capitalTransferDao;
+    private static final int ROW_NUM = 10; // 分页每页显示数据的数量
+    /**  
+     *  查询资金划转表  省分行托管中心指令业务岗
+     * @param  
+     * @param   
+     * @throws Exception  
+     */
+	public PageDTO selectCapitalTransferTable(Map<String, Object> map){//查询资金划转列表
+		int page = 1; // 默认页是第一页
+		String fund_name="";//基金名称
+		String status_name="";//状态
+		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("fund_name")) && map.get("fund_name") != null) { // 等于空就直接取空值
+			fund_name = (String) map.get("fund_name");
+		}
+		if (!"".equals(map.get("status_name")) && map.get("status_name") != null) { // 等于空就直接取空值
+			status_name = (String) map.get("status_name");
+		}
+		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("fund_name", fund_name);
+		mapToDao.put("status_name", status_name);
+		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  countPage=capitalTransferDao.selectCapitalTransferPage();//资金划转表  总页数
+		List<CapitalTransfer> list=capitalTransferDao.selectCapitalTransferTable(mapToDao);
+		pageDto.setTotal(countPage);
+		pageDto.setRows(list);
+		return pageDto;
+		
+	}
+	
+}

+ 76 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/utils/HashCodeUtil.java

@@ -0,0 +1,76 @@
+package com.fuzamei.utils;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+/**
+ * 计算字符串的hash值工具类。 
+ * @author dell
+ *
+ */
+public class HashCodeUtil{
+
+	private static final String[] hexDigits= {"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"};
+   /**
+     * 将字节数组转换为16进制的字符串 
+     *  
+     * @param byteArray 
+     *            字节数组 
+     * @return 16进制的字符串 
+     */
+	private static String byteArrayToHexString(byte[] byteArray) {
+		StringBuffer sb = new StringBuffer();
+		for (byte byt : byteArray) {
+			sb.append(byteToHexString(byt));
+		}
+		return sb.toString();}
+    /**
+     * 将字节转换为16进制字符串
+     * @param byt
+     * @return 16进制字符串
+     */
+	private static String byteToHexString(byte b) {
+	
+		return hexDigits[(b >> 4) & 0x0f] + hexDigits[b & 0x0f];
+	} 
+	/**
+	 * 将摘要信息转换为相应的编码
+	 * @param code编码类型
+	 * @param message摘要信息
+	 * @return相应的编码字符串 
+	 */
+	private static String hash(String code,String message) {
+		MessageDigest md;
+		String encode=null;
+		try {
+			md=MessageDigest.getInstance(code);
+			encode=byteArrayToHexString(md.digest(message.getBytes()));
+		} catch (NoSuchAlgorithmException e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	/**
+	 * 计算message的MD5编码 
+	 * @param message摘要信息
+	 * @return MD5编码之后的字符串 
+	 */
+	public static String md5Hash(String  message) {
+	 return hash("MD5",message);	
+	}
+	
+	
+	public static String  sha256Hash(String message) {
+		return hash("sha256",message);
+	}
+	
+	
+	public static String sha512Hash(String message) {
+		return hash("sha512",message);
+	}
+	
+	public static void main(String[] args) {
+		System.out.println("--MD55555555555555--:" + HashCodeUtil.md5Hash("C:\\Users\\dell\\Desktop"));
+	}
+
+	
+}

+ 71 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/utils/HashXiZhiUtil.java

@@ -0,0 +1,71 @@
+package com.fuzamei.utils;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.security.MessageDigest;
+
+public class HashXiZhiUtil {
+
+	public static byte[] getMd5(String input) {
+        try {
+            byte[] by = input.getBytes("UTF-8");
+            MessageDigest det = MessageDigest.getInstance("SHA");
+            return det.digest(by);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+	public static String bytesToHexString(byte[] src){
+        StringBuilder stringBuilder = new StringBuilder("");
+        if (src == null || src.length <= 0) {
+            return null;
+        }
+        for (int i = 0; i < src.length; i++) {
+            int v = src[i] & 0xFF;
+            String hv = Integer.toHexString(v);
+            if (hv.length() < 2) {
+                stringBuilder.append(0);
+            }
+            stringBuilder.append(hv);
+        }
+        return stringBuilder.toString();
+    }
+	
+	public static String getMD5Checksum(String filename) throws Exception {  
+		   byte[] b = createChecksum(filename);  
+		   String result = "";  
+		  
+		   for (int i=0; i < b.length; i++) {  
+		       result += Integer.toString( ( b[i] & 0xff ) + 0x100, 16).substring(1);//加0x100是因为有的b[i]的十六进制只有1位  
+		   }  
+		   return result;  
+		}
+	public static byte[] createChecksum(String filename) throws Exception {  
+		   InputStream fis =  new FileInputStream(filename);          //<span style="color: rgb(51, 51, 51); font-family: arial; font-size: 13px; line-height: 20px;">将流类型字符串转换为String类型字符串</span>  
+		  
+		   byte[] buffer = new byte[1024];  
+		   MessageDigest complete = MessageDigest.getInstance("MD5"); //如果想使用SHA-1或SHA-256,则传入SHA-1,SHA-256  
+		   int numRead;  
+		  
+		   do {  
+		       numRead = fis.read(buffer);    //从文件读到buffer,最多装满buffer  
+		       if (numRead > 0) {  
+		       complete.update(buffer, 0, numRead);  //用读到的字节进行MD5的计算,第二个参数是偏移量  
+		       }  
+		   } while (numRead != -1);  
+		  
+		   fis.close();  
+		   return complete.digest();  
+		}  
+
+
+	/*public static void main(String[] args) {
+	  System.out.println(HashXiZhiUtil.getMd5("D:\\xiangnu\\123.doc"));
+	  System.out.println(HashXiZhiUtil.bytesToHexString(HashXiZhiUtil.getMd5("D:\\xiangnu\\123.doc")));
+	  System.out.println(HashXiZhiUtil.bytesToHexString(HashXiZhiUtil.getMd5("D:\\xiangnu\\123.doc")));
+	}
+	*/
+	
+	
+}

+ 145 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/AccountOpenAction.java

@@ -0,0 +1,145 @@
+package com.fuzamei.web;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+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.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.AccountOpenService;
+import com.fuzamei.utils.JSONUtil;
+import com.fuzamei.utils.PageDTO;
+
+@Controller
+@RequestMapping(value = "/Account")
+public class AccountOpenAction {
+	
+
+	@Autowired
+	private AccountOpenService  accountService;//注入service
+
+	@RequestMapping(value = "/queryAccountInfo", method = RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> queryAccountInfo(@RequestBody String data) {
+		//System.out.println("查询账户开立信息列表");
+		Map<String, Object> mapResult = new LinkedHashMap<String, Object>();
+		Map<String, Object> map = JSONUtil.jsonToMap(data);
+		PageDTO pageDto=  accountService.queryAllAccountOpening(map);
+		mapResult = JSONUtil.getJsonMap(200, true, "操作成功", pageDto);
+
+		return mapResult;
+	}
+	
+	@RequestMapping(value = "/selectPromptLetter", method = RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> selectPromptLetter(@RequestBody String data) {
+		//System.out.println("查询风险提示函信息列表");
+		Map<String, Object> mapResult = new LinkedHashMap<String, Object>();
+		Map<String, Object> map = JSONUtil.jsonToMap(data);
+		PageDTO pageDto=  accountService.selectPromptLetter(map);
+		mapResult = JSONUtil.getJsonMap(200, true, "操作成功", pageDto);
+
+		return mapResult;
+	}
+	
+
+	@RequestMapping(value = "/selectTishihan", method = RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> selectTishihan(@RequestBody String data) {
+		//System.out.println("查询风险提示函信息列表3 ,省分行托管中心风管岗");
+		Map<String, Object> mapResult = new LinkedHashMap<String, Object>();
+		Map<String, Object> map = JSONUtil.jsonToMap(data);
+		PageDTO pageDto=  accountService.selectTishihan(map);
+		mapResult = JSONUtil.getJsonMap(200, true, "操作成功", pageDto);
+
+		return mapResult;
+	}
+	
+	
+	 /**  
+     *  添加客户名称和银行账号  上传资料
+     * @param  
+     * @param   
+     * @throws Exception  
+     */
+    @RequestMapping(value="/uploadOrInsertBankAccount",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";  
+            //String fileName = file.getOriginalFilename();    
+              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进去
+     
+		    
+            //基本资料 
+            String fileName = file.getOriginalFilename();  
+            String pathFile=path+"/"+fileName;
+            File newfile = new File(pathFile); 
+            file.transferTo(newfile);
+            map.put("basicAttachment_id", 333);//附件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", 444);//附件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", 555);//附件id暂时写死
+    		map.put("applicationAttachment_name", fileName3);
+    	    map.put("applicationUrl","\\testCeshi"+fileName3);
+            
+    	    accountService.insertAccountUploadFile(map);
+    	 
+    	    Map<String, Object> mapResult=JSONUtil.getJsonMap(500, true, "上传成功了", null);
+              return mapResult;
+		 } catch (Exception e) {
+			Map<String, Object> mapResult=JSONUtil.getJsonMap(500, true, "上传失败"+e.getMessage(), null);
+			return mapResult ;
+		 }
+    	
+    	
+    	
+    	
+    }
+	
+	
+	
+	
+	
+	
+	
+	   
+}
+	
+

+ 38 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/CapitalTransferAction.java

@@ -0,0 +1,38 @@
+package com.fuzamei.web;
+
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+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.ResponseBody;
+
+import com.fuzamei.service.CapitalTransferService;
+
+@Controller
+@RequestMapping(value = "CapitalTransfer")
+public class CapitalTransferAction {
+	@Autowired	
+	private CapitalTransferService capitalTransferService;
+	
+	 /**  
+     *  查询资金划转表  省分行托管中心指令业务岗
+     * @param  
+     * @param   
+     * @throws Exception  
+     */
+	@RequestMapping(value = "/selectCapitalTransfer", method = RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> selectCapitalTransfer(@RequestBody String data) {
+	
+		
+		
+		return null;
+	
+	}
+	
+	
+	
+}

+ 213 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/PromptLetterAction.java

@@ -0,0 +1,213 @@
+package com.fuzamei.web;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.security.MessageDigest;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.DigestUtils;
+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.AccountOpenService;
+import com.fuzamei.theromus.utils.HexUtils;
+import com.fuzamei.utils.HashCodeUtil;
+import com.fuzamei.utils.HashXiZhiUtil;
+import com.fuzamei.utils.JSONUtil;
+/**  
+ * 文件上传功能  
+ * @param file  
+ * @return  
+ * @throws IOException   
+ */  
+@Controller
+@RequestMapping(value = "/PromptLetter")
+public class PromptLetterAction {
+	@Autowired
+	private AccountOpenService  accountService;//注入service
+	
+  /*  @RequestMapping(value="/upload",method=RequestMethod.POST)  
+    @ResponseBody  
+    public Map<String,Object> upload(@RequestParam("file") MultipartFile file,HttpServletRequest request) throws IOException{  
+        String path = "D:\\tomcate\\apache-tomcat-8.5.24\\webapps"+request.getServletContext().getContextPath()+"\\UploadCeshi";  
+        String fileName = file.getOriginalFilename();    
+        File dir = new File(path+"/"+fileName);          
+        if(!dir.exists()){  
+            dir.mkdirs();  
+        }  
+        //MultipartFile自带的解析方法  
+        file.transferTo(dir);  
+    	Map<String, Object> mapResult=JSONUtil.getJsonMap(200, true, "上传成功", null);//将查询出来的结果封装成map数据返回
+         return mapResult ;
+         
+    }  */
+	   /**  
+     * 文件下载功能  
+     * @param request  
+     * @param response  
+     * @throws Exception  
+     */  
+/*    @RequestMapping("/down")  
+    public void down(HttpServletRequest request,HttpServletResponse response) throws Exception{  
+        //模拟文件,aa.txt为需要下载的文件  
+        String fileName = request.getSession().getServletContext().getRealPath("upload")+"/aa.txt";  
+        //获取输入流  
+        InputStream bis = new BufferedInputStream(new FileInputStream(new File(fileName)));  
+        //假如以中文名下载的话  
+        String filename = "下载文件.txt";  
+        //转码,免得文件名中文乱码  
+        filename = URLEncoder.encode(filename,"UTF-8");  
+        //设置文件下载头  
+        response.addHeader("Content-Disposition", "attachment;filename=" + filename);    
+        //1.设置文件ContentType类型,这样设置,会自动判断下载文件类型    
+        response.setContentType("multipart/form-data");   
+        BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());  
+        int len = 0;  
+        while((len = bis.read()) != -1){  
+            out.write(len);  
+            out.flush();  
+        }  
+        out.close();  
+    } */
+	/**
+	 * 风险提示函发函  上传
+	 * @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{  
+	        try {
+	        	String path = "D:\\tomcate\\apache-tomcat-8.5.24\\webapps"+request.getServletContext().getContextPath()+"\\UploadCeshi";  
+	            File dir = new File(path);          
+	            if(!dir.exists()){  
+	                dir.mkdirs();  
+	            } 
+	            String fileName = file.getOriginalFilename();  
+	            String pathFile=path+"/"+fileName;
+	            File newfile = new File(pathFile); 
+	            file.transferTo(newfile);
+	            //MultipartFile自带的解析方法 
+	    		Map<String, Object> map = new LinkedHashMap<String, Object>();
+	    		map.put("prompt_letter_id", prompt_letter_id);//有问题   待改动下
+	    		
+	    		map.put("fileName", fileName);
+	    		map.put("url",fileName);
+	            accountService.insertTiShiHanOrUser(map);
+	            
+	            Map<String, Object>	mapResult=JSONUtil.getJsonMap(200, true, "上传成功", null);
+				return mapResult ;
+			}
+	       catch (Exception e) {
+				Map<String, Object> mapResult=JSONUtil.getJsonMap(500, true, "上传失败"+e.getMessage(), null);
+				return mapResult ;
+			}
+		
+	    	
+	    }  
+	
+    /**  
+     * 账户开立下载 doc文档
+     * @param request  
+     * @param response  
+     * @throws Exception  
+     */  
+    @RequestMapping(value="/downloadFile")  
+    @ResponseBody 
+    public Map<String,Object> downloadFile(HttpServletRequest request,HttpServletResponse response,@RequestParam("url") String url) throws Exception{  
+        try {
+        	  //模拟文件,456.doc为需要下载的文件  
+            String fileName = request.getSession().getServletContext().getRealPath("")+url;  
+            //获取输入流  
+            InputStream bis = new BufferedInputStream(new FileInputStream(new File(fileName))); 
+            //截取文件名字
+            String filename = url.substring(url.lastIndexOf("/")+1);
+            //转码,免得文件名中文乱码  
+            filename = URLEncoder.encode(filename,"UTF-8");  
+            //设置文件下载头  
+            response.addHeader("Content-Disposition", "attachment;filename=" + filename);    
+            //1.设置文件ContentType类型,这样设置,会自动判断下载文件类型    
+            response.setContentType("multipart/form-data");   
+            BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());  
+            int len = 0;  
+            while((len = bis.read()) != -1){  
+                out.write(len);  
+                out.flush();  
+            }  
+            out.close(); 
+            //返给前端map进行前端提示
+        	return JSONUtil.getJsonMap(200, true, "下载成功",null); 
+			
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, "下载失败:"+e.getMessage(),null); 
+		}
+	
+    	 
+    } 
+    
+    /**  
+     * 真伪查询 上传文件  产生一条哈希值
+     * @param  
+     * @param   
+     * @throws Exception  
+     */  
+    @RequestMapping(value="/trueFalseSelect",method=RequestMethod.POST)  
+    @ResponseBody  
+    public Map<String,Object> trueFalseSelect(@RequestParam("file") MultipartFile file,HttpServletRequest request) throws IOException{  
+       try {
+    	   String path = "D:\\tomcate\\apache-tomcat-8.5.24\\webapps"+request.getServletContext().getContextPath()+"\\Ceshi";  
+         // String fileName = file.getOriginalFilename();    
+           File dir = new File(path);          
+           if(!dir.exists()){  
+               dir.mkdirs();  
+           }  
+           //MultipartFile自带的解析方法  
+         /*  file.transferTo(dir);  
+           Map<String, Object> map = new LinkedHashMap<String, Object>();
+   		   map.put("fileName", fileName);
+   		   map.put("url",fileName+"ffff");
+   		   */
+           
+           String fileName = file.getOriginalFilename();  
+           String pathFile=path+"/"+fileName;
+           File newfile = new File(pathFile); 
+           file.transferTo(newfile);
+           //MultipartFile自带的解析方法 
+   		   Map<String, Object> map = new LinkedHashMap<String, Object>();
+   		   map.put("fileName", fileName);
+   		   map.put("url",fileName);
+           
+           accountService.insertTrueFalseSelect(map);
+           //上传文件之后才会产生一条哈希值的
+          // HashXiZhiUtil.getMd5("D:\\xiangnu\\123.doc");
+           HashXiZhiUtil.getMD5Checksum(pathFile);//调用方法 对(文件)产生一条哈希值
+        System.out.println( HashXiZhiUtil.getMD5Checksum(pathFile)+"--哈希值");
+       	Map<String, Object> mapResult=JSONUtil.getJsonMap(200, true, "上传成功", null);//将查询出来的结果封装成map数据返回
+            return mapResult ;
+		}
+       catch (Exception e) {
+			Map<String, Object> mapResult=JSONUtil.getJsonMap(500, true, "上传失败"+e.getMessage(), null);
+			return mapResult ;
+		}
+    }  
+    
+
+ 
+	
+}