Browse Source

业务申报
估值核算
项目文档
操作记录
4个模块初始版本提交

ylx 7 years ago
parent
commit
938a4a742d
25 changed files with 3386 additions and 0 deletions
  1. 64 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/BusinessDeclareDao.java
  2. 25 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/OperationHistoryDao.java
  3. 44 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/ProjectFileDao.java
  4. 42 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/ValuationAccountingDao.java
  5. 48 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/BusinessCheck.java
  6. 106 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/BusinessDeclare.java
  7. 61 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/OperationHistory.java
  8. 92 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/ProjectFile.java
  9. 105 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/ValuationAccount.java
  10. 284 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/BusinessDeclareMapper.xml
  11. 46 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/OperationHistoryMapper.xml
  12. 105 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/ProjectFileMapper.xml
  13. 127 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/ValuationAccountingMapper.xml
  14. 33 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/BusinessDeclareMapper.java
  15. 13 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/OperationHistoryMapper.java
  16. 22 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/ProjectFileMapper.java
  17. 22 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/ValuationAccountingMapper.java
  18. 636 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/BusinessDeclareService.java
  19. 106 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/OperationHistoryService.java
  20. 240 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/ProjectFileService.java
  21. 285 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/service/ValuationAccountingService.java
  22. 413 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/BusinessDeclareAction.java
  23. 81 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/OperationHistoryAction.java
  24. 185 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/ProjectFileAction.java
  25. 201 0
      ccb_fund_trusteeship/src/main/java/com/fuzamei/web/ValuationAccountingAction.java

+ 64 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/BusinessDeclareDao.java

@@ -0,0 +1,64 @@
+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.BusinessCheck;
+import com.fuzamei.entity.BusinessDeclare;
+import com.fuzamei.mapperInterface.BusinessDeclareMapper;
+
+@Repository
+public class BusinessDeclareDao {
+
+	@Autowired
+	private BusinessDeclareMapper businessDeclareMapper;
+
+	public void insertBusinessDeclareInformationToDaoByBranchBank(Map<String, Object> map) {
+		businessDeclareMapper.insertBusinessDeclareInformationToDaoByBranchBank(map);
+	}
+
+	public void insertAttachmentInformationToDaoByBranchBank(Map<String, Object> map) {
+		businessDeclareMapper.insertAttachmentInformationToDaoByBranchBank(map);
+	}
+
+	public int findAddInfromations() {
+		return businessDeclareMapper.findAddInfromations();
+	}
+
+	public List<BusinessDeclare> queryBusinessDeclareInformation(Map<String, Object> map) {
+		return businessDeclareMapper.queryBusinessDeclareInformation(map);
+	}
+
+	public List<BusinessCheck> queryBusinessCheckInformation(Map<String, Object> map) {
+		return businessDeclareMapper.queryBusinessCheckInformation(map);
+	}
+
+	public void businessDeclareCheckedBy(Map<String, Object> map) {
+		businessDeclareMapper.businessDeclareCheckedBy(map);
+	}
+
+	public void updateBusinessDeclareStatus(Map<String, Object> map) {
+		businessDeclareMapper.updateBusinessDeclareStatus(map);
+	}
+
+	public void insertContractInformationToContractRecord(Map<String, Object> map) {
+		businessDeclareMapper.insertContractInformationToContractRecord(map);
+	}
+
+	public void insertContractInformationToContractStatusTracking(Map<String, Object> map) {
+		businessDeclareMapper.insertContractInformationToContractStatusTracking(map);
+	}
+
+	public void insertContractInformationToAttachment(Map<String, Object> map) {
+		businessDeclareMapper.insertContractInformationToAttachment(map);
+	}
+
+	public void insertOperationHistoryInformationToDaoByBranchBank(Map<String, Object> map) {
+		businessDeclareMapper.insertOperationHistoryInformationToDaoByBranchBank(map);
+	}
+	
+	
+}

+ 25 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/OperationHistoryDao.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.OperationHistory;
+import com.fuzamei.mapperInterface.OperationHistoryMapper;
+
+@Repository
+public class OperationHistoryDao {
+	
+	@Autowired
+	private OperationHistoryMapper dao;
+	
+	public List<OperationHistory> queryOperationHistoryInformation(Map<String, Object> map){
+		return dao.queryOperationHistoryInformation(map);
+	}
+	
+	public int findAllInformation(){
+		return dao.findAllInformation();
+	}
+}

+ 44 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/ProjectFileDao.java

@@ -0,0 +1,44 @@
+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.ProjectFile;
+import com.fuzamei.mapperInterface.ProjectFileMapper;
+
+@Repository
+public class ProjectFileDao {
+
+	@Autowired
+	private ProjectFileMapper projectFileMapper;
+
+	public int findAllInformation() {
+		return projectFileMapper.findAllInformation();
+	}
+
+	public List<ProjectFile> queryProjectFileInformation(Map<String, Object> mapToDao) {
+
+		return projectFileMapper.queryProjectFileInformation(mapToDao);
+	}
+
+	public List<ProjectFile> checkoutProjectFiles(Map<String, Object> mapToDao) {
+		
+		return projectFileMapper.checkoutProjectFiles(mapToDao);
+	}
+
+	public void insertInformationIntoTable(Map<String, Object> mapToDao) {
+		projectFileMapper.insertInformationIntoTable(mapToDao);
+	}
+
+	public void insertOperationHistoryInformationToDao(Map<String, Object> map) {
+		projectFileMapper.insertOperationHistoryInformationToDao(map);
+	}
+
+	public void insertInformationToAttachment(Map<String, Object> map) {
+		projectFileMapper.insertInformationToAttachment(map);
+	}
+
+}

+ 42 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/ValuationAccountingDao.java

@@ -0,0 +1,42 @@
+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.ValuationAccount;
+import com.fuzamei.mapperInterface.ValuationAccountingMapper;
+
+@Repository
+public class ValuationAccountingDao {
+	
+	@Autowired
+	private ValuationAccountingMapper valuationAccountingMapper;
+
+	public int findAllInformations() {
+		return valuationAccountingMapper.findAllInformations();
+	}
+
+	public List<ValuationAccount> queryValuationAccountingInformation(Map<String, Object> map) {
+		return valuationAccountingMapper.queryValuationAccountingInformation(map);
+	}
+
+	public void insertInformationIntoTableByAdmin(Map<String, Object> map) {
+		valuationAccountingMapper.insertInformationIntoTableByAdmin(map);
+	}
+
+	public void updateInformationByBank(Map<String, Object> map) {
+		valuationAccountingMapper.updateInformationByBank(map);
+	}
+
+	public void insertOperationHistoryInformationToDao(Map<String, Object> map) {
+		valuationAccountingMapper.insertOperationHistoryInformationToDao(map);
+	}
+
+	public void insertInformationToAttachment(Map<String, Object> map) {
+		valuationAccountingMapper.insertInformationToAttachment(map);
+	}
+
+}

+ 48 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/BusinessCheck.java

@@ -0,0 +1,48 @@
+package com.fuzamei.entity;
+
+public class BusinessCheck {
+	private String check_department;		//审核部门
+	private String check_person;			//审核人员
+	private Integer check_business_id;		//被审核的业务id号,也就是业务id号,根据这个进行条件关联
+	private String check_opinion;			//审核意见
+	private Long check_time;				//审核时间
+	private String result;					//审核结果,需要关联状态表查询出状态的status_name------>varchar类型
+	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 Integer getCheck_business_id() {
+		return check_business_id;
+	}
+	public void setCheck_business_id(Integer check_business_id) {
+		this.check_business_id = check_business_id;
+	}
+	public String getCheck_opinion() {
+		return check_opinion;
+	}
+	public void setCheck_opinion(String check_opinion) {
+		this.check_opinion = check_opinion;
+	}
+	public Long getCheck_time() {
+		return check_time;
+	}
+	public void setCheck_time(Long check_time) {
+		this.check_time = check_time;
+	}
+	public String getResult() {
+		return result;
+	}
+	public void setResult(String result) {
+		this.result = result;
+	}
+	
+	
+}	

+ 106 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/BusinessDeclare.java

@@ -0,0 +1,106 @@
+package com.fuzamei.entity;
+
+public class BusinessDeclare {
+	private Integer business_id;					//业务申报的id号
+	private String bank_id;							//实际是银行名字吧
+	private String business_name;					//业务名称
+	private String business_approval_name;			//业务核准表名字
+	private String business_approval_url;			//业务核准表url
+	private String responsible_investigation_name; 	//尽职调查报告名
+	private String responsible_investigation_url; 	//尽职调查报告url
+	private String product_approval_name;			//产品核准表名字
+	private String product_approval_url;			//产品核准表url
+	private String basic_data_name;					//基础性资料名
+	private String basic_data_url;					//基础性资料url
+	private Long declare_time;						//申报时间
+	private String status_name;						//状态名称
+	private String hash;							//hash值
+	
+	public String getBasic_data_name() {
+		return basic_data_name;
+	}
+	public void setBasic_data_name(String basic_data_name) {
+		this.basic_data_name = basic_data_name;
+	}
+	public String getBasic_data_url() {
+		return basic_data_url;
+	}
+	public void setBasic_data_url(String basic_data_url) {
+		this.basic_data_url = basic_data_url;
+	}
+	public Integer getBusiness_id() {
+		return business_id;
+	}
+	public void setBusiness_id(Integer business_id) {
+		this.business_id = business_id;
+	}
+	public String getBank_id() {
+		return bank_id;
+	}
+	public void setBank_id(String bank_id) {
+		this.bank_id = bank_id;
+	}
+	public String getBusiness_name() {
+		return business_name;
+	}
+	public void setBusiness_name(String business_name) {
+		this.business_name = business_name;
+	}
+	public String getBusiness_approval_name() {
+		return business_approval_name;
+	}
+	public void setBusiness_approval_name(String business_approval_name) {
+		this.business_approval_name = business_approval_name;
+	}
+	public String getBusiness_approval_url() {
+		return business_approval_url;
+	}
+	public void setBusiness_approval_url(String business_approval_url) {
+		this.business_approval_url = business_approval_url;
+	}
+	public String getResponsible_investigation_name() {
+		return responsible_investigation_name;
+	}
+	public void setResponsible_investigation_name(String responsible_investigation_name) {
+		this.responsible_investigation_name = responsible_investigation_name;
+	}
+	public String getResponsible_investigation_url() {
+		return responsible_investigation_url;
+	}
+	public void setResponsible_investigation_url(String responsible_investigation_url) {
+		this.responsible_investigation_url = responsible_investigation_url;
+	}
+	public String getProduct_approval_name() {
+		return product_approval_name;
+	}
+	public void setProduct_approval_name(String product_approval_name) {
+		this.product_approval_name = product_approval_name;
+	}
+	public String getProduct_approval_url() {
+		return product_approval_url;
+	}
+	public void setProduct_approval_url(String product_approval_url) {
+		this.product_approval_url = product_approval_url;
+	}
+	public Long getDeclare_time() {
+		return declare_time;
+	}
+	public void setDeclare_time(Long declare_time) {
+		this.declare_time = declare_time;
+	}
+	public String getStatus_name() {
+		return status_name;
+	}
+	public void setStatus_name(String status_name) {
+		this.status_name = status_name;
+	}
+	public String getHash() {
+		return hash;
+	}
+	public void setHash(String hash) {
+		this.hash = hash;
+	}
+	
+	
+	
+}

+ 61 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/OperationHistory.java

@@ -0,0 +1,61 @@
+package com.fuzamei.entity;
+
+public class OperationHistory {
+	private Integer id;
+	private Integer operator_type_id;
+	private String operator_name;
+	private String operator_account;
+	private String operator_role;
+	private String operator_person;
+	private String operator_time;
+	private String hash;
+	public Integer getId() {
+		return id;
+	}
+	public void setId(Integer id) {
+		this.id = id;
+	}
+	public Integer getOperator_type_id() {
+		return operator_type_id;
+	}
+	public void setOperator_type_id(Integer operator_type_id) {
+		this.operator_type_id = operator_type_id;
+	}
+	public String getOperator_name() {
+		return operator_name;
+	}
+	public void setOperator_name(String operator_name) {
+		this.operator_name = operator_name;
+	}
+	public String getOperator_account() {
+		return operator_account;
+	}
+	public void setOperator_account(String operator_account) {
+		this.operator_account = operator_account;
+	}
+	public String getOperator_role() {
+		return operator_role;
+	}
+	public void setOperator_role(String operator_role) {
+		this.operator_role = operator_role;
+	}
+	public String getOperator_person() {
+		return operator_person;
+	}
+	public void setOperator_person(String operator_person) {
+		this.operator_person = operator_person;
+	}
+	public String getOperator_time() {
+		return operator_time;
+	}
+	public void setOperator_time(String operator_time) {
+		this.operator_time = operator_time;
+	}
+	public String getHash() {
+		return hash;
+	}
+	public void setHash(String hash) {
+		this.hash = hash;
+	}
+	
+}

+ 92 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/ProjectFile.java

@@ -0,0 +1,92 @@
+package com.fuzamei.entity;
+
+/**
+ * 查询项目文档的实体类
+ * 
+ * @author ylx
+ *
+ */
+public class ProjectFile {
+	private Integer project_id;
+	private String project_name;
+	private Integer project_file_id;
+	private String attachment_name;
+	private String url;
+	private Integer upload_person_id;
+	private String create_time;
+	private String update_time;
+	private String hash;
+
+	public Integer getProject_id() {
+		return project_id;
+	}
+
+	public void setProject_id(Integer project_id) {
+		this.project_id = project_id;
+	}
+
+	public String getProject_name() {
+		return project_name;
+	}
+
+	public void setProject_name(String project_name) {
+		this.project_name = project_name;
+	}
+
+	public Integer getProject_file_id() {
+		return project_file_id;
+	}
+
+	public void setProject_file_id(Integer project_file_id) {
+		this.project_file_id = project_file_id;
+	}
+
+	public String getAttachment_name() {
+		return attachment_name;
+	}
+
+	public void setAttachment_name(String attachment_name) {
+		this.attachment_name = attachment_name;
+	}
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	public Integer getUpload_person_id() {
+		return upload_person_id;
+	}
+
+	public void setUpload_person_id(Integer upload_person_id) {
+		this.upload_person_id = upload_person_id;
+	}
+
+	public String getCreate_time() {
+		return create_time;
+	}
+
+	public void setCreate_time(String create_time) {
+		this.create_time = create_time;
+	}
+
+	public String getUpdate_time() {
+		return update_time;
+	}
+
+	public void setUpdate_time(String update_time) {
+		this.update_time = update_time;
+	}
+
+	public String getHash() {
+		return hash;
+	}
+
+	public void setHash(String hash) {
+		this.hash = hash;
+	}
+
+}

+ 105 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/ValuationAccount.java

