Commit 68a92b5e authored by liangyb's avatar liangyb

#251-0 2024705 ai生成文档修改,结构化非结构化报表添加修改,评审说明修改

parent 361e4d19
......@@ -2,6 +2,7 @@ package com.gx.obe.evaluation.step.composite;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import org.eclipse.swt.SWT;
import org.eclipse.swt.core.CallBack;
......@@ -41,6 +42,7 @@ public class AiEvalLeftButton extends ImageButton{
// private ShowAiProcessShell menuTipShell;
private MouseListener listener;
private ShowAiProcessShell showAiProcessShell;
private File downLoadPath;
public static Color BG = ColorConstants.SKIN_BG;
public AiEvalLeftButton(Composite parent, int style,TenderProjectEntity curTender) {
super(parent, SWT.CENTER|SWT.NONE);
......@@ -79,6 +81,10 @@ public class AiEvalLeftButton extends ImageButton{
public void mouseEnter(MouseEvent e) {
HttpUrl httpUrl = HttpUtils.getProjectHttpUrl(curTender, PropertiesUtils.getWebserviceProperty(WebserviceConstants.GET_AI_RESULT_METHOD, "bidOpeningHS.do?downloadOpenBidSupplierAiResult"));
HttpResponse httpResponse = HttpUtils.doPost(httpUrl);
downLoadPath = new File(FileConstants.getBiddingFilePath(curTender.getId()) + "ai.pdf");
if(StringUtils.isNotEmpty(downLoadPath.getAbsolutePath()) && downLoadPath.exists()) {
return;
}
downloadBiddingFile(httpResponse);
// showAiProcessShell = new ShowAiProcessShell(getShell(), EvalLeftButton1.this, 0, "");
// if(null != showAiProcessShell && !showAiProcessShell.isDisposed()){
......@@ -98,7 +104,6 @@ public class AiEvalLeftButton extends ImageButton{
});
}
private void downloadBiddingFile(HttpResponse httpResponse){
String downUrl = "";
if(null == httpResponse.getContent() || "".equals(httpResponse.getContent())){
// LOG.debug("服务器返回数据为空!");
......@@ -111,13 +116,9 @@ public class AiEvalLeftButton extends ImageButton{
if(StringUtils.isNotEmpty(packageAiType) && packageAiType.equals(CommonEnum.YES) && StringUtils.isNotEmpty(downUrl) ){
// LOG.debug("下载地址获取成功"+downUrl);
// callBackMsg(true, "下载地址获取成功,开始解析下载地址...");
String downLoadPath = new File(FileConstants.getBiddingFilePath(curTender.getId()) + "ai.pdf").getAbsolutePath();
downLoadFile(downUrl, downLoadPath);
String downLoadPaths = downLoadPath.getAbsolutePath();
downLoadFile(downUrl, downLoadPaths);
}else {
String progress = httpResponse.getDataParam("progress");
String waitTime = httpResponse.getDataParam("waitTime");
showAiProcessShell = new ShowAiProcessShell(getShell(), AiEvalLeftButton.this, ObjectUtils.getIntValue(progress, 0), waitTime);
......@@ -128,12 +129,17 @@ public class AiEvalLeftButton extends ImageButton{
}
}
private void downLoadFile(String downLoadUrl, String savePath){
private void downLoadFile(String downLoadUrl, String downLoadPaths){
// callBackMsg("开始下载招标文件...");
HttpURLDown httpURLDown = new HttpURLDown(downLoadUrl, savePath, new CallBack() {
HttpURLDown httpURLDown = new HttpURLDown(downLoadUrl, downLoadPaths, new CallBack() {
});
try {
showAiProcessShell = new ShowAiProcessShell(getShell(), AiEvalLeftButton.this, ObjectUtils.getIntValue("0", 0), "10s");
showAiProcessShell.open();
boolean downFlag = httpURLDown.downLoad("标书比对相似度分析");
showAiProcessShell.close();
showAiProcessShell = new ShowAiProcessShell(getShell(), AiEvalLeftButton.this, ObjectUtils.getIntValue("100", 0), "0s");
showAiProcessShell.open();
// callBackMsg("招标文件下载结束!");
// 下载成功并且是.zip文件才进行解压操作
if(downFlag){
......@@ -143,7 +149,7 @@ public class AiEvalLeftButton extends ImageButton{
listener = new MouseAdapter() {
public void mouseUp(MouseEvent e) {
if(!groupButton.getEnabled()) return;
RuntimeUtils.openFIle(new File(savePath));
RuntimeUtils.openFIle(new File(downLoadPaths));
}
};
groupButton.addMouseListener(listener);
......
......@@ -820,6 +820,7 @@ public abstract class BaseDateSet implements IWordDataSet{
priceScoreDate.init(tenderProject);
List<Map<String, Object>> tableColList;
String[] fields;
reportDataSet.put("jingnengStruct", isStruct ? "1" : "0");
if(isStruct) {
fields = new String[] {
"开标价格 --(含税)&&bidPrice0",
......@@ -833,8 +834,8 @@ public abstract class BaseDateSet implements IWordDataSet{
};
}else {
fields = new String[] {
"开标价格 --&&bidPrice0",
"修正后投标报价&&evaluationPrice0",
"开标价格 (--)&&bidPrice0",
"修正后投标报价 (--)&&evaluationPrice0",
"修正原因&&modifyReason0",
"基准价&&basePrice",
"价格得分&&priceFinalScore"
......@@ -906,8 +907,14 @@ public abstract class BaseDateSet implements IWordDataSet{
List<Map<String, Object>> factorList = new ArrayList<Map<String, Object>>();
int index = 1;
for(String field : fields){
if(field.contains("--") && unit != null) {
field = field.replaceAll("--", unit);
if(field.contains("--")) {
if(unit != null) {
field = field.replaceAll("--", unit);
}else {
//给默认值
field = field.replaceAll("--", "元");
}
}
Map<String, Object> colMap = new HashMap<String, Object>();
String[] f = field.split("&&");
......
......@@ -779,25 +779,25 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
private void getFactorMessage() {
EvaluationFactor evaluationFactor =evaluationFactorService.getPriceEvaluationFactor(tenderProject.getId());
String formula = null;
String evalStructMessage = null;
String evalStructMessage = "";
PriceParam priceParam =null;
if(evaluationFactor != null) {
priceParam = PriceParam.deserializePriceParam(evaluationFactor.getComputerParams());
}
if (priceParam != null) {
String separator=System.getProperty("line.separator");
//String separator=System.getProperty("line.separator");
formula = priceParam.getFormula();
evalStructMessage = priceParam.getEvalStructMessage();
}
if (!StringUtils.isEmpty(formula)) {
boolean isStruct = parserStructProject();
if (!StringUtils.isEmpty(evalStructMessage) && isStruct) {
if (isStruct) {
formula = Messages.EvalExplainPrice + ":" + evalStructMessage + "\n\n" + Messages.BidExplainPrice + ":"+ evaluationFactor.getMemo();
}
// if(!StringUtils.isEmpty(evaluationFactor.getMemo()) && !isStruct) {
// formula = formula + "\n\n" + Messages.EvalExplain + ":" + evaluationFactor.getMemo();
// }
if(!StringUtils.isEmpty(evaluationFactor.getMemo()) && !isStruct) {
formula = Messages.EvalExplain + ":" + evaluationFactor.getMemo();
}
reportDataSet.putParam("formula", formula);
}
//获取商务技术打分权重
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment