Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwell-mes
Project
Project
Details
Activity
Releases
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
gavelinfo
kwell-mes
Commits
dacf27e4
Commit
dacf27e4
authored
Mar 28, 2022
by
zhoumaotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
4435478c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
23 deletions
+91
-23
GpfkcxDao.java
gavel/src/main/java/com/gavel/kwell/dao/GpfkcxDao.java
+4
-0
KmesBoardDao.java
gavel/src/main/java/com/gavel/kwell/dao/KmesBoardDao.java
+3
-3
GpfkcxDaoImpl.java
...src/main/java/com/gavel/kwell/dao/impl/GpfkcxDaoImpl.java
+34
-0
KmesBoardDaoImpl.java
.../main/java/com/gavel/kwell/dao/impl/KmesBoardDaoImpl.java
+24
-17
KmesBoardServiceImpl.java
...va/com/gavel/kwell/service/impl/KmesBoardServiceImpl.java
+26
-3
No files found.
gavel/src/main/java/com/gavel/kwell/dao/GpfkcxDao.java
View file @
dacf27e4
...
@@ -22,4 +22,8 @@ public interface GpfkcxDao extends BaseDao {
...
@@ -22,4 +22,8 @@ public interface GpfkcxDao extends BaseDao {
public
List
<
Gpfk
>
queryByBetween
(
Date
start
,
Date
end
);
public
List
<
Gpfk
>
queryByBetween
(
Date
start
,
Date
end
);
public
List
<
Gpfk
>
queryGpfk
(
Date
date
,
String
[]
gxbzs
);
public
List
<
Gpfk
>
queryGpfk
(
Date
date
,
String
[]
gxbzs
);
public
Gpfk
queryWeekGpfk
(
Date
date
,
String
woid
);
public
Gpfk
queryMonthGpfk
(
Date
date
);
}
}
gavel/src/main/java/com/gavel/kwell/dao/KmesBoardDao.java
View file @
dacf27e4
...
@@ -13,11 +13,11 @@ public interface KmesBoardDao extends BaseDao {
...
@@ -13,11 +13,11 @@ public interface KmesBoardDao extends BaseDao {
public
Pcjhmx
queryWeekPcsl
(
Date
date
);
public
Pcjhmx
queryWeekPcsl
(
Date
date
);
public
PcslVO
queryTodayPcsl
();
public
PcslVO
queryTodayPcsl
(
Date
date
);
public
PcslVO
queryMonthPcsl
();
public
PcslVO
queryMonthPcsl
(
Date
date
);
public
List
<
UWoVO
>
queryWo
();
public
List
<
UWoVO
>
queryWo
(
Date
date
);
public
UWoVO
queryWorkingWO
();
public
UWoVO
queryWorkingWO
();
...
...
gavel/src/main/java/com/gavel/kwell/dao/impl/GpfkcxDaoImpl.java
View file @
dacf27e4
...
@@ -147,5 +147,39 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
...
@@ -147,5 +147,39 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap
.
setParamValue
(
"pJsrq"
,
DateUtils
.
endOfDay
(
date
));
sqlMap
.
setParamValue
(
"pJsrq"
,
DateUtils
.
endOfDay
(
date
));
return
sqlMap
.
query
(
Gpfk
.
class
);
return
sqlMap
.
query
(
Gpfk
.
class
);
}
}
@Override
public
Gpfk
queryWeekGpfk
(
Date
date
,
String
woid
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select sum(GPFK_FKSL) as GPFK_FKSL "
);
sqlMap
.
append
(
"from GPFK "
);
sqlMap
.
append
(
" left join WOGYLX on WOGYLX_ID = GPFK_FKGX "
);
sqlMap
.
append
(
" left join BZGX on BZGX_ID = WOGYLX_BZGXID "
);
sqlMap
.
append
(
"where (GPFK_FKSJ >= :pStart and GPFK_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) "
);
sqlMap
.
setParamValue
(
"pStart"
,
DateUtils
.
beginOfDay
(
DateUtils
.
getCurrentWeekDateBegin
(
date
)));
sqlMap
.
setParamValue
(
"pEnd"
,
DateUtils
.
endOfDay
(
DateUtils
.
getCurrentQuarterDateEnd
(
date
)));
sqlMap
.
setParamValue
(
"pDGxbz"
,
GxlxGxbzEnum
.
ONLY
.
getId
());
sqlMap
.
setParamValue
(
"pMGxbz"
,
GxlxGxbzEnum
.
LAST
.
getId
());
if
(
StringUtils
.
isNotEmpty
(
woid
)){
sqlMap
.
append
(
" and WOGYLX_WOID = :pWoid "
);
sqlMap
.
setParamValue
(
"pWoid"
,
woid
);
}
return
sqlMap
.
queryEntity
(
Gpfk
.
class
);
}
@Override
public
Gpfk
queryMonthGpfk
(
Date
date
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select sum(GPFK_FKSL) as GPFK_FKSL "
);
sqlMap
.
append
(
"from GPFK "
);
sqlMap
.
append
(
" left join WOGYLX on WOGYLX_ID = GPFK_FKGX "
);
sqlMap
.
append
(
" left join BZGX on BZGX_ID = WOGYLX_BZGXID "
);
sqlMap
.
append
(
"where (GPFK_FKSJ >= :pStart and GPFK_FKSJ < :pEnd) and (WOGYLX_GXBZ = :pDGxbz or WOGYLX_GXBZ = :pMGxbz) "
);
sqlMap
.
setParamValue
(
"pStart"
,
DateUtils
.
beginOfMonth
(
date
));
sqlMap
.
setParamValue
(
"pEnd"
,
DateUtils
.
endOfMonth
(
date
));
sqlMap
.
setParamValue
(
"pDGxbz"
,
GxlxGxbzEnum
.
ONLY
.
getId
());
sqlMap
.
setParamValue
(
"pMGxbz"
,
GxlxGxbzEnum
.
LAST
.
getId
());
return
sqlMap
.
queryEntity
(
Gpfk
.
class
);
}
}
}
gavel/src/main/java/com/gavel/kwell/dao/impl/KmesBoardDaoImpl.java
View file @
dacf27e4
...
@@ -30,39 +30,46 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
...
@@ -30,39 +30,46 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
}
}
@Override
@Override
public
PcslVO
queryTodayPcsl
()
{
public
PcslVO
queryTodayPcsl
(
Date
date
)
{
SqlMap
sqlMap
=
new
SqlMap
();
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select sum(PCJHMX_JHSL) as JHSL
,sum(PCJHMX_WGSL) as WGSL
"
);
sqlMap
.
append
(
"select sum(PCJHMX_JHSL) as JHSL "
);
sqlMap
.
append
(
"from PCJHMX "
);
sqlMap
.
append
(
"from PCJHMX "
);
sqlMap
.
append
(
"where 1=1 and ( :ksrq <= PCJHMX_JHRQ and PCJHMX_JHRQ <= :jsrq ) "
);
sqlMap
.
append
(
"where 1=1 and ( :pKsrq <= PCJHMX_JHRQ and U_PCJHMX_JSRQ <= :pJsrq ) "
);
sqlMap
.
setParamValue
(
"ksrq"
,
DateUtils
.
beginOfDay
(
DateUtils
.
getDateTime
()));
sqlMap
.
append
(
" or ( :pKsrq < PCJHMX_JHRQ and PCJHMX_JHRQ < :pJsrq ) "
);
sqlMap
.
setParamValue
(
"jsrq"
,
DateUtils
.
endOfDay
(
DateUtils
.
getDateTime
()));
sqlMap
.
append
(
" or ( :pKsrq < U_PCJHMX_JSRQ and U_PCJHMX_JSRQ < :pJsrq ) "
);
sqlMap
.
setParamValue
(
"pKsrq"
,
DateUtils
.
beginOfDay
(
DateUtils
.
getCurrentWeekDateBegin
(
date
)));
sqlMap
.
setParamValue
(
"pJsrq"
,
DateUtils
.
endOfDay
(
DateUtils
.
getCurrentQuarterDateEnd
(
date
)));
return
sqlMap
.
queryEntity
(
PcslVO
.
class
);
return
sqlMap
.
queryEntity
(
PcslVO
.
class
);
}
}
@Override
@Override
public
PcslVO
queryMonthPcsl
()
{
public
PcslVO
queryMonthPcsl
(
Date
date
)
{
SqlMap
sqlMap
=
new
SqlMap
();
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select sum(PCJHMX_JHSL) as JHSL
,sum(PCJHMX_WGSL) as WGSL
"
);
sqlMap
.
append
(
"select sum(PCJHMX_JHSL) as JHSL "
);
sqlMap
.
append
(
"from PCJHMX "
);
sqlMap
.
append
(
"from PCJHMX "
);
sqlMap
.
append
(
"where 1=1 and ( :ksrq <= PCJHMX_JHRQ and PCJHMX_JHRQ <= :jsrq ) "
);
sqlMap
.
append
(
"where 1=1 and ( :pKsrq <= PCJHMX_JHRQ and U_PCJHMX_JSRQ <= :pJsrq ) "
);
sqlMap
.
setParamValue
(
"ksrq"
,
DateUtils
.
beginOfMonth
(
DateUtils
.
getDateTime
()));
sqlMap
.
append
(
" or ( :pKsrq < PCJHMX_JHRQ and PCJHMX_JHRQ < :pJsrq ) "
);
sqlMap
.
setParamValue
(
"jsrq"
,
DateUtils
.
endOfMonth
(
DateUtils
.
getDateTime
()));
sqlMap
.
append
(
" or ( :pKsrq < U_PCJHMX_JSRQ and U_PCJHMX_JSRQ < :pJsrq ) "
);
sqlMap
.
setParamValue
(
"pKsrq"
,
DateUtils
.
beginOfMonth
(
DateUtils
.
getCurrentQuarterDateBegin
(
date
)));
sqlMap
.
setParamValue
(
"pJsrq"
,
DateUtils
.
endOfMonth
(
DateUtils
.
getCurrentQuarterDateEnd
(
date
)));
return
sqlMap
.
queryEntity
(
PcslVO
.
class
);
return
sqlMap
.
queryEntity
(
PcslVO
.
class
);
}
}
@Override
@Override
public
List
<
UWoVO
>
queryWo
(
)
{
public
List
<
UWoVO
>
queryWo
(
Date
date
)
{
SqlMap
sqlMap
=
new
SqlMap
();
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select
PCJHMX_WOID as WO_ID,PCJHMX_JHSL as WO_PCSL,WO_DJID
, "
);
sqlMap
.
append
(
"select
PCJHMX_WOID as WO_ID,WO_DJID, WO_WLID,WLXX_CODE,WLXX_NAME,WLXX_GG,WO_YWRQ
, "
);
sqlMap
.
append
(
"
PCJHMX_WGSL as WO_WGSL,WO_WLID,WLXX_CODE,WLXX_NAME,WLXX_GG,WO_YWRQ
"
);
sqlMap
.
append
(
"
sum(PCJHMX_JHSL) as WO_PCSL,0 as WO_WGSL
"
);
sqlMap
.
append
(
"from PCJHMX "
);
sqlMap
.
append
(
"from PCJHMX "
);
sqlMap
.
append
(
" left join WO on WO_ID = PCJHMX_WOID "
);
sqlMap
.
append
(
" left join WO on WO_ID = PCJHMX_WOID "
);
sqlMap
.
append
(
" left join WLXX on WLXX_ID = PCJHMX_WLID "
);
sqlMap
.
append
(
" left join WLXX on WLXX_ID = PCJHMX_WLID "
);
sqlMap
.
append
(
"where 1=1 and ( :ksrq <= PCJHMX_JHRQ and PCJHMX_JHRQ <= :jsrq ) "
);
sqlMap
.
append
(
"where 1=1 and ( :pKsrq <= PCJHMX_JHRQ and U_PCJHMX_JSRQ <= :pJsrq ) "
);
sqlMap
.
setParamValue
(
"ksrq"
,
DateUtils
.
beginOfDay
(
DateUtils
.
getDateTime
()));
sqlMap
.
append
(
" or ( :pKsrq < PCJHMX_JHRQ and PCJHMX_JHRQ < :pJsrq ) "
);
sqlMap
.
setParamValue
(
"jsrq"
,
DateUtils
.
endOfDay
(
DateUtils
.
getDateTime
()));
sqlMap
.
append
(
" or ( :pKsrq < U_PCJHMX_JSRQ and U_PCJHMX_JSRQ < :pJsrq ) "
);
sqlMap
.
append
(
"order by PCJHMX_JHRQ desc "
);
sqlMap
.
setParamValue
(
"pKsrq"
,
DateUtils
.
beginOfDay
(
DateUtils
.
getCurrentWeekDateBegin
(
date
)));
sqlMap
.
setParamValue
(
"pJsrq"
,
DateUtils
.
endOfDay
(
DateUtils
.
getCurrentWeekDateBegin
(
date
)));
sqlMap
.
append
(
"group by PCJHMX_WOID,WO_DJID,WO_WLID,WLXX_CODE,WLXX_NAME,WLXX_GG,WO_YWRQ "
);
sqlMap
.
append
(
"order by WLXX_CODE "
);
return
sqlMap
.
query
(
UWoVO
.
class
);
return
sqlMap
.
query
(
UWoVO
.
class
);
}
}
...
...
gavel/src/main/java/com/gavel/kwell/service/impl/KmesBoardServiceImpl.java
View file @
dacf27e4
...
@@ -101,18 +101,41 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
...
@@ -101,18 +101,41 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
@Override
@Override
public
PcslVO
queryTodayPcsl
()
{
public
PcslVO
queryTodayPcsl
()
{
return
kmesBoardDao
.
queryTodayPcsl
();
PcslVO
pcslVO
=
kmesBoardDao
.
queryTodayPcsl
(
new
Date
());
if
(
pcslVO
!=
null
){
Gpfk
gpfk
=
gpfkcxDao
.
queryWeekGpfk
(
new
Date
(),
""
);
pcslVO
.
setWgsl
(
gpfk
.
getFgsl
()==
null
?
0.0
:
gpfk
.
getFgsl
());
}
else
{
pcslVO
=
new
PcslVO
();
pcslVO
.
setJhsl
(
0.0
);
pcslVO
.
setWgsl
(
0.0
);
}
return
pcslVO
;
}
}
@Override
@Override
public
PcslVO
queryMonthPcsl
()
{
public
PcslVO
queryMonthPcsl
()
{
return
kmesBoardDao
.
queryMonthPcsl
();
PcslVO
pcslVO
=
kmesBoardDao
.
queryMonthPcsl
(
new
Date
());
if
(
pcslVO
!=
null
){
Gpfk
gpfk
=
gpfkcxDao
.
queryMonthGpfk
(
new
Date
());
pcslVO
.
setWgsl
(
gpfk
.
getFgsl
()==
null
?
0.0
:
gpfk
.
getFgsl
());
}
else
{
pcslVO
=
new
PcslVO
();
pcslVO
.
setJhsl
(
0.0
);
pcslVO
.
setWgsl
(
0.0
);
}
return
pcslVO
;
}
}
@Override
@Override
public
List
<
UWoVO
>
queryWo
()
{
public
List
<
UWoVO
>
queryWo
()
{
return
kmesBoardDao
.
queryWo
();
List
<
UWoVO
>
uWoVOList
=
kmesBoardDao
.
queryWo
(
new
Date
());
for
(
UWoVO
uWoVO
:
uWoVOList
){
Gpfk
gpfk
=
gpfkcxDao
.
queryWeekGpfk
(
new
Date
(),
uWoVO
.
getId
());
uWoVO
.
setWgsl
(
gpfk
.
getFgsl
()==
null
?
0.0
:
gpfk
.
getFgsl
());
}
return
uWoVOList
;
}
}
@Override
@Override
...
...
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