Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
2eb2ec26
Commit
2eb2ec26
authored
Oct 09, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加确认公共方法
parent
b2f97e6b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
12 deletions
+32
-12
ServiceHGCT01.java
...n/java/com/baosight/hggp/hg/ct/service/ServiceHGCT01.java
+6
-8
HgCtTools.java
src/main/java/com/baosight/hggp/hg/ct/tools/HgCtTools.java
+24
-2
HgCtUtils.java
src/main/java/com/baosight/hggp/hg/ct/utils/HgCtUtils.java
+2
-2
No files found.
src/main/java/com/baosight/hggp/hg/ct/service/ServiceHGCT01.java
View file @
2eb2ec26
...
@@ -4,9 +4,11 @@ import com.baosight.hggp.core.dao.DaoUtils;
...
@@ -4,9 +4,11 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.hg.ct.constant.HgCtConst
;
import
com.baosight.hggp.hg.ct.constant.HgCtConst
;
import
com.baosight.hggp.hg.ct.constant.HgCtSqlConst
;
import
com.baosight.hggp.hg.ct.constant.HgCtSqlConst
;
import
com.baosight.hggp.hg.ct.domain.HGCT01
;
import
com.baosight.hggp.hg.ct.domain.HGCT01
;
import
com.baosight.hggp.hg.ct.tools.HgCtTools
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
@@ -129,14 +131,10 @@ public class ServiceHGCT01 extends ServiceEPBase {
...
@@ -129,14 +131,10 @@ public class ServiceHGCT01 extends ServiceEPBase {
public
EiInfo
batchConfirm
(
EiInfo
inInfo
)
{
public
EiInfo
batchConfirm
(
EiInfo
inInfo
)
{
try
{
try
{
int
successCount
=
0
;
int
successCount
=
0
;
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
HGCT01
>
fCt01s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGCT01
.
class
);
for
(
Map
resultRow
:
resultRows
)
{
for
(
HGCT01
fCt01
:
fCt01s
)
{
resultRow
.
put
(
HGCT01
.
FIELD_STATUS
,
HgCtConst
.
HgCt01
.
Status
.
CLOSE
);
int
result
=
HgCtTools
.
HgCt01
.
confirm
(
fCt01
.
getInternalCode
());
resultRow
.
put
(
HGCT01
.
FIELD_CLOSE_TIME
,
DateUtils
.
shortDateTime
());
successCount
+=
result
;
int
result
=
DaoUtils
.
update
(
HgCtSqlConst
.
HgCt01
.
CONFIRM
,
resultRow
);
if
(
result
>
0
)
{
successCount
++;
}
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
successCount
+
"]条数据确认已办成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
successCount
+
"]条数据确认已办成功!"
);
...
...
src/main/java/com/baosight/hggp/hg/ct/tools/HgCtTools.java
View file @
2eb2ec26
...
@@ -2,7 +2,13 @@ package com.baosight.hggp.hg.ct.tools;
...
@@ -2,7 +2,13 @@ package com.baosight.hggp.hg.ct.tools;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.ct.constant.HgCtConst
;
import
com.baosight.hggp.hg.ct.constant.HgCtConst
;
import
com.baosight.hggp.hg.ct.constant.HgCtSqlConst
;
import
com.baosight.hggp.hg.ct.domain.HGCT01
;
import
com.baosight.hggp.hg.ct.domain.HGCT01
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* @author:songx
* @author:songx
...
@@ -16,17 +22,33 @@ public class HgCtTools {
...
@@ -16,17 +22,33 @@ public class HgCtTools {
* @author:songx
* @author:songx
* @date:2024/3/25,21:04
* @date:2024/3/25,21:04
*/
*/
public
static
class
JaCt00
{
public
static
class
HgCt01
{
/**
/**
* 写入数据库
* 写入数据库
*
NotifyTools
*
* @param ct00
* @param ct00
*/
*/
public
static
void
insertDb
(
HGCT01
ct00
)
{
public
static
void
insertDb
(
HGCT01
ct00
)
{
ct00
.
setStatus
(
HgCtConst
.
HgCt01
.
Status
.
OPEN
);
ct00
.
setStatus
(
HgCtConst
.
HgCt01
.
Status
.
OPEN
);
DaoUtils
.
insert
(
HGCT01
.
INSERT
,
ct00
);
DaoUtils
.
insert
(
HGCT01
.
INSERT
,
ct00
);
}
}
/**
* 确认已办
*
* @param internalCode
*/
public
static
int
confirm
(
String
internalCode
)
{
if
(
StringUtils
.
isBlank
(
internalCode
))
{
return
0
;
}
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
HGCT01
.
FIELD_INTERNAL_CODE
,
internalCode
);
paramMap
.
put
(
HGCT01
.
FIELD_STATUS
,
HgCtConst
.
HgCt01
.
Status
.
CLOSE
);
paramMap
.
put
(
HGCT01
.
FIELD_CLOSE_TIME
,
DateUtils
.
shortDateTime
());
return
DaoUtils
.
update
(
HgCtSqlConst
.
HgCt01
.
CONFIRM
,
paramMap
);
}
}
}
}
}
src/main/java/com/baosight/hggp/hg/ct/utils/HgCtUtils.java
View file @
2eb2ec26
...
@@ -36,7 +36,7 @@ public class HgCtUtils {
...
@@ -36,7 +36,7 @@ public class HgCtUtils {
// 设置通知对象名称
// 设置通知对象名称
User
user
=
HGXSTools
.
XsUser
.
getByLogin
(
ct00
.
getUserEname
());
User
user
=
HGXSTools
.
XsUser
.
getByLogin
(
ct00
.
getUserEname
());
ct00
.
setUserCname
(
user
.
getUserName
());
ct00
.
setUserCname
(
user
.
getUserName
());
HgCtTools
.
JaCt00
.
insertDb
(
ct00
);
HgCtTools
.
HgCt01
.
insertDb
(
ct00
);
}
}
/**
/**
...
@@ -55,7 +55,7 @@ public class HgCtUtils {
...
@@ -55,7 +55,7 @@ public class HgCtUtils {
User
user
=
HGXSTools
.
XsUser
.
getByLogin
(
loginName
);
User
user
=
HGXSTools
.
XsUser
.
getByLogin
(
loginName
);
ct00
.
setUserCname
(
user
.
getUserName
());
ct00
.
setUserCname
(
user
.
getUserName
());
ct00
.
setUserEname
(
user
.
getLoginName
());
ct00
.
setUserEname
(
user
.
getLoginName
());
HgCtTools
.
JaCt00
.
insertDb
(
ct00
);
HgCtTools
.
HgCt01
.
insertDb
(
ct00
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"发送通知消息失败:{}"
,
e
.
getMessage
(),
e
);
log
.
error
(
"发送通知消息失败:{}"
,
e
.
getMessage
(),
e
);
...
...
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