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
c87d4d1c
Commit
c87d4d1c
authored
Sep 26, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.生产下料复页
parent
451dee5c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1765 additions
and
0 deletions
+1765
-0
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+12
-0
HPSC0061.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC0061.java
+520
-0
HPSC0061A.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC0061A.java
+370
-0
ServiceHPSC0061.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC0061.java
+273
-0
HPSC0061.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC0061.xml
+173
-0
HPSC0061A.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC0061A.xml
+92
-0
HPSCTools.java
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
+104
-0
HpScUtils.java
src/main/java/com/baosight/hpjx/hp/sc/utils/HpScUtils.java
+35
-0
HPSC0061.js
src/main/webapp/HP/SC/HPSC0061.js
+130
-0
HPSC0061.jsp
src/main/webapp/HP/SC/HPSC0061.jsp
+56
-0
No files found.
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
c87d4d1c
...
@@ -378,6 +378,18 @@ public class HPSqlConstant {
...
@@ -378,6 +378,18 @@ public class HPSqlConstant {
}
}
/**
/**
* HPSC0061 定义
*
* @author:songx
* @date:2024/9/26,10:08
*/
public
class
HPSC0061
{
// 锁
public
static
final
String
LOCK
=
"HPSC0061.lock"
;
}
/**
* 质量巡检单
* 质量巡检单
*
*
* @author:songx
* @author:songx
...
...
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC0061.java
0 → 100644
View file @
c87d4d1c
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* Project: <br>
* Title:THpsc0061.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-26 9:53:43 create
*/
public
class
HPSC0061
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"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 创建人*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 创建人名称*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 创建时间*/
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
FIELD_PROD_ORDER_NO
=
"prodOrderNo"
;
/* 生产订单号*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 物料编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 物料名称*/
public
static
final
String
FIELD_FACTORY_CODE
=
"factoryCode"
;
/* 厂区编码*/
public
static
final
String
FIELD_FACTORY_NAME
=
"factoryName"
;
/* 厂区名称*/
public
static
final
String
FIELD_GROUP_CODE
=
"groupCode"
;
/* 生产组编码*/
public
static
final
String
FIELD_GROUP_NAME
=
"groupName"
;
/* 生产组名称*/
public
static
final
String
FIELD_COMPLETE_STATUS
=
"completeStatus"
;
/* 完成状态,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"
;
/* 部门编码 预留*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 创建人名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 创建时间*/
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
COL_PROD_ORDER_NO
=
"PROD_ORDER_NO"
;
/* 生产订单号*/
public
static
final
String
COL_INVENT_CODE
=
"INVENT_CODE"
;
/* 物料编码*/
public
static
final
String
COL_INVENT_NAME
=
"INVENT_NAME"
;
/* 物料名称*/
public
static
final
String
COL_FACTORY_CODE
=
"FACTORY_CODE"
;
/* 厂区编码*/
public
static
final
String
COL_FACTORY_NAME
=
"FACTORY_NAME"
;
/* 厂区名称*/
public
static
final
String
COL_GROUP_CODE
=
"GROUP_CODE"
;
/* 生产组编码*/
public
static
final
String
COL_GROUP_NAME
=
"GROUP_NAME"
;
/* 生产组名称*/
public
static
final
String
COL_COMPLETE_STATUS
=
"COMPLETE_STATUS"
;
/* 完成状态,0.未完成,1.已完成*/
public
static
final
String
QUERY
=
"HPSC0061.query"
;
public
static
final
String
COUNT
=
"HPSC0061.count"
;
public
static
final
String
INSERT
=
"HPSC0061.insert"
;
public
static
final
String
UPDATE
=
"HPSC0061.update"
;
public
static
final
String
DELETE
=
"HPSC0061.delete"
;
private
Long
id
=
new
Long
(
0
);
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码 预留*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
deleteFlag
=
new
Integer
(
0
);
/* 0-未删除,1-已删除*/
private
String
prodOrderNo
=
" "
;
/* 生产订单号*/
private
String
inventCode
=
" "
;
/* 物料编码*/
private
String
inventName
=
" "
;
/* 物料名称*/
private
String
factoryCode
=
" "
;
/* 厂区编码*/
private
String
factoryName
=
" "
;
/* 厂区名称*/
private
String
groupCode
=
" "
;
/* 生产组编码*/
private
String
groupName
=
" "
;
/* 生产组名称*/
private
Integer
completeStatus
=
new
Integer
(
0
);
/* 完成状态,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_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
);
eiColumn
=
new
EiColumn
(
FIELD_PROD_ORDER_NO
);
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_FACTORY_CODE
);
eiColumn
.
setDescName
(
"厂区编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_NAME
);
eiColumn
.
setDescName
(
"厂区名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_GROUP_CODE
);
eiColumn
.
setDescName
(
"生产组编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_GROUP_NAME
);
eiColumn
.
setDescName
(
"生产组名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPLETE_STATUS
);
eiColumn
.
setDescName
(
"完成状态,0.未完成,1.已完成"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HPSC0061
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
*/
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码 预留.
*
* @param depCode - 部门编码 预留
*/
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public
void
setUpdatedTime
(
String
updatedTime
)
{
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 prodOrderNo - 生产订单号.
* @return the prodOrderNo
*/
public
String
getProdOrderNo
()
{
return
this
.
prodOrderNo
;
}
/**
* set the prodOrderNo - 生产订单号.
*
* @param prodOrderNo - 生产订单号
*/
public
void
setProdOrderNo
(
String
prodOrderNo
)
{
this
.
prodOrderNo
=
prodOrderNo
;
}
/**
* get the inventCode - 物料编码.
* @return the inventCode
*/
public
String
getInventCode
()
{
return
this
.
inventCode
;
}
/**
* set the inventCode - 物料编码.
*
* @param inventCode - 物料编码
*/
public
void
setInventCode
(
String
inventCode
)
{
this
.
inventCode
=
inventCode
;
}
/**
* get the inventName - 物料名称.
* @return the inventName
*/
public
String
getInventName
()
{
return
this
.
inventName
;
}
/**
* set the inventName - 物料名称.
*
* @param inventName - 物料名称
*/
public
void
setInventName
(
String
inventName
)
{
this
.
inventName
=
inventName
;
}
/**
* get the factoryCode - 厂区编码.
* @return the factoryCode
*/
public
String
getFactoryCode
()
{
return
this
.
factoryCode
;
}
/**
* set the factoryCode - 厂区编码.
*
* @param factoryCode - 厂区编码
*/
public
void
setFactoryCode
(
String
factoryCode
)
{
this
.
factoryCode
=
factoryCode
;
}
/**
* get the factoryName - 厂区名称.
* @return the factoryName
*/
public
String
getFactoryName
()
{
return
this
.
factoryName
;
}
/**
* set the factoryName - 厂区名称.
*
* @param factoryName - 厂区名称
*/
public
void
setFactoryName
(
String
factoryName
)
{
this
.
factoryName
=
factoryName
;
}
/**
* get the groupCode - 生产组编码.
* @return the groupCode
*/
public
String
getGroupCode
()
{
return
this
.
groupCode
;
}
/**
* set the groupCode - 生产组编码.
*
* @param groupCode - 生产组编码
*/
public
void
setGroupCode
(
String
groupCode
)
{
this
.
groupCode
=
groupCode
;
}
/**
* get the groupName - 生产组名称.
* @return the groupName
*/
public
String
getGroupName
()
{
return
this
.
groupName
;
}
/**
* set the groupName - 生产组名称.
*
* @param groupName - 生产组名称
*/
public
void
setGroupName
(
String
groupName
)
{
this
.
groupName
=
groupName
;
}
/**
* get the completeStatus - 完成状态,0.未完成,1.已完成.
* @return the completeStatus
*/
public
Integer
getCompleteStatus
()
{
return
this
.
completeStatus
;
}
/**
* set the completeStatus - 完成状态,0.未完成,1.已完成.
*
* @param completeStatus - 完成状态,0.未完成,1.已完成
*/
public
void
setCompleteStatus
(
Integer
completeStatus
)
{
this
.
completeStatus
=
completeStatus
;
}
/**
* 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
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
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
));
setProdOrderNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROD_ORDER_NO
)),
prodOrderNo
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
setGroupCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_CODE
)),
groupCode
));
setGroupName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_NAME
)),
groupName
));
setCompleteStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPLETE_STATUS
)),
completeStatus
));
}
/**
* 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
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_TIME
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
FIELD_CREATED_TIME
)));
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
)));
map
.
put
(
FIELD_PROD_ORDER_NO
,
StringUtils
.
toString
(
prodOrderNo
,
eiMetadata
.
getMeta
(
FIELD_PROD_ORDER_NO
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_FACTORY_CODE
,
StringUtils
.
toString
(
factoryCode
,
eiMetadata
.
getMeta
(
FIELD_FACTORY_CODE
)));
map
.
put
(
FIELD_FACTORY_NAME
,
StringUtils
.
toString
(
factoryName
,
eiMetadata
.
getMeta
(
FIELD_FACTORY_NAME
)));
map
.
put
(
FIELD_GROUP_CODE
,
StringUtils
.
toString
(
groupCode
,
eiMetadata
.
getMeta
(
FIELD_GROUP_CODE
)));
map
.
put
(
FIELD_GROUP_NAME
,
StringUtils
.
toString
(
groupName
,
eiMetadata
.
getMeta
(
FIELD_GROUP_NAME
)));
map
.
put
(
FIELD_COMPLETE_STATUS
,
StringUtils
.
toString
(
completeStatus
,
eiMetadata
.
getMeta
(
FIELD_COMPLETE_STATUS
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC0061A.java
0 → 100644
View file @
c87d4d1c
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* Project: <br>
* Title:THpsc0061a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-09-26 9:53:46 create
*/
public
class
HPSC0061A
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"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 创建人*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 创建人名称*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 创建时间*/
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
FIELD_INVENT_CODE
=
"inventCode"
;
/* 物料编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 物料名称*/
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"
;
/* 部门编码 预留*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 创建人名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 创建时间*/
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
COL_INVENT_CODE
=
"INVENT_CODE"
;
/* 物料编码*/
public
static
final
String
COL_INVENT_NAME
=
"INVENT_NAME"
;
/* 物料名称*/
public
static
final
String
QUERY
=
"HPSC0061A.query"
;
public
static
final
String
COUNT
=
"HPSC0061A.count"
;
public
static
final
String
INSERT
=
"HPSC0061A.insert"
;
public
static
final
String
UPDATE
=
"HPSC0061A.update"
;
public
static
final
String
DELETE
=
"HPSC0061A.delete"
;
private
Long
id
=
new
Long
(
0
);
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码 预留*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
deleteFlag
=
new
Integer
(
0
);
/* 0-未删除,1-已删除*/
private
String
inventCode
=
" "
;
/* 物料编码*/
private
String
inventName
=
" "
;
/* 物料名称*/
/**
* 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_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
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"物料编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"物料名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HPSC0061A
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
*/
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码 预留.
*
* @param depCode - 部门编码 预留
*/
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public
void
setUpdatedTime
(
String
updatedTime
)
{
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 inventCode - 物料编码.
* @return the inventCode
*/
public
String
getInventCode
()
{
return
this
.
inventCode
;
}
/**
* set the inventCode - 物料编码.
*
* @param inventCode - 物料编码
*/
public
void
setInventCode
(
String
inventCode
)
{
this
.
inventCode
=
inventCode
;
}
/**
* get the inventName - 物料名称.
* @return the inventName
*/
public
String
getInventName
()
{
return
this
.
inventName
;
}
/**
* set the inventName - 物料名称.
*
* @param inventName - 物料名称
*/
public
void
setInventName
(
String
inventName
)
{
this
.
inventName
=
inventName
;
}
/**
* 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
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
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
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
}
/**
* 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
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_TIME
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
FIELD_CREATED_TIME
)));
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
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC0061.java
0 → 100644
View file @
c87d4d1c
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
service
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.HPConstants
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.constant.HpScConst
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC003
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
import
com.baosight.hpjx.hp.sc.domain.HPSC0061
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.hp.sc.utils.HpScUtils
;
import
com.baosight.hpjx.hp.xs.domain.Org
;
import
com.baosight.hpjx.hp.xs.tools.HPXSTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.FileUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.MapUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author:songx
* @date:2024/9/26,9:37
*/
public
class
ServiceHPSC0061
extends
ServiceBase
{
/**
* 初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产下料"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC005
().
eiMetadata
);
inInfo
.
addBlock
(
CommonConstant
.
Field
.
DETAIL
).
addBlockMeta
(
new
HPSC006
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"生产下料"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryMap
.
put
(
HPSC003
.
FIELD_DELIVERY_DATE
,
DateUtils
.
formatShort
(
queryMap
.
get
(
HPSC003
.
FIELD_DELIVERY_DATE
)));
queryMap
.
put
(
HPSC005
.
FIELD_WORK_DATE
,
DateUtils
.
formatShort
(
queryMap
.
get
(
HPSC005
.
FIELD_WORK_DATE
)));
queryMap
.
put
(
HPSC005
.
FIELD_PLAN_COMPLETION_DATE
,
DateUtils
.
formatShort
(
queryMap
.
get
(
HPSC005
.
FIELD_PLAN_COMPLETION_DATE
)));
inInfo
=
super
.
query
(
inInfo
,
"HPSC005.query"
,
new
HPSC005
());
// 统计各个状态数量
List
<
Map
>
statusStats
=
dao
.
query
(
"HPSC005.statByCompleteStatus"
,
queryMap
);
inInfo
.
set
(
"statusStat"
,
statusStats
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 明细
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产下料"
,
operType
=
"查询"
,
operDesc
=
"查询明细"
)
public
EiInfo
queryDetail
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prodOrderNo"
,
inInfo
.
getString
(
"prodOrderNo"
));
List
<
HPSC0061
>
dbSc0061s
=
dao
.
query
(
"HPSC0061.queryDetail"
,
queryMap
);
inInfo
.
addBlock
(
CommonConstant
.
Field
.
DETAIL
).
setRows
(
dbSc0061s
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询明细失败"
);
}
return
inInfo
;
}
/**
* 刷新主信息
*
* @param inInfo
* @param prodOrderNo
* @return
*/
private
EiInfo
refreshMain
(
EiInfo
inInfo
,
String
prodOrderNo
)
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prodOrderNo"
,
prodOrderNo
);
List
<
HPSC0061
>
dbSc0061s
=
dao
.
query
(
"HPSC0061.queryDetail"
,
queryMap
);
inInfo
.
addBlock
(
CommonConstant
.
Field
.
DETAIL
).
setRows
(
dbSc0061s
);
return
inInfo
;
}
/**
* 保存操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"生产下料"
,
operType
=
"保存"
,
operDesc
=
"保存"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
String
prodOrderNo
=
inInfo
.
getString
(
"prodOrderNo"
);
List
<
HPSC0061
>
fSc0061s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
CommonConstant
.
Field
.
DETAIL
,
HPSC0061
.
class
);
for
(
HPSC0061
fSc0061
:
fSc0061s
)
{
String
groupCode
=
fSc0061
.
getGroupCode
();
AssertUtils
.
isEmpty
(
groupCode
,
String
.
format
(
"物料【%s】的生产组不能为空,请检查"
,
fSc0061
.
getInventName
()));
Org
groupOrg
=
HPXSTools
.
XsOrg
.
get
(
groupCode
);
fSc0061
.
setGroupName
(
groupOrg
.
getOrgCname
());
fSc0061
.
setFactoryCode
(
groupOrg
.
getFactoryCode
());
fSc0061
.
setFactoryName
(
groupOrg
.
getFactoryName
());
fSc0061
.
setProdOrderNo
(
prodOrderNo
);
if
(
fSc0061
.
getId
()
==
null
||
fSc0061
.
getId
()
==
0
)
{
this
.
add
(
fSc0061
);
}
else
{
this
.
modify
(
fSc0061
);
}
}
// 更新主订单状态
this
.
updateMainStatus
(
prodOrderNo
);
inInfo
=
this
.
queryDetail
(
inInfo
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fSc0061s
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
inInfo
;
}
/**
* 新增操作
*
* @param fSc0061
*/
public
void
add
(
HPSC0061
fSc0061
)
{
fSc0061
.
setCompleteStatus
(
HpScConst
.
CompleteStatus
.
S0
);
fSc0061
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPSC0061
.
INSERT
,
fSc0061
);
}
/**
* 修改操作.
*/
public
void
modify
(
HPSC0061
fSc006
)
{
DaoUtils
.
update
(
HPSC0061
.
UPDATE
,
fSc006
);
}
/**
* 完成
*
* @param inInfo
* @return
*/
public
EiInfo
complete
(
EiInfo
inInfo
)
{
try
{
String
prodOrderNo
=
inInfo
.
getString
(
"prodOrderNo"
);
List
<
HPSC0061
>
fSc0061s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
CommonConstant
.
Field
.
DETAIL
,
HPSC0061
.
class
);
Map
<
Long
,
HPSC0061
>
dbSc0061Map
=
HpScUtils
.
HpSc0061
.
lockAndGet
(
fSc0061s
);
// 检查数据
this
.
checkCompleteData
(
fSc0061s
,
dbSc0061Map
);
// 写入数据
this
.
saveCompleteData
(
fSc0061s
,
dbSc0061Map
);
// 更新主订单状态
this
.
updateMainStatus
(
prodOrderNo
);
// 刷新页面数据
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
refreshMain
(
inInfo
,
prodOrderNo
);
inInfo
.
setMsg
(
"操作成功,本次完成"
+
fSc0061s
.
size
()
+
"条数据"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"操作失败"
);
}
return
inInfo
;
}
/**
* @param fSc0061s
* @param dbSc0061Map
*/
private
void
checkCompleteData
(
List
<
HPSC0061
>
fSc0061s
,
Map
<
Long
,
HPSC0061
>
dbSc0061Map
)
{
AssertUtils
.
isEmpty
(
dbSc0061Map
,
"请先设置生产组后,再进行\"完成\"操作"
);
for
(
HPSC0061
fSc0061
:
fSc0061s
)
{
Long
id
=
fSc0061
.
getId
();
HPSC0061
dbSc0061
=
dbSc0061Map
.
get
(
id
);
AssertUtils
.
isNull
(
dbSc0061
,
String
.
format
(
"标识【%s】不存在,请检查"
,
id
));
AssertUtils
.
isNotEquals
(
dbSc0061
.
getCompleteStatus
(),
CommonConstant
.
YesNo
.
NO_0
,
String
.
format
(
"标识【%s】状态的不是\"未完成\","
,
id
));
}
}
/**
* 写入数据
*
* @param fSc0061s
* @param dbSc0061Map
*/
private
void
saveCompleteData
(
List
<
HPSC0061
>
fSc0061s
,
Map
<
Long
,
HPSC0061
>
dbSc0061Map
)
{
for
(
HPSC0061
fSc0061
:
fSc0061s
)
{
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
HPSC0061
.
FIELD_ID
,
fSc0061
.
getId
());
paramMap
.
put
(
HPSC0061
.
FIELD_COMPLETE_STATUS
,
HpScConst
.
CompleteStatus
.
S1
);
DaoUtils
.
update
(
"HPSC0061.updateCompleteStatus"
,
paramMap
);
}
}
/**
* 更新主订单状态
*
* @param prodOrderNo
*/
private
void
updateMainStatus
(
String
prodOrderNo
)
{
Integer
completeStatus
=
calcCompleteStatus
(
prodOrderNo
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
HPSC005
.
FIELD_PROD_ORDER_NO
,
prodOrderNo
);
paramMap
.
put
(
HPSC0061
.
FIELD_COMPLETE_STATUS
,
completeStatus
);
DaoUtils
.
update
(
"HPSC005.updateCompleteStatus"
,
paramMap
);
}
/**
* 计算完成状态
*
* @param prodOrderNo
* @return
*/
private
Integer
calcCompleteStatus
(
String
prodOrderNo
)
{
List
<
HPSC0061
>
dbSc0061s
=
HPSCTools
.
HpSc0061
.
getDetailByOrder
(
prodOrderNo
);
List
<
Integer
>
statuses
=
dbSc0061s
.
stream
().
map
(
HPSC0061:
:
getCompleteStatus
).
distinct
()
.
collect
(
Collectors
.
toList
());
if
(
statuses
.
size
()
>
1
)
{
return
HpScConst
.
CompleteStatus
.
S2
;
}
else
{
return
statuses
.
get
(
0
);
}
}
}
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC0061.xml
0 → 100644
View file @
c87d4d1c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPSC0061"
>
<sql
id=
"column"
>
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
PROD_ORDER_NO as "prodOrderNo",
<!-- 生产订单号 -->
INVENT_CODE as "inventCode",
<!-- 物料编码 -->
INVENT_NAME as "inventName",
<!-- 物料名称 -->
FACTORY_CODE as "factoryCode",
<!-- 厂区编码 -->
FACTORY_NAME as "factoryName",
<!-- 厂区名称 -->
GROUP_CODE as "groupCode",
<!-- 生产组编码 -->
GROUP_NAME as "groupName",
<!-- 生产组名称 -->
COMPLETE_STATUS as "completeStatus"
<!-- 完成状态,0.未完成,1.已完成 -->
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNo"
>
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupCode"
>
GROUP_CODE = #groupCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupName"
>
GROUP_NAME = #groupName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"completeStatus"
>
COMPLETE_STATUS = #completeStatus#
</isNotEmpty>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC0061"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC0061 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC0061 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<select
id=
"queryDetail"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC0061"
>
SELECT
B.ID as "id",
B.PROD_ORDER_NO as "prodOrderNo",
A.INVENT_CODE as "inventCode",
A.INVENT_NAME as "inventName",
B.FACTORY_CODE as "factoryCode",
B.FACTORY_NAME as "factoryName",
B.GROUP_CODE as "groupCode",
B.GROUP_NAME as "groupName",
IFNULL(B.COMPLETE_STATUS, 0) as "completeStatus"
FROM ${hpjxSchema}.T_HPSC0061A A
LEFT JOIN ${hpjxSchema}.T_HPSC0061 B
ON A.INVENT_CODE = B.INVENT_CODE AND B.PROD_ORDER_NO = #prodOrderNo#
ORDER BY A.INVENT_CODE ASC
</select>
<select
id=
"countDetail"
resultClass=
"int"
>
SELECT COUNT(1)
FROM ${hpjxSchema}.T_HPSC0061A A
LEFT JOIN ${hpjxSchema}.T_HPSC0061 B
ON A.INVENT_CODE = B.INVENT_CODE
WHERE B.PROD_ORDER_NO = #prodOrderNo#
</select>
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPSC0061 (
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 预留 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_NAME,
<!-- 更新人名称 -->
UPDATED_TIME,
<!-- 更新时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
PROD_ORDER_NO,
<!-- 生产订单号 -->
INVENT_CODE,
<!-- 物料编码 -->
INVENT_NAME,
<!-- 物料名称 -->
FACTORY_CODE,
<!-- 厂区编码 -->
FACTORY_NAME,
<!-- 厂区名称 -->
GROUP_CODE,
<!-- 生产组编码 -->
GROUP_NAME,
<!-- 生产组名称 -->
COMPLETE_STATUS
<!-- 完成状态,0.未完成,1.已完成 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #deleteFlag#, #prodOrderNo#, #inventCode#, #inventName#,
#factoryCode#, #factoryName#, #groupCode#, #groupName#, #completeStatus#
)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hpjxSchema}.T_HPSC0061 WHERE ID = #id#
</delete>
<update
id=
"update"
>
UPDATE ${hpjxSchema}.T_HPSC0061
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
FACTORY_CODE = #factoryCode#,
<!-- 厂区编码 -->
FACTORY_NAME = #factoryName#,
<!-- 厂区名称 -->
GROUP_CODE = #groupCode#,
<!-- 生产组编码 -->
GROUP_NAME = #groupName#,
<!-- 生产组名称 -->
WHERE ID = #id#
</update>
<update
id=
"lock"
>
UPDATE ${hpjxSchema}.T_HPSC0061
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
</update>
<!-- 修改完成状态 -->
<update
id=
"updateCompleteStatus"
>
UPDATE ${hpjxSchema}.T_HPSC0061
SET
COMPLETE_STATUS = #completeStatus#,
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 更新时间 -->
WHERE ID = #id#
</update>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC0061A.xml
0 → 100644
View file @
c87d4d1c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPSC0061A"
>
<sql
id=
"column"
>
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
INVENT_CODE as "inventCode",
<!-- 物料编码 -->
INVENT_NAME as "inventName"
<!-- 物料名称 -->
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC0061A"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC0061A WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC0061A WHERE 1=1
<include
refid=
"condition"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPSC0061A (
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 预留 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_NAME,
<!-- 更新人名称 -->
UPDATED_TIME,
<!-- 更新时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
INVENT_CODE,
<!-- 物料编码 -->
INVENT_NAME
<!-- 物料名称 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #deleteFlag#, #inventCode#, #inventName#
)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hpjxSchema}.T_HPSC0061A WHERE ID = #id#
</delete>
<update
id=
"update"
>
UPDATE ${hpjxSchema}.T_HPSC0061A
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
INVENT_CODE = #inventCode#,
<!-- 物料编码 -->
INVENT_NAME = #inventName#
<!-- 物料名称 -->
WHERE ID = #id#
</update>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
View file @
c87d4d1c
...
@@ -1294,6 +1294,110 @@ public class HPSCTools {
...
@@ -1294,6 +1294,110 @@ public class HPSCTools {
}
}
/**
*
* @author:songx
* @date:2024/9/25,9:32
*/
public
static
class
HpSc0061
{
/**
* 锁
*
* @param id
* @return
*/
public
static
void
lock
(
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"生产下料号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
DaoBase
.
getInstance
().
update
(
HPSqlConstant
.
HPSC0061
.
LOCK
,
queryMap
);
}
/**
* 锁
*
* @param ids
* @return
*/
public
static
void
lock
(
List
<
Long
>
ids
)
{
AssertUtils
.
isEmpty
(
ids
,
"生产下料号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"ids"
,
ids
);
DaoBase
.
getInstance
().
update
(
HPSqlConstant
.
HPSC0061
.
LOCK
,
queryMap
);
}
/**
* 查询
*
* @param id
* @return
*/
public
static
HPSC0061
getById
(
Long
id
)
{
AssertUtils
.
isNull
(
id
,
"生产下料ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
List
<
HPSC0061
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC0061
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public
static
List
<
HPSC0061
>
getByOrder
(
String
prodOrderNo
)
{
AssertUtils
.
isEmpty
(
prodOrderNo
,
"生产订单号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prodOrderNo"
,
prodOrderNo
);
return
DaoBase
.
getInstance
().
query
(
HPSC0061
.
QUERY
,
queryMap
);
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public
static
List
<
HPSC0061
>
getDetailByOrder
(
String
prodOrderNo
)
{
AssertUtils
.
isEmpty
(
prodOrderNo
,
"生产订单号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prodOrderNo"
,
prodOrderNo
);
return
DaoBase
.
getInstance
().
query
(
"HPSC0061.queryDetail"
,
queryMap
);
}
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public
static
List
<
HPSC0061
>
list
(
List
<
Long
>
ids
)
{
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"ids"
,
ids
);
return
DaoBase
.
getInstance
().
query
(
HPSC0061
.
QUERY
,
queryMap
);
}
/**
* 查询其他入库信息
*
* @param ids
* @return
*/
public
static
Map
<
Long
,
HPSC0061
>
map
(
List
<
Long
>
ids
)
{
List
<
HPSC0061
>
results
=
list
(
ids
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HPSC0061:
:
getId
,
item
->
item
));
}
}
public
static
class
Hpsc007
{
public
static
class
Hpsc007
{
/**
/**
* 查询
* 查询
...
...
src/main/java/com/baosight/hpjx/hp/sc/utils/HpScUtils.java
View file @
c87d4d1c
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
utils
;
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
utils
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
import
com.baosight.hpjx.hp.sc.domain.HPSC0061
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.util.ObjectUtils
;
import
com.baosight.hpjx.util.ObjectUtils
;
...
@@ -47,4 +48,38 @@ public class HpScUtils {
...
@@ -47,4 +48,38 @@ public class HpScUtils {
}
}
}
}
/**
* @author:songx
* @date:2024/9/24,18:07
*/
public
static
class
HpSc0061
{
/**
* 锁并获取数据
*
* @param fSc0061s
* @return
*/
public
static
Map
<
Long
,
HPSC0061
>
lockAndGet
(
List
<
HPSC0061
>
fSc0061s
)
{
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
fSc0061s
,
HPSC0061
.
FIELD_ID
);
// 锁
HPSCTools
.
HpSc0061
.
lock
(
ids
);
// 查询数据
return
HPSCTools
.
HpSc0061
.
map
(
ids
);
}
/**
* 锁并获取数据
*
* @param id
* @return
*/
public
static
HPSC0061
lockAndGet
(
Long
id
)
{
// 锁
HPSCTools
.
HpSc0061
.
lock
(
id
);
// 查询数据
return
HPSCTools
.
HpSc0061
.
getById
(
id
);
}
}
}
}
src/main/webapp/HP/SC/HPSC0061.js
0 → 100644
View file @
c87d4d1c
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
exportGrid
:
false
,
pageable
:
{
pageSize
:
10
,
pageSizes
:
[
10
,
50
,
70
,
100
],
},
onRowClick
:
function
(
e
)
{
var
block
=
detailGrid
.
getEiBlock
();
if
(
block
!=
null
)
{
block
.
setRows
([]);
detailGrid
.
setEiBlock
(
block
);
}
let
prodOrderNo
=
e
.
model
[
'prodOrderNo'
];
var
inInfo
=
new
EiInfo
()
inInfo
.
set
(
"prodOrderNo"
,
prodOrderNo
);
EiCommunicator
.
send
(
"HPSC0061"
,
"queryDetail"
,
inInfo
,
{
onSuccess
:
function
(
res
)
{
if
(
res
.
status
>
-
1
)
{
detailGrid
.
setEiInfo
(
res
);
$
(
'#prodOrderNo'
).
val
(
prodOrderNo
);
}
else
{
message
(
res
.
msg
);
}
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
},
columns
:
[]
},
"detail"
:
{
exportGrid
:
false
,
columns
:
[]
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 保存
$
(
"#SAVE"
).
on
(
"click"
,
save
);
// 完成
$
(
"#COMPLETE"
).
on
(
"click"
,
complete
);
// 键盘按键
downKeyUp
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
/**
* 保存
*/
function
save
()
{
let
rows
=
detailGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
item
=
rows
[
i
];
let
completeStatus
=
item
[
'completeStatus'
];
let
inventName
=
item
[
'inventName'
];
let
groupCode
=
item
[
'groupCode'
];
if
(
completeStatus
===
"1"
)
{
message
(
"物料【"
+
inventName
+
"】的状态不是
\"
未完成
\"
,不能进行修改"
);
return
;
}
if
(
isBlank
(
groupCode
))
{
message
(
"物料【"
+
inventName
+
"】的生产组不能为空"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"detail"
,
"HPSC0061"
,
"save"
,
true
);
}
});
}
/**
* 完成
*/
let
complete
=
function
()
{
let
rows
=
detailGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
item
=
rows
[
i
];
let
id
=
item
[
'id'
];
let
completeStatus
=
item
[
'completeStatus'
];
let
inventName
=
item
[
'inventName'
];
let
groupCode
=
item
[
'groupCode'
];
if
(
isBlank
(
id
)
||
id
==
0
)
{
message
(
"物料【"
+
inventName
+
"】请先设置生产组,且保存后再进行
\"
完成
\"
操作"
);
return
;
}
if
(
completeStatus
===
"1"
)
{
message
(
"物料【"
+
inventName
+
"】的状态不是
\"
未完成
\"
,不能进行操作"
);
return
;
}
if
(
isBlank
(
groupCode
))
{
message
(
"物料【"
+
inventName
+
"】的生产组不能为空"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
完成
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result,detail"
,
"HPSC0061"
,
"complete"
,
true
);
}
});
}
src/main/webapp/HP/SC/HPSC0061.jsp
0 → 100644
View file @
c87d4d1c
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"生产下料"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"projCode"
cname=
"项目号"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
ename=
"projName"
cname=
"项目名称"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
ename=
"prodOrderNo"
cname=
"生产订单号"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFSelect
ename=
"completeStatus"
cname=
"状态"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOption
label=
"未完成"
value=
"0"
/>
<EF:EFOption
label=
"部分完成"
value=
"2"
/>
<EF:EFOption
label=
"已完成"
value=
"1"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"生产任务集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
showCount=
"true"
height=
"40vh"
checkMode=
"row,single"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目号"
enable=
"false"
align=
"center"
width=
"100"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
align=
"left"
width=
"180"
/>
<EF:EFColumn
ename=
"prodOrderNo"
cname=
"生产订单号"
enable=
"false"
align=
"center"
width=
"80"
/>
<EF:EFColumn
ename=
"prdtName"
cname=
"部件名称"
enable=
"false"
width=
"120"
align=
"left"
/>
<EF:EFColumn
ename=
"partName"
cname=
"零件名称"
enable=
"false"
width=
"120"
align=
"left"
/>
<EF:EFComboColumn
ename=
"completeStatus"
cname=
"状态"
enable=
"false"
width=
"100"
align=
"center"
>
<EF:EFOption
label=
"未完成"
value=
"0"
/>
<EF:EFOption
label=
"已完成"
value=
"1"
/>
<EF:EFOption
label=
"部分完成"
value=
"2"
/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion
id=
"detail"
title=
"下料清单"
>
<EF:EFInput
ename=
"prodOrderNo"
type=
"hidden"
/>
<EF:EFGrid
blockId=
"detail"
autoDraw=
"override"
showCount=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"标识"
enable=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"材料编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"材料名称"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFComboColumn
ename=
"groupCode"
cname=
"生产组"
width=
"180"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
copy=
"true"
>
<EF:EFOptions
blockId=
"group_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"completeStatus"
cname=
"状态"
enable=
"false"
align=
"center"
width=
"80"
>
<EF:EFOption
label=
"未完成"
value=
"0"
/>
<EF:EFOption
label=
"已完成"
value=
"1"
/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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