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
ea910f49
Commit
ea910f49
authored
May 16, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划dev;
parent
6b8c6fb9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
6 deletions
+76
-6
HGSC005A.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005A.java
+28
-1
HGSC005A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005A.xml
+17
-5
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+31
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC005A.java
View file @
ea910f49
...
@@ -10,7 +10,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
...
@@ -10,7 +10,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
/**
/**
* Project: <br>
* Project: <br>
* Title:H
gsc005a
.java <br>
* Title:H
GSC005A
.java <br>
* Description: <br>
* Description: <br>
*
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
...
@@ -23,6 +23,7 @@ public class HGSC005A extends DaoEPBase {
...
@@ -23,6 +23,7 @@ public class HGSC005A extends DaoEPBase {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_id
=
"id"
;
public
static
final
String
FIELD_id
=
"id"
;
public
static
final
String
FIELD_mat_detail_id
=
"matDetailId"
;
/* 物料清单明细ID*/
public
static
final
String
FIELD_tech_flow_id
=
"techFlowId"
;
/* 工艺流程ID*/
public
static
final
String
FIELD_tech_flow_id
=
"techFlowId"
;
/* 工艺流程ID*/
public
static
final
String
FIELD_company_code
=
"companyCode"
;
/* 公司编码*/
public
static
final
String
FIELD_company_code
=
"companyCode"
;
/* 公司编码*/
public
static
final
String
FIELD_company_name
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_company_name
=
"companyName"
;
/* 公司名称*/
...
@@ -48,6 +49,7 @@ public class HGSC005A extends DaoEPBase {
...
@@ -48,6 +49,7 @@ public class HGSC005A extends DaoEPBase {
public
static
final
String
FIELD_updated_time
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_updated_time
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
COL_id
=
"id"
;
public
static
final
String
COL_id
=
"id"
;
public
static
final
String
COL_mat_detail_id
=
"mat_detail_id"
;
/* 物料清单明细ID*/
public
static
final
String
COL_tech_flow_id
=
"tech_flow_id"
;
/* 工艺流程ID*/
public
static
final
String
COL_tech_flow_id
=
"tech_flow_id"
;
/* 工艺流程ID*/
public
static
final
String
COL_company_code
=
"company_code"
;
/* 公司编码*/
public
static
final
String
COL_company_code
=
"company_code"
;
/* 公司编码*/
public
static
final
String
COL_company_name
=
"company_name"
;
/* 公司名称*/
public
static
final
String
COL_company_name
=
"company_name"
;
/* 公司名称*/
...
@@ -77,8 +79,11 @@ public class HGSC005A extends DaoEPBase {
...
@@ -77,8 +79,11 @@ public class HGSC005A extends DaoEPBase {
public
static
final
String
INSERT
=
"HGSC005A.insert"
;
public
static
final
String
INSERT
=
"HGSC005A.insert"
;
public
static
final
String
UPDATE
=
"HGSC005A.update"
;
public
static
final
String
UPDATE
=
"HGSC005A.update"
;
public
static
final
String
DELETE
=
"HGSC005A.delete"
;
public
static
final
String
DELETE
=
"HGSC005A.delete"
;
public
static
final
String
DELETE_BY_MAT_DETAIL_ID
=
"HGSC005A.deleteByMatDetailId"
;
private
Long
id
=
new
Long
(
0
);
private
Long
id
=
new
Long
(
0
);
private
Long
matDetailId
=
new
Long
(
0
);
/* 物料清单明细ID*/
private
Long
techFlowId
=
new
Long
(
0
);
/* 工艺流程ID*/
private
Long
techFlowId
=
new
Long
(
0
);
/* 工艺流程ID*/
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
companyName
=
" "
;
/* 公司名称*/
...
@@ -114,6 +119,10 @@ public class HGSC005A extends DaoEPBase {
...
@@ -114,6 +119,10 @@ public class HGSC005A extends DaoEPBase {
eiColumn
.
setDescName
(
" "
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_mat_detail_id
);
eiColumn
.
setDescName
(
"物料清单明细ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_tech_flow_id
);
eiColumn
=
new
EiColumn
(
FIELD_tech_flow_id
);
eiColumn
.
setDescName
(
"工艺流程ID"
);
eiColumn
.
setDescName
(
"工艺流程ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -233,6 +242,22 @@ public class HGSC005A extends DaoEPBase {
...
@@ -233,6 +242,22 @@ public class HGSC005A extends DaoEPBase {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/**
/**
* get the matDetailId - 物料清单明细ID.
* @return the matDetailId
*/
public
Long
getMatDetailId
()
{
return
this
.
matDetailId
;
}
/**
* set the matDetailId - 物料清单明细ID.
*
* @param matDetailId - 物料清单明细ID
*/
public
void
setMatDetailId
(
Long
matDetailId
)
{
this
.
matDetailId
=
matDetailId
;
}
/**
* get the techFlowId - 工艺流程ID.
* get the techFlowId - 工艺流程ID.
* @return the techFlowId
* @return the techFlowId
*/
*/
...
@@ -609,6 +634,7 @@ public class HGSC005A extends DaoEPBase {
...
@@ -609,6 +634,7 @@ public class HGSC005A extends DaoEPBase {
public
void
fromMap
(
Map
map
)
{
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_id
)),
id
));
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_id
)),
id
));
setMatDetailId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_mat_detail_id
)),
matDetailId
));
setTechFlowId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_tech_flow_id
)),
techFlowId
));
setTechFlowId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_tech_flow_id
)),
techFlowId
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_company_code
)),
companyCode
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_company_code
)),
companyCode
));
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_company_name
)),
companyName
));
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_company_name
)),
companyName
));
...
@@ -642,6 +668,7 @@ public class HGSC005A extends DaoEPBase {
...
@@ -642,6 +668,7 @@ public class HGSC005A extends DaoEPBase {
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_id
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_id
)));
map
.
put
(
FIELD_id
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_id
)));
map
.
put
(
FIELD_mat_detail_id
,
StringUtils
.
toString
(
matDetailId
,
eiMetadata
.
getMeta
(
FIELD_mat_detail_id
)));
map
.
put
(
FIELD_tech_flow_id
,
StringUtils
.
toString
(
techFlowId
,
eiMetadata
.
getMeta
(
FIELD_tech_flow_id
)));
map
.
put
(
FIELD_tech_flow_id
,
StringUtils
.
toString
(
techFlowId
,
eiMetadata
.
getMeta
(
FIELD_tech_flow_id
)));
map
.
put
(
FIELD_company_code
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_company_code
)));
map
.
put
(
FIELD_company_code
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_company_code
)));
map
.
put
(
FIELD_company_name
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_company_name
)));
map
.
put
(
FIELD_company_name
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_company_name
)));
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC005A.xml
View file @
ea910f49
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-16 1
6:50:1
2
Generate time : 2024-05-16 1
9:32:4
2
Version : 1.0
Version : 1.0
schema : hggp
schema : hggp
tableName : HGSC005A
tableName : HGSC005A
id BIGINT NOT NULL primarykey,
id BIGINT NOT NULL primarykey,
mat_detail_id BIGINT NOT NULL,
tech_flow_id BIGINT,
tech_flow_id BIGINT,
company_code VARCHAR NOT NULL,
company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
...
@@ -35,6 +36,9 @@
...
@@ -35,6 +36,9 @@
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
id = #id#
id = #id#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"matDetailId"
>
mat_detail_id = #matDetailId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"techFlowId"
>
<isNotEmpty
prepend=
" AND "
property=
"techFlowId"
>
tech_flow_id = #techFlowId#
tech_flow_id = #techFlowId#
</isNotEmpty>
</isNotEmpty>
...
@@ -104,15 +108,13 @@
...
@@ -104,15 +108,13 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
updated_time = #updatedTime#
updated_time = #updatedTime#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planCodes"
>
plan_code IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"planCodes"
>
#planCodes[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC005A"
>
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC005A"
>
SELECT
SELECT
id as "id",
id as "id",
mat_detail_id as "matDetailId",
<!-- 物料清单明细ID -->
tech_flow_id as "techFlowId",
<!-- 工艺流程ID -->
tech_flow_id as "techFlowId",
<!-- 工艺流程ID -->
company_code as "companyCode",
<!-- 公司编码 -->
company_code as "companyCode",
<!-- 公司编码 -->
company_name as "companyName",
<!-- 公司名称 -->
company_name as "companyName",
<!-- 公司名称 -->
...
@@ -158,6 +160,9 @@
...
@@ -158,6 +160,9 @@
<isNotEmpty prepend=" AND " property="id">
<isNotEmpty prepend=" AND " property="id">
id = #id#
id = #id#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matDetailId">
mat_detail_id = #matDetailId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="techFlowId">
<isNotEmpty prepend=" AND " property="techFlowId">
tech_flow_id = #techFlowId#
tech_flow_id = #techFlowId#
</isNotEmpty>
</isNotEmpty>
...
@@ -231,6 +236,7 @@
...
@@ -231,6 +236,7 @@
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGSC005A (id,
INSERT INTO ${hggpSchema}.HGSC005A (id,
mat_detail_id,
<!-- 物料清单明细ID -->
tech_flow_id,
<!-- 工艺流程ID -->
tech_flow_id,
<!-- 工艺流程ID -->
company_code,
<!-- 公司编码 -->
company_code,
<!-- 公司编码 -->
company_name,
<!-- 公司名称 -->
company_name,
<!-- 公司名称 -->
...
@@ -255,7 +261,7 @@
...
@@ -255,7 +261,7 @@
updated_name,
<!-- 修改人名称 -->
updated_name,
<!-- 修改人名称 -->
updated_time
<!-- 更新时间 -->
updated_time
<!-- 更新时间 -->
)
)
VALUES (#i
d#, #techFlowId#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #planCode#, #productCode#, #productName#, #finishDate#, #planStartDate#, #planEndDate#, #quantity#, #finishQuantity#, #unfinishQuantity#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
VALUES (#id#, #matDetailI
d#, #techFlowId#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, #planCode#, #productCode#, #productName#, #finishDate#, #planStartDate#, #planEndDate#, #quantity#, #finishQuantity#, #unfinishQuantity#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
@@ -263,9 +269,15 @@
...
@@ -263,9 +269,15 @@
id = #id#
id = #id#
</delete>
</delete>
<delete
id=
"deleteByMatDetailId"
>
DELETE FROM ${hggpSchema}.HGSC005A WHERE
mat_detail_id = #matDetailId#
</delete>
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGSC005A
UPDATE ${hggpSchema}.HGSC005A
SET
SET
mat_detail_id = #matDetailId#,
<!-- 物料清单明细ID -->
tech_flow_id = #techFlowId#,
<!-- 工艺流程ID -->
tech_flow_id = #techFlowId#,
<!-- 工艺流程ID -->
company_code = #companyCode#,
<!-- 公司编码 -->
company_code = #companyCode#,
<!-- 公司编码 -->
company_name = #companyName#,
<!-- 公司名称 -->
company_name = #companyName#,
<!-- 公司名称 -->
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
ea910f49
...
@@ -135,6 +135,7 @@ public class HGSCTools {
...
@@ -135,6 +135,7 @@ public class HGSCTools {
AssertUtils
.
isEmpty
(
hgsc005
.
getProjName
(),
"项目名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005
.
getProjName
(),
"项目名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005
.
getHgsc005AList
(),
"计划明细不能为空"
);
AssertUtils
.
isEmpty
(
hgsc005
.
getHgsc005AList
(),
"计划明细不能为空"
);
hgsc005
.
getHgsc005AList
().
forEach
(
hgsc005A
->
{
hgsc005
.
getHgsc005AList
().
forEach
(
hgsc005A
->
{
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc005A
.
getMatDetailId
())||
hgsc005A
.
getMatDetailId
()<=
0
,
"物料清单明细ID不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005A
.
getProductCode
(),
"产品编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005A
.
getProductCode
(),
"产品编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005A
.
getProductName
(),
"产品名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005A
.
getProductName
(),
"产品名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc005A
.
getTechFlowId
())||
hgsc005A
.
getTechFlowId
()<=
0
,
"工序ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc005A
.
getTechFlowId
())||
hgsc005A
.
getTechFlowId
()<=
0
,
"工序ID不能为空!"
);
...
@@ -154,6 +155,36 @@ public class HGSCTools {
...
@@ -154,6 +155,36 @@ public class HGSCTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
}
public
static
HGSC005A
update
(
HGSC005A
hgsc005a
){
checkUpdateData
(
hgsc005a
);
HGSC005A
result
=
(
HGSC005A
)
DaoBase
.
getInstance
().
get
(
HGSC001A
.
QUERY
,
HGSC005A
.
FIELD_mat_detail_id
,
hgsc005a
.
getMatDetailId
());
result
.
setProductCode
(
hgsc005a
.
getProductCode
());
result
.
setProductName
(
hgsc005a
.
getProductName
());
result
.
setQuantity
(
hgsc005a
.
getQuantity
());
result
.
setUnfinishQuantity
(
hgsc005a
.
getQuantity
());
result
.
setFinishQuantity
(
0
);
DaoUtils
.
update
(
HGSC005A
.
UPDATE
,
result
);
return
result
;
}
public
static
void
delete
(
Long
matDetailId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
matDetailId
)||
matDetailId
<=
0
,
"物料清单明细ID不能为空!"
);
DaoUtils
.
update
(
HGSC005A
.
DELETE
,
matDetailId
);
}
/**
* 校验修改的数据
*
* @param hgsc005a
*/
private
static
void
checkUpdateData
(
HGSC005A
hgsc005a
)
{
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc005a
.
getMatDetailId
())||
hgsc005a
.
getMatDetailId
()<=
0
,
"物料清单明细ID不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005a
.
getProductCode
(),
"产品编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgsc005a
.
getProductName
(),
"产品名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc005a
.
getTechFlowId
())||
hgsc005a
.
getTechFlowId
()<=
0
,
"工序ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgsc005a
.
getQuantity
())||
hgsc005a
.
getQuantity
()<=
0
,
"数量不能为空!"
);
}
public
static
HGSC005A
constructObj
(
HGSC005A
hgsc005a
,
HGSC005
hgsc005
){
public
static
HGSC005A
constructObj
(
HGSC005A
hgsc005a
,
HGSC005
hgsc005
){
hgsc005a
.
setPlanCode
(
hgsc005
.
getPlanCode
());
hgsc005a
.
setPlanCode
(
hgsc005
.
getPlanCode
());
hgsc005a
.
setCompanyCode
(
hgsc005
.
getCompanyCode
());
hgsc005a
.
setCompanyCode
(
hgsc005
.
getCompanyCode
());
...
...
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