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
22269ad8
Commit
22269ad8
authored
Feb 06, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.fixBug:拆单导致生产订单串数据问题修复
parent
67b0d320
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
56 deletions
+81
-56
HPPZ004.java
src/main/java/com/baosight/hpjx/hp/pz/domain/HPPZ004.java
+69
-44
HPPZ004.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ004.xml
+4
-3
ServiceHPSC005A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC005A.java
+6
-7
HPSCTools.java
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
+2
-2
No files found.
src/main/java/com/baosight/hpjx/hp/pz/domain/HPPZ004.java
View file @
22269ad8
...
...
@@ -15,12 +15,12 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-0
1-22 14:36:36
create
* @history 2024-0
2-06 15:01:45
create
*/
public
class
HPPZ004
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
...
...
@@ -34,7 +34,8 @@ public class HPPZ004 extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 更新人*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 更新人名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 是否删除0.否1.是*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
...
...
@@ -48,96 +49,102 @@ public class HPPZ004 extends DaoEPBase {
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 更新人*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 更新人名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 是否删除0.否1.是*/
public
static
final
String
QUERY
=
"HPPZ004.query"
;
public
static
final
String
COUNT
=
"HPPZ004.count"
;
public
static
final
String
INSERT
=
"HPPZ004.insert"
;
public
static
final
String
UPDATE
=
"HPPZ004.update"
;
public
static
final
String
DELETE
=
"HPPZ004.delete"
;
private
Long
id
=
null
;
private
Long
id
;
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
Integer
inventType
=
null
;
/* 存货类型*/
private
Integer
inventType
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
Integer
status
=
1
;
/* 状态 0未启用 1启用*/
private
Integer
status
;
/* 状态 0未启用 1启用*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
deleteFlag
;
/* 是否删除0.否1.是*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"企业编码 预留"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"存货类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"存货编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态 0未启用 1启用"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"更新人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"更新人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
.
setDescName
(
"是否删除0.否1.是"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HPPZ004
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
...
...
@@ -145,7 +152,7 @@ public class HPPZ004 extends DaoEPBase {
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
...
...
@@ -161,7 +168,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 企业编码 预留.
*
...
...
@@ -177,7 +184,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码.
*
...
...
@@ -193,7 +200,7 @@ public class HPPZ004 extends DaoEPBase {
public
Integer
getInventType
()
{
return
this
.
inventType
;
}
/**
* set the inventType - 存货类型.
*
...
...
@@ -209,7 +216,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getInventCode
()
{
return
this
.
inventCode
;
}
/**
* set the inventCode - 存货编码.
*
...
...
@@ -225,7 +232,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getInventName
()
{
return
this
.
inventName
;
}
/**
* set the inventName - 存货名称.
*
...
...
@@ -241,7 +248,7 @@ public class HPPZ004 extends DaoEPBase {
public
Integer
getStatus
()
{
return
this
.
status
;
}
/**
* set the status - 状态 0未启用 1启用.
*
...
...
@@ -257,7 +264,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 创建人.
*
...
...
@@ -273,7 +280,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 创建人名称.
*
...
...
@@ -289,7 +296,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 创建时间.
*
...
...
@@ -305,7 +312,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 更新人.
*
...
...
@@ -321,7 +328,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 更新人名称.
*
...
...
@@ -337,7 +344,7 @@ public class HPPZ004 extends DaoEPBase {
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 更新时间.
*
...
...
@@ -347,13 +354,29 @@ public class HPPZ004 extends DaoEPBase {
this
.
updatedTime
=
updatedTime
;
}
/**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public
Integer
getDeleteFlag
()
{
return
this
.
deleteFlag
;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
...
...
@@ -367,14 +390,15 @@ public class HPPZ004 extends DaoEPBase {
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
...
...
@@ -389,7 +413,8 @@ public class HPPZ004 extends DaoEPBase {
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DELETE_FLAG
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
FIELD_DELETE_FLAG
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ004.xml
View file @
22269ad8
...
...
@@ -15,7 +15,8 @@
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime"
<!-- 更新时间 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag"
<!-- 更新时间 -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -54,10 +55,10 @@
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"order
By
"
>
<isNotEmpty
property=
"order"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"order
By
"
>
<isEmpty
property=
"order"
>
ID DESC
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC005A.java
View file @
22269ad8
...
...
@@ -110,7 +110,7 @@ public class ServiceHPSC005A extends ServiceBase {
}
inInfo
=
this
.
query
(
inInfo
);
// 刷新主订单信息
inInfo
=
this
.
refreshOrderInfo
(
inInfo
);
inInfo
=
this
.
refreshOrderInfo
(
inInfo
,
prodOrderNo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据操作成功!"
);
}
catch
(
Exception
e
)
{
...
...
@@ -167,6 +167,8 @@ public class ServiceHPSC005A extends ServiceBase {
*/
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
Map
detailMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
"detail"
);
String
prodOrderNo
=
MapUtils
.
getString
(
detailMap
,
"productionOrderNo"
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
Map
resultRow
:
resultRows
)
{
HPSC005A
fSc005a
=
new
HPSC005A
();
...
...
@@ -181,7 +183,7 @@ public class ServiceHPSC005A extends ServiceBase {
}
inInfo
=
this
.
query
(
inInfo
);
// 刷新主订单信息
inInfo
=
this
.
refreshOrderInfo
(
inInfo
);
inInfo
=
this
.
refreshOrderInfo
(
inInfo
,
prodOrderNo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
...
...
@@ -196,12 +198,9 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo
* @return
*/
private
EiInfo
refreshOrderInfo
(
EiInfo
inInfo
)
{
Map
detailMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
"detail"
);
String
prodOrderNo
=
MapUtils
.
getString
(
detailMap
,
"productionOrderNo"
);
private
EiInfo
refreshOrderInfo
(
EiInfo
inInfo
,
String
prodOrderNo
)
{
HPSC005
dbSc005
=
HPSCTools
.
HpSc005
.
get
(
prodOrderNo
);
inInfo
.
getBlock
(
"detail"
).
getRows
().
clear
();
inInfo
.
getBlock
(
"detail"
).
addRow
(
dbSc005
);
inInfo
.
addBlock
(
"detail"
).
addRow
(
dbSc005
);
return
inInfo
;
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
View file @
22269ad8
...
...
@@ -190,7 +190,7 @@ public class HPSCTools {
* @return
*/
public
static
HPSC004
get
(
String
prodOrderNo
)
{
AssertUtils
.
is
Null
(
prodOrderNo
,
"生产订单号不能为空"
);
AssertUtils
.
is
Empty
(
prodOrderNo
,
"生产订单号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"productionOrderNo"
,
prodOrderNo
);
List
<
HPSC004
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC004
.
QUERY
,
queryMap
);
...
...
@@ -305,7 +305,7 @@ public class HPSCTools {
* @return
*/
public
static
HPSC005
get
(
String
prodOrderNo
)
{
AssertUtils
.
is
Null
(
prodOrderNo
,
"生产订单号不能为空"
);
AssertUtils
.
is
Empty
(
prodOrderNo
,
"生产订单号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"productionOrderNo"
,
prodOrderNo
);
List
<
HPSC005
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC005
.
QUERY
,
queryMap
);
...
...
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