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
81a56784
Commit
81a56784
authored
Aug 14, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-08-14 物料清单导入模板添加项目字母缩写、项目名称缩写和功能调整调整
parent
283c28b5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
3 deletions
+58
-3
HGSB005A.xml
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB005A.xml
+1
-1
HGSC004A.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC004A.java
+51
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+6
-2
HGSC004A_产品清单.xls
src/main/webapp/common/template/SC/HGSC004A_产品清单.xls
+0
-0
HGSC009A_材料计划.xls
src/main/webapp/common/template/SC/HGSC009A_材料计划.xls
+0
-0
No files found.
src/main/java/com/baosight/hggp/hg/sb/sql/HGSB005A.xml
View file @
81a56784
...
@@ -261,7 +261,7 @@
...
@@ -261,7 +261,7 @@
</delete>
</delete>
<update
id=
"deleteFlag"
>
<update
id=
"deleteFlag"
>
UPDATE ${hggpSchema}.HGSB005
UPDATE ${hggpSchema}.HGSB005
A
SET
SET
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
...
...
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC004A.java
View file @
81a56784
...
@@ -61,6 +61,8 @@ public class HGSC004A extends DaoEPBase {
...
@@ -61,6 +61,8 @@ public class HGSC004A extends DaoEPBase {
public
static
final
String
FIELD_MATERIAL
=
"material"
;
/* 材质*/
public
static
final
String
FIELD_MATERIAL
=
"material"
;
/* 材质*/
public
static
final
String
FIELD_COEFFICIENT
=
"coefficient"
;
/* 系数*/
public
static
final
String
FIELD_COEFFICIENT
=
"coefficient"
;
/* 系数*/
public
static
final
String
FIELD_UNIT
=
"unit"
;
/* 单位*/
public
static
final
String
FIELD_UNIT
=
"unit"
;
/* 单位*/
public
static
final
String
FIELD_proj_code_prefix
=
"projCodePrefix"
;
/* 项目编码前缀*/
public
static
final
String
FIELD_proj_name_prefix
=
"projNamePrefix"
;
/* 项目名称前缀*/
public
static
final
String
COL_id
=
"id"
;
/* 主键*/
public
static
final
String
COL_id
=
"id"
;
/* 主键*/
public
static
final
String
COL_company_code
=
"company_code"
;
/* 公司编码(预留)*/
public
static
final
String
COL_company_code
=
"company_code"
;
/* 公司编码(预留)*/
...
@@ -167,6 +169,10 @@ public class HGSC004A extends DaoEPBase {
...
@@ -167,6 +169,10 @@ public class HGSC004A extends DaoEPBase {
private
Long
techFlowId
=
new
Long
(
0
);
/* 工艺流程id*/
private
Long
techFlowId
=
new
Long
(
0
);
/* 工艺流程id*/
private
String
finishDate
=
" "
;
/* 完工日期*/
private
String
finishDate
=
" "
;
/* 完工日期*/
@ExcelAnno
(
index
=
14
)
private
String
projCodePrefix
=
" "
;
/*项目前缀*/
@ExcelAnno
(
index
=
15
)
private
String
projNamePrefix
=
" "
;
/**
/**
* initialize the metadata.
* initialize the metadata.
*/
*/
...
@@ -382,6 +388,18 @@ public class HGSC004A extends DaoEPBase {
...
@@ -382,6 +388,18 @@ public class HGSC004A extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_UNIT
);
eiColumn
=
new
EiColumn
(
FIELD_UNIT
);
eiColumn
.
setDescName
(
"单位"
);
eiColumn
.
setDescName
(
"单位"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_proj_code_prefix
);
eiColumn
.
setDescName
(
"项目前缀"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_proj_code_prefix
);
eiColumn
.
setDescName
(
"项目字母缩写"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_proj_name_prefix
);
eiColumn
.
setDescName
(
"项目名称缩写"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -911,6 +929,35 @@ public class HGSC004A extends DaoEPBase {
...
@@ -911,6 +929,35 @@ public class HGSC004A extends DaoEPBase {
public
void
setUnit
(
String
unit
)
{
public
void
setUnit
(
String
unit
)
{
this
.
unit
=
unit
;
this
.
unit
=
unit
;
}
}
/**
* get the projCodePrefix - 项目字母前缀.
* @return the projCodePrefix
*/
public
String
getProjCodePrefix
()
{
return
projCodePrefix
;
}
/**
* set the projCodePrefix - 项目字母前缀.
*
* @param projCodePrefix - 项目字母前缀
*/
public
void
setProjCodePrefix
(
String
projCodePrefix
)
{
this
.
projCodePrefix
=
projCodePrefix
;
}
/**
* get the projCodePrefix - 项目名称前缀.
* @return the projCodePrefix
*/
public
String
getProjNamePrefix
()
{
return
projNamePrefix
;
}
/**
* set the projNamePrefix - 项目名称前缀.
* @return the projNamePrefix
*/
public
void
setProjNamePrefix
(
String
projNamePrefix
)
{
this
.
projNamePrefix
=
projNamePrefix
;
}
/**
/**
* get the value from Map.
* get the value from Map.
...
@@ -958,6 +1005,8 @@ public class HGSC004A extends DaoEPBase {
...
@@ -958,6 +1005,8 @@ public class HGSC004A extends DaoEPBase {
setMaterial
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MATERIAL
)),
material
));
setMaterial
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MATERIAL
)),
material
));
setCoefficient
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COEFFICIENT
)),
coefficient
));
setCoefficient
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COEFFICIENT
)),
coefficient
));
setUnit
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT
)),
unit
));
setUnit
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT
)),
unit
));
setProjCodePrefix
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_code_prefix
)),
projCodePrefix
));
setProjNamePrefix
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_name_prefix
)),
projNamePrefix
));
}
}
/**
/**
...
@@ -1005,6 +1054,8 @@ public class HGSC004A extends DaoEPBase {
...
@@ -1005,6 +1054,8 @@ public class HGSC004A extends DaoEPBase {
map
.
put
(
FIELD_MATERIAL
,
StringUtils
.
toString
(
material
,
eiMetadata
.
getMeta
(
FIELD_MATERIAL
)));
map
.
put
(
FIELD_MATERIAL
,
StringUtils
.
toString
(
material
,
eiMetadata
.
getMeta
(
FIELD_MATERIAL
)));
map
.
put
(
FIELD_COEFFICIENT
,
StringUtils
.
toString
(
coefficient
,
eiMetadata
.
getMeta
(
FIELD_COEFFICIENT
)));
map
.
put
(
FIELD_COEFFICIENT
,
StringUtils
.
toString
(
coefficient
,
eiMetadata
.
getMeta
(
FIELD_COEFFICIENT
)));
map
.
put
(
FIELD_UNIT
,
StringUtils
.
toString
(
unit
,
eiMetadata
.
getMeta
(
FIELD_UNIT
)));
map
.
put
(
FIELD_UNIT
,
StringUtils
.
toString
(
unit
,
eiMetadata
.
getMeta
(
FIELD_UNIT
)));
map
.
put
(
FIELD_proj_code_prefix
,
StringUtils
.
toString
(
projCodePrefix
,
eiMetadata
.
getMeta
(
FIELD_proj_code_prefix
)));
map
.
put
(
FIELD_proj_name_prefix
,
StringUtils
.
toString
(
projNamePrefix
,
eiMetadata
.
getMeta
(
FIELD_proj_name_prefix
)));
return
map
;
return
map
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
81a56784
...
@@ -331,6 +331,8 @@ public class HGSCTools {
...
@@ -331,6 +331,8 @@ public class HGSCTools {
hgsc004a
.
setCompanyName
(
results
.
get
(
0
).
getCompanyName
());
hgsc004a
.
setCompanyName
(
results
.
get
(
0
).
getCompanyName
());
hgsc004a
.
setDepCode
(
results
.
get
(
0
).
getDepCode
());
hgsc004a
.
setDepCode
(
results
.
get
(
0
).
getDepCode
());
hgsc004a
.
setDepName
(
results
.
get
(
0
).
getDepName
());
hgsc004a
.
setDepName
(
results
.
get
(
0
).
getDepName
());
hgsc004a
.
setProductCode
(
hgsc004a
.
getProjCodePrefix
().
trim
().
concat
(
hgsc004a
.
getProductCode
()));
hgsc004a
.
setProductName
(
hgsc004a
.
getProjNamePrefix
().
trim
().
concat
(
hgsc004a
.
getProductName
()));
if
(
hgsc004a
.
getParentProdCode
().
trim
().
isEmpty
()){
if
(
hgsc004a
.
getParentProdCode
().
trim
().
isEmpty
()){
hgsc004a
.
setParentProdCode
(
results
.
get
(
0
).
getProjCode
());
hgsc004a
.
setParentProdCode
(
results
.
get
(
0
).
getProjCode
());
hgsc004a
.
setParentProdName
(
results
.
get
(
0
).
getProjName
());
hgsc004a
.
setParentProdName
(
results
.
get
(
0
).
getProjName
());
...
@@ -341,11 +343,13 @@ public class HGSCTools {
...
@@ -341,11 +343,13 @@ public class HGSCTools {
paramMap
.
put
(
"companyCode"
,
hgsc004a
.
getCompanyCode
());
paramMap
.
put
(
"companyCode"
,
hgsc004a
.
getCompanyCode
());
paramMap
.
put
(
"projCode"
,
hgsc004a
.
getProjCode
());
paramMap
.
put
(
"projCode"
,
hgsc004a
.
getProjCode
());
paramMap
.
put
(
"lv"
,
3
);
paramMap
.
put
(
"lv"
,
3
);
paramMap
.
put
(
"productCode"
,
hgsc004a
.
getP
arentProdCode
(
));
paramMap
.
put
(
"productCode"
,
hgsc004a
.
getP
rojCodePrefix
().
trim
().
concat
(
hgsc004a
.
getParentProdCode
()
));
List
<
HGSC004A
>
hgsc004aList
=
list
(
paramMap
);
List
<
HGSC004A
>
hgsc004aList
=
list
(
paramMap
);
AssertUtils
.
isEmpty
(
hgsc004aList
,
String
.
format
(
"父节点-产品编号[%s]数据不存在,导入失败!"
,
hgsc004a
.
getP
arentProdCode
(
)));
AssertUtils
.
isEmpty
(
hgsc004aList
,
String
.
format
(
"父节点-产品编号[%s]数据不存在,导入失败!"
,
hgsc004a
.
getP
rojCodePrefix
().
trim
().
concat
(
hgsc004a
.
getParentProdCode
()
)));
hgsc004a
.
setMaterialId
(
results
.
get
(
0
).
getId
());
hgsc004a
.
setMaterialId
(
results
.
get
(
0
).
getId
());
hgsc004a
.
setLv
(
4
);
hgsc004a
.
setLv
(
4
);
hgsc004a
.
setParentProdCode
(
hgsc004a
.
getProjCodePrefix
().
trim
().
concat
(
hgsc004a
.
getParentProdCode
()));
hgsc004a
.
setParentProdName
(
hgsc004a
.
getProjNamePrefix
().
trim
().
concat
(
hgsc004a
.
getParentProdName
()));
}
}
checkSaveData
(
hgsc004a
);
checkSaveData
(
hgsc004a
);
addEntity
(
hgsc004a
);
addEntity
(
hgsc004a
);
...
...
src/main/webapp/common/template/SC/HGSC004A_
物料
清单.xls
→
src/main/webapp/common/template/SC/HGSC004A_
产品
清单.xls
View file @
81a56784
No preview for this file type
src/main/webapp/common/template/SC/HGSC009A_材料计划.xls
View file @
81a56784
No preview for this file type
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