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
30363ac2
Commit
30363ac2
authored
Sep 08, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://129.211.46.84:8800/platform/hg-smart
parents
287e8db3
6040ee37
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
31 deletions
+64
-31
HgScSqlConstant.java
...ava/com/baosight/hggp/hg/sc/constant/HgScSqlConstant.java
+7
-0
ServiceHGSC007A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC007A.java
+12
-10
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+7
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+30
-17
HGXSDataAuth.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml
+8
-4
No files found.
src/main/java/com/baosight/hggp/hg/sc/constant/HgScSqlConstant.java
View file @
30363ac2
...
...
@@ -22,8 +22,15 @@ public class HgScSqlConstant {
public
static
final
String
UPDATE_PROJ_NAME
=
"HGSC001.updateProjName"
;
}
/**
*
* @author:songx
* @date:2024/9/8,9:41
*/
public
static
class
HgSc007
{
// get
public
static
final
String
GET
=
"HGSC007.get"
;
//app 查询生产任务
public
static
final
String
QUERY_APP
=
"HGSC007.queryApp"
;
}
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007A.java
View file @
30363ac2
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sb.domain.HGSB004A
;
import
com.baosight.hggp.hg.sc.domain.HGSC006A
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.sc.domain.HGSC008
;
import
com.baosight.hggp.hg.sc.domain.HGSC099
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.zl.tools.HGZLTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.DateUtil
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.springframework.beans.BeanUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
/**
...
...
@@ -38,6 +39,7 @@ public class ServiceHGSC007A extends ServiceEPBase {
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
taskId
=
MapUtils
.
getString
(
queryMap
,
HGSC008
.
FIELD_task_id
);
HGSC007
hgsc007
=
HGSCTools
.
THGSC007
.
getById
(
Long
.
valueOf
(
taskId
));
AssertUtils
.
isNull
(
hgsc007
,
String
.
format
(
"任务【%s】不存在"
,
taskId
));
HGSC008
hgsc008
=
new
HGSC008
();
BeanUtils
.
copyProperties
(
hgsc007
,
hgsc008
);
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
30363ac2
...
...
@@ -269,6 +269,13 @@
</dynamic>
</sql>
<select
id=
"get"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC007"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGSC007
WHERE ID = #id#
</select>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC007"
>
SELECT
<include
refid=
"column"
/>
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
30363ac2
...
...
@@ -1291,9 +1291,9 @@ public class HGSCTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
public
static
List
<
HGSC006A
>
otherById
(
String
orderCode
,
Long
orderDetailId
)
{
public
static
List
<
HGSC006A
>
otherById
(
String
orderCode
,
Long
orderDetailId
)
{
AssertUtils
.
isEmpty
(
orderCode
,
"订单编号不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
orderDetailId
)||
orderDetailId
<=
0
,
"生产订单明细ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
orderDetailId
)
||
orderDetailId
<=
0
,
"生产订单明细ID不能为空!"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
HGSC006A
.
FIELD_order_code
,
orderCode
);
paramMap
.
put
(
HGSC006A
.
FIELD_id
,
orderDetailId
);
...
...
@@ -1302,12 +1302,23 @@ public class HGSCTools {
}
}
public
static
class
THGSC007
{
public
static
HGSC007
getById
(
Long
taskId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)||
taskId
<=
0
,
"生产任务ID不能为空!"
);
HGSC007
results
=
(
HGSC007
)
DaoBase
.
getInstance
().
get
(
HGSC007
.
QUERY
,
HGSC007
.
FIELD_id
,
taskId
);
return
results
;
/**
* @author:songx
* @date:2024/9/8,9:41
*/
public
static
class
THGSC007
{
/**
* get
*
* @param taskId
* @return
*/
public
static
HGSC007
getById
(
Long
taskId
)
{
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)
||
taskId
<=
0
,
"生产任务ID不能为空!"
);
return
(
HGSC007
)
DaoBase
.
getInstance
().
get
(
HgScSqlConstant
.
HgSc007
.
GET
,
HGSC007
.
FIELD_id
,
taskId
);
}
/**
* 锁
*
...
...
@@ -1339,28 +1350,30 @@ public class HGSCTools {
}
}
public
static
class
THGSC008
{
public
static
HGSC008
getById
(
Long
taskId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)||
taskId
<=
0
,
"报工单ID不能为空!"
);
HGSC008
results
=
(
HGSC008
)
DaoBase
.
getInstance
().
get
(
HGSC008
.
QUERY
,
HGSC008
.
FIELD_id
,
taskId
);
public
static
class
THGSC008
{
public
static
HGSC008
getById
(
Long
taskId
)
{
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)
||
taskId
<=
0
,
"报工单ID不能为空!"
);
HGSC008
results
=
(
HGSC008
)
DaoBase
.
getInstance
().
get
(
HGSC008
.
QUERY
,
HGSC008
.
FIELD_id
,
taskId
);
return
results
;
}
public
static
List
<
HGSC008
>
getByTaskId
(
Long
taskId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)||
taskId
<=
0
,
"生产任务ID不能为空!"
);
List
<
HGSC008
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC008
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
put
(
HGSC008
.
FIELD_task_id
,
taskId
);}});
public
static
List
<
HGSC008
>
getByTaskId
(
Long
taskId
)
{
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)
||
taskId
<=
0
,
"生产任务ID不能为空!"
);
List
<
HGSC008
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC008
.
QUERY
,
new
HashMap
<
String
,
Object
>()
{{
put
(
HGSC008
.
FIELD_task_id
,
taskId
);
}});
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
public
static
HGSC008
add
(
EiInfo
info
)
{
public
static
HGSC008
add
(
EiInfo
info
)
{
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
info
,
EiConstant
.
resultBlock
);
String
taskId
=
MapUtils
.
getString
(
resultMap
,
HGSC008
.
FIELD_task_id
);
HGSC007
hgsc007
=
HGSCTools
.
THGSC007
.
getById
(
Long
.
valueOf
(
taskId
));
HGSC008
hgsc008
=
new
HGSC008
();
BeanUtils
.
copyProperties
(
hgsc007
,
hgsc008
);
BeanUtils
.
copyProperties
(
hgsc007
,
hgsc008
);
cleanBaseInfo
(
hgsc008
);
hgsc008
.
setTaskId
(
hgsc007
.
getId
());
hgsc008
.
setQuantity
(
NumberUtils
.
toInteger
(
resultMap
.
get
(
HGSC008
.
FIELD_quantity
)));
...
...
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml
View file @
30363ac2
...
...
@@ -55,9 +55,11 @@
A.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
(A.CREATED_BY = #authOnlyPeople# OR A.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
)
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
open=
"("
close=
")"
>
A.CREATED_BY = #authOnlyPeople# OR A.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
...
...
@@ -66,7 +68,9 @@
</isNotEmpty>
<isNotEmpty
property=
"authDepCodes"
>
A.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
...
...
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