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
a0f136fe
Commit
a0f136fe
authored
Mar 23, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-03-23 新增下料报工管理
parent
f771d876
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1463 additions
and
0 deletions
+1463
-0
HPSC009.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC009.java
+497
-0
ServiceHPSC009.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC009.java
+186
-0
HPSC009.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC009.xml
+253
-0
HPSC009.js
src/main/webapp/HP/SC/HPSC009.js
+444
-0
HPSC009.jsp
src/main/webapp/HP/SC/HPSC009.jsp
+83
-0
No files found.
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC009.java
0 → 100644
View file @
a0f136fe
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
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:THpxs002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-03-21 11:14:28 create
*/
public
class
HPSC009
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
/* ID*/
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_REGISTER_DATE
=
"registerDate"
;
/* 登记日期*/
public
static
final
String
FIELD_FACTORY_CODE
=
"factoryCode"
;
/* 工厂代码*/
public
static
final
String
FIELD_GROUP_CODE
=
"groupCode"
;
/* 下料组代码*/
public
static
final
String
FIELD_USER_ID
=
"userId"
;
/* 员工代码*/
public
static
final
String
FIELD_GROUP_TYPE
=
"groupType"
;
/* 下料类型*/
public
static
final
String
FIELD_CONTENT
=
"content"
;
/* 报工内容*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 是否删除0:否1.是*/
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_TIME
=
"updatedTime"
;
/* 修改人名称*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 修改时间*/
public
static
final
String
COL_ID
=
"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_REGISTER_DATE
=
"REGISTER_DATE"
;
/* 登记日期*/
public
static
final
String
COL_FACTORY_CODE
=
"FACTORY_CODE"
;
/* 工厂代码*/
public
static
final
String
COL_GROUP_CODE
=
"GROUP_CODE"
;
/* 下料组代码*/
public
static
final
String
COL_USER_ID
=
"USER_ID"
;
/* 员工代码*/
public
static
final
String
COL_GROUP_TYPE
=
"GROUP_TYPE"
;
/* 下料类型*/
public
static
final
String
COL_CONTENT
=
"CONTENT"
;
/* 报工内容*/
public
static
final
String
COL_REMARK
=
"REMARK"
;
/* 备注*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 是否删除0:否1.是*/
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_TIME
=
"UPDATED_TIME"
;
/* 修改人名称*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 修改时间*/
public
static
final
String
QUERY
=
"HPSC009.query"
;
public
static
final
String
COUNT
=
"HPSC009.count"
;
public
static
final
String
INSERT
=
"HPSC009.insert"
;
public
static
final
String
UPDATE
=
"HPSC009.update"
;
public
static
final
String
DELETE
=
"HPSC009.delete"
;
public
static
final
String
DELETE_FLAG
=
"HPSC009.deleteFlag"
;
private
Long
id
=
new
Long
(
0
);
/* ID*/
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码 预留*/
private
String
registerDate
=
" "
;
/* 登记日期*/
private
String
factoryCode
=
" "
;
/* 工厂代码*/
private
String
groupCode
=
" "
;
/* 下料组代码*/
private
String
userId
=
" "
;
/* 员工代码*/
private
String
groupType
=
" "
;
/* 下料类型*/
private
String
content
=
" "
;
/* 报工内容*/
private
String
remark
=
" "
;
/* 备注*/
private
Integer
deleteFlag
;
/* 是否删除0:否1.是*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 修改人*/
private
String
updatedTime
=
" "
;
/* 修改人名称*/
private
String
updatedName
=
" "
;
/* 修改时间*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
"ID"
);
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_REGISTER_DATE
);
eiColumn
.
setDescName
(
"登记日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FACTORY_CODE
);
eiColumn
.
setDescName
(
"工厂代码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_GROUP_CODE
);
eiColumn
.
setDescName
(
"下料组代码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_USER_ID
);
eiColumn
.
setDescName
(
"员工代码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_GROUP_TYPE
);
eiColumn
.
setDescName
(
"下料类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CONTENT
);
eiColumn
.
setDescName
(
"报工内容"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REMARK
);
eiColumn
.
setDescName
(
"备注"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
.
setDescName
(
"是否删除0:否1.是"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"修改人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"修改人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"修改时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HPSC009
()
{
initMetaData
();
}
/**
* get the id - ID.
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id - ID.
*
* @param id - 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 registerDate - 登记日期.
* @return the registerDate
*/
public
String
getRegisterDate
()
{
return
this
.
registerDate
;
}
/**
* set the registerDate - 登记日期.
*
* @param registerDate - 登记日期
*/
public
void
setRegisterDate
(
String
registerDate
)
{
this
.
registerDate
=
registerDate
;
}
/**
* 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 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 userId - 员工代码.
* @return the userId
*/
public
String
getUserId
()
{
return
this
.
userId
;
}
/**
* set the userId - 员工代码.
*
* @param userId - 员工代码
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
/**
* 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 content - 报工内容.
* @return the content
*/
public
String
getContent
()
{
return
this
.
content
;
}
/**
* set the content - 报工内容.
*
* @param content - 报工内容
*/
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
/**
* 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 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 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 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 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 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
));
setRegisterDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REGISTER_DATE
)),
registerDate
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setGroupCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_CODE
)),
groupCode
));
setUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_USER_ID
)),
userId
));
setGroupType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_GROUP_TYPE
)),
groupType
));
setContent
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTENT
)),
content
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
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
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
}
/**
* 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_REGISTER_DATE
,
StringUtils
.
toString
(
registerDate
,
eiMetadata
.
getMeta
(
FIELD_REGISTER_DATE
)));
map
.
put
(
FIELD_FACTORY_CODE
,
StringUtils
.
toString
(
factoryCode
,
eiMetadata
.
getMeta
(
FIELD_FACTORY_CODE
)));
map
.
put
(
FIELD_GROUP_CODE
,
StringUtils
.
toString
(
groupCode
,
eiMetadata
.
getMeta
(
FIELD_GROUP_CODE
)));
map
.
put
(
FIELD_USER_ID
,
StringUtils
.
toString
(
userId
,
eiMetadata
.
getMeta
(
FIELD_USER_ID
)));
map
.
put
(
FIELD_GROUP_TYPE
,
StringUtils
.
toString
(
groupType
,
eiMetadata
.
getMeta
(
FIELD_GROUP_TYPE
)));
map
.
put
(
FIELD_CONTENT
,
StringUtils
.
toString
(
content
,
eiMetadata
.
getMeta
(
FIELD_CONTENT
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
map
.
put
(
FIELD_DELETE_FLAG
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
FIELD_DELETE_FLAG
)));
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_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
return
map
;
}
}
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC009.java
0 → 100644
View file @
a0f136fe
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
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.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.sc.domain.HPSC009
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.contants.ACConstants
;
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.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author LiuYang
* @version 1.0 2024/3/21
* @page 下料报工管理
*/
public
class
ServiceHPSC009
extends
ServiceEPBase
{
//下料组编码
final
public
static
String
GROUP_TYPE
=
"cutGroup"
;
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
final
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC009
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC009
.
COL_COMPANY_CODE
,
companyCode
);
final
EiInfo
outEiInfo
=
super
.
query
(
inInfo
,
HPSC009
.
QUERY
,
new
HPSC009
());
CommonMethod
.
initBlock
(
outEiInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BLOCK_ID
,
DdynamicEnum
.
GROUP_CODE_BLOCK_ID
,
DdynamicEnum
.
FACTORY_CODE_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC009
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HPSC009
.
FIELD_GROUP_TYPE
,
GROUP_TYPE
);
}}
);
CommonMethod
.
initBlock
(
outEiInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID1_BLOCK_ID
,
DdynamicEnum
.
GROUP_CODE1_BLOCK_ID
,
DdynamicEnum
.
FACTORY_CODE1_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC009
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HPSC009
.
FIELD_GROUP_TYPE
,
GROUP_TYPE
);
put
(
HPSC009
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
}}
);
CommonMethod
.
initBlock
(
outEiInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_NAME_BLOCK_ID
,
DdynamicEnum
.
GROUP_NAME_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC009
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HPSC009
.
FIELD_GROUP_TYPE
,
GROUP_TYPE
);
//put(HPSC009.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}
);
return
outEiInfo
;
}
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
EiBlock
block
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
String
startDate
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
"createdDateFrom"
);
String
endDate
=
block
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
"createdDateTo"
);
if
(!
endDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"createdDateTo"
,
StringUtil
.
removeHorizontalLine
(
endDate
));
}
if
(!
startDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"createdDateFrom"
,
StringUtil
.
removeHorizontalLine
(
startDate
));
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPSC009
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
return
super
.
query
(
inInfo
,
HPSC009
.
QUERY
,
new
HPSC009
());
}
@OperationLogAnnotation
(
operModul
=
"报工管理"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
int
i
=
0
;
try
{
HPSC009
hpxs001
=
new
HPSC009
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpxs001
.
fromMap
(
map
);
hpxs001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HPSC009
.
DELETE_FLAG
,
hpxs001
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleDeleteException
(
inInfo
,
i
,
e
);
logError
(
"删除失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
query
(
inInfo
);
}
@OperationLogAnnotation
(
operModul
=
"报工管理"
,
operType
=
"修改"
,
operDesc
=
"修改操作"
)
@Override
public
EiInfo
update
(
EiInfo
inInfo
)
{
int
i
=
0
;
try
{
HPSC009
hpxs002
=
new
HPSC009
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpxs002
.
fromMap
(
map
);
hpxs002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
update
(
HPSC009
.
UPDATE
,
hpxs002
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"修改"
)});
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
query
(
inInfo
);
}
@OperationLogAnnotation
(
operModul
=
"报工管理"
,
operType
=
"新增"
,
operDesc
=
"新增操作"
)
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
int
i
=
0
;
try
{
HPSC009
hpxs002
=
new
HPSC009
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpxs002
.
fromMap
(
map
);
hpxs002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPSC009
.
INSERT
,
hpxs002
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.insert"
,
"新增"
)});
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleInsertException
(
inInfo
,
i
,
e
);
logError
(
"新增失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
query
(
inInfo
);
}
public
EiInfo
queryFactoryCode
(
EiInfo
inInfo
)
{
final
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
factoryCode
=
inInfo
.
getString
(
HPSC009
.
FIELD_FACTORY_CODE
);
String
groupType
=
inInfo
.
getString
(
HPSC009
.
FIELD_GROUP_TYPE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_CODE_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC009
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HPSC009
.
FIELD_FACTORY_CODE
,
factoryCode
);
put
(
HPSC009
.
FIELD_GROUP_TYPE
,
groupType
);
}});
return
inInfo
;
}
public
EiInfo
queryGroupCode
(
EiInfo
inInfo
)
{
final
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
factoryCode
=
inInfo
.
getString
(
HPSC009
.
FIELD_FACTORY_CODE
);
String
groupCode
=
inInfo
.
getString
(
HPSC009
.
FIELD_GROUP_CODE
);
String
groupType
=
inInfo
.
getString
(
HPSC009
.
FIELD_GROUP_TYPE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC009
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HPSC009
.
FIELD_FACTORY_CODE
,
factoryCode
);
put
(
HPSC009
.
FIELD_GROUP_CODE
,
groupCode
);
put
(
HPSC009
.
FIELD_GROUP_TYPE
,
groupType
);
}});
return
inInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC009.xml
0 → 100644
View file @
a0f136fe
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-03-21 11:14:28
Version : 1.0
schema : hpjx
tableName : T_HPXS002
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR,
DEP_CODE VARCHAR,
REGISTER_DATE VARCHAR,
FACTORY_CODE VARCHAR NOT NULL,
GROUP_CODE VARCHAR,
USER_ID VARCHAR,
GROUP_TYPE VARCHAR,
CONTENT VARCHAR,
REMARK VARCHAR,
DELETE_FLAG TINYINT,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_TIME VARCHAR,
UPDATED_NAME VARCHAR
-->
<sqlMap
namespace=
"HPSC009"
>
<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=
"registerDate"
>
REGISTER_DATE = #registerDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupCode"
>
GROUP_CODE = #groupCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupType"
>
GROUP_TYPE = #groupType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"content"
>
CONTENT = #content#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"remark"
>
REMARK = #remark#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</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=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC009"
>
SELECT
ID as "id",
<!-- ID -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
REGISTER_DATE as "registerDate",
<!-- 登记日期 -->
FACTORY_CODE as "factoryCode",
<!-- 工厂代码 -->
GROUP_CODE as "groupCode",
<!-- 下料组代码 -->
USER_ID as "userId",
<!-- 员工代码 -->
GROUP_TYPE as "groupType",
<!-- 下料类型 -->
CONTENT as "content",
<!-- 报工内容 -->
REMARK as "remark",
<!-- 备注 -->
DELETE_FLAG as "deleteFlag",
<!-- 是否删除0:否1.是 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 修改人 -->
UPDATED_TIME as "updatedTime",
<!-- 修改人名称 -->
UPDATED_NAME as "updatedName"
<!-- 修改时间 -->
FROM ${hpjxSchema}.T_HPXS002 WHERE 1=1
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPXS002 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<!--
<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="registerDate">
REGISTER_DATE = #registerDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
GROUP_CODE = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId">
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupType">
GROUP_TYPE = #groupType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="content">
CONTENT = #content#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</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="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPXS002 (ID,
<!-- ID -->
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 预留 -->
REGISTER_DATE,
<!-- 登记日期 -->
FACTORY_CODE,
<!-- 工厂代码 -->
GROUP_CODE,
<!-- 下料组代码 -->
USER_ID,
<!-- 员工代码 -->
GROUP_TYPE,
<!-- 下料类型 -->
CONTENT,
<!-- 报工内容 -->
REMARK,
<!-- 备注 -->
DELETE_FLAG,
<!-- 是否删除0:否1.是 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 修改人 -->
UPDATED_TIME,
<!-- 修改人名称 -->
UPDATED_NAME
<!-- 修改时间 -->
)
VALUES (#id#, #companyCode#, #depCode#, #registerDate#, #factoryCode#, #groupCode#, #userId#, #groupType#, #content#, #remark#, #deleteFlag#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedTime#, #updatedName#)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hpjxSchema}.T_HPXS002 WHERE
ID = #id#
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
</delete>
<!--逻辑删除-->
<update
id=
"deleteFlag"
>
UPDATE ${hpjxSchema}.T_HPXS002
SET
DELETE_FLAG = #deleteFlag#,
<!-- 是否删除0:否1.是 -->
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_TIME = #updatedTime#,
<!-- 修改人名称 -->
UPDATED_NAME = #updatedName#
<!-- 修改时间 -->
WHERE
ID = #id#
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
</update>
<update
id=
"update"
>
UPDATE ${hpjxSchema}.T_HPXS002
SET
COMPANY_CODE = #companyCode#,
<!-- 企业编码 预留 -->
DEP_CODE = #depCode#,
<!-- 部门编码 预留 -->
REGISTER_DATE = #registerDate#,
<!-- 登记日期 -->
FACTORY_CODE = #factoryCode#,
<!-- 工厂代码 -->
GROUP_CODE = #groupCode#,
<!-- 下料组代码 -->
USER_ID = #userId#,
<!-- 员工代码 -->
GROUP_TYPE = #groupType#,
<!-- 下料类型 -->
CONTENT = #content#,
<!-- 报工内容 -->
REMARK = #remark#,
<!-- 备注 -->
DELETE_FLAG = #deleteFlag#,
<!-- 是否删除0:否1.是 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_NAME = #createdName#,
<!-- 创建人名称 -->
CREATED_TIME = #createdTime#,
<!-- 创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_TIME = #updatedTime#,
<!-- 修改人名称 -->
UPDATED_NAME = #updatedName#
<!-- 修改时间 -->
WHERE
ID = #id#
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
</update>
</sqlMap>
src/main/webapp/HP/SC/HPSC009.js
0 → 100644
View file @
a0f136fe
$
(
function
()
{
var
factoryCodes
=
__eiInfo
.
getBlock
(
"factory_code_block_id"
).
getMappedRows
();
var
groupCodes
=
__eiInfo
.
getBlock
(
"group_code1_block_id"
).
getMappedRows
();
var
userIds
=
__eiInfo
.
getBlock
(
"user_id1_block_id"
).
getMappedRows
();
var
factoryCode
=
__eiInfo
.
getBlock
(
"factory_code1_block_id"
).
getMappedRows
();
var
groupName
=
__eiInfo
.
getBlock
(
"group_name_block_id"
).
getMappedRows
();
var
userName
=
__eiInfo
.
getBlock
(
"user_name_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
pageSize
:
10
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
},
columns
:
[
/*{
field: "operator",
template: function (item) {
console.log(item)
let auditStatus = item.status;
let template = '';
if (item.matId != null) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.matId + ')" >附件清单</a>';
}
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="check(' + item.id + ',1, \'' + item.planInfoNo + '\')" >提交</a>';
}
/!*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>';
}*!/
return template;
}
},*/
{
field
:
"registerDate"
,
attributes
:
{
class
:
"i-input-readonly"
},
defaultValue
:
function
()
{
return
currShortDate
();
}
},{
field
:
"factoryCode"
,
title
:
"工厂"
,
filter
:
function
(
options
)
{
return
factoryCode
;
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
factoryCodes
.
length
;
i
++
)
{
if
(
factoryCodes
[
i
][
'valueField'
]
===
dataItem
[
'factoryCode'
])
{
return
factoryCodes
[
i
][
'textField'
];
}
}
return
dataItem
[
"factoryCode"
];
}
},{
field
:
"groupCode"
,
title
:
"下料组"
,
filter
:
function
(
options
)
{
var
province
=
options
.
model
[
'factoryCode'
];
if
(
province
)
{
// 返回我们过滤后的数据集
/*return options.values[0][province];*/
return
_
.
filter
(
groupCodes
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
province
;
})
}
else
{
return
groupCodes
;
}
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
groupName
.
length
;
i
++
)
{
if
(
groupName
[
i
][
'valueField'
]
===
dataItem
[
'groupCode'
])
{
return
groupName
[
i
][
'textField'
];
}
}
return
dataItem
[
"groupCode"
];
}
},{
field
:
"userId"
,
title
:
"员工"
,
filter
:
function
(
options
)
{
var
province
=
options
.
model
[
'factoryCode'
];
var
groupCode
=
options
.
model
[
'groupCode'
];
if
(
province
)
{
// 返回我们过滤后的数据集
/*return options.values[0][province];*/
return
_
.
filter
(
userIds
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
province
&&
item
[
"param2Field"
]
==
groupCode
;
})
}
else
{
return
userIds
;
}
},
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
userName
.
length
;
i
++
)
{
if
(
userName
[
i
][
'valueField'
]
===
dataItem
[
'userId'
])
{
return
userName
[
i
][
'textField'
];
}
}
return
dataItem
[
"userId"
];
}
}],
loadComplete
:
function
(
grid
)
{
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
// 判断父级节点是否发生变化
if
(
e
.
field
==
"factoryCode"
)
{
loadChange
(
grid
,
e
,
"groupCode"
);
}
else
if
(
e
.
field
==
"groupCode"
)
{
if
(
e
.
items
[
0
].
factoryCode
.
length
===
0
){
loadChange
(
grid
,
e
,
"factoryCode"
);
}
loadChange
(
grid
,
e
,
"userId"
);
}
else
if
(
e
.
field
==
"userId"
)
{
if
(
e
.
items
[
0
].
groupCode
.
length
===
0
)
{
loadChange
(
grid
,
e
,
"groupCode"
);
}
if
(
e
.
items
[
0
].
factoryCode
.
length
===
0
)
{
loadChange
(
grid
,
e
,
"factoryCode"
);
}
}
});
},
afterEdit
:
function
(
e
)
{
if
(
e
.
field
===
"groupCode"
&&
e
.
model
[
"factoryCode"
].
length
===
0
){
for
(
let
i
=
0
;
i
<
groupName
.
length
;
i
++
)
{
if
(
e
.
model
[
e
.
field
]
===
groupName
[
i
][
"valueField"
]){
e
.
model
[
"factoryCode"
]
=
groupName
[
i
][
"param1Field"
]
break
;
}
}
}
else
if
(
e
.
field
===
"userId"
&&
e
.
model
[
"groupCode"
].
length
===
0
){
for
(
let
i
=
0
;
i
<
userName
.
length
;
i
++
)
{
if
(
e
.
model
[
e
.
field
]
===
userName
[
i
][
"valueField"
]){
//e.model["factoryCode"]=userName[i]["param1Field"]
e
.
model
[
"groupCode"
]
=
userName
[
i
][
"param2Field"
]
break
;
}
}
}
},
onAdd
:
function
(
e
)
{
//e.sender.dataSource.options.fields[4].values = factoryCode;
//e.sender.dataSource.options.fields[5].values = groupCode
//e.sender.dataSource.options.fields[6].values = userId;
// 动态设置默认邮箱
/*$.each(e.items, function(index, item){
item['prdtName'] = "demo"+ index + "@baosight.com";
});*/
},
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
//e.preventDefault();
//let btnNode = $(this);
//禁用按钮
//btnNode.attr("disabled", true);
//saveResult(btnNode);
},
onSuccess
:
function
(
e
)
{
console
.
log
(
"onSuccess:"
+
e
)
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
)
{
query
();
}
},
onRowClick
:
function
(
e
)
{
/*var block = detailGrid.getEiBlock();
if (block != null) {
block.setRows([]);
detailGrid.setEiBlock(block);
}
var info = new EiInfo()
var parentId = e.model['planInfoNo'];
info.set("parentId", parentId);
EiCommunicator.send("HPSC004", "queryDetail", info, {
onSuccess: function (ei) {//返回结果集
detailGrid.setEiInfo(ei);
}, onFail: function (ei) {
}
}, {async: false});*/
},
}
}
//工厂类型下拉联动
$
(
'input[name="inqu_status-0-factoryCode"]'
).
change
(
function
()
{
var
inInfo
=
new
EiInfo
();
var
factoryCode
=
$
(
"#inqu_status-0-factoryCode"
).
val
();
inInfo
.
set
(
"factoryCode"
,
factoryCode
);
inInfo
.
set
(
"groupType"
,
"cutGroup"
);
EiCommunicator
.
send
(
"HPSC009"
,
"queryFactoryCode"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
var
input
=
$
(
"#inqu_status-0-groupCode"
);
let
dataEdition
=
ei
.
getBlock
(
"group_code_block_id"
).
getMappedRows
();
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabel
:
"请选择"
,
dataSource
:
dataEdition
,
template
:
"#=textField#"
});
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
//下料组下拉联动
$
(
'input[name="inqu_status-0-groupCode"]'
).
change
(
function
()
{
var
inInfo
=
new
EiInfo
();
var
factoryCode
=
$
(
"#inqu_status-0-factoryCode"
).
val
();
inInfo
.
set
(
"factoryCode"
,
factoryCode
);
var
groupCode
=
$
(
"#inqu_status-0-groupCode"
).
val
();
inInfo
.
set
(
"groupCode"
,
groupCode
);
inInfo
.
set
(
"groupType"
,
"cutGroup"
);
EiCommunicator
.
send
(
"HPSC009"
,
"queryGroupCode"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
var
input
=
$
(
"#inqu_status-0-userId"
);
let
dataEdition
=
ei
.
getBlock
(
"user_id_block_id"
).
getMappedRows
();
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabel
:
"请选择"
,
dataSource
:
dataEdition
,
template
:
"#=textField#"
});
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
});
});
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HPSC002B?methodName=initLoad&inqu_status-0-bizType=WL&inqu_status-0-id="
+
id
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
});
}
function
check
(
id
,
auditStatus
,
planInfoNo
)
{
const
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"id"
,
id
);
inEiInfo
.
set
(
"planInfoNo"
,
planInfoNo
);
//先判断本身是否填写
EiCommunicator
.
send
(
'HPSC003'
,
'getInfo'
,
inEiInfo
,
{
onSuccess
(
ei
)
{
var
model
=
ei
.
get
(
"model"
);
if
(
!
(
model
.
planCompletionDate
).
trim
())
{
NotificationUtil
(
"提交失败!原因:基本信息中计划完成日期未填写"
,
"error"
);
return
;
}
else
{
//提交
//提交前先判断明细信息中的计划开始和计划结束时间是否都已经填写,只有填写了之后才能进行提交
if
(
auditStatus
==
1
)
{
EiCommunicator
.
send
(
'HPSC004'
,
'inspectDetail'
,
inEiInfo
,
{
onSuccess
(
ei
)
{
var
list
=
ei
.
get
(
"list"
);
if
(
list
)
{
var
count
=
list
[
0
];
if
(
count
>
0
)
{
NotificationUtil
(
"提交失败!原因:明细信息中有未填写的计划开始时间或计划结束时间"
,
"error"
);
}
else
{
EiCommunicator
.
send
(
'HPSC004'
,
'queryDetail'
,
inEiInfo
,{
onSuccess
(
ei
){
var
rows
=
ei
.
blocks
.
detail
.
rows
;
var
res
=
check_time
(
model
,
rows
);
if
(
!
res
){
NotificationUtil
(
"计划结束时间应该大于计划开始时间!"
,
"error"
);
}
else
{
// 提交通过,生成
EiCommunicator
.
send
(
'HPSC003'
,
'submitPlan'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
}
})
}
}
else
{
NotificationUtil
(
"提交失败!未找到明细信息"
,
"error"
);
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
else
{
// 撤回
}
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
function
check_time
(
model
,
rows
){
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
){
if
(
model
.
planInfoNo
==
rows
[
i
][
5
])
{
var
start_time
=
rows
[
i
][
22
];
var
end_time
=
rows
[
i
][
23
];
if
(
end_time
<
start_time
)
{
return
false
;
}
}
}
return
true
;
}
/**
* 保存汇总
*/
function
saveResult
(
btn
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
planCompletionDate
=
item
.
get
(
"planCompletionDate"
);
if
(
isBlank
(
planCompletionDate
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划结束时间
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPSC003"
,
"update"
,
true
);
//释放禁用按钮
btn
.
attr
(
"disabled"
,
false
);
}
});
}
}
/**
* 保存明细
*/
function
saveDetail
(
btn
)
{
let
rows
=
detailGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
planCommentDate
=
item
.
get
(
"planCommentDate"
);
let
planCompletionDate
=
item
.
get
(
"planCompletionDate"
);
if
(
isBlank
(
planCommentDate
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划开始时间
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
planCompletionDate
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划结束时间
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
let
startT
=
new
Date
(
planCommentDate
).
getTime
();
let
endT
=
new
Date
(
planCompletionDate
).
getTime
();
if
(
startT
>
endT
)
{
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
计划开始时间
\"
不能大于
\"
计划结束时间
\"
!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"detail"
,
"HPSC003"
,
"updatePlanDetail"
,
true
);
//释放禁用按钮
btn
.
attr
(
"disabled"
,
false
);
}
});
}
}
function
loadChange
(
grid
,
e
,
field
)
{
var
cell_label
=
field
,
that
=
grid
;
// locked 表示是否为固定列
var
locked
=
that
.
isCellLocked
(
cell_label
);
// tr 表示 locked 和非 locked 的行,index 表示此行的第几列
var
tr
,
index
;
// 获取此 model 元素信息
var
item
=
e
.
items
[
0
];
var
_uid
=
item
.
uid
;
if
(
locked
)
{
tr
=
$
(
".k-grid-content-locked tr[data-uid="
+
_uid
+
"]"
);
index
=
$
(
"th[data-field='"
+
cell_label
+
"']"
).
data
(
"index"
);
}
else
{
tr
=
$
(
".k-grid-content tr[data-uid="
+
_uid
+
"]"
);
index
=
parseInt
(
$
(
"th[data-field='"
+
cell_label
+
"']"
).
data
(
"index"
))
-
that
.
lockedHeader
.
find
(
"th"
).
length
;
}
// 获取子 cell(td)
var
td
=
tr
.
children
(
"td:eq("
+
index
+
")"
);
// 触发 td.click 事件,
td
.
trigger
(
"click"
);
}
\ No newline at end of file
src/main/webapp/HP/SC/HPSC009.jsp
0 → 100644
View file @
a0f136fe
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/3/7
Time: 11:20
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ 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="工厂" ename="factoryCode" blockId="inqu_status" row="0" colWidth="3"
filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="下料组" ename="groupCode" blockId="inqu_status" row="0" colWidth="3"
filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="group_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="员工" ename="userId" blockId="inqu_status" row="0" colWidth="3"
filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_id_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%--<EF:EFSelect cname="是否删除" ename="deleteFlag" blockId="inqu_status" row="0" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>--%>
</div>
<div class="row">
<EF:EFDateSpan startCname="登记日期" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="registerDate" cname="登记日期" width="160" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_code1_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="groupCode" cname="下料组" blockName="group_name_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="userId" cname="员工" blockName="user_name_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="100" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<%--<EF:EFComboColumn ename="groupType" cname="生产类型"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="100" required="true"
align="center" filter="contains" sort="true">
<EF:EFCodeOption codeName="hpjx.hpjx.productionType" />
</EF:EFComboColumn>--%>
<EF:EFColumn ename="content" cname="报工内容" enable="true" width="160" editType="textarea" align="center" required="true"/>
<EF:EFColumn ename="remark" cname="备注" enable="true" width="200" align="center"/>
</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