@@ -0,0 +1,105 @@
+package com.fuzamei.entity;
+
+public class ValuationAccount {
+	
+	private Integer fund_id;					//基金id号,但是这里和项目文档的id号好像是一样的。。。。。????
+	private String fund_name;					//基金名称
+	private String assets_under_custody;		//托管资产
+	private Integer custodian_valuation_id;		//管理人估值报表id号,关联附件表的附件名
+	private Integer bank_valuation_id;			//银行股指报表id号,关联附件表的附件名
+	private Long update_time;					//文件更新时间。。。。。暂时理解为文件创建时间????
+	private String battle_result;				//比对结果
+	
+	
+	private String attachment_name_of_custodian;				//附件名称--------->>管理人估值报表名称
+	private String attachment_name_of_bank;				//附件名称----------->>银行估值报表名称
+	
+	private String url_of_custodian;							//下载和上传通用的url地址----------->>管理人估值报表下载和上传链接
+	private String url_of_bank;							//下载和上传通用的url地址----------->>银行估值报表下载和上传链接
+	
+	
+	private Integer upload_person_id;			//上传人用户的id号
+	private String create_time;					//附件的创建时间,暂时理解为和文件更新时间????
+	public Integer getFund_id() {
+		return fund_id;
+	}
+	public void setFund_id(Integer fund_id) {
+		this.fund_id = fund_id;
+	}
+	public String getFund_name() {
+		return fund_name;
+	}
+	public void setFund_name(String fund_name) {
+		this.fund_name = fund_name;
+	}
+	public String getAssets_under_custody() {
+		return assets_under_custody;
+	}
+	public void setAssets_under_custody(String assets_under_custody) {
+		this.assets_under_custody = assets_under_custody;
+	}
+	public Integer getCustodian_valuation_id() {
+		return custodian_valuation_id;
+	}
+	public void setCustodian_valuation_id(Integer custodian_valuation_id) {
+		this.custodian_valuation_id = custodian_valuation_id;
+	}
+	public Integer getBank_valuation_id() {
+		return bank_valuation_id;
+	}
+	public void setBank_valuation_id(Integer bank_valuation_id) {
+		this.bank_valuation_id = bank_valuation_id;
+	}
+	public Long getUpdate_time() {
+		return update_time;
+	}
+	public void setUpdate_time(Long update_time) {
+		this.update_time = update_time;
+	}
+	public String getBattle_result() {
+		return battle_result;
+	}
+	public void setBattle_result(String battle_result) {
+		this.battle_result = battle_result;
+	}
+	
+	
+	public String getAttachment_name_of_custodian() {
+		return attachment_name_of_custodian;
+	}
+	public void setAttachment_name_of_custodian(String attachment_name_of_custodian) {
+		this.attachment_name_of_custodian = attachment_name_of_custodian;
+	}
+	public String getAttachment_name_of_bank() {
+		return attachment_name_of_bank;
+	}
+	public void setAttachment_name_of_bank(String attachment_name_of_bank) {
+		this.attachment_name_of_bank = attachment_name_of_bank;
+	}
+	public String getUrl_of_custodian() {
+		return url_of_custodian;
+	}
+	public void setUrl_of_custodian(String url_of_custodian) {
+		this.url_of_custodian = url_of_custodian;
+	}
+	public String getUrl_of_bank() {
+		return url_of_bank;
+	}
+	public void setUrl_of_bank(String url_of_bank) {
+		this.url_of_bank = url_of_bank;
+	}
+	public Integer getUpload_person_id() {
+		return upload_person_id;
+	}
+	public void setUpload_person_id(Integer upload_person_id) {
+		this.upload_person_id = upload_person_id;
+	}
+	public String getCreate_time() {
+		return create_time;
+	}
+	public void setCreate_time(String create_time) {
+		this.create_time = create_time;
+	}
+	
+	
+}

+ 284 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/BusinessDeclareMapper.xml

