ylx hace 7 años
padre
commit
4eb2ca8109

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

@@ -51,4 +51,16 @@ public class ValuationAccountingDao {
 		return valuationAccountingMapper.checkIfFundExists(fundId,fundName);
 	}
 
+	public void updateInformationByAdmin(Map<String, Object> map) {
+		valuationAccountingMapper.updateInformationByAdmin(map);
+	}
+
+	public void updateAttachmentInformationByAdmin(Map<String, Object> map) {
+		valuationAccountingMapper.updateAttachmentInformationByAdmin(map);
+	}
+
+	public void updateAttachmentInformationByBank(Map<String, Object> map) {
+		valuationAccountingMapper.updateAttachmentInformationByBank(map);
+	}
+
 }

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

@@ -10,6 +10,8 @@ public class ValuationAccount {
 	private Long update_time;					//文件更新时间。。。。。暂时理解为文件创建时间????
 	private String battle_result;				//比对结果
 	
+	private Integer attachment_id_of_custodian;				//管理员上传的附件id号
+	private Integer attachment_id_of_bank;					//银行上传的附件id号
 	
 	private String attachment_name_of_custodian;				//附件名称--------->>管理人估值报表名称
 	private String attachment_name_of_bank;				//附件名称----------->>银行估值报表名称
@@ -23,6 +25,23 @@ public class ValuationAccount {
 	public Integer getFund_id() {
 		return fund_id;
 	}
+	
+	public Integer getAttachment_id_of_custodian() {
+		return attachment_id_of_custodian;
+	}
+
+	public void setAttachment_id_of_custodian(Integer attachment_id_of_custodian) {
+		this.attachment_id_of_custodian = attachment_id_of_custodian;
+	}
+
+	public Integer getAttachment_id_of_bank() {
+		return attachment_id_of_bank;
+	}
+
+	public void setAttachment_id_of_bank(Integer attachment_id_of_bank) {
+		this.attachment_id_of_bank = attachment_id_of_bank;
+	}
+
 	public void setFund_id(Integer fund_id) {
 		this.fund_id = fund_id;
 	}

+ 39 - 1
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/ValuationAccountingMapper.xml

@@ -170,6 +170,8 @@
 			temp.fund_id,
 			temp.fund_name,
 			temp.assets_under_custody,
+			temp.custodian_valuation_id attachment_id_of_custodian,
+			temp.bank_valuation_id attachment_id_of_bank,
 			temp.attachment_name attachment_name_of_custodian,
 			att.attachment_name attachment_name_of_bank,
 			temp.url url_of_custodian,
@@ -198,7 +200,43 @@
 			temp.bank_valuation_id = att.attachment_id
 		where
 			temp.fund_name=#{fundName} and temp.fund_id=#{fundId}
-
 	</select>
 	
+	<!-- 管理员再次上传估值文件时修改总表中的信息 -->
+	<update id="updateInformationByAdmin">
+		update
+			valuation_accounting
+		set 
+			update_time=#{updateTime},
+			battle_result=#{battleResult}
+		where 
+			fund_id=#{fundId}
+	</update>
+	
+	<!-- 管理人修改附件信息 -->
+	<update id="updateAttachmentInformationByAdmin">
+		update
+			attachment
+		set 
+			attachment_name=#{attachmentName},
+			url=#{url},
+			upload_person_id=#{userId},
+			create_time=#{addTime}
+		where 
+			attachment_id==#{attachmentId}
+	</update>
+	
+	<!-- 银行修改附件信息 -->
+	<update id="updateAttachmentInformationByBank">
+		update
+			attachment
+		set 
+			attachment_name=#{attachmentName},
+			url=#{url},
+			upload_person_id=#{userId},
+			create_time=#{addTime}
+		where 
+			attachment_id==#{attachmentId}
+	</update>
+	
 </mapper>

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

@@ -27,4 +27,10 @@ public interface ValuationAccountingMapper {
 
 	ValuationAccount checkIfFundExists(@Param("fundId") Integer fundId, @Param("fundName") String fundName);
 
+	void updateInformationByAdmin(Map<String, Object> map);
+
+	void updateAttachmentInformationByAdmin(Map<String, Object> map);
+
+	void updateAttachmentInformationByBank(Map<String, Object> map);
+
 }

+ 91 - 80
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/ValuationAccountingService.java

@@ -92,6 +92,54 @@ public class ValuationAccountingService {
 		mapToOperationHistory.put("hash", "来自前端token计算");									//如何计算操作的hash值?(按照上传的项目文件的hash值算)=====>>待定TODO
 		projectFileDao.insertOperationHistoryInformationToDao(mapToOperationHistory);   		//将操作记录信息插入到操作记录表中
 	}
+	
+	
+	
+	
+	/**
+	 * 
+	* @Title: updateInformationByAdmin
+	* @Description: TODO(以管理员的身份进行估值核算文件重新上传的操作)
+	* @param @param mapToService    设定文件
+	* @return void    返回类型
+	* @author ylx
+	* @date 2017年12月29日 上午10:08:47
+	* @throws
+	 */
+	@Transactional(rollbackFor=Exception.class)
+	public void updateInformationByAdmin(Map<String, Object> map) {
+		long currentTime=System.currentTimeMillis();	//获取当前时间
+		UserDetail userDetail = (UserDetail) map.get("userDetail");   //获取用户详细信息
+		Map<String, Object> mapToDaoForValuationAccounting = new LinkedHashMap<String,Object>();
+		mapToDaoForValuationAccounting.put("fundId", map.get("fundId"));
+		//管理员估值报表这个时候重新上传文件只需要把总表中的对账结果和更新时间改一下就可以了,附件id不用换
+		mapToDaoForValuationAccounting.put("updateTime", currentTime);			//上传文件的更新时间为当前时间
+		mapToDaoForValuationAccounting.put("battleResult", map.get("battleResult"));			//总表中需要改变的对账结果
+		valuationAccountingDao.updateInformationByAdmin(mapToDaoForValuationAccounting);			//将以上的数据更新到之前估值核算表
+		
+		
+		//将附件信息封装到mapToDaoForAttachment并传入数据库中
+		Map<String, Object> mapToDaoForAttachment = new LinkedHashMap<String,Object>();
+		mapToDaoForAttachment.put("attachmentId", map.get("attachmentId"));						//直接从前面的map中获取
+		mapToDaoForAttachment.put("url", map.get("url"));										//下载文件需要用到的url地址需要录入到附件表中
+		mapToDaoForAttachment.put("attachmentName", map.get("attachmentName"));					//附件名称要重新修改
+		mapToDaoForAttachment.put("userId", userDetail.getUser_id());							//用户id写活了,这个用户id也要改下♥
+		mapToDaoForAttachment.put("addTime", currentTime);									//这里添加的文件重新上传的时间,和项目文档更新时间一样
+		valuationAccountingDao.updateAttachmentInformationByAdmin(mapToDaoForAttachment);	//将以上的数据更新到附件表
+		
+		//此外,还要将上传估值核算表的这个操作信息插入到操作记录表中【】
+		Map<String, Object> mapToOperationHistory = new LinkedHashMap<String,Object>();
+		mapToOperationHistory.put("operatorTypeId", OperationTypeId.UPLOAD_VALUATION_CHECK);	//操作类型为【上传估值核算表】---1010
+		mapToOperationHistory.put("operatorAccount", userDetail.getAccount());					//操作账号写活了♥
+		mapToOperationHistory.put("operatorRole", Role.ADMIN);			//创建这个操作的角色只能是---管理人
+		mapToOperationHistory.put("operatorPerson", userDetail.getPerson_name());		//操作人写活了♥
+		mapToOperationHistory.put("operatorTime", currentTime);			//操作时间为当前操作时间
+		mapToOperationHistory.put("hash", "to be calculated from operation");			//如何计算操作的hash值????======================================>>待定TODO
+		valuationAccountingDao.insertOperationHistoryInformationToDao(mapToOperationHistory);//将操作记录信息插入到操作记录表中
+		
+	}
+	
+	
 
 	/**
 	 * 
@@ -105,95 +153,56 @@ public class ValuationAccountingService {
 	 */
 	@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("附件名称为空");
-		}
+		long currentTime=System.currentTimeMillis();
+		UserDetail userDetail = (UserDetail) map.get("userDetail");   //获取用户详细信息
+		Integer attachmentId = (Integer) map.get("attachmentId");
+		String battleResult = (String) map.get("battleResult");		//获取比对结果
 		
+		//更新估值核算表中的信息
 		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());			//上传文件的更新时间为当前时间
