|
@@ -182,9 +182,9 @@ public class ProjectReportedImportService extends CrudService<ProjectReportedImp
|
|
reportedConsultant.setReportedId(projectReportedImport.getId());
|
|
reportedConsultant.setReportedId(projectReportedImport.getId());
|
|
reportedConsultant.setZixunyuan(userName.getId());
|
|
reportedConsultant.setZixunyuan(userName.getId());
|
|
reportedConsultant.setZhucezigezhKey("161");
|
|
reportedConsultant.setZhucezigezhKey("161");
|
|
- reportedConsultant.setWcyysrbl(100D);
|
|
|
|
|
|
+ reportedConsultant.setWcyysrbl(80D);
|
|
if(StringUtils.isNotBlank(projectReportedImport.getZiXunShouRu())){
|
|
if(StringUtils.isNotBlank(projectReportedImport.getZiXunShouRu())){
|
|
- reportedConsultant.setWcyysr(Double.valueOf(projectReportedImport.getZiXunShouRu()));
|
|
|
|
|
|
+ reportedConsultant.setWcyysr(Double.valueOf(projectReportedImport.getZiXunShouRu())*0.8);
|
|
}else{
|
|
}else{
|
|
reportedConsultant.setWcyysr(0D);
|
|
reportedConsultant.setWcyysr(0D);
|
|
}
|
|
}
|
|
@@ -193,6 +193,25 @@ public class ProjectReportedImportService extends CrudService<ProjectReportedImp
|
|
ruralProjectRecordsReportedDao.insertConsultant(reportedConsultant);
|
|
ruralProjectRecordsReportedDao.insertConsultant(reportedConsultant);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //添加咨询员中的项目负责人信息
|
|
|
|
+ //保存咨询员信息
|
|
|
|
+ User zxyUserName = UserUtils.getByUserName("吴盛楠");
|
|
|
|
+ if(null != zxyUserName){
|
|
|
|
+ ReportedConsultant reportedConsultant = new ReportedConsultant();
|
|
|
|
+ reportedConsultant.setReportedId(projectReportedImport.getId());
|
|
|
|
+ reportedConsultant.setZixunyuan(zxyUserName.getId());
|
|
|
|
+ reportedConsultant.setZhucezigezhKey("161");
|
|
|
|
+ reportedConsultant.setWcyysrbl(20D);
|
|
|
|
+ if(StringUtils.isNotBlank(projectReportedImport.getZiXunShouRu())){
|
|
|
|
+ reportedConsultant.setWcyysr(Double.valueOf(projectReportedImport.getZiXunShouRu())*0.2);
|
|
|
|
+ }else{
|
|
|
|
+ reportedConsultant.setWcyysr(0D);
|
|
|
|
+ }
|
|
|
|
+ reportedConsultant.setRoleFlag("0");
|
|
|
|
+ reportedConsultant.preInsert();
|
|
|
|
+ ruralProjectRecordsReportedDao.insertConsultant(reportedConsultant);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -308,8 +327,43 @@ public class ProjectReportedImportService extends CrudService<ProjectReportedImp
|
|
|
|
|
|
//启动审核
|
|
//启动审核
|
|
if (Integer.parseInt(reported.getReportStatus())== ProjectStatusEnum.IN_APRL.getValue() &&(oldStatus==null|| ProjectStatusEnum.REJECTED.getValue()!=oldStatus)) {
|
|
if (Integer.parseInt(reported.getReportStatus())== ProjectStatusEnum.IN_APRL.getValue() &&(oldStatus==null|| ProjectStatusEnum.REJECTED.getValue()!=oldStatus)) {
|
|
- this.startOverallAudit(reported, reported.getProcessInstanceId());
|
|
|
|
|
|
+ //this.startOverallAudit(reported, reported.getProcessInstanceId());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //信用代码id
|
|
|
|
+ String jsonUscCode = "{\"uscCode\": \"91320000746823994F\"";
|
|
|
|
+ Map map = RuralProjectReportedInfoUtil.reportedDataManageImport(reported);
|
|
|
|
+ String jsonUscData = JSONObject.toJSONString(map);
|
|
|
|
+ byte[] privateKey = org.apache.commons.codec.binary.Base64.decodeBase64(PRIVATE_KEY);
|
|
|
|
+ //客户拿到密钥将自己的数据 jsonUscData 进行非对称加密。
|
|
|
|
+ byte[] encryptByPrivateKey = new byte[0];
|
|
|
|
+ try {
|
|
|
|
+ encryptByPrivateKey = Rsatool.encryptByPrivateKey(jsonUscData.getBytes(), privateKey);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ //将唯一标志和非对称加密后数据采用对称加密,方便传到服务段解析,并获得非对称的公钥来解密客户用密钥加密的数据
|
|
|
|
+ String encryString = jsonUscCode + ",\"data\":\"" + Base64.encodeBase64String(encryptByPrivateKey) + "\"}";
|
|
|
|
+ String encryptByAes = null;
|
|
|
|
+ try {
|
|
|
|
+ encryptByAes = Aestool.Encrypt(encryString, AES_KEY);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ //测试接口
|
|
|
|
+ //String url = "http://comp.jszj.com.cn:8031/api/testAddProject";
|
|
|
|
+ //正式接口
|
|
|
|
+ String url = "http://comp.jszj.com.cn:8031/api/addProject";
|
|
|
|
+ //发送请求
|
|
|
|
+ String returnResult = HttpPostTool.doPost(url, encryptByAes);
|
|
|
|
+ HashMap hashMap = JSON.parseObject(returnResult, HashMap.class);
|
|
|
|
+ if(!"1".equals(hashMap.get("code"))){
|
|
|
|
+ return "上报失败:" + hashMap.get("msg").toString();
|
|
}
|
|
}
|
|
|
|
+ //修改项目上报表中状态
|
|
|
|
+ reported.setReportStatus(String.valueOf(ProjectStatusEnum.SIGNED.getValue()));
|
|
|
|
+ reported.preUpdate();
|
|
|
|
+ dao.update(reported);
|
|
|
|
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|