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
a18e993c
Commit
a18e993c
authored
Oct 16, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://129.211.46.84:8800/platform/hp-smart
parents
0ce71ba8
db80b9ef
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
452 additions
and
308 deletions
+452
-308
DaoUtils.java
src/main/java/com/baosight/hpjx/core/dao/DaoUtils.java
+21
-10
HPBG002.java
src/main/java/com/baosight/hpjx/hp/bg/domain/HPBG002.java
+17
-0
HPBG003.java
src/main/java/com/baosight/hpjx/hp/bg/domain/HPBG003.java
+16
-1
ServiceHPBG001.java
.../java/com/baosight/hpjx/hp/bg/service/ServiceHPBG001.java
+4
-0
ServiceHPBG002.java
.../java/com/baosight/hpjx/hp/bg/service/ServiceHPBG002.java
+43
-11
ServiceHPBG002A.java
...java/com/baosight/hpjx/hp/bg/service/ServiceHPBG002A.java
+12
-11
ServiceHPBG002C.java
...java/com/baosight/hpjx/hp/bg/service/ServiceHPBG002C.java
+3
-7
ServiceHPBG003.java
.../java/com/baosight/hpjx/hp/bg/service/ServiceHPBG003.java
+41
-7
ServiceHPBG003A.java
...java/com/baosight/hpjx/hp/bg/service/ServiceHPBG003A.java
+9
-10
ServiceHPBG003C.java
...java/com/baosight/hpjx/hp/bg/service/ServiceHPBG003C.java
+4
-7
ServiceHPBG004.java
.../java/com/baosight/hpjx/hp/bg/service/ServiceHPBG004.java
+4
-0
HPBG001.xml
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG001.xml
+3
-0
HPBG002.xml
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG002.xml
+22
-5
HPBG002A.xml
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG002A.xml
+3
-0
HPBG003.xml
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG003.xml
+22
-5
HPBG003A.xml
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG003A.xml
+3
-0
HPBG004.xml
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG004.xml
+3
-0
HPBGTools.java
src/main/java/com/baosight/hpjx/hp/bg/tools/HPBGTools.java
+3
-5
HPSB006.java
src/main/java/com/baosight/hpjx/hp/sb/domain/HPSB006.java
+4
-3
HPSB007.java
src/main/java/com/baosight/hpjx/hp/sb/domain/HPSB007.java
+4
-3
ServiceHPSB006.java
.../java/com/baosight/hpjx/hp/sb/service/ServiceHPSB006.java
+1
-1
ServiceHPSB007.java
.../java/com/baosight/hpjx/hp/sb/service/ServiceHPSB007.java
+1
-1
HPSB003.xml
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB003.xml
+3
-4
HPSB007.xml
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB007.xml
+23
-21
ServiceHPWD001.java
.../java/com/baosight/hpjx/hp/wd/service/ServiceHPWD001.java
+3
-0
ServiceHPWD002.java
.../java/com/baosight/hpjx/hp/wd/service/ServiceHPWD002.java
+7
-0
HPWD009.xml
src/main/java/com/baosight/hpjx/hp/wd/sql/HPWD009.xml
+0
-1
HPWD099.xml
src/main/java/com/baosight/hpjx/hp/wd/sql/HPWD099.xml
+1
-1
HPYX003.java
src/main/java/com/baosight/hpjx/hp/yx/domain/HPYX003.java
+1
-1
XS07.xml
src/main/java/com/baosight/xservices/xs/sql/XS07.xml
+2
-1
HPBG002.js
src/main/webapp/HP/BG/HPBG002.js
+39
-1
HPBG002.jsp
src/main/webapp/HP/BG/HPBG002.jsp
+4
-1
HPBG002A.js
src/main/webapp/HP/BG/HPBG002A.js
+0
-30
HPBG002A.jsp
src/main/webapp/HP/BG/HPBG002A.jsp
+0
-3
HPBG002B.js
src/main/webapp/HP/BG/HPBG002B.js
+1
-1
HPBG002B.jsp
src/main/webapp/HP/BG/HPBG002B.jsp
+0
-3
HPBG002C.js
src/main/webapp/HP/BG/HPBG002C.js
+1
-1
HPBG002C.jsp
src/main/webapp/HP/BG/HPBG002C.jsp
+0
-3
HPBG003.js
src/main/webapp/HP/BG/HPBG003.js
+31
-39
HPBG003.jsp
src/main/webapp/HP/BG/HPBG003.jsp
+3
-0
HPBG003A.js
src/main/webapp/HP/BG/HPBG003A.js
+0
-30
HPBG003A.jsp
src/main/webapp/HP/BG/HPBG003A.jsp
+0
-3
HPBG003B.js
src/main/webapp/HP/BG/HPBG003B.js
+1
-1
HPBG003B.jsp
src/main/webapp/HP/BG/HPBG003B.jsp
+0
-3
HPBG003C.js
src/main/webapp/HP/BG/HPBG003C.js
+1
-7
HPBG003C.jsp
src/main/webapp/HP/BG/HPBG003C.jsp
+0
-3
HPCG004.jsp
src/main/webapp/HP/CG/HPCG004.jsp
+1
-1
HPSB006.jsp
src/main/webapp/HP/SB/HPSB006.jsp
+2
-1
HPSB006A.js
src/main/webapp/HP/SB/HPSB006A.js
+10
-3
HPSB006A.jsp
src/main/webapp/HP/SB/HPSB006A.jsp
+3
-1
HPSB007.js
src/main/webapp/HP/SB/HPSB007.js
+3
-3
HPSB007.jsp
src/main/webapp/HP/SB/HPSB007.jsp
+1
-1
HPSB007A.js
src/main/webapp/HP/SB/HPSB007A.js
+10
-3
HPSB007A.jsp
src/main/webapp/HP/SB/HPSB007A.jsp
+3
-1
HPWD001.js
src/main/webapp/HP/WD/HPWD001.js
+4
-16
HPWD001.jsp
src/main/webapp/HP/WD/HPWD001.jsp
+2
-1
HPXT002A.js
src/main/webapp/HP/XT/HPXT002A.js
+7
-7
HPYX001.jsp
src/main/webapp/HP/YX/HPYX001.jsp
+6
-6
XS3201.jsp
src/main/webapp/XS/XS3201.jsp
+33
-17
common.js
src/main/webapp/common/js/common.js
+3
-2
No files found.
src/main/java/com/baosight/hpjx/core/dao/DaoUtils.java
View file @
a18e993c
...
@@ -65,9 +65,12 @@ public class DaoUtils {
...
@@ -65,9 +65,12 @@ public class DaoUtils {
*/
*/
public
static
void
batchInsert
(
String
sql
,
List
rows
)
{
public
static
void
batchInsert
(
String
sql
,
List
rows
)
{
// 创建人部门
// 创建人部门
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
String
depCode
=
""
;
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
if
(!
"admin"
.
equals
(
UserSessionUtils
.
getLoginName
()))
{
String
depCode
=
orgIds
.
get
(
0
);
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
depCode
=
orgIds
.
get
(
0
);
}
for
(
Object
row
:
rows
)
{
for
(
Object
row
:
rows
)
{
if
(
row
instanceof
DaoEPBase
)
{
if
(
row
instanceof
DaoEPBase
)
{
DaoEPBase
daoEPBase
=
(
DaoEPBase
)
row
;
DaoEPBase
daoEPBase
=
(
DaoEPBase
)
row
;
...
@@ -145,10 +148,14 @@ public class DaoUtils {
...
@@ -145,10 +148,14 @@ public class DaoUtils {
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
}
// 创建人组织机构
// 创建人组织机构
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
String
depCode
=
""
;
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
if
(!
"admin"
.
equals
(
userId
))
{
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
depCode
=
orgIds
.
get
(
0
);
}
try
{
try
{
BeanUtils
.
setProperty
(
bean
,
"depCode"
,
orgIds
.
get
(
0
)
);
BeanUtils
.
setProperty
(
bean
,
"depCode"
,
depCode
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人部门编码失败"
,
e
);
log
.
warn
(
"写入创建人部门编码失败"
,
e
);
}
}
...
@@ -199,11 +206,15 @@ public class DaoUtils {
...
@@ -199,11 +206,15 @@ public class DaoUtils {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
}
// 创建人部门编码
// 创建人组织机构
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
String
depCode
=
""
;
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
if
(!
"admin"
.
equals
(
userId
))
{
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
depCode
=
orgIds
.
get
(
0
);
}
try
{
try
{
map
.
put
(
"depCode"
,
orgIds
.
get
(
0
)
);
map
.
put
(
"depCode"
,
depCode
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
log
.
warn
(
"写入创建人企业编码失败"
,
e
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/bg/domain/HPBG002.java
View file @
a18e993c
...
@@ -37,6 +37,7 @@ public class HPBG002 extends DaoEPBase {
...
@@ -37,6 +37,7 @@ public class HPBG002 extends DaoEPBase {
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_DEPOSIT_USER
=
"depositUser"
;
/* 入库人员*/
public
static
final
String
FIELD_DEPOSIT_USER
=
"depositUser"
;
/* 入库人员*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 审批状态0.未审核1.已审核*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码*/
...
@@ -58,6 +59,7 @@ public class HPBG002 extends DaoEPBase {
...
@@ -58,6 +59,7 @@ public class HPBG002 extends DaoEPBase {
public
static
final
String
COUNT
=
"HPBG002.count"
;
public
static
final
String
COUNT
=
"HPBG002.count"
;
public
static
final
String
INSERT
=
"HPBG002.insert"
;
public
static
final
String
INSERT
=
"HPBG002.insert"
;
public
static
final
String
UPDATE
=
"HPBG002.update"
;
public
static
final
String
UPDATE
=
"HPBG002.update"
;
public
static
final
String
UPDATE_BY_STATUS
=
"HPBG002.updateBystatus"
;
public
static
final
String
DELETE
=
"HPBG002.delete"
;
public
static
final
String
DELETE
=
"HPBG002.delete"
;
public
static
final
String
DELETE_FLAG
=
"HPBG002.deleteFlag"
;
public
static
final
String
DELETE_FLAG
=
"HPBG002.deleteFlag"
;
...
@@ -76,6 +78,7 @@ public class HPBG002 extends DaoEPBase {
...
@@ -76,6 +78,7 @@ public class HPBG002 extends DaoEPBase {
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
depositUser
=
" "
;
/* 入库人员*/
private
String
depositUser
=
" "
;
/* 入库人员*/
private
Integer
status
=
2
;
/* 审批状态0.未审核1.已审核*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -144,6 +147,9 @@ public class HPBG002 extends DaoEPBase {
...
@@ -144,6 +147,9 @@ public class HPBG002 extends DaoEPBase {
eiColumn
.
setDescName
(
"入库人员"
);
eiColumn
.
setDescName
(
"入库人员"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"审批状态0.未审核1.已审核"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
...
@@ -394,6 +400,15 @@ public class HPBG002 extends DaoEPBase {
...
@@ -394,6 +400,15 @@ public class HPBG002 extends DaoEPBase {
public
void
setDepositUser
(
String
depositUser
)
{
public
void
setDepositUser
(
String
depositUser
)
{
this
.
depositUser
=
depositUser
;
this
.
depositUser
=
depositUser
;
}
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -417,6 +432,7 @@ public class HPBG002 extends DaoEPBase {
...
@@ -417,6 +432,7 @@ public class HPBG002 extends DaoEPBase {
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setDepositUser
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_USER
)),
depositUser
));
setDepositUser
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_USER
)),
depositUser
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
}
}
/**
/**
...
@@ -441,6 +457,7 @@ public class HPBG002 extends DaoEPBase {
...
@@ -441,6 +457,7 @@ public class HPBG002 extends DaoEPBase {
map
.
put
(
FIELD_WH_CODE
,
StringUtils
.
toString
(
whCode
,
eiMetadata
.
getMeta
(
FIELD_WH_CODE
)));
map
.
put
(
FIELD_WH_CODE
,
StringUtils
.
toString
(
whCode
,
eiMetadata
.
getMeta
(
FIELD_WH_CODE
)));
map
.
put
(
FIELD_WH_NAME
,
StringUtils
.
toString
(
whName
,
eiMetadata
.
getMeta
(
FIELD_WH_NAME
)));
map
.
put
(
FIELD_WH_NAME
,
StringUtils
.
toString
(
whName
,
eiMetadata
.
getMeta
(
FIELD_WH_NAME
)));
map
.
put
(
FIELD_DEPOSIT_USER
,
StringUtils
.
toString
(
depositUser
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_USER
)));
map
.
put
(
FIELD_DEPOSIT_USER
,
StringUtils
.
toString
(
depositUser
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_USER
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hpjx/hp/bg/domain/HPBG003.java
View file @
a18e993c
...
@@ -37,6 +37,7 @@ public class HPBG003 extends DaoEPBase {
...
@@ -37,6 +37,7 @@ public class HPBG003 extends DaoEPBase {
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_RECEIVE_USER
=
"receiveUser"
;
/* 领用人员*/
public
static
final
String
FIELD_RECEIVE_USER
=
"receiveUser"
;
/* 领用人员*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 审批状态0.未审核1.已审核*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码*/
...
@@ -77,6 +78,7 @@ public class HPBG003 extends DaoEPBase {
...
@@ -77,6 +78,7 @@ public class HPBG003 extends DaoEPBase {
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
receiveUser
=
" "
;
/* 领用人员*/
private
String
receiveUser
=
" "
;
/* 领用人员*/
private
Integer
status
=
2
;
/* 审批状态0.未审核1.已审核*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -145,7 +147,9 @@ public class HPBG003 extends DaoEPBase {
...
@@ -145,7 +147,9 @@ public class HPBG003 extends DaoEPBase {
eiColumn
.
setDescName
(
"领用人员"
);
eiColumn
.
setDescName
(
"领用人员"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"审批状态0.未审核1.已审核"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -395,6 +399,15 @@ public class HPBG003 extends DaoEPBase {
...
@@ -395,6 +399,15 @@ public class HPBG003 extends DaoEPBase {
public
void
setReceiveUser
(
String
receiveUser
)
{
public
void
setReceiveUser
(
String
receiveUser
)
{
this
.
receiveUser
=
receiveUser
;
this
.
receiveUser
=
receiveUser
;
}
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -418,6 +431,7 @@ public class HPBG003 extends DaoEPBase {
...
@@ -418,6 +431,7 @@ public class HPBG003 extends DaoEPBase {
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setReceiveUser
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_USER
)),
receiveUser
));
setReceiveUser
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_USER
)),
receiveUser
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
"status"
)),
status
));
}
}
/**
/**
...
@@ -442,6 +456,7 @@ public class HPBG003 extends DaoEPBase {
...
@@ -442,6 +456,7 @@ public class HPBG003 extends DaoEPBase {
map
.
put
(
FIELD_WH_CODE
,
StringUtils
.
toString
(
whCode
,
eiMetadata
.
getMeta
(
FIELD_WH_CODE
)));
map
.
put
(
FIELD_WH_CODE
,
StringUtils
.
toString
(
whCode
,
eiMetadata
.
getMeta
(
FIELD_WH_CODE
)));
map
.
put
(
FIELD_WH_NAME
,
StringUtils
.
toString
(
whName
,
eiMetadata
.
getMeta
(
FIELD_WH_NAME
)));
map
.
put
(
FIELD_WH_NAME
,
StringUtils
.
toString
(
whName
,
eiMetadata
.
getMeta
(
FIELD_WH_NAME
)));
map
.
put
(
FIELD_RECEIVE_USER
,
StringUtils
.
toString
(
receiveUser
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_USER
)));
map
.
put
(
FIELD_RECEIVE_USER
,
StringUtils
.
toString
(
receiveUser
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_USER
)));
map
.
put
(
"status"
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
"status"
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hpjx/hp/bg/service/ServiceHPBG001.java
View file @
a18e993c
...
@@ -14,6 +14,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
...
@@ -14,6 +14,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -56,6 +57,7 @@ public class ServiceHPBG001 extends ServiceEPBase {
...
@@ -56,6 +57,7 @@ public class ServiceHPBG001 extends ServiceEPBase {
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
// 写入数据
List
<
HPBG001
>
hpbg001List
=
new
ArrayList
<>();
for
(
Map
resultRow
:
resultRows
)
{
for
(
Map
resultRow
:
resultRows
)
{
HPBG001
hpbg001
=
new
HPBG001
();
HPBG001
hpbg001
=
new
HPBG001
();
hpbg001
.
fromMap
(
resultRow
);
hpbg001
.
fromMap
(
resultRow
);
...
@@ -64,7 +66,9 @@ public class ServiceHPBG001 extends ServiceEPBase {
...
@@ -64,7 +66,9 @@ public class ServiceHPBG001 extends ServiceEPBase {
}
else
{
}
else
{
this
.
modify
(
hpbg001
);
this
.
modify
(
hpbg001
);
}
}
hpbg001List
.
add
(
hpbg001
);
}
}
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setRows
(
hpbg001List
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/baosight/hpjx/hp/bg/service/ServiceHPBG002.java
View file @
a18e993c
...
@@ -5,8 +5,10 @@ import com.baosight.hpjx.common.DdynamicEnum;
...
@@ -5,8 +5,10 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.common.ReviewStatusEnum
;
import
com.baosight.hpjx.common.ReviewStatusEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.bg.domain.HPBG001
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002A
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002A
;
import
com.baosight.hpjx.hp.bg.domain.HPBG003A
;
import
com.baosight.hpjx.hp.bg.tools.HPBGTools
;
import
com.baosight.hpjx.hp.bg.tools.HPBGTools
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.hpjx.util.*
;
...
@@ -16,9 +18,8 @@ import com.baosight.iplat4j.core.ei.EiInfo;
...
@@ -16,9 +18,8 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.Arrays
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.*
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -56,15 +57,8 @@ public class ServiceHPBG002 extends ServiceEPBase {
...
@@ -56,15 +57,8 @@ public class ServiceHPBG002 extends ServiceEPBase {
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
resultRows
,
HPBG002
.
FIELD_ID
);
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
resultRows
,
HPBG002
.
FIELD_ID
);
List
<
HPBG002A
>
hpbg002AList
=
HPBGTools
.
HpBg002a
.
getByParentId
(
ids
);
List
<
HPBG002A
>
hpbg002AList
=
HPBGTools
.
HpBg002a
.
getByParentId
(
ids
);
for
(
HPBG002
hpbg002:
resultRows
)
{
for
(
HPBG002
hpbg002:
resultRows
)
{
hpbg002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
if
(
hpbg002
.
getId
()
==
null
||
hpbg002
.
getId
()
==
0
)
{
continue
;
}
List
<
HPBG002A
>
hpbg002As
=
hpbg002AList
.
stream
().
filter
(
hpbg002a1
->
hpbg002a1
.
getParentId
().
equals
(
hpbg002
.
getId
())
&&
hpbg002a1
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
())).
collect
(
Collectors
.
toList
());
AssertUtils
.
isTrue
(
hpbg002As
.
size
()>
0
,
"数据已提交,无法删除!"
);
DaoUtils
.
update
(
HPBG002
.
DELETE
,
hpbg002
);
DaoUtils
.
update
(
HPBG002
.
DELETE
,
hpbg002
);
hpbg002As
=
hpbg002AList
.
stream
().
filter
(
hpbg002a1
->
hpbg002a1
.
getParentId
().
equals
(
hpbg002
.
getId
())).
collect
(
Collectors
.
toList
());
List
<
HPBG002A
>
hpbg002As
=
hpbg002AList
.
stream
().
filter
(
hpbg002a1
->
hpbg002a1
.
getParentId
().
equals
(
hpbg002
.
getId
())).
collect
(
Collectors
.
toList
());
hpbg002As
.
forEach
(
hpbg002a
->
DaoUtils
.
update
(
HPBG002A
.
DELETE
,
hpbg002a
));
hpbg002As
.
forEach
(
hpbg002a
->
DaoUtils
.
update
(
HPBG002A
.
DELETE
,
hpbg002a
));
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
@@ -88,6 +82,7 @@ public class ServiceHPBG002 extends ServiceEPBase {
...
@@ -88,6 +82,7 @@ public class ServiceHPBG002 extends ServiceEPBase {
}
}
List
<
Map
>
detailRows
=
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
getRows
();
List
<
Map
>
detailRows
=
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
getRows
();
List
<
HPBG002A
>
hpbg002aList
=
new
ArrayList
<>();
// 写入数据
// 写入数据
for
(
Map
detailRow
:
detailRows
)
{
for
(
Map
detailRow
:
detailRows
)
{
HPBG002A
hpbg002a
=
new
HPBG002A
();
HPBG002A
hpbg002a
=
new
HPBG002A
();
...
@@ -98,7 +93,10 @@ public class ServiceHPBG002 extends ServiceEPBase {
...
@@ -98,7 +93,10 @@ public class ServiceHPBG002 extends ServiceEPBase {
}
else
{
}
else
{
DaoUtils
.
update
(
HPBG002A
.
UPDATE
,
hpbg002a
);
DaoUtils
.
update
(
HPBG002A
.
UPDATE
,
hpbg002a
);
}
}
hpbg002aList
.
add
(
hpbg002a
);
}
}
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setRows
(
Collections
.
singletonList
(
hpbg002
));
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
setRows
(
hpbg002aList
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
detailRows
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
detailRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -121,4 +119,38 @@ public class ServiceHPBG002 extends ServiceEPBase {
...
@@ -121,4 +119,38 @@ public class ServiceHPBG002 extends ServiceEPBase {
public
void
modify
(
HPBG002
hpbg002
)
{
public
void
modify
(
HPBG002
hpbg002
)
{
DaoUtils
.
update
(
HPBG002
.
UPDATE
,
hpbg002
);
DaoUtils
.
update
(
HPBG002
.
UPDATE
,
hpbg002
);
}
}
@OperationLogAnnotation
(
operModul
=
"办公用品入库"
,
operType
=
"提交"
,
operDesc
=
"提交操作"
)
public
EiInfo
submit
(
EiInfo
inInfo
)
{
try
{
List
<
HPBG002
>
resultRows
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HPBG002
.
class
);
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
resultRows
,
HPBG002
.
FIELD_ID
);
List
<
HPBG002A
>
hpbg002As
=
HPBGTools
.
HpBg002a
.
getByParentId
(
ids
);
List
<
String
>
itemCodes
=
ObjectUtils
.
listEpKey
(
hpbg002As
,
HPBG002A
.
FIELD_ITEM_CODE
);
List
<
HPBG001
>
hpbg001s
=
HPBGTools
.
HpBg001
.
getByItemCode
(
itemCodes
);
// 写入数据
for
(
HPBG002
hpbg002
:
resultRows
)
{
AssertUtils
.
isTrue
(
hpbg002
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法重复提交!"
);
List
<
HPBG002A
>
hpbg002aList
=
hpbg002As
.
stream
().
filter
(
hpbg002A
->
hpbg002A
.
getParentId
().
equals
(
hpbg002
.
getId
())).
collect
(
Collectors
.
toList
());
AssertUtils
.
isEmpty
(
hpbg002aList
,
"请先添加办公用品入库明细"
);
hpbg002aList
.
forEach
(
hpbg002A
->
{
Map
<
String
,
HPBG001
>
hpbg001Map
=
hpbg001s
.
stream
().
filter
(
item
->
item
.
getItemCode
().
equals
(
hpbg002A
.
getItemCode
())).
collect
(
Collectors
.
toMap
(
HPBG001:
:
getItemCode
,
item
->
item
));
if
(!
hpbg001Map
.
isEmpty
()){
HPBG001
hpbg001
=
hpbg001Map
.
get
(
hpbg002A
.
getItemCode
());
BigDecimal
invQty
=
hpbg001
.
getInvQty
().
add
(
hpbg002A
.
getInvQty
());
hpbg001
.
setInvQty
(
invQty
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
?
BigDecimal
.
ZERO
:
invQty
);
DaoUtils
.
update
(
HPBG001
.
UPDATE
,
hpbg001
);
}
});
hpbg002
.
setStatus
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
());
DaoUtils
.
update
(
HPBG002
.
UPDATE_BY_STATUS
,
hpbg002
);
}
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/bg/service/ServiceHPBG002A.java
View file @
a18e993c
...
@@ -6,6 +6,7 @@ import com.baosight.hpjx.common.ReviewStatusEnum;
...
@@ -6,6 +6,7 @@ import com.baosight.hpjx.common.ReviewStatusEnum;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.bg.domain.HPBG001
;
import
com.baosight.hpjx.hp.bg.domain.HPBG001
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002A
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002A
;
import
com.baosight.hpjx.hp.bg.domain.HPBG004
;
import
com.baosight.hpjx.hp.bg.domain.HPBG004
;
import
com.baosight.hpjx.hp.bg.tools.HPBGTools
;
import
com.baosight.hpjx.hp.bg.tools.HPBGTools
;
...
@@ -19,6 +20,7 @@ import java.math.BigDecimal;
...
@@ -19,6 +20,7 @@ import java.math.BigDecimal;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -53,19 +55,18 @@ public class ServiceHPBG002A extends ServiceEPBase {
...
@@ -53,19 +55,18 @@ public class ServiceHPBG002A extends ServiceEPBase {
@Override
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
HPBG002A
>
resultRows
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HPBG002A
.
class
);
for
(
Map
resultRow:
resultRows
)
{
List
<
String
>
ids
=
ObjectUtils
.
listEpKey
(
resultRows
,
HPBG002A
.
FIELD_PARENT_ID
);
HPBG002A
hpbg002a
=
new
HPBG002A
();
if
(
Objects
.
nonNull
(
ids
))
{
hpbg002a
.
fromMap
(
resultRow
);
HPBG002
hgbg002
=
HPBGTools
.
HpBg002
.
get
(
resultRows
.
get
(
0
).
getParentId
());
hpbg002a
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
AssertUtils
.
isTrue
(
hgbg002
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法删除!"
);
if
(
hpbg002a
.
getId
()
==
null
||
hpbg002a
.
getId
()
==
0
)
{
}
continue
;
}
for
(
HPBG002A
hpbg002A:
resultRows
)
{
AssertUtils
.
isTrue
(
hpbg002a
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法删除!"
);
DaoUtils
.
update
(
HPBG002A
.
DELETE
,
hpbg002A
);
DaoUtils
.
update
(
HPBG002A
.
DELETE
,
hpbg002a
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据
保存
成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据
删除
成功!"
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/bg/service/ServiceHPBG002C.java
View file @
a18e993c
...
@@ -43,7 +43,7 @@ public class ServiceHPBG002C extends ServiceEPBase {
...
@@ -43,7 +43,7 @@ public class ServiceHPBG002C extends ServiceEPBase {
),
null
,
false
);
),
null
,
false
);
Long
id
=
Long
.
parseLong
(
params
.
get
(
HPBG002
.
FIELD_ID
));
Long
id
=
Long
.
parseLong
(
params
.
get
(
HPBG002
.
FIELD_ID
));
HPBG002
hpbg002
=
HPBGTools
.
HpBg002
.
get
(
id
);
HPBG002
hpbg002
=
HPBGTools
.
HpBg002
.
get
(
id
);
List
<
HPBG002A
>
hpbg002As
=
HPBGTools
.
HpBg002a
.
getByParentId
(
id
,
ReviewStatusEnum
.
UNSUBMITTED
.
getCode
()
);
List
<
HPBG002A
>
hpbg002As
=
HPBGTools
.
HpBg002a
.
getByParentId
(
id
);
EiBlock
resultBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
EiBlock
resultBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
resultBlock
.
setBlockMeta
(
new
HPBG002
().
eiMetadata
);
resultBlock
.
setBlockMeta
(
new
HPBG002
().
eiMetadata
);
resultBlock
.
setRows
(
Collections
.
singletonList
(
hpbg002
));
resultBlock
.
setRows
(
Collections
.
singletonList
(
hpbg002
));
...
@@ -61,7 +61,8 @@ public class ServiceHPBG002C extends ServiceEPBase {
...
@@ -61,7 +61,8 @@ public class ServiceHPBG002C extends ServiceEPBase {
@Override
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG002A
.
FIELD_STATUS
,
ReviewStatusEnum
.
UNSUBMITTED
.
getCode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG002A
.
FIELD_PARENT_ID
,
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG002A
.
FIELD_ID
));
return
super
.
query
(
inInfo
,
HPBG002A
.
QUERY
,
new
HPBG002A
(),
false
,
new
EiBlockMeta
(),
EiConstant
.
queryBlock
,
CommonConstant
.
Field
.
DETAIL
,
CommonConstant
.
Field
.
DETAIL
);
return
super
.
query
(
inInfo
,
HPBG002A
.
QUERY
,
new
HPBG002A
(),
false
,
new
EiBlockMeta
(),
EiConstant
.
queryBlock
,
CommonConstant
.
Field
.
DETAIL
,
CommonConstant
.
Field
.
DETAIL
);
}
}
...
@@ -73,11 +74,6 @@ public class ServiceHPBG002C extends ServiceEPBase {
...
@@ -73,11 +74,6 @@ public class ServiceHPBG002C extends ServiceEPBase {
for
(
Map
resultRow:
resultRows
)
{
for
(
Map
resultRow:
resultRows
)
{
HPBG002A
hpbg002a
=
new
HPBG002A
();
HPBG002A
hpbg002a
=
new
HPBG002A
();
hpbg002a
.
fromMap
(
resultRow
);
hpbg002a
.
fromMap
(
resultRow
);
hpbg002a
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
if
(
hpbg002a
.
getId
()
==
null
||
hpbg002a
.
getId
()
==
0
)
{
continue
;
}
AssertUtils
.
isTrue
(
hpbg002a
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法删除!"
);
DaoUtils
.
update
(
HPBG002A
.
DELETE
,
hpbg002a
);
DaoUtils
.
update
(
HPBG002A
.
DELETE
,
hpbg002a
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hpjx/hp/bg/service/ServiceHPBG003.java
View file @
a18e993c
...
@@ -5,10 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
...
@@ -5,10 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.common.ReviewStatusEnum
;
import
com.baosight.hpjx.common.ReviewStatusEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002
;
import
com.baosight.hpjx.hp.bg.domain.*
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002A
;
import
com.baosight.hpjx.hp.bg.domain.HPBG003
;
import
com.baosight.hpjx.hp.bg.domain.HPBG003A
;
import
com.baosight.hpjx.hp.bg.tools.HPBGTools
;
import
com.baosight.hpjx.hp.bg.tools.HPBGTools
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.hpjx.util.*
;
...
@@ -18,9 +15,8 @@ import com.baosight.iplat4j.core.ei.EiInfo;
...
@@ -18,9 +15,8 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.Arrays
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.*
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -90,6 +86,7 @@ public class ServiceHPBG003 extends ServiceEPBase {
...
@@ -90,6 +86,7 @@ public class ServiceHPBG003 extends ServiceEPBase {
}
}
List
<
Map
>
detailRows
=
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
getRows
();
List
<
Map
>
detailRows
=
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
getRows
();
List
<
HPBG003A
>
hpbg003AList
=
new
ArrayList
<>();
// 写入数据
// 写入数据
for
(
Map
detailRow
:
detailRows
)
{
for
(
Map
detailRow
:
detailRows
)
{
HPBG003A
hpbg003a
=
new
HPBG003A
();
HPBG003A
hpbg003a
=
new
HPBG003A
();
...
@@ -100,7 +97,10 @@ public class ServiceHPBG003 extends ServiceEPBase {
...
@@ -100,7 +97,10 @@ public class ServiceHPBG003 extends ServiceEPBase {
}
else
{
}
else
{
DaoUtils
.
update
(
HPBG003A
.
UPDATE
,
hpbg003a
);
DaoUtils
.
update
(
HPBG003A
.
UPDATE
,
hpbg003a
);
}
}
hpbg003AList
.
add
(
hpbg003a
);
}
}
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setRows
(
Collections
.
singletonList
(
hpbg003
));
inInfo
.
getBlock
(
CommonConstant
.
Field
.
DETAIL
).
setRows
(
hpbg003AList
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
detailRows
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
detailRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -123,4 +123,38 @@ public class ServiceHPBG003 extends ServiceEPBase {
...
@@ -123,4 +123,38 @@ public class ServiceHPBG003 extends ServiceEPBase {
public
void
modify
(
HPBG003
hpbg003
)
{
public
void
modify
(
HPBG003
hpbg003
)
{
DaoUtils
.
update
(
HPBG003
.
UPDATE
,
hpbg003
);
DaoUtils
.
update
(
HPBG003
.
UPDATE
,
hpbg003
);
}
}
@OperationLogAnnotation
(
operModul
=
"办公用品入库"
,
operType
=
"提交"
,
operDesc
=
"提交操作"
)
public
EiInfo
submit
(
EiInfo
inInfo
)
{
try
{
List
<
HPBG003
>
resultRows
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HPBG003
.
class
);
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
resultRows
,
HPBG003
.
FIELD_ID
);
List
<
HPBG003A
>
hpbg003As
=
HPBGTools
.
HpBg003a
.
getByParentId
(
ids
);
List
<
String
>
itemCodes
=
ObjectUtils
.
listEpKey
(
hpbg003As
,
HPBG003A
.
FIELD_ITEM_CODE
);
List
<
HPBG001
>
hpbg001s
=
HPBGTools
.
HpBg001
.
getByItemCode
(
itemCodes
);
// 写入数据
for
(
HPBG003
hpbg003
:
resultRows
)
{
AssertUtils
.
isTrue
(
hpbg003
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法重复提交!"
);
List
<
HPBG003A
>
hpbg003aList
=
hpbg003As
.
stream
().
filter
(
hpbg002A
->
hpbg002A
.
getParentId
().
equals
(
hpbg003
.
getId
())).
collect
(
Collectors
.
toList
());
AssertUtils
.
isEmpty
(
hpbg003aList
,
"请先添加办公用品入库明细"
);
hpbg003aList
.
forEach
(
hpbg003A
->
{
Map
<
String
,
HPBG001
>
hpbg001Map
=
hpbg001s
.
stream
().
filter
(
item
->
item
.
getItemCode
().
equals
(
hpbg003A
.
getItemCode
())).
collect
(
Collectors
.
toMap
(
HPBG001:
:
getItemCode
,
item
->
item
));
if
(!
hpbg001Map
.
isEmpty
()){
HPBG001
hpbg001
=
hpbg001Map
.
get
(
hpbg003A
.
getItemCode
());
BigDecimal
invQty
=
hpbg001
.
getInvQty
().
subtract
(
hpbg003A
.
getReceiveQty
());
hpbg001
.
setInvQty
(
invQty
.
compareTo
(
BigDecimal
.
ZERO
)
<
0
?
BigDecimal
.
ZERO
:
invQty
);
DaoUtils
.
update
(
HPBG001
.
UPDATE
,
hpbg001
);
}
});
hpbg003
.
setStatus
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
());
DaoUtils
.
update
(
HPBG003
.
UPDATE_BY_STATUS
,
hpbg003
);
}
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/bg/service/ServiceHPBG003A.java
View file @
a18e993c
...
@@ -17,6 +17,7 @@ import java.math.BigDecimal;
...
@@ -17,6 +17,7 @@ import java.math.BigDecimal;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -50,16 +51,14 @@ public class ServiceHPBG003A extends ServiceEPBase {
...
@@ -50,16 +51,14 @@ public class ServiceHPBG003A extends ServiceEPBase {
@Override
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
HPBG003A
>
resultRows
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HPBG003A
.
class
);
for
(
Map
resultRow:
resultRows
)
{
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
resultRows
,
HPBG003A
.
FIELD_PARENT_ID
);
HPBG003A
hpbg003a
=
new
HPBG003A
();
if
(
Objects
.
nonNull
(
ids
))
{
hpbg003a
.
fromMap
(
resultRow
);
HPBG003
hgbg003
=
HPBGTools
.
HpBg003
.
get
(
resultRows
.
get
(
0
).
getParentId
());
hpbg003a
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
AssertUtils
.
isTrue
(
hgbg003
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法删除!"
);
if
(
hpbg003a
.
getId
()
==
null
||
hpbg003a
.
getId
()
==
0
)
{
}
continue
;
for
(
HPBG003A
hpbg003A:
resultRows
)
{
}
DaoUtils
.
update
(
HPBG003A
.
DELETE
,
hpbg003A
);
AssertUtils
.
isTrue
(
hpbg003a
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法删除!"
);
DaoUtils
.
update
(
HPBG003A
.
DELETE
,
hpbg003a
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
...
...
src/main/java/com/baosight/hpjx/hp/bg/service/ServiceHPBG003C.java
View file @
a18e993c
...
@@ -5,6 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
...
@@ -5,6 +5,7 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.common.ReviewStatusEnum
;
import
com.baosight.hpjx.common.ReviewStatusEnum
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.bg.domain.HPBG002A
;
import
com.baosight.hpjx.hp.bg.domain.HPBG003
;
import
com.baosight.hpjx.hp.bg.domain.HPBG003
;
import
com.baosight.hpjx.hp.bg.domain.HPBG003A
;
import
com.baosight.hpjx.hp.bg.domain.HPBG003A
;
import
com.baosight.hpjx.hp.bg.tools.HPBGTools
;
import
com.baosight.hpjx.hp.bg.tools.HPBGTools
;
...
@@ -42,7 +43,7 @@ public class ServiceHPBG003C extends ServiceEPBase {
...
@@ -42,7 +43,7 @@ public class ServiceHPBG003C extends ServiceEPBase {
),
null
,
false
);
),
null
,
false
);
Long
id
=
Long
.
parseLong
(
params
.
get
(
HPBG003
.
FIELD_ID
));
Long
id
=
Long
.
parseLong
(
params
.
get
(
HPBG003
.
FIELD_ID
));
HPBG003
hpbg003
=
HPBGTools
.
HpBg003
.
get
(
id
);
HPBG003
hpbg003
=
HPBGTools
.
HpBg003
.
get
(
id
);
List
<
HPBG003A
>
hpbg003As
=
HPBGTools
.
HpBg003a
.
getByParentId
(
id
,
ReviewStatusEnum
.
UNSUBMITTED
.
getCode
()
);
List
<
HPBG003A
>
hpbg003As
=
HPBGTools
.
HpBg003a
.
getByParentId
(
id
);
EiBlock
resultBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
EiBlock
resultBlock
=
new
EiBlock
(
EiConstant
.
resultBlock
);
resultBlock
.
setBlockMeta
(
new
HPBG003
().
eiMetadata
);
resultBlock
.
setBlockMeta
(
new
HPBG003
().
eiMetadata
);
resultBlock
.
setRows
(
Collections
.
singletonList
(
hpbg003
));
resultBlock
.
setRows
(
Collections
.
singletonList
(
hpbg003
));
...
@@ -60,7 +61,8 @@ public class ServiceHPBG003C extends ServiceEPBase {
...
@@ -60,7 +61,8 @@ public class ServiceHPBG003C extends ServiceEPBase {
@Override
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG003A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG003A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG003A
.
FIELD_STATUS
,
ReviewStatusEnum
.
UNSUBMITTED
.
getCode
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG002A
.
FIELD_PARENT_ID
,
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
HPBG002A
.
FIELD_ID
));
return
super
.
query
(
inInfo
,
HPBG003A
.
QUERY
,
new
HPBG003A
(),
false
,
new
EiBlockMeta
(),
EiConstant
.
queryBlock
,
CommonConstant
.
Field
.
DETAIL
,
CommonConstant
.
Field
.
DETAIL
);
return
super
.
query
(
inInfo
,
HPBG003A
.
QUERY
,
new
HPBG003A
(),
false
,
new
EiBlockMeta
(),
EiConstant
.
queryBlock
,
CommonConstant
.
Field
.
DETAIL
,
CommonConstant
.
Field
.
DETAIL
);
}
}
...
@@ -72,11 +74,6 @@ public class ServiceHPBG003C extends ServiceEPBase {
...
@@ -72,11 +74,6 @@ public class ServiceHPBG003C extends ServiceEPBase {
for
(
Map
resultRow:
resultRows
)
{
for
(
Map
resultRow:
resultRows
)
{
HPBG003A
hpbg003a
=
new
HPBG003A
();
HPBG003A
hpbg003a
=
new
HPBG003A
();
hpbg003a
.
fromMap
(
resultRow
);
hpbg003a
.
fromMap
(
resultRow
);
hpbg003a
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
if
(
hpbg003a
.
getId
()
==
null
||
hpbg003a
.
getId
()
==
0
)
{
continue
;
}
AssertUtils
.
isTrue
(
hpbg003a
.
getStatus
().
equals
(
ReviewStatusEnum
.
SUBMITTED
.
getCode
()),
"数据已提交,无法删除!"
);
DaoUtils
.
update
(
HPBG003A
.
DELETE
,
hpbg003a
);
DaoUtils
.
update
(
HPBG003A
.
DELETE
,
hpbg003a
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
src/main/java/com/baosight/hpjx/hp/bg/service/ServiceHPBG004.java
View file @
a18e993c
...
@@ -16,6 +16,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
...
@@ -16,6 +16,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -60,6 +61,7 @@ public class ServiceHPBG004 extends ServiceEPBase {
...
@@ -60,6 +61,7 @@ public class ServiceHPBG004 extends ServiceEPBase {
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
// 写入数据
List
<
HPBG004
>
hpbg004s
=
new
ArrayList
<>();
for
(
Map
resultRow
:
resultRows
)
{
for
(
Map
resultRow
:
resultRows
)
{
HPBG004
hpbg004
=
new
HPBG004
();
HPBG004
hpbg004
=
new
HPBG004
();
hpbg004
.
fromMap
(
resultRow
);
hpbg004
.
fromMap
(
resultRow
);
...
@@ -68,7 +70,9 @@ public class ServiceHPBG004 extends ServiceEPBase {
...
@@ -68,7 +70,9 @@ public class ServiceHPBG004 extends ServiceEPBase {
}
else
{
}
else
{
this
.
modify
(
hpbg004
);
this
.
modify
(
hpbg004
);
}
}
hpbg004s
.
add
(
hpbg004
);
}
}
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
setRows
(
hpbg004s
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG001.xml
View file @
a18e993c
...
@@ -230,6 +230,9 @@
...
@@ -230,6 +230,9 @@
)
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#whCode#, #whName#, #itemType#, #itemCode#, #itemName#, #itemModel#, #itemUnit#, #invQty#)
#whCode#, #whName#, #itemType#, #itemCode#, #itemName#, #itemModel#, #itemUnit#, #invQty#)
<selectKey
resultClass=
"java.lang.Long"
keyProperty=
"id"
>
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG001
</selectKey>
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
...
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG002.xml
View file @
a18e993c
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
DELETE_FLAG = #deleteFlag#
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depositDate"
>
<isNotEmpty
prepend=
" AND "
property=
"depositDate"
>
DEPOSIT_DATE =
#depositDate#
DEPOSIT_DATE =
REPLACE(#depositDate#, '-', '')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depositCode"
>
<isNotEmpty
prepend=
" AND "
property=
"depositCode"
>
DEPOSIT_CODE = #depositCode#
DEPOSIT_CODE = #depositCode#
...
@@ -68,6 +68,9 @@
...
@@ -68,6 +68,9 @@
<isNotEmpty
prepend=
" AND "
property=
"depositUser"
>
<isNotEmpty
prepend=
" AND "
property=
"depositUser"
>
DEPOSIT_USER = #depositUser#
DEPOSIT_USER = #depositUser#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
@@ -87,7 +90,8 @@
...
@@ -87,7 +90,8 @@
DEPOSIT_CODE as "depositCode",
<!-- 入库单号 -->
DEPOSIT_CODE as "depositCode",
<!-- 入库单号 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
DEPOSIT_USER as "depositUser"
<!-- 入库人员 -->
DEPOSIT_USER as "depositUser",
<!-- 入库人员 -->
STATUS as "status"
FROM ${hpjxSchema}.T_HPBG002 WHERE 1=1
FROM ${hpjxSchema}.T_HPBG002 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
...
@@ -166,10 +170,11 @@
...
@@ -166,10 +170,11 @@
DEPOSIT_CODE,
<!-- 入库单号 -->
DEPOSIT_CODE,
<!-- 入库单号 -->
WH_CODE,
<!-- 仓库编码 -->
WH_CODE,
<!-- 仓库编码 -->
WH_NAME,
<!-- 仓库名称 -->
WH_NAME,
<!-- 仓库名称 -->
DEPOSIT_USER
<!-- 入库人员 -->
DEPOSIT_USER,
<!-- 入库人员 -->
STATUS
)
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#depositDate#, #depositCode#, #whCode#, #whName#, #depositUser#)
#depositDate#, #depositCode#, #whCode#, #whName#, #depositUser#
,#status#
)
<selectKey
resultClass=
"java.lang.Long"
keyProperty=
"id"
>
<selectKey
resultClass=
"java.lang.Long"
keyProperty=
"id"
>
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG002
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG002
</selectKey>
</selectKey>
...
@@ -202,7 +207,19 @@
...
@@ -202,7 +207,19 @@
DEPOSIT_CODE = #depositCode#,
<!-- 入库单号 -->
DEPOSIT_CODE = #depositCode#,
<!-- 入库单号 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
DEPOSIT_USER = #depositUser#
<!-- 入库人员 -->
DEPOSIT_USER = #depositUser#,
<!-- 入库人员 -->
STATUS = #status#
WHERE
ID = #id#
</update>
<update
id=
"updateBystatus"
>
UPDATE ${hpjxSchema}.T_HPBG002
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
STATUS = #status#
<!-- 审批状态0.未审核1.已审核 -->
WHERE
WHERE
ID = #id#
ID = #id#
</update>
</update>
...
...
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG002A.xml
View file @
a18e993c
...
@@ -200,6 +200,9 @@
...
@@ -200,6 +200,9 @@
)
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#itemType#, #itemCode#, #itemName#, #itemModel#, #itemUnit#, #invQty#, #status#, #parentId#)
#itemType#, #itemCode#, #itemName#, #itemModel#, #itemUnit#, #invQty#, #status#, #parentId#)
<selectKey
resultClass=
"java.lang.Long"
keyProperty=
"id"
>
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG002A
</selectKey>
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
...
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG003.xml
View file @
a18e993c
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
DELETE_FLAG = #deleteFlag#
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiveDate"
>
<isNotEmpty
prepend=
" AND "
property=
"receiveDate"
>
RECEIVE_DATE =
#receiveDate#
RECEIVE_DATE =
REPLACE(#receiveDate#, '-', '')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiveCode"
>
<isNotEmpty
prepend=
" AND "
property=
"receiveCode"
>
RECEIVE_CODE = #receiveCode#
RECEIVE_CODE = #receiveCode#
...
@@ -68,6 +68,9 @@
...
@@ -68,6 +68,9 @@
<isNotEmpty
prepend=
" AND "
property=
"receiveUser"
>
<isNotEmpty
prepend=
" AND "
property=
"receiveUser"
>
RECEIVE_USER = #receiveUser#
RECEIVE_USER = #receiveUser#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
@@ -87,7 +90,8 @@
...
@@ -87,7 +90,8 @@
RECEIVE_CODE as "receiveCode",
<!-- 领用单号 -->
RECEIVE_CODE as "receiveCode",
<!-- 领用单号 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
RECEIVE_USER as "receiveUser"
<!-- 领用人员 -->
RECEIVE_USER as "receiveUser",
<!-- 领用人员 -->
STATUS as "status"
FROM ${hpjxSchema}.T_HPBG003 WHERE 1=1
FROM ${hpjxSchema}.T_HPBG003 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
...
@@ -166,10 +170,11 @@
...
@@ -166,10 +170,11 @@
RECEIVE_CODE,
<!-- 领用单号 -->
RECEIVE_CODE,
<!-- 领用单号 -->
WH_CODE,
<!-- 仓库编码 -->
WH_CODE,
<!-- 仓库编码 -->
WH_NAME,
<!-- 仓库名称 -->
WH_NAME,
<!-- 仓库名称 -->
RECEIVE_USER
<!-- 领用人员 -->
RECEIVE_USER,
<!-- 领用人员 -->
STATUS
)
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#receiveDate#, #receiveCode#, #whCode#, #whName#, #receiveUser#)
#receiveDate#, #receiveCode#, #whCode#, #whName#, #receiveUser#
, #status#
)
<selectKey
resultClass=
"java.lang.Long"
keyProperty=
"id"
>
<selectKey
resultClass=
"java.lang.Long"
keyProperty=
"id"
>
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG003
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG003
</selectKey>
</selectKey>
...
@@ -202,7 +207,19 @@
...
@@ -202,7 +207,19 @@
RECEIVE_CODE = #receiveCode#,
<!-- 领用单号 -->
RECEIVE_CODE = #receiveCode#,
<!-- 领用单号 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
RECEIVE_USER = #receiveUser#
<!-- 领用人员 -->
RECEIVE_USER = #receiveUser#,
<!-- 领用人员 -->
STATUS = #status#
WHERE
ID = #id#
</update>
<update
id=
"updateBystatus"
>
UPDATE ${hpjxSchema}.T_HPBG003
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
STATUS = #status#
<!-- 审批状态0.未审核1.已审核 -->
WHERE
WHERE
ID = #id#
ID = #id#
</update>
</update>
...
...
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG003A.xml
View file @
a18e993c
...
@@ -201,6 +201,9 @@
...
@@ -201,6 +201,9 @@
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#itemType#, #itemCode#, #itemName#, #itemModel#, #itemUnit#, #receiveQty#,
#itemType#, #itemCode#, #itemName#, #itemModel#, #itemUnit#, #receiveQty#,
#status#, #parentId#)
#status#, #parentId#)
<selectKey
resultClass=
"java.lang.Long"
keyProperty=
"id"
>
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG003A
</selectKey>
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
...
src/main/java/com/baosight/hpjx/hp/bg/sql/HPBG004.xml
View file @
a18e993c
...
@@ -252,6 +252,9 @@
...
@@ -252,6 +252,9 @@
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#,
#takeStockDate#, #whCode#, #whName#, #itemType#, #itemCode#, #itemName#,
#takeStockDate#, #whCode#, #whName#, #itemType#, #itemCode#, #itemName#,
#itemModel#, #itemUnit#, #paperQty#, #actualQty#, #proLossQty#, #stoLoca#, #takeStockUser#, #status#)
#itemModel#, #itemUnit#, #paperQty#, #actualQty#, #proLossQty#, #stoLoca#, #takeStockUser#, #status#)
<selectKey
resultClass=
"java.lang.Long"
keyProperty=
"id"
>
SELECT MAX(ID) as "id" FROM ${hpjxSchema}.T_HPBG004
</selectKey>
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
...
src/main/java/com/baosight/hpjx/hp/bg/tools/HPBGTools.java
View file @
a18e993c
...
@@ -31,18 +31,17 @@ public class HPBGTools {
...
@@ -31,18 +31,17 @@ public class HPBGTools {
public
static
class
HpBg002
{
public
static
class
HpBg002
{
public
static
HPBG002
get
(
Long
id
){
public
static
HPBG002
get
(
Long
id
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
id
)||
id
<=
0
,
"委外入库单ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
id
)||
id
<=
0
,
"委外入库单ID不能为空!"
);
HPBG002
hpbg002
=
(
HPBG002
)
DaoBase
.
getInstance
().
get
(
HPBG002
.
QUERY
,
HPBG002
.
FIELD_ID
,
id
);
HPBG002
hpbg002
=
(
HPBG002
)
DaoBase
.
getInstance
().
get
(
HPBG002
.
QUERY
,
HPBG002
.
FIELD_ID
,
id
);
return
hpbg002
;
return
hpbg002
;
}
}
}
}
public
static
class
HpBg002a
{
public
static
class
HpBg002a
{
public
static
List
<
HPBG002A
>
getByParentId
(
Long
parentId
,
Integer
status
){
public
static
List
<
HPBG002A
>
getByParentId
(
Long
parentId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
parentId
)||
parentId
<=
0
,
"委外入库单ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
parentId
)||
parentId
<=
0
,
"委外入库单ID不能为空!"
);
Map
params
=
new
HashMap
();
Map
params
=
new
HashMap
();
params
.
put
(
"parentId"
,
parentId
);
params
.
put
(
"parentId"
,
parentId
);
params
.
put
(
"status"
,
status
);
params
.
put
(
"deleteFlag"
,
0
);
params
.
put
(
"deleteFlag"
,
0
);
List
<
HPBG002A
>
list
=
DaoBase
.
getInstance
().
query
(
HPBG002A
.
QUERY
,
params
);
List
<
HPBG002A
>
list
=
DaoBase
.
getInstance
().
query
(
HPBG002A
.
QUERY
,
params
);
return
CollectionUtils
.
isEmpty
(
list
)?
new
ArrayList
<>():
list
;
return
CollectionUtils
.
isEmpty
(
list
)?
new
ArrayList
<>():
list
;
...
@@ -67,11 +66,10 @@ public class HPBGTools {
...
@@ -67,11 +66,10 @@ public class HPBGTools {
}
}
public
static
class
HpBg003a
{
public
static
class
HpBg003a
{
public
static
List
<
HPBG003A
>
getByParentId
(
Long
parentId
,
Integer
status
){
public
static
List
<
HPBG003A
>
getByParentId
(
Long
parentId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
parentId
)||
parentId
<=
0
,
"委外入库单ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
parentId
)||
parentId
<=
0
,
"委外入库单ID不能为空!"
);
Map
params
=
new
HashMap
();
Map
params
=
new
HashMap
();
params
.
put
(
"parentId"
,
parentId
);
params
.
put
(
"parentId"
,
parentId
);
params
.
put
(
"status"
,
status
);
params
.
put
(
"deleteFlag"
,
0
);
params
.
put
(
"deleteFlag"
,
0
);
List
<
HPBG003A
>
list
=
DaoBase
.
getInstance
().
query
(
HPBG003A
.
QUERY
,
params
);
List
<
HPBG003A
>
list
=
DaoBase
.
getInstance
().
query
(
HPBG003A
.
QUERY
,
params
);
return
CollectionUtils
.
isEmpty
(
list
)?
new
ArrayList
<>():
list
;
return
CollectionUtils
.
isEmpty
(
list
)?
new
ArrayList
<>():
list
;
...
...
src/main/java/com/baosight/hpjx/hp/sb/domain/HPSB006.java
View file @
a18e993c
package
com
.
baosight
.
hpjx
.
hp
.
sb
.
domain
;
package
com
.
baosight
.
hpjx
.
hp
.
sb
.
domain
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
...
@@ -530,11 +531,11 @@ public class HPSB006 extends DaoEPBase {
...
@@ -530,11 +531,11 @@ public class HPSB006 extends DaoEPBase {
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
setInspecDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INSPEC_DATE
)),
inspecDate
));
setInspecDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
DateUtils
.
formatShort
(
map
.
get
(
FIELD_INSPEC_DATE
)
)),
inspecDate
));
setInspecCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INSPEC_CODE
)),
inspecCode
));
setInspecCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INSPEC_CODE
)),
inspecCode
));
setPlanCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_CODE
)),
planCode
));
setPlanCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_CODE
)),
planCode
));
setPlanStartDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_START_DATE
)),
planStartDate
));
setPlanStartDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
DateUtils
.
formatShort
(
map
.
get
(
FIELD_PLAN_START_DATE
)
)),
planStartDate
));
setPlanEndDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_END_DATE
)),
planEndDate
));
setPlanEndDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
DateUtils
.
formatShort
(
map
.
get
(
FIELD_PLAN_END_DATE
)
)),
planEndDate
));
setInspecUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INSPEC_USER_ID
)),
inspecUserId
));
setInspecUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INSPEC_USER_ID
)),
inspecUserId
));
setInspecUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INSPEC_USER_NAME
)),
inspecUserName
));
setInspecUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INSPEC_USER_NAME
)),
inspecUserName
));
setCheckStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHECK_STATUS
)),
checkStatus
));
setCheckStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHECK_STATUS
)),
checkStatus
));
...
...
src/main/java/com/baosight/hpjx/hp/sb/domain/HPSB007.java
View file @
a18e993c
package
com
.
baosight
.
hpjx
.
hp
.
sb
.
domain
;
package
com
.
baosight
.
hpjx
.
hp
.
sb
.
domain
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
...
@@ -530,11 +531,11 @@ public class HPSB007 extends DaoEPBase {
...
@@ -530,11 +531,11 @@ public class HPSB007 extends DaoEPBase {
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setFactoryCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_CODE
)),
factoryCode
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
setFactoryName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FACTORY_NAME
)),
factoryName
));
setUpkeepDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPKEEP_DATE
)),
upkeepDate
));
setUpkeepDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
DateUtils
.
formatShort
(
map
.
get
(
FIELD_UPKEEP_DATE
)
)),
upkeepDate
));
setUpkeepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPKEEP_CODE
)),
upkeepCode
));
setUpkeepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPKEEP_CODE
)),
upkeepCode
));
setPlanCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_CODE
)),
planCode
));
setPlanCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_CODE
)),
planCode
));
setPlanStartDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_START_DATE
)),
planStartDate
));
setPlanStartDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
DateUtils
.
formatShort
(
map
.
get
(
FIELD_PLAN_START_DATE
)
)),
planStartDate
));
setPlanEndDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_END_DATE
)),
planEndDate
));
setPlanEndDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
DateUtils
.
formatShort
(
map
.
get
(
FIELD_PLAN_END_DATE
)
)),
planEndDate
));
setUpkeepUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPKEEP_USER_ID
)),
upkeepUserId
));
setUpkeepUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPKEEP_USER_ID
)),
upkeepUserId
));
setUpkeepUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPKEEP_USER_NAME
)),
upkeepUserName
));
setUpkeepUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPKEEP_USER_NAME
)),
upkeepUserName
));
setCheckStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHECK_STATUS
)),
checkStatus
));
setCheckStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHECK_STATUS
)),
checkStatus
));
...
...
src/main/java/com/baosight/hpjx/hp/sb/service/ServiceHPSB006.java
View file @
a18e993c
...
@@ -85,7 +85,7 @@ public class ServiceHPSB006 extends ServiceEPBase {
...
@@ -85,7 +85,7 @@ public class ServiceHPSB006 extends ServiceEPBase {
hpsb004
.
setTaskStatus
(
0
);
hpsb004
.
setTaskStatus
(
0
);
DaoUtils
.
update
(
HPSB004
.
UPDATE
,
hpsb004
);
DaoUtils
.
update
(
HPSB004
.
UPDATE
,
hpsb004
);
}
}
DaoUtils
.
update
(
HPSB00
4
.
DELETE_FLAG
,
hgsb004
.
toMap
());
DaoUtils
.
update
(
HPSB00
6
.
DELETE_FLAG
,
hgsb004
.
toMap
());
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
...
...
src/main/java/com/baosight/hpjx/hp/sb/service/ServiceHPSB007.java
View file @
a18e993c
...
@@ -127,7 +127,7 @@ public class ServiceHPSB007 extends ServiceEPBase {
...
@@ -127,7 +127,7 @@ public class ServiceHPSB007 extends ServiceEPBase {
*/
*/
public
void
add
(
HPSB007
hgsb005
)
{
public
void
add
(
HPSB007
hgsb005
)
{
//生成保养单号
//生成保养单号
hgsb005
.
setUpkeep
Dat
e
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
UPKEEP_CODE
));
hgsb005
.
setUpkeep
Cod
e
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
UPKEEP_CODE
));
DaoUtils
.
insert
(
HPSB007
.
INSERT
,
hgsb005
);
DaoUtils
.
insert
(
HPSB007
.
INSERT
,
hgsb005
);
}
}
...
...
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB003.xml
View file @
a18e993c
...
@@ -340,15 +340,14 @@
...
@@ -340,15 +340,14 @@
<select
id=
"queryFactoryCodeBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryFactoryCodeBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
SELECT
FACTORY_CODE
as "factoryCode",
ORG_ID
as "factoryCode",
FACTORY_
NAME as "factoryName"
ORG_C
NAME as "factoryName"
FROM ${platSchema}.txsog01
FROM ${platSchema}.txsog01
WHERE IS_DELETED = '0' AND FACTORY_CODE IS NOT NULL
WHERE IS_DELETED = '0' AND FACTORY_CODE IS NOT NULL
AND ORG_TYPE = 'factory'
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
COMPANY_CODE = #companyCode#
<!--and ORG_ID IN (<include refid="queryLoginNameBase"/>)-->
<!--and ORG_ID IN (<include refid="queryLoginNameBase"/>)-->
</isNotEmpty>
</isNotEmpty>
group by FACTORY_CODE,FACTORY_NAME
</select>
</select>
<select
id=
"queryGroupCodeBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryGroupCodeBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
...
...
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB007.xml
View file @
a18e993c
...
@@ -208,27 +208,29 @@
...
@@ -208,27 +208,29 @@
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPSB007 (ID,
<!-- ID -->
INSERT INTO ${hpjxSchema}.T_HPSB007 (ID,
<!-- ID -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_CODE,
<!-- 公司编码 -->
DEP_CODE,
<!-- 部门编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 修改人 -->
UPDATED_BY,
<!-- 修改人 -->
UPDATED_NAME,
<!-- 修改人名称 -->
UPDATED_NAME,
<!-- 修改人名称 -->
UPDATED_TIME,
<!-- 修改时间 -->
UPDATED_TIME,
<!-- 修改时间 -->
DELETE_FLAG,
<!-- 是否删除 0-否1-是 -->
DELETE_FLAG,
<!-- 是否删除 0-否1-是 -->
FACTORY_CODE,
<!-- 工厂代码 -->
FACTORY_CODE,
<!-- 工厂代码 -->
FACTORY_NAME,
<!-- 工厂名称 -->
FACTORY_NAME,
<!-- 工厂名称 -->
UPKEEP_DATE,
<!-- 保养日期 -->
UPKEEP_DATE,
<!-- 保养日期 -->
UPKEEP_CODE,
<!-- 保养单号 -->
UPKEEP_CODE,
<!-- 保养单号 -->
PLAN_CODE,
<!-- 计划单号 -->
PLAN_CODE,
<!-- 计划单号 -->
PLAN_START_DATE,
<!-- 计划开始日期 -->
PLAN_START_DATE,
<!-- 计划开始日期 -->
PLAN_END_DATE,
<!-- 计划结束日期 -->
PLAN_END_DATE,
<!-- 计划结束日期 -->
UPKEEP_USER_ID,
<!-- 保养人编码 -->
UPKEEP_USER_ID,
<!-- 保养人编码 -->
UPKEEP_USER_NAME,
<!-- 保养人名称 -->
UPKEEP_USER_NAME,
<!-- 保养人名称 -->
CHECK_STATUS
<!-- 审核状态 0-停止 1-启用 -->
CHECK_STATUS
<!-- 审核状态 0-停止 1-启用 -->
)
)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #upkeepDate#, #upkeepCode#, #planCode#, #planStartDate#, #planEndDate#, #upkeepUserId#, #upkeepUserName#, #checkStatus#)
VALUES (#id#, #companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #factoryCode#, #factoryName#, #upkeepDate#, #upkeepCode#, #planCode#,
#planStartDate#, #planEndDate#, #upkeepUserId#, #upkeepUserName#, #checkStatus#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
...
src/main/java/com/baosight/hpjx/hp/wd/service/ServiceHPWD001.java
View file @
a18e993c
...
@@ -206,6 +206,9 @@ public class ServiceHPWD001 extends ServiceEPBase {
...
@@ -206,6 +206,9 @@ public class ServiceHPWD001 extends ServiceEPBase {
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPWD099
hgwd099
=
new
HPWD099
();
HPWD099
hgwd099
=
new
HPWD099
();
hgwd099
.
fromMap
(
map
);
hgwd099
.
fromMap
(
map
);
if
(
hgwd099
.
getOperStatus
()
==
0
){
hgwd099
.
setDocVersion
(
hgwd099
.
getDocVersion
()
+
1
);
}
hgwd099
.
setStatus
(
HpWdConstant
.
FileStatus
.
S_1
);
hgwd099
.
setStatus
(
HpWdConstant
.
FileStatus
.
S_1
);
hgwd099
.
setReleaseDate
(
DateUtils
.
shortDateTime
());
hgwd099
.
setReleaseDate
(
DateUtils
.
shortDateTime
());
hgwd099
.
setOperStatus
(
HpWdConstant
.
OperStatus
.
S_0
);
hgwd099
.
setOperStatus
(
HpWdConstant
.
OperStatus
.
S_0
);
...
...
src/main/java/com/baosight/hpjx/hp/wd/service/ServiceHPWD002.java
View file @
a18e993c
...
@@ -6,6 +6,8 @@ import com.baosight.hpjx.core.security.UserSessionUtils;
...
@@ -6,6 +6,8 @@ import com.baosight.hpjx.core.security.UserSessionUtils;
import
com.baosight.hpjx.hp.wd.constant.HpWdConstant
;
import
com.baosight.hpjx.hp.wd.constant.HpWdConstant
;
import
com.baosight.hpjx.hp.wd.domain.HPWD001
;
import
com.baosight.hpjx.hp.wd.domain.HPWD001
;
import
com.baosight.hpjx.hp.wd.domain.HPWD002
;
import
com.baosight.hpjx.hp.wd.domain.HPWD002
;
import
com.baosight.hpjx.hp.wd.domain.HPWD099
;
import
com.baosight.hpjx.hp.wd.utils.HpWdUtils
;
import
com.baosight.hpjx.hp.xs.domain.User
;
import
com.baosight.hpjx.hp.xs.domain.User
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
...
@@ -56,7 +58,12 @@ public class ServiceHPWD002 extends ServiceEPBase {
...
@@ -56,7 +58,12 @@ public class ServiceHPWD002 extends ServiceEPBase {
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
// 仅查询已发布的文件
// 仅查询已发布的文件
queryRow
.
put
(
HPWD001
.
FIELD_STATUS
,
HpWdConstant
.
FileStatus
.
S_1
);
queryRow
.
put
(
HPWD001
.
FIELD_STATUS
,
HpWdConstant
.
FileStatus
.
S_1
);
// 非管理员仅查询自己有权限的项目
String
userId
=
UserSessionUtils
.
getLoginName
();
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
User
.
FIELD_USER_ID
,
UserSessionUtils
.
getUserId
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
User
.
FIELD_USER_ID
,
UserSessionUtils
.
getUserId
());
if
(
HpWdUtils
.
HpWd009
.
isManager
(
userId
))
{
queryRow
.
remove
(
HPWD001
.
FIELD_PARENT_ID
);
}
builder
(
inInfo
);
builder
(
inInfo
);
inInfo
=
super
.
query
(
inInfo
,
HPWD002
.
QUERY
,
new
HPWD002
());
inInfo
=
super
.
query
(
inInfo
,
HPWD002
.
QUERY
,
new
HPWD002
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/baosight/hpjx/hp/wd/sql/HPWD009.xml
View file @
a18e993c
...
@@ -78,7 +78,6 @@
...
@@ -78,7 +78,6 @@
<include
refid=
"columnD"
/>
<include
refid=
"columnD"
/>
FROM ${hpjxSchema}.T_HPWD009 T
FROM ${hpjxSchema}.T_HPWD009 T
INNER JOIN ${platSchema}.XS_USER B ON T.USER_ID = B.LOGIN_NAME
INNER JOIN ${platSchema}.XS_USER B ON T.USER_ID = B.LOGIN_NAME
LEFT JOIN ${platSchema}.TXSOG02 C ON B.USER_ID = C.USER_ID
LEFT JOIN ${platSchema}.TXSOG01 D ON D.ORG_ID = T.FACTORY_CODE
LEFT JOIN ${platSchema}.TXSOG01 D ON D.ORG_ID = T.FACTORY_CODE
WHERE 1=1
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
...
...
src/main/java/com/baosight/hpjx/hp/wd/sql/HPWD099.xml
View file @
a18e993c
...
@@ -181,7 +181,7 @@
...
@@ -181,7 +181,7 @@
UPDATE ${hpjxSchema}.T_HPWD099
UPDATE ${hpjxSchema}.T_HPWD099
SET
SET
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
DOC_VERSION =
DOC_VERSION + 1
,
<!--版本号-->
DOC_VERSION =
#docVersion#
,
<!--版本号-->
STATUS = #status#,
<!-- 状态 -->
STATUS = #status#,
<!-- 状态 -->
OPER_STATUS = #operStatus#,
OPER_STATUS = #operStatus#,
<include
refid=
"SqlBase.updateRevise"
/>
<include
refid=
"SqlBase.updateRevise"
/>
...
...
src/main/java/com/baosight/hpjx/hp/yx/domain/HPYX003.java
View file @
a18e993c
...
@@ -144,7 +144,7 @@ public class HPYX003 extends DaoEPBase {
...
@@ -144,7 +144,7 @@ public class HPYX003 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_QUANTITY
);
eiColumn
=
new
EiColumn
(
FIELD_QUANTITY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setScaleLength
(
4
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"产品数量"
);
eiColumn
.
setDescName
(
"产品数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
src/main/java/com/baosight/xservices/xs/sql/XS07.xml
View file @
a18e993c
...
@@ -78,7 +78,8 @@
...
@@ -78,7 +78,8 @@
t1.rec_revisor as "recRevisor",
t1.rec_revisor as "recRevisor",
t1.rec_revise_time as "recReviseTime",
t1.rec_revise_time as "recReviseTime",
t1.archive_flag as "archiveFlag",
t1.archive_flag as "archiveFlag",
t1.sort_index as "sortIndex"
t1.sort_index as "sortIndex",
t7.type as "resourceType"
FROM ${platSchema}.XS_AUTHORIZATION t1
FROM ${platSchema}.XS_AUTHORIZATION t1
LEFT JOIN ${platSchema}.XS_USER_GROUP t2 ON t1.subject_id=t2.ID
LEFT JOIN ${platSchema}.XS_USER_GROUP t2 ON t1.subject_id=t2.ID
LEFT JOIN ${platSchema}.XS_USER t3 ON t1.subject_id = t3.USER_ID
LEFT JOIN ${platSchema}.XS_USER t3 ON t1.subject_id = t3.USER_ID
...
...
src/main/webapp/HP/BG/HPBG002.js
View file @
a18e993c
...
@@ -32,6 +32,7 @@ $(function() {
...
@@ -32,6 +32,7 @@ $(function() {
});
});
$
(
"#BTN_INSERT"
).
on
(
"click"
,
addFunc
);
$
(
"#BTN_INSERT"
).
on
(
"click"
,
addFunc
);
$
(
"#BTN_UPDATE"
).
on
(
"click"
,
updateFunc
);
$
(
"#BTN_UPDATE"
).
on
(
"click"
,
updateFunc
);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
)
},
},
onDelete
:
function
(
e
)
{
onDelete
:
function
(
e
)
{
...
@@ -114,7 +115,7 @@ function updateFunc() {
...
@@ -114,7 +115,7 @@ function updateFunc() {
return
;
return
;
}
}
if
(
rows
[
0
].
status
==
"3"
)
{
if
(
rows
[
0
].
status
==
"3"
)
{
message
(
"
已经提交的数据
不能进行修改!"
);
message
(
"
数据已提交,
不能进行修改!"
);
return
;
return
;
}
}
JSColorbox
.
open
({
JSColorbox
.
open
({
...
@@ -178,6 +179,14 @@ function deleteFunc(){
...
@@ -178,6 +179,14 @@ function deleteFunc(){
return
;
return
;
}
}
let
flag
=
true
;
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
status
=
item
.
get
(
"status"
);
if
(
isBlank
(
status
)
||
status
==
3
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
已审批
\"
,不能重复审批!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
){
if
(
flag
){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
...
@@ -197,6 +206,35 @@ function deleteFunc(){
...
@@ -197,6 +206,35 @@ function deleteFunc(){
}
}
}
}
function
submitFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
status
=
item
.
get
(
"status"
);
if
(
isBlank
(
status
)
||
status
==
3
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
已审批
\"
,不能重复审批!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
提交
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPBG002"
,
"submit"
,
true
,
function
(
ei
)
{
if
(
ei
.
getStatus
()
!=
-
1
){
query
();
}
});
}
});
}
}
/**
/**
* 文件上传
* 文件上传
*
*
...
...
src/main/webapp/HP/BG/HPBG002.jsp
View file @
a18e993c
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<EF:EFPage title="办公用品入库">
<EF:EFPage title="办公用品入库">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="
sell
Date" cname="入库日期" role="date"
<EF:EFDatePicker blockId="inqu_status" row="0" ename="
deposit
Date" cname="入库日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="clientName" cname="仓库名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="clientName" cname="仓库名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
...
@@ -57,6 +57,9 @@
...
@@ -57,6 +57,9 @@
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
enable="false"/>
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
...
...
src/main/webapp/HP/BG/HPBG002A.js
View file @
a18e993c
...
@@ -15,7 +15,6 @@ $(function() {
...
@@ -15,7 +15,6 @@ $(function() {
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
grid
.
dataSource
.
page
(
1
);
grid
.
dataSource
.
page
(
1
);
});
});
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
)
},
},
}
}
};
};
...
@@ -41,31 +40,3 @@ let query = function () {
...
@@ -41,31 +40,3 @@ let query = function () {
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
}
}
function
submitFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
status
=
item
.
get
(
"status"
);
if
(
isBlank
(
status
)
||
status
==
3
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
已审批
\"
,不能重复审批!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
提交
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPBG002A"
,
"submit"
,
true
,
function
(
ei
)
{
if
(
ei
.
getStatus
()
!=
-
1
){
query
();
}
});
}
});
}
}
\ No newline at end of file
src/main/webapp/HP/BG/HPBG002A.jsp
View file @
a18e993c
...
@@ -46,9 +46,6 @@
...
@@ -46,9 +46,6 @@
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
</EF:EFPage>
</EF:EFPage>
...
...
src/main/webapp/HP/BG/HPBG002B.js
View file @
a18e993c
...
@@ -58,7 +58,7 @@ $(function() {
...
@@ -58,7 +58,7 @@ $(function() {
}
}
});
});
},
},
on
Add
:
function
(
e
)
{
before
Add
:
function
(
e
)
{
let
whCode
=
$
(
"#result-0-whCode"
).
val
();
let
whCode
=
$
(
"#result-0-whCode"
).
val
();
if
(
isBlank
(
whCode
))
{
if
(
isBlank
(
whCode
))
{
message
(
"请选择仓库名称!"
);
message
(
"请选择仓库名称!"
);
...
...
src/main/webapp/HP/BG/HPBG002B.jsp
View file @
a18e993c
...
@@ -56,9 +56,6 @@
...
@@ -56,9 +56,6 @@
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2" hidden="true">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<div class="row" style="display:flex;justify-content:center;">
...
...
src/main/webapp/HP/BG/HPBG002C.js
View file @
a18e993c
...
@@ -58,7 +58,7 @@ $(function() {
...
@@ -58,7 +58,7 @@ $(function() {
}
}
});
});
},
},
on
Add
:
function
(
e
)
{
before
Add
:
function
(
e
)
{
let
whCode
=
$
(
"#result-0-whCode"
).
val
();
let
whCode
=
$
(
"#result-0-whCode"
).
val
();
if
(
isBlank
(
whCode
))
{
if
(
isBlank
(
whCode
))
{
message
(
"请选择仓库名称!"
);
message
(
"请选择仓库名称!"
);
...
...
src/main/webapp/HP/BG/HPBG002C.jsp
View file @
a18e993c
...
@@ -59,9 +59,6 @@
...
@@ -59,9 +59,6 @@
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<div class="row" style="display:flex;justify-content:center;">
...
...
src/main/webapp/HP/BG/HPBG003.js
View file @
a18e993c
...
@@ -32,13 +32,18 @@ $(function() {
...
@@ -32,13 +32,18 @@ $(function() {
});
});
$
(
"#BTN_INSERT"
).
on
(
"click"
,
addFunc
);
$
(
"#BTN_INSERT"
).
on
(
"click"
,
addFunc
);
$
(
"#BTN_UPDATE"
).
on
(
"click"
,
updateFunc
);
$
(
"#BTN_UPDATE"
).
on
(
"click"
,
updateFunc
);
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
)
},
},
onAdd
:
function
(
e
)
{
onAdd
:
function
(
e
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
$
.
each
(
e
.
items
,
function
(
index
,
item
)
{
item
[
'sellDate'
]
=
currShortDate
()
item
[
'sellDate'
]
=
currShortDate
()
});
});
},
},
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
e
.
preventDefault
();
deleteFunc
();
},
onSave
:
function
(
e
)
{
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
// 阻止默认请求,使用自定义保存
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -109,7 +114,7 @@ function updateFunc() {
...
@@ -109,7 +114,7 @@ function updateFunc() {
return
;
return
;
}
}
if
(
rows
[
0
].
status
==
"3"
)
{
if
(
rows
[
0
].
status
==
"3"
)
{
message
(
"
已经提交的数据
不能进行修改!"
);
message
(
"
数据已提交,
不能进行修改!"
);
return
;
return
;
}
}
JSColorbox
.
open
({
JSColorbox
.
open
({
...
@@ -121,40 +126,26 @@ function updateFunc() {
...
@@ -121,40 +126,26 @@ function updateFunc() {
});
});
}
}
function
btnSaveFunc
(
btnNode
)
{
function
deleteFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
)
message
(
"请选择数据"
)
return
;
return
;
}
}
let
flag
=
true
;
let
flag
=
true
;
rows
.
forEach
(
function
(
item
,
index
){
$
.
each
(
rows
,
function
(
index
,
item
)
{
if
(
isBlank
(
item
.
sellDate
)){
let
status
=
item
.
get
(
"status"
);
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
推广日期
\"
,不能为空!"
);
if
(
isBlank
(
status
)
||
status
==
3
){
flag
=
false
;
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
已审批
\"
,不能重复审批!"
);
return
false
;
}
if
(
isBlank
(
item
.
sourceFunds
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
推广名称
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
if
(
isBlank
(
item
.
goalAmount
)
||
!
isNumber
(
item
.
goalAmount
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
目标销售额
\"
,不能为空!"
);
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
if
(
isBlank
(
item
.
budget
)
||
!
isNumber
(
item
.
budget
)){
});
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
推广预算
\"
,不能为空!"
);
flag
=
false
;
return
false
;
}
})
if
(
flag
){
if
(
flag
){
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HP
YX010"
,
"save"
,
JSUtils
.
submitGridsData
(
"result"
,
"HP
BG003"
,
"delete"
,
true
,
true
,
function
(
e
)
{
function
(
e
)
{
var
status
=
e
.
getStatus
();
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
if
(
status
!==
-
1
)
{
NotificationUtil
(
e
.
msg
);
NotificationUtil
(
e
.
msg
);
...
@@ -168,31 +159,32 @@ function btnSaveFunc(btnNode) {
...
@@ -168,31 +159,32 @@ function btnSaveFunc(btnNode) {
}
}
});
});
}
}
}
}
function
deleteFunc
()
{
function
submitFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
)
message
(
"请选择数据"
)
;
return
;
return
;
}
}
let
flag
=
true
;
let
flag
=
true
;
if
(
flag
){
$
.
each
(
rows
,
function
(
index
,
item
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
let
status
=
item
.
get
(
"status"
);
if
(
isBlank
(
status
)
||
status
==
3
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
已审批
\"
,不能重复审批!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
提交
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPBG003"
,
"delete"
,
true
,
JSUtils
.
submitGridsData
(
"result"
,
"HPBG003"
,
"submit"
,
true
,
function
(
e
)
{
function
(
ei
)
{
var
status
=
e
.
getStatus
();
if
(
ei
.
getStatus
()
!=
-
1
){
if
(
status
!==
-
1
)
{
NotificationUtil
(
e
.
msg
);
query
();
query
();
}
else
{
NotificationUtil
(
e
.
msg
,
"error"
);
}
}
btnNode
.
attr
(
"disabled"
,
false
);
});
}
);
}
}
});
});
}
}
...
...
src/main/webapp/HP/BG/HPBG003.jsp
View file @
a18e993c
...
@@ -57,6 +57,9 @@
...
@@ -57,6 +57,9 @@
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
<EF:EFColumn cname="创建人" ename="createdName" align="center" width="120" readonly="true" required="false"
enable="false"/>
enable="false"/>
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
<EF:EFColumn cname="创建时间" ename="createdTime" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
...
...
src/main/webapp/HP/BG/HPBG003A.js
View file @
a18e993c
...
@@ -15,7 +15,6 @@ $(function() {
...
@@ -15,7 +15,6 @@ $(function() {
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
grid
.
dataSource
.
page
(
1
);
grid
.
dataSource
.
page
(
1
);
});
});
$
(
"#SUBMIT"
).
on
(
"click"
,
submitFunc
)
},
},
}
}
};
};
...
@@ -41,31 +40,3 @@ let query = function () {
...
@@ -41,31 +40,3 @@ let query = function () {
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
}
}
function
submitFunc
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
status
=
item
.
get
(
"status"
);
if
(
isBlank
(
status
)
||
status
==
3
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
已审批
\"
,不能重复审批!"
);
flag
=
false
;
return
false
;
}
});
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
提交
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPBG003A"
,
"submit"
,
true
,
function
(
ei
)
{
if
(
ei
.
getStatus
()
!=
-
1
){
query
();
}
});
}
});
}
}
\ No newline at end of file
src/main/webapp/HP/BG/HPBG003A.jsp
View file @
a18e993c
...
@@ -46,9 +46,6 @@
...
@@ -46,9 +46,6 @@
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
</EF:EFPage>
</EF:EFPage>
...
...
src/main/webapp/HP/BG/HPBG003B.js
View file @
a18e993c
...
@@ -53,7 +53,7 @@ $(function() {
...
@@ -53,7 +53,7 @@ $(function() {
}
}
});
});
},
},
on
Add
:
function
(
e
)
{
before
Add
:
function
(
e
)
{
let
whCode
=
$
(
"#result-0-whCode"
).
val
();
let
whCode
=
$
(
"#result-0-whCode"
).
val
();
if
(
isBlank
(
whCode
))
{
if
(
isBlank
(
whCode
))
{
message
(
"请选择仓库名称!"
);
message
(
"请选择仓库名称!"
);
...
...
src/main/webapp/HP/BG/HPBG003B.jsp
View file @
a18e993c
...
@@ -56,9 +56,6 @@
...
@@ -56,9 +56,6 @@
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" enable="false" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<div class="row" style="display:flex;justify-content:center;">
...
...
src/main/webapp/HP/BG/HPBG003C.js
View file @
a18e993c
...
@@ -59,7 +59,7 @@ $(function() {
...
@@ -59,7 +59,7 @@ $(function() {
}
}
});
});
},
},
on
Add
:
function
(
e
)
{
before
Add
:
function
(
e
)
{
let
whCode
=
$
(
"#result-0-whCode"
).
val
();
let
whCode
=
$
(
"#result-0-whCode"
).
val
();
if
(
isBlank
(
whCode
))
{
if
(
isBlank
(
whCode
))
{
message
(
"请选择仓库名称!"
);
message
(
"请选择仓库名称!"
);
...
@@ -136,12 +136,6 @@ function btnSaveFunc() {
...
@@ -136,12 +136,6 @@ function btnSaveFunc() {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
let
status
=
item
.
get
(
"status"
);
if
(
status
==
3
){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
审批状态
\"
已提交,无法操作"
);
flag
=
false
;
return
false
;
}
})
})
if
(
flag
)
if
(
flag
)
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
...
...
src/main/webapp/HP/BG/HPBG003C.jsp
View file @
a18e993c
...
@@ -59,9 +59,6 @@
...
@@ -59,9 +59,6 @@
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
displayType="0" sort="true" align="right" maxLength="15" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" readonly="false" required="true" defaultValue="2">
<EF:EFCodeOption codeName="hpjx.hpcw.reviewStatus" condition="ITEM_CODE IN ('2','3')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<div class="row" style="display:flex;justify-content:center;">
...
...
src/main/webapp/HP/CG/HPCG004.jsp
View file @
a18e993c
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="inquiryType" cname="询价
单
类型" width="80" align="center" readonly="true">
<EF:EFComboColumn ename="inquiryType" cname="询价类型" width="80" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpcg.inquiryType"/>
<EF:EFCodeOption codeName="hpjx.hpcg.inquiryType"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
<EF:EFComboColumn ename="proApplyStatus" cname="提交状态" width="80" align="center" enable="false" defaultValue="0">
...
...
src/main/webapp/HP/SB/HPSB006.jsp
View file @
a18e993c
...
@@ -60,7 +60,8 @@
...
@@ -60,7 +60,8 @@
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="checkStatus" cname="审核状态" width="80" align="center" enable="false" readonly="false" required="true" defaultValue="1">
<EF:EFComboColumn ename="checkStatus" cname="审核状态" width="80" align="center" enable="false"
readonly="false" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hpjx.hpsb.approveStatus"/>
<EF:EFCodeOption codeName="hpjx.hpsb.approveStatus"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
<%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
...
...
src/main/webapp/HP/SB/HPSB006A.js
View file @
a18e993c
...
@@ -84,10 +84,17 @@ $(function () {
...
@@ -84,10 +84,17 @@ $(function () {
if
(
e
.
field
===
"deviceType"
)
{
if
(
e
.
field
===
"deviceType"
)
{
loadChange
(
grid
,
e
,
"deviceCode"
);
loadChange
(
grid
,
e
,
"deviceCode"
);
}
else
if
(
e
.
field
===
"deviceCode"
)
{
}
else
if
(
e
.
field
===
"deviceCode"
)
{
if
(
e
.
items
[
0
].
deviceType
.
length
===
0
){
for
(
let
i
=
0
;
i
<
deviceCodeBox
.
length
;
i
++
)
{
loadChange
(
grid
,
e
,
"deviceType"
);
if
(
deviceCodeBox
[
i
][
'valueField'
]
===
e
.
items
[
0
][
'deviceCode'
]){
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"deviceName"
,
deviceCodeBox
[
i
][
'textField'
]);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"groupCode"
,
deviceCodeBox
[
i
][
'param3Field'
]);
if
(
e
.
items
[
0
].
deviceType
.
length
===
0
){
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"deviceType"
,
deviceCodeBox
[
i
][
'param1Field'
]);
}
break
;
}
}
}
//loadChange(grid,e,"userId
");
loadChange
(
grid
,
e
,
"checkItem
"
);
}
}
});
});
},
},
...
...
src/main/webapp/HP/SB/HPSB006A.jsp
View file @
a18e993c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<EF:EFPage title="设备点检详情">
<EF:EFPage title="设备点检详情">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂名称" colWidth="3" filter="contains"
readonly="true"
>
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="groupCode" cname="设备区域" hidden="true"/>
<EF:EFColumn ename="groupName" cname="设备区域名称" hidden="true"/>
<EF:EFComboColumn ename="deviceType" cname="设备类型"
<EF:EFComboColumn ename="deviceType" cname="设备类型"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
...
...
src/main/webapp/HP/SB/HPSB007.js
View file @
a18e993c
...
@@ -217,14 +217,14 @@ let save = function (btnNode) {
...
@@ -217,14 +217,14 @@ let save = function (btnNode) {
}
}
let
flag
=
true
;
let
flag
=
true
;
$
.
each
(
rows
,
function
(
index
,
item
)
{
$
.
each
(
rows
,
function
(
index
,
item
)
{
let
companyCode
=
item
.
get
(
"compan
yCode"
);
let
factoryCode
=
item
.
get
(
"factor
yCode"
);
let
upkeepDate
=
item
.
get
(
"upkeepDate"
);
let
upkeepDate
=
item
.
get
(
"upkeepDate"
);
let
planStartDate
=
item
.
get
(
"planStartDate"
);
let
planStartDate
=
item
.
get
(
"planStartDate"
);
let
planEndDate
=
item
.
get
(
"planEndDate"
);
let
planEndDate
=
item
.
get
(
"planEndDate"
);
let
upkeepUserId
=
item
.
get
(
"upkeepUserId"
);
let
upkeepUserId
=
item
.
get
(
"upkeepUserId"
);
let
checkStatus
=
item
.
get
(
"checkStatus"
);
let
checkStatus
=
item
.
get
(
"checkStatus"
);
if
(
isBlank
(
compan
yCode
)){
if
(
isBlank
(
factor
yCode
)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
公司
\"
,不能为空!"
);
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
工厂
\"
,不能为空!"
);
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
...
...
src/main/webapp/HP/SB/HPSB007.jsp
View file @
a18e993c
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
align="center" filter="contains" sort="true">
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="userIdBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="checkStatus" cname="审核状态" width="80" align="center" enable="false" required="true" defaultValue="
1
">
<EF:EFComboColumn ename="checkStatus" cname="审核状态" width="80" align="center" enable="false" required="true" defaultValue="
0
">
<EF:EFCodeOption codeName="hpjx.hpsb.approveStatus"/>
<EF:EFCodeOption codeName="hpjx.hpsb.approveStatus"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
<%--<EF:EFColumn cname="创建人" ename="createdName" align="center" width="100" readonly="true" required="false"
...
...
src/main/webapp/HP/SB/HPSB007A.js
View file @
a18e993c
...
@@ -78,10 +78,17 @@ $(function () {
...
@@ -78,10 +78,17 @@ $(function () {
if
(
e
.
field
===
"deviceType"
)
{
if
(
e
.
field
===
"deviceType"
)
{
loadChange
(
grid
,
e
,
"deviceCode"
);
loadChange
(
grid
,
e
,
"deviceCode"
);
}
else
if
(
e
.
field
===
"deviceCode"
)
{
}
else
if
(
e
.
field
===
"deviceCode"
)
{
if
(
e
.
items
[
0
].
deviceType
.
length
===
0
){
for
(
let
i
=
0
;
i
<
deviceCodeBox
.
length
;
i
++
)
{
loadChange
(
grid
,
e
,
"deviceType"
);
if
(
deviceCodeBox
[
i
][
'valueField'
]
===
e
.
items
[
0
][
'deviceCode'
]){
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"deviceName"
,
deviceCodeBox
[
i
][
'textField'
]);
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"groupCode"
,
deviceCodeBox
[
i
][
'param3Field'
]);
if
(
e
.
items
[
0
].
deviceType
.
length
===
0
){
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"deviceType"
,
deviceCodeBox
[
i
][
'param1Field'
]);
}
break
;
}
}
}
//loadChange(grid,e,"userId
");
loadChange
(
grid
,
e
,
"checkItem
"
);
}
}
});
});
},
},
...
...
src/main/webapp/HP/SB/HPSB007A.jsp
View file @
a18e993c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<EF:EFPage title="设备保养详情">
<EF:EFPage title="设备保养详情">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂名称" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="factoryCode" cname="工厂名称" colWidth="3" filter="contains"
readonly="true"
>
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="factoryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>
...
@@ -34,6 +34,8 @@
...
@@ -34,6 +34,8 @@
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="groupCode" cname="设备区域" hidden="true"/>
<EF:EFColumn ename="groupName" cname="设备区域名称" hidden="true"/>
<EF:EFComboColumn ename="deviceType" cname="设备类型"
<EF:EFComboColumn ename="deviceType" cname="设备类型"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
textField="textField" valueField="valueField"
...
...
src/main/webapp/HP/WD/HPWD001.js
View file @
a18e993c
...
@@ -123,25 +123,13 @@ $(function () {
...
@@ -123,25 +123,13 @@ $(function () {
var
title
=
item
.
text
;
var
title
=
item
.
text
;
let
icon
=
'fa fa-globe'
let
icon
=
'fa fa-globe'
if
(
item
.
label
!==
'root'
)
{
if
(
item
.
label
!==
'root'
)
{
switch
(
item
.
type
)
{
switch
(
item
.
leafType
)
{
case
'company'
:
case
'P'
:
// title = title + ' [公司]';
icon
=
'fa fa-building'
break
;
case
'dept'
:
// title = title + ' [部门]';
icon
=
'fa fa-users'
break
;
case
'post'
:
// title = title + ' [岗位]';
icon
=
'fa fa-user'
break
;
case
'1'
:
icon
=
'fa fa-clipboard'
icon
=
'fa fa-clipboard'
break
;
break
;
default
:
case
'C'
:
icon
=
'fa fa-folder'
icon
=
'fa fa-folder'
//icon = 'fa fa-home'
break
;
}
}
}
}
return
' <span class="'
+
icon
+
'" style="padding-right: 8px"> </span> <span class="titleClass" title="'
+
item
.
label
+
'">'
+
title
+
'</span>'
return
' <span class="'
+
icon
+
'" style="padding-right: 8px"> </span> <span class="titleClass" title="'
+
item
.
label
+
'">'
+
title
+
'</span>'
...
...
src/main/webapp/HP/WD/HPWD001.jsp
View file @
a18e993c
...
@@ -195,7 +195,8 @@
...
@@ -195,7 +195,8 @@
<EF:EFWindow id="releaseWindow" title="发布变更" width="50%" height="30%">
<EF:EFWindow id="releaseWindow" title="发布变更" width="50%" height="30%">
<EF:EFRegion id="inqu2" title="">
<EF:EFRegion id="inqu2" title="">
<EF:EFInput blockId="inqu_status" row="0" ename="changeContent" cname="变更内容" type="textarea" colWidth="12" ratio="2:10" required="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="changeContent" cname="变更内容" type="textarea"
colWidth="12" ratio="2:10" required="true" style="height:100px"/>
</EF:EFRegion>
</EF:EFRegion>
<div style="display: flex;justify-content: flex-end;">
<div style="display: flex;justify-content: flex-end;">
<EF:EFButton ename="confirmRelease" cname="确认发布"/>
<EF:EFButton ename="confirmRelease" cname="确认发布"/>
...
...
src/main/webapp/HP/XT/HPXT002A.js
View file @
a18e993c
...
@@ -103,12 +103,12 @@ let save = function (btnNode) {
...
@@ -103,12 +103,12 @@ let save = function (btnNode) {
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
let
insuranceCompany
=
item
.
get
(
"insuranceCompany"
);
//
let insuranceCompany= item.get("insuranceCompany");
if
(
isBlank
(
insuranceCompany
)){
//
if(isBlank(insuranceCompany)){
message
(
"选中的第"
+
(
index
+
1
)
+
"行
\"
保险公司
\"
,不能为空!"
);
//
message("选中的第"+(index+1)+"行\"保险公司\",不能为空!");
flag
=
false
;
//
flag = false;
return
false
;
//
return false;
}
//
}
let
insuranceAmount
=
item
.
get
(
"insuranceAmount"
);
let
insuranceAmount
=
item
.
get
(
"insuranceAmount"
);
if
(
isBlank
(
insuranceAmount
)){
if
(
isBlank
(
insuranceAmount
)){
...
@@ -119,7 +119,7 @@ let save = function (btnNode) {
...
@@ -119,7 +119,7 @@ let save = function (btnNode) {
let
insuranceStartDate
=
item
.
get
(
"insuranceStartDate"
);
let
insuranceStartDate
=
item
.
get
(
"insuranceStartDate"
);
let
insuranceEndDate
=
item
.
get
(
"insuranceEndDate"
);
let
insuranceEndDate
=
item
.
get
(
"insuranceEndDate"
);
if
(
new
Date
(
insuranceStartDate
)
>
new
Date
(
insuranceEndDate
)){
if
(
new
Date
(
insuranceStartDate
)
>
new
Date
(
insuranceEndDate
)){
message
(
"投保时间
\"
不能大于
\"\"
结束时间
\"
!"
);
message
(
"投保
开始
时间
\"
不能大于
\"\"
结束时间
\"
!"
);
flag
=
false
;
flag
=
false
;
return
false
;
return
false
;
}
}
...
...
src/main/webapp/HP/YX/HPYX001.jsp
View file @
a18e993c
...
@@ -105,12 +105,12 @@
...
@@ -105,12 +105,12 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="district" cname="区域" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="district" cname="区域" width="120" enable="true" readonly="false" align="center" required="true"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="1
5" displayType="0.00" format="{0:N0
}"
<EF:EFColumn ename="quantity" cname="产品数量" maxLength="1
6" displayType="0.0000" format="{0:N4
}"
data-regex="/^-?[0-9]{1,1
2}
$/" align="right"
data-regex="/^-?[0-9]{1,1
6}([.][0-9]{1,4})?
$/" align="right"
data-errorprompt="请输入数字,该值最大可设置1
2位整
数!" sumType="all"/>
data-errorprompt="请输入数字,该值最大可设置1
6位整数和4位小
数!" sumType="all"/>
<EF:EFColumn ename="price" cname="价格" maxLength="1
5
" displayType="0.00" format="{0:C2}"
<EF:EFColumn ename="price" cname="价格" maxLength="1
6
" displayType="0.00" format="{0:C2}"
data-regex="/^-?[0-9]{1,1
2}([.][0-9]{1,3
})?$/" align="right"
data-regex="/^-?[0-9]{1,1
6}([.][0-9]{1,2
})?$/" align="right"
data-errorprompt="请输入数字,该值最大可设置1
2位整数和3
位小数!" sumType="all"/>
data-errorprompt="请输入数字,该值最大可设置1
6位整数和2
位小数!" sumType="all"/>
<EF:EFColumn ename="quality" cname="质量" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFColumn ename="quality" cname="质量" width="120" enable="true" readonly="false" align="center" required="false"/>
<EF:EFComboColumn ename="surveyUser" cname="调查人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
<EF:EFComboColumn ename="surveyUser" cname="调查人员" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" defaultValue="${loginName}"
textField="textField" valueField="valueField" defaultValue="${loginName}"
...
...
src/main/webapp/XS/XS3201.jsp
View file @
a18e993c
...
@@ -176,25 +176,41 @@
...
@@ -176,25 +176,41 @@
<EF:EFInput type="hidden" cname="授权客体类型" ename="objectType" row="0"
<EF:EFInput type="hidden" cname="授权客体类型" ename="objectType" row="0"
blockId="inqu_status"
blockId="inqu_status"
name="inqu_status-0-objectType" value=""/>
name="inqu_status-0-objectType" value=""/>
<EF:EFInput cname="授权中文名" ename="objectName" row="0" blockId="inqu_status"/>
<EF:EFInput cname="授权中文名" ename="objectName" row="0" blockId="inqu_status"
<EF:EFInput cname="授权英文名" ename="objectEname" row="0" blockId="inqu_status"/>
colWidth="4"/>
<EF:EFInput cname="授权英文名" ename="objectEname" row="0" blockId="inqu_status"
colWidth="4"/>
<EF:EFSelect cname="资源类型" ename="resourceType" row="0" blockId="inqu_status"
colWidth="4">
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="页面" value="PAGE"/>
<EF:EFOption label="按钮" value="BUTTON"/>
</EF:EFSelect>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFGrid blockId="result3" autoDraw="no" autoBind="false"
<EF:EFRegion id="result3" title="结果集">
queryMethod="queryResourceAndGroupByUserGroup"
<EF:EFGrid blockId="result3" autoDraw="no" autoBind="false"
deleteMethod="deleteResourceAndGroupByUserGroup"
queryMethod="queryResourceAndGroupByUserGroup"
updateMethod="updateResourceAndGroupByUserGroup">
deleteMethod="deleteResourceAndGroupByUserGroup"
<EF:EFColumn ename="subjectId" cname="授权主体id" readonly="true" primaryKey="true"
updateMethod="updateResourceAndGroupByUserGroup">
hidden="true"/>
<EF:EFColumn ename="subjectId" cname="授权主体id" readonly="true" primaryKey="true"
<EF:EFColumn ename="objectId" cname="授权客体id" readonly="true" hidden="true"/>
hidden="true"/>
<EF:EFColumn ename="objectType" cname="授权客体类型" readonly="true" hidden="true"/>
<EF:EFColumn ename="objectId" cname="授权客体id" readonly="true" hidden="true"/>
<EF:EFColumn ename="objectName" cname="授权中文名" readonly="true"/>
<EF:EFColumn ename="objectType" cname="授权客体类型" readonly="true" hidden="true"/>
<EF:EFColumn ename="objectEname" cname="授权英文名" readonly="true"/>
<EF:EFColumn ename="objectEname" cname="授权英文名" enable="false"/>
<EF:EFComboColumn cname="操作类型" ename="operationType" sourceName="operationTypeList"
<EF:EFColumn ename="objectName" cname="授权中文名" enable="false"/>
textField="desc" readonly="false"
<EF:EFComboColumn ename="resourceType" cname="资源类型" enable="false" width="80"
valueField="name" style="text-align:center;" copy="true">
align="center">
</EF:EFComboColumn>
<EF:EFOption label="" value=""/>
</EF:EFGrid>
<EF:EFOption label="页面" value="PAGE"/>
<EF:EFOption label="按钮" value="BUTTON"/>
</EF:EFComboColumn>
<EF:EFComboColumn cname="操作类型" ename="operationType" sourceName="operationTypeList"
textField="desc" readonly="false"
valueField="name" style="text-align:center;" copy="true">
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</div>
</div>
</div>
</div>
<%--<div id="resourceGroup" title="已授权资源组" value="RESOURCE_GROUP">
<%--<div id="resourceGroup" title="已授权资源组" value="RESOURCE_GROUP">
...
...
src/main/webapp/common/js/common.js
View file @
a18e993c
...
@@ -279,7 +279,8 @@ function currShortDate() {
...
@@ -279,7 +279,8 @@ function currShortDate() {
const
year
=
date
.
getFullYear
();
const
year
=
date
.
getFullYear
();
const
month
=
date
.
getMonth
()
+
1
;
// 月份从0开始,需要加1
const
month
=
date
.
getMonth
()
+
1
;
// 月份从0开始,需要加1
const
day
=
date
.
getDate
();
const
day
=
date
.
getDate
();
return
year
+
(
month
<
10
?
'0'
+
month
:
month
.
toString
())
+
(
day
<
10
?
'0'
+
day
:
day
);
return
year
.
toString
()
+
(
month
<
10
?
'0'
+
month
:
month
.
toString
())
+
(
day
<
10
?
'0'
+
day
:
day
.
toString
());
}
}
/**
/**
...
@@ -291,7 +292,7 @@ function currShortMonth() {
...
@@ -291,7 +292,7 @@ function currShortMonth() {
const
date
=
new
Date
();
const
date
=
new
Date
();
const
year
=
date
.
getFullYear
();
const
year
=
date
.
getFullYear
();
const
month
=
date
.
getMonth
()
+
1
;
// 月份从0开始,需要加1
const
month
=
date
.
getMonth
()
+
1
;
// 月份从0开始,需要加1
return
year
+
(
month
<
10
?
'0'
+
month
:
month
);
return
year
.
toString
()
+
(
month
<
10
?
'0'
+
month
:
month
.
toString
()
);
}
}
/**
/**
...
...
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