+		mapToDaoForValuationAccounting.put("fundId", map.get("fundId"));
+		mapToDaoForValuationAccounting.put("attachmentId", attachmentId);		//附件id已经写活♥===========>>id号生成机制到时候再改TODO
+		mapToDaoForValuationAccounting.put("updateTime", currentTime);			//上传文件的更新时间为当前时间
+		mapToDaoForValuationAccounting.put("battleResult", battleResult);			//总表中需要改变的对账结果
 		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"));		//这里添加的文件上传时间,和项目文档更新时间一样
+		//待对账银行是插入一个新数据
+		if(BattleResult.TO_BE_MATCHED.equals(battleResult)){
+			//将附件信息封装到mapToDaoForAttachment并传入数据库中
+			Map<String, Object> mapToDaoForAttachment = new LinkedHashMap<String,Object>();
+			mapToDaoForAttachment.put("attachmentId", attachmentId);						
+			mapToDaoForAttachment.put("url", map.get("url"));										//下载文件需要用到的url地址需要录入到附件表中
+			mapToDaoForAttachment.put("attachmentName", map.get("attachmentName"));					//附件名称需要录入
+			//用户id已经写活♥
+			mapToDaoForAttachment.put("userId", userDetail.getUser_id());							//用户id写活了♥
+			mapToDaoForAttachment.put("addTime", currentTime);										//这里添加的文件上传时间,和项目文档更新时间一样
+			valuationAccountingDao.insertInformationToAttachment(mapToDaoForAttachment);			//将以上的数据插入到附件表中
+		}
+		
+		//不一致说明银行要修改附件中的信息
+		if(BattleResult.INCONSISTENT.equals(battleResult)){
+			//将附件信息封装到mapToDaoForAttachment并传入数据库中
+			Map<String, Object> mapToDaoForAttachment = new LinkedHashMap<String,Object>();
+			mapToDaoForAttachment.put("attachmentId", attachmentId);						
+			mapToDaoForAttachment.put("url", map.get("url"));										//下载文件需要用到的url地址需要录入到附件表中
+			mapToDaoForAttachment.put("attachmentName", map.get("attachmentName"));					//附件名称需要录入
+			//用户id已经写活♥
+			mapToDaoForAttachment.put("userId", userDetail.getUser_id());							//用户id写活了♥
+			mapToDaoForAttachment.put("addTime", currentTime);										//这里添加的文件上传时间,和项目文档更新时间一样
+			valuationAccountingDao.updateAttachmentInformationByBank(mapToDaoForAttachment);		//将以上的数据插入到附件表中
+		}
+		
 		
 		
 		//此外,还要将业务申报的这个操作信息插入到操作记录表中【】
 		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值????
