ylx 7 jaren geleden
bovenliggende
commit
bd5b926a39

+ 1 - 1
ccb_fund_trusteeship/src/main/java/com/fuzamei/constant/Role.java

@@ -34,5 +34,5 @@ public class Role {
 	public static final String VENTURE_MANAGEMENT_POS = "风管岗";
 	public static final String OTHER_POS = "其余岗";
 	public static final String INNERS_OF_BANK = "银行内部人员";
-	
+	public static final String AUDITOR = "总审计";
 }

+ 4 - 2
ccb_fund_trusteeship/src/main/java/com/fuzamei/service/ProjectFileService.java

@@ -24,6 +24,8 @@ public class ProjectFileService {
 	@Autowired
 	private UserAuthoricationService userAuthoricationService;
 
+	@Autowired
+	private AttachmentService attachmentService;
 	/**
 	 * 
 	* @Title: queryProjectFileInformation
@@ -84,13 +86,13 @@ public class ProjectFileService {
 	@Transactional(rollbackFor=Exception.class)
 	public void insertInformationIntoTable(Map<String, Object> map) {
 		long currentTime = System.currentTimeMillis();										//获取当前时间
-		int attachmentId = (Integer)(int)(Math.random()*1000000);							//附件id不能用随机数,这里到时候要改的================>>待定TODO
+		int attachmentId = attachmentService.generateAtachmentId();							//附件id写活♥
 		UserDetail userDetail = (UserDetail) map.get("userDetail");							//获取controller传过来的UserDetail对象
 		//将数据封装到mapToDaoForProjectFile,并插入【项目文档表】
 		Map<String, Object> mapToDaoForProjectFile = new LinkedHashMap<String,Object>();
 		mapToDaoForProjectFile.put("projectId", map.get("projectId"));
 		mapToDaoForProjectFile.put("projectName", map.get("projectName"));
-		mapToDaoForProjectFile.put("attachmentId", attachmentId);							//附件id不能用随机数,这里到时候要改的================>>待定TODO
+		mapToDaoForProjectFile.put("attachmentId", attachmentId);							//附件id不能用随机数,这里到时候要改的
 		mapToDaoForProjectFile.put("updateTime", currentTime);								//上传文件的更新时间为当前时间
 		mapToDaoForProjectFile.put("hash", map.get("hash"));								//将算好的hash值放入mapToDaoForProjectFile中
 		projectFileDao.insertInformationIntoTable(mapToDaoForProjectFile);					//将以上的数据直接添加到数据库中【项目文档表】去