diff --git a/lis-framework-base/src/main/java/com/sinosoft/lis/pubfun/DateUtil.java b/lis-framework-base/src/main/java/com/sinosoft/lis/pubfun/DateUtil.java
index 9a5c2c69..3ae3b4cb 100644
--- a/lis-framework-base/src/main/java/com/sinosoft/lis/pubfun/DateUtil.java
+++ b/lis-framework-base/src/main/java/com/sinosoft/lis/pubfun/DateUtil.java
@@ -836,4 +836,22 @@ public class DateUtil {
}
return ttStr;
}
+
+ /**
+ * 将输入的字符串进行转换,如果为空,则返回"",如果不空,则返回该字符串去掉前后空格
+ *
+ * @param startDate
+ * @param dayGap
+ * 输入字符串
+ * @return 如果为空,则返回"",如果不空,则返回该字符串去掉前后空格
+ */
+ public static String calEndDate(String startDate, int dayGap) {
+ FDate fDate = new FDate();
+ Date date = fDate.getDate(startDate);
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.add(Calendar.DAY_OF_MONTH, dayGap);
+ String endDate = fDate.getString(calendar.getTime());
+ return endDate;
+ }
}
diff --git a/lis-http-client/src/main/java/com/sinosoft/lis/wsclient/AskPlanInfoService.java b/lis-http-client/src/main/java/com/sinosoft/lis/wsclient/AskPlanInfoService.java
new file mode 100644
index 00000000..460d705a
--- /dev/null
+++ b/lis-http-client/src/main/java/com/sinosoft/lis/wsclient/AskPlanInfoService.java
@@ -0,0 +1,288 @@
+package com.sinosoft.lis.wsclient;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.nio.charset.StandardCharsets;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * 询价计划信息服务
+ * 调用外部WebService接口查询AskPlan信息
+ */
+@Service
+public class AskPlanInfoService {
+
+ private static final Logger log = LoggerFactory.getLogger(AskPlanInfoService.class);
+
+ // 接口地址
+ private static final String WS_URL = "http://112.124.61.57:9998/ws/dealDataWebService";
+
+ // 业务参数
+ private static final String SYS_CODE = "GCS2ASK20191123000001";
+ private static final String FUNC_FLAG = "GRFQ000002";
+
+ // SOAP命名空间(根据实际WSDL调整)
+ private static final String SOAP_NAMESPACE = "http://webservice.sinosoft.com.cn";
+
+ /**
+ * 查询询价计划信息
+ *
+ * @param askNo 询价单号(如:17751055)
+ * @return 响应XML字符串,失败返回null
+ */
+ public String queryAskPlanInfo(String askNo, String batchNo) {
+ // 参数校验
+ if (askNo == null || askNo.trim().isEmpty()) {
+ log.error("查询AskPlanInfo失败:askNo参数为空");
+ return null;
+ }
+ if (batchNo == null || batchNo.trim().isEmpty()) {
+ log.error("查询AskPlanInfo失败:batchNo参数为空");
+ return null;
+ }
+
+ log.info("开始查询AskPlanInfo,询价单号: {},批次号: {}", askNo,batchNo);
+
+ try {
+ // 1. 构建业务XML(CDATA中的内容)
+ String businessXml = buildBusinessXml(askNo, batchNo);
+ log.debug("业务XML:\n{}", businessXml);
+
+ // 2. 构建SOAP请求(业务XML放在CDATA中)
+ String soapRequest = buildSoapRequest(businessXml);
+ log.info("SOAP请求:\n{}", soapRequest);
+
+ // 3. 发送SOAP请求
+ String soapResponse = sendSoapRequest(soapRequest);
+ if (soapResponse == null) {
+ log.error("SOAP请求返回空响应");
+ return null;
+ }
+ log.info("SOAP响应:\n{}", soapResponse);
+
+ // 4. 从SOAP响应中提取业务响应
+ String businessResponse = extractBusinessResponse(soapResponse);
+ if (businessResponse == null) {
+ log.error("提取业务响应失败");
+ return null;
+ }
+ log.info("业务响应:\n{}", businessResponse);
+
+ // 5. 检查业务返回码
+ String returnCode = extractXmlValue(businessResponse, "ReturnCode");
+ if ("000000".equals(returnCode)) {
+ log.info("查询成功,询价单号: {}", askNo);
+ } else {
+ String message = extractXmlValue(businessResponse, "Message");
+ log.warn("查询返回非成功状态,返回码: {}, 消息: {}", returnCode, message);
+ }
+
+ return businessResponse;
+
+ } catch (Exception e) {
+ log.error("查询AskPlanInfo异常,询价单号: {}", askNo, e);
+ return null;
+ }
+ }
+
+ /**
+ * 构建业务XML(将被放在CDATA中)
+ */
+ private String buildBusinessXml(String askNo, String batchNo) {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
+ SimpleDateFormat timeFormat = new SimpleDateFormat("HHmmss");
+ Date now = new Date();
+
+ StringBuilder xml = new StringBuilder();
+ xml.append("\n");
+ xml.append("\n");
+ xml.append(" \n");
+ xml.append(" \n");
+ xml.append(" ").append(SYS_CODE).append("\n");
+ xml.append(" ").append(FUNC_FLAG).append("\n");
+ xml.append(" ").append(dateFormat.format(now)).append("\n");
+ xml.append(" ").append(timeFormat.format(now)).append("\n");
+ xml.append(" \n");
+ xml.append(" \n");
+ xml.append(" ").append(escapeXml(askNo)).append("\n");
+ xml.append(" ").append(escapeXml(batchNo)).append("\n");
+// xml.append(" ").append(dateFormat.format(now)).append("\n"); // 改成 yyyyMMdd
+ xml.append(" \n"); // 改成 yyyyMMdd
+ xml.append(" \n");
+ xml.append(" \n");
+ xml.append("");
+
+ return xml.toString();
+ }
+ /**
+ * 构建SOAP请求(CDATA包装业务XML)
+ */
+ private String buildSoapRequest(String businessXml) {
+ StringBuilder soap = new StringBuilder();
+ soap.append("\n");
+ soap.append("\n");
+ soap.append(" \n");
+ soap.append(" \n");
+ soap.append(" \n");
+ soap.append(" \n");
+ soap.append(" \n");
+ soap.append(" \n");
+ soap.append("");
+
+ return soap.toString();
+ }
+
+ /**
+ * 发送SOAP请求
+ */
+ private String sendSoapRequest(String soapRequest) {
+ try {
+ // 创建HttpClient
+ HttpClient client = HttpClient.newBuilder()
+ .connectTimeout(java.time.Duration.ofSeconds(30))
+ .build();
+
+ // 构建HttpRequest
+ HttpRequest request = HttpRequest.newBuilder()
+ .uri(URI.create(WS_URL))
+ .header("Content-Type", "text/xml; charset=UTF-8")
+ .header("SOAPAction", "")
+ .POST(HttpRequest.BodyPublishers.ofString(soapRequest, StandardCharsets.UTF_8))
+ .build();
+
+ // 发送请求
+ HttpResponse response = client.send(request,
+ HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));
+
+ int statusCode = response.statusCode();
+ log.info("HTTP响应状态码: {}", statusCode);
+
+ if (statusCode != 200) {
+ log.error("HTTP请求失败,状态码: {}, 响应: {}", statusCode, response.body());
+ return null;
+ }
+
+ String responseBody = response.body();
+
+ // 检查是否有SOAP错误
+ if (responseBody.contains("") || responseBody.contains("")) {
+ log.error("SOAP调用失败: {}", responseBody);
+ return null;
+ }
+
+ return responseBody;
+
+ } catch (IOException | InterruptedException e) {
+ log.error("发送SOAP请求异常", e);
+ Thread.currentThread().interrupt();
+ return null;
+ }
+ }
+
+ private String extractBusinessResponse(String soapResponse) {
+ if (soapResponse == null) {
+ return null;
+ }
+
+ // 查找 标签
+ String startTag = "";
+ String endTag = "";
+
+ int startIdx = soapResponse.indexOf(startTag);
+ if (startIdx == -1) {
+ log.warn("未找到标签");
+ return soapResponse;
+ }
+
+ int endIdx = soapResponse.indexOf(endTag, startIdx);
+ if (endIdx == -1) {
+ log.warn("未找到标签");
+ return soapResponse;
+ }
+
+ // 提取并反转义
+ String escapedXml = soapResponse.substring(startIdx + startTag.length(), endIdx);
+ String unescapedXml = unescapeXml(escapedXml);
+
+ log.debug("提取的业务响应:\n{}", unescapedXml);
+ return unescapedXml;
+ }
+
+ /**
+ * XML反转义(完整版)
+ */
+ private String unescapeXml(String text) {
+ if (text == null) {
+ return null;
+ }
+
+ // 先替换字符实体(注意顺序:& 要最后处理,避免重复替换)
+ String result = text
+ .replace("<", "<")
+ .replace(">", ">")
+ .replace(""", "\"")
+ .replace("'", "'")
+ .replace("
", "\r") // 回车 CR (十进制)
+ .replace("
", "\n") // 换行 LF (十进制)
+ .replace("
", "\r") // 回车 CR (十六进制小写)
+ .replace("
", "\r") // 回车 CR (十六进制大写)
+ .replace("
", "\n") // 换行 LF (十六进制小写)
+ .replace("
", "\n") // 换行 LF (十六进制大写)
+ .replace("&", "&"); // & 符号最后处理
+
+ // 可选:移除或替换特殊控制字符
+ result = result
+ .replace("\r\n", "\n") // 统一换行符
+ .replace("\r", "\n"); // 单独的回车也转成换行
+
+ return result;
+ }
+
+
+ /**
+ * 从XML中提取指定标签的值
+ */
+ private String extractXmlValue(String xml, String tag) {
+ if (xml == null || tag == null) {
+ return "";
+ }
+
+ String startTag = "<" + tag + ">";
+ String endTag = "" + tag + ">";
+
+ int startIdx = xml.indexOf(startTag);
+ if (startIdx == -1) {
+ return "";
+ }
+
+ int endIdx = xml.indexOf(endTag, startIdx);
+ if (endIdx == -1) {
+ return "";
+ }
+
+ return xml.substring(startIdx + startTag.length(), endIdx);
+ }
+
+ /**
+ * XML特殊字符转义
+ */
+ private String escapeXml(String text) {
+ if (text == null) {
+ return "";
+ }
+ return text.replace("&", "&")
+ .replace("<", "<")
+ .replace(">", ">")
+ .replace("\"", """)
+ .replace("'", "'");
+ }
+}
\ No newline at end of file
diff --git a/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/controller/g_app/LCPropPrintBL.java b/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/controller/g_app/LCPropPrintBL.java
index 1667c0b6..1cc5947f 100644
--- a/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/controller/g_app/LCPropPrintBL.java
+++ b/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/controller/g_app/LCPropPrintBL.java
@@ -1,5 +1,6 @@
package com.sinosoft.lis.controller.g_app;
+import com.sinosoft.lis.g_quot.LSQuotPubFun;
import com.sinosoft.lis.i18n.I18nMessage;
import com.sinosoft.lis.pubfun.DateUtil;
import com.sinosoft.lis.pubfun.MMap;
@@ -9,6 +10,7 @@ import com.sinosoft.lis.request.g_app.TXRequest;
import com.sinosoft.lis.response.g_app.TXResponse;
import com.sinosoft.lis.schema.*;
import com.sinosoft.lis.utils.XmlUtil;
+import com.sinosoft.lis.vschema.*;
import com.sinosoft.service.BusinessService;
import com.sinosoft.utility.CError;
import com.sinosoft.utility.CErrors;
@@ -16,9 +18,10 @@ import com.sinosoft.utility.TransferData;
import com.sinosoft.utility.VData;
import org.apache.commons.lang.StringUtils;
-import java.util.List;
-import java.util.Random;
-import java.util.UUID;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
public class LCPropPrintBL implements BusinessService {
@@ -133,7 +136,7 @@ public class LCPropPrintBL implements BusinessService {
System.out.println("--- 请求报文 ---\n" + requestXml);
// 调用询价系统获取数据
- String responseXmlStr = "";
+ String responseXmlStr = (String) mTransferData.getValueByName("result");
if(StringUtils.isEmpty(responseXmlStr)){
//询价获取数据为空
return false;
@@ -165,7 +168,7 @@ public class LCPropPrintBL implements BusinessService {
inquirygroupbackupSchema.setRELAASKCONT(transBody.getRelaAskCont());
inquirygroupbackupSchema.setINSUYEAR(transBody.getInsuYear());
inquirygroupbackupSchema.setINSUYEARFLAG(transBody.getInsuYearFlag());
- inquirygroupbackupSchema.setEXPPEOPLES(transBody.getExpPeoples());
+ inquirygroupbackupSchema.setEXPPEOPLES(transBody.getExpPeoples()== null ? 0 : transBody.getExpPeoples());
inquirygroupbackupSchema.setCALFEEMETHOD(transBody.getCalFeeMethod());
inquirygroupbackupSchema.setSTRUCTUREAREA(transBody.getStructureArea());
inquirygroupbackupSchema.setOCCUPATIONTYPE(transBody.getOccupationType());
@@ -204,6 +207,7 @@ public class LCPropPrintBL implements BusinessService {
// lsquotation(询价申请表)
LSQuotationSchema lsQuotationSchema = new LSQuotationSchema();
lsQuotationSchema.setQuotNo(AskNo);
+ lsQuotationSchema.setQuotType("00");
lsQuotationSchema.setManageCom(manageCom);//管理机构todo
lsQuotationSchema.setComCode("86");
// lsQuotationSchema.setComCode()//comcode 公司代码
@@ -213,6 +217,9 @@ public class LCPropPrintBL implements BusinessService {
lsQuotationSchema.setModifyOperator("");//modifyoperator 修改人
lsQuotationSchema.setModifyDate(DateUtil.getCurrentDate());//modifydate 修改日期
lsQuotationSchema.setModifyTime(DateUtil.getCurrentTime());//modifytime 修改时间
+ if (lsQuotationSchema != null) {
+ mMMap.put(lsQuotationSchema, MMap.Action.DELETE_INSERT);
+ }
//询价基本信息表
LSQuotBasicSchema lsQuotBasicSchema = new LSQuotBasicSchema();
@@ -222,14 +229,15 @@ public class LCPropPrintBL implements BusinessService {
lsQuotBasicSchema.setGrpNature(transBody.getGrpNature());//单位性质
lsQuotBasicSchema.setBusiCategory(transBody.getBusinessType());//行业类别
- lsQuotBasicSchema.setProdType("01");//prodtype 产品类型
+ lsQuotBasicSchema.setProdType("00");//prodtype 产品类型
lsQuotBasicSchema.setSaleChannel(transBody.getSalechnl());//salechannel 销售渠道
// lsQuotBasicSchema.setPremMode();//premmode 保费分摊方式 todo 字段码值待确认
// lsQuotBasicSchema.setPrePrem();//preprem 预计保费规模 todo 询价会传
lsQuotBasicSchema.setRenewFlag(transBody.getRepeatBill());//renewflag 续保标志
lsQuotBasicSchema.setBlanketFlag("0");//blanketflag 统括标志todo 默认为否
lsQuotBasicSchema.setCoinsurance(transBody.getPriMartFlag());//coinsurance 是否共保 todo 传空默认为否
- lsQuotBasicSchema.setManageCom(manageCom);//managecom 管理机构
+ lsQuotBasicSchema.setQuotState("02");//设置默认状态
+ lsQuotBasicSchema.setManageCom(manageCom);//managecom 管理机构LCProposalSelectPlanInput.jsp
lsQuotBasicSchema.setComCode(manageCom);//comcode 机构代码
lsQuotBasicSchema.setMakeOperator(operator);//makeoperator 创建人
lsQuotBasicSchema.setMakeDate(DateUtil.getCurrentDate());//makedate 创建日期
@@ -238,16 +246,20 @@ public class LCPropPrintBL implements BusinessService {
lsQuotBasicSchema.setModifyDate(DateUtil.getCurrentDate());//modifydate 修改日期
lsQuotBasicSchema.setModifyTime(DateUtil.getCurrentTime());//modifytime 修改时间
// lsQuotBasicSchema.setIsAllowSubQuot();//isallowsubquot 是否允许子报价 todo 无响应字段 暂无具体逻辑,待确认
+ lsQuotBasicSchema.setIsHealthy("0");
lsQuotBasicSchema.setOperSource(transBody.getBussinessSource());//opersource 客户来源 todo 可以传,枚举值待确认
// lsQuotBasicSchema.setAgentCode(); //agentcode todo代理人代码
// lsQuotBasicSchema.setAgentCom();//agentcom todo代理机构
lsQuotBasicSchema.setIsFreeRisk("0");//isfreerisk 是否自由责任
+ lsQuotBasicSchema.setForceChkProfessRate("0");//forcechknum 强制检验职业占比
lsQuotBasicSchema.setForceChkNum("0");//forcechknum 强制校验人数
lsQuotBasicSchema.setIsContinueInsure("0");//iscontinueinsure 是否为连续投保
lsQuotBasicSchema.setIsSubQuot("0");//issubquot 是否子报价
lsQuotBasicSchema.setSpecailAgreement(transBody.getRemark());//specailagreement 特别约定
lsQuotBasicSchema.setApproveSpecailAgreement(transBody.getRemark());//approvespecailagreement 审批版特别约定
lsQuotBasicSchema.setIsSpeAgrTemplate("0");//isspeagrtemplate 是否使用特别约定模板
+ String quotEndDate = DateUtil.calEndDate(transBody.getAskFinishDate(), Integer.parseInt(transBody.getOtherReqDesTime()));
+ lsQuotBasicSchema.setQuotEndDate(quotEndDate);//询价有效期止期
lsQuotBasicSchema.setTmpQuotValidate(transBody.getOtherReqDesTime());//tmpquotvalidate 询价临时有效期
lsQuotBasicSchema.setPayIntv(transBody.getPayIntv());//payintv 缴费方式
lsQuotBasicSchema.setIsWait("0");//iswait 是否等待期
@@ -258,6 +270,92 @@ public class LCPropPrintBL implements BusinessService {
// 遍历方案列表
if (transBody.getContPlans() != null) {
List contPlans = transBody.getContPlans();
+
+ List result = contPlans.stream()
+ .collect(Collectors.toMap(
+ TXResponse.Plan::getContPlanCode,
+ plan -> {
+ TXResponse.Plan simple = new TXResponse.Plan();
+ simple.setContPlanCode(plan.getContPlanCode());
+ simple.setContPlanName(plan.getContPlanName());
+ return simple;
+ },
+ (existing, replacement) -> existing
+ ))
+ .values()
+ .stream()
+ .collect(Collectors.toList());
+
+ LSQuotPlanSet lsQuotPlanSet = new LSQuotPlanSet();
+
+ for (TXResponse.Plan plan : result) {
+ LSQuotPlanSchema lsQuotPlanSchema = new LSQuotPlanSchema();
+ lsQuotPlanSchema.setQuotNo(AskNo);//quotno 报价单号
+ lsQuotPlanSchema.setQuotBatNo(AskBatchNo);//quotbatno 报价批次号
+ lsQuotPlanSchema.setSysPlanCode(plan.getContPlanCode());//sysplancode 系统方案编码
+ lsQuotPlanSchema.setPlanCode(plan.getContPlanCode());//plancode 方案编码
+ lsQuotPlanSchema.setPlanDesc(plan.getContPlanName());//plandesc 方案描述
+ lsQuotPlanSchema.setPremCalType(transBody.getCalFeeMethod());//premcaltype 保费计算方式 todo CalFeeMethod
+ lsQuotPlanSchema.setInsuPeriod(transBody.getInsuYear());//insuperiod 保险期间 todo 无响应字段
+ lsQuotPlanSchema.setInsuPeriodFlag(transBody.getInsuYearFlag());//insuperiodflag 保险期间单位 todo 无响应字段
+ lsQuotPlanSchema.setNumPeople(transBody.getExpPeoples()== null ? 0 : transBody.getExpPeoples());//numpeople 人数 todo 无响应字段
+ lsQuotPlanSchema.setMakeOperator(operator);//makeoperator 创建人
+ lsQuotPlanSchema.setMakeDate(DateUtil.getCurrentDate());//makedate 创建日期
+ lsQuotPlanSchema.setMakeTime(DateUtil.getCurrentTime());//maketime 创建时间
+ lsQuotPlanSchema.setModifyOperator("");//modifyoperator 修改人
+ lsQuotPlanSchema.setModifyDate(DateUtil.getCurrentDate());//modifydate 修改日期
+ lsQuotPlanSchema.setModifyTime(DateUtil.getCurrentTime());//modifytime 修改时间
+// lsQuotPlanSchema.setProfession1();//profession1 职业类别1
+// lsQuotPlanSchema.setProfession2();//profession2 职业类别2
+// lsQuotPlanSchema.setProfession3();//profession3 职业类别3
+// lsQuotPlanSchema.setProfession4();//profession4 职业类别4
+// lsQuotPlanSchema.setProfession5();//profession5 职业类别5
+// lsQuotPlanSchema.setProfession6();//profession6 职业类别6
+ lsQuotPlanSet.add(lsQuotPlanSchema);
+ }
+ if (lsQuotPlanSet != null && lsQuotPlanSet.size() > 0) {
+ mMMap.put(lsQuotPlanSet, MMap.Action.DELETE_INSERT);
+ }
+
+ //lsquotfee(询价销售费用表)
+ List riskResult = contPlans.stream()
+ .collect(Collectors.toMap(
+ plan -> plan.getRiskCode(),
+ plan -> {
+ TXResponse.Plan simple = new TXResponse.Plan();
+ simple.setRiskCode(plan.getRiskCode());
+ return simple;
+ },
+ (existing, replacement) -> existing
+ ))
+ .values()
+ .stream()
+ .collect(Collectors.toList());
+
+ LSQuotFeeSet lsQuotFeeSet = new LSQuotFeeSet();
+
+ for (TXResponse.Plan plan : riskResult) {
+ LSQuotFeeSchema lsQuotFeeSchema = new LSQuotFeeSchema();
+ lsQuotFeeSchema.setQuotNo(AskNo);
+ lsQuotFeeSchema.setQuotBatNo(AskBatchNo);
+ lsQuotFeeSchema.setRiskCode(plan.getRiskCode());
+ lsQuotFeeSchema.setMakeOperator(operator);//makeoperator 创建人
+ lsQuotFeeSchema.setMakeDate(DateUtil.getCurrentDate());//makedate 创建日期
+ lsQuotFeeSchema.setMakeTime(DateUtil.getCurrentTime());//maketime 创建时间
+ lsQuotFeeSchema.setModifyOperator("");//modifyoperator 修改人
+ lsQuotFeeSchema.setModifyDate(DateUtil.getCurrentDate());//modifydate 修改日期
+ lsQuotFeeSchema.setModifyTime(DateUtil.getCurrentTime());//modifytime 修改时间
+ if (lsQuotFeeSchema != null) {
+ mMMap.put(lsQuotFeeSchema, MMap.Action.DELETE_INSERT);
+ }
+ }
+ if (lsQuotFeeSet != null && lsQuotFeeSet.size() > 0) {
+ mMMap.put(lsQuotFeeSet, MMap.Action.DELETE_INSERT);
+ }
+
+ LSQuotPlanDetailSet lsQuotPlanDetailSet = new LSQuotPlanDetailSet();
+ LSQuotPlanDetailSubSet lsQuotPlanDetailSubSet = new LSQuotPlanDetailSubSet();
+
for (TXResponse.Plan plan : contPlans) {
System.out.println("险种代码:" + plan.getRiskCode());
@@ -313,31 +411,31 @@ public class LCPropPrintBL implements BusinessService {
//(询价方案表)
- LSQuotPlanSchema lsQuotPlanSchema = new LSQuotPlanSchema();
- lsQuotPlanSchema.setQuotNo(AskNo);//quotno 报价单号
- lsQuotPlanSchema.setQuotBatNo(AskBatchNo);//quotbatno 报价批次号
- lsQuotPlanSchema.setSysPlanCode(plan.getContPlanCode());//sysplancode 系统方案编码
- lsQuotPlanSchema.setPlanCode(plan.getContPlanCode());//plancode 方案编码
- lsQuotPlanSchema.setPlanDesc(plan.getContPlanName());//plandesc 方案描述
- lsQuotPlanSchema.setPremCalType(transBody.getCalFeeMethod());//premcaltype 保费计算方式 todo CalFeeMethod
- lsQuotPlanSchema.setInsuPeriod(transBody.getInsuYear());//insuperiod 保险期间 todo 无响应字段
- lsQuotPlanSchema.setInsuPeriodFlag(transBody.getInsuYearFlag());//insuperiodflag 保险期间单位 todo 无响应字段
- lsQuotPlanSchema.setNumPeople(transBody.getExpPeoples());//numpeople 人数 todo 无响应字段
- lsQuotPlanSchema.setMakeOperator(operator);//makeoperator 创建人
- lsQuotPlanSchema.setMakeDate(DateUtil.getCurrentDate());//makedate 创建日期
- lsQuotPlanSchema.setMakeTime(DateUtil.getCurrentTime());//maketime 创建时间
- lsQuotPlanSchema.setModifyOperator("");//modifyoperator 修改人
- lsQuotPlanSchema.setModifyDate(DateUtil.getCurrentDate());//modifydate 修改日期
- lsQuotPlanSchema.setModifyTime(DateUtil.getCurrentTime());//modifytime 修改时间
-// lsQuotPlanSchema.setProfession1();//profession1 职业类别1
-// lsQuotPlanSchema.setProfession2();//profession2 职业类别2
-// lsQuotPlanSchema.setProfession3();//profession3 职业类别3
-// lsQuotPlanSchema.setProfession4();//profession4 职业类别4
-// lsQuotPlanSchema.setProfession5();//profession5 职业类别5
-// lsQuotPlanSchema.setProfession6();//profession6 职业类别6
- if (lsQuotPlanSchema != null) {
- mMMap.put(lsQuotPlanSchema, MMap.Action.DELETE_INSERT);
- }
+// LSQuotPlanSchema lsQuotPlanSchema = new LSQuotPlanSchema();
+// lsQuotPlanSchema.setQuotNo(AskNo);//quotno 报价单号
+// lsQuotPlanSchema.setQuotBatNo(AskBatchNo);//quotbatno 报价批次号
+// lsQuotPlanSchema.setSysPlanCode(plan.getContPlanCode());//sysplancode 系统方案编码
+// lsQuotPlanSchema.setPlanCode(plan.getContPlanCode());//plancode 方案编码
+// lsQuotPlanSchema.setPlanDesc(plan.getContPlanName());//plandesc 方案描述
+// lsQuotPlanSchema.setPremCalType(transBody.getCalFeeMethod());//premcaltype 保费计算方式 todo CalFeeMethod
+// lsQuotPlanSchema.setInsuPeriod(transBody.getInsuYear());//insuperiod 保险期间 todo 无响应字段
+// lsQuotPlanSchema.setInsuPeriodFlag(transBody.getInsuYearFlag());//insuperiodflag 保险期间单位 todo 无响应字段
+// lsQuotPlanSchema.setNumPeople(transBody.getExpPeoples()== null ? 0 : transBody.getExpPeoples());//numpeople 人数 todo 无响应字段
+// lsQuotPlanSchema.setMakeOperator(operator);//makeoperator 创建人
+// lsQuotPlanSchema.setMakeDate(DateUtil.getCurrentDate());//makedate 创建日期
+// lsQuotPlanSchema.setMakeTime(DateUtil.getCurrentTime());//maketime 创建时间
+// lsQuotPlanSchema.setModifyOperator("");//modifyoperator 修改人
+// lsQuotPlanSchema.setModifyDate(DateUtil.getCurrentDate());//modifydate 修改日期
+// lsQuotPlanSchema.setModifyTime(DateUtil.getCurrentTime());//modifytime 修改时间
+//// lsQuotPlanSchema.setProfession1();//profession1 职业类别1
+//// lsQuotPlanSchema.setProfession2();//profession2 职业类别2
+//// lsQuotPlanSchema.setProfession3();//profession3 职业类别3
+//// lsQuotPlanSchema.setProfession4();//profession4 职业类别4
+//// lsQuotPlanSchema.setProfession5();//profession5 职业类别5
+//// lsQuotPlanSchema.setProfession6();//profession6 职业类别6
+// if (lsQuotPlanSchema != null) {
+// mMMap.put(lsQuotPlanSchema, MMap.Action.DELETE_INSERT);
+// }
// lsquotplandetail(询价方案明细表)
LSQuotPlanDetailSchema lsQuotPlanDetailSchema = new LSQuotPlanDetailSchema();
@@ -363,14 +461,36 @@ public class LCPropPrintBL implements BusinessService {
lsQuotPlanDetailSchema.setModifyOperator("");//modifyoperator 修改人
lsQuotPlanDetailSchema.setModifyDate(DateUtil.getCurrentDate());//modifydate 修改日期
lsQuotPlanDetailSchema.setModifyTime(DateUtil.getCurrentTime());//modifytime 修改时间
- if (lsQuotPlanDetailSchema != null) {
- mMMap.put(lsQuotPlanDetailSchema, MMap.Action.DELETE_INSERT);
- }
+ lsQuotPlanDetailSet.add(lsQuotPlanDetailSchema);
+// if (lsQuotPlanDetailSchema != null) {
+// mMMap.put(lsQuotPlanDetailSchema, MMap.Action.DELETE_INSERT);
+// }
+
+ //lsquotplandetailsub(询价方案明细表)
+ LSQuotPlanDetailSubSchema lsQuotPlanDetailSubSchema = new LSQuotPlanDetailSubSchema();
+ lsQuotPlanDetailSubSchema.setQuotNo(AskNo);//quotno 报价单号
+ lsQuotPlanDetailSubSchema.setQuotBatNo(AskBatchNo);//quotbatno 报价批次号
+ lsQuotPlanDetailSubSchema.setSysPlanCode(plan.getContPlanCode());//sysplancode 系统计划代码
+ lsQuotPlanDetailSubSchema.setPlanCode(plan.getContPlanCode());//plancode 计划代码
+ lsQuotPlanDetailSubSchema.setRiskCode(plan.getRiskCode());//riskcode 险种代码
+ lsQuotPlanDetailSubSchema.setDutyCode(plan.getDutyCode());//dutycode 责任代码
+ lsQuotPlanDetailSubSet.add(lsQuotPlanDetailSubSchema);
+// if (lsQuotPlanDetailSubSchema != null) {
+// mMMap.put(lsQuotPlanDetailSubSchema, MMap.Action.DELETE_INSERT);
+// }
+ }
+ if (lsQuotPlanDetailSet != null && lsQuotPlanDetailSet.size() > 0) {
+ mMMap.put(lsQuotPlanDetailSet, MMap.Action.DELETE_INSERT);
+ }
+ if (lsQuotPlanDetailSubSet != null && lsQuotPlanDetailSubSet.size() > 0) {
+ mMMap.put(lsQuotPlanDetailSubSet, MMap.Action.DELETE_INSERT);
}
}
if (StringUtils.isNotEmpty(transBody.getPriMartFlag())) {
//lsquotcoinsurance(询价共保表)
LSQuotCoinsuranceSchema lsQuotCoinsuranceSchema = new LSQuotCoinsuranceSchema();
+ String serialsNo = LSQuotPubFun.getCoinsuranceNo();
+ lsQuotCoinsuranceSchema.setSerialNo(serialsNo); //quotno 报价单号 页面映射
lsQuotCoinsuranceSchema.setQuotNo(AskNo); //quotno 报价单号 页面映射
lsQuotCoinsuranceSchema.setQuotBatNo(AskBatchNo);///quotbatno 报价批次号 页面映射
lsQuotCoinsuranceSchema.setMasterSlaveFlag(transBody.getPriMartFlag());//masterslaveflag 主从标志 页面输入 共保主/从方标志
diff --git a/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/controller/g_app/LCPropPrintController.java b/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/controller/g_app/LCPropPrintController.java
index a556ac0a..cf744cd2 100644
--- a/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/controller/g_app/LCPropPrintController.java
+++ b/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/controller/g_app/LCPropPrintController.java
@@ -15,13 +15,19 @@ import com.sinosoft.lis.schema.LCProposalSchema;
import com.sinosoft.lis.vo.EasyQuerySQLVO;
import com.sinosoft.lis.vo.EasyQueryVO;
import com.sinosoft.lis.vo.g_app.LCPropPrintVO;
+import com.sinosoft.lis.wsclient.AskPlanInfoService;
+import com.sinosoft.lis.wsclient.SoapRequestGenerator;
import com.sinosoft.service.stereotype.QueryMapping;
import com.sinosoft.service.stereotype.QueryParam;
import com.sinosoft.utility.TransferData;
import com.sinosoft.utility.VData;
import io.swagger.annotations.ApiOperation;
+import jakarta.validation.Valid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -38,6 +44,10 @@ public class LCPropPrintController {
private static final String BUSINAME = "LCPropPrintUI";
+
+ @Autowired
+ private AskPlanInfoService askPlanInfoService;
+
@ResponseBody
@ApiOperation("团险合并-->新單管理-->投保书打印")
@PostMapping(value = "/g_app/LCPropPrintSave/" + Action.UPDATE_ACTION)
@@ -117,7 +127,8 @@ public class LCPropPrintController {
} else {
HashMap para = sqlInfo.getPara();
String para1 = para.get("para1");
- String para0 = para.get("para0");
+// String para0 = para.get("para5");
+ String para0 = "1";
TransferData tTransferData = new TransferData();
String Operate = "INSERT";
tTransferData.setNameAndValue("AskNo", para1);
@@ -127,6 +138,8 @@ public class LCPropPrintController {
tVData.add(tTransferData);
tVData.add(tGI);
LCPropPrintBL lcPropPrintBL = new LCPropPrintBL();
+ String responseResultXml = askPlanInfoService.queryAskPlanInfo(para1, para0);
+ tTransferData.setNameAndValue("result", responseResultXml);
boolean submitData = lcPropPrintBL.submitData(tVData, Operate);
if (submitData) {
String query2 = EasyQueryController.query(easyQueryVO);
diff --git a/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/response/g_app/TXResponse.java b/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/response/g_app/TXResponse.java
index c6242038..b4f0d246 100644
--- a/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/response/g_app/TXResponse.java
+++ b/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/response/g_app/TXResponse.java
@@ -212,6 +212,11 @@ public class TXResponse {
*/
@XmlElement(name = "OtherReqDesTime")
private String otherReqDesTime;
+ /**
+ * 询价结束日期
+ */
+ @XmlElement(name = "AskFinishDate")
+ private String askFinishDate;
/**
* 缴费方式
*/
diff --git a/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/sql/easyquery/g_app/LCPropPrintSql.java b/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/sql/easyquery/g_app/LCPropPrintSql.java
index ea99644a..54f14c7d 100644
--- a/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/sql/easyquery/g_app/LCPropPrintSql.java
+++ b/lis-module-grp-nb-service/src/main/java/com/sinosoft/lis/sql/easyquery/g_app/LCPropPrintSql.java
@@ -26,12 +26,12 @@ public interface LCPropPrintSql {
@Param("para3") String para3, @Param("para4") String para4, @Param("para5") String para5);
//#公共池查询
- @SQL(value = "select aa.* from (( select a.quotNo,a.quotbatno,b.quottype,'一般询价',a.grpname ,c.ExamDate from lsquotbasic a," +
- "lsquotation b ,LSQuotationProcess c where a.quotno=b.quotno and quotstate='02' and a.QuotNo = c.QuotNo and (" +
+ @SQL(value = "select aa.* from (( select a.quotNo,a.quotbatno,b.quottype,'一般询价',a.grpname ,NULL as ExamDate from lsquotbasic a," +
+ "lsquotation b where a.quotno=b.quotno and quotstate='02' and (" +
" (a.ISHEALTHY = '0' and EXISTS ( select 1 from lduser where OrganPopedom='1' @{5} )) " +
" or (a.ISHEALTHY = '1' and EXISTS ( select 1 from lduser where HealthyPopedom ='1' @{5} ))" +
" ) " +
- "@{0} @{1} @{2} @{3} order by c.ExamDate desc, a.quotno, a.quotbatno) " +
+ "@{0} @{1} @{2} @{3} order by a.quotno, a.quotbatno) " +
"union (select a.quotNo,a.quotbatno," +
"b.quottype, '套餐询价',a.ProjName ,c.ExamDate from lsprojquotbasic a,lsquotation b ,LSQuotationProcess c where a.quotno = b.quotno and " +
"quotstate = '02' and a.QuotNo = c.QuotNo and (" +
diff --git a/lis-module-grp-nb-web/src/main/webapp/g_app/LCPropPrintInput.js b/lis-module-grp-nb-web/src/main/webapp/g_app/LCPropPrintInput.js
index edf08f1d..44b7864b 100644
--- a/lis-module-grp-nb-web/src/main/webapp/g_app/LCPropPrintInput.js
+++ b/lis-module-grp-nb-web/src/main/webapp/g_app/LCPropPrintInput.js
@@ -24,11 +24,12 @@ function queryClick() {
tSQLInfo.setModule("grp_nb");
tSQLInfo.setResourceName("g_app.LCPropPrintSql");
tSQLInfo.setSqlId("LCPropPrintSql2");
- tSQLInfo.addSubPara(fm.QuotbatNo.value);
+ tSQLInfo.addSubPara(fm.GrpName.value);
tSQLInfo.addSubPara(fm.QuotNo.value);
-
+ tSQLInfo.addSubPara(fm.QuotType.value);
tSQLInfo.addSubPara(tManageCom);
tSQLInfo.addSubPara(tOperator);
+ // tSQLInfo.addSubPara(fm.QuotbatNo.value);
turnPage1.queryModal(tSQLInfo.getString(), QuotInfoGrid, 1);
}
@@ -309,7 +310,7 @@ function showQuotation(){
i18nAlert("请先选择一条询价信息!", "LIS-01667");
return false;
}
-
+ console.log(QuotInfoGrid+ "11111111111111111111111111111111111111111111111");
var tQuotNo = QuotInfoGrid.getRowColData(tRow-1,1);
var tQuotBatNo = QuotInfoGrid.getRowColData(tRow-1,2);
var tQuotType = QuotInfoGrid.getRowColData(tRow-1,3);
diff --git a/lis-module-grp-nb-web/src/main/webapp/g_app/LCPropPrintInput.jsp b/lis-module-grp-nb-web/src/main/webapp/g_app/LCPropPrintInput.jsp
index f936c293..4c0d4db0 100644
--- a/lis-module-grp-nb-web/src/main/webapp/g_app/LCPropPrintInput.jsp
+++ b/lis-module-grp-nb-web/src/main/webapp/g_app/LCPropPrintInput.jsp
@@ -48,13 +48,18 @@