+		mapToOperationHistory.put("operatorTypeId", OperationTypeId.UPLOAD_VALUATION_CHECK);	//操作类型为【上传估值核算表】---1010
+		mapToOperationHistory.put("operatorAccount", userDetail.getAccount());					//操作账号写活了♥
+		mapToOperationHistory.put("operatorRole", Role.ACCOUNTING_POS_OF_TBC);					//创建这个操作的角色只能是---省分行托管分中心估值核算岗
+		mapToOperationHistory.put("operatorPerson", userDetail.getPerson_name());				//操作人写活了♥
+		mapToOperationHistory.put("operatorTime", currentTime);									//操作时间为当前操作时间
+		mapToOperationHistory.put("hash", "to be calculated from operation");					//如何计算操作的hash值????=========================>>TODO
 		valuationAccountingDao.insertOperationHistoryInformationToDao(mapToOperationHistory);//将操作记录信息插入到操作记录表中
 	}
 
@@ -276,6 +285,8 @@ public class ValuationAccountingService {
 		}
 		return valuationAccount;
 	}
+
+	
 	
 	
 	

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

@@ -307,7 +307,7 @@ public class ValuationAccountingAction {
 	 */
 	@RequestMapping(value="/uploadValuationPOIByBankOrByAdmin",method=RequestMethod.POST)
 	@ResponseBody
-	public Map<String, Object> uploadValuationPOIByBank(@RequestParam("file") MultipartFile file,HttpServletRequest request,
+	public Map<String, Object> uploadValuationPOIByBankOrByAdmin(@RequestParam("file") MultipartFile file,HttpServletRequest request,
 														@RequestParam("fundId") String fId,
 														@RequestParam("fundName") String fName, 
 														@RequestParam("userId") Object uId) {
@@ -338,7 +338,6 @@ public class ValuationAccountingAction {
 			if(BattleResult.CONSISTENT.equals(battleResult)){
 				throw new RuntimeException("对账结果一致,无法继续上传文件");
 			}
-			
 			//判断是否是管理岗
 			if(roleList.contains(Role.ADMIN)){
 				if(BattleResult.TO_BE_MATCHED.equals(battleResult)){
@@ -352,73 +351,127 @@ public class ValuationAccountingAction {
 				if(!oldFile.exists()){
 					throw new RuntimeException("之前上传的文件丢失");
 				}
-				oldFile.delete();
 				//切断旧路径,拼接成新路径
 				String custodianNewFilePath = custodianOldFilePath.substring(0, custodianOldFilePath.lastIndexOf("/")+1)+filename;
 				File newFile=new File(custodianNewFilePath);
-				file.transferTo(newFile);
 				
 				//再获取银行之前上传的文件路径
 				String bankFilePath = path+valuationAccount.getUrl_of_bank();
 				/*
+				 * 如过不是excel文件类型,导入也会报错,然后就把这个新上传的文件删了
 				 * 这里对两份文件进行估值报价的比对得出比对的结果是一致还是不一致
 				 */
 				//获取比对结果
 				String result = "????";
-				Map<String, Object> map =new LinkedHashMap<String, Object>();
-				map.put("fundId", fundId);
-				map.put("fundName", fundName);
-				map.put("url", "/content/"+filename);		//将文件下载路径url通过map传到service层进行校验
-				map.put("attachmentName", filename);			//将文件以附件名的形式通过map传递到service层中进行校验
-				map.put("battleResult", result);			//将文件比对结果封装进去
-				
+				Map<String, Object> mapToService =new LinkedHashMap<String, Object>();
+				mapToService.put("userDetail", userDetail);			//将用户的全部信息传入service层
+				mapToService.put("fundId", fundId);
+				mapToService.put("url", custodianNewFilePath);		//将文件下载路径url通过map传到service层进行校验
+				mapToService.put("attachmentName", filename);			//将文件以附件名的形式通过map传递到service层中进行校验
+				mapToService.put("battleResult", result);			//将文件比对结果封装进去
+				mapToService.put("attachmentId", valuationAccount.getAttachment_id_of_custodian());	//获取之前上传的附件id号在附件表中修改
+				valuationAccountingService.updateInformationByAdmin(mapToService);
 				
+				//文件的覆盖放到最后操作(重要!!!)
+				oldFile.delete();
+				file.transferTo(newFile);
 				
+				return JSONUtil.getJsonMap(200, true, HintMSG.UPLOAD_SUCCESS,null); //返回给前端一个成功提示
 			}
 			
-			
-			
 			//如果不是管理岗,那接下来的业务肯定是银行
 			//银行待对账操作
 			if(BattleResult.TO_BE_MATCHED.equals(battleResult)){
+				//待审核的状态说明文件是一个新的文件上传上去
+				
+				//先获取管理员之前上传的文件
+				String custodianOldFilePath = path+valuationAccount.getUrl_of_custodian();
+				//核查文件是否还在
+				File oldFile = new File(custodianOldFilePath);
+				if(!oldFile.exists()){
+					throw new RuntimeException("管理员上传的文件丢失");
+				}
+				//银行上传文件的新路径
+				String bankNewFilePath = path + SP + filename;								//=========================>>新上传的文件路径怎么确定到时候再说TODO
+				File newFile=new File(bankNewFilePath);
+				
+				/*
+				 * 如过不是excel文件类型,导入也会报错,然后就把这个新上传的文件删了
+				 * 这里对两份文件进行估值报价的比对得出比对的结果是一致还是不一致
+				 */
+				//获取比对结果
+				String result = "????";
+				
+				Integer attachmentId = attachmentService.generateAtachmentId();					//生成一个不重复的附件Id号==================>>生成id号的机制待定TODO
 				
+				Map<String, Object> mapToService =new LinkedHashMap<String, Object>();
+				mapToService.put("userDetail", userDetail);			//将用户的全部信息传入service层
+				mapToService.put("fundId", fundId);
+				mapToService.put("url", "/content/"+filename);		//将文件下载路径url通过map传到service层进行校验//=================>>新上传的文件路径怎么确定到时候再说TODO
+				mapToService.put("attachmentName", filename);		//将文件以附件名的形式通过map传递到service层中进行校验
+				mapToService.put("battleResult", result);			//将文件比对结果封装进去
+				mapToService.put("attachmentId", attachmentId);		
+				valuationAccountingService.updateInformationByBank(mapToService);
+				
+				//文件放到最后上传上去(重点!!!!)
+				file.transferTo(newFile);
+				
+				return JSONUtil.getJsonMap(200, true, HintMSG.UPLOAD_SUCCESS,null); //返回给前端一个成功提示
 			}
 			
-			
-			
 			//银行对账不一致操作
 			if(BattleResult.INCONSISTENT.equals(battleResult)){
+				//审核结果不一致的状态说明之前银行那边上传过一个文件,这次就要对之前的文件进行替换
 				
-			}
-			
-			
-			
-			Integer attachmentId = attachmentService.generateAtachmentId();					//生成一个不重复的附件Id号==================>>生成id号的机制待定TODO
-			
-			
-			
+				//先获取管理员之前上传的文件
+				String custodianOldFilePath = path+valuationAccount.getUrl_of_custodian();
+				//核查文件是否还在
+				File oldCustodianFile = new File(custodianOldFilePath);
+				if(!oldCustodianFile.exists()){
+					throw new RuntimeException("管理员之前上传的文件丢失");
+				}
+				//银行之前上传文件的路径
+				String banckOldFilePath = path + valuationAccount.getUrl_of_bank();
+				//核查文件是否还在
+				File oldBankFile = new File(banckOldFilePath);
+				if(!oldBankFile.exists()){
+					throw new RuntimeException("银行之前上传的文件丢失");
+				}
 				
+				//切断旧路径,拼接成新路径
+				String bankNewFilePath = banckOldFilePath.substring(0, banckOldFilePath.lastIndexOf("/")+1)+filename;
+				File newBankFile=new File(bankNewFilePath);
+				
+				/*
+				 * 如过不是excel文件类型,导入也会报错,然后就把这个新上传的文件删了(这里旧文件不能先删了)
+				 * 这里对两份文件进行估值报价的比对得出比对的结果是一致还是不一致
+				 */
+				//获取比对结果
+				String result = "????";
+				
+				Map<String, Object> mapToService =new LinkedHashMap<String, Object>();
+				mapToService.put("userDetail", userDetail);			//将用户的全部信息传入service层
+				mapToService.put("fundId", fundId);
+				mapToService.put("url", "/content/"+filename);		//将文件下载路径url通过map传到service层进行校验//=================>>新上传的文件路径怎么确定到时候再说TODO
+				mapToService.put("attachmentName", filename);		//将文件以附件名的形式通过map传递到service层中进行校验
+				mapToService.put("battleResult", result);			//将文件比对结果封装进去
+				mapToService.put("attachmentId", valuationAccount.getAttachment_id_of_bank());	//获取之前银行上传的附件id号	
+				valuationAccountingService.updateInformationByBank(mapToService);
+				
+				//文件覆盖的这个操作放到最后操做(很重要!!!)
+				oldBankFile.delete();
+				file.transferTo(newBankFile);
+				
+				return JSONUtil.getJsonMap(200, true, HintMSG.UPLOAD_SUCCESS,null); //返回给前端一个成功提示
+			}
 			
-			
-			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("url", "/content/"+filename);		//将文件下载路径url通过map传到service层进行校验
-			map.put("attachmentName", filename);			//将文件以附件名的形式通过map传递到service层中进行校验
-			
-			//这里是以银行的身份将数据进行更新
-			valuationAccountingService.updateInformationByBank(map);		//将获取到的数据更新到已有的估值核算表中,这个表是由管理岗创建的
-			return JSONUtil.getJsonMap(200, true, HintMSG.UPLOAD_SUCCESS,null); //返回给前端一个map进行前段提示
+			//能运行到这里肯定有问题
+			throw new RuntimeException("你是怎么运行到这里的");
 		} catch (Exception e) {
 			return JSONUtil.getJsonMap(500, false, HintMSG.UPLOAD_FAIL+":"+e.getMessage(),null); //返回给前端一个map进行前段提示
 		}
 	}
-	public static void main(String[] args) {
-		String str="sdasdhu/dhuasdahu";
-		System.out.println(str.substring(0, str.lastIndexOf("/")));
-	}
+
+
+
 }