Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
cce8f813
Commit
cce8f813
authored
May 11, 2024
by
wancheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc销售管理和物料清单更新
parent
6f0e87b6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
7 deletions
+53
-7
HPSC002.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC002.java
+1
-0
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+30
-4
HPSC002.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
+20
-1
HPSC002.jsp
src/main/webapp/HP/SC/HPSC002.jsp
+2
-2
No files found.
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC002.java
View file @
cce8f813
...
@@ -110,6 +110,7 @@ public class HPSC002 extends DaoEPBase {
...
@@ -110,6 +110,7 @@ public class HPSC002 extends DaoEPBase {
public
static
final
String
INSERT
=
"HPSC002.insert"
;
public
static
final
String
INSERT
=
"HPSC002.insert"
;
public
static
final
String
UPDATE
=
"HPSC002.update"
;
public
static
final
String
UPDATE
=
"HPSC002.update"
;
public
static
final
String
DELETE
=
"HPSC002.delete"
;
public
static
final
String
DELETE
=
"HPSC002.delete"
;
public
static
final
String
QUERY_SUM
=
"HPSC002.querySum"
;
private
Long
id
;
private
Long
id
;
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
cce8f813
...
@@ -6,7 +6,9 @@ import com.baosight.hpjx.core.constant.CommonConstant;
...
@@ -6,7 +6,9 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.kc.domain.HPKC006
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
...
@@ -66,7 +68,10 @@ public class ServiceHPSC002 extends ServiceBase {
...
@@ -66,7 +68,10 @@ public class ServiceHPSC002 extends ServiceBase {
@Override
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
inInfo
=
super
.
query
(
inInfo
,
HPSC002
.
QUERY
,
new
HPSC002
());
inInfo
=
super
.
query
(
inInfo
,
HPSC002
.
QUERY
,
new
HPSC002
());
List
sum
=
dao
.
query
(
HPSC002
.
QUERY_SUM
,
queryRow
);
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
set
(
EiConstant
.
COLUMN_TOTAL_SUM
,
sum
.
get
(
0
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
...
@@ -154,13 +159,13 @@ public class ServiceHPSC002 extends ServiceBase {
...
@@ -154,13 +159,13 @@ public class ServiceHPSC002 extends ServiceBase {
hpsc002
.
setDeliveryDate
(
DateUtils
.
formatShort
(
hpsc002
.
getDeliveryDate
()));
hpsc002
.
setDeliveryDate
(
DateUtils
.
formatShort
(
hpsc002
.
getDeliveryDate
()));
if
(
hpsc002
.
getId
()
==
null
||
hpsc002
.
getId
()
==
0
)
{
if
(
hpsc002
.
getId
()
==
null
||
hpsc002
.
getId
()
==
0
)
{
hpsc002
.
setDeliveryDate
(
DateUtils
.
formatShort
(
hpsc002
.
getDeliveryDate
()));
hpsc002
.
setDeliveryDate
(
DateUtils
.
formatShort
(
hpsc002
.
getDeliveryDate
()));
this
.
add
(
hpsc002
);
inInfo
=
this
.
add
(
hpsc002
);
}
else
{
}
else
{
this
.
modify
(
hpsc002
);
inInfo
=
this
.
modify
(
hpsc002
);
}
}
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
/*
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
*/
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
}
...
@@ -198,6 +203,10 @@ public class ServiceHPSC002 extends ServiceBase {
...
@@ -198,6 +203,10 @@ public class ServiceHPSC002 extends ServiceBase {
}
}
DaoUtils
.
insert
(
"HPSC002.insert"
,
hpsc002
.
toMap
());
DaoUtils
.
insert
(
"HPSC002.insert"
,
hpsc002
.
toMap
());
//更新零件后,更新部件重量
if
(
hpsc002
.
getPrdtType
()==
3
){
this
.
updatePrdtWt
(
hpsc002
.
getParentId
());
}
if
(!
hpsc002
.
getParentId
().
equals
(
"root"
))
{
if
(!
hpsc002
.
getParentId
().
equals
(
"root"
))
{
this
.
checkTreeNodeLeaf
(
hpsc002
.
getParentId
());
this
.
checkTreeNodeLeaf
(
hpsc002
.
getParentId
());
}
}
...
@@ -490,6 +499,10 @@ public class ServiceHPSC002 extends ServiceBase {
...
@@ -490,6 +499,10 @@ public class ServiceHPSC002 extends ServiceBase {
hppz002
.
setTotalWt
(
totalWt
);
hppz002
.
setTotalWt
(
totalWt
);
hppz002
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
hppz002
.
getLength
(),
hppz002
.
getWidth
(),
hppz002
.
getThick
()));
hppz002
.
setSpec
(
HPPZTools
.
HpPz006
.
jointSpec
(
hppz002
.
getLength
(),
hppz002
.
getWidth
(),
hppz002
.
getThick
()));
DaoUtils
.
update
(
"HPSC002.update"
,
hppz002
.
toMap
());
DaoUtils
.
update
(
"HPSC002.update"
,
hppz002
.
toMap
());
//更新零件后,更新部件重量
if
(
hppz002
.
getPrdtType
()==
3
){
this
.
updatePrdtWt
(
hppz002
.
getParentId
());
}
}
}
public
void
updateHPSC003
(
HPSC002
hppz002
,
HPSC003
HPSC003
)
{
public
void
updateHPSC003
(
HPSC002
hppz002
,
HPSC003
HPSC003
)
{
...
@@ -705,6 +718,19 @@ public class ServiceHPSC002 extends ServiceBase {
...
@@ -705,6 +718,19 @@ public class ServiceHPSC002 extends ServiceBase {
}
}
/**
/**
* 更新零件后,更新部件重量
*
* @param parentId
*/
@OperationLogAnnotation
(
operModul
=
"物料清单"
,
operType
=
"修改"
,
operDesc
=
"更新零件后,更新部件重量"
)
public
void
updatePrdtWt
(
String
parentId
)
{
//1 获取参数
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
DaoUtils
.
update
(
"HPSC002.updatePrdtWt"
,
queryMap
);
}
/**
* 提交 撤回.
* 提交 撤回.
*/
*/
@OperationLogAnnotation
(
operModul
=
"物料清单"
,
operType
=
"提交"
,
operDesc
=
"提交 撤回"
)
@OperationLogAnnotation
(
operModul
=
"物料清单"
,
operType
=
"提交"
,
operDesc
=
"提交 撤回"
)
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
View file @
cce8f813
...
@@ -202,8 +202,20 @@
...
@@ -202,8 +202,20 @@
<include
refid=
"order"
/>
<include
refid=
"order"
/>
</select>
</select>
<!-- 查询统计 -->
<select
id=
"querySum"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC006"
>
SELECT
COALESCE(SUM(NUM), 0) AS "num",
<!-- 数量 -->
COALESCE(SUM(TOTAL_WT), 0) AS "totalWt"
<!-- 重量 -->
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
<include
refid=
"condition"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpsc002 WHERE 1=1
SELECT COUNT(*)
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
AND DEL_STATUS = 0
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
...
@@ -453,6 +465,13 @@
...
@@ -453,6 +465,13 @@
UPDATE hpjx.t_hpsc002 SET FILE_PATH1 = #filePath1# WHERE ID = #id# AND BIZ_TYPE = #bizType#
UPDATE hpjx.t_hpsc002 SET FILE_PATH1 = #filePath1# WHERE ID = #id# AND BIZ_TYPE = #bizType#
</update>
</update>
<!--更新零件后,更新部件重量-->
<update
id=
"updatePrdtWt"
>
update hpjx.t_hpsc002
set TOTAL_WT = (select TOTAL_WT from (select sum(TOTAL_WT) as TOTAL_WT from hpjx.t_hpsc002 where PARENT_ID = #parentId#) a),
UNIT_WT = (select TOTAL_WT from (select sum(TOTAL_WT) as TOTAL_WT from hpjx.t_hpsc002 where PARENT_ID = #parentId#) a)/NUM*1000
where ID = #parentId#
</update>
<select
id=
"checkExamineNum1"
resultClass=
"int"
>
<select
id=
"checkExamineNum1"
resultClass=
"int"
>
SELECT COUNT(1) from hpjx.t_hpsc002
SELECT COUNT(1) from hpjx.t_hpsc002
...
...
src/main/webapp/HP/SC/HPSC002.jsp
View file @
cce8f813
...
@@ -68,11 +68,11 @@
...
@@ -68,11 +68,11 @@
<EF:EFColumn
enable=
"false"
ename=
"parentPrdtName"
hidden=
"true"
cname=
"上级部件名称"
/>
<EF:EFColumn
enable=
"false"
ename=
"parentPrdtName"
hidden=
"true"
cname=
"上级部件名称"
/>
<EF:EFColumn
ename=
"num"
cname=
"数量"
maxLength=
"15"
displayType=
"0.000"
format=
"{0:N0}"
<EF:EFColumn
ename=
"num"
cname=
"数量"
maxLength=
"15"
displayType=
"0.000"
format=
"{0:N0}"
data-regex=
"/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-regex=
"/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置12位整数和3位小数!"
/>
data-errorprompt=
"请输入数字,该值最大可设置12位整数和3位小数!"
sumType=
"all"
/>
<EF:EFColumn
ename=
"unitWt"
format=
"{0:N1}"
cname=
"单重(KG)"
maxLength=
"15"
displayType=
"0.0"
<EF:EFColumn
ename=
"unitWt"
format=
"{0:N1}"
cname=
"单重(KG)"
maxLength=
"15"
displayType=
"0.0"
data-regex=
"/^-?[0-9]{1,12}([.][0-9])?$/"
data-regex=
"/^-?[0-9]{1,12}([.][0-9])?$/"
data-errorprompt=
"请输入数字,该值最大可设置12位整数和1位小数!"
/>
data-errorprompt=
"请输入数字,该值最大可设置12位整数和1位小数!"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"总重(T)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"总重(T)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFComboColumn
enable=
"false"
ename=
"status"
align=
"center"
<EF:EFComboColumn
enable=
"false"
ename=
"status"
align=
"center"
columnTemplate=
"#=textField#"
optionLabel=
" "
columnTemplate=
"#=textField#"
optionLabel=
" "
itemTemplate=
"#=textField#"
textField=
"textField"
itemTemplate=
"#=textField#"
textField=
"textField"
...
...
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