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
016777c2
Commit
016777c2
authored
Mar 08, 2022
by
zhoumaotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合格率接口
parent
93bce632
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
106 additions
and
16 deletions
+106
-16
KmesBoardController.java
.../java/com/gavel/kwell/controller/KmesBoardController.java
+8
-1
GpfkcxDao.java
gavel/src/main/java/com/gavel/kwell/dao/GpfkcxDao.java
+2
-0
KmesBoardDao.java
gavel/src/main/java/com/gavel/kwell/dao/KmesBoardDao.java
+1
-1
GpfkcxDaoImpl.java
...src/main/java/com/gavel/kwell/dao/impl/GpfkcxDaoImpl.java
+17
-0
KmesBoardDaoImpl.java
.../main/java/com/gavel/kwell/dao/impl/KmesBoardDaoImpl.java
+1
-1
KmesBoardService.java
...c/main/java/com/gavel/kwell/service/KmesBoardService.java
+4
-1
KmesBoardServiceImpl.java
...va/com/gavel/kwell/service/impl/KmesBoardServiceImpl.java
+29
-9
DateCalculateUtil.java
...rc/main/java/com/gavel/kwell/utils/DateCalculateUtil.java
+3
-3
GpfkHgVO.java
gavel/src/main/java/com/gavel/kwell/vo/GpfkHgVO.java
+41
-0
No files found.
gavel/src/main/java/com/gavel/kwell/controller/KmesBoardController.java
View file @
016777c2
...
...
@@ -3,6 +3,7 @@ package com.gavel.kwell.controller;
import
com.alibaba.fastjson.JSONObject
;
import
com.gavel.common.base.controller.BaseController
;
import
com.gavel.kwell.service.KmesBoardService
;
import
com.gavel.kwell.vo.GpfkHgVO
;
import
com.gavel.kwell.vo.PsclVO
;
import
com.gavel.kwell.vo.SdclVO
;
import
com.gavel.kwell.vo.UWoVO
;
...
...
@@ -67,7 +68,7 @@ public class KmesBoardController extends BaseController {
@RequestMapping
(
value
=
"queryWeekPcsl"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
queryPcsl
(
@RequestBody
JSONObject
param
)
{
List
<
Pcjhmx
>
pcjhmxList
=
kmesBoardService
.
queryPcsl
();
List
<
Pcjhmx
>
pcjhmxList
=
kmesBoardService
.
query
Week
Pcsl
();
return
buildReturnData
(
pcjhmxList
);
}
...
...
@@ -94,6 +95,12 @@ public class KmesBoardController extends BaseController {
/**
*合格率
*/
@RequestMapping
(
value
=
"queryGpfkHgl"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
queryGpfkHgl
(
@RequestBody
JSONObject
param
)
{
List
<
GpfkHgVO
>
gpfkHgVOS
=
kmesBoardService
.
queryGpfkHgl
();
return
buildReturnData
(
gpfkHgVOS
);
}
/**
...
...
gavel/src/main/java/com/gavel/kwell/dao/GpfkcxDao.java
View file @
016777c2
...
...
@@ -20,4 +20,6 @@ public interface GpfkcxDao extends BaseDao {
public
List
<
BzgxVO
>
listBzgxName
();
public
List
<
Gpfk
>
queryByBetween
(
Date
start
,
Date
end
);
public
List
<
Gpfk
>
queryGpfk
(
Date
date
);
}
gavel/src/main/java/com/gavel/kwell/dao/KmesBoardDao.java
View file @
016777c2
...
...
@@ -14,7 +14,7 @@ import java.util.List;
public
interface
KmesBoardDao
extends
BaseDao
{
public
List
<
Pcjhmx
>
queryPcsl
();
public
List
<
Pcjhmx
>
query
Week
Pcsl
();
public
PsclVO
queryTodayPcsl
();
...
...
gavel/src/main/java/com/gavel/kwell/dao/impl/GpfkcxDaoImpl.java
View file @
016777c2
...
...
@@ -2,6 +2,7 @@ package com.gavel.kwell.dao.impl;
import
com.gavel.bom.utils.GxlxGxbzEnum
;
import
com.gavel.common.base.dao.impl.BaseDaoImpl
;
import
com.gavel.common.utils.DateUtils
;
import
com.gavel.common.utils.StringUtils
;
import
com.gavel.gygl.vo.BzgxVO
;
import
com.gavel.kwell.dao.GpfkcxDao
;
...
...
@@ -127,5 +128,21 @@ public class GpfkcxDaoImpl extends BaseDaoImpl implements GpfkcxDao {
sqlMap
.
setParamValue
(
"pGxbz"
,
GxlxGxbzEnum
.
LAST
.
getId
());
return
sqlMap
.
query
(
Gpfk
.
class
);
}
@Override
public
List
<
Gpfk
>
queryGpfk
(
Date
date
)
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select GPFK_ID, GPFK_WOSNID, GPFK_FKLX, GPFK_FKGX, "
);
sqlMap
.
append
(
" GPFK_FKSJ,GPFK_FKR,GPFK_FKRID, GPFK_FKBX, GPFK_FKJSSJ,"
);
sqlMap
.
append
(
" GPFK_HGBZ,GPFK_FKSL,GPFK_HGSL,GPFK_BHGSL,GPFK_GFSL,GPFK_WOGYLX, "
);
sqlMap
.
append
(
" GPFK_LFSL,WOGYLX_GXBZ "
);
sqlMap
.
append
(
"from GPFK "
);
sqlMap
.
append
(
" left join WOGYLX on WOGYLX_ID = GPFK_WOGYLX "
);
sqlMap
.
append
(
"where (GPFK_FKSJ >= :pStart and GPFK_FKSJ < :pEnd) and WOGYLX_GXBZ = :pGxbz "
);
//[a,b)
sqlMap
.
setParamValue
(
"ksrq"
,
DateUtils
.
beginOfDay
(
date
));
sqlMap
.
setParamValue
(
"jsrq"
,
DateUtils
.
endOfDay
(
date
));
sqlMap
.
setParamValue
(
"pGxbz"
,
GxlxGxbzEnum
.
FIRST
.
getId
());
return
sqlMap
.
query
(
Gpfk
.
class
);
}
}
gavel/src/main/java/com/gavel/kwell/dao/impl/KmesBoardDaoImpl.java
View file @
016777c2
...
...
@@ -18,7 +18,7 @@ public class KmesBoardDaoImpl extends BaseDaoImpl implements KmesBoardDao {
@Override
public
List
<
Pcjhmx
>
queryPcsl
()
{
public
List
<
Pcjhmx
>
query
Week
Pcsl
()
{
SqlMap
sqlMap
=
new
SqlMap
();
sqlMap
.
append
(
"select PCJHMX_JHRQ,sum(PCJHMX_JHSL) as PCJHMX_JHSL,sum(PCJHMX_WGSL) as PCJHMX_WGSL "
);
sqlMap
.
append
(
"from PCJHMX "
);
...
...
gavel/src/main/java/com/gavel/kwell/service/KmesBoardService.java
View file @
016777c2
package
com
.
gavel
.
kwell
.
service
;
import
com.gavel.common.base.service.BaseEditService
;
import
com.gavel.kwell.vo.GpfkHgVO
;
import
com.gavel.kwell.vo.PsclVO
;
import
com.gavel.kwell.vo.SdclVO
;
import
com.gavel.kwell.vo.UWoVO
;
...
...
@@ -13,7 +14,7 @@ public interface KmesBoardService extends BaseEditService {
public
SdclVO
querySdcl
();
public
List
<
Pcjhmx
>
queryPcsl
();
public
List
<
Pcjhmx
>
query
Week
Pcsl
();
public
PsclVO
queryTodayPcsl
();
...
...
@@ -22,4 +23,6 @@ public interface KmesBoardService extends BaseEditService {
public
List
<
UWoVO
>
queryWo
();
public
UWoVO
queryWorkingWO
();
public
List
<
GpfkHgVO
>
queryGpfkHgl
();
}
gavel/src/main/java/com/gavel/kwell/service/impl/KmesBoardServiceImpl.java
View file @
016777c2
package
com
.
gavel
.
kwell
.
service
.
impl
;
import
com.gavel.common.base.entity.BaseEntity
;
import
com.gavel.common.base.service.impl.BaseEditServiceImpl
;
import
com.gavel.common.utils.DateUtils
;
import
com.gavel.common.utils.NumberUtils
;
import
com.gavel.kwell.dao.GpfkcxDao
;
import
com.gavel.kwell.dao.KmesBoardDao
;
import
com.gavel.kwell.dao.WlsnDao
;
import
com.gavel.kwell.persistent.Gpfk
;
import
com.gavel.kwell.persistent.Wlsn
;
import
com.gavel.kwell.service.KmesBoardService
;
import
com.gavel.kwell.service.WlsnService
;
import
com.gavel.kwell.utils.DateCalculateUtil
;
import
com.gavel.kwell.utils.WlsnLxEnum
;
import
com.gavel.kwell.vo.*
;
import
com.gavel.persistence.sql.RecordSet
;
import
com.gavel.kwell.vo.GpfkHgVO
;
import
com.gavel.kwell.vo.PsclVO
;
import
com.gavel.kwell.vo.SdclVO
;
import
com.gavel.kwell.vo.UWoVO
;
import
com.gavel.wo.persistent.Pcjhmx
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.xml.crypto.Data
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -73,8 +72,8 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
}
@Override
public
List
<
Pcjhmx
>
queryPcsl
()
{
return
kmesBoardDao
.
queryPcsl
();
public
List
<
Pcjhmx
>
query
Week
Pcsl
()
{
return
kmesBoardDao
.
query
Week
Pcsl
();
}
@Override
...
...
@@ -97,4 +96,25 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
public
UWoVO
queryWorkingWO
()
{
return
kmesBoardDao
.
queryWorkingWO
();
}
@Override
public
List
<
GpfkHgVO
>
queryGpfkHgl
()
{
//首到工序的工票反馈最近7天合格率
Date
beginDate
=
DateUtils
.
calcDate
(
DateUtils
.
getDate
(),
0
,
0
,-
7
,
0
,
0
,
0
);
Date
endDate
=
DateUtils
.
calcDate
(
DateUtils
.
getDate
(),
0
,
0
,-
1
,
0
,
0
,
0
);
List
<
Date
>
dateList
=
DateCalculateUtil
.
findDates
(
"D"
,
beginDate
,
endDate
);
List
<
GpfkHgVO
>
gpfkHgVOList
=
new
ArrayList
<>();
for
(
Date
date
:
dateList
){
GpfkHgVO
gpfkHgVO
=
new
GpfkHgVO
();
List
<
Gpfk
>
gpfks
=
gpfkcxDao
.
queryGpfk
(
date
);
Double
fksl
=
gpfks
.
stream
().
mapToDouble
(
Gpfk:
:
getFksl
).
sum
();
Double
hgsl
=
gpfks
.
stream
().
mapToDouble
(
Gpfk:
:
getHgsl
).
sum
();
gpfkHgVO
.
setFkrq
(
date
);
gpfkHgVO
.
setFksl
(
fksl
);
gpfkHgVO
.
setHgsl
(
hgsl
);
gpfkHgVOList
.
add
(
gpfkHgVO
);
}
return
gpfkHgVOList
;
}
}
gavel/src/main/java/com/gavel/kwell/utils/DateCalculateUtil.java
View file @
016777c2
...
...
@@ -45,9 +45,9 @@ public class DateCalculateUtil {
public
static
void
main
(
String
[]
args
)
{
Date
start
=
DateUtils
.
parseDate
(
"2021-05-2
9 08:3
0:00"
);
Date
end
=
DateUtils
.
parseDate
(
"2021-05-
29 21
:00:00"
);
List
<
Date
>
list
=
findDates
(
"
H
"
,
start
,
end
);
Date
start
=
DateUtils
.
parseDate
(
"2021-05-2
4 00:0
0:00"
);
Date
end
=
DateUtils
.
parseDate
(
"2021-05-
30 00
:00:00"
);
List
<
Date
>
list
=
findDates
(
"
D
"
,
start
,
end
);
for
(
Date
date
:
list
){
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
System
.
out
.
println
(
sdf
.
format
(
date
));
...
...
gavel/src/main/java/com/gavel/kwell/vo/GpfkHgVO.java
0 → 100644
View file @
016777c2
package
com
.
gavel
.
kwell
.
vo
;
import
com.gavel.common.base.entity.BaseEntity
;
import
java.util.Date
;
public
class
GpfkHgVO
extends
BaseEntity
{
private
Date
fkrq
;
private
Double
fksl
;
//反馈数量
private
Double
hgsl
;
//合格数量
public
Date
getFkrq
()
{
return
fkrq
;
}
public
void
setFkrq
(
Date
fkrq
)
{
this
.
fkrq
=
fkrq
;
}
public
Double
getFksl
()
{
return
fksl
;
}
public
void
setFksl
(
Double
fksl
)
{
this
.
fksl
=
fksl
;
}
public
Double
getHgsl
()
{
return
hgsl
;
}
public
void
setHgsl
(
Double
hgsl
)
{
this
.
hgsl
=
hgsl
;
}
}
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