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
75e83339
Commit
75e83339
authored
May 23, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变更详情提交
parent
d39b079e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
152 additions
and
15 deletions
+152
-15
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+21
-13
ServiceHGSC004E.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004E.java
+36
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+17
-0
HGSC004A.js
src/main/webapp/HG/SC/HGSC004A.js
+17
-2
HGSC004E.js
src/main/webapp/HG/SC/HGSC004E.js
+29
-0
HGSC004E.jsp
src/main/webapp/HG/SC/HGSC004E.jsp
+32
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
View file @
75e83339
...
@@ -86,6 +86,7 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -86,6 +86,7 @@ public class ServiceHGSC004A extends ServiceBase {
hgsc005a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
());
hgsc005a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
());
}
}
HGSCTools
.
THGSC005A
.
delete
(
hgsc005a
);
HGSCTools
.
THGSC005A
.
delete
(
hgsc005a
);
HGSCTools
.
THGSC004B
.
save
(
hgsc004A
,
null
);
}
}
}
else
{
}
else
{
DaoUtils
.
update
(
HGSC004A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
DaoUtils
.
update
(
HGSC004A
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
...
@@ -132,25 +133,32 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -132,25 +133,32 @@ public class ServiceHGSC004A extends ServiceBase {
this
.
checkSaveData
(
hgsc004a
,
hgsc003
);
this
.
checkSaveData
(
hgsc004a
,
hgsc003
);
if
(
Objects
.
nonNull
(
hgsc004a
.
getId
())&&
hgsc004a
.
getId
()!=
0
){
if
(
Objects
.
nonNull
(
hgsc004a
.
getId
())&&
hgsc004a
.
getId
()!=
0
){
if
(
hgsc004a
.
getLv
().
intValue
()
==
3
){
hgsc004a
.
setProductType
(
ProductTypeEnum
.
STRUCT
.
getCode
().
toString
());
}
else
{
hgsc004a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
().
toString
());
}
//主表全部提交时需要有改变状态
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
QBTJ
){
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
QBTJ
){
hgsc004a
.
setChangeType
(
HGConstant
.
ChangeType
.
TH
);
hgsc004a
.
setChangeType
(
HGConstant
.
ChangeType
.
TH
);
if
(
hgsc004a
.
getLv
().
intValue
()
==
3
){
HGSC004A
oldHGSC004A
=
(
HGSC004A
)
super
.
dao
.
get
(
HGSC004A
.
QUERY
,
HGSC004A
.
FIELD_id
,
hgsc004a
.
getId
());
hgsc004a
.
setProductType
(
ProductTypeEnum
.
STRUCT
.
getCode
().
toString
());
HGSCTools
.
THGSC004B
.
save
(
oldHGSC004A
,
hgsc004a
);
}
else
{
hgsc004a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
().
toString
());
}
}
}
DaoUtils
.
update
(
HGSC004A
.
UPDATE
,
hgsc004a
);
DaoUtils
.
update
(
HGSC004A
.
UPDATE
,
hgsc004a
);
}
else
{
}
else
{
hgsc004a
.
setProductStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
hgsc004a
.
setProductStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
if
(
hgsc004a
.
getLv
().
intValue
()
==
3
){
hgsc004a
.
setProductType
(
ProductTypeEnum
.
STRUCT
.
getCode
().
toString
());
}
else
{
hgsc004a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
().
toString
());
}
//主表全部提交时需要有改变状态
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
QBTJ
){
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
QBTJ
){
if
(
hgsc004a
.
getLv
().
intValue
()
==
3
){
hgsc004a
.
setChangeType
(
HGConstant
.
ChangeType
.
ZJ
);
hgsc004a
.
setProductType
(
ProductTypeEnum
.
STRUCT
.
getCode
().
toString
());
Long
maxId
=
(
Long
)
super
.
dao
.
get
(
HGSC004A
.
MAX_ID
,
null
,
null
);
}
else
{
hgsc004a
.
setId
(
maxId
+
1
);
hgsc004a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
().
toString
());
HGSCTools
.
THGSC004B
.
save
(
null
,
hgsc004a
);
}
}
}
DaoUtils
.
insert
(
HGSC004A
.
INSERT
,
hgsc004a
);
DaoUtils
.
insert
(
HGSC004A
.
INSERT
,
hgsc004a
);
...
@@ -235,6 +243,8 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -235,6 +243,8 @@ public class ServiceHGSC004A extends ServiceBase {
String
materialId
=
eiBlock
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC004A
.
FIELD_material_id
);
String
materialId
=
eiBlock
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC004A
.
FIELD_material_id
);
HGSC004
hgsc004
=
(
HGSC004
)
super
.
dao
.
get
(
HGSC004
.
QUERY_BY_ID
,
HGSC004
.
FIELD_id
,
materialId
);
HGSC004
hgsc004
=
(
HGSC004
)
super
.
dao
.
get
(
HGSC004
.
QUERY_BY_ID
,
HGSC004
.
FIELD_id
,
materialId
);
//校验计划父单据是否提交,提交了不让新增
HGSCTools
.
THGSC004A
.
checkFatherSubmitStatus
(
hgsc004
.
getId
());
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgsc004a
.
fromMap
(
map
);
hgsc004a
.
fromMap
(
map
);
...
@@ -250,8 +260,6 @@ public class ServiceHGSC004A extends ServiceBase {
...
@@ -250,8 +260,6 @@ public class ServiceHGSC004A extends ServiceBase {
}
else
{
}
else
{
hgsc005a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
());
hgsc005a
.
setProductType
(
ProductTypeEnum
.
PART
.
getCode
());
}
}
//校验计划父单据是否提交,提交了不让新增
HGSCTools
.
THGSC004A
.
checkFatherSubmitStatus
(
hgsc004
.
getId
());
HGSCTools
.
THGSC005A
.
save
(
hgsc005a
);
HGSCTools
.
THGSC005A
.
save
(
hgsc005a
);
}
else
{
}
else
{
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004E.java
0 → 100644
View file @
75e83339
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.hg.sc.domain.HGSC004B
;
import
com.baosight.hggp.util.*
;
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.ServiceBase
;
/**
* @Author jhs
* @Date 2024/5/14 14:46
*/
public
class
ServiceHGSC004E
extends
ServiceBase
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGSC004B
.
QUERY
,
new
HGSC004B
());
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGSC004B
.
QUERY
,
new
HGSC004B
());
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
75e83339
package
com
.
baosight
.
hggp
.
hg
.
sc
.
tools
;
package
com
.
baosight
.
hggp
.
hg
.
sc
.
tools
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baosight.hggp.common.AssignStatusEnum
;
import
com.baosight.hggp.common.AssignStatusEnum
;
import
com.baosight.hggp.common.ComputeTypeEnum
;
import
com.baosight.hggp.common.ComputeTypeEnum
;
import
com.baosight.hggp.common.ProductTypeEnum
;
import
com.baosight.hggp.common.ProductTypeEnum
;
...
@@ -101,6 +102,22 @@ public class HGSCTools {
...
@@ -101,6 +102,22 @@ public class HGSCTools {
AssertUtils
.
isTrue
(
hgsc005
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
1
,
"生产计划已提交,不能操作!"
);
AssertUtils
.
isTrue
(
hgsc005
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
1
,
"生产计划已提交,不能操作!"
);
}
}
}
}
public
static
class
THGSC004B
{
public
static
void
save
(
HGSC004A
oldHGSC004A
,
HGSC004A
newHGSC004A
)
{
HGSC004B
hgsc004B
=
new
HGSC004B
();
if
(
Objects
.
nonNull
(
oldHGSC004A
)){
//变更删除存在历史信息,存历史信息
BeanUtil
.
copyProperties
(
oldHGSC004A
,
hgsc004B
,
"id"
);
hgsc004B
.
setMaterialDetailId
(
oldHGSC004A
.
getId
());
}
else
{
//新增的存新录入的信息
BeanUtil
.
copyProperties
(
newHGSC004A
,
hgsc004B
,
"id"
);
hgsc004B
.
setMaterialDetailId
(
newHGSC004A
.
getId
());
}
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc004B
)
||
hgsc004B
.
getMaterialDetailId
().
intValue
()
==
0
,
"生产计划已提交,不能操作!"
);
DaoUtils
.
insert
(
HGSC004B
.
INSERT
,
hgsc004B
);
}
}
public
static
class
THGSC005
{
public
static
class
THGSC005
{
public
static
List
<
HGSC005
>
buildFinishRate
(
List
<
HGSC005
>
hgsc005List
){
public
static
List
<
HGSC005
>
buildFinishRate
(
List
<
HGSC005
>
hgsc005List
){
...
...
src/main/webapp/HG/SC/HGSC004A.js
View file @
75e83339
...
@@ -98,10 +98,13 @@ $(function () {
...
@@ -98,10 +98,13 @@ $(function () {
title
:
"操作"
,
title
:
"操作"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
status
=
item
.
productStatus
;
let
status
=
item
.
productStatus
;
let
changeType
=
item
.
changeType
;
let
template
=
''
;
let
template
=
''
;
if
(
item
.
id
){
if
(
item
.
id
){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
if
(
changeType
!=
0
){
+
'onclick="showDetail('
+
item
.
id
+
')" >变更详情</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showDetail('
+
item
.
id
+
')" >变更详情</a>'
;
}
if
(
status
==
0
)
{
if
(
status
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="updateProductStatus('
+
item
.
id
+
',1)" >提交</a>'
;
+
'onclick="updateProductStatus('
+
item
.
id
+
',1)" >提交</a>'
;
...
@@ -521,6 +524,18 @@ let dynamicColumnName = function () {
...
@@ -521,6 +524,18 @@ let dynamicColumnName = function () {
}
}
}
}
/**
* 显示详情
*/
function
showDetail
(
id
)
{
JSColorbox
.
open
({
href
:
"HGSC004E?methodName=initLoad&inqu_status-0-materialDetailId="
+
id
,
title
:
"<div style='text-align: center;'>变更详情记录</div>"
,
width
:
"90%"
,
height
:
"90%"
,
});
}
function
updateProductStatus
(
id
,
status
)
{
function
updateProductStatus
(
id
,
status
)
{
let
inEiInfo
=
new
EiInfo
();
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
inEiInfo
.
set
(
"result-0-id"
,
id
);
...
...
src/main/webapp/HG/SC/HGSC004E.js
0 → 100644
View file @
75e83339
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
}
};
$
(
"#ef_form_head"
).
hide
();
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 初始化查询
query
();
});
/**
* 查询
*/
var
query
=
function
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
}
src/main/webapp/HG/SC/HGSC004E.jsp
0 → 100644
View file @
75e83339
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"变更详情"
>
<EF:EFRegion
id=
"result"
title=
"变更详情信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"lv"
cname=
"层级"
hidden=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"parentProdCode"
hidden=
"true"
cname=
"上级产品编号"
/>
<EF:EFColumn
enable=
"false"
ename=
"parentProdName"
hidden=
"true"
cname=
"上级产品名称"
/>
<EF:EFColumn
enable=
"false"
ename=
"productId"
hidden=
"true"
cname=
"产品id"
/>
<EF:EFColumn
enable=
"false"
ename=
"productType"
hidden=
"true"
cname=
"产品类型"
/>
<EF:EFColumn
enable=
"false"
ename=
"inventType"
hidden=
"true"
cname=
"库存类型"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
width=
"140"
enable=
"false"
readonly=
"false"
/>
<EF:EFComboColumn
cname=
"变更类型"
ename=
"changeType"
width=
"90"
align=
"center"
enable=
"false"
required=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.sc.changeType"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"productCode"
required=
"true"
cname=
"产品编号"
enable=
"false"
/>
<EF:EFColumn
ename=
"productName"
cname=
"产品名称"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"quantity"
required=
"true"
cname=
"数量"
enable=
"false"
enable=
"false"
/>
<EF:EFColumn
ename=
"singleWeight"
required=
"true"
format=
"{0:N3}"
cname=
"单重(kg)"
enable=
"false"
/>
<EF:EFColumn
enable=
"true"
required=
"true"
format=
"{0:N3}"
ename=
"totalWeight"
cname=
"总重(kg)"
enable=
"false"
/>
<EF:EFComboColumn
cname=
"提交状态"
ename=
"productStatus"
width=
"90"
align=
"center"
required=
"false"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.sc.productStatus"
/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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