|
@@ -14,9 +14,13 @@ import org.springframework.transaction.annotation.Isolation;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import com.fuzamei.constant.OperationTypeId;
|
|
|
+import com.fuzamei.constant.Role;
|
|
|
+import com.fuzamei.constant.StatusId;
|
|
|
import com.fuzamei.dao.BusinessDeclareDao;
|
|
|
import com.fuzamei.entity.BusinessCheck;
|
|
|
import com.fuzamei.entity.BusinessDeclare;
|
|
|
+import com.fuzamei.entity.UserDetail;
|
|
|
import com.fuzamei.utils.PageDTO;
|
|
|
|
|
|
@Service
|
|
@@ -39,225 +43,74 @@ public class BusinessDeclareService {
|
|
|
*/
|
|
|
@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为空");
|
|
|
- }
|
|
|
-
|
|
|
+ long currentTime = System.currentTimeMillis();//获取当前系统时间
|
|
|
+ UserDetail userDetail = (UserDetail) map.get("userDetail");//获取用户信息对象
|
|
|
+ //---------------------------------------------------------------------------------------------------------------
|
|
|
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值先写死,到时候要从文件中获取并计算出来
|
|
|
+ mapToDaoForBusinessDeclare.put("businessId", map.get("businessId")); //业务申报id
|
|
|
+ mapToDaoForBusinessDeclare.put("bank", map.get("bank")); //申报支行名称
|
|
|
+ mapToDaoForBusinessDeclare.put("businessName", map.get("businessName")); //业务名称
|
|
|
+ mapToDaoForBusinessDeclare.put("busineeApprovalId", map.get("busineeApprovalId")); //业务核准表id号
|
|
|
+ mapToDaoForBusinessDeclare.put("responsibleInvestigationId", map.get("responsibleInvestigationId"));//尽职调查报告id号
|
|
|
+ mapToDaoForBusinessDeclare.put("productApprovalId", map.get("productApprovalId")); //产品核准表id号
|
|
|
+ mapToDaoForBusinessDeclare.put("basicDataId", map.get("basicDataId")); //基础性资料id号
|
|
|
+ mapToDaoForBusinessDeclare.put("declareTime", currentTime); //申报时间以系统当前时间为准
|
|
|
+ mapToDaoForBusinessDeclare.put("statusId",StatusId.TO_BE_CHECKED_BY_SECONDARY_BRANCH_BANK); //刚刚申请的时候状态应该是【待二级分行审核】,这里以1表示,到时候可能还会进行修。。TODO
|
|
|
+ mapToDaoForBusinessDeclare.put("hash", "to be calaulated"); //hash值先写死=====================================================>>待定TODO
|
|
|
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")); //创建时间以插入业务申请表的时间为准
|
|
|
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
+ Map<String, Object> mapToDaoForAttachmentOfBusineeApproval = new LinkedHashMap<String,Object>(); //这个map是将数据插入【业务核准表】中
|
|
|
+ mapToDaoForAttachmentOfBusineeApproval.put("attachmentId", map.get("busineeApprovalId")); //业务核准表id号就是附件的id号
|
|
|
+ mapToDaoForAttachmentOfBusineeApproval.put("attachmentName", map.get("busineeApprovalName")); //业务核准表文件名就当是附件名
|
|
|
+ mapToDaoForAttachmentOfBusineeApproval.put("url", map.get("urlOfBusineeApproval")); //业务核准表的url地址就是附件url地址
|
|
|
+ mapToDaoForAttachmentOfBusineeApproval.put("userId", userDetail.getUser_id()); //上传人的id号写活♥
|
|
|
+ mapToDaoForAttachmentOfBusineeApproval.put("createTime", currentTime); //创建时间以插入业务申请表的时间为准
|
|
|
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")); //创建时间以插入尽职调查表的时间为准
|
|
|
+ mapToDaoForAttachmentOfResponsibleInvestigation.put("attachmentId", map.get("responsibleInvestigationId")); //尽职调查表id号就是附件的id号
|
|
|
+ mapToDaoForAttachmentOfResponsibleInvestigation.put("attachmentName", map.get("responsibleInvestigationName")); //尽职调查表文件名就当是附件名
|
|
|
+ mapToDaoForAttachmentOfResponsibleInvestigation.put("url", map.get("urlOfResponsibleInvestigation")); //尽职调查表的url地址就是附件url地址
|
|
|
+ mapToDaoForAttachmentOfResponsibleInvestigation.put("userId", userDetail.getUser_id()); //上传人的id号先写死,到时候还需要根据请求查询上传人的id号。。。。。。TODO
|
|
|
+ mapToDaoForAttachmentOfResponsibleInvestigation.put("createTime", currentTime); //创建时间以插入尽职调查表的时间为准
|
|
|
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")); //创建时间以插入产品核准表的时间为准
|
|
|
+ mapToDaoForAttachmentOfProductApproval.put("attachmentId", map.get("productApprovalId")); //产品核准表id号就是附件的id号
|
|
|
+ mapToDaoForAttachmentOfProductApproval.put("attachmentName", map.get("productApprovalName")); //产品核准表文件名就当是附件名
|
|
|
+ mapToDaoForAttachmentOfProductApproval.put("url", map.get("urlOfProductApproval")); //产品核准表的url地址就是附件url地址
|
|
|
+ mapToDaoForAttachmentOfProductApproval.put("userId", userDetail.getUser_id()); //上传人的id号先写死,到时候还需要根据请求查询上传人的id号。。。。。。TODO
|
|
|
+ mapToDaoForAttachmentOfProductApproval.put("createTime", currentTime); //创建时间以插入产品核准表的时间为准
|
|
|
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")); //创建时间以插入基础性资料的时间为准
|
|
|
+ mapToDaoForAttachmentOfBasicData.put("attachmentId", map.get("basicDataId")); //基础性资料id号就是附件的id号
|
|
|
+ mapToDaoForAttachmentOfBasicData.put("attachmentName", map.get("basicDataName")); //基础性资料文件名就当是附件名
|
|
|
+ mapToDaoForAttachmentOfBasicData.put("url", map.get("urlOfBasicData")); //基础性资料的url地址就是附件url地址
|
|
|
+ mapToDaoForAttachmentOfBasicData.put("userId", userDetail.getUser_id()); //上传人的id号先写死,到时候还需要根据请求查询上传人的id号。。。。。。TODO
|
|
|
+ mapToDaoForAttachmentOfBasicData.put("createTime", currentTime); //创建时间以插入基础性资料的时间为准
|
|
|
businessDeclareDao.insertAttachmentInformationToDaoByBranchBank(mapToDaoForAttachmentOfBasicData); //将附件---【基础性资料】---申请的数据插入数据库
|
|
|
-
|
|
|
-
|
|
|
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
Map<String, Object> mapToDaoForBusinessCheck = new LinkedHashMap<String,Object>(); //这个map是将数据插入【审核记录】中的二级分行刚刚上传也要在审核记录中插入一条数据
|
|
|
- mapToDaoForBusinessCheck.put("organizationName", "经办支行"); //经办支行提交写死审核部门为--经办支行--
|
|
|
- mapToDaoForBusinessCheck.put("checkPerson", "张三"); //经办支行的某个人,先写死
|
|
|
- mapToDaoForBusinessCheck.put("checkResult", 5); //经办支行提交肯定通过
|
|
|
+ mapToDaoForBusinessCheck.put("organizationName", userDetail.getOrganization_name()); //经办支行提交写死审核部门为--经办支行--
|
|
|
+ mapToDaoForBusinessCheck.put("checkPerson", userDetail.getPerson_name()); //经办支行的某个人,先写死
|
|
|
+ mapToDaoForBusinessCheck.put("checkResult", StatusId.AGREE); //经办支行提交肯定通过
|
|
|
mapToDaoForBusinessCheck.put("checkOpinion", "--"); //审核意见空着
|
|
|
- mapToDaoForBusinessCheck.put("businessId", businessId); //业务id从前面获取
|
|
|
- mapToDaoForBusinessCheck.put("checkTime", mapToDaoForBusinessDeclare.get("declareTime"));//获取的是当前时间
|
|
|
- mapToDaoForBusinessCheck.put("task", 10); //需要通过status表获取状态信息,10表示发起,经办支行刚开始一定是发起状态
|
|
|
+ mapToDaoForBusinessCheck.put("businessId", map.get("businessId")); //业务id从前面获取
|
|
|
+ mapToDaoForBusinessCheck.put("checkTime", currentTime);//获取的是当前时间
|
|
|
+ mapToDaoForBusinessCheck.put("task", StatusId.LAUNCHING); //需要通过status表获取状态信息,10表示发起,经办支行刚开始一定是发起状态
|
|
|
//将封装到map的审核意见数据传入dao层中将结果导入【业务审核总表】中-------->insert操作
|
|
|
businessDeclareDao.businessDeclareCheckedBy(mapToDaoForBusinessCheck);
|
|
|
-
|
|
|
-
|
|
|
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
//此外,还要将业务申报的这个操作信息插入到操作记录表中【】
|
|
|
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值????
|
|
|
+ mapToOperationHistory.put("operatorTypeId", OperationTypeId.BUSINESS_APPLY); //刚刚创立业务申报,操作类型为业务申报1001
|
|
|
+ mapToOperationHistory.put("operatorAccount", userDetail.getAccount()); //操作账号写活♥
|
|
|
+ mapToOperationHistory.put("operatorRole", Role.TRAN_BRANCH_BANK); //创建这个操作的角色只能是经办支行
|
|
|
+ mapToOperationHistory.put("operatorPerson", userDetail.getPerson_name()); //操作人写活♥
|
|
|
+ mapToOperationHistory.put("operatorTime", currentTime); //操作时间为当前操作时间
|
|
|
+ mapToOperationHistory.put("hash", "to be calculated"); //如何计算操作的hash值===========================================>>。。。。。。TODO
|
|
|
businessDeclareDao.insertOperationHistoryInformationToDaoByBranchBank(mapToOperationHistory);//将操作记录信息插入到操作记录表中
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -273,54 +126,27 @@ public class BusinessDeclareService {
|
|
|
* @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;
|
|
|
+ UserDetail userDetail = (UserDetail) map.get("userDetail");
|
|
|
+ List<String> roleList = userDetail.getRole_name();
|
|
|
+ //经办支行和二级支行可以查看所有的信息
|
|
|
+ if(roleList.contains(Role.TRAN_BRANCH_BANK)||roleList.contains(Role.SEC_BRANCH_BANK)){
|
|
|
+ List<BusinessDeclare> informationList=businessDeclareDao.queryBusinessDeclareInformation(map);
|
|
|
+ int count=businessDeclareDao.findAllInfromations();
|
|
|
+ pageDTO.setRows(informationList);
|
|
|
+ pageDTO.setTotal(count);
|
|
|
+ return pageDTO;
|
|
|
+ }
|
|
|
+ if(roleList.contains(Role.BUSINESS_DEP_OF_PBB)){
|
|
|
+ //省分行营业部能看到的信息只有二级分行审核通过以后的信息才会显示,未通过或者是发起状态的都不会显示
|
|
|
+ //而且分页的话查询所有信息的条数也是按照之前的条件进行查询的
|
|
|
+ List<BusinessDeclare> informationList=businessDeclareDao.queryBusinessDeclareInformationByPBB(map);
|
|
|
+ int count=businessDeclareDao.findAllInfromationsByPBB();
|
|
|
+ pageDTO.setRows(informationList);
|
|
|
+ pageDTO.setTotal(count);
|
|
|
+ return pageDTO;
|
|
|
+ }
|
|
|
+ throw new RuntimeException("无权操作");
|
|
|
}
|
|
|
|
|
|
|
|
@@ -336,20 +162,22 @@ public class BusinessDeclareService {
|
|
|
* @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;
|
|
|
+ UserDetail userDetail = (UserDetail) map.get("userDetail");
|
|
|
+ List<String> roleList = userDetail.getRole_name();
|
|
|
+ Integer businessId = (Integer) map.get("businessId");
|
|
|
+ Integer statusId = businessDeclareDao.getStatusIdByBusinessId(businessId);
|
|
|
+ //经办支行和二级支行可以查看所有的信息
|
|
|
+ if(roleList.contains(Role.TRAN_BRANCH_BANK)||roleList.contains(Role.SEC_BRANCH_BANK)){
|
|
|
+ return businessDeclareDao.queryBusinessCheckInformation(map);
|
|
|
+ }
|
|
|
+ if(roleList.contains(Role.TRAN_BRANCH_BANK)||roleList.contains(Role.SEC_BRANCH_BANK)){
|
|
|
+ //如果是待二级分行审核或者是二级分行审核不通过则返回一个空值
|
|
|
+ if(statusId==1||statusId==2){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return businessDeclareDao.queryBusinessCheckInformation(map);
|
|
|
+ }
|
|
|
+ throw new RuntimeException("无权操作");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -370,88 +198,41 @@ public class BusinessDeclareService {
|
|
|
*/
|
|
|
@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("审核结果参数非法"); //传过来的参数如果不符合要求直接报错给前台
|
|
|
+ long currentTime = System.currentTimeMillis();
|
|
|
+ UserDetail userDetail = (UserDetail) map.get("userDetail");
|
|
|
+ List<String> roleList = userDetail.getRole_name();
|
|
|
+ String organizationName=userDetail.getOrganization_name(); //审核部门
|
|
|
+ String checkPerson=userDetail.getPerson_name(); //审核人
|
|
|
+ Integer checkResult=(Integer) map.get("checkResult"); //审核结果(5表示同意,6表示不同意)
|
|
|
+ String checkOpinion=(String) map.get("checkOpinion"); //审核意见
|
|
|
+ Integer businessId=(Integer) map.get("businessId"); //业务申报的id号,要根据这个更新业务审核的状态的
|
|
|
+ Integer statusId=businessDeclareDao.getStatusIdByBusinessId(businessId); //根据业务id号获取当前的状态id值
|
|
|
+ Integer operatorTypeId=null; //操作类型id号------>放到操作记录表中去的
|
|
|
+ if(roleList.contains(Role.SEC_BRANCH_BANK)&&statusId==StatusId.TO_BE_CHECKED_BY_SECONDARY_BRANCH_BANK){
|
|
|
+ //如果是二级分行操作,且当前状态id必须是1
|
|
|
+ if(checkResult==StatusId.AGREE){
|
|
|
+ statusId=StatusId.TO_BE_CHECKED_BY_PROVINCIAL_BRANCH_BANK;
|
|
|
+ operatorTypeId=OperationTypeId.BUSINESS_FIRST_TRIAL_AGREED;
|
|
|
+ }else if(checkResult==StatusId.REJECTED){
|
|
|
+ statusId=StatusId.REJECTED_BY_SECONDARY_BRANCH_BANK;
|
|
|
+ operatorTypeId=OperationTypeId.BUSINESS_FIRST_TRIAL_REJECTED;
|
|
|
+ }else{
|
|
|
+ throw new RuntimeException("审核结果参数非法");
|
|
|
+ }
|
|
|
+ }else if(roleList.contains(Role.BUSINESS_DEP_OF_PBB)&&statusId==StatusId.TO_BE_CHECKED_BY_PROVINCIAL_BRANCH_BANK){
|
|
|
+ //如果是省分行业务部门,且当前状态id必须是3
|
|
|
+ if(checkResult==StatusId.AGREE){
|
|
|
+ statusId=StatusId.AGREE;
|
|
|
+ operatorTypeId=OperationTypeId.BUSINESS_REEXAMINE_AGREED;
|
|
|
+ }else if(checkResult==StatusId.REJECTED){
|
|
|
+ statusId=StatusId.REJECTED_BY_PROVINCIAL_BRANCH_BANK;
|
|
|
+ operatorTypeId=OperationTypeId.BUSINESS_REEXAMINE_REJECTED;
|
|
|
+ }else{
|
|
|
+ throw new RuntimeException("审核结果参数非法");
|
|
|
}
|
|
|
}else{
|
|
|
- throw new RuntimeException("审核人不能为空");
|
|
|
+ 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);
|
|
@@ -459,8 +240,8 @@ public class BusinessDeclareService {
|
|
|
mapToDaoOfBusinessCheck.put("checkResult", checkResult);
|
|
|
mapToDaoOfBusinessCheck.put("checkOpinion", checkOpinion);
|
|
|
mapToDaoOfBusinessCheck.put("businessId", businessId);
|
|
|
- mapToDaoOfBusinessCheck.put("checkTime", System.currentTimeMillis());
|
|
|
- mapToDaoOfBusinessCheck.put("task", 11); //这里必定写死,11在状态表中对应的是审核状态
|
|
|
+ mapToDaoOfBusinessCheck.put("checkTime", currentTime);
|
|
|
+ mapToDaoOfBusinessCheck.put("task", StatusId.CHECKING); //这里必定写死,11在状态表中对应的是审核状态
|
|
|
//将封装到map的审核意见数据传入dao层中将结果导入【业务审核总表】中-------->insert操作
|
|
|
businessDeclareDao.businessDeclareCheckedBy(mapToDaoOfBusinessCheck);
|
|
|
|
|
@@ -471,20 +252,16 @@ public class BusinessDeclareService {
|
|
|
//将审核结果更新到【业务申报表】这个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值????
|
|
|
+ mapToOperationHistory.put("operatorAccount", userDetail.getAccount()); //操作账号写活♥
|
|
|
+ mapToOperationHistory.put("operatorPerson", userDetail.getPerson_name()); //操作人先写活♥
|
|
|
+ mapToOperationHistory.put("operatorTime", currentTime); //操作时间为当前操作时间
|
|
|
+ mapToOperationHistory.put("hash", "to be calculated from operation"); //如何计算操作的hash值????
|
|
|
businessDeclareDao.insertOperationHistoryInformationToDaoByBranchBank(mapToOperationHistory);//将操作记录信息插入到操作记录表中
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
*
|
|
@@ -501,148 +278,68 @@ public class BusinessDeclareService {
|
|
|
*/
|
|
|
@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不能为空");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ long currentTime = System.currentTimeMillis();
|
|
|
+ UserDetail userDetail = (UserDetail) map.get("userDetail");
|
|
|
+ Integer businessId=(Integer) map.get("businessId");
|
|
|
+ Integer contractId=(Integer) map.get("contractId");
|
|
|
+ String contractName=(String) map.get("contractName");
|
|
|
+ String contractParty=(String) map.get("contractParty");
|
|
|
+ String hash=(String) map.get("hash");
|
|
|
+ String url=(String) map.get("url");
|
|
|
//将合同信息封装到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("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("uploadDepartment", userDetail.getOrganization_name());
|
|
|
+ mapToContractRecord.put("uploadPerson", userDetail.getPerson_name());
|
|
|
+ mapToContractRecord.put("modifyOpinion", "初始版本合同"); //这个先写死
|
|
|
+ mapToContractRecord.put("comfirmDepartment", "管理人"); //这个先写死
|
|
|
+ mapToContractRecord.put("commitTime", currentTime);
|
|
|
mapToContractRecord.put("hash", hash);
|
|
|
-
|
|
|
+ businessDeclareDao.insertContractInformationToContractRecord(mapToContractRecord); //将合同信息插入到【合同提交记录表】
|
|
|
|
|
|
//将合同信息封装到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); //省分行刚上传合同状态肯定是将状态变成修订中
|
|
|
-
|
|
|
+ mapToContractStatusTracking.put("updateTime", currentTime);
|
|
|
+ mapToContractStatusTracking.put("statusId", StatusId.MODIFYING); //省分行刚上传合同状态肯定是将状态变成修订中(7)
|
|
|
+ businessDeclareDao.insertContractInformationToContractStatusTracking(mapToContractStatusTracking); //将合同信息插入到【合同状态跟踪表】
|
|
|
|
|
|
//将合同信息封装到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); //将合同信息插入到【合同状态跟踪表】
|
|
|
+ mapToAttachment.put("userId", userDetail.getUser_id());
|
|
|
+ mapToAttachment.put("createTime", currentTime);
|
|
|
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);//将操作记录信息插入到操作记录表中
|
|
|
-
|
|
|
-
|
|
|
+ mapToOperationHistory.put("operatorTypeId", OperationTypeId.CONTRACT_UPLOAD); //operatorTypeId=1004表示【合同上传】
|
|
|
+ mapToOperationHistory.put("operatorRole", userDetail.getOrganization_name()); //创建这个操作的角色只能是省分行业务部门
|
|
|
+ mapToOperationHistory.put("operatorAccount", userDetail.getAccount()); //操作账号写活♥
|
|
|
+ mapToOperationHistory.put("operatorPerson", userDetail.getPerson_name()); //操作人先写活♥
|
|
|
+ mapToOperationHistory.put("operatorTime", currentTime); //操作时间为当前操作时间
|
|
|
+ mapToOperationHistory.put("hash", "to be calculated from operation"); //如何计算操作的hash值????============================>>待定TODO
|
|
|
+ businessDeclareDao.insertOperationHistoryInformationToDaoByBranchBank(mapToOperationHistory);//将操作记录信息插入到【操作记录表】中
|
|
|
+ }
|
|
|
+
|
|
|
+ //初始创建一个新生成业务id号(不和已有的id号重复)
|
|
|
+ public Integer generateBusinessId() {
|
|
|
+ int same = -1;
|
|
|
+ Integer businessId = null;
|
|
|
+ //如果有重复的继续查,直到查不出重复的fundId号为止
|
|
|
+ while(same != 0){
|
|
|
+ businessId=(int)(Math.random()*1000000000); //=========================>>>产生附件id号的机制要改的TODO
|
|
|
+ same = businessDeclareDao.queryIfHasTheSameBusinessId(businessId);
|
|
|
+ }
|
|
|
+ return businessId;
|
|
|
}
|
|
|
|
|
|
|