@@ -0,0 +1,284 @@
+<?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,namespace的值习惯上设置成包名+sql映射文件名,这样就能够保证namespace的值是唯一的,例如namespace="me.gacl.mapping.userMapper"就是me.gacl.mapping(包名)+userMapper(userMapper.xml文件去除后缀)
+-->               
+<mapper namespace="com.fuzamei.mapperInterface.BusinessDeclareMapper"> 
+	
+	<!-- 支行业务申请,将新的数据插入到数据库中的业务申请表中 -->
+	<insert id="insertBusinessDeclareInformationToDaoByBranchBank">
+		insert into 
+			business_declare(business_id,
+							 bank_id,
+							 business_name,
+							 business_approval_id,
+							 responsible_investigation_id,
+							 product_approval_id,
+							 basic_data_id,
+							 declare_time,
+							 status_id,
+							 hash)
+		values(#{businessId},
+			   #{bank},
+			   #{businessName},
+			   #{busineeApprovalId},
+			   #{responsibleInvestigationId},
+			   #{productApprovalId},
+			   #{basicDataId},
+			   #{declareTime},
+			   #{statusId},
+			   #{hash})
+	</insert>
+	<!-- 将附件信息插入附件表中 -->
+	<insert id="insertAttachmentInformationToDaoByBranchBank">
+		insert into 
+			attachment(attachment_id,
+					   attachment_name,
+					   url,
+					   upload_person_id,
+					   create_time)
+		values(#{attachmentId},
+			   #{attachmentName},
+			   #{url},
+			   #{userId},
+			   #{createTime})
+	</insert>
+	
+	<!-- 当经办支行进行业务申报的时候往操作记录表中插入一条数据 -->
+	<insert id="insertOperationHistoryInformationToDaoByBranchBank">
+		insert into 
+			operation_history(operator_type_id,
+							  operator_account,
+							  operator_role,
+							  operator_person,
+							  operator_time,
+							  hash)
+		values(#{operatorTypeId},
+			   #{operatorAccount},
+			   #{operatorRole},
+			   #{operatorPerson},
+			   #{operatorTime},
+			   #{hash})
+	</insert>
+	
+	<!-- 返回总页数 -->
+	<select id="findAddInfromations" resultType="int">
+		select count(*) from business_declare
+	</select>
+	
+	<!-- 根据条件或不根据条件查询业务申请信息,并返回给前端,需要进行6表关联查询,1张业务申请表,4张附件表,1张状态表 -->
+	<select id="queryBusinessDeclareInformation" resultType="com.fuzamei.entity.BusinessDeclare">
+		select 
+			bd.business_id,
+			bd.bank_id,
+			bd.business_name,
+			bd.business_approval_name,
+			bd.business_approval_url,
+			bd.responsible_investigation_name,
+			bd.responsible_investigation_url,
+			bd.product_approval_name,
+			bd.product_approval_url,
+			bd.basic_data_name,
+			bd.basic_data_url,
+			bd.declare_time,
+			s.status_name as status_name,
+			bd.hash
+		from 
+			(select
+				bd.business_id,
+				bd.bank_id,
+				bd.business_name,
+				bd.business_approval_name,
+				bd.business_approval_url,
+				bd.responsible_investigation_name,
+				bd.responsible_investigation_url,
+				bd.product_approval_name,
+				bd.product_approval_url,
+				att.attachment_name as basic_data_name,
+				att.url as basic_data_url,
+				bd.declare_time,
+				bd.status_id,
+				bd.hash
+			from 
+				(select
+				bd.business_id,
+				bd.bank_id,
+				bd.business_name,
+				bd.business_approval_name,
+				bd.business_approval_url,
+				bd.responsible_investigation_name,
+				bd.responsible_investigation_url,
+				att.attachment_name as product_approval_name,
+				att.url as product_approval_url,
+				bd.basic_data_id,
+				bd.declare_time,
+				bd.status_id,
+				bd.hash
+			from 	
+				(select 
+					bd.business_id,
+					bd.bank_id,
+					bd.business_name,
+					bd.business_approval_name,
+					bd.business_approval_url,
+					att.attachment_name as responsible_investigation_name,
+					att.url as responsible_investigation_url,
+					bd.product_approval_id,
+					bd.basic_data_id,
+					bd.declare_time,
+					bd.status_id,
+					bd.hash
+				from 
+					(select 
+						bd.business_id,
+						bd.bank_id,
+						bd.business_name,
+						att.attachment_name as business_approval_name,
+						att.url as business_approval_url,
+						bd.responsible_investigation_id,
+						bd.product_approval_id,
+						bd.basic_data_id,
+						bd.declare_time,
+						bd.status_id,
+						bd.hash
+					from 
+						business_declare bd 
+					left join 
+						attachment att 
+					on 
+						bd.business_approval_id=att.attachment_id) bd
+				left join 
+					attachment att 
+				on 
+					bd.responsible_investigation_id=att.attachment_id) bd
+			left join 
+				attachment att
+			on 
+				bd.product_approval_id=att.attachment_id) bd
+			left join 
+				attachment att
+			on 
+				bd.basic_data_id=att.attachment_id) bd
+		left join 
+			status s
+		on 
+			bd.status_id=s.status_id
+		<where>
+			<if test="businessName!='' and businessName!=null">
+				bd.business_name=#{businessName} 
+			</if>
+			<if test="startTime!=null and endTime!=null">
+				and bd.declare_time between #{startTime} and #{endTime}
+			</if>
+		</where>
+		order by 
+			bd.declare_time desc 
+		limit 
+			#{startPage},#{rowNum}
+	</select>
+	
+	<!-- 查看审核记录的sql语句 -->
+	<select id="queryBusinessCheckInformation" resultType="com.fuzamei.entity.BusinessCheck">
+		select 
+			bc.check_department,
+			bc.check_person,
+			bc.check_business_id,
+			bc.check_opinion,
+			bc.check_time,
+			s.status_name as result
+		from 
+			business_check bc
+		left join 
+			status s
+		on 
+			bc.check_result=s.status_id
+		where 
+			bc.check_business_id=#{businessId}
+	</select>
+	
+	<!-- 将审核意见插入业务审核表中去 -->
+	<insert id="businessDeclareCheckedBy">
+		insert into 
+			business_check(check_department,
+						   check_person,
+						   check_business_id,
+						   check_opinion,
+						   check_time,
+						   check_result)
+		values(#{organizationName},
+			   #{checkPerson},
+			   #{businessId},
+			   #{checkOpinion},
+			   #{checkTime},
+			   #{checkResult})
+	</insert>
+	
+	<!-- 将审核结果意见在插入审核表的同时,也将审核结果更新到业务申报表中去,根据业务id(business_id)定位到指定的业务 -->
+	<update id="updateBusinessDeclareStatus">
+		update 
+			business_declare
+		set
+			status_id=#{statusId}
+		where 
+			business_id=#{businessId}
+	</update>
+	
+	
+	<!-- 省分行业务部门第一次上传合同文件到合同提交记录表中去 -->
+	<insert id="insertContractInformationToContractRecord">
+		insert into 
+			contract_record(business_id,
+							contract_id,
+							contract_name,
+							version,
+							contract_party,
+							upload_department,
+							upload_person,
+							modify_opinion,
+							confirm_department,
+							commit_time,
+							hash)
+		values(#{businessId},
+			   #{contractId},
+			   #{contractName},
+			   #{version},
+			   #{contractParty},
+			   #{uploadDepartment},
+			   #{uploadPerson},
+			   #{modifyOpinion},
+			   #{comfirmDepartment},
+			   #{commitTime},
+			   #{hash})
+	</insert>
+	
+	<!-- 省分行业务部门第一次上传合同文件到合同状态跟踪表中去 -->
+	<insert id="insertContractInformationToContractStatusTracking">
+		insert into 
+			contract_status_tracking(business_id,
+									 contract_name,
+									 contract_party,
+									 update_time,
+									 status_id)
+		values(#{businessId},
+			   #{contractName},
+			   #{contractParty},
+			   #{updateTime},
+			   #{statusId})
+	</insert>
+	
+	<!-- 将上传的合同文件信息插入到附件表中 -->
+	<insert id="insertContractInformationToAttachment">
+		insert into 
+			attachment(attachment_id,
+					   attachment_name,
+					   url,
+					   upload_person_id,
+					   create_time)
+		values(#{attachmentId},
+			   #{attachmentName},
+			   #{url},
+			   #{userId},
+			   #{createTime})
+	</insert>
+	
+	
+</mapper>

+ 46 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/OperationHistoryMapper.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,namespace的值习惯上设置成包名+sql映射文件名,这样就能够保证namespace的值是唯一的,例如namespace="me.gacl.mapping.userMapper"就是me.gacl.mapping(包名)+userMapper(userMapper.xml文件去除后缀)
+-->               
+<mapper namespace="com.fuzamei.mapperInterface.OperationHistoryMapper"> 
+	<!-- 根据操作记录给的条件查询分页数据 -->
+	<select id="queryOperationHistoryInformation" resultType="com.fuzamei.entity.OperationHistory">
+		select 
+			oh.id,
+			oh.operator_type_id,
+			ot.operator_name,
+			oh.operator_account,
+			oh.operator_role,
+			oh.operator_person,
+			oh.operator_time,
+			oh.hash
+		from 
+			operation_history oh 
+		left join 
+			operation_type ot 
+		on 
+			oh.operator_type_id=ot.operator_type_id 
+		<where>
+			<if test="account!='' and account!=null">
+				oh.operator_account=#{account} 
+			</if>
+			<if test="role!='' and role!=null">
+				and oh.operator_role=#{role} 
+			</if>
+			<if test="type!='' and type!=null">
+				and ot.operator_name=#{type}
+			</if>
+			<if test="startTime!=null and endTime!=null">
+				and oh.operator_time between #{startTime} and #{endTime}
+			</if>
+		</where>
+		order by oh.id asc  
+		limit #{startPage},#{rowNum}
+	</select>
+	
+	<!-- 返回总页数 -->
+	<select id="findAllInformation" resultType="int">
+		select count(*) from operation_history
+	</select>
+	
+</mapper>

+ 105 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/ProjectFileMapper.xml

@@ -0,0 +1,105 @@
+<?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,namespace的值习惯上设置成包名+sql映射文件名,这样就能够保证namespace的值是唯一的,例如namespace="me.gacl.mapping.userMapper"就是me.gacl.mapping(包名)+userMapper(userMapper.xml文件去除后缀)
+-->               
+<mapper namespace="com.fuzamei.mapperInterface.ProjectFileMapper"> 
+	<!-- 根据操作记录给的条件查询分页数据 -->
+	<select id="queryProjectFileInformation" resultType="com.fuzamei.entity.ProjectFile">
+		select 
+			pf.project_id,
+			pf.project_name,
+			att.attachment_name,
+			pf.update_time,
+			pf.hash,
+			att.url
+		from 
+			project_file pf 
+		left join 
+			attachment att 
+		on 
+			pf.project_file_id = att.attachment_id
+		<where>
+			<if test="projectName!='' and projectName!=null">
+				pf.project_name=#{projectName}
+			</if>
+			<if test="startTime!=null and endTime!=null">
+				and pf.update_time between #{startTime} and #{endTime}
+			</if>
+		</where>
+		order by 
+			pf.id asc 
+		limit 
+			#{startPage},#{rowNum}
+	</select>
+	
+	<!-- 分页用查询总记录条数 -->
+	<select id="findAllInformation" resultType="int">
+		select count(*) from project_file
+	</select>
+	
+	<select id="checkoutProjectFiles" resultType="com.fuzamei.entity.ProjectFile">
+		select 
+			pf.project_id,
+			pf.project_name,
+			att.attachment_name,
+			pf.hash,
+			att.url
+		from 
+			project_file pf 
+		left join 
+			attachment att 
+		on 
+			pf.project_file_id = att.attachment_id
+		where 
+			pf.project_id=#{projectId} 
+			and
+			pf.project_name=#{projectName}
+		order by 
+			pf.update_time asc
+	</select>
+	
+	<insert id="insertInformationIntoTable">
+		insert into 
+			project_file(project_id,
+						 project_name,
+						 project_file_id,
+						 update_time,hash) 
+			values(
+					#{projectId},
+					#{projectName},
+					#{attachmentId},
+					#{updateTime},
+					#{hash})
+	</insert>
+	
+	<!-- 将上传的文件信息插入到附件表中 -->
+	<insert id="insertInformationToAttachment">
+			insert into 
+				attachment(attachment_id,
+					   attachment_name,url,
+					   upload_person_id,
+					   create_time) 
+			values(#{attachmentId},
+				   #{attachmentName},
+				   #{url},
+				   #{userId},
+				   #{addTime})
+	</insert>
+	
+	<!-- 将上传项目文档的这个操作信息插入到操作记录表 -->
+	<insert id="insertOperationHistoryInformationToDao">
+		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>

+ 127 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/ValuationAccountingMapper.xml

@@ -0,0 +1,127 @@
+<?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,namespace的值习惯上设置成包名+sql映射文件名,这样就能够保证namespace的值是唯一的,例如namespace="me.gacl.mapping.userMapper"就是me.gacl.mapping(包名)+userMapper(userMapper.xml文件去除后缀)
+-->               
+<mapper namespace="com.fuzamei.mapperInterface.ValuationAccountingMapper"> 
+	
+	<!-- 分页查询所有数据量,用于分页使用 -->
+	<select id="findAllInformations" resultType="int">
+		select count(*) from valuation_accounting
+	</select>
+	
+	<!-- 根据条件查询估值核算的信息 -->
+	<select id="queryValuationAccountingInformation" resultType="com.fuzamei.entity.ValuationAccount">
+		select 
+			temp.fund_id,
+			temp.fund_name,
+			temp.assets_under_custody,
+			temp.attachment_name attachment_name_of_custodian,
+			att.attachment_name attachment_name_of_bank,
+			temp.url url_of_custodian,
+			att.url url_of_bank,
+			temp.update_time,
+			temp.battle_result
+		from
+			(select 
+				va.fund_id,
+				va.fund_name,
+				va.assets_under_custody,
+				att.attachment_name,
+				va.bank_valuation_id,
+				va.battle_result,
+				att.url,
+				va.update_time
+			 from 
+				valuation_accounting va
+			 left join 
+			 	attachment att
+			 on 
+			 va.custodian_valuation_id=att.attachment_id) temp 
+		left join 
+			attachment att
+		on 
+			temp.bank_valuation_id = att.attachment_id
+		<where>
+			<if test="fundName!='' and fundName!=null">
+				temp.fund_name=#{fundName}
+			</if>
+			<if test="battleResult!='' and battleResult!=null">
+				and temp.battle_result=#{battleResult}
+			</if>
+			<if test="startTime!=null and endTime!=null">
+				and temp.update_time between #{startTime} and #{endTime}
+			</if>
+		</where>
+		order by 
+			temp.update_time asc
+		limit 
+			#{startPage},#{rowNum}
+		
+	</select>
+	
+	<!-- 管理岗上传管理人估值报表的时候插入的数据,分别插入valuation_accounting和attachment表,但是注意这个时候银行估值报表暂时不进行插入 -->
+	<insert id="insertInformationIntoTableByAdmin">
+		insert into 
+			valuation_accounting(fund_id,
+								 fund_name,
+								 assets_under_custody,
+								 custodian_valuation_id,
+								 update_time,
+								 battle_result)
+		values(#{fundId},
+			   #{fundName},
+			   #{assets},
+			   #{attachmentId},
+			   #{updateTime},
+			   #{battleResult})
+	</insert>
+	
+	<!-- 将上文的文件信息插入到附件表中去 -->
+	<insert id="insertInformationToAttachment">
+		insert into 
+			attachment(attachment_id,
+					   attachment_name,
+					   url,
+					   upload_person_id,
+					   create_time)
+		values(#{attachmentId},
+			   #{attachmentName},
+			   #{url},
+			   #{userId},
+			   #{addTime})
+	</insert>
+	
+	<!-- 银行上传一份估值核算文件后更新之前管理员上传文件插入的那条信息 -->
+	<update id="updateInformationByBank">
+		update
+			valuation_accounting 
+		set 
+			bank_valuation_id=#{attachmentId},
+			update_time=#{updateTime},
+			battle_result=#{battleResult}
+		where 
+				fund_id=#{fundId} 
+			and
+				fund_name=#{fundName}
+			and
+				assets_under_custody=#{assets}
+	</update>
+	
+	<!-- 省分行上传估值核算文件,在操作记录中要插入这个数据 -->
+	<insert id="insertOperationHistoryInformationToDao">
+		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>

+ 33 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/BusinessDeclareMapper.java

@@ -0,0 +1,33 @@
+package com.fuzamei.mapperInterface;
+
+import java.util.List;
+import java.util.Map;
+
+import com.fuzamei.entity.BusinessCheck;
+import com.fuzamei.entity.BusinessDeclare;
+
+public interface BusinessDeclareMapper {
+
+	void insertBusinessDeclareInformationToDaoByBranchBank(Map<String, Object> map);
+
+	void insertAttachmentInformationToDaoByBranchBank(Map<String, Object> map);
+
+	int findAddInfromations();
+
+	List<BusinessDeclare> queryBusinessDeclareInformation(Map<String, Object> map);
+
+	List<BusinessCheck> queryBusinessCheckInformation(Map<String, Object> map);
+
+	void businessDeclareCheckedBy(Map<String, Object> map);
+
+	void updateBusinessDeclareStatus(Map<String, Object> map);
+
+	void insertContractInformationToContractRecord(Map<String, Object> map);
+
+	void insertContractInformationToContractStatusTracking(Map<String, Object> map);
+
+	void insertContractInformationToAttachment(Map<String, Object> map);
+
+	void insertOperationHistoryInformationToDaoByBranchBank(Map<String, Object> map);
+
+}

+ 13 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/OperationHistoryMapper.java

@@ -0,0 +1,13 @@
+package com.fuzamei.mapperInterface;
+
+import java.util.List;
+import java.util.Map;
+
+import com.fuzamei.entity.OperationHistory;
+
+public interface OperationHistoryMapper {
+
+	int findAllInformation();
+	
+	List<OperationHistory> queryOperationHistoryInformation(Map<String, Object> map);
+}

+ 22 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/ProjectFileMapper.java

@@ -0,0 +1,22 @@
+package com.fuzamei.mapperInterface;
+
+import java.util.List;
+import java.util.Map;
+
+import com.fuzamei.entity.ProjectFile;
+
+public interface ProjectFileMapper {
+
+	int findAllInformation();
+
+	List<ProjectFile> queryProjectFileInformation(Map<String, Object> mapToDao);
+
+	List<ProjectFile> checkoutProjectFiles(Map<String, Object> mapToDao);
+
+	void insertInformationIntoTable(Map<String, Object> mapToDao);
+
+	void insertOperationHistoryInformationToDao(Map<String, Object> map);
+
+	void insertInformationToAttachment(Map<String, Object> map);
+
+}

+ 22 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapperInterface/ValuationAccountingMapper.java

@@ -0,0 +1,22 @@
+package com.fuzamei.mapperInterface;
+
+import java.util.List;
+import java.util.Map;
+
+import com.fuzamei.entity.ValuationAccount;
+
+public interface ValuationAccountingMapper {
+
+	int findAllInformations();
+
+	List<ValuationAccount> queryValuationAccountingInformation(Map<String, Object> map);
+
+	void insertInformationIntoTableByAdmin(Map<String, Object> map);
+
+	void updateInformationByBank(Map<String, Object> map);
+
+	void insertOperationHistoryInformationToDao(Map<String, Object> map);
+
+	void insertInformationToAttachment(Map<String, Object> map);
+
+}

+ 636 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/BusinessDeclareService.java

@@ -0,0 +1,636 @@
+package com.fuzamei.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.fuzamei.dao.BusinessDeclareDao;
+import com.fuzamei.entity.BusinessCheck;
+import com.fuzamei.entity.BusinessDeclare;
+import com.fuzamei.utils.PageDTO;
+
+@Service
+public class BusinessDeclareService {
+
+	@Autowired
+	private BusinessDeclareDao businessDeclareDao;
+	
+	private static final int ROW_NUM = 10; // 分页每页显示数据的数量
+	
+	/**
+	 * 
+	* @Title: insertInformationIntoTableByBranchBank
+	* @Description: TODO(对从controller层传进来的数据先进行校验,然后再通过dao层往数据库进行录入)
+	* @param @param map    设定文件
+	* @return void    返回类型
+	* @author ylx
+	* @date 2017年12月19日 下午1:43:33
+	* @throws
+	 */
+	@Transactional(rollbackFor=Exception.class)
+	public void insertInformationIntoTableByBranchBank(Map<String, Object> map) {
+		Integer businessId=null;						//业务申报的id号
+		String bank="";									//银行名称,但是表的字段是银行id?????。。。。。。。TODO
+		String businessName="";							//业务名称
+		Integer busineeApprovalId=null;					//业务核准表的id号
+		String busineeApprovalName="";					//业务员核准表的文件名
+		String urlOfBusineeApproval="";					//业务核准表的url地址
+		Integer responsibleInvestigationId=null;		//尽职调查表id号
+		String responsibleInvestigationName="";			//尽职调查表的文件名
+		String urlOfResponsibleInvestigation="";		//尽职调查表的url地址
+		Integer productApprovalId=null;					//产品核准表的id号
+		String productApprovalName="";					//产品核准表的文件名
+		String urlOfProductApproval="";					//产品核准表的url地址
+		Integer basicDataId=null;						//基础性资料的id号
+		String basicDataName="";						//基础性资料的文件名
+		String urlOfBasicData="";						//基础性资料的url地址
+		if (map.get("businessId") != null) { // 等于空就直接取空值
+			try {
+				businessId = (Integer) map.get("businessId");
+			} catch (Exception e) {
+				throw new RuntimeException("businessId类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("业务申报的id号为空");
+		}
+		if (!"".equals(map.get("bank")) && map.get("bank") != null) { // 等于空就直接取空值
+			try {
+				bank = (String) map.get("bank");
+			} catch (Exception e) {
+				throw new RuntimeException("bank类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("银行名称为空");
+		}
+		if (!"".equals(map.get("businessName")) && map.get("businessName") != null) { // 等于空就直接取空值
+			try {
+				businessName = (String) map.get("businessName");
+			} catch (Exception e) {
+				throw new RuntimeException("businessName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("业务名称为空");
+		}
+		if (map.get("busineeApprovalId") != null) { // 等于空就直接取空值
+			try {
+				busineeApprovalId = (Integer) map.get("busineeApprovalId");
+			} catch (Exception e) {
+				throw new RuntimeException("busineeApprovalId类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("业务核准表的id号为空");
+		}
+		if (!"".equals(map.get("busineeApprovalName")) && map.get("busineeApprovalName") != null) { // 等于空就直接取空值
+			try {
+				busineeApprovalName = (String) map.get("busineeApprovalName");
+			} catch (Exception e) {
+				throw new RuntimeException("busineeApprovalName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("业务员核准表的文件名为空");
+		}
+		if (!"".equals(map.get("urlOfBusineeApproval")) && map.get("urlOfBusineeApproval") != null) { // 等于空就直接取空值
+			try {
+				urlOfBusineeApproval = (String) map.get("urlOfBusineeApproval");
+			} catch (Exception e) {
+				throw new RuntimeException("urlOfBusineeApproval类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("业务核准表的url地址");
+		}
+		if (map.get("responsibleInvestigationId") != null) { // 等于空就直接取空值
+			try {
+				responsibleInvestigationId = (Integer) map.get("responsibleInvestigationId");
+			} catch (Exception e) {
+				throw new RuntimeException("responsibleInvestigationId类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("尽职调查表id号为空");
+		}
+		if (!"".equals(map.get("responsibleInvestigationName")) && map.get("responsibleInvestigationName") != null) { // 等于空就直接取空值
+			try {
+				responsibleInvestigationName = (String) map.get("responsibleInvestigationName");
+			} catch (Exception e) {
+				throw new RuntimeException("responsibleInvestigationName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("尽职调查表的文件名为空");
+		}
+		if (!"".equals(map.get("urlOfResponsibleInvestigation")) && map.get("urlOfResponsibleInvestigation") != null) { // 等于空就直接取空值
+			try {
+				urlOfResponsibleInvestigation = (String) map.get("urlOfResponsibleInvestigation");
+			} catch (Exception e) {
+				throw new RuntimeException("urlOfResponsibleInvestigation类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("尽职调查表的url为空");
+		}
+		if (map.get("productApprovalId") != null) { // 等于空就直接取空值
+			try {
+				productApprovalId = (Integer) map.get("productApprovalId");
+			} catch (Exception e) {
+				throw new RuntimeException("productApprovalId类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("产品核准表的id号为空");
+		}
+		if (!"".equals(map.get("productApprovalName")) && map.get("productApprovalName") != null) { // 等于空就直接取空值
+			try {
+				productApprovalName = (String) map.get("productApprovalName");
+			} catch (Exception e) {
+				throw new RuntimeException("productApprovalName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("产品核准表的文件名为空");
+		}
+		if (!"".equals(map.get("urlOfProductApproval")) && map.get("urlOfProductApproval") != null) { // 等于空就直接取空值
+			try {
+				urlOfProductApproval = (String) map.get("urlOfProductApproval");
+			} catch (Exception e) {
+				throw new RuntimeException("urlOfProductApproval类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("产品核准表的url为空");
+		}
+		if (map.get("basicDataId") != null) { // 等于空就直接取空值
+			try {
+				basicDataId = (Integer) map.get("basicDataId");
+			} catch (Exception e) {
+				throw new RuntimeException("basicDataId类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("基础性资料的id号为空");
+		}
+		if (!"".equals(map.get("basicDataName")) && map.get("basicDataName") != null) { // 等于空就直接取空值
+			try {
+				basicDataName = (String) map.get("basicDataName");
+			} catch (Exception e) {
+				throw new RuntimeException("basicDataName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("基础性资料的文件名为空");
+		}
+		if (!"".equals(map.get("urlOfBasicData")) && map.get("urlOfBasicData") != null) { // 等于空就直接取空值
+			try {
+				urlOfBasicData = (String) map.get("urlOfBasicData");
+			} catch (Exception e) {
+				throw new RuntimeException("urlOfBasicData类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("基础性资料的url为空");
+		}
+		
+		Map<String, Object> mapToDaoForBusinessDeclare = new LinkedHashMap<String,Object>();		//这个map是将数据插入业务申报表中的
+		mapToDaoForBusinessDeclare.put("businessId", businessId);									//业务申报id
+		mapToDaoForBusinessDeclare.put("bank", bank);												//申报支行名称
+		mapToDaoForBusinessDeclare.put("businessName", businessName);								//业务名称
+		mapToDaoForBusinessDeclare.put("busineeApprovalId", busineeApprovalId);						//业务核准表id号
+		mapToDaoForBusinessDeclare.put("responsibleInvestigationId", responsibleInvestigationId);	//尽职调查报告id号
+		mapToDaoForBusinessDeclare.put("productApprovalId", productApprovalId);						//产品核准表id号
+		mapToDaoForBusinessDeclare.put("basicDataId", basicDataId);									//基础性资料id号
+		mapToDaoForBusinessDeclare.put("declareTime", System.currentTimeMillis());					//申报时间以系统当前时间为准
+		mapToDaoForBusinessDeclare.put("statusId",1);												//刚刚申请的时候状态应该是【待二级分行审核】,这里以1表示,到时候可能还会进行修。。TODO
+		mapToDaoForBusinessDeclare.put("hash", "to be calaulated from file on server");				//hash值先写死,到时候要从文件中获取并计算出来
+		businessDeclareDao.insertBusinessDeclareInformationToDaoByBranchBank(mapToDaoForBusinessDeclare);	//将业务申请的数据插入数据库
+		
+		Map<String, Object> mapToDaoForAttachmentOfBusineeApproval = new LinkedHashMap<String,Object>();		//这个map是将数据插入业务核准表中的
+		mapToDaoForAttachmentOfBusineeApproval.put("attachmentId", responsibleInvestigationId);				//业务核准表id号就是附件的id号
+		mapToDaoForAttachmentOfBusineeApproval.put("attachmentName", responsibleInvestigationName);			//业务核准表文件名就当是附件名
+		mapToDaoForAttachmentOfBusineeApproval.put("url", urlOfResponsibleInvestigation);					//业务核准表的url地址就是附件url地址
+		mapToDaoForAttachmentOfBusineeApproval.put("userId", 300000001);							//上传人的id号先写死,到时候还需要根据请求查询上传人的id号。。。。。。TODO
+		mapToDaoForAttachmentOfBusineeApproval.put("createTime", mapToDaoForBusinessDeclare.get("declareTime"));	//创建时间以插入业务申请表的时间为准
+		businessDeclareDao.insertAttachmentInformationToDaoByBranchBank(mapToDaoForAttachmentOfBusineeApproval);	//将附件---【业务核准表】---申请的数据插入数据库
+		
+		Map<String, Object> mapToDaoForAttachmentOfResponsibleInvestigation = new LinkedHashMap<String,Object>();		//这个map是将数据插入尽职调查表中的
+		mapToDaoForAttachmentOfResponsibleInvestigation.put("attachmentId", busineeApprovalId);				//尽职调查表id号就是附件的id号
+		mapToDaoForAttachmentOfResponsibleInvestigation.put("attachmentName", busineeApprovalName);			//尽职调查表文件名就当是附件名
+		mapToDaoForAttachmentOfResponsibleInvestigation.put("url", urlOfBusineeApproval);					//尽职调查表的url地址就是附件url地址
+		mapToDaoForAttachmentOfResponsibleInvestigation.put("userId", 300000001);							//上传人的id号先写死,到时候还需要根据请求查询上传人的id号。。。。。。TODO
+		mapToDaoForAttachmentOfResponsibleInvestigation.put("createTime", mapToDaoForBusinessDeclare.get("declareTime"));	//创建时间以插入尽职调查表的时间为准
+		businessDeclareDao.insertAttachmentInformationToDaoByBranchBank(mapToDaoForAttachmentOfResponsibleInvestigation);	//将附件---【尽职调查表】---申请的数据插入数据库
+		
+		Map<String, Object> mapToDaoForAttachmentOfProductApproval = new LinkedHashMap<String,Object>();		//这个map是将数据插入产品核准表中的
+		mapToDaoForAttachmentOfProductApproval.put("attachmentId", productApprovalId);				//产品核准表id号就是附件的id号
+		mapToDaoForAttachmentOfProductApproval.put("attachmentName", productApprovalName);			//产品核准表文件名就当是附件名
+		mapToDaoForAttachmentOfProductApproval.put("url", urlOfProductApproval);					//产品核准表的url地址就是附件url地址
+		mapToDaoForAttachmentOfProductApproval.put("userId", 300000001);							//上传人的id号先写死,到时候还需要根据请求查询上传人的id号。。。。。。TODO
+		mapToDaoForAttachmentOfProductApproval.put("createTime", mapToDaoForBusinessDeclare.get("declareTime"));	//创建时间以插入产品核准表的时间为准
+		businessDeclareDao.insertAttachmentInformationToDaoByBranchBank(mapToDaoForAttachmentOfProductApproval);	//将附件---【产品核准表】---申请的数据插入数据库
+		
+		Map<String, Object> mapToDaoForAttachmentOfBasicData = new LinkedHashMap<String,Object>();		//这个map是将数据插入基础性资料中的
+		mapToDaoForAttachmentOfBasicData.put("attachmentId", basicDataId);				//基础性资料id号就是附件的id号
+		mapToDaoForAttachmentOfBasicData.put("attachmentName", basicDataName);			//基础性资料文件名就当是附件名
+		mapToDaoForAttachmentOfBasicData.put("url", urlOfBasicData);					//基础性资料的url地址就是附件url地址
+		mapToDaoForAttachmentOfBasicData.put("userId", 300000001);							//上传人的id号先写死,到时候还需要根据请求查询上传人的id号。。。。。。TODO
+		mapToDaoForAttachmentOfBasicData.put("createTime", mapToDaoForBusinessDeclare.get("declareTime"));	//创建时间以插入基础性资料的时间为准
+		businessDeclareDao.insertAttachmentInformationToDaoByBranchBank(mapToDaoForAttachmentOfBasicData);	//将附件---【基础性资料】---申请的数据插入数据库
+		
+		
+		//此外,还要将业务申报的这个操作信息插入到操作记录表中【】
+		Map<String, Object> mapToOperationHistory = new LinkedHashMap<String,Object>();
+		mapToOperationHistory.put("operatorTypeId", 1001);								//刚刚创立业务申报,操作类型为业务申报
+		mapToOperationHistory.put("operatorAccount", 300000001);						//操作账号先定死
+		mapToOperationHistory.put("operatorRole", "经办支行");							//创建这个操作的角色只能是经办支行
+		mapToOperationHistory.put("operatorPerson", "张三");								//操作人先写死
+		mapToOperationHistory.put("operatorTime", mapToDaoForBusinessDeclare.get("declareTime"));//操作时间为当前操作时间
+		mapToOperationHistory.put("hash", "to be calculated from operation");			//如何计算操作的hash值????
+		businessDeclareDao.insertOperationHistoryInformationToDaoByBranchBank(mapToOperationHistory);//将操作记录信息插入到操作记录表中
+		
+	}
+
+	
+	/**
+	 * 
+	* @Title: queryBusinessDeclareInformation
+	* @Description: TODO(从客户端传过来的数据,进行校验,再将数据传递给Dao层进行查询)
+	* @param @param map
+	* @param @return    设定文件
+	* @return PageDTO    返回类型
+	* @author ylx
+	* @date 2017年12月19日 下午4:05:22
+	* @throws
+	 */
+	public PageDTO queryBusinessDeclareInformation(Map<String, Object> map) {
+		int page = 1; 					// 默认页是第一页
+		String businessName = ""; 		// 业务名称默认空值
+		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("businessName")) && map.get("businessName") != null) { // 等于空就直接取空值
+			businessName = (String) map.get("businessName");
+		}
+		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("businessName", businessName);
+		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条,可根据需求修改分页数量
+		List<BusinessDeclare> informationList=businessDeclareDao.queryBusinessDeclareInformation(mapToDao);
+		int count=businessDeclareDao.findAddInfromations();
+		pageDTO.setRows(informationList);
+		pageDTO.setTotal(count);
+		return pageDTO;
+	}
+
+
+	/**
+	 * 
+	* @Title: queryBusinessCheckInformation
+	* @Description: TODO(根据controller层传过来的业务id号去数据库的业务审核总表中进行数据查询)
+	* @param @param map
+	* @param @return    设定文件
+	* @return PageDTO    返回类型
+	* @author ylx
+	* @date 2017年12月19日 下午7:51:16
+	* @throws
+	 */
+	public List<BusinessCheck> queryBusinessCheckInformation(Map<String, Object> map) {
+		Integer check_business_id=null;		//被审核的业务id号需要先被进行校验
+		if (map.get("businessId") != null) { // 等于空就直接取第一页
+			try {
+				check_business_id = (Integer) map.get("businessId");
+			} catch (Exception e) {
+				check_business_id=null;		//如果解析出错或者类型转换异常,还是以null去数据库查询
+			}
+		}
+		
+		Map<String, Object> mapToDao =new LinkedHashMap<String, Object>();
+		mapToDao.put("businessId", check_business_id);
+		List<BusinessCheck> businessCheckList = businessDeclareDao.queryBusinessCheckInformation(mapToDao);
+		
+		return businessCheckList;
+	}
+
+	/**
+	 * 
+	* @Title: businessDeclareCheckedBy
+	* @Description: TODO(将controller传过来的审核信息传入service层进行校验,然后将审核意见插入到数据库,同时将业务审核表中的审核结果的状态也顺便被更新一份)
+	* 					此外,还要在操作记录表中插入一条数据
+	* @param @param map    设定文件
+	* 数据包含organizationName:二级分行或省分行
+	* 		 checkPerson:审核人员
+	* 		 checkResult:结果放入check_result字段
+	* 		 checkOpinion:审核意见
+	* 		 businessId:
+	* @return void    返回类型
+	* @author ylx
+	* @date 2017年12月19日 下午8:58:55
+	* @throws
+	 */
+	@Transactional(rollbackFor=Exception.class)
+	public void businessDeclareCheckedBy(Map<String, Object> map) {
+		String organizationName="";		//审核部门
+		String checkPerson="";			//审核人
+		Integer checkResult=null;			//审核结果
+		String checkOpinion="";			//审核意见
+		Integer businessId=null;			//业务申报的id号,要根据这个更新业务审核的状态的
+		Integer statusId=null;			//业务申报表中状态id号,这个要根据checkResult审核结果来决定
+		
+		Integer operatorTypeId=null;		//操作类型id号------>放到操作记录表中去的
+		
+		if (!"".equals(map.get("organizationName")) && map.get("organizationName") != null) { // 等于空就直接取空值
+			try {
+				organizationName = (String) map.get("organizationName");
+			} catch (Exception e) {
+				throw new RuntimeException("organizationName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("审核部门不能为空");
+		}
+		if (!"".equals(map.get("checkPerson")) && map.get("checkPerson") != null) { // 等于空就直接取空值
+			try {
+				checkPerson = (String) map.get("checkPerson");
+			} catch (Exception e) {
+				throw new RuntimeException("checkPerson类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("审人不能为空");
+		}
+		if (!"".equals(map.get("checkResult")) && map.get("checkResult") != null) { // 等于空就直接取空值
+			String result=null;
+			try {
+				result = (String) map.get("checkResult");                       	//定义一个局部变量result(保存审核结果,以String类型接收),来看是否会出现类型转换异常
+			} catch (Exception e) {
+				throw new RuntimeException("checkResult类型转换异常");
+			}			
+			if("agree".equals(result)){
+				checkResult=5;														//5表示审核结果为同意(根据status表决定数字)
+				if("二级分行".equals(organizationName)){
+					statusId=3;														//3表示二级分行审核通过 转为【待省分行业务部门审核】(根据status表决定数字)
+					operatorTypeId=1002;											//1002在操作类型中表示【业务初审通过】
+				}else if("省分行业务部门".equals(organizationName)){
+					statusId=5;														//5表示省分行审核通过 转为【通过】(根据status表决定数字)
+					operatorTypeId=1013;											//1013在操作类型中表示【业务复审通过】
+				}else{
+					throw new RuntimeException("审核部门参数非法");
+				}
+			}else if("disagree".equals(result)){
+				checkResult=6;														//6表示审核结果为不同意(根据status表决定数字)
+				if("二级分行".equals(organizationName)){
+					statusId=2;														//2表示二级分行审核不通过(根据status表决定数字)
+					operatorTypeId=1012;											//1012在操作类型中表示【业务初审拒绝】
+				}else if("省分行业务部门".equals(organizationName)){
+					statusId=4;														//4表示省分行审核不通过(根据status表决定数字)
+					operatorTypeId=1003;											//1003在操作类型中表示【业务复审拒绝】
+				}else{
+					throw new RuntimeException("审核部门参数非法");
+				}														
+			}else{																
+				throw new RuntimeException("审核结果参数非法");						//传过来的参数如果不符合要求直接报错给前台
+			}
+		}else{
+			throw new RuntimeException("审核人不能为空");
+		}
+		
+		if (!"".equals(map.get("checkOpinion")) && map.get("checkOpinion") != null) { // 等于空就直接取空值
+			try {
+				checkOpinion = (String) map.get("checkOpinion");
+			} catch (Exception e) {
+				throw new RuntimeException("checkOpinion类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("审核意见不能为空");
+		}
+		if (!"".equals(map.get("businessId")) && map.get("businessId") != null) { // 等于空就直接取空值
+			try {
+				businessId = Integer.parseInt((String) map.get("businessId"));
+			} catch (Exception e) {
+				throw new RuntimeException("businessId解析异常或类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("businessId不能为空");
+		}
+		
+		//将审核已将数据封装到map中
+		Map<String, Object> mapToDaoOfBusinessCheck=new LinkedHashMap<String, Object>();
+		mapToDaoOfBusinessCheck.put("organizationName", organizationName);
+		mapToDaoOfBusinessCheck.put("checkPerson", checkPerson);
+		mapToDaoOfBusinessCheck.put("checkResult", checkResult);
+		mapToDaoOfBusinessCheck.put("checkOpinion", checkOpinion);
+		mapToDaoOfBusinessCheck.put("businessId", businessId);
+		mapToDaoOfBusinessCheck.put("checkTime", System.currentTimeMillis());
+		//将封装到map的审核意见数据传入dao层中将结果导入【业务审核总表】中-------->insert操作
+		businessDeclareDao.businessDeclareCheckedBy(mapToDaoOfBusinessCheck);
+		
+		//将审核的结果封装到map中
+		Map<String, Object> mapToDaoOfBusinessDeclare=new LinkedHashMap<String, Object>();
+		mapToDaoOfBusinessDeclare.put("businessId", businessId);
+		mapToDaoOfBusinessDeclare.put("statusId", statusId);
+		//将审核结果更新到【业务申报表】这个businessId的【业务申报结果字段】中去-------->update操作
+		businessDeclareDao.updateBusinessDeclareStatus(mapToDaoOfBusinessDeclare);
+		
+		
+		//此外,还要将审核的这个操作信息插入到操作记录表中【】
+		Map<String, Object> mapToOperationHistory = new LinkedHashMap<String,Object>();
+		mapToOperationHistory.put("operatorTypeId", operatorTypeId);							//operatorTypeId根据前面的判断决定
+		mapToOperationHistory.put("operatorRole", organizationName);							//创建这个操作的角色根据前面的organizationName决定
+		mapToOperationHistory.put("operatorAccount", 300000001);						//操作账号先定死??????
+		mapToOperationHistory.put("operatorPerson", "张三");								//操作人先写死???????
+		mapToOperationHistory.put("operatorTime", mapToDaoOfBusinessCheck.get("checkTime"));//操作时间为当前操作时间
+		mapToOperationHistory.put("hash", "to be calculated from operation");			//如何计算操作的hash值????
+		businessDeclareDao.insertOperationHistoryInformationToDaoByBranchBank(mapToOperationHistory);//将操作记录信息插入到操作记录表中
+		
+	}
+
+	
+	
+	/**
+	 * 
+	* @Title: uploadContractByProvincialBranchBank
+	* @Description: TODO(由省分行业务部门上传的合同,将这个合同信息分别插入【合同提交记录表】、【合同状态跟踪表】、【附件表】)
+	* 	修改意见定义为“初始版本合同”
+	* 	上传部门为“省分行业务部门”
+	* 
+	* @param @param map    设定文件
+	* @return void    返回类型
+	* @author ylx
+	* @date 2017年12月20日 下午3:09:19
+	* @throws
+	 */
+	@Transactional(rollbackFor=Exception.class)
+	public void uploadContractByProvincialBranchBank(Map<String, Object> map) {
+		Integer businessId=null;					//业务的id号
+		Integer contractId=null;					//合同id号,当作附件的id号
+		String contractName="";						//合同名,暂时理解为文件名,也当作附件名进行存储
+		String contractParty="";					//签约双方的名字
+		String uploadDepartment="";					//这里暂时写死是省分行业务部门
+		String uploadPerson="";						//上传人
+		String url="";								//合同的url地址	
+		String hash="";								//合同的hash值
+		Integer userId=null;						//上传人的id号
+		if (!"".equals(map.get("businessId")) && map.get("businessId") != null) { // 等于空就直接取空值
+			try {
+				businessId = Integer.parseInt((String) map.get("businessId"));
+			} catch (Exception e) {
+				throw new RuntimeException("业务id解析异常或类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("业务id不能为空");
+		}
+		if (!"".equals(map.get("contractId")) && map.get("contractId") != null) { // 等于空就直接取空值
+			try {
+				contractId = Integer.parseInt((String) map.get("contractId"));
+			} catch (Exception e) {
+				throw new RuntimeException("合同id解析异常或类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("合同id不能为空");
+		}
+		if (!"".equals(map.get("contractName")) && map.get("contractName") != null) { // 等于空就直接取空值
+			try {
+				contractName = (String) map.get("contractName");
+			} catch (Exception e) {
+				throw new RuntimeException("contractName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("合同名不能为空");
+		}
+		if (!"".equals(map.get("contractParty")) && map.get("contractParty") != null) { // 等于空就直接取空值
+			try {
+				contractParty = (String) map.get("contractParty");
+			} catch (Exception e) {
+				throw new RuntimeException("contractParty类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("签约双方的名不能为空");
+		}
+		if (!"".equals(map.get("uploadDepartment")) && map.get("uploadDepartment") != null) { // 等于空就直接取空值
+			try {
+				uploadDepartment = (String) map.get("uploadDepartment");
+			} catch (Exception e) {
+				throw new RuntimeException("uploadDepartment类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("上传部门名不能为空");
+		}
+		if (!"".equals(map.get("uploadPerson")) && map.get("uploadPerson") != null) { // 等于空就直接取空值
+			try {
+				uploadPerson = (String) map.get("uploadPerson");
+			} catch (Exception e) {
+				throw new RuntimeException("uploadPerson类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("上传人不能为空");
+		}
+		if (!"".equals(map.get("url")) && map.get("url") != null) { // 等于空就直接取空值
+			try {
+				url = (String) map.get("url");
+			} catch (Exception e) {
+				throw new RuntimeException("url类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("合同的url地址不能为空");
+		}
+		if (!"".equals(map.get("hash")) && map.get("hash") != null) { // 等于空就直接取空值
+			try {
+				hash = (String) map.get("hash");
+			} catch (Exception e) {
+				throw new RuntimeException("hash类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("合同的hash值不能为空");
+		}
+		if (!"".equals(map.get("userId")) && map.get("userId") != null) { // 等于空就直接取空值
+			try {
+				userId = Integer.parseInt((String) map.get("userId"));
+			} catch (Exception e) {
+				throw new RuntimeException("上传人id解析异常或类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("上传人id不能为空");
+		}
+		
+		
+		//将合同信息封装到mapToContractRecord
+		Map<String, Object> mapToContractRecord=new LinkedHashMap<String, Object>();
+		mapToContractRecord.put("businessId", businessId);
+		mapToContractRecord.put("contractId", contractId);
+		mapToContractRecord.put("contractName", contractName);
+		mapToContractRecord.put("version", "v1.0");
+		mapToContractRecord.put("contractParty", contractParty);
+		mapToContractRecord.put("uploadDepartment", uploadDepartment);
+		mapToContractRecord.put("uploadPerson", uploadPerson);
+		mapToContractRecord.put("modifyOpinion", "初始版本合同");
+		mapToContractRecord.put("comfirmDepartment", "管理人");
+		mapToContractRecord.put("commitTime", System.currentTimeMillis());
+		mapToContractRecord.put("hash", hash);
+		
+		
+		//将合同信息封装到mapToContractStatusTracking
+		Map<String, Object> mapToContractStatusTracking=new LinkedHashMap<String, Object>();
+		mapToContractStatusTracking.put("businessId", businessId);
+		mapToContractStatusTracking.put("contractName", contractName);
+		mapToContractStatusTracking.put("contractParty", contractParty);
+		mapToContractStatusTracking.put("updateTime", mapToContractRecord.get("commitTime"));
+		mapToContractStatusTracking.put("statusId", 7);												//省分行刚上传合同状态肯定是将状态变成修订中
+		
+		
+		//将合同信息封装到mapToAttachment
+		Map<String, Object> mapToAttachment=new LinkedHashMap<String, Object>();
+		mapToAttachment.put("attachmentId", contractId);
+		mapToAttachment.put("attachmentName", contractName);
+		mapToAttachment.put("url", url);
+		mapToAttachment.put("userId", userId);
+		mapToAttachment.put("createTime", mapToContractRecord.get("commitTime"));
+		
+		businessDeclareDao.insertContractInformationToContractRecord(mapToContractRecord);					//将合同信息插入到【合同提交记录表】
+		businessDeclareDao.insertContractInformationToContractStatusTracking(mapToContractStatusTracking);	//将合同信息插入到【合同状态跟踪表】
+		businessDeclareDao.insertContractInformationToAttachment(mapToAttachment);							//将信息插入到【附件表】
+		
+		
+		
+		
+		//此外,还要将审核的这个操作信息插入到操作记录表中【】
+		Map<String, Object> mapToOperationHistory = new LinkedHashMap<String,Object>();
+		mapToOperationHistory.put("operatorTypeId", 1004);							//operatorTypeId=1004表示【合同上传】
+		mapToOperationHistory.put("operatorRole", "省分行业务部门");					//创建这个操作的角色只能是省分行业务部门
+		mapToOperationHistory.put("operatorAccount", 300000001);					//操作账号先定死??????
+		mapToOperationHistory.put("operatorPerson", "张三");							//操作人先写死???????
+		mapToOperationHistory.put("operatorTime", mapToContractRecord.get("commitTime"));//操作时间为当前操作时间
+		mapToOperationHistory.put("hash", "to be calculated from operation");			//如何计算操作的hash值????
+		businessDeclareDao.insertOperationHistoryInformationToDaoByBranchBank(mapToOperationHistory);//将操作记录信息插入到操作记录表中
+		
+		
+	}
+
+	
+}

+ 106 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/OperationHistoryService.java

@@ -0,0 +1,106 @@
+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.OperationHistoryDao;
+import com.fuzamei.entity.OperationHistory;
+import com.fuzamei.utils.DateUtil;
+import com.fuzamei.utils.PageDTO;
+
+@Service
+public class OperationHistoryService {
+
+	@Autowired
+	private OperationHistoryDao operationHistoryDao;
+
+	private static final int ROW_NUM = 10; // 分页每页显示数据的数量
+
+	/**
+	 * 
+	 * @Title: queryOperationHistoryInformation @Description:
+	 * TODO(从dao层查询出分页数据信息) @param @param page @param @param
+	 * account @param @param role @param @param type @param @param
+	 * startTime @param @param endTime @param @return 设定文件 @return PageDTO
+	 * 返回类型 @author ylx @date 2017年12月14日 下午8:09:43 @throws
+	 */
+	public PageDTO queryOperationHistoryInformation(Map<String, Object> map) {
+		int page = 1; // 默认页是第一页
+		String account = ""; // 账号默认空值
+		String role = ""; // 操作角色默认空值
+		String type = ""; // 操作类型默认空值
+		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 (Exception e) {
+				page = 1; // 数据解析异常page还是1
+			}
+		}
+		if (!"".equals(map.get("account")) && map.get("account") != null) { 						// 等于空就直接取空值
+			try {
+				account = (String) map.get("account");
+			} catch (Exception e) {
+				account="";
+			}
+		}
+		if (!"".equals(map.get("role")) && map.get("role") != null) { // 等于空就直接取空值
+			try {
+				role = (String) map.get("role");
+			} catch (Exception e) {
+				role="";
+			}
+		}
+		if (!"".equals(map.get("type")) && map.get("type") != null) { // 等于空就直接取空值
+			try {
+				type = (String) map.get("type");
+			} catch (Exception e) {
+				type="";
+			}
+		}
+		if (!"".equals(map.get("startTime")) && map.get("startTime") != null) { // 等于空就直接取空值
+			try {
+				startTime = Long.parseLong((String) map.get("startTime"));
+			} catch (Exception e) {
+				startTime = 0; // 数据解析异常或转换类型异常startTime还是0
+			}
+		}
+		if (!"".equals(map.get("endTime")) && map.get("endTime") != null) { // 等于空就直接取空值
+			try {
+				endTime = Long.parseLong((String) map.get("endTime"));
+			} catch (Exception 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("account", account);
+		mapToDao.put("role", role);
+		mapToDao.put("type", type);
+		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条,可根据需求修改分页数量
+
+		List<OperationHistory> informationList = operationHistoryDao.queryOperationHistoryInformation(mapToDao); // 去dao层取分页的数据
+
+		int count = operationHistoryDao.findAllInformation();
+		pageDto.setTotal(count);
+		pageDto.setRows(informationList);
+		return pageDto;
+	}
+
+}

+ 240 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/ProjectFileService.java

@@ -0,0 +1,240 @@
+package com.fuzamei.service;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Arrays;
+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.ProjectFileDao;
+import com.fuzamei.entity.ProjectFile;
+import com.fuzamei.utils.PageDTO;
+
+@Service
+public class ProjectFileService {
+
+	@Autowired
+	private ProjectFileDao projectFileDao;
+
+	private static final int ROW_NUM = 10; // 分页每页显示数据的数量(固定10条数据)
+
+	/**
+	 * 
+	* @Title: queryProjectFileInformation
+	* @Description: TODO(这里用一句话描述这个方法的作用)
+	* @param @param map
+	* @param @return    设定文件
+	* @return PageDTO    返回类型
+	* @author ylx
+	* @date 2017年12月15日 下午3:57:43
+	* @throws
+	 */
+	public PageDTO queryProjectFileInformation(Map<String, Object> map) {
+		int page = 1; // 默认页数是第一页
+		String projectName = ""; // 默认名称为空值
+		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 (Exception e) {
+				page = 1; // 数据解析异常或者类型转换异常page还是1
+			}
+		}
+		if (!"".equals(map.get("projectName")) && map.get("projectName") != null) { // 等于空就直接取空值
+			try {
+				projectName = (String) map.get("projectName");
+			} catch (Exception e) {
+				projectName="";
+			}
+		}
+		if (!"".equals(map.get("startTime")) && map.get("startTime") != null) { // 等于空就直接取空值
+			try {
+				startTime = Long.parseLong((String) map.get("startTime"));
+			} catch (Exception e) {
+				startTime = 0; // 数据解析异常和类型转换异常startTime还是0
+			}
+		}
+		if (!"".equals(map.get("endTime")) && map.get("endTime") != null) { // 等于空就直接取空值
+			try {
+				endTime = Long.parseLong((String) map.get("endTime"));
+			} catch (Exception 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("projectName", projectName);
+		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条,可根据需求修改分页数量
+		List<ProjectFile> informationList = projectFileDao.queryProjectFileInformation(mapToDao);
+		int count = projectFileDao.findAllInformation();
+		pageDto.setRows(informationList);
+		pageDto.setTotal(count);
+		return pageDto;
+	}
+
+	
+	/**
+	 * 
+	* @Title: checkoutProjectFiles
+	* @Description: TODO通过点击查看按钮,可以查看到这个项目名称下所有的项目文件信息以及hash值,并且提供文件的下载功能
+	* @param @param map
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月15日 下午4:19:56
+	* @throws
+	 */
+	public Map<String, Object> checkoutProjectFiles(Map<String, Object> map) {
+		Integer projectId = null;	//默认项目编号为空
+		String projectName="";		//默认项目名称为空值
+		if(!"".equals(map.get("projectId")) && null!=map.get("projectId")){
+			try {
+				projectId = Integer.parseInt((String)map.get("projectId"));
+			} catch (Exception e) {
+				projectId = null;	//如果解析出现异常或者类型转换异常,依然保持projectId为null
+			}
+		}
+		if (!"".equals(map.get("projectName")) && map.get("projectName") != null) { // 等于空就直接取空值
+			try {
+				projectName = (String) map.get("projectName");
+			} catch (Exception e) {
+				projectName="";
+			}
+		}
+		
+		Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();
+		
+		mapToDao.put("projectId", projectId);
+		mapToDao.put("projectName", projectName);
+		
+		List<ProjectFile> informationList = projectFileDao.checkoutProjectFiles(mapToDao);	//将项目id和项目名称封装成map到dao层去获取数据
+		
+		Map<String, Object> mapBackToController = new LinkedHashMap<String, Object>();
+		
+		mapBackToController.put("projectId", projectId);
+		mapBackToController.put("projectName", projectName);
+		mapBackToController.put("fileInformations", informationList);
+		
+		return mapBackToController;
+	}
+
+	/**
+	 * 
+	* @Title: insertInformationIntoTable
+	* @Description: TODO(上传项目文档,不仅要将数据插入项目文档表和附件表,还要在操作记录中插入一条数据)
+	* @param @param map    设定文件
+	* @return void    返回类型
+	* @author ylx
+	* @date 2017年12月20日 下午8:16:14
+	* @throws
+	 */
+	@Transactional(rollbackFor=Exception.class)
+	public void insertInformationIntoTable(Map<String, Object> map) {
+		String projectId="";			//项目id号
+		String projectName="";			//项目文件名称
+		String url="";					//url路径名称
+		String attachmentName="";		//附件名称
+		if (!"".equals(map.get("projectId")) && map.get("projectId") != null) { // 等于空就直接取空值
+			try {
+				projectId = (String) map.get("projectName");
+			} catch (Exception e) {
+				throw new RuntimeException("projectId类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("项目id号为空");
+		}
+		if (!"".equals(map.get("projectName")) && map.get("projectName") != null) { // 等于空就直接取空值
+			try {
+				projectName = (String) map.get("projectName");
+			} catch (Exception e) {
+				throw new RuntimeException("projectName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("项目名称为空");
+		}
+		if (!"".equals(map.get("url")) && map.get("url") != null) { // 等于空就直接取空值
+			try {
+				url = (String) map.get("url");
+			} catch (Exception e) {
+				throw new RuntimeException("url类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("url路径名称为空");
+		}
+		if (!"".equals(map.get("attachmentName")) && map.get("attachmentName") != null) { // 等于空就直接取空值
+			try {
+				attachmentName = (String) map.get("attachmentName");
+			} catch (Exception e) {
+				throw new RuntimeException("attachmentName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("附件名称为空");
+		}
+		
+		//将数据封装到mapToDaoForProjectFile,并插入【项目文档表】
+		Map<String, Object> mapToDaoForProjectFile = new LinkedHashMap<String,Object>();
+		mapToDaoForProjectFile.put("projectId", projectId);
+		mapToDaoForProjectFile.put("projectName", projectName);
+		mapToDaoForProjectFile.put("attachmentId", (Integer)(int)(Math.random()*1000000));		//附件id不能用随机数,这里到时候要改的。。。。。。。。。TODO
+		mapToDaoForProjectFile.put("updateTime", System.currentTimeMillis());			//上传文件的更新时间为当前时间
+		mapToDaoForProjectFile.put("hash", "to be changed");							//上传文件的hash值到时候要通过对文件进行计算后才能进行数据库的录入(这里先写死)。。。。。。。。TODO
+		projectFileDao.insertInformationIntoTable(mapToDaoForProjectFile);			//将以上的数据直接添加到数据库中【项目文档表】去
+		
+		//将数据封装到mapToDaoForAttachment,并插入【附件表】
+		Map<String, Object> mapToDaoForAttachment = new LinkedHashMap<String,Object>();
+		mapToDaoForAttachment.put("attachmentId", mapToDaoForProjectFile.get("attachmentId"));
+		mapToDaoForAttachment.put("attachmentName", attachmentName);					//附件名称需要录入
+		mapToDaoForAttachment.put("url", url);										//下载文件需要用到的url地址需要录入
+		mapToDaoForAttachment.put("userId", 2000000001);								//用户id(这里先写死)。。。。。。。。。。TODO
+		mapToDaoForAttachment.put("addTime", (Long)mapToDaoForProjectFile.get("updateTime"));		//这里添加的文件上传时间,和项目文档更新时间一样
+		projectFileDao.insertInformationToAttachment(mapToDaoForAttachment);
+		
+		//此外,还要将业务申报的这个操作信息插入到操作记录表中【操作记录表】
+		Map<String, Object> mapToOperationHistory = new LinkedHashMap<String,Object>();
+		mapToOperationHistory.put("operatorTypeId", 1011);								//上传项目文档的类型为1011
+		mapToOperationHistory.put("operatorAccount", 300000001);						//操作账号先定死
+		mapToOperationHistory.put("operatorRole", "省分行托管分中心档案保管岗");			//创建这个操作的角色只能是省分行托管分中心档案保管岗
+		mapToOperationHistory.put("operatorPerson", "张三");								//操作人暂时先写死
+		mapToOperationHistory.put("operatorTime", (Long)mapToDaoForProjectFile.get("updateTime"));//操作时间为当前操作时间
+		mapToOperationHistory.put("hash", "to be calculated from operation");			//如何计算操作的hash值????
+		projectFileDao.insertOperationHistoryInformationToDao(mapToOperationHistory);//将操作记录信息插入到操作记录表中
+		
+	}
+	
+	/*public static void main(String[] args) throws NoSuchAlgorithmException {
+		MessageDigest complete=MessageDigest.getInstance("MD5");
+		byte[] bs={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
+		complete.update(bs);
+		byte[] digest = complete.digest();
+		System.out.println(Arrays.toString(digest));
+		System.out.println("=======================");
+		System.out.println(Integer.toString(0x100));
+		System.out.println(Integer.toString(36, 37));
+		System.out.println(Integer.toString((16 & 0xff) + 0x100, 16).substring( 1 ));
+		System.out.println(( 1 & 0xff ) + 0x100);
+		System.out.println("=======================");
+		
+	}*/
+	
+
+
+	
+}

+ 285 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/ValuationAccountingService.java

@@ -0,0 +1,285 @@
+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 org.springframework.transaction.annotation.Transactional;
+
+import com.fuzamei.dao.ValuationAccountingDao;
+import com.fuzamei.entity.ValuationAccount;
+import com.fuzamei.utils.PageDTO;
+
+@Service
+public class ValuationAccountingService {
+	
+	@Autowired
+	private ValuationAccountingDao valuationAccountingDao;
+
+	private static final int ROW_NUM = 10; // 分页每页显示数据的数量
+	
+	public PageDTO queryValuationAccountingInformation(Map<String, Object> map) {
+		int page = 1; // 默认页是第一页
+		String fundName="";	//基金名默认为空
+		String battleResult="";	//比对结果默认为空
+		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 (Exception e) {
+				page = 1; // 数据解析异常或类型转换异常page还是1
+			}
+		}
+		if (!"".equals(map.get("fundName")) && map.get("fundName") != null) { // 等于空就直接取空值
+			try {
+				fundName = (String) map.get("fundName");
+			} catch (Exception e) {
+				fundName="";//类型转换异常基金名称还是空字符串
+			}
+		}
+		if (!"".equals(map.get("battleResult")) && map.get("battleResult") != null) { // 等于空就直接取空值
+			try {
+				battleResult = (String) map.get("battleResult");
+			} catch (Exception e) {
+				battleResult="";//类型转换异常比对结果还是空字符串
+			}
+		}
+		if (!"".equals(map.get("startTime")) && map.get("startTime") != null) { // 等于空就直接取空值
+			try {
+				startTime = Long.parseLong((String) map.get("startTime"));
+			} catch (Exception e) {
+				startTime = 0; // 数据解析异常或者类型转换异常startTime还是0
+			}
+		}
+		if (!"".equals(map.get("endTime")) && map.get("endTime") != null) { // 等于空就直接取空值
+			try {
+				endTime = Long.parseLong((String) map.get("endTime"));
+			} catch (Exception e) {
+				endTime = Long.MAX_VALUE; // 数据解析异常或者类型转换异常endTime还是9223372036854775807L
+			}
+		}
+		Map<String, Object> mapToDao = new LinkedHashMap<String, Object>();				//这个map是去dao层调取数据的
+		mapToDao.put("startPage", (page - 1) * ROW_NUM);
+		mapToDao.put("fundName", fundName);
+		mapToDao.put("battleResult", battleResult);
+		
+		//如果时间顺序错位,要重新进行排位
+		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条,可根据需求修改分页数量
+		
+		PageDTO pageDTO=new PageDTO();
+		
+		List<ValuationAccount> informationList=valuationAccountingDao.queryValuationAccountingInformation(mapToDao);	//从service层中获取分页的对象信息
+		int count=valuationAccountingDao.findAllInformations();	//获取总的信息数量
+		pageDTO.setTotal(count);
+		pageDTO.setRows(informationList);
+		return pageDTO;
+	}
+
+	/**
+	 * 
+	* @Title: insertInformationIntoTable
+	* @Description: TODO(以管理员身份将估值核算等数据插入数据库中)
+	* @param @param map    设定文件
+	* @return void    返回类型
+	* @author ylx
+	* @date 2017年12月18日 下午5:49:33
+	* @throws
+	 */
+	@Transactional(rollbackFor=Exception.class)
+	public void insertInformationIntoTableByAdmin(Map<String, Object> map) {
+		String fundId="";			//基金id号
+		String fundName="";			//基金名称
+		String assets="";			//托管资产名称
+		String url="";					//url路径名称
+		String attachmentName="";		//附件名称
+		if (!"".equals(map.get("fundId")) && map.get("fundId") != null) { // 等于空就直接取空值
+			try {
+				fundId = (String) map.get("fundId");
+			} catch (Exception e) {
+				throw new RuntimeException("fundId类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("项目id号为空");
+		}
+		if (!"".equals(map.get("fundName")) && map.get("fundName") != null) { // 等于空就直接取空值
+			try {
+				fundName = (String) map.get("fundName");
+			} catch (Exception e) {
+				throw new RuntimeException("fundName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("项目名称为空");
+		}
+		if (!"".equals(map.get("assets")) && map.get("assets") != null) { // 等于空就直接取空值
+			try {
+				assets = (String) map.get("assets");
+			} catch (Exception e) {
+				throw new RuntimeException("assets类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("url路径名称为空");
+		}
+		if (!"".equals(map.get("url")) && map.get("url") != null) { // 等于空就直接取空值
+			try {
+				url = (String) map.get("url");
+			} catch (Exception e) {
+				throw new RuntimeException("url类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("url路径名称为空");
+		}
+		if (!"".equals(map.get("attachmentName")) && map.get("attachmentName") != null) { // 等于空就直接取空值
+			try {
+				attachmentName = (String) map.get("attachmentName");
+			} catch (Exception e) {
+				throw new RuntimeException("attachmentName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("附件名称为空");
+		}
+		
+		//将数据插入到估值核算表的数据封装到mapToDaoForValuationAccounting
+		Map<String, Object> mapToDaoForValuationAccounting = new LinkedHashMap<String,Object>();
+		mapToDaoForValuationAccounting.put("fundId", fundId);
+		mapToDaoForValuationAccounting.put("fundName", fundName);
+		mapToDaoForValuationAccounting.put("assets", assets);
+		
+		//管理员估值报表的id,而银行估值报表的id这个时候是没有添加的,也就是表中插入数据的时候,银行估值报表的id先空着
+		mapToDaoForValuationAccounting.put("attachmentId", (Integer)(int)(Math.random()*1000000));		//附件id不能用随机数,这里到时候要改的(这个是管理员估值报表的id)。。。。。。。。。TODO
+		mapToDaoForValuationAccounting.put("updateTime", System.currentTimeMillis());			//上传文件的更新时间为当前时间
+		mapToDaoForValuationAccounting.put("battleResult", "待对账");							//上传文件的hash值到时候要通过对文件进行计算后才能进行数据库的录入(这里先写死)。。。。。。。。TODO
+		valuationAccountingDao.insertInformationIntoTableByAdmin(mapToDaoForValuationAccounting);			//将以上的数据直接添加到数据库中【估值核算表】去
+
+		//将附件信息放入到mapToDaoForAttachment并传递到数据库插入
+		Map<String, Object> mapToDaoForAttachment = new LinkedHashMap<String,Object>();
+		mapToDaoForAttachment.put("attachmentId", mapToDaoForValuationAccounting.get("attachmentId"));	//附件表的id直接从之前封装的map中获取即可
+		mapToDaoForAttachment.put("attachmentName", attachmentName);									//附件名称需要录入
+		mapToDaoForAttachment.put("url", url);															//下载文件需要用到的url地址需要录入
+		//用户id到时候再确定,先写死
+		mapToDaoForAttachment.put("userId", 2000000001);												//用户id(这里先写死)。。。。。。。。。。TODO
+		mapToDaoForAttachment.put("addTime", (Long)mapToDaoForValuationAccounting.get("updateTime"));	//这里添加的文件上传时间,和估值核算添加的时间一致
+		valuationAccountingDao.insertInformationToAttachment(mapToDaoForValuationAccounting);
+	}
+
+	/**
+	 * 
+	* @Title: updateInformationByBank
+	* @Description: TODO(以银行的身份将银行的估值核算等数据更新到已经存在的表中,同时将上传估值核算的操作记录插入到操作记录表中去)
+	* @param @param map    设定文件
+	* @return void    返回类型
+	* @author ylx
+	* @date 2017年12月18日 下午8:21:51
+	* @throws
+	 */
+	@Transactional(rollbackFor=Exception.class)
+	public void updateInformationByBank(Map<String, Object> map) {
+		String fundId="";			//基金id号
+		String fundName="";			//基金名称
+		String assets="";			//托管资产名称
+		String url="";					//url路径名称
+		String attachmentName="";		//附件名称
+		if (!"".equals(map.get("fundId")) && map.get("fundId") != null) { // 等于空就直接取空值
+			try {
+				fundId = (String) map.get("fundId");
+			} catch (Exception e) {
+				throw new RuntimeException("fundId类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("项目id号为空");
+		}
+		if (!"".equals(map.get("fundName")) && map.get("fundName") != null) { // 等于空就直接取空值
+			try {
+				fundName = (String) map.get("fundName");
+			} catch (Exception e) {
+				throw new RuntimeException("fundName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("项目名称为空");
+		}
+		if (!"".equals(map.get("assets")) && map.get("assets") != null) { // 等于空就直接取空值
+			try {
+				assets = (String) map.get("assets");
+			} catch (Exception e) {
+				throw new RuntimeException("assets类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("url路径名称为空");
+		}
+		if (!"".equals(map.get("url")) && map.get("url") != null) { // 等于空就直接取空值
+			try {
+				url = (String) map.get("url");
+			} catch (Exception e) {
+				throw new RuntimeException("url类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("url路径名称为空");
+		}
+		if (!"".equals(map.get("attachmentName")) && map.get("attachmentName") != null) { // 等于空就直接取空值
+			try {
+				attachmentName = (String) map.get("attachmentName");
+			} catch (Exception e) {
+				throw new RuntimeException("attachmentName类型转换异常");
+			}
+		}else{
+			throw new RuntimeException("附件名称为空");
+		}
+		
+		Map<String, Object> mapToDaoForValuationAccounting = new LinkedHashMap<String,Object>();
+		mapToDaoForValuationAccounting.put("fundId", fundId);
+		mapToDaoForValuationAccounting.put("fundName", fundName);
+		mapToDaoForValuationAccounting.put("assets", assets);
+		/*
+		 * TODO
+		 * 这里有一段代码是需要对管理岗和银行的上传估值报表进行比较,来确定battleResult的结果是---->>估值一致 or 估值不一致????????
+		 */
+		//这是一段伪代码,到时候要删除的
+		if((int)(Math.random()*3)>1){
+			mapToDaoForValuationAccounting.put("battleResult", "估值一致");	
+		}else{
+			mapToDaoForValuationAccounting.put("battleResult", "估值不一致");	
+		}
+		//管理员估值报表的id,而银行估值报表的id这个时候是没有添加的,也就是表中插入数据的时候,银行估值报表的id先空着
+		mapToDaoForValuationAccounting.put("attachmentId", (Integer)(int)(Math.random()*1000000));		//附件id不能用随机数,这里到时候要改的(这个是银行估值报表的id)。。。。。。。。。TODO
+		mapToDaoForValuationAccounting.put("updateTime", System.currentTimeMillis());			//上传文件的更新时间为当前时间
+		valuationAccountingDao.updateInformationByBank(mapToDaoForValuationAccounting);			//将以上的数据更新到之前估值核算表
+		
+		
+		//将附件信息封装到mapToDaoForAttachment并传入数据库中
+		Map<String, Object> mapToDaoForAttachment = new LinkedHashMap<String,Object>();
+		mapToDaoForAttachment.put("attachmentId", mapToDaoForValuationAccounting.get("attachmentId"));	//直接从前面的map中获取
+		mapToDaoForAttachment.put("url", url);										//下载文件需要用到的url地址需要录入到附件表中
+		mapToDaoForAttachment.put("attachmentName", attachmentName);					//附件名称需要录入
+		//用户id到时候再确定,先写死
+		mapToDaoForAttachment.put("userId", 2000000001);								//用户id(这里先写死)。。。。。。。。。。TODO
+		mapToDaoForAttachment.put("addTime", (Long)mapToDaoForValuationAccounting.get("updateTime"));		//这里添加的文件上传时间,和项目文档更新时间一样
+		
+		
+		//此外,还要将业务申报的这个操作信息插入到操作记录表中【】
+		Map<String, Object> mapToOperationHistory = new LinkedHashMap<String,Object>();
+		mapToOperationHistory.put("operatorTypeId", 1010);								//操作类型为【上传估值核算表】---1010
+		mapToOperationHistory.put("operatorAccount", 300000001);						//操作账号先定死
+		mapToOperationHistory.put("operatorRole", "省分行托管分中心估值核算岗");			//创建这个操作的角色只能是---省分行托管分中心估值核算岗
+		mapToOperationHistory.put("operatorPerson", "张三");								//操作人先写死
+		mapToOperationHistory.put("operatorTime", mapToDaoForValuationAccounting.get("updateTime"));			//操作时间为当前操作时间
+		mapToOperationHistory.put("hash", "to be calculated from operation");			//如何计算操作的hash值????
+		valuationAccountingDao.insertOperationHistoryInformationToDao(mapToOperationHistory);//将操作记录信息插入到操作记录表中
+		
+		
+		
+	}
+
+}

+ 413 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/BusinessDeclareAction.java

@@ -0,0 +1,413 @@
+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.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.FileUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+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.entity.BusinessCheck;
+import com.fuzamei.service.BusinessDeclareService;
+import com.fuzamei.utils.JSONUtil;
+import com.fuzamei.utils.PageDTO;
+
+@Controller
+@RequestMapping("/business_declare")
+public class BusinessDeclareAction {
+	
+	@Autowired
+	private BusinessDeclareService businessDeclareService;
+	
+	private static final String SP=File.separator;
+	
+	
+	/**
+	 * 
+	* @Title: uploadValuationPOIByBank
+	* @Description: TODO(业务申报功能,需要完成【业务核准表】【尽职调查报告】【产品核准表】【基础性资料】4个文件的上传,插入业务申报表1条数据,插入附件表4条数据,还有插入操作历史1条数据)
+	* 				前段以【表单】的形式传过来一组数据:
+	* 				businessApproval:对应业务核准表的文件
+	* 				responsibleInvestigation:对应尽职调查报告文件
+	* 				productApproval:产品核准表文件
+	* 				basicData:基础性资料文件
+	* 				businessName:业务名称
+	* @param @param files
+	* @param @param request
+	* @param @param businessName                  由经办行写入的业务名称,例如:嘉实活期基金
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月19日 上午11:23:27
+	* @throws
+	 */
+	@RequestMapping(value="/uploadBusinessMaterialsByBranchBank",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> uploadValuationPOIByBank(@RequestParam("businessApproval") MultipartFile file1,
+			@RequestParam("responsibleInvestigation") MultipartFile file2,
+			@RequestParam("productApproval") MultipartFile file3,
+			@RequestParam("basicData") MultipartFile file4,
+			HttpServletRequest request,
+			@RequestParam("businessName") String businessName) {
+		try {
+			String path = request.getServletContext().getRealPath("")+SP+"content";			//SP是系统分隔符
+			File dir=new File(path);
+			if(!dir.exists()){
+				dir.mkdirs();
+			}
+			
+			Map<String, Object> map =new LinkedHashMap<String, Object>();		//这个map用于存储所有要去service的数据
+			map.put("businessId", 32323);					//将业务id先写死,到时候还要再进行修改。。。。。TODO
+			map.put("bank", "杭州文三路支行");				//先将申报的支行名字写死,到时候还要进行修改。。。。。数据库的字段是bank_id???。。。。。TODO
+			map.put("businessName", businessName);			//将业务名称先写入map,这个只是用于创建一条业务申请表中的信息,数据来自客户端创建的名称
+			
+			
+			//处理businessApproval(业务核准表)文件的上传功能
+			String filename1 = file1.getOriginalFilename();
+			String pathFile1=path+SP+filename1;
+			File newFile1=new File(pathFile1);
+			file1.transferTo(newFile1);						//将---业务核准表---文件上传到制定的文件夹下,目前这个文件夹路径是写死的	
+			map.put("busineeApprovalId", 400001);			//将业务核准表的id先写死,和attachment表中表id一致
+			map.put("busineeApprovalName",filename1);		//业务核准表名称,用于存在attachment中的附件名
+			map.put("urlOfBusineeApproval", SP+"content"+SP+filename1);		//将文件下载路径url通过map传到service层进行校验
+			
+	//---------------------------------------------------------------------------------------------------------------			
+				
+			//处理responsibleInvestigation(尽职调查报告)文件的上传功能
+			String filename2 = file2.getOriginalFilename();
+			String pathFile2=path+SP+filename2;
+			File newFile2=new File(pathFile2);
+			file2.transferTo(newFile2);													//将---尽职调查报告---文件上传到制定的文件夹下,目前这个文件夹路径是写死的
+			map.put("responsibleInvestigationId", 500001);								//将尽职调查报告的id先写死,和attachment表中表id一致
+			map.put("responsibleInvestigationName",filename2);							//业务核准表名称,用于存在attachment中的附件名
+			map.put("urlOfResponsibleInvestigation", SP+"content"+SP+filename2);		//将文件下载路径url通过map传到service层进行校验
+			
+	//---------------------------------------------------------------------------------------------------------------		
+			
+			//处理productApproval(产品核准表)文件的上传功能
+			String filename3 = file3.getOriginalFilename();
+			String pathFile3=path+SP+filename3;
+			File newFile3=new File(pathFile3);
+			file3.transferTo(newFile3);											//将---产品核准表---文件上传到制定的文件夹下,目前这个文件夹路径是写死的
+			map.put("productApprovalId", 600001);								//将产品核准表的id先写死,和attachment表中表id一致
+			map.put("productApprovalName",filename3);							//业务核准表名称,用于存在attachment中的附件名
+			map.put("urlOfProductApproval", SP+"content"+SP+filename3);			//将文件下载路径url通过map传到service层进行校验
+
+	//---------------------------------------------------------------------------------------------------------------		
+			
+			//处理basicData(基础性资料)文件的上传功能
+			String filename4 = file4.getOriginalFilename();
+			String pathFile4=path+SP+filename4;
+			File newFile4=new File(pathFile4);
+			file4.transferTo(newFile4);													//将---基础性资料---文件上传到制定的文件夹下,目前这个文件夹路径是写死的
+			map.put("basicDataId", 700001);								//将业务核准表的id先写死,和attachment表中表id一致
+			map.put("basicDataName",filename4);							//业务核准表名称,用于存在attachment中的附件名
+			map.put("urlOfBasicData", SP+"content"+SP+filename4);		//将文件下载路径url通过map传到service层进行校验
+				
+	//---------------------------------------------------------------------------------------------------------------		
+			
+			//将经办支行提交的所有数据信息通过map传入service层先进行校验
+			businessDeclareService.insertInformationIntoTableByBranchBank(map);
+			
+			return JSONUtil.getJsonMap(200, true, "上传成功",null); //返回给前端一个map进行前段提示
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, "上传出现异常"+e.getMessage(),null); //返回给前端一个map进行前段提示
+		}
+	}
+	
+	
+	
+	/**
+	 * 
+	* @Title: queryBusinessDeclareInformation
+	* @Description: TODO(业务申报的查看,将所有信息返还给界面)
+	* @param @param data
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月19日 下午4:01:02
+	* @throws
+	 */
+	@RequestMapping(value="/queryBusinessDeclareInformation",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String,Object> queryBusinessDeclareInformation(@RequestBody String data){
+		
+		System.out.println("查询业务申请信息....");
+		Map<String, Object> map = JSONUtil.jsonToMap(data);		//将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
+		
+		PageDTO pageDto = businessDeclareService.queryBusinessDeclareInformation(map);
+		
+		return JSONUtil.getJsonMap(200, true, "操作成功", pageDto);
+	}
+	
+	/**
+	 * 
+	* @Title: queryBusinessDeclareInformation
+	* @Description: TODO(审核记录的查询,当用户点击查看按钮后,不仅显示了业务申报的信息,还显示了审核记录的信息,这里业务申报的信息直接从前端获取,审核记录根据前端提供的业务id号business_id来进行查询)
+	* 这个信息要去业务审核总表中去查询
+	* @param @param data
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月19日 下午7:46:44
+	* @throws
+	 */
+	@RequestMapping(value="/queryBusinessCheckInformation",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String,Object> queryBusinessCheckInformation(@RequestBody String data){
+		
+		System.out.println("查询业务审核总表信息....");
+		
+		Map<String, Object> map = JSONUtil.jsonToMap(data);		//将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
+		
+		List<BusinessCheck> businessCheckList = businessDeclareService.queryBusinessCheckInformation(map);
+		
+		return JSONUtil.getJsonMap(200, true, "操作成功", businessCheckList);
+	}
+	
+	
+	/**
+	 * 
+	* @Title: businessDeclareCheckedBy
+	* @Description: TODO(审核意见的提交)
+	* @param @param data	
+	* 数据包含organizationName:二级分行或省分行
+	* 		 checkPerson:审核人员
+	* 		 checkResult:结果放入check_result字段
+	* 		 checkOpinion:审核意见
+	* 		 businessId:业务id
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月19日 下午8:52:35
+	* @throws
+	 */
+	@RequestMapping(value="/businessDeclareCheckedBy",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String,Object> businessDeclareCheckedBy(@RequestBody String data){
+		
+		try {
+			System.out.println("添加到业务审核总表信息....");
+			
+			Map<String, Object> map = JSONUtil.jsonToMap(data);		//将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
+			
+			businessDeclareService.businessDeclareCheckedBy(map);
+			
+			return JSONUtil.getJsonMap(200, true, "增加审核意见成功", null);
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, "增加审核意见失败", null);
+		}
+	}
+	
+	
+	
+	                 
+	
+	/**
+	 * 
+	* @Title: uploadContractByProvincialBranchBank
+	* @Description: TODO(省分行业务部门上传合同的功能实现)
+	* 	前端需要传递过来的数据(以表单形式)有以下几个:contract:合同文件
+	* 											businessId:业务id号
+	* 											
+	* 
+	* @param @param file
+	* @param @param request
+	* @param @param businessId
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月20日 下午4:21:51
+	* @throws
+	 */
+	@RequestMapping(value="/uploadContractByProvincialBranchBank",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> uploadContractByProvincialBranchBank(@RequestParam("contract") MultipartFile file,HttpServletRequest request,
+			@RequestParam("businessId") String businessId) {
+		try {
+			String path = request.getServletContext().getRealPath("")+SP+"content";			//SP是系统分隔符	
+			File dir=new File(path);
+			if(!dir.exists()){
+				dir.mkdirs();
+			}
+			
+			Map<String, Object> map =new LinkedHashMap<String, Object>();		//这个map用于存储所有要去service的数据
+			map.put("businessId", businessId);					//将业务id先写死,到时候还要再进行修改。。。。。TODO
+			map.put("contractParty", "建行省分行&信托公司");	//合同的签约方。。。。。。。。。。。。。。。。。TODO。。。。。。。。。。。。。。。【这里先写死,可能通过上传的合同文件获取签约方的信息】
+			map.put("uploadDepartment", "省分行业务部门");	//上传部门。。。。。。。。。。。。。。。。。。。TODO。。。。。。。【这里先写死,到底是通过session获取还是通过客户端传过来获取?】
+			map.put("uploadPerson", "张三丰");				//上传人员。。。。。。。。。。。。。。。。。。。TODO。。。。。。。【这里先写死,到底如何获取上传人的姓名????】
+			
+			
+			String filename = file.getOriginalFilename();
+			String pathFile = path+SP+filename;
+			File newFile = new File(pathFile);
+			file.transferTo(newFile);											//将---合同---文件上传到制定的文件夹下,目前这个文件夹路径是写死的	
+			
+			map.put("contractId", "800001");									//将合同的id先写死,和attachment表中表id一致
+			map.put("contractName",filename);									//合同名称,用于存在attachment中的附件名
+			map.put("url", "/content/"+filename);								//将文件下载路径url通过map传到service层进行校验
+			map.put("hash", "to be calculated from file on server");			//文件hash值先写死,到时候需要从服务器上的文件获取
+			
+			map.put("userId", "900000011");											//先将上传人的id号写死,到时候需要动态获取这个信息。。。TODO
+			
+			businessDeclareService.uploadContractByProvincialBranchBank(map);	//将合同信息插入到【合同提交记录表contract_record、合同状态跟踪表contract_status_tracking、附件表attachment】
+			
+			return JSONUtil.getJsonMap(200, true, "合同上传成功", null);
+		}catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, "合同上传失败:"+e.getMessage(), null);
+		}
+	}
+			
+	
+	
+	/**
+	* @Title: download
+	* @Description: TODO(实现所有上传的文件的下载功能)
+	* @param @param request
+	* @param @param response
+	* @param @param url
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月21日 下午2:05:13
+	* @throws
+	 */
+	@RequestMapping(value="/downloadBusinessDeclareFiles")
+	@ResponseBody
+	public Map<String, Object> download(HttpServletRequest request,HttpServletResponse response,@RequestParam("url") String url) {
+		try {
+			String fileName = request.getServletContext().getRealPath("")+url; 		//SP是系统分隔符
+			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);    
+			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();
+			bis.close();
+			return JSONUtil.getJsonMap(200, true, "下载成功",null); //返回给前端一个map进行前段提示
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, true, "下载出现异常",null); //返回给前端一个map进行前段提示
+		}
+	}
+	
+	
+	
+	/**
+	 * 上传文件功能模块
+	 * @param files
+	 * @param request
+	 * @return
+	 * @throws IllegalStateException
+	 * @throws IOException
+	 */
+	/*
+	@RequestMapping(value="/upload",method=RequestMethod.POST)
+	@ResponseBody
+	public String upload(@RequestParam("file") MultipartFile[] files,HttpServletRequest request) throws IllegalStateException, IOException{
+		String path = request.getSession().getServletContext().getRealPath("content");
+		File dir=new File(path);
+		if(!dir.exists()){
+			dir.mkdirs();
+		}
+		for (MultipartFile file : files) {
+			String filename = file.getOriginalFilename();
+			String pathFile=path+"/"+filename;
+			File newFile=new File(pathFile);
+			file.transferTo(newFile);
+		}
+		
+		return "upload success";
+	}
+	*/
+	
+	/**
+	 * 文件下载功能
+	 * @param request
+	 * @param response
+	 * @throws IOException
+	 */
+	/*
+	@RequestMapping(value="/download")
+	public void download(HttpServletRequest request,HttpServletResponse response) throws IOException{
+		String fileName = request.getSession().getServletContext().getRealPath("content")+"/"+"demo.sql";
+		InputStream bis = new BufferedInputStream(new FileInputStream(new File(fileName)));  
+        
+        String filename = "下载文件.jpg";  
+        
+        filename = URLEncoder.encode(filename,"UTF-8");
+        
+        response.addHeader("Content-Disposition", "attachment;filename=" + filename);    
+            
+        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();
+        bis.close();
+	}
+	*/
+	
+	
+	/**
+	 * 
+	* @Title: download
+	* @Description: TODO(文件下载的另一种方法)
+	* @param @param request
+	* @param @return
+	* @param @throws IOException    设定文件
+	* @return ResponseEntity<byte[]>    返回类型
+	* @author ylx
+	* @date 2017年12月19日 上午10:21:33
+	* @throws
+	 */
+	/*
+	@RequestMapping(value = "/download2",produces = "application/octet-stream;charset=UTF-8")
+    public ResponseEntity<byte[]> download(HttpServletRequest request) throws IOException {
+//        指定文件,必须是绝对路径
+    File file = new File(request.getSession().getServletContext().getRealPath("content")+"/"+"demo.sql");
+//        下载浏览器响应的那个文件名
+    String dfileName = URLEncoder.encode("下载文件.jpg","UTF-8");;
+//        下面开始设置HttpHeaders,使得浏览器响应下载
+    HttpHeaders headers = new HttpHeaders();
+//        设置响应方式
+    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
+//        设置响应文件
+    headers.setContentDispositionFormData("attachment", dfileName);
+//        把文件以二进制形式写回
+    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file), headers, HttpStatus.CREATED);
+}
+    */
+	
+	
+}

+ 81 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/OperationHistoryAction.java

@@ -0,0 +1,81 @@
+package com.fuzamei.web;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Scanner;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+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.OperationHistoryService;
+import com.fuzamei.utils.JSONUtil;
+import com.fuzamei.utils.PageDTO;
+
+
+@Controller
+@RequestMapping("/operation_history")
+public class OperationHistoryAction {
+
+	@Autowired
+	private OperationHistoryService operationHistoryService;
+	
+	/**
+	 * 
+	* @Title: queryOperationHistoryInformation
+	* @Description: TODO(查询操作记录信息....)
+	* @param @param data--前台传递过来的application/json数据
+	* 				传递过来的参数json格式为:
+					{
+						"page":"1",			
+						"account":"",
+						"role":"",
+						"type":"",
+						"startTime":"",
+						"endTime":""
+					}
+	* @param @return    返回json格式
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月14日 下午5:12:17
+	* @throws
+	 */
+	@RequestMapping(value="/queryOperationHistoryInformation",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String,Object> queryOperationHistoryInformation(@RequestBody String data){
+		
+		System.out.println("查询操作记录信息....");
+		
+		Map<String, Object> map = JSONUtil.jsonToMap(data);		//将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
+		
+		PageDTO pageDto = operationHistoryService.queryOperationHistoryInformation(map);
+		
+		return JSONUtil.getJsonMap(200, true, "操作成功", pageDto);
+	}
+	
+	
+	
+	/*//算数据库中bigint的时间用的
+	public static void main(String[] args) throws ParseException {
+		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
+		Scanner scan=new Scanner(System.in);
+		while(true){
+		String str=scan.next();
+		Date parse = sdf.parse(str);
+		System.out.println(parse.getTime());
+		}
+		
+	}*/
+	
+	/*public static void main(String[] args) {
+		System.out.println(Long.MAX_VALUE);
+		System.out.println(Integer.parseInt("1.1"));
+	}*/
+}

+ 185 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/ProjectFileAction.java

@@ -0,0 +1,185 @@
+package com.fuzamei.web;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+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.web.bind.annotation.PathVariable;
+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.ProjectFileService;
+import com.fuzamei.utils.JSONUtil;
+import com.fuzamei.utils.PageDTO;
+
+@Controller
+@RequestMapping("/project_file")
+public class ProjectFileAction {
+
+	@Autowired
+	private ProjectFileService projectFileService;
+
+	private static final String SP = File.separator;
+	/**
+	 * 
+	 * @Title: queryProjectFile 
+	 * @Description:------------>>>>>>点击项目文档模块按钮的时候显示的分页信息&通过项目名称和时间区域的条件进行查询后显示的分页信息
+	 * TODO(获取项目文档信息,用于展示项目文档基本信息展示) 
+	 * 			以下为前端传递过来的参数
+				 {
+					"page":"1",
+					"projectName":"",
+					"startTime":"",
+					"endTime":""
+				}
+	 * @param 
+	 * @param data 
+	 * @param @return
+	 * 设定文件 @return Map<String,Object> 返回类型
+	 * @author ylx 
+	 * @date 2017年12月15日下午1:24:40
+	 */
+	@RequestMapping(value = "/queryProjectFileInformation")
+	@ResponseBody
+	public Map<String, Object> queryProjectFileInformation(@RequestBody String data) {
+
+		System.out.println("查询项目文档记录信息....");
+
+		Map<String, Object> map = JSONUtil.jsonToMap(data);
+
+		PageDTO pageDto = projectFileService.queryProjectFileInformation(map); // 将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
+
+		return JSONUtil.getJsonMap(200, true, "操作成功", pageDto);
+	}
+	
+	/**
+	 * 
+	* @Title: checkoutProjectFiles
+	* @Description: TODO--------------->>显示下载文件的提示框
+	* @param @param data
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月15日 下午8:09:44
+	* @throws
+	 */
+	@RequestMapping(value = "/checkoutProjectFiles")
+	@ResponseBody
+	public Map<String, Object> checkoutProjectFiles(@RequestBody String data){
+		
+		System.out.println("项目文档查看....");
+		
+		Map<String, Object> map = JSONUtil.jsonToMap(data);	// 将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
+		
+		Map<String, Object> mapFromService = projectFileService.checkoutProjectFiles(map); //由于这里不需要分页,只要service传过来一个map对象即可
+		
+		return JSONUtil.getJsonMap(200, true, "操作成功", mapFromService); //将从service返回回来的map对象通过map对象直接返回给前端
+	}
+	
+	/**
+	 * 
+	* @Title: download
+	* @Description: TODO(项目文档中的文件下载功能实现)
+	* @param @param request
+	* @param @param response
+	* @param @param url    设定文件
+	* @return void    返回类型
+	* @author ylx
+	* @date 2017年12月15日 下午6:03:53
+	* @throws
+	 */
+	@RequestMapping(value="/downloadProjectFile")
+	@ResponseBody
+	public Map<String, Object> download(HttpServletRequest request,HttpServletResponse response,@RequestParam("url") String url) {
+		try {
+			String fileName = request.getServletContext().getRealPath("")+url;  		//SP是系统分隔符
+			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);    
+			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();
+			bis.close();
+			return JSONUtil.getJsonMap(200, true, "下载成功",null); //返回给前端一个map进行前段提示
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, "下载出现异常:"+e.getMessage(),null); //返回给前端一个map进行前段提示
+		}
+	}
+	
+	/**
+	 * 
+	* @Title: showUploadProjectFileInterface
+	* @Description: TODO------------->>显示项目文档上传的界面
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月15日 下午8:11:09
+	* @throws
+	 */
+	/*@RequestMapping(value = "/showUploadProjectFileInterface")
+	@ResponseBody
+	public Map<String, Object> showUploadProjectFileInterface(){
+		
+	}*/
+	
+	@RequestMapping(value="/uploadProjetcFile",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> upload(@RequestParam("file") MultipartFile file,HttpServletRequest request,@RequestParam("projectId") String projectId,@RequestParam("projectName") String projectName ) {
+		
+//		Map<String, Object> map = JSONUtil.jsonToMap(data);	// 将前端传过来的json数据转化为map对象,并将map对象传入service层进行数据校验
+		
+		try {
+			String path = request.getServletContext().getRealPath("")+SP+"content";			//SP是系统分隔符	
+			File dir=new File(path);
+			if(!dir.exists()){
+				dir.mkdirs();
+			}
+			
+			String filename = file.getOriginalFilename();
+			String pathFile=path+SP+filename;
+			File newFile=new File(pathFile);
+			file.transferTo(newFile);
+			
+			Map<String, Object> map =new LinkedHashMap<String, Object>();
+			
+			map.put("projectId", projectId);
+			map.put("projectName", projectName);
+			map.put("url", "/content/"+filename);		//将文件下载路径url通过map传到service层进行校验
+			map.put("attachmentName", filename);			//将文件以附件名的形式通过map传递到service层中进行校验
+			
+			projectFileService.insertInformationIntoTable(map);		//将获取到的数据插入到表中
+			
+			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); //返回给前端一个map进行前段提示
+			return mapResult;
+		}
+		
+	}
+	
+}

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

@@ -0,0 +1,201 @@
+package com.fuzamei.web;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+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.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.ValuationAccountingService;
+import com.fuzamei.utils.JSONUtil;
+import com.fuzamei.utils.MapUtil;
+import com.fuzamei.utils.PageDTO;
+
+/**
+ * 估值核算模块实现
+ * @author ylx
+ *
+ */
+@Controller
+@RequestMapping("valuation_accounting")
+public class ValuationAccountingAction {
+
+	@Autowired
+	private ValuationAccountingService valuationAccountingService;
+	
+	private static final String SP = File.separator;	//系统分隔符,随操作系统而决定
+	
+	/**
+	 * 
+	* @Title: queryOperationHistoryInformation
+	* @Description: TODO(估值核算的查询结果,包括所有的查询条件也包括进去了)
+	* @param @param data
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月18日 下午3:17:30
+	* @throws
+	 */
+	@RequestMapping(value="/queryValuationAccountingInformation",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String,Object> queryOperationHistoryInformation(@RequestBody String data){
+		
+		System.out.println("查询估值核算数据");
+		
+		Map<String, Object> map = JSONUtil.jsonToMap(data);
+		
+		PageDTO pageDto = valuationAccountingService.queryValuationAccountingInformation(map);
+		
+		return JSONUtil.getJsonMap(200, true, "查询成功", pageDto);
+	}
+	
+	/**
+	 * 
+	* @Title: download
+	* @Description: TODO(估值核算界面,下载功能实现)
+	* @param @param request
+	* @param @param response
+	* @param @param url
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月18日 下午5:26:46
+	* @throws
+	 */
+	@RequestMapping(value="/downloadValuationPOI")
+	@ResponseBody
+	public Map<String, Object> download(HttpServletRequest request,HttpServletResponse response,@RequestParam("url") String url) {
+		try {
+			String fileName = request.getServletContext().getRealPath("")+url;  		//SP是系统分隔符
+			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);    
+			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();
+			bis.close();
+			return JSONUtil.getJsonMap(200, true, "下载成功",null); //返回给前端一个map进行前段提示
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, "下载出现异常:"+e.getMessage(),null); //返回给前端一个map进行前段提示
+		}
+	}
+	
+	/**
+	 * 
+	* @Title: upload
+	* @Description: TODO(实现管理员估值核算的报表文件上传功能---------->>暂时按照一次上传一个文件进行实现)
+	* 
+	* 如果是管理岗的人员进行上传,则是创建一条新的数据进数据库,同时在附件表中插入一条新的数据
+	* 
+	* @param @param file
+	* @param @param request
+	* @param @param fundId 			基金id号,前端随机生成?????还是说后台生成????TODO
+	* @param @param fundName		基金名称,客户端手动输入生成并传输过来
+	* @param @param assets			托管资产,客户端手动输入生成并传输过来
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月18日 下午5:29:38
+	* @throws
+	 */
+	@RequestMapping(value="/uploadValuationPOIByAdmin",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> uploadValuationPOIByAdmin(@RequestParam("file") MultipartFile file,HttpServletRequest request,@RequestParam("fundId") String fundId,@RequestParam("fundName") String fundName, @RequestParam("assets") String assets ) {
+		try {
+			String path = request.getServletContext().getRealPath("")+SP+"content";			//SP是系统分隔符	
+			File dir=new File(path);
+			if(!dir.exists()){
+				dir.mkdirs();
+			}
+			
+			String filename = file.getOriginalFilename();
+			String pathFile=path+SP+filename;
+			File newFile=new File(pathFile);
+			file.transferTo(newFile);
+			
+			Map<String, Object> map =new LinkedHashMap<String, Object>();
+			map.put("fundId", fundId);
+			map.put("fundName", fundName);
+			map.put("assets", assets);
+			map.put("url", "/content/"+filename);		//将文件下载路径url通过map传到service层进行校验
+			map.put("attachmentName", filename);			//将文件以附件名的形式通过map传递到service层中进行校验
+			
+			//这里是以管理岗的身份进行插入的,注意银行的估值报表暂时先不插入数据
+			valuationAccountingService.insertInformationIntoTableByAdmin(map);		//将获取到的数据插入到表中
+			
+			return JSONUtil.getJsonMap(200, true, "上传成功",null); //返回给前端一个map进行前段提示
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, "上传出现异常"+e.getMessage(),null); //返回给前端一个map进行前段提示
+		}
+	}
+	
+	/**
+	 * 
+	* @Title: upload
+	* @Description: TODO(实现银行估值核算的报表文件上传功能---------->>暂时按照一次上传一个文件进行实现)
+	* @param @param file
+	* @param @param request
+	* @param @param fundId
+	* @param @param fundName
+	* @param @param assets
+	* @param @return    设定文件
+	* @return Map<String,Object>    返回类型
+	* @author ylx
+	* @date 2017年12月18日 下午8:17:47
+	* @throws
+	 */
+	@RequestMapping(value="/uploadValuationPOIByBank",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> uploadValuationPOIByBank(@RequestParam("file") MultipartFile file,HttpServletRequest request,@RequestParam("fundId") String fundId,@RequestParam("fundName") String fundName, @RequestParam("assets") String assets ) {
+		try {
+			String path = request.getServletContext().getRealPath("")+SP+"content";			//SP是系统分隔符	
+			File dir=new File(path);
+			if(!dir.exists()){
+				dir.mkdirs();
+			}
+			String filename = file.getOriginalFilename();
+			String pathFile=path+SP+filename;
+			File newFile=new File(pathFile);
+			file.transferTo(newFile);					//这里已经完成银行估值文件的上传,后续需要对该文件和管理岗上传文件中的报价信息进行比对,在Service层中进行校验
+			
+			Map<String, Object> map =new LinkedHashMap<String, Object>();
+			map.put("fundId", fundId);
+			map.put("fundName", fundName);
+			map.put("assets", assets);
+			map.put("url", "/content/"+filename);		//将文件下载路径url通过map传到service层进行校验
+			map.put("attachmentName", filename);			//将文件以附件名的形式通过map传递到service层中进行校验
+			
+			//这里是以银行的身份将数据进行更新
+			valuationAccountingService.updateInformationByBank(map);		//将获取到的数据更新到已有的估值核算表中,这个表是由管理岗创建的
+			
+			return JSONUtil.getJsonMap(200, true, "上传成功",null); //返回给前端一个map进行前段提示
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, "上传出现异常"+e.getMessage(),null); //返回给前端一个map进行前段提示
+		}
+	}
+	
+	
+}