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
4b0a886a
Commit
4b0a886a
authored
Jun 13, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
fce16339
f065b2d6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
13 deletions
+23
-13
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+5
-1
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+3
-1
ServiceHGZL002.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL002.java
+9
-8
HGZL002.js
src/main/webapp/HG/ZL/HGZL002.js
+4
-2
HGZL003.js
src/main/webapp/HG/ZL/HGZL003.js
+2
-1
No files found.
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
4b0a886a
...
@@ -184,7 +184,6 @@ public class HGKCTools {
...
@@ -184,7 +184,6 @@ public class HGKCTools {
*/
*/
public
static
void
putInStorageCheckData
(
List
<
HGZL002
>
hgzl002List
)
{
public
static
void
putInStorageCheckData
(
List
<
HGZL002
>
hgzl002List
)
{
for
(
HGZL002
hgzl002
:
hgzl002List
){
for
(
HGZL002
hgzl002
:
hgzl002List
){
AssertUtils
.
isTrue
(
hgzl002
.
getPassQuantity
().
compareTo
(
0
)
<=
0
,
"合格数量小于等于0!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getCompanyName
(),
"公司名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getCompanyName
(),
"公司名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getProjCode
(),
"项目编号不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getProjCode
(),
"项目编号不能为空!"
);
...
@@ -200,6 +199,8 @@ public class HGKCTools {
...
@@ -200,6 +199,8 @@ public class HGKCTools {
*/
*/
public
static
void
putInStorageData
(
List
<
HGZL002
>
hgzl002List
)
{
public
static
void
putInStorageData
(
List
<
HGZL002
>
hgzl002List
)
{
List
<
HGKC003
>
hgkc003List
=
new
LinkedList
<>();
List
<
HGKC003
>
hgkc003List
=
new
LinkedList
<>();
//入库校验
putInStorageCheckData
(
hgzl002List
);
setHgkc003Data
(
hgzl002List
,
hgkc003List
,
null
,
null
);
setHgkc003Data
(
hgzl002List
,
hgkc003List
,
null
,
null
);
DaoUtils
.
insertBatch
(
HGKC003
.
INSERT
,
hgkc003List
);
DaoUtils
.
insertBatch
(
HGKC003
.
INSERT
,
hgkc003List
);
}
}
...
@@ -232,6 +233,9 @@ public class HGKCTools {
...
@@ -232,6 +233,9 @@ public class HGKCTools {
//工序质检单
//工序质检单
hgkc003
.
setInvQty
(
new
BigDecimal
(
o
.
getPassQuantity
()));
hgkc003
.
setInvQty
(
new
BigDecimal
(
o
.
getPassQuantity
()));
}
}
if
(
hgkc003
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
return
;
}
//单重
//单重
BigDecimal
invUnitWeight
=
HGPZTools
.
HgPz005
.
calcUnitWeight
(
hgpz005
);
BigDecimal
invUnitWeight
=
HGPZTools
.
HgPz005
.
calcUnitWeight
(
hgpz005
);
hgkc003
.
setInvUnitWeight
(
invUnitWeight
);
hgkc003
.
setInvUnitWeight
(
invUnitWeight
);
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
4b0a886a
...
@@ -94,9 +94,11 @@ public class HGSCTools {
...
@@ -94,9 +94,11 @@ public class HGSCTools {
private
static
void
handleOrderAssignStatus
(
HGSC006A
hgsc006A
,
AssignStatusEnum
orderDetailAssignStatus
){
private
static
void
handleOrderAssignStatus
(
HGSC006A
hgsc006A
,
AssignStatusEnum
orderDetailAssignStatus
){
List
<
HGSC006A
>
otherSc006AList
=
HGSCTools
.
THGSC006A
.
otherById
(
hgsc006A
.
getOrderCode
(),
hgsc006A
.
getId
());
List
<
HGSC006A
>
otherSc006AList
=
HGSCTools
.
THGSC006A
.
otherById
(
hgsc006A
.
getOrderCode
(),
hgsc006A
.
getId
());
int
assignQuantity
=
0
;
int
unassignQuantity
=
0
;
int
unassignQuantity
=
0
;
int
totalQuantity
=
0
;
int
totalQuantity
=
0
;
if
(
CollectionUtils
.
isNotEmpty
(
otherSc006AList
)){
if
(
CollectionUtils
.
isNotEmpty
(
otherSc006AList
)){
assignQuantity
=
otherSc006AList
.
stream
().
mapToInt
(
HGSC006A:
:
getAssignQuantity
).
sum
();
unassignQuantity
=
otherSc006AList
.
stream
().
mapToInt
(
HGSC006A:
:
getUnassignQuantity
).
sum
();
unassignQuantity
=
otherSc006AList
.
stream
().
mapToInt
(
HGSC006A:
:
getUnassignQuantity
).
sum
();
totalQuantity
=
otherSc006AList
.
stream
().
mapToInt
(
HGSC006A:
:
getQuantity
).
sum
();
totalQuantity
=
otherSc006AList
.
stream
().
mapToInt
(
HGSC006A:
:
getQuantity
).
sum
();
}
}
...
@@ -113,7 +115,7 @@ public class HGSCTools {
...
@@ -113,7 +115,7 @@ public class HGSCTools {
orderAssignStatus
=
PARTIAL_ASSIGN
;
orderAssignStatus
=
PARTIAL_ASSIGN
;
break
;
break
;
case
ASSIGNED:
case
ASSIGNED:
if
(
un
assignQuantity
==
totalQuantity
){
if
(
assignQuantity
==
totalQuantity
){
orderAssignStatus
=
ASSIGNED
;
orderAssignStatus
=
ASSIGNED
;
}
else
{
}
else
{
orderAssignStatus
=
PARTIAL_ASSIGN
;
orderAssignStatus
=
PARTIAL_ASSIGN
;
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL002.java
View file @
4b0a886a
...
@@ -5,7 +5,6 @@ import com.baosight.hggp.common.CheckStatusEnum;
...
@@ -5,7 +5,6 @@ import com.baosight.hggp.common.CheckStatusEnum;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.sc.domain.HGSC008
;
import
com.baosight.hggp.hg.sc.domain.HGSC008
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.domain.User
;
...
@@ -37,8 +36,7 @@ public class ServiceHGZL002 extends ServiceBase {
...
@@ -37,8 +36,7 @@ public class ServiceHGZL002 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"工序质检单"
,
operType
=
"查询"
,
operDesc
=
"初始化查询"
)
@OperationLogAnnotation
(
operModul
=
"工序质检单"
,
operType
=
"查询"
,
operDesc
=
"初始化查询"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
handleQueryParam
(
inInfo
);
inInfo
=
customQuery
(
inInfo
);
inInfo
=
super
.
query
(
inInfo
,
HGZL002
.
QUERY
,
new
HGZL002
());
EiInfoUtils
.
addBlock
(
inInfo
,
"userBlockId"
,
UserSessionUtils
.
getUser
(),
User
.
class
);
EiInfoUtils
.
addBlock
(
inInfo
,
"userBlockId"
,
UserSessionUtils
.
getUser
(),
User
.
class
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
@@ -46,15 +44,21 @@ public class ServiceHGZL002 extends ServiceBase {
...
@@ -46,15 +44,21 @@ public class ServiceHGZL002 extends ServiceBase {
return
inInfo
;
return
inInfo
;
}
}
private
void
handleQueryParam
(
EiInfo
inInfo
){
private
EiInfo
customQuery
(
EiInfo
inInfo
){
Long
taskId
=
MapUtils
.
getLong
(
EiInfoUtils
.
getFirstRow
(
inInfo
),
HGSC008
.
FIELD_task_id
);
Long
taskId
=
MapUtils
.
getLong
(
EiInfoUtils
.
getFirstRow
(
inInfo
),
HGSC008
.
FIELD_task_id
);
if
(
Objects
.
nonNull
(
taskId
)&&
taskId
>
0
){
if
(
Objects
.
nonNull
(
taskId
)&&
taskId
>
0
){
List
<
HGSC008
>
hgsc008s
=
HGSCTools
.
THGSC008
.
getByTaskId
(
taskId
);
List
<
HGSC008
>
hgsc008s
=
HGSCTools
.
THGSC008
.
getByTaskId
(
taskId
);
List
<
Long
>
workIds
=
Optional
.
ofNullable
(
hgsc008s
).
orElse
(
new
ArrayList
<>()).
stream
().
map
(
HGSC008:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
workIds
=
Optional
.
ofNullable
(
hgsc008s
).
orElse
(
new
ArrayList
<>()).
stream
().
map
(
HGSC008:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
workIds
)){
if
(
CollectionUtils
.
isNotEmpty
(
workIds
)){
EiInfoUtils
.
setFirstRow
(
inInfo
,
"workIds"
,
workIds
);
EiInfoUtils
.
setFirstRow
(
inInfo
,
"workIds"
,
workIds
);
inInfo
=
super
.
query
(
inInfo
,
HGZL002
.
QUERY
,
new
HGZL002
());
}
else
{
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGZL002
().
eiMetadata
);
}
}
}
else
{
inInfo
=
super
.
query
(
inInfo
,
HGZL002
.
QUERY
,
new
HGZL002
());
}
}
return
inInfo
}
}
/**
/**
...
@@ -67,8 +71,7 @@ public class ServiceHGZL002 extends ServiceBase {
...
@@ -67,8 +71,7 @@ public class ServiceHGZL002 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"工序质检单"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@OperationLogAnnotation
(
operModul
=
"工序质检单"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
handleQueryParam
(
inInfo
);
inInfo
=
customQuery
(
inInfo
);
inInfo
=
super
.
query
(
inInfo
,
HGZL002
.
QUERY
,
new
HGZL002
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
...
@@ -80,8 +83,6 @@ public class ServiceHGZL002 extends ServiceBase {
...
@@ -80,8 +83,6 @@ public class ServiceHGZL002 extends ServiceBase {
public
EiInfo
save
(
EiInfo
inInfo
)
{
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
HGZL002
>
hgzl002List
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HGZL002
.
class
);
List
<
HGZL002
>
hgzl002List
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HGZL002
.
class
);
//入库校验
HGKCTools
.
HgKc003
.
putInStorageCheckData
(
hgzl002List
);
hgzl002List
.
forEach
(
o
->
{
hgzl002List
.
forEach
(
o
->
{
o
.
setCheckStatus
(
CheckStatusEnum
.
CHECKED
.
getCode
());
o
.
setCheckStatus
(
CheckStatusEnum
.
CHECKED
.
getCode
());
DaoUtils
.
update
(
HGZL002
.
UPDATE
,
o
);
DaoUtils
.
update
(
HGZL002
.
UPDATE
,
o
);
...
...
src/main/webapp/HG/ZL/HGZL002.js
View file @
4b0a886a
...
@@ -49,8 +49,9 @@ $(function () {
...
@@ -49,8 +49,9 @@ $(function () {
onCheckRow
:
function
(
e
){
onCheckRow
:
function
(
e
){
if
(
e
.
checked
){
if
(
e
.
checked
){
if
(
e
.
model
.
checkStatus
===
'0'
)
{
if
(
e
.
model
.
checkStatus
===
'0'
)
{
var
now
=
new
Date
()
var
now
=
new
Date
();
resultGrid
.
setCellValue
(
e
.
row
,
"checkDate"
,
now
.
getFullYear
()
+
"-"
+
now
.
getMonth
()
+
"-"
+
now
.
getDay
());
var
nowStr
=
now
.
getFullYear
()
+
"-"
+
String
(
now
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)
+
"-"
+
String
(
now
.
getDate
()).
padStart
(
2
,
'0'
);
resultGrid
.
setCellValue
(
e
.
row
,
"checkDate"
,
nowStr
);
}
}
resultGrid
.
setCellValue
(
e
.
row
,
"checkBy"
,
loginUser
[
0
].
userId
);
resultGrid
.
setCellValue
(
e
.
row
,
"checkBy"
,
loginUser
[
0
].
userId
);
resultGrid
.
setCellValue
(
e
.
row
,
"checkName"
,
loginUser
[
0
].
userName
);
resultGrid
.
setCellValue
(
e
.
row
,
"checkName"
,
loginUser
[
0
].
userName
);
...
@@ -114,6 +115,7 @@ let save = function () {
...
@@ -114,6 +115,7 @@ let save = function () {
message
(
"第"
+
(
i
+
1
)
+
"行不合格数量不能大于报工数量!"
);
message
(
"第"
+
(
i
+
1
)
+
"行不合格数量不能大于报工数量!"
);
return
;
return
;
}
}
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做质检完成操作吗? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做质检完成操作吗? "
,
{
ok
:
function
()
{
ok
:
function
()
{
...
...
src/main/webapp/HG/ZL/HGZL003.js
View file @
4b0a886a
...
@@ -196,7 +196,8 @@ function selectTask(){
...
@@ -196,7 +196,8 @@ function selectTask(){
height
:
"90%"
,
height
:
"90%"
,
callbackName
:
function
(
row
)
{
callbackName
:
function
(
row
)
{
var
now
=
new
Date
();
var
now
=
new
Date
();
row
.
checkDate
=
now
.
getFullYear
()
+
"-"
+
now
.
getMonth
()
+
"-"
+
now
.
getDay
();
var
nowStr
=
now
.
getFullYear
()
+
"-"
+
String
(
now
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)
+
"-"
+
String
(
now
.
getDate
()).
padStart
(
2
,
'0'
);
row
.
checkDate
=
nowStr
;
row
.
taskId
=
row
.
id
;
row
.
taskId
=
row
.
id
;
row
.
id
=
""
;
row
.
id
=
""
;
row
.
checkBy
=
loginUser
[
0
].
userId
;
row
.
checkBy
=
loginUser
[
0
].
userId
;
...
...
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