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
aebb67c0
Commit
aebb67c0
authored
May 15, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-15 工序单价
parent
13a6d086
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
12 deletions
+55
-12
HGSJ003.java
src/main/java/com/baosight/hggp/hg/sj/domain/HGSJ003.java
+20
-0
ServiceHGSJ003.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
+9
-6
HGSJ001.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
+2
-2
HGSJ003.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ003.xml
+7
-4
HGSJ003.js
src/main/webapp/HG/SJ/HGSJ003.js
+12
-0
HGSJ003.jsp
src/main/webapp/HG/SJ/HGSJ003.jsp
+5
-0
No files found.
src/main/java/com/baosight/hggp/hg/sj/domain/HGSJ003.java
View file @
aebb67c0
...
...
@@ -47,6 +47,7 @@ public class HGSJ003 extends DaoEPBase {
public
static
final
String
FIELD_WIDTH
=
"width"
;
/* 宽*/
public
static
final
String
FIELD_THICK
=
"thick"
;
/* 厚*/
public
static
final
String
FIELD_COEFFICIENT
=
"coefficient"
;
/* 系数*/
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态 0-启用 1-停止*/
public
static
final
String
COL_ID
=
"ID"
;
/* 主键id*/
...
...
@@ -106,6 +107,7 @@ public class HGSJ003 extends DaoEPBase {
private
BigDecimal
width
=
new
BigDecimal
(
0.000
);
/* 宽*/
private
BigDecimal
thick
=
new
BigDecimal
(
0.000
);
/* 厚*/
private
BigDecimal
coefficient
=
new
BigDecimal
(
0.000
);
/* 系数*/
private
BigDecimal
price
=
new
BigDecimal
(
0.000
);
/* 单价*/
private
Integer
status
=
0
;
/* 状态 0-启用 1-停止*/
/**
...
...
@@ -223,6 +225,13 @@ public class HGSJ003 extends DaoEPBase {
eiColumn
.
setDescName
(
"系数"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRICE
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"单价"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态 0-启用 1-停止"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -607,6 +616,15 @@ public class HGSJ003 extends DaoEPBase {
public
void
setCoefficient
(
BigDecimal
coefficient
)
{
this
.
coefficient
=
coefficient
;
}
public
BigDecimal
getPrice
()
{
return
price
;
}
public
void
setPrice
(
BigDecimal
price
)
{
this
.
price
=
price
;
}
/**
* get the status - 状态 0-启用 1-停止.
* @return the status
...
...
@@ -655,6 +673,7 @@ public class HGSJ003 extends DaoEPBase {
setWidth
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WIDTH
)),
width
));
setThick
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_THICK
)),
thick
));
setCoefficient
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COEFFICIENT
)),
coefficient
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
}
...
...
@@ -689,6 +708,7 @@ public class HGSJ003 extends DaoEPBase {
map
.
put
(
FIELD_WIDTH
,
StringUtils
.
toString
(
width
,
eiMetadata
.
getMeta
(
FIELD_WIDTH
)));
map
.
put
(
FIELD_THICK
,
StringUtils
.
toString
(
thick
,
eiMetadata
.
getMeta
(
FIELD_THICK
)));
map
.
put
(
FIELD_COEFFICIENT
,
StringUtils
.
toString
(
coefficient
,
eiMetadata
.
getMeta
(
FIELD_COEFFICIENT
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
return
map
;
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
View file @
aebb67c0
...
...
@@ -90,10 +90,7 @@ public class ServiceHGSJ003 extends ServiceEPBase {
hgsj003
.
setSpec
(
StringUtils
.
trimToEmpty
(
hgsj003
.
getSpec
()));
this
.
add
(
hgsj003
);
}
else
{
// 设置规格
hgsj003
.
setSpec
(
HGSJTools
.
Hgsj003
.
jointSpec
(
hgsj003
.
getLength
(),
hgsj003
.
getWidth
(),
hgsj003
.
getThick
()));
// 去除空格
hgsj003
.
setSpec
(
StringUtils
.
trimToEmpty
(
hgsj003
.
getSpec
()));
this
.
modify
(
hgsj003
);
}
}
...
...
@@ -118,8 +115,14 @@ public class ServiceHGSJ003 extends ServiceEPBase {
* 修改操作
*/
public
void
modify
(
HGSJ003
hgsj003
)
{
// 校验数据
this
.
checkAddData
(
hgsj003
);
String
spec
=
HGSJTools
.
Hgsj003
.
jointSpec
(
hgsj003
.
getLength
(),
hgsj003
.
getWidth
(),
hgsj003
.
getThick
());
if
(!
StringUtils
.
trimToEmpty
(
hgsj003
.
getSpec
()).
equals
(
StringUtils
.
trimToEmpty
(
spec
))){
// 设置规格,去除空格
hgsj003
.
setSpec
(
StringUtils
.
trimToEmpty
(
spec
));
// 校验数据
this
.
checkAddData
(
hgsj003
);
}
DaoUtils
.
update
(
HGSJ003
.
UPDATE
,
hgsj003
);
}
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
View file @
aebb67c0
...
...
@@ -293,8 +293,8 @@
select
a.ORG_ENAME as "orgEname",
a.ORG_CNAME as "orgCname"
from
iplat_hggp
.txsog01 a
left join
iplat_hggp
.txsog02 b on a.ORG_ID = b.ORG_ID
from
${platSchema}
.txsog01 a
left join
${platSchema}
.txsog02 b on a.ORG_ID = b.ORG_ID
where
a.ACCOUNT_CODE = #accountCode#
and a.ORG_TYPE = #orgType#
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ003.xml
View file @
aebb67c0
...
...
@@ -55,6 +55,7 @@
WIDTH as "width",
<!-- 宽 -->
THICK as "thick",
<!-- 厚 -->
COEFFICIENT as "coefficient",
<!-- 系数 -->
PRICE as "price",
STATUS as "status"
<!-- 状态 0-启用 1-停止 -->
</sql>
...
...
@@ -291,9 +292,10 @@
WIDTH,
<!-- 宽 -->
THICK,
<!-- 厚 -->
COEFFICIENT,
<!-- 系数 -->
PRICE,
STATUS
<!-- 状态 0-启用 1-停止 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processCode#, #processName#, #unit#, #processClass#, #spec#, #length#, #width#, #thick#, #coefficient#, #status#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #flowCode#, #flowName#, #processCode#, #processName#, #unit#, #processClass#, #spec#, #length#, #width#, #thick#, #coefficient#, #
price#, #
status#)
</insert>
<delete
id=
"delete"
>
...
...
@@ -337,6 +339,7 @@
WIDTH = #width#,
<!-- 宽 -->
THICK = #thick#,
<!-- 厚 -->
COEFFICIENT = #coefficient#,
<!-- 系数 -->
PRICE = #price#,
STATUS = #status#
<!-- 状态 0-启用 1-停止 -->
WHERE
ID = #id#
...
...
@@ -362,7 +365,7 @@
'' as "length",
'' as "width",
'' as "thick"
from
hggp
.hggy001
from
${hggpSchema}
.hggy001
where ACCOUNT_CODE = #accountCode#
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
...
...
@@ -378,8 +381,8 @@
FACTORY_NAME as "factoryName",
COMPANY_CODE as "companyCode",
COMPANY_NAME as "companyName"
from
iplat_hggp
.txsog01 A
inner join
iplat_hggp
.txsog02 B ON A.ORG_ID = B.ORG_ID
from
${platSchema}
.txsog01 A
inner join
${platSchema}
.txsog02 B ON A.ORG_ID = B.ORG_ID
where A.ACCOUNT_CODE = #accountCode# and A.ORG_TYPE in (#orgType#) AND B.USER_ID = #loginName# and A.IS_DELETED = '0'
</select>
...
...
src/main/webapp/HG/SJ/HGSJ003.js
View file @
aebb67c0
...
...
@@ -260,17 +260,29 @@ let save = function (btnNode) {
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
factoryCode
=
item
.
get
(
"factoryCode"
);
let
processCode
=
item
.
get
(
"processCode"
);
let
processClass
=
item
.
get
(
"processClass"
);
let
price
=
item
.
get
(
"price"
);
if
(
isBlank
(
factoryCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
工厂
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
processCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
工序名称
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
processClass
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
工序分类
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
price
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
单价
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/HG/SJ/HGSJ003.jsp
View file @
aebb67c0
...
...
@@ -59,6 +59,11 @@
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="price" cname="单价" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"
/>
<EF:EFComboColumn ename="status" cname="状态" width="80" enable="true" readonly="false" align="center" required="true" defaultValue="1">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn>
...
...
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