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
e19ff7a6
Commit
e19ff7a6
authored
Mar 08, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.提交代码
parent
a6284edf
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1319 additions
and
31 deletions
+1319
-31
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+12
-0
HPPZ013.java
src/main/java/com/baosight/hpjx/hp/pz/domain/HPPZ013.java
+546
-0
HPPZ01301.java
src/main/java/com/baosight/hpjx/hp/pz/domain/HPPZ01301.java
+95
-0
ServiceHPPZ009.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009.java
+1
-31
ServiceHPPZ013.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ013.java
+188
-0
HPPZ013.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ013.xml
+159
-0
User.java
src/main/java/com/baosight/hpjx/hp/xs/domain/User.java
+21
-0
HPXSUser.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSUser.xml
+1
-0
HPXSTools.java
src/main/java/com/baosight/hpjx/hp/xs/tools/HPXSTools.java
+88
-0
HPPZ013.js
src/main/webapp/HP/PZ/HPPZ013.js
+149
-0
HPPZ013.jsp
src/main/webapp/HP/PZ/HPPZ013.jsp
+59
-0
No files found.
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
e19ff7a6
...
...
@@ -233,6 +233,18 @@ public class HPSqlConstant {
}
/**
* HPKC013 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HPKC013
{
// 锁
public
static
final
String
UPDATE_STATUS
=
"HPKC013.updatestatus"
;
}
/**
* HPPZ010 SQL 定义
*
* @author:songx
...
...
src/main/java/com/baosight/hpjx/hp/pz/domain/HPPZ013.java
0 → 100644
View file @
e19ff7a6
package
com
.
baosight
.
hpjx
.
hp
.
pz
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* Project: <br>
* Title:THppz013.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-03-07 11:17:57 create
*/
public
class
HPPZ013
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_FACTORY_CODE
=
"factoryCode"
;
/* 工厂编码*/
public
static
final
String
FIELD_FACTORY_NAME
=
"factoryName"
;
/* 工厂名称*/
public
static
final
String
FIELD_GROUP_TYPE
=
"groupType"
;
/* 生产组类型*/
public
static
final
String
FIELD_GROUP_CODE
=
"groupCode"
;
/* 生产组编码*/
public
static
final
String
FIELD_GROUP_NAME
=
"groupName"
;
/* 生产组名称*/
public
static
final
String
FIELD_USER_ID
=
"userId"
;
/* 用户ID*/
public
static
final
String
FIELD_USER_NAME
=
"userName"
;
/* 用户名称*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态:1-在职,2-离职*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
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_FACTORY_CODE
=
"FACTORY_CODE"
;
/* 工厂编码*/
public
static
final
String
COL_FACTORY_NAME
=
"FACTORY_NAME"
;
/* 工厂名称*/
public
static
final
String
COL_GROUP_TYPE
=
"GROUP_TYPE"
;
/* 生产组类型*/
public
static
final
String
COL_GROUP_CODE
=
"GROUP_CODE"
;
/* 生产组编码*/
public
static
final
String
COL_GROUP_NAME
=
"GROUP_NAME"
;
/* 生产组名称*/
public
static
final
String
COL_USER_ID
=
"USER_ID"
;
/* 用户ID*/
public
static
final
String
COL_USER_NAME
=
"USER_NAME"
;
/* 用户名称*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态:1-在职,2-离职*/
public
static
final
String
COL_REMARK
=
"REMARK"
;
/* 备注*/
public
static
final
String
QUERY
=
"HPPZ013.query"
;
public
static
final
String
COUNT
=
"HPPZ013.count"
;
public
static
final
String
INSERT
=
"HPPZ013.insert"
;
public
static
final
String
UPDATE
=
"HPPZ013.update"
;
public
static
final
String
DELETE
=
"HPPZ013.delete"
;
private
Long
id
;
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
;
/* 0.否1.是*/
private
String
factoryCode
=
" "
;
/* 工厂编码*/
private
String
factoryName
=
" "
;
/* 工厂名称*/
private
String
groupType
=
" "
;
/* 生产组类型*/
private
String
groupCode
=
" "
;
/* 生产组编码*/
private
String
groupName
=
" "
;
/* 生产组名称*/
private
String
userId
=
" "
;
/* 用户ID*/
private
String
userName
=
" "
;
/* 用户名称*/
private
Integer
status
;
/* 状态:1-在职,2-离职*/
private
String
remark
=
" "
;
/* 备注*/
/**
* 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_FACTORY_CODE
);
eiColumn
.
setDescName
(
"工厂编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_NAME
);
eiColumn
.
setDescName
(
"工厂名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_GROUP_TYPE
);
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_USER_ID
);
eiColumn
.
setDescName
(
"用户ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_USER_NAME
);
eiColumn
.
setDescName
(
"用户名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态:1-在职,2-离职"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMARK
);
eiColumn
.
setDescName
(
"备注"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HPPZ013
()
{
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 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 groupType - 部门类型.
* @return the groupType
*/
public
String
getGroupType
()
{
return
this
.
groupType
;
}
/**
* set the groupType - 部门类型.
*
* @param groupType - 部门类型
*/
public
void
setGroupType
(
String
groupType
)
{
this
.
groupType
=
groupType
;
}
/**
* 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 userId - 用户ID.
* @return the userId
*/
public
String
getUserId
()
{
return
this
.
userId
;
}
/**
* set the userId - 用户ID.
*
* @param userId - 用户ID
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
/**
* get the userName - 用户名称.
* @return the userName
*/
public
String
getUserName
()
{
return
this
.
userName
;
}
/**
* set the userName - 用户名称.
*
* @param userName - 用户名称
*/
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
/**
* get the status - 状态:1-在职,2-离职.
* @return the status
*/
public
Integer
getStatus
()
{
return
this
.
status
;
}
/**
* set the status - 状态:1-在职,2-离职.
*
* @param status - 状态:1-在职,2-离职
*/
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/**
* get the remark - 备注.
* @return the remark
*/
public
String
getRemark
()
{
return
this
.
remark
;
}
/**
* set the remark - 备注.
*
* @param remark - 备注
*/
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
/**
* 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
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
setGroupType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_TYPE
)),
groupType
));
setGroupCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_CODE
)),
groupCode
));
setGroupName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_NAME
)),
groupName
));
setUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_USER_ID
)),
userId
));
setUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_USER_NAME
)),
userName
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
}
/**
* 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_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_TYPE
,
StringUtils
.
toString
(
groupType
,
eiMetadata
.
getMeta
(
FIELD_GROUP_TYPE
)));
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_USER_ID
,
StringUtils
.
toString
(
userId
,
eiMetadata
.
getMeta
(
FIELD_USER_ID
)));
map
.
put
(
FIELD_USER_NAME
,
StringUtils
.
toString
(
userName
,
eiMetadata
.
getMeta
(
FIELD_USER_NAME
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/pz/domain/HPPZ01301.java
0 → 100644
View file @
e19ff7a6
package
com
.
baosight
.
hpjx
.
hp
.
pz
.
domain
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* Project: <br>
* Title:THppz013.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-03-07 11:17:57 create
*/
public
class
HPPZ01301
extends
HPPZ013
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_GENDER
=
"gender"
;
/* 性别*/
public
static
final
String
FIELD_MOBILE
=
"mobile"
;
/* 联系方式*/
public
static
final
String
COL_GENDER
=
"GENDER"
;
/* 性别*/
public
static
final
String
COL_MOBILE
=
"MOBILE"
;
/* 联系方式*/
private
String
gender
=
" "
;
/* 性别*/
private
String
mobile
=
" "
;
/* 联系方式*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_GENDER
);
eiColumn
.
setDescName
(
"性别"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_MOBILE
);
eiColumn
.
setDescName
(
"联系方式"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HPPZ01301
()
{
initMetaData
();
}
public
String
getGender
()
{
return
gender
;
}
public
void
setGender
(
String
gender
)
{
this
.
gender
=
gender
;
}
public
String
getMobile
()
{
return
mobile
;
}
public
void
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobile
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public
void
fromMap
(
Map
map
)
{
super
.
fromMap
(
map
);
setGender
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GENDER
)),
gender
));
setMobile
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MOBILE
)),
mobile
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
super
.
toMap
();
map
.
put
(
FIELD_GENDER
,
StringUtils
.
toString
(
gender
,
eiMetadata
.
getMeta
(
FIELD_GENDER
)));
map
.
put
(
FIELD_MOBILE
,
StringUtils
.
toString
(
mobile
,
eiMetadata
.
getMeta
(
FIELD_MOBILE
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009.java
View file @
e19ff7a6
...
...
@@ -9,7 +9,6 @@ import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.RsaUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
...
...
@@ -17,7 +16,6 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import
com.baosight.iplat4j.core.service.soa.XLocalManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.xservices.xs.constants.LoginConstants
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -128,7 +126,7 @@ public class ServiceHPPZ009 extends ServiceBase {
// 此处不能使用DaoUtils方法insert
dao
.
insert
(
HPPZ009
.
INSERT
,
fPz009
);
// 默认新增企业管理员账号
this
.
initUser
(
fPz009
);
HPXSTools
.
XsUser
.
addUser
(
fPz009
.
getCompanyCode
(),
fPz009
.
getCompanyName
()
);
// 关联企业管理员角色
this
.
insertGroupMember
(
fPz009
);
}
...
...
@@ -171,34 +169,6 @@ public class ServiceHPPZ009 extends ServiceBase {
}
/**
* 初始化用户
*
* @param hppz009
*/
private
void
initUser
(
HPPZ009
hppz009
)
throws
Exception
{
String
companyCode
=
hppz009
.
getCompanyCode
();
Map
inInfoRowMap
=
new
HashMap
();
inInfoRowMap
.
put
(
"userId"
,
companyCode
);
inInfoRowMap
.
put
(
"loginName"
,
companyCode
);
inInfoRowMap
.
put
(
"userName"
,
hppz009
.
getCompanyName
());
// 使用公钥加密密码
String
password
=
RsaUtils
.
encryptByPublicKey
(
LoginConstants
.
rsaPublicKey
,
companyCode
);
inInfoRowMap
.
put
(
"password"
,
password
);
inInfoRowMap
.
put
(
"rePass"
,
password
);
inInfoRowMap
.
put
(
"email"
,
" "
);
inInfoRowMap
.
put
(
"mobile"
,
" "
);
inInfoRowMap
.
put
(
"companyCode"
,
hppz009
.
getCompanyCode
());
EiInfo
inInfo
=
new
EiInfo
();
inInfo
.
addBlock
(
"details"
).
addRow
(
inInfoRowMap
);
inInfo
.
set
(
EiConstant
.
serviceName
,
"XS0102"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"insert"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
if
(
outInfo
.
getStatus
()
<
0
)
{
throw
new
PlatException
(
outInfo
.
getMsg
());
}
}
/**
* 用户关联角色
*
* @param hppz009
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ013.java
0 → 100644
View file @
e19ff7a6
package
com
.
baosight
.
hpjx
.
hp
.
pz
.
service
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ013
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ01301
;
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.LogUtils
;
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
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
/**
* 用工管理
*
* @author:songx
* @date:2024/1/18,17:15
*/
public
class
ServiceHPPZ013
extends
ServiceBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"用工管理"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_RECORD_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPPZ01301
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"用工管理"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HPPZ013
.
QUERY
,
new
HPPZ01301
());
// 设置用户信息
HPXSTools
.
XsUser
.
setUserInfo
(
inInfo
,
HPPZ01301
.
FIELD_USER_ID
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"用工管理"
,
operType
=
"新增"
,
operDesc
=
"保存操作"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据校验
this
.
checkSaveData
(
resultRows
);
// 写入数据
this
.
saveData
(
resultRows
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
inInfo
;
}
/**
* 校验保存的数据
*
* @param resultRows
*/
private
void
checkSaveData
(
List
<
Map
>
resultRows
)
{
for
(
Map
resultRow
:
resultRows
)
{
HPPZ01301
fPz01301
=
new
HPPZ01301
();
fPz01301
.
fromMap
(
resultRow
);
AssertUtils
.
isEmpty
(
fPz01301
.
getFactoryCode
(),
"请选择工厂"
);
AssertUtils
.
isEmpty
(
fPz01301
.
getGroupType
(),
"请选择生产组类型"
);
AssertUtils
.
isEmpty
(
fPz01301
.
getGroupCode
(),
"请选择生产组"
);
AssertUtils
.
isEmpty
(
fPz01301
.
getUserName
(),
"请输入姓名"
);
AssertUtils
.
isEmpty
(
fPz01301
.
getGender
(),
"请选择性别"
);
AssertUtils
.
isEmpty
(
fPz01301
.
getMobile
(),
"请输入联系方式"
);
}
}
/**
* 保存数据
*
* @param resultRows
*/
private
void
saveData
(
List
<
Map
>
resultRows
)
{
for
(
Map
resultRow
:
resultRows
)
{
HPPZ01301
fPz01301
=
new
HPPZ01301
();
fPz01301
.
fromMap
(
resultRow
);
// 设置基础信息
this
.
setBaseInfo
(
fPz01301
);
if
(
fPz01301
.
getId
()
==
null
||
fPz01301
.
getId
()
==
0
)
{
this
.
add
(
fPz01301
);
}
else
{
this
.
modify
(
fPz01301
);
}
}
}
/**
* 设置基础信息
*
* @param fPz01301
*/
private
void
setBaseInfo
(
HPPZ01301
fPz01301
)
{
// 厂区名称
fPz01301
.
setFactoryName
(
HPXSTools
.
XsOrg
.
get
(
fPz01301
.
getFactoryCode
()).
getOrgCname
());
// 组名称
fPz01301
.
setGroupName
(
HPXSTools
.
XsOrg
.
get
(
fPz01301
.
getGroupCode
()).
getOrgCname
());
}
/**
* 新增数据
*
* @param fPz01301
*/
private
void
add
(
HPPZ01301
fPz01301
)
{
// 新增用户信息
// String userId =
// HPXSTools.XsUser.addUser(fPz009.getCompanyCode(), fPz01301.getUserName());
fPz01301
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPPZ013
.
INSERT
,
fPz01301
);
}
/**
* 修改数据
*
* @param fPz01301
*/
private
void
modify
(
HPPZ01301
fPz01301
)
{
DaoUtils
.
update
(
HPSqlConstant
.
HPKC013
.
UPDATE_STATUS
,
fPz01301
);
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"用工登记"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
Map
resultRow
:
resultRows
)
{
HPPZ013
fPz013
=
new
HPPZ013
();
fPz013
.
fromMap
(
resultRow
);
fPz013
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HPPZ013
.
DELETE
,
fPz013
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ013.xml
0 → 100644
View file @
e19ff7a6
<?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=
"HPPZ013"
>
<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.是 -->
FACTORY_CODE as "factoryCode",
<!-- 工厂编码 -->
FACTORY_NAME as "factoryName",
<!-- 工厂名称 -->
DEPT_TYPE as "deptType",
<!-- 部门类型 -->
GROUP_CODE as "groupCode",
<!-- 生产组编码 -->
GROUP_NAME as "groupName",
<!-- 生产组名称 -->
USER_ID as "userId",
<!-- 用户ID -->
USER_NAME as "userName",
<!-- 用户名称 -->
STATUS as "status",
<!-- 状态:1-在职,2-离职 -->
REMARK as "remark"
<!-- 备注 -->
</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=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
FACTORY_NAME = #factoryName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deptType"
>
DEPT_TYPE = #deptType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupCode"
>
GROUP_CODE = #groupCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupName"
>
GROUP_NAME = #groupName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"userName"
>
USER_NAME = #userName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"remark"
>
REMARK = #remark#
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql
id=
"updateRevise"
>
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</sql>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"order"
>
$order$
</isNotEmpty>
<isEmpty
property=
"order"
>
ID asc
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.pz.domain.HPPZ013"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPPZ013 (
COMPANY_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
DELETE_FLAG,
<!-- 0.否1.是 -->
FACTORY_CODE,
<!-- 工厂编码 -->
FACTORY_NAME,
<!-- 工厂名称 -->
DEPT_TYPE,
<!-- 部门类型 -->
GROUP_CODE,
<!-- 生产组编码 -->
GROUP_NAME,
<!-- 生产组名称 -->
USER_ID,
<!-- 用户ID -->
USER_NAME,
<!-- 用户名称 -->
STATUS,
<!-- 状态:1-在职,2-离职 -->
REMARK
<!-- 备注 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #factoryCode#, #factoryName#, #deptType#, #groupCode#,
#groupName#, #userId#, #userName#, #status#, #remark#
)
</insert>
<!-- 逻辑删除 -->
<delete
id=
"delete"
>
UPDATE FROM ${hpjxSchema}.T_HPPZ013
SET DELETE_FLAG = #deleteFlag#
WHERE ID = #id#
</delete>
<!-- 修改状态 -->
<update
id=
"updateStatus"
>
UPDATE ${hpjxSchema}.T_HPPZ013
SET
STATUS = #status#,
<!-- 状态:1-在职,2-离职 -->
REMARK = #remark#,
<!-- 备注 -->
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
</update>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/xs/domain/User.java
View file @
e19ff7a6
...
...
@@ -8,6 +8,14 @@ import java.io.Serializable;
*/
public
class
User
implements
Serializable
{
public
static
final
String
FIELD_USER_ID
=
"userId"
;
/* 用户ID*/
public
static
final
String
FIELD_USER_NAME
=
"userName"
;
/* 用户中文名*/
public
static
final
String
FIELD_LOGIN_NAME
=
"loginName"
;
/* 登录ID*/
public
static
final
String
FIELD_GENDER
=
"gender"
;
/* 性别*/
public
static
final
String
FIELD_MOBILE
=
"mobile"
;
/* 手机号*/
public
static
final
String
FIELD_EMAIL
=
"email"
;
/* 邮箱*/
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业代码*/
/**
* 用户ID
*/
...
...
@@ -24,6 +32,11 @@ public class User implements Serializable {
private
String
loginName
;
/**
* 性别
*/
private
String
gender
;
/**
* 手机号
*/
private
String
mobile
;
...
...
@@ -85,4 +98,12 @@ public class User implements Serializable {
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
public
String
getGender
()
{
return
gender
;
}
public
void
setGender
(
String
gender
)
{
this
.
gender
=
gender
;
}
}
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXSUser.xml
View file @
e19ff7a6
...
...
@@ -26,6 +26,7 @@
USER_ID as "userId",
<!-- 用户id -->
USER_NAME as "userName",
<!-- 用户名 -->
LOGIN_NAME as "loginName",
<!-- 登录id -->
GENDER as "gender",
<!-- 性别 -->
MOBILE as "mobile",
<!-- 手机号 -->
EMAIL as "email",
<!-- 邮箱 -->
COMPANY_CODE as "companyCode"
<!-- 企业编码 -->
...
...
src/main/java/com/baosight/hpjx/hp/xs/tools/HPXSTools.java
View file @
e19ff7a6
...
...
@@ -5,12 +5,21 @@ import com.baosight.hpjx.core.enums.OrgTypeEnum;
import
com.baosight.hpjx.hp.xs.domain.Org
;
import
com.baosight.hpjx.hp.xs.domain.User
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.MapUtils
;
import
com.baosight.hpjx.util.ObjectUtils
;
import
com.baosight.hpjx.util.RsaUtils
;
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.soa.XLocalManager
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.xservices.xs.constants.LoginConstants
;
import
org.springframework.util.CollectionUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author:songx
...
...
@@ -61,6 +70,85 @@ public class HPXSTools {
List
<
User
>
results
=
DaoBase
.
getInstance
().
query
(
"HPXSUser.query"
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 查询
*
* @param loginNames
* @return
*/
public
static
List
<
User
>
list
(
List
<
String
>
loginNames
)
{
if
(
CollectionUtils
.
isEmpty
(
loginNames
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"loginNames"
,
loginNames
);
return
DaoBase
.
getInstance
().
query
(
"HPXSUser.query"
,
queryMap
);
}
/**
* 查询
*
* @param loginNames
* @return
*/
public
static
Map
<
String
,
User
>
map
(
List
<
String
>
loginNames
)
{
List
<
User
>
results
=
list
(
loginNames
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
User:
:
getLoginName
,
item
->
item
));
}
/**
* 初始化新增用户
*
* @param companyCode
*/
public
static
void
addUser
(
String
companyCode
,
String
userName
)
throws
Exception
{
Map
inInfoRowMap
=
new
HashMap
();
inInfoRowMap
.
put
(
"userId"
,
companyCode
);
inInfoRowMap
.
put
(
"loginName"
,
companyCode
);
inInfoRowMap
.
put
(
"userName"
,
userName
);
// 使用公钥加密密码
String
password
=
RsaUtils
.
encryptByPublicKey
(
LoginConstants
.
rsaPublicKey
,
companyCode
);
inInfoRowMap
.
put
(
"password"
,
password
);
inInfoRowMap
.
put
(
"rePass"
,
password
);
inInfoRowMap
.
put
(
"email"
,
" "
);
inInfoRowMap
.
put
(
"mobile"
,
" "
);
inInfoRowMap
.
put
(
"companyCode"
,
companyCode
);
EiInfo
inInfo
=
new
EiInfo
();
inInfo
.
addBlock
(
"details"
).
addRow
(
inInfoRowMap
);
inInfo
.
set
(
EiConstant
.
serviceName
,
"XS0102"
);
inInfo
.
set
(
EiConstant
.
methodName
,
"insert"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
inInfo
);
if
(
outInfo
.
getStatus
()
<
0
)
{
throw
new
PlatException
(
outInfo
.
getMsg
());
}
}
/**
* 设置用户信息
*
* @param inInfo
* @param keyName
*/
public
static
void
setUserInfo
(
EiInfo
inInfo
,
String
keyName
)
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
String
>
keyValues
=
ObjectUtils
.
listKey
(
resultRows
,
keyName
);
Map
<
String
,
User
>
resultMap
=
map
(
keyValues
);
if
(
MapUtils
.
isEmpty
(
resultMap
))
{
return
;
}
for
(
Map
resultRow
:
resultRows
)
{
String
keyValue
=
MapUtils
.
getString
(
resultRow
,
keyName
);
User
dbUser
=
resultMap
.
get
(
keyValue
);
resultRow
.
put
(
User
.
FIELD_USER_NAME
,
dbUser
==
null
?
""
:
dbUser
.
getUserName
());
resultRow
.
put
(
User
.
FIELD_GENDER
,
dbUser
==
null
?
""
:
dbUser
.
getGender
());
resultRow
.
put
(
User
.
FIELD_MOBILE
,
dbUser
==
null
?
""
:
dbUser
.
getMobile
());
resultRow
.
put
(
User
.
FIELD_EMAIL
,
dbUser
==
null
?
""
:
dbUser
.
getEmail
());
}
}
}
/**
...
...
src/main/webapp/HP/PZ/HPPZ013.js
0 → 100644
View file @
e19ff7a6
let
groupGlobalData
=
[];
$
(
function
()
{
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
columns
:
[
{
field
:
"groupCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupGlobalData
.
length
;
i
++
)
{
if
(
groupGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
return
groupGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-parentOrgId"
,
options
.
model
[
"factoryCode"
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
inInfo
.
set
(
"serviceName"
,
"HPXSOrg"
);
inInfo
.
set
(
"methodName"
,
"queryGroupComboBox"
);
inInfo
.
set
(
"blockId"
,
"group_record_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
}],
loadComplete
:
function
(
grid
)
{
},
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
save
();
},
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
},
onSuccess
:
function
(
e
)
{
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 生产部门
initGroup
();
// 查询
query
();
});
/**
* 初始化生产部门
*/
let
initGroup
=
function
()
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-parentOrgId"
,
'root'
);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
EiCommunicator
.
send
(
"HPXSOrg"
,
"queryGroupComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
groupGlobalData
=
ei
.
getBlock
(
"group_record_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 保存
*/
let
save
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
whCode
=
item
.
get
(
"whCode"
);
let
inventCode
=
item
.
get
(
"inventCode"
);
let
inventRecordId
=
item
.
get
(
"inventRecordId"
);
let
inventType
=
item
.
get
(
"inventType"
);
let
warnNum
=
item
.
get
(
"warnNum"
);
if
(
isBlank
(
inventType
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货类型
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
whCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
仓库名称
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
inventCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
存货名称
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
inventRecordId
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
规格
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
!
isPositiveInteger
(
warnNum
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
预警值
\"
,必须是大于0的整数!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPPZ012"
,
"save"
,
true
);
}
});
}
}
/**
* 删除
*/
let
deleteFunc
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPPZ012"
,
"delete"
,
true
);
}
});
}
src/main/webapp/HP/PZ/HPPZ013.jsp
0 → 100644
View file @
e19ff7a6
<!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:EFSelect
cname=
"工厂"
blockId=
"inqu_status"
ename=
"factoryCode"
row=
"0"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
cname=
"部门类型"
blockId=
"inqu_status"
ename=
"groupType"
row=
"0"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"xs.og.orgType"
condition=
"ITEM_CODE IN ('prodGroup', 'cutGroup')"
/>
</EF:EFSelect>
<EF:EFSelect
cname=
"生产部门"
blockId=
"inqu_status"
ename=
"groupCode"
row=
"0"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOptions
blockId=
"groupCode_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFInput
cname=
"姓名"
blockId=
"inqu_status"
ename=
"userName"
row=
"0"
colWidth=
"3"
/>
</div>
<div
class=
"row"
>
<EF:EFSelect
cname=
"性别"
blockId=
"inqu_status"
ename=
"gender"
row=
"0"
colWidth=
"3"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"xservices.xs.sex"
/>
</EF:EFSelect>
<EF:EFInput
cname=
"联系方式"
blockId=
"inqu_status"
ename=
"mobile"
row=
"0"
colWidth=
"3"
/>
<EF:EFSelect
cname=
"状态"
blockId=
"inqu_status"
ename=
"status"
row=
"0"
colWidth=
"3"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"ctdy.hppz.userStatus"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"factoryCode"
cname=
"厂区"
width=
"110"
align=
"center"
defaultValue=
""
required=
"true"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"factory_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"groupType"
cname=
"部门类型"
width=
"80"
align=
"center"
required=
"true"
readonly=
"true"
>
<EF:EFCodeOption
codeName=
"xs.og.orgType"
condition=
"ITEM_CODE IN ('prodGroup', 'cutGroup')"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"groupCode"
cname=
"生产部门"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFComboColumn
ename=
"gender"
cname=
"性别"
valueField=
"valueField"
textField=
"textField"
align=
"center"
>
<EF:EFCodeOption
codeName=
"xservices.xs.sex"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"mobile"
cname=
"联系方式"
width=
"120"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
valueField=
"valueField"
textField=
"textField"
align=
"center"
>
<EF:EFCodeOption
codeName=
"ctdy.hppz.userStatus"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
/>
</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