Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
京
京能客户端
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王亚宁
京能客户端
Commits
980abb0b
Commit
980abb0b
authored
Aug 16, 2024
by
liangyb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20240816 评标管理-生成报表-评标报告适配非结构化模板
parent
6893c115
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
31 deletions
+65
-31
OBE-COMPONENTS-CORE/src/com/gx/obe/components/core/util/PlatformUtils.java
...RE/src/com/gx/obe/components/core/util/PlatformUtils.java
+2
-0
OBE-CONFIG/config_final.properties
OBE-CONFIG/config_final.properties
+1
-1
OBE-CONFIG/config_test.properties
OBE-CONFIG/config_test.properties
+1
-1
OBE-REPORT/src/com/gx/obe/report/dataset/word/JingNengEvaluationReportDataSet.java
.../report/dataset/word/JingNengEvaluationReportDataSet.java
+15
-5
OBE-REPORT/src/com/gx/obe/report/utils/WordAddBreakUtils.java
...REPORT/src/com/gx/obe/report/utils/WordAddBreakUtils.java
+24
-24
OBE-UTILS/src/com/gx/obe/util/utils/CollectionUtils.java
OBE-UTILS/src/com/gx/obe/util/utils/CollectionUtils.java
+22
-0
No files found.
OBE-COMPONENTS-CORE/src/com/gx/obe/components/core/util/PlatformUtils.java
View file @
980abb0b
...
...
@@ -24,6 +24,8 @@ public class PlatformUtils {
LOG
.
error
(
classPath
,
e
);
}
catch
(
ClassNotFoundException
e
)
{
LOG
.
error
(
classPath
,
e
);
}
catch
(
NullPointerException
e
)
{
LOG
.
error
(
classPath
,
e
);
}
}
return
object
;
...
...
OBE-CONFIG/config_final.properties
View file @
980abb0b
#\u7cfb\u7edf\u7248\u672c
version
=
OBEV7.7.9.202408
01
version
=
OBEV7.7.9.202408
16
keyCharacter
=
#\u6b63\u5f0f\u7248\u672c\u68c0\u67e5\u5347\u7ea7\u7f16\u7801
versionUpdateType
=
OBE_FinalService
...
...
OBE-CONFIG/config_test.properties
View file @
980abb0b
#\u7cfb\u7edf\u7248\u672c
version
=
OBEV7.7.9.202408
01
version
=
OBEV7.7.9.202408
16
keyCharacter
=
g
versionUpdateType
=
OBE_Service
#\u6d4b\u8bd5\u7ad9\u4e13\u5bb6\u7b7e\u670d\u52a1
...
...
OBE-REPORT/src/com/gx/obe/report/dataset/word/JingNengEvaluationReportDataSet.java
View file @
980abb0b
...
...
@@ -26,6 +26,7 @@ import com.gx.obe.formula.PriceParam;
import
com.gx.obe.message.Messages
;
import
com.gx.obe.report.utils.Bean2MapUtils
;
import
com.gx.obe.util.utils.BigDecimalUtils
;
import
com.gx.obe.util.utils.CollectionUtils
;
import
com.gx.obe.util.utils.ListSortUtils
;
import
com.gx.obe.util.utils.StringUtils
;
import
com.gx.obe.util.utils.UuidUtils
;
...
...
@@ -667,7 +668,6 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
Map
<
String
,
Object
>
crossData
=
new
HashMap
<
String
,
Object
>();
List
<
Supplier
>
openSucessSupplierList
=
getOpenBidSuccessSupplierList
();
List
<
SupplierOpeningResult
>
supplierBidPriceResultList
=
supplierOpeningResultService
.
getSupplierOpeningResultList
(
tenderProject
.
getId
());
List
<
BidPrice
>
bidPriceList
=
bidPriceService
.
getTenderBidPriceTableList
(
tenderProject
.
getId
());
if
(
null
==
bidPriceList
||
bidPriceList
.
size
()
<
1
)
{
return
;
...
...
@@ -684,15 +684,25 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
for
(
Supplier
supplier
:
openSucessSupplierList
)
{
for
(
SupplierOpeningResult
supplierOpeningResult
:
supplierBidPriceResultList
)
{
if
(
StringUtils
.
equals
(
supplier
.
getId
(),
supplierOpeningResult
.
getSupplierId
()))
{
List
<
BidPriceResult
>
bidPriceItemResultList
=
bidPriceResultService
.
getSupplierBidPriceResultList
(
tenderProject
.
getId
(),
supplier
.
getId
());
Map
<
String
,
Object
>
supplierMap
=
Bean2MapUtils
.
createMap
(
supplier
);
supplierMap
.
put
(
"sort"
,
sort
++
+
""
);
supplierMap
.
put
(
"supplierName"
,
supplier
.
getSupplierName
());
supplierMap
.
put
(
"id"
,
supplier
.
getId
());
if
(
parserStructProject
())
{
//适配结构化改造后开标价格固定为含税标准
BidPriceResult
bidPriceResult1
=
CollectionUtils
.
getT
(
bidPriceItemResultList
,
t
->
t
.
getBidPrice
());
if
(
bidPriceResult1
!=
null
)
{
supplierMap
.
put
(
"bidPrice"
,
bidPriceResult1
.
getBidPriceByUnit
(
tenderProjectRuleEntity
.
getPriceUnit
()));
supplierMap
.
put
(
"evaluationPrice"
,
bidPriceResult1
.
getEvaluationPrice
());
}
}
else
{
supplierMap
.
put
(
"bidPrice"
,
supplierOpeningResult
.
getBidPriceByUnit
(
tenderProjectRuleEntity
.
getPriceUnit
()));
supplierMap
.
put
(
"evaluationPrice"
,
supplierOpeningResult
.
getEvaluationPrice
());
}
supplierWithItemMapList
.
add
(
supplierMap
);
List
<
BidPriceResult
>
bidPriceItemResultList
=
bidPriceResultService
.
getSupplierBidPriceResultList
(
tenderProject
.
getId
(),
supplier
.
getId
());
for
(
BidPriceResult
bidPriceResult
:
bidPriceItemResultList
)
{
crossData
.
put
(
supplier
.
getId
().
concat
(
bidPriceResult
.
getBidPriceId
()),
bidPriceResult
.
getPriceContent
());
}
...
...
@@ -790,8 +800,8 @@ public class JingNengEvaluationReportDataSet extends BaseDateSet {
formula
=
priceParam
.
getFormula
();
evalStructMessage
=
priceParam
.
getEvalStructMessage
();
}
if
(!
StringUtils
.
isEmpty
(
formula
))
{
boolean
isStruct
=
parserStructProject
();
if
(!
StringUtils
.
isEmpty
(
formula
))
{
if
(
isStruct
)
{
formula
=
Messages
.
EvalExplainPrice
+
":"
+
evalStructMessage
+
"\n\n"
+
Messages
.
BidExplainPrice
+
":"
+
evaluationFactor
.
getMemo
();
}
...
...
OBE-REPORT/src/com/gx/obe/report/utils/WordAddBreakUtils.java
View file @
980abb0b
...
...
@@ -24,7 +24,7 @@ public class WordAddBreakUtils {
private
static
Logger
logger
=
Logger
.
getLogger
(
WordAddBreakUtils
.
class
);
private
final
static
String
BOOK_MARK
=
"formula_param"
;
private
final
static
String
BOOK_STRUCT_MARK
=
"jingnengStruct_param"
;
//
private final static String BOOK_STRUCT_MARK = "jingnengStruct_param";
private
final
static
String
TABLE_TITLES
=
"§"
;
private
final
static
String
TABLE_TITLE
=
"∮"
;
private
final
static
String
BREAK
=
"\\n"
;
...
...
@@ -61,31 +61,31 @@ public class WordAddBreakUtils {
}
}
}
if
(
ctBookmark
.
getName
().
equals
(
BOOK_STRUCT_MARK
))
{
List
<
XWPFRun
>
runs
=
p
.
getRuns
();
if
(
runs
!=
null
)
{
for
(
XWPFRun
r
:
runs
)
{
// 需要替换的文本
String
text
=
r
.
getText
(
0
);
if
(
"1"
.
equals
(
text
))
{
// 标记从此书签开始删除后续内容
removeContent
=
false
;
break
;
}
}
}
}
}
}
try
{
if
(
removeContent
)
{
deleteAfterMarker
(
doc
,
TABLE_TITLES
);
}
else
{
//updateTables(doc);
// if (ctBookmark.getName().equals(BOOK_STRUCT_MARK)) {
// List<XWPFRun> runs = p.getRuns();
// if (runs != null) {
// for (XWPFRun r : runs) {
// // 需要替换的文本
// String text = r.getText(0);
// if("1".equals(text)) {
// // 标记从此书签开始删除后续内容
// removeContent = false;
// break;
// }
// }
// }
// }
}
}
catch
(
Exception
e
)
{
Log
.
error
(
e
.
getMessage
());
}
// try {
// if (removeContent) {
// deleteAfterMarker(doc,TABLE_TITLES);
// }else {
// //updateTables(doc);
// }
// }catch (Exception e) {
// Log.error(e.getMessage());
// }
doc
.
write
(
new
FileOutputStream
(
outSrc
));
logger
.
error
(
"评标报告替换完成"
);
}
catch
(
IOException
e
)
{
...
...
OBE-UTILS/src/com/gx/obe/util/utils/CollectionUtils.java
View file @
980abb0b
package
com
.
gx
.
obe
.
util
.
utils
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.HashMap
;
...
...
@@ -7,6 +8,8 @@ import java.util.Iterator;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.function.Function
;
import
java.util.function.Predicate
;
/**
* @Description:
...
...
@@ -28,6 +31,25 @@ public class CollectionUtils {
return
null
;
}
/**
* @Description: 比较并返回
* @author lyb
* @param <T>
* @param collection
* @param filter
* @return
*/
public
static
<
T
>
T
getT
(
Collection
<?
extends
T
>
collection
,
Function
<
T
,
BigDecimal
>
filter
)
{
BigDecimal
target
=
new
BigDecimal
(
0
);
T
tl
=
null
;
if
(
null
!=
collection
)
for
(
T
t
:
collection
)
if
(
target
.
compareTo
(
filter
.
apply
(
t
))
<=
0
)
{
target
=
filter
.
apply
(
t
);
tl
=
t
;
}
return
tl
;
}
/**
* @Description: 根据过滤条件获取集合的条数
* @author chenxw
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment