投保单打印

master
wanghui 3 weeks ago
parent ce01c522c5
commit 5f6be0347f
  1. 52
      lis-component-cloudstorage-bl/src/main/java/com/sinosoft/lis/cloud/CallHTTP.java
  2. 33
      lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/g_app/LCContPrtPrintBL.java
  3. 12
      lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/sql/g_app/LCContPrtPrintBLSQL.java

@ -73,7 +73,7 @@ public class CallHTTP {
AK = serverInfo.GetText(1, 1); AK = serverInfo.GetText(1, 1);
SK = serverInfo.GetText(1, 2); SK = serverInfo.GetText(1, 2);
host = serverInfo.GetText(1, 3)+"/"+ serverInfo.GetText(1, 4); host = serverInfo.GetText(1, 3);
this.setPicPath(serverInfo.GetText(1, 5)); this.setPicPath(serverInfo.GetText(1, 5));
this.setServerPort(serverInfo.GetText(1, 3)); this.setServerPort(serverInfo.GetText(1, 3));
this.setPicPathHttp(serverInfo.GetText(1, 4)); this.setPicPathHttp(serverInfo.GetText(1, 4));
@ -93,7 +93,8 @@ public class CallHTTP {
AK = serverInfo.GetText(1, 1); AK = serverInfo.GetText(1, 1);
SK = serverInfo.GetText(1, 2); SK = serverInfo.GetText(1, 2);
host = serverInfo.GetText(1, 3)+"/"+ serverInfo.GetText(1, 4); // host = serverInfo.GetText(1, 3)+"/"+ serverInfo.GetText(1, 4);
host = serverInfo.GetText(1, 3);
this.setPicPath(serverInfo.GetText(1, 5)); this.setPicPath(serverInfo.GetText(1, 5));
this.setServerPort(serverInfo.GetText(1, 3)); this.setServerPort(serverInfo.GetText(1, 3));
this.setPicPathHttp(serverInfo.GetText(1, 4)); this.setPicPathHttp(serverInfo.GetText(1, 4));
@ -347,36 +348,25 @@ public class CallHTTP {
* fileName:文件名 6ac09355546449b2a00eba4a376b1774.jpg * fileName:文件名 6ac09355546449b2a00eba4a376b1774.jpg
*/ */
public InputStream getObject(String path,String fileName) { public InputStream getObject(String path,String fileName) {
//暂时修改为从本地获取文件
File file = new File(path +"/"+ fileName); AWSCredentials credentials = new BasicAWSCredentials(AK,SK);
Path filePath = Paths.get(path +"/"+ fileName); //AWSCredentials credentials = new BasicAWSCredentials("hxyx_jsc_lwl", "Ydthcom*it2021");
try (InputStream inputStream = Files.newInputStream(filePath)) { ClientConfiguration clientConfig = new ClientConfiguration();
// 读取 inputStream clientConfig.withMaxConnections(200);
return inputStream; clientConfig.setProtocol(Protocol.HTTPS);
} catch (IOException e) { clientConfig.setSocketTimeout(300000);
e.printStackTrace(); clientConfig.setConnectionTimeout(30000);
} clientConfig.withUseExpectContinue(true);
return null;
AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
// AWSCredentials credentials = new BasicAWSCredentials(AK,SK); .withCredentials(new AWSStaticCredentialsProvider(credentials))
// //AWSCredentials credentials = new BasicAWSCredentials("hxyx_jsc_lwl", "Ydthcom*it2021"); .withClientConfiguration(clientConfig)
// ClientConfiguration clientConfig = new ClientConfiguration(); .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(host, "cn-hangzhou"))
// clientConfig.withMaxConnections(200); .withPathStyleAccessEnabled(false)
// clientConfig.setProtocol(Protocol.HTTP); .build();
// clientConfig.setSocketTimeout(300000); com.amazonaws.services.s3.model.S3Object object=s3Client.getObject(picPath,path + "/" + fileName);
// clientConfig.setConnectionTimeout(30000); InputStream inStream = object.getObjectContent();
// clientConfig.withUseExpectContinue(true); return inStream;
//
// AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
// .withCredentials(new AWSStaticCredentialsProvider(credentials))
// .withClientConfiguration(clientConfig)
// .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(host, "us-west-1"))
// .withPathStyleAccessEnabled(false)
// .build();
// com.amazonaws.services.s3.model.S3Object object=s3Client.getObject(new GetObjectRequest(path, fileName));
// InputStream inStream = object.getObjectContent();
// return inStream;
} }

@ -389,7 +389,9 @@ public class LCContPrtPrintBL implements BusinessService {
buildError("dealData", new I18nMessage("查询保单信息失败!", "LIS-99999")); buildError("dealData", new I18nMessage("查询保单信息失败!", "LIS-99999"));
return false; return false;
} }
/********************************************************
* 投保单位信息
*******************************************************/
// jsonDATASET.put("AskNo", lcGrpInfoSSRS.GetText(1,1)); // jsonDATASET.put("AskNo", lcGrpInfoSSRS.GetText(1,1));
objectOneData.put("GrpName", lcGrpInfoSSRS.GetText(1,2)); objectOneData.put("GrpName", lcGrpInfoSSRS.GetText(1,2));
objectOneData.put("GrpAddress",lcGrpInfoSSRS.GetText(1,3)); objectOneData.put("GrpAddress",lcGrpInfoSSRS.GetText(1,3));
@ -459,6 +461,11 @@ public class LCContPrtPrintBL implements BusinessService {
objectOneData.put("GrpIDType", lcGrpInfoSSRS.GetText(1,55)); objectOneData.put("GrpIDType", lcGrpInfoSSRS.GetText(1,55));
objectOneData.put("GrpID", lcGrpInfoSSRS.GetText(1,56)); objectOneData.put("GrpID", lcGrpInfoSSRS.GetText(1,56));
objectOneData.put("BalanceOnState", lcGrpInfoSSRS.GetText(1,60)); objectOneData.put("BalanceOnState", lcGrpInfoSSRS.GetText(1,60));
objectOneData.put("FoundDate", lcGrpInfoSSRS.GetText(1,61));//成立日期
objectOneData.put("PostalAddress", lcGrpInfoSSRS.GetText(1,62));//联系地址
objectOneData.put("ControlTRType", lcGrpInfoSSRS.GetText(1,63));//税收类型
objectOneData.put("InstitutionsCategory", lcGrpInfoSSRS.GetText(1,64));//机构类别
objectOneData.put("Satrap", lcGrpInfoSSRS.GetText(1,65));//负责人
/******************************************************** /********************************************************
* 投保险种信息 * 投保险种信息
@ -616,6 +623,8 @@ public class LCContPrtPrintBL implements BusinessService {
object.put("ContPlanCode",planInfoSSRS.GetText(i, 1)); object.put("ContPlanCode",planInfoSSRS.GetText(i, 1));
object.put("ContPlanName",planInfoSSRS.GetText(i, 2)); object.put("ContPlanName",planInfoSSRS.GetText(i, 2));
object.put("riskName",planInfoSSRS.GetText(i, 12)); object.put("riskName",planInfoSSRS.GetText(i, 12));
object.put("EnterPriseBurden",planInfoSSRS.GetText(i, 14));//单位交费合计
object.put("PersonBurden",planInfoSSRS.GetText(i, 15));//个人交费合计
if(planInfoSSRS.GetText(i, 3) == null || "".equals(planInfoSSRS.GetText(i, 3))){ if(planInfoSSRS.GetText(i, 3) == null || "".equals(planInfoSSRS.GetText(i, 3))){
object.put("Amnt","---"); object.put("Amnt","---");
@ -835,11 +844,11 @@ public class LCContPrtPrintBL implements BusinessService {
*******************************************************/ *******************************************************/
JSONObject jsonSaleInfo = new JSONObject(); JSONObject jsonSaleInfo = new JSONObject();
JSONObject jsonSaleInfoData = new JSONObject(); JSONObject jsonSaleInfoData = new JSONObject();
jsonSaleInfo.put("filesOrder",2); // jsonSaleInfo.put("filesOrder",2);
jsonSaleInfo.put("filesType","docx"); // jsonSaleInfo.put("filesType","docx");
jsonSaleInfo.put("data",jsonSaleInfoData); // jsonSaleInfo.put("data",jsonSaleInfoData); //暂时注释掉
jsonArray.add(jsonSaleInfo); // jsonArray.add(jsonSaleInfo);
jsonSaleInfoData.put("AskPrtNo",mGrpPropNo); jsonSaleInfoData.put("AskPrtNo",mGrpPropNo);
jsonSaleInfoData.put("AskNo",lcGrpInfoSSRS.GetText(1,1)); jsonSaleInfoData.put("AskNo",lcGrpInfoSSRS.GetText(1,1));
@ -916,15 +925,15 @@ public class LCContPrtPrintBL implements BusinessService {
JSONObject jsonInsuredInfo = new JSONObject(); JSONObject jsonInsuredInfo = new JSONObject();
JSONObject jsonInsuredInfoData = new JSONObject(); JSONObject jsonInsuredInfoData = new JSONObject();
JSONArray insuedList = new JSONArray(); JSONArray insuedList = new JSONArray();
jsonInsuredInfo.put("data", jsonInsuredInfoData); // jsonInsuredInfo.put("data", jsonInsuredInfoData);
jsonInsuredInfo.put("filesOrder", 3); // jsonInsuredInfo.put("filesOrder", 3);
jsonInsuredInfo.put("filesType", "docx"); // jsonInsuredInfo.put("filesType", "docx"); //暂时注掉
jsonInsuredInfoData.put("GrpName", lcGrpInfoSSRS.GetText(1, 2)); //ZCNTODO 投保单位名称 // jsonInsuredInfoData.put("GrpName", lcGrpInfoSSRS.GetText(1, 2)); //ZCNTODO 投保单位名称
jsonInsuredInfoData.put("AskPrtNo", mGrpPropNo); //ZCNTODO 投保单号码 // jsonInsuredInfoData.put("AskPrtNo", mGrpPropNo); //ZCNTODO 投保单号码
jsonInsuredInfoData.put("InsuedList", insuedList); // jsonInsuredInfoData.put("InsuedList", insuedList);
jsonArray.add(jsonInsuredInfo); // jsonArray.add(jsonInsuredInfo);
SSRS insuredInfoSSRS = lcContPrtPrintBLSQL.getInsuredInfoByGrpPropNo(mGrpPropNo); SSRS insuredInfoSSRS = lcContPrtPrintBLSQL.getInsuredInfoByGrpPropNo(mGrpPropNo);

@ -104,7 +104,13 @@ public interface LCContPrtPrintBLSQL {
WHEN '0' THEN '开通' WHEN '0' THEN '开通'
ELSE '关闭' ELSE '关闭'
END END
FROM LDPBalanceOn ld WHERE ld.GrpContNo= a.GrpContNo) FROM LDPBalanceOn ld WHERE ld.GrpContNo= a.GrpContNo),
a.FoundDate,
b.PostalAddress,
b.ControlTRType,
b.InstitutionsCategory,
b.Satrap,
a.OutPayFlag
from lcgrpcont a from lcgrpcont a
JOIN LCGrpAppnt b ON a.GrpContNo = b.GrpContNo JOIN LCGrpAppnt b ON a.GrpContNo = b.GrpContNo
JOIN LCGrpContactInfo c ON a.GrpContNo = c.GrpContNo JOIN LCGrpContactInfo c ON a.GrpContNo = c.GrpContNo
@ -166,7 +172,9 @@ public interface LCContPrtPrintBLSQL {
b.DutyCode , b.DutyCode ,
ifnull((select codename from ldcode where codetype='medicaflag' and code=c.P4),'---'), ifnull((select codename from ldcode where codetype='medicaflag' and code=c.P4),'---'),
d.RiskName, d.RiskName,
case c.p11 when '0' then '0天' when '3' then '3天' end case c.p11 when '0' then '0天' when '3' then '3天' end,
a.EnterPriseBurden,
a.PersonBurden
from lccontplan a, lccontplandetail b,lccontplandetailsub c,lmrisk d where a.GrpContNo =b.PolicyNo and a.ContPlanCode =b.SysPlanCode and b.RiskCode = d.RiskCode from lccontplan a, lccontplandetail b,lccontplandetailsub c,lmrisk d where a.GrpContNo =b.PolicyNo and a.ContPlanCode =b.SysPlanCode and b.RiskCode = d.RiskCode
and b.PolicyNo =c.PolicyNo and b.SysPlanCode =c.SysPlanCode and b.RiskCode =c.RiskCode and b.DutyCode =c.DutyCode and a.GrpContNo ='?mGrpPropNo?' order by a.PlanCode,b.DutyCode and b.PolicyNo =c.PolicyNo and b.SysPlanCode =c.SysPlanCode and b.RiskCode =c.RiskCode and b.DutyCode =c.DutyCode and a.GrpContNo ='?mGrpPropNo?' order by a.PlanCode,b.DutyCode
""") """)

Loading…
Cancel
Save