|
@@ -244,7 +244,7 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
if (CommonUtil.checkIsBigDecimal(sysBatch)) {
|
|
|
batch = new Integer(sysBatch);
|
|
|
}
|
|
|
- String sql = "SELECT DISTINCT a.remark_type from m_project_info a,u_task b where a.id=b.project_id and form_data_id='"+task.getFormDataId()+"'";
|
|
|
+ String sql = "SELECT DISTINCT a.remark_type from m_project_info a,u_task b where a.id=b.project_id and form_data_id='" + task.getFormDataId() + "'";
|
|
|
String reType = jdbcTemplate.queryForObject(sql, String.class);
|
|
|
|
|
|
if (DistributedRedisLock.acquire(AuthUtil.getUserId().toString(), batch)) {
|
|
@@ -268,22 +268,22 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
//
|
|
|
List<Map<String, Object>> maps = new ArrayList<>();
|
|
|
Map<String, List<Map<String, Object>>> peopleByAge = maps2.stream()
|
|
|
- .collect(Collectors.groupingBy( hada ->(Func.toStr(hada.get("id")))));
|
|
|
+ .collect(Collectors.groupingBy(hada -> (Func.toStr(hada.get("id")))));
|
|
|
|
|
|
- for(String keyId :peopleByAge.keySet()){
|
|
|
+ for (String keyId : peopleByAge.keySet()) {
|
|
|
List<Map<String, Object>> keyList = peopleByAge.get(keyId);
|
|
|
- if(keyList!=null && keyList.size()==1){
|
|
|
+ if (keyList != null && keyList.size() == 1) {
|
|
|
maps.addAll(keyList);
|
|
|
- }else if(keyList!=null && keyList.size()>=2){
|
|
|
- for(Map<String, Object> datax : keyList){
|
|
|
- if((datax.get("project_id")+"").equals(projectId)){
|
|
|
+ } else if (keyList != null && keyList.size() >= 2) {
|
|
|
+ for (Map<String, Object> datax : keyList) {
|
|
|
+ if ((datax.get("project_id") + "").equals(projectId)) {
|
|
|
maps.add(datax);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(reType.equals("2")){ //中方中讯
|
|
|
+ if (reType.equals("2")) { //中方中讯
|
|
|
if (maps != null && !maps.isEmpty()) {
|
|
|
String fileUrl = finalPdfUrl;
|
|
|
for (Map<String, Object> dataMap : maps) {
|
|
@@ -294,17 +294,17 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
//daMa.put("showHeight",30);
|
|
|
//daMa.put("showWidth",60);
|
|
|
//设置显示签字体的位置
|
|
|
- String yzx = dataMap.get("pyzby")+"";
|
|
|
- String xzx = dataMap.get("pyzbx")+"";
|
|
|
- Double sealOffsetY =Func.toDouble(yzx); //Func.toInt(dataMap.get("pyzby"))-15;
|
|
|
- Double sealOffsetX =Func.toDouble(xzx); //Func.toInt(dataMap.get("pyzby"))-30;
|
|
|
- daMa.put("sealOffsetY" , sealOffsetY);
|
|
|
- daMa.put("sealOffsetX" , sealOffsetX);
|
|
|
+ String yzx = dataMap.get("pyzby") + "";
|
|
|
+ String xzx = dataMap.get("pyzbx") + "";
|
|
|
+ Double sealOffsetY = Func.toDouble(yzx); //Func.toInt(dataMap.get("pyzby"))-15;
|
|
|
+ Double sealOffsetX = Func.toDouble(xzx); //Func.toInt(dataMap.get("pyzby"))-30;
|
|
|
+ daMa.put("sealOffsetY", sealOffsetY);
|
|
|
+ daMa.put("sealOffsetX", sealOffsetX);
|
|
|
|
|
|
byte[] fileByte;
|
|
|
if (fileUrl.indexOf("aliyuncs.com") >= 0) {
|
|
|
|
|
|
- URL url =new URL(finalPdfUrl);
|
|
|
+ URL url = new URL(finalPdfUrl);
|
|
|
fileByte = IOUtils.toByteArray(url);
|
|
|
} else {
|
|
|
FileReader fileReader = new FileReader(fileUrl);
|
|
@@ -316,7 +316,7 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
String reData = signPdfByDFZX(daMa);
|
|
|
if (reData.indexOf("success@") >= 0) {
|
|
|
fileUrl = reData.split("@@@@")[1];
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return E_VISA_ERROR;
|
|
|
}
|
|
|
}
|
|
@@ -336,7 +336,7 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
RedisTemplate.delete("sign-" + task.getFormDataId());
|
|
|
return finalPdfUrl;
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
|
|
|
//准备签章策略
|
|
|
List<SealStrategyVO> sealStrategyVOS = new ArrayList<>();
|
|
@@ -386,7 +386,6 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 个人-电签信息
|
|
|
*
|
|
@@ -404,12 +403,12 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
}
|
|
|
|
|
|
//根据任务类型获取对应的文件信息
|
|
|
- TaskApprovalVO taskFile=new TaskApprovalVO();
|
|
|
- if(task.getApprovalType()<=4 || task.getApprovalType()==8){
|
|
|
+ TaskApprovalVO taskFile = new TaskApprovalVO();
|
|
|
+ if (task.getApprovalType() <= 4 || task.getApprovalType() == 8) {
|
|
|
//上报类型,1填报资料,2工程文件,3日志资料 , 4档案数据
|
|
|
taskFile = this.taskClient.queryBusinessDataTask(JSONObject.parseObject(JSONObject.toJSONString(task), TaskApprovalVO.class));
|
|
|
- } else if ( task.getApprovalType()>=5) {
|
|
|
- // 计量任务类型 5 = 中间计量申请,6 = 材料计量单,7 = 开工预付款计量单,8 = 变更令
|
|
|
+ } else if (task.getApprovalType() >= 5) {
|
|
|
+ // 计量任务类型 5 = 中间计量申请,6 = 材料计量单,7 = 开工预付款计量单,8 = 变更令
|
|
|
try {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
if (task.getApprovalType() == 6 || task.getApprovalType() == 7) {
|
|
@@ -420,7 +419,7 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
taskFile.setApprovalFileList(map.get("period_number") + "", map.get("raw_url") + "");
|
|
|
}
|
|
|
taskFile.setRemarkType("1");
|
|
|
- }catch (Exception e) {
|
|
|
+ } catch (Exception e) {
|
|
|
RedisTemplate.delete("sign-" + task.getFormDataId());
|
|
|
return NOT_PFX_SGIN;
|
|
|
}
|
|
@@ -444,22 +443,22 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
}
|
|
|
String pdfUrl = file.getFileUrl();
|
|
|
pdfUrl = CommonUtil.replaceOssUrl(pdfUrl);
|
|
|
- System.out.println("11111111"+pdfUrl);
|
|
|
+ System.out.println("11111111" + pdfUrl);
|
|
|
List<String> eVisaConfigList = PDFUtils.getPdfSignIds(pdfUrl);
|
|
|
if (eVisaConfigList == null || eVisaConfigList.size() == 0) {
|
|
|
//没有电签配置,默认当前任务为不签字审批,返回成功
|
|
|
System.out.println("------2------");
|
|
|
RedisTemplate.delete("sign-" + task.getFormDataId());
|
|
|
- if(resultMessage.indexOf(SUCCESS)>=0){
|
|
|
+ if (resultMessage.indexOf(SUCCESS) >= 0) {
|
|
|
return resultMessage;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return SUCCESS + "@@@@" + taskFile.getApprovalFileList().get(0).getFileUrl();
|
|
|
}
|
|
|
}
|
|
|
String dataInfo = this.taskClient.queryTaskContractId(task.getParallelProcessInstanceId());
|
|
|
String ids = String.join(",", eVisaConfigList);
|
|
|
//判断电签类型
|
|
|
- if(dataInfo==null || Func.isEmpty(dataInfo)){
|
|
|
+ if (dataInfo == null || Func.isEmpty(dataInfo)) {
|
|
|
return E_CONTRACT_ERROR;
|
|
|
}
|
|
|
String contractId = Func.toStrArray(dataInfo)[0];
|
|
@@ -468,46 +467,47 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
|
|
|
if (taskFile.getRemarkType().equals("2")) {
|
|
|
// 查询任务下所有
|
|
|
- String sqlinfo = " SELECT * from ( SELECT a.id as keyWord,a.project_id,a.pyzbx ,a.pyzby,(SELECT acc_code from blade_user where id='" + task.getUserId() + "' and is_deleted=0 ) as sealId from m_textdict_info a where a.type =2 and a.id in (" + ids + ") and sig_role_id in (SELECT DISTINCT c.role_id from m_project_assignment_user c where c.contract_id=" + contractId + " and user_id=" + task.getUserId() + " and c.is_deleted=0 ) ) x where x.sealId is not null ";
|
|
|
+ String sqlinfo = " SELECT * from ( SELECT a.id as keyWord,a.project_id,a.pyzbx ,a.pyzby,(SELECT acc_code from blade_user where id='" + task.getUserId() + "' and is_deleted=0 ) as sealId from m_textdict_info a where a.type =2 and a.id in (" + ids + ") and sig_role_id in (SELECT DISTINCT c.role_id from m_project_assignment_user c where c.contract_id=" + contractId + " and user_id=" + task.getUserId() + " and c.is_deleted=0 ) ) x where x.sealId is not null and project_id='"+projectId+"' ";
|
|
|
System.out.println("东方中讯-个人-user-id" + task.getUserId() + "--SQL=" + sqlinfo);
|
|
|
List<Map<String, Object>> maps2 = jdbcTemplate.queryForList(sqlinfo);
|
|
|
List<Map<String, Object>> maps = new ArrayList<>();
|
|
|
Map<String, List<Map<String, Object>>> peopleByAge = maps2.stream()
|
|
|
- .collect(Collectors.groupingBy( hada ->(Func.toStr(hada.get("keyWord")))));
|
|
|
+ .collect(Collectors.groupingBy(hada -> (Func.toStr(hada.get("keyWord")))));
|
|
|
if (maps2 != null && !maps2.isEmpty()) {
|
|
|
- for(String keyId :peopleByAge.keySet()){
|
|
|
- List<Map<String, Object>> keyList = peopleByAge.get(keyId);
|
|
|
- if(keyList!=null && keyList.size()==1){
|
|
|
- maps.addAll(keyList);
|
|
|
- }else if(keyList!=null && keyList.size()>=2){
|
|
|
- for(Map<String, Object> datax : keyList){
|
|
|
- if((datax.get("project_id")+"").equals(projectId)){
|
|
|
- maps.add(datax);
|
|
|
+ for (String keyId : peopleByAge.keySet()) {
|
|
|
+ List<Map<String, Object>> keyList = peopleByAge.get(keyId);
|
|
|
+ if (keyList != null && keyList.size() == 1) {
|
|
|
+
|
|
|
+ maps.addAll(keyList);
|
|
|
+ } else if (keyList != null && keyList.size() >= 2) {
|
|
|
+ for (Map<String, Object> datax : keyList) {
|
|
|
+ if ((datax.get("project_id") + "").equals(projectId)) {
|
|
|
+ maps.add(datax);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
String fileUrl = pdfUrl;
|
|
|
for (Map<String, Object> dataMap : maps) {
|
|
|
HashMap<String, Object> daMa = new HashMap<>();
|
|
|
daMa.put("keyWord", dataMap.get("keyWord"));
|
|
|
daMa.put("sealId", dataMap.get("sealId"));
|
|
|
// 设置图片显示大小
|
|
|
- daMa.put("showHeight",30);
|
|
|
- daMa.put("showWidth",60);
|
|
|
+ daMa.put("showHeight", 30);
|
|
|
+ daMa.put("showWidth", 60);
|
|
|
//设置显示签字体的位置
|
|
|
- String yzx = dataMap.get("pyzby")+"";
|
|
|
- String xzx = dataMap.get("pyzbx")+"";
|
|
|
- Double sealOffsetY =Func.toDouble(yzx) -15;
|
|
|
- Double sealOffsetX =Func.toDouble(xzx) -30;
|
|
|
- daMa.put("sealOffsetX",sealOffsetX);
|
|
|
- daMa.put("sealOffsetY",sealOffsetY);
|
|
|
- // daMa.put("sealOffsetY",-15);
|
|
|
- // daMa.put("sealOffsetX",-30);
|
|
|
+ String yzx = dataMap.get("pyzby") + "";
|
|
|
+ String xzx = dataMap.get("pyzbx") + "";
|
|
|
+ Double sealOffsetY = Func.toDouble(yzx) - 15;
|
|
|
+ Double sealOffsetX = Func.toDouble(xzx) - 30;
|
|
|
+ daMa.put("sealOffsetX", sealOffsetX);
|
|
|
+ daMa.put("sealOffsetY", sealOffsetY);
|
|
|
+ // daMa.put("sealOffsetY",-15);
|
|
|
+ // daMa.put("sealOffsetX",-30);
|
|
|
byte[] fileByte;
|
|
|
if (fileUrl.indexOf("aliyuncs.com") >= 0 || fileUrl.indexOf("183.247.216.148") >= 0 || fileUrl.indexOf("152.168.2.15") >= 0) {
|
|
|
- System.out.println("2222222"+pdfUrl);
|
|
|
- URL url =new URL(pdfUrl);
|
|
|
+ System.out.println("2222222" + pdfUrl);
|
|
|
+ URL url = new URL(pdfUrl);
|
|
|
fileByte = IOUtils.toByteArray(url);
|
|
|
} else {
|
|
|
FileReader fileReader = new FileReader(fileUrl);
|
|
@@ -520,7 +520,7 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
String reData = signPdfByDFZX(daMa);
|
|
|
if (reData.indexOf("success@") >= 0) {
|
|
|
fileUrl = reData.split("@@@@")[1];
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return reData;
|
|
|
}
|
|
|
}
|
|
@@ -546,23 +546,23 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
|
|
|
List<Map<String, Object>> maps = new ArrayList<>();
|
|
|
Map<String, List<Map<String, Object>>> peopleByAge = maps2.stream()
|
|
|
- .collect(Collectors.groupingBy( hada ->(Func.toStr(hada.get("id")))));
|
|
|
+ .collect(Collectors.groupingBy(hada -> (Func.toStr(hada.get("id")))));
|
|
|
|
|
|
- for(String keyId :peopleByAge.keySet()){
|
|
|
- int exId = 0 ;
|
|
|
+ for (String keyId : peopleByAge.keySet()) {
|
|
|
+ int exId = 0;
|
|
|
List<Map<String, Object>> keyList = peopleByAge.get(keyId);
|
|
|
- if(keyList!=null && keyList.size()==1){
|
|
|
+ if (keyList != null && keyList.size() == 1) {
|
|
|
maps.addAll(keyList);
|
|
|
- exId =1;
|
|
|
- }else if(keyList!=null && keyList.size()>=2){
|
|
|
- for(Map<String, Object> datax : keyList){
|
|
|
- if((datax.get("project_id")+"").equals(projectId)){
|
|
|
+ exId = 1;
|
|
|
+ } else if (keyList != null && keyList.size() >= 2) {
|
|
|
+ for (Map<String, Object> datax : keyList) {
|
|
|
+ if ((datax.get("project_id") + "").equals(projectId)) {
|
|
|
maps.add(datax);
|
|
|
- exId =1;
|
|
|
+ exId = 1;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(exId == 0){
|
|
|
+ if (exId == 0) {
|
|
|
maps.add(keyList.get(0));
|
|
|
}
|
|
|
}
|
|
@@ -579,12 +579,12 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
for (Map<String, Object> eVisaConfig : maps) {
|
|
|
//设置签章策略
|
|
|
SealStrategyVO vo = new SealStrategyVO();
|
|
|
- String userId = task.getUserId()+"";
|
|
|
+ String userId = task.getUserId() + "";
|
|
|
vo.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId);
|
|
|
|
|
|
- if(userId.length()<=EVisaConstant.USER_ID_SUB){
|
|
|
+ if (userId.length() <= EVisaConstant.USER_ID_SUB) {
|
|
|
vo.setSealPassword(task.getUserId().toString());
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
vo.setSealPassword(task.getUserId().toString().substring(0, EVisaConstant.USER_ID_SUB));
|
|
|
}
|
|
|
vo.setSealPerson(task.getNickName());
|
|
@@ -839,7 +839,6 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 安心 - 签章
|
|
|
*/
|
|
@@ -847,10 +846,10 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
Object[] result = new Object[3];
|
|
|
try {
|
|
|
String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
|
|
|
- if("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()){
|
|
|
+ if ("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()) {
|
|
|
SIGN_HOST = "47.115.117.246";
|
|
|
}
|
|
|
-
|
|
|
+ System.out.println("电签Ip===:" + SIGN_HOST);
|
|
|
PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 240000000, 810000000);
|
|
|
paperlessClient.setSSL(false);
|
|
|
//*****************************************************************************
|
|
@@ -878,9 +877,9 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
pdfBean.setBizSerialNo(GUIDUtil.generateId());
|
|
|
pdfBean.setInputSource("");
|
|
|
pdfBean.setInputType(BaseConstants.INPUT_TYPE_FILEDATA);
|
|
|
- logger.info("【电签模块】pdf{}", "长度"+fileByte.length);
|
|
|
+ logger.info("【电签模块】pdf{}", "长度" + fileByte.length);
|
|
|
pdfBean.setPdfData(fileByte);
|
|
|
- // pdfBean.set
|
|
|
+ // pdfBean.set
|
|
|
//pdfBean.set
|
|
|
pdfBeans.add(pdfBean);
|
|
|
|
|
@@ -980,13 +979,26 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
|
|
|
//设置大小(首先排查档案水印章,因为水印章要保持原样)
|
|
|
if (!vo.getImageUrl().equals("https://bladex-chongqing-info.oss-cn-hangzhou.aliyuncs.com//upload/20230911/5b42583d931664b785ebf481c37d17bc.png")) {
|
|
|
+ int width = 0;
|
|
|
+ int heigh = 0;
|
|
|
if (vo.isCompanySeal()) {
|
|
|
- //合同章
|
|
|
- imageData = ImageUtil.resizeImage(imageData, 540, 540);
|
|
|
+ width = 540;
|
|
|
+ heigh = 540;
|
|
|
} else {
|
|
|
- //非合同章
|
|
|
- imageData = ImageUtil.resizeImage(imageData, 480, 132);
|
|
|
+ width = 480;
|
|
|
+ heigh = 132;
|
|
|
}
|
|
|
+ //宽度设置
|
|
|
+ if (vo.getWidth() != null && vo.getWidth() != "" && Func.isNotEmpty(vo.getWidth()) && vo.getWidth() != "null" && !vo.getWidth().equals("null")) {
|
|
|
+ double width2 = Func.toDouble(vo.getWidth());
|
|
|
+ width = (int) (540 / 3.8 * width2);
|
|
|
+ }
|
|
|
+ //高度设置
|
|
|
+ if (vo.getHeight() != null && vo.getHeight() != "" && Func.isNotEmpty(vo.getHeight()) && vo.getHeight() != "null" && !vo.getHeight().equals("null")) {
|
|
|
+ double heigh2 = Func.toDouble(vo.getHeight());
|
|
|
+ heigh = (int) (540 / 3.8 * heigh2);
|
|
|
+ }
|
|
|
+ imageData = ImageUtil.resizeImage(imageData, width, heigh);
|
|
|
}
|
|
|
|
|
|
//图片dpi设置
|
|
@@ -1034,9 +1046,10 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
Object[] result = new Object[3];
|
|
|
try {
|
|
|
String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
|
|
|
- if("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()){
|
|
|
+ if ("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()) {
|
|
|
SIGN_HOST = "47.115.117.246";
|
|
|
}
|
|
|
+ System.out.println("电签Ip===:" + SIGN_HOST);
|
|
|
PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 240000000, 810000000);
|
|
|
paperlessClient.setSSL(false);
|
|
|
//*****************************************************************************
|
|
@@ -1296,9 +1309,10 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
public String createSeal(EVisaMakeSealVO vo) {
|
|
|
try {
|
|
|
String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
|
|
|
- if("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()){
|
|
|
+ if ("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()) {
|
|
|
SIGN_HOST = "47.115.117.246";
|
|
|
}
|
|
|
+ System.out.println("电签Ip===:" + SIGN_HOST);
|
|
|
PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 240000000, 810000000);
|
|
|
paperlessClient.setSSL(false);
|
|
|
|
|
@@ -1361,8 +1375,8 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
} else if (responseHeadBean.getMessage().contains("is exist")) {
|
|
|
logger.info("【电签模块】{}", responseHeadBean.getMessage());
|
|
|
return "error";
|
|
|
- }else{
|
|
|
- return responseBean.getHead().getMessage();
|
|
|
+ } else {
|
|
|
+ return responseBean.getHead().getMessage();
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
@@ -1374,9 +1388,10 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
public List<CertBean> onlineCheckSeal(String pdfUrl) {
|
|
|
try {
|
|
|
String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
|
|
|
- if("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()){
|
|
|
+ if ("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()) {
|
|
|
SIGN_HOST = "47.115.117.246";
|
|
|
}
|
|
|
+ System.out.println("电签Ip===:" + SIGN_HOST);
|
|
|
PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 240000000, 810000000);
|
|
|
paperlessClient.setSSL(false);
|
|
|
|
|
@@ -1435,23 +1450,23 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // @Scheduled(cron = "0/40 * * * * ?")
|
|
|
+ // @Scheduled(cron = "0/40 * * * * ?")
|
|
|
public void SignInfo() throws IOException {
|
|
|
//获取字节
|
|
|
- String pdfUrl="/Users/hongchuangyanfa/Desktop/excel/TJ06标咨询意见单.pdf";
|
|
|
+ String pdfUrl = "/Users/hongchuangyanfa/Desktop/excel/TJ06标咨询意见单.pdf";
|
|
|
byte[] fileByte = IOUtils.toByteArray(new FileInputStream(new File(pdfUrl)));
|
|
|
|
|
|
SealPdfVO pdfVO = new SealPdfVO();
|
|
|
List<SealStrategyVO> sealStrategyVOS = new ArrayList<>();
|
|
|
|
|
|
|
|
|
- String userId ="1794916072011603970";
|
|
|
+ String userId = "1794916072011603970";
|
|
|
SealStrategyVO vo = new SealStrategyVO();
|
|
|
vo.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId);
|
|
|
|
|
|
- if(userId.length()<=EVisaConstant.USER_ID_SUB){
|
|
|
+ if (userId.length() <= EVisaConstant.USER_ID_SUB) {
|
|
|
vo.setSealPassword(userId);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
vo.setSealPassword(userId.substring(0, EVisaConstant.USER_ID_SUB));
|
|
|
}
|
|
|
vo.setSealPerson("谭立剑");
|
|
@@ -1460,12 +1475,12 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
vo.setSealType("3");
|
|
|
vo.setKeyword("1808342935356309504");
|
|
|
|
|
|
- String userId2 ="1794914652935954434";
|
|
|
+ String userId2 = "1794914652935954434";
|
|
|
SealStrategyVO vo2 = new SealStrategyVO();
|
|
|
vo2.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId2);
|
|
|
- if(userId2.length()<=EVisaConstant.USER_ID_SUB){
|
|
|
+ if (userId2.length() <= EVisaConstant.USER_ID_SUB) {
|
|
|
vo2.setSealPassword(userId2);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
vo2.setSealPassword(userId2.substring(0, EVisaConstant.USER_ID_SUB));
|
|
|
}
|
|
|
vo2.setSealPerson("黎军丰");
|
|
@@ -1474,12 +1489,12 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
vo2.setSealType("3");
|
|
|
vo2.setKeyword("1808342935364698112");
|
|
|
|
|
|
- String userId3 ="1794914652935954434";
|
|
|
+ String userId3 = "1794914652935954434";
|
|
|
SealStrategyVO vo3 = new SealStrategyVO();
|
|
|
vo3.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId3);
|
|
|
- if(userId3.length()<=EVisaConstant.USER_ID_SUB){
|
|
|
+ if (userId3.length() <= EVisaConstant.USER_ID_SUB) {
|
|
|
vo3.setSealPassword(userId3);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
vo3.setSealPassword(userId3.substring(0, EVisaConstant.USER_ID_SUB));
|
|
|
}
|
|
|
vo3.setSealPerson("李梦君");
|
|
@@ -1488,12 +1503,12 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
vo3.setSealType("3");
|
|
|
vo3.setKeyword("1810847886083096576");
|
|
|
|
|
|
- String userId4 ="104326754034";
|
|
|
+ String userId4 = "104326754034";
|
|
|
SealStrategyVO vo4 = new SealStrategyVO();
|
|
|
vo3.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId4);
|
|
|
- if(userId4.length()<=EVisaConstant.USER_ID_SUB){
|
|
|
+ if (userId4.length() <= EVisaConstant.USER_ID_SUB) {
|
|
|
vo4.setSealPassword(userId4);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
vo4.setSealPassword(userId4.substring(0, EVisaConstant.USER_ID_SUB));
|
|
|
}
|
|
|
vo4.setSealPerson("王涛");
|
|
@@ -1516,12 +1531,12 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
|
|
|
// 6期
|
|
|
|
|
|
- String userId6 ="1796388593051426817";
|
|
|
+ String userId6 = "1796388593051426817";
|
|
|
SealStrategyVO vo6 = new SealStrategyVO();
|
|
|
vo6.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId6);
|
|
|
- if(userId6.length()<=EVisaConstant.USER_ID_SUB){
|
|
|
+ if (userId6.length() <= EVisaConstant.USER_ID_SUB) {
|
|
|
vo6.setSealPassword(userId6);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
vo6.setSealPassword(userId6.substring(0, EVisaConstant.USER_ID_SUB));
|
|
|
}
|
|
|
vo6.setSealPerson("刘宝平");
|
|
@@ -1531,12 +1546,12 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
vo6.setKeyword("1808342935356309504");
|
|
|
|
|
|
|
|
|
- String userId7 ="1796388092851314689";
|
|
|
+ String userId7 = "1796388092851314689";
|
|
|
SealStrategyVO vo7 = new SealStrategyVO();
|
|
|
vo7.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId7);
|
|
|
- if(userId7.length()<=EVisaConstant.USER_ID_SUB){
|
|
|
+ if (userId7.length() <= EVisaConstant.USER_ID_SUB) {
|
|
|
vo7.setSealPassword(userId7);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
vo7.setSealPassword(userId7.substring(0, EVisaConstant.USER_ID_SUB));
|
|
|
}
|
|
|
vo7.setSealPerson("李富生");
|
|
@@ -1546,12 +1561,12 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
vo7.setKeyword("1808342935364698112");
|
|
|
|
|
|
|
|
|
- String userId8 ="104326754036";
|
|
|
+ String userId8 = "104326754036";
|
|
|
SealStrategyVO vo8 = new SealStrategyVO();
|
|
|
vo8.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId8);
|
|
|
- if(userId8.length()<=EVisaConstant.USER_ID_SUB){
|
|
|
+ if (userId8.length() <= EVisaConstant.USER_ID_SUB) {
|
|
|
vo8.setSealPassword(userId8);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
vo8.setSealPassword(userId8.substring(0, EVisaConstant.USER_ID_SUB));
|
|
|
}
|
|
|
vo8.setSealPerson("许利利");
|
|
@@ -1571,10 +1586,10 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
vo9.setCompanySeal(true);
|
|
|
vo9.setKeyword("1808342935377281024");
|
|
|
//sealStrategyVOS.add(vo);
|
|
|
- // sealStrategyVOS.add(vo2);
|
|
|
+ // sealStrategyVOS.add(vo2);
|
|
|
//sealStrategyVOS.add(vo3);
|
|
|
// 3期
|
|
|
- // sealStrategyVOS.add(vo4);
|
|
|
+ // sealStrategyVOS.add(vo4);
|
|
|
// 6期
|
|
|
sealStrategyVOS.add(vo6);
|
|
|
sealStrategyVOS.add(vo7);
|
|
@@ -1602,8 +1617,10 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
- * 单张PDF批量电签,返回电签后的PDF
|
|
|
+ * 单张PDF批量电签,返回电签后的PDF
|
|
|
+ *
|
|
|
* @param
|
|
|
* @return
|
|
|
*/
|
|
@@ -1652,11 +1669,11 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
/**
|
|
|
* 安心 - 签章
|
|
|
*/
|
|
|
- public Object[] signPdfByAXQZ(SealPdfVO pdfVO, String loPdfurl,String outPdfUrl) {
|
|
|
+ public Object[] signPdfByAXQZ(SealPdfVO pdfVO, String loPdfurl, String outPdfUrl) {
|
|
|
Object[] result = new Object[3];
|
|
|
try {
|
|
|
String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
|
|
|
- if("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()){
|
|
|
+ if ("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()) {
|
|
|
SIGN_HOST = "47.115.117.246";
|
|
|
}
|
|
|
PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 240000000, 810000000);
|
|
@@ -1684,7 +1701,7 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
List<PdfBean> pdfBeans = new ArrayList<>();
|
|
|
PdfBean pdfBean = new PdfBean();
|
|
|
pdfBean.setBizSerialNo(GUIDUtil.generateId());
|
|
|
- pdfBean.setInputSource("/mnt/bladesign"+loPdfurl);
|
|
|
+ pdfBean.setInputSource("/mnt/bladesign" + loPdfurl);
|
|
|
pdfBean.setInputType(BaseConstants.INPUT_TYPE_FILEPATH);
|
|
|
pdfBeans.add(pdfBean);
|
|
|
requestBody.setPdfBeans(pdfBeans);
|
|
@@ -1697,7 +1714,7 @@ public class EVisaServiceImpl implements EVisaService {
|
|
|
requestBody.setSealStrategies(sealStrategies);
|
|
|
|
|
|
//签章后文件保存地址,不为空时,直接将签章文件保存在此地址,不再返回签章后文档数据;ftp:auto
|
|
|
- requestBody.setOutputFilepath("/mnt/bladesign"+outPdfUrl);
|
|
|
+ requestBody.setOutputFilepath("/mnt/bladesign" + outPdfUrl);
|
|
|
|
|
|
//时间戳方式,默认为0;0:实时访问CFCA 时间戳服务;1:使用从CFCA购置并在本地部署的时间戳服务器产品;
|
|
|
requestBody.setTimestampChannel(BaseConstants.TIME_STAMP_CHANNEL_CFCA);
|