ylx 7 years ago
parent
commit
e36d344adc

+ 2 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/dao/AttachmentDao.java

@@ -1,9 +1,11 @@
 package com.fuzamei.dao;
 
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
 
 import com.fuzamei.mapperInterface.AttachmentMapper;
 
+@Repository
 public class AttachmentDao {
 	
 	@Autowired

+ 28 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/entity/UserDetail.java

@@ -14,6 +14,34 @@ public class UserDetail {
 	private String person_name;					//人员名称
 	private List<String> role_name;				//角色名称
 	private List<String> authority_name;		//权限名称
+	private Double account_balance;				//账户余额
+	private String drawing_account;				//划款账户
+	private Long create_time;					//账户创建时间
+	private Long update_time;					//账户修改时间
+	public Double getAccount_balance() {
+		return account_balance;
+	}
+	public void setAccount_balance(Double account_balance) {
+		this.account_balance = account_balance;
+	}
+	public String getDrawing_account() {
+		return drawing_account;
+	}
+	public void setDrawing_account(String drawing_account) {
+		this.drawing_account = drawing_account;
+	}
+	public Long getCreate_time() {
+		return create_time;
+	}
+	public void setCreate_time(Long create_time) {
+		this.create_time = create_time;
+	}
+	public Long getUpdate_time() {
+		return update_time;
+	}
+	public void setUpdate_time(Long update_time) {
+		this.update_time = update_time;
+	}
 	public Integer getId() {
 		return id;
 	}

+ 20 - 0
ccb_fund_trusteeship/src/main/java/com/fuzamei/mapper/UserAuthoricationMapper.xml

@@ -72,6 +72,10 @@
 			temp.random,
 			temp.public_key,
 			temp.private_key,
+			temp.account_balance,
+			temp.drawing_account,
+			temp.create_time,
+			temp.update_time,
 			temp.organization_name,
 			temp.person_name,
 			temp.role_name,
@@ -85,6 +89,10 @@
 				temp.random,
 				temp.public_key,
 				temp.private_key,
+				temp.account_balance,
+				temp.drawing_account,
+				temp.create_time,
+				temp.update_time,
 				temp.organization_name,
 				temp.person_name,
 				temp.role_id,
@@ -99,6 +107,10 @@
 					temp.random,
 					temp.public_key,
 					temp.private_key,
+					temp.account_balance,
+					temp.drawing_account,
+					temp.create_time,
+					temp.update_time,
 					temp.organization_name,
 					temp.person_name,
 					temp.role_id,
@@ -114,6 +126,10 @@
 						temp.private_key,
 						temp.organization_name,
 						temp.person_name,
+						temp.account_balance,
+						temp.drawing_account,
+						temp.create_time,
+						temp.update_time,
 						user_role.role_id
 					from
 						(select 
@@ -124,6 +140,10 @@
 							random,
 							public_key,
 							private_key,
+							account_balance,
+							drawing_account,
+							create_time,
+							update_time,
 							organization_name,
 							person_name
 						from 

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

@@ -244,7 +244,7 @@ public class ValuationAccountingService {
 			fundId=(int)(Math.random()*1000000000);								//=========================>>>产生基金id号的机制要改的TODO
 			same = valuationAccountingDao.queryIfHasTheSameFundId(fundId);
 		}
-		Map<String, Object> mapToClient = new LinkedHashMap<>();
+		Map<String, Object> mapToClient = new LinkedHashMap<String, Object>();
 		mapToClient.put("fundId", fundId);
 		return mapToClient;
 	}

+ 5 - 1
ccb_fund_trusteeship/src/main/java/com/fuzamei/web/ProjectFileAction.java

@@ -256,7 +256,7 @@ public class ProjectFileAction {
 			String filename = file.getOriginalFilename();									//filename是上传文件的真实文件名
 			String pathFile=path+SP+filename;												//pathFile是该文件在系统中的绝对路径
 			File newFile=new File(pathFile);
-			file.transferTo(newFile);														//文件已经上传成功
+			
 			String fileHash = HashXiZhiUtil.getMD5Checksum(filename);						//文件上传后计算文件的hash值=============>>换hash算法这里直接换掉即可TODO			
 			Map<String, Object> mapToService =new LinkedHashMap<String, Object>();
 			mapToService.put("userDetail", userDetail);				//将用户的信息传入
@@ -266,6 +266,10 @@ public class ProjectFileAction {
 			mapToService.put("attachmentName", filename);			//将文件以附件名的形式通过map传递到service层中进行校验
 			mapToService.put("hash", fileHash);						//将上传的文件hash值放入map
 			projectFileService.insertInformationIntoTable(mapToService);		//将获取到的数据插入到各类表中
+			
+			//文件最后上传,防止出现垃圾数据
+			file.transferTo(newFile);														//文件已经上传成功
+			
 			Map<String, Object> mapResult = JSONUtil.getJsonMap(200, true, HintMSG.UPLOAD_SUCCESS,null); //返回给前端一个map进行前段提示
 			return mapResult;
 		} catch (Exception e) {

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

@@ -44,7 +44,7 @@ import com.fuzamei.utils.ValidationUtil;
  *
  */
 @Controller
-@RequestMapping("valuation_accounting")
+@RequestMapping("/valuation_accounting")
 public class ValuationAccountingAction {
 
 	@Autowired
@@ -233,10 +233,14 @@ public class ValuationAccountingAction {
 	* @ Attention: 首次上传,所以大部分的信息可以写死
 	* 				首次创建基金id号要生成,基金名,托管资产都要从用户这里获取
 	* 				传过来的参数以表单形式提交
+	* 
+	* 
 	* @param @param userId			用户id号
 	* @param @param fundId 			基金id号,前端随机生成?????还是说后台生成????================================>暂时通过打开估值核算弹框自动生成TODO
 	* @param @param fundName		基金名称,客户端手动输入生成并传输过来
 	* @param @param assets			托管资产,客户端手动输入生成并传输过来
+	* 
+	* 
 	* @param @return    设定文件
 	* @return Map<String,Object>    返回类型
 	* @author ylx
@@ -295,10 +299,13 @@ public class ValuationAccountingAction {
 	 * 
 	* @Title: upload
 	* @Description: TODO(实现银行估值核算的报表文件上传功能---------->>暂时按照一次上传一个文件进行实现)
+	* 
+	* 上传的时候以表单的形式传过来
 	* @param @param file
 	* @param @param fundId
 	* @param @param fundName
 	* @param @param userId
+	* 
 	* @param @return    这里上传人有可能是银行也有可能是管理岗的人,这里要进行校验
 	* @return Map<String,Object>    返回类型
 	* @author ylx
@@ -472,6 +479,17 @@ public class ValuationAccountingAction {
 		}
 	}
 
-
+	@RequestMapping(value="/test",method=RequestMethod.POST)
+	@ResponseBody
+	public Map<String, Object> test(@RequestBody String data){
+		try {
+			Map map= JSON.parseObject(data, Map.class);
+			int userId=ValidationUtil.checkAndAssignInt(map.get("userId"));
+			UserDetail userDetail = userAuthoricationService.checkUserAuthority(userId,Role.ADMIN,Role.ACCOUNTING_POS_OF_TBC);	//查看用户非空和权限(管理员创建并上传的权限)
+			return JSONUtil.getJsonMap(200, true, HintMSG.UPLOAD_SUCCESS,userDetail); //返回给前端一个成功提示
+		} catch (Exception e) {
+			return JSONUtil.getJsonMap(500, false, HintMSG.UPLOAD_FAIL+":"+e.getMessage(),null); //返回给前端一个map进行前段提示
+		}
+	}
 
 }