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
366ef3cd
Commit
366ef3cd
authored
May 20, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-20 优化工序设置添加计算类型
parent
45307280
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
14 deletions
+48
-14
HGSJ001.java
src/main/java/com/baosight/hggp/hg/sj/domain/HGSJ001.java
+16
-0
ServiceHGSJ001.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ001.java
+5
-9
HGSJ001.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
+10
-4
HGSB007.js
src/main/webapp/HG/SB/HGSB007.js
+7
-0
HGSJ001.js
src/main/webapp/HG/SJ/HGSJ001.js
+6
-0
HGSJ001.jsp
src/main/webapp/HG/SJ/HGSJ001.jsp
+4
-1
No files found.
src/main/java/com/baosight/hggp/hg/sj/domain/HGSJ001.java
View file @
366ef3cd
...
@@ -44,6 +44,7 @@ public class HGSJ001 extends DaoEPBase {
...
@@ -44,6 +44,7 @@ public class HGSJ001 extends DaoEPBase {
public
static
final
String
FIELD_PRINC
=
"princ"
;
/* 负责人*/
public
static
final
String
FIELD_PRINC
=
"princ"
;
/* 负责人*/
public
static
final
String
FIELD_PRINC_NAME
=
"princName"
;
/* 负责人名称*/
public
static
final
String
FIELD_PRINC_NAME
=
"princName"
;
/* 负责人名称*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态0.停止1.启用*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态0.停止1.启用*/
public
static
final
String
FIELD_COMPUTE_TYPE
=
"computeType"
;
/* 计算类型*/
public
static
final
String
COL_ID
=
"ID"
;
/* 主键id*/
public
static
final
String
COL_ID
=
"ID"
;
/* 主键id*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码 预留*/
...
@@ -95,6 +96,7 @@ public class HGSJ001 extends DaoEPBase {
...
@@ -95,6 +96,7 @@ public class HGSJ001 extends DaoEPBase {
private
String
princ
=
" "
;
/* 负责人*/
private
String
princ
=
" "
;
/* 负责人*/
private
String
princName
=
" "
;
/* 负责人名称*/
private
String
princName
=
" "
;
/* 负责人名称*/
private
Integer
status
=
0
;
/* 状态0.停止1.启用*/
private
Integer
status
=
0
;
/* 状态0.停止1.启用*/
private
Integer
computeType
=
0
;
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -196,6 +198,9 @@ public class HGSJ001 extends DaoEPBase {
...
@@ -196,6 +198,9 @@ public class HGSJ001 extends DaoEPBase {
eiColumn
.
setDescName
(
"状态0.停止1.启用"
);
eiColumn
.
setDescName
(
"状态0.停止1.启用"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPUTE_TYPE
);
eiColumn
.
setDescName
(
"计算类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
...
@@ -535,6 +540,15 @@ public class HGSJ001 extends DaoEPBase {
...
@@ -535,6 +540,15 @@ public class HGSJ001 extends DaoEPBase {
public
void
setStatus
(
Integer
status
)
{
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
this
.
status
=
status
;
}
}
public
Integer
getComputeType
()
{
return
computeType
;
}
public
void
setComputeType
(
Integer
computeType
)
{
this
.
computeType
=
computeType
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -564,6 +578,7 @@ public class HGSJ001 extends DaoEPBase {
...
@@ -564,6 +578,7 @@ public class HGSJ001 extends DaoEPBase {
setPrinc
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRINC
)),
princ
));
setPrinc
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRINC
)),
princ
));
setPrincName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRINC_NAME
)),
princName
));
setPrincName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRINC_NAME
)),
princName
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setComputeType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPUTE_TYPE
)),
computeType
));
}
}
/**
/**
...
@@ -594,6 +609,7 @@ public class HGSJ001 extends DaoEPBase {
...
@@ -594,6 +609,7 @@ public class HGSJ001 extends DaoEPBase {
map
.
put
(
FIELD_PRINC
,
StringUtils
.
toString
(
princ
,
eiMetadata
.
getMeta
(
FIELD_PRINC
)));
map
.
put
(
FIELD_PRINC
,
StringUtils
.
toString
(
princ
,
eiMetadata
.
getMeta
(
FIELD_PRINC
)));
map
.
put
(
FIELD_PRINC_NAME
,
StringUtils
.
toString
(
princName
,
eiMetadata
.
getMeta
(
FIELD_PRINC_NAME
)));
map
.
put
(
FIELD_PRINC_NAME
,
StringUtils
.
toString
(
princName
,
eiMetadata
.
getMeta
(
FIELD_PRINC_NAME
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_COMPUTE_TYPE
,
StringUtils
.
toString
(
computeType
,
eiMetadata
.
getMeta
(
FIELD_COMPUTE_TYPE
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ001.java
View file @
366ef3cd
...
@@ -6,10 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -6,10 +6,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sj.domain.HGSJ001
;
import
com.baosight.hggp.hg.sj.domain.HGSJ001
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -79,17 +76,16 @@ public class ServiceHGSJ001 extends ServiceEPBase {
...
@@ -79,17 +76,16 @@ public class ServiceHGSJ001 extends ServiceEPBase {
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGSJ001
hpsj001
=
new
HGSJ001
();
HGSJ001
hpsj001
=
new
HGSJ001
();
hpsj001
.
fromMap
(
resultRows
.
get
(
i
));
hpsj001
.
fromMap
(
resultRow
);
queryDeviceCode
(
hpsj001
);
if
(
hpsj001
.
getId
()
==
null
||
hpsj001
.
getId
()
==
0
)
{
if
(
hpsj001
.
getId
()
==
null
||
hpsj001
.
getId
()
==
0
)
{
queryDeviceCode
(
hpsj001
);
this
.
add
(
hpsj001
);
this
.
add
(
hpsj001
);
}
else
{
}
else
{
this
.
modify
(
hpsj001
);
this
.
modify
(
hpsj001
);
}
}
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -142,7 +138,7 @@ public class ServiceHGSJ001 extends ServiceEPBase {
...
@@ -142,7 +138,7 @@ public class ServiceHGSJ001 extends ServiceEPBase {
*/
*/
public
void
queryDeviceCode
(
HGSJ001
hgsj001
){
public
void
queryDeviceCode
(
HGSJ001
hgsj001
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"processName"
,
hgsj001
.
getProcessName
().
trim
());
map
.
put
(
HGSJ001
.
FIELD_PROCESS_NAME
,
hgsj001
.
getProcessName
().
trim
());
map
.
put
(
HGSJ001
.
FIELD_DELETE_FLAG
,
hgsj001
.
getDeleteFlag
());
map
.
put
(
HGSJ001
.
FIELD_DELETE_FLAG
,
hgsj001
.
getDeleteFlag
());
List
<
HGSJ001
>
hgsj001s
=
this
.
dao
.
query
(
HGSJ001
.
QUERY
,
map
);
List
<
HGSJ001
>
hgsj001s
=
this
.
dao
.
query
(
HGSJ001
.
QUERY
,
map
);
AssertUtils
.
isNotEmpty
(
hgsj001s
,
String
.
format
(
"工序名称[%s]已存在,添加失败!"
,
hgsj001
.
getProcessName
()));
AssertUtils
.
isNotEmpty
(
hgsj001s
,
String
.
format
(
"工序名称[%s]已存在,添加失败!"
,
hgsj001
.
getProcessName
()));
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
View file @
366ef3cd
...
@@ -23,7 +23,8 @@
...
@@ -23,7 +23,8 @@
STANDARD_NUM as "standardNum",
<!-- 标准工序人数 -->
STANDARD_NUM as "standardNum",
<!-- 标准工序人数 -->
PRINC as "princ",
<!-- 负责人 -->
PRINC as "princ",
<!-- 负责人 -->
PRINC_NAME as "princName",
<!-- 负责人名称 -->
PRINC_NAME as "princName",
<!-- 负责人名称 -->
STATUS as "status"
<!-- 状态0.停止1.启动 -->
STATUS as "status",
<!-- 状态0.停止1.启动 -->
COMPUTE_TYPE as "computeType"
</sql>
</sql>
<sql
id=
"authCondition"
>
<sql
id=
"authCondition"
>
...
@@ -114,6 +115,9 @@
...
@@ -114,6 +115,9 @@
<isNotEmpty
prepend=
" AND "
property=
"processNames"
>
<isNotEmpty
prepend=
" AND "
property=
"processNames"
>
PROCESS_NAME LIKE CONCAT('%', #processNames#, '%')
PROCESS_NAME LIKE CONCAT('%', #processNames#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"computeType"
>
COMPUTE_TYPE = #computeType#
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
@@ -222,9 +226,10 @@
...
@@ -222,9 +226,10 @@
STANDARD_NUM,
<!-- 标准工序人数 -->
STANDARD_NUM,
<!-- 标准工序人数 -->
PRINC,
<!-- 负责人 -->
PRINC,
<!-- 负责人 -->
PRINC_NAME,
PRINC_NAME,
STATUS
<!-- 状态0.停止1.启动 -->
STATUS,
<!-- 状态0.停止1.启动 -->
COMPUTE_TYPE
)
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #processCode#, #processName#, #unit#, #standardJob#, #standardDays#, #standardNum#, #princ#, #princName#,#status#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #processCode#, #processName#, #unit#, #standardJob#, #standardDays#, #standardNum#, #princ#, #princName#,#status#
,#computeType#
)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
@@ -266,7 +271,8 @@
...
@@ -266,7 +271,8 @@
STANDARD_NUM = #standardNum#,
<!-- 标准工序人数 -->
STANDARD_NUM = #standardNum#,
<!-- 标准工序人数 -->
PRINC = #princ#,
<!-- 负责人 -->
PRINC = #princ#,
<!-- 负责人 -->
PRINC_NAME = #princName#,
PRINC_NAME = #princName#,
STATUS = #status#
<!-- 状态0.停止1.启动 -->
STATUS = #status#,
<!-- 状态0.停止1.启动 -->
COMPUTE_TYPE = #computeType#
WHERE
WHERE
ID = #id#
ID = #id#
</update>
</update>
...
...
src/main/webapp/HG/SB/HGSB007.js
View file @
366ef3cd
...
@@ -2,6 +2,13 @@ $(function () {
...
@@ -2,6 +2,13 @@ $(function () {
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
height
:
$
(
document
).
height
()
-
$
(
"#inqu"
).
height
()
-
$
(
"#ef_form_head"
).
height
()
-
100
,
}
});
IPLATUI
.
EFGrid
=
{
IPLATUI
.
EFGrid
=
{
/*"result": {
/*"result": {
pageable: {
pageable: {
...
...
src/main/webapp/HG/SJ/HGSJ001.js
View file @
366ef3cd
...
@@ -156,6 +156,7 @@ let save = function (btnNode) {
...
@@ -156,6 +156,7 @@ let save = function (btnNode) {
let
standardDays
=
item
.
get
(
"standardDays"
);
let
standardDays
=
item
.
get
(
"standardDays"
);
let
standardNum
=
item
.
get
(
"standardNum"
);
let
standardNum
=
item
.
get
(
"standardNum"
);
let
princ
=
item
.
get
(
"princ"
);
let
princ
=
item
.
get
(
"princ"
);
let
computeType
=
item
.
get
(
"computeType"
);
if
(
isBlank
(
factoryCode
)){
if
(
isBlank
(
factoryCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
工厂
\"
,不能为空!"
);
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
工厂
\"
,不能为空!"
);
flag
=
false
;
flag
=
false
;
...
@@ -186,6 +187,11 @@ let save = function (btnNode) {
...
@@ -186,6 +187,11 @@ let save = function (btnNode) {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
if
(
isBlank
(
computeType
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计算类型
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
});
if
(
flag
)
{
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/HG/SJ/HGSJ001.jsp
View file @
366ef3cd
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="factoryName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="processCode" cname="工序编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="processCode" cname="工序编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="processName" cname="工序名称" width="120" enable="true" readonly="
fals
e" align="center" required="true"/>
<EF:EFColumn ename="processName" cname="工序名称" width="120" enable="true" readonly="
tru
e" align="center" required="true"/>
<EF:EFColumn ename="unit" cname="单位" width="80" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="unit" cname="单位" width="80" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="standardJob" cname="标准作业" width="120" enable="true" format="{0:N0}" editType="number"
<EF:EFColumn ename="standardJob" cname="标准作业" width="120" enable="true" format="{0:N0}" editType="number"
displayType="0" sort="true" align="right" required="true"
displayType="0" sort="true" align="right" required="true"
...
@@ -56,6 +56,9 @@
...
@@ -56,6 +56,9 @@
displayType="0" sort="true" align="right"
displayType="0" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="20" required="true"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="computeType" cname="计算类型" width="80" enable="true" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgsj.computeType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ" cname="负责人"
<EF:EFComboColumn ename="princ" cname="负责人"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
...
...
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