Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
Project
Project
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
竹天卫
tianjin-cement
Commits
f040d952
Commit
f040d952
authored
Oct 09, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/zhutianwei/tianjin-cement
parents
1cbace48
6bcf3739
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
162 additions
and
59 deletions
+162
-59
NonStandardApplyController.java
...ement/business/controller/NonStandardApplyController.java
+16
-3
NonStandardApprovalController.java
...nt/business/controller/NonStandardApprovalController.java
+6
-3
NonStandardApplyMapper.java
...ise/sc/cement/business/mapper/NonStandardApplyMapper.java
+4
-1
NonStandardApprovalMapper.java
.../sc/cement/business/mapper/NonStandardApprovalMapper.java
+6
-1
NonStandardApplyMapper.xml
.../sc/cement/business/mapper/xml/NonStandardApplyMapper.xml
+13
-19
NonStandardApprovalMapper.xml
.../cement/business/mapper/xml/NonStandardApprovalMapper.xml
+13
-17
PageQuery.java
...main/java/cn/wise/sc/cement/business/model/PageQuery.java
+1
-1
NonStandardApplyQuery.java
...sc/cement/business/model/query/NonStandardApplyQuery.java
+6
-0
NonStandardApprovalVo.java
...se/sc/cement/business/model/vo/NonStandardApprovalVo.java
+1
-1
INonStandardApplyService.java
.../sc/cement/business/service/INonStandardApplyService.java
+19
-1
INonStandardApprovalService.java
.../cement/business/service/INonStandardApprovalService.java
+9
-1
NonStandardApplyServiceImpl.java
...nt/business/service/impl/NonStandardApplyServiceImpl.java
+43
-2
NonStandardApprovalServiceImpl.java
...business/service/impl/NonStandardApprovalServiceImpl.java
+11
-2
NonStandardValueServiceImpl.java
...nt/business/service/impl/NonStandardValueServiceImpl.java
+1
-0
NormProductionServiceImpl.java
...ment/business/service/impl/NormProductionServiceImpl.java
+5
-2
PageUtil.java
...c/main/java/cn/wise/sc/cement/business/util/PageUtil.java
+8
-5
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardApplyController.java
View file @
f040d952
...
...
@@ -4,6 +4,7 @@ import cn.wise.sc.cement.business.entity.NonStandardApply;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApplyQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
cn.wise.sc.cement.business.service.INonStandardApplyService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* <p>
...
...
@@ -42,17 +44,17 @@ public class NonStandardApplyController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"根据
非标产值id查询指定
信息"
)
@ApiOperation
(
value
=
"根据
id查询指定非标产值申请
信息"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
NonStandardApply
e
=
iNonStandardApplyService
.
getById
(
id
);
BaseResponse
<
List
<
NonStandardApplyVo
>>
e
=
iNonStandardApplyService
.
getById
(
id
);
if
(
e
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
return
BaseResponse
.
okData
(
e
);
}
catch
(
Exception
e
){
log
.
debug
(
"
非标产值详情
{}"
,
e
);
log
.
debug
(
"
通过id查询非标产值申请信息
{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
...
...
@@ -90,6 +92,17 @@ public class NonStandardApplyController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"提交操作按钮实现"
)
@PostMapping
(
"/status"
)
public
BaseResponse
status
(
Integer
status
,
Integer
id
){
try
{
return
iNonStandardApplyService
.
status
(
status
,
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"提交操作实现{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除非标产值申请"
)
@PostMapping
(
"/delete/{id}"
)
public
BaseResponse
delete
(
@PathVariable
Integer
id
){
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardApprovalController.java
View file @
f040d952
...
...
@@ -4,6 +4,8 @@ import cn.wise.sc.cement.business.entity.NonStandardApproval;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApprovalQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo
;
import
cn.wise.sc.cement.business.service.INonStandardApprovalService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -13,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* <p>
...
...
@@ -42,17 +45,17 @@ public class NonStandardApprovalController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"根据
非标产值审批ID查找指定
信息"
)
@ApiOperation
(
value
=
"根据
id查询指定非标产值审批
信息"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
NonStandardApproval
e
=
iNonStandardApprovalService
.
getById
(
id
);
BaseResponse
<
List
<
NonStandardApprovalVo
>>
e
=
iNonStandardApprovalService
.
getById
(
id
);
if
(
e
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
return
BaseResponse
.
okData
(
e
);
}
catch
(
Exception
e
){
log
.
debug
(
"
根据非标产值审批ID查找指定
信息{}"
,
e
);
log
.
debug
(
"
通过id查询非标产值审批
信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/NonStandardApplyMapper.java
View file @
f040d952
...
...
@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.mapper;
import
cn.wise.sc.cement.business.entity.NonStandardApply
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -21,7 +22,9 @@ import java.util.Map;
public
interface
NonStandardApplyMapper
extends
BaseMapper
<
NonStandardApply
>
{
IPage
<
NonStandardApplyVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
NonStandardApplyVo
getById
(
Integer
id
);
List
<
NonStandardApplyVo
>
getById
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
NonStandardApplyVo
>
getList
(
QueryWrapper
<
NonStandardApply
>
qw
);
List
<
Map
<
String
,
Object
>>
exportList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/NonStandardApprovalMapper.java
View file @
f040d952
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.NonStandardApply
;
import
cn.wise.sc.cement.business.entity.NonStandardApproval
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -21,7 +24,9 @@ import java.util.Map;
public
interface
NonStandardApprovalMapper
extends
BaseMapper
<
NonStandardApproval
>
{
IPage
<
NonStandardApprovalVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
NonStandardApprovalVo
getById
(
Integer
id
);
List
<
NonStandardApprovalVo
>
getById
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
NonStandardApprovalVo
>
getList
(
QueryWrapper
<
NonStandardApproval
>
qw
);
List
<
Map
<
String
,
Object
>>
exportList
(
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardApplyMapper.xml
View file @
f040d952
...
...
@@ -10,37 +10,31 @@
<if
test=
"params.userId != null "
>
and na.user_id = #{params.userId}
</if>
<if
test=
"params.id != null "
>
and na.id = #{params.id}
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApplyVo"
>
SELECT na.*,su.name AS
NAME
,su.username AS account
SELECT na.*,su.name AS
name
,su.username AS account
FROM nonstandard_apply na
LEFT JOIN sys_user su ON su.id = na.user_id
<include
refid=
"where"
/>
order by na.id asc
</select>
<select
id=
"getList"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApplyVo"
>
select na.*,su.name as name,su.username as account
from nonstandard_apply na
LEFT JOIN sys_user su ON su.id = na.user_id
order by na.id asc
</select>
<select
id=
"getById"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApplyVo"
>
SELECT
na.id as 序号,
na.name as 姓名,
na.account as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工时,
(
CASE na.status
WHEN 0 THEN '未提交'
WHEN 1 THEN '待审批'
WHEN 2 THEN '已通过'
WHEN 3 THEN '未通过'
ELSE NULL
END
)as 状态,
na.start_time as 开始时间,
na.work_type as 工作类别,
na.work_description as 工作描述
SELECT na.*,su.name AS NAME,su.username AS account
FROM nonstandard_apply na
LEFT JOIN sys_user su ON na.user_id = su.id
<include
refid=
"where"
/>
ORDER BY na.id ASC
</select>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardApprovalMapper.xml
View file @
f040d952
...
...
@@ -13,6 +13,9 @@
<if
test=
"params.userId != null "
>
and na.user_id = #{params.userId}
</if>
<if
test=
"params.id != null "
>
and na.id = #{params.id}
</if>
</where>
</sql>
...
...
@@ -24,24 +27,17 @@
order by na.id asc
</select>
<select
id=
"getList"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo"
>
select na.*,su.name as name,su.username as account
from nonstandard_apply na
LEFT JOIN sys_user su ON su.id = na.user_id
order by na.id asc
</select>
<select
id=
"getById"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo"
>
SELECT
na.id as 序号,
na.name as 姓名,
na.account as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工时,
(
CASE na.status
WHEN 0 THEN '未提交'
WHEN 1 THEN '待审批'
WHEN 3 THEN '未通过'
ELSE '已通过'
END
)as 状态,
na.final_value as 最终产值,
na.appraisal_value as 考核公值
FROM nonstandard_apply na
SELECT na.*,su.name AS NAME,su.username AS account
FROM nonstandard_apply na
LEFT JOIN sys_user su ON na.user_id = su.id
<include
refid=
"where"
/>
ORDER BY na.id ASC
</select>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/PageQuery.java
View file @
f040d952
...
...
@@ -21,7 +21,7 @@ public class PageQuery implements Serializable {
private
static
final
long
serialVersionUID
=
3979320797076183357L
;
@ApiModelProperty
(
value
=
"当前所在页码"
)
@NonNull
private
Integer
pageNo
=
0
;
private
Integer
pageNo
=
1
;
@ApiModelProperty
(
value
=
"每页显示数量"
)
@NonNull
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardApplyQuery.java
View file @
f040d952
...
...
@@ -35,4 +35,10 @@ public class NonStandardApplyQuery {
@ApiModelProperty
(
name
=
"userId"
,
value
=
"用户id"
)
private
Integer
userId
;
@ApiModelProperty
(
value
=
"按钮类型 1:提交"
)
private
Integer
menuId
;
@ApiModelProperty
(
value
=
"姓名"
)
private
String
name
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardApprovalVo.java
View file @
f040d952
...
...
@@ -10,7 +10,7 @@ import lombok.Data;
* @create: 2020-09-22
**/
@Data
@ApiModel
(
"非标产值
申请
Vo"
)
@ApiModel
(
"非标产值
审批
Vo"
)
public
class
NonStandardApprovalVo
{
private
Integer
id
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardApplyService.java
View file @
f040d952
...
...
@@ -7,6 +7,7 @@ import cn.wise.sc.cement.business.model.query.NonStandardApplyQuery;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.swagger.models.auth.In
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
...
...
@@ -33,7 +34,14 @@ public interface INonStandardApplyService extends IService<NonStandardApply> {
*
* @return List
*/
BaseResponse
<
List
<
NonStandardApply
>>
getList
();
BaseResponse
<
List
<
NonStandardApplyVo
>>
getList
();
/**
* 通过id查询非标产值申请信息
*
* @return List
*/
BaseResponse
<
List
<
NonStandardApplyVo
>>
getById
(
Integer
id
);
/**
* 提交申请
...
...
@@ -67,4 +75,14 @@ public interface INonStandardApplyService extends IService<NonStandardApply> {
* @param response
*/
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
);
/**
* 更改状态信息,达到改变显示的效果
* 1:提交
*
* @param status 状态
* @param id id
* @return Boolean
*/
BaseResponse
<
String
>
status
(
Integer
status
,
Integer
id
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardApprovalService.java
View file @
f040d952
...
...
@@ -4,6 +4,7 @@ import cn.wise.sc.cement.business.entity.NonStandardApproval;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApprovalQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
...
@@ -32,7 +33,14 @@ public interface INonStandardApprovalService extends IService<NonStandardApprova
*
* @return List
*/
BaseResponse
<
List
<
NonStandardApproval
>>
getList
();
BaseResponse
<
List
<
NonStandardApprovalVo
>>
getList
();
/**
* 通过id查询非标产值审批信息
*
* @return List
*/
BaseResponse
<
List
<
NonStandardApprovalVo
>>
getById
(
Integer
id
);
/**
* 审批通过或驳回请求实现
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApplyServiceImpl.java
View file @
f040d952
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.NonStandardApply
;
import
cn.wise.sc.cement.business.entity.NonStandardApproval
;
import
cn.wise.sc.cement.business.mapper.NonStandardApplyMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApplyQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
cn.wise.sc.cement.business.model.vo.NonStandardValueVo
;
import
cn.wise.sc.cement.business.service.INonStandardApplyService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -13,12 +15,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.swagger.models.auth.In
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.swing.text.ParagraphView
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -48,10 +52,18 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
}
@Override
public
BaseResponse
<
List
<
NonStandardApply
>>
getList
()
{
public
BaseResponse
<
List
<
NonStandardApply
Vo
>>
getList
()
{
QueryWrapper
<
NonStandardApply
>
qw
=
new
QueryWrapper
<>();
qw
.
ge
(
"status"
,
0
);
List
<
NonStandardApply
>
list
=
this
.
list
(
qw
);
List
<
NonStandardApplyVo
>
list
=
nonStandardApplyMapper
.
getList
(
qw
);
return
BaseResponse
.
okData
(
list
);
}
@Override
public
BaseResponse
<
List
<
NonStandardApplyVo
>>
getById
(
Integer
id
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
id
);
List
<
NonStandardApplyVo
>
list
=
nonStandardApplyMapper
.
getById
(
params
);
return
BaseResponse
.
okData
(
list
);
}
...
...
@@ -73,6 +85,14 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
NonStandardApply
nsa
=
new
NonStandardApply
();
BeanUtils
.
copyProperties
(
query
,
nsa
);
nsa
.
setId
(
query
.
getId
());
if
(
query
.
getMenuId
()
==
null
){
return
BaseResponse
.
errorMsg
(
"按钮参数不能为空"
);
}
if
(
query
.
getMenuId
()==
1
){
//通过
nsa
.
setStatus
(
1
);
}
else
{
return
BaseResponse
.
errorMsg
(
"按钮参数错误"
);
}
nonStandardApplyMapper
.
updateById
(
nsa
);
return
BaseResponse
.
okData
(
nsa
);
}
...
...
@@ -87,6 +107,27 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
return
BaseResponse
.
okData
(
"删除成功"
);
}
@Override
@Transactional
public
BaseResponse
<
String
>
status
(
Integer
status
,
Integer
id
)
{
if
(
status
==
null
||
id
==
null
){
return
BaseResponse
.
errorMsg
(
"参数错误!"
);
}
NonStandardApply
nonStandardApply
=
nonStandardApplyMapper
.
selectById
(
id
);
if
(
nonStandardApply
==
null
){
return
BaseResponse
.
errorMsg
(
"数据错误!"
);
}
nonStandardApply
.
setStatus
(
status
);
nonStandardApplyMapper
.
updateById
(
nonStandardApply
);
String
result
=
""
;
if
(
nonStandardApply
.
getStatus
()
==
1
){
result
=
"已提交"
;
}
else
{
result
=
"未提交"
;
}
return
BaseResponse
.
okData
(
result
);
}
@Override
public
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApprovalServiceImpl.java
View file @
f040d952
...
...
@@ -5,6 +5,7 @@ import cn.wise.sc.cement.business.mapper.NonStandardApprovalMapper;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApprovalQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo
;
import
cn.wise.sc.cement.business.service.INonStandardApprovalService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
...
...
@@ -47,10 +48,18 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
}
@Override
public
BaseResponse
<
List
<
NonStandardApproval
>>
getList
()
{
public
BaseResponse
<
List
<
NonStandardApproval
Vo
>>
getList
()
{
QueryWrapper
<
NonStandardApproval
>
qw
=
new
QueryWrapper
<>();
qw
.
gt
(
"status"
,
0
);
List
<
NonStandardApproval
>
list
=
this
.
list
(
qw
);
List
<
NonStandardApprovalVo
>
list
=
nonStandardApprovalMapper
.
getList
(
qw
);
return
BaseResponse
.
okData
(
list
);
}
@Override
public
BaseResponse
<
List
<
NonStandardApprovalVo
>>
getById
(
Integer
id
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
id
);
List
<
NonStandardApprovalVo
>
list
=
nonStandardApprovalMapper
.
getById
(
params
);
return
BaseResponse
.
okData
(
list
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardValueServiceImpl.java
View file @
f040d952
...
...
@@ -109,6 +109,7 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"start"
,
start
);
params
.
put
(
"end"
,
end
);
params
.
put
(
"status"
,
2
);
List
<
NonStandardValueVo
>
list
=
nonStandardValueMapper
.
getList
(
params
);
return
BaseResponse
.
okData
(
list
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NormProductionServiceImpl.java
View file @
f040d952
...
...
@@ -242,7 +242,9 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
normProductionDetails
(
null
,
start
,
end
);
if
(
normProductionDetails
.
size
()
==
0
)
{
return
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
BaseResponse
<
List
<
NormProductionStatistics
>>
rts
=
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
rts
.
setData
(
new
ArrayList
<>());
return
rts
;
}
Map
<
Integer
,
BigDecimal
>
coefficientMap
=
new
HashMap
<>(
normProductionDetails
.
size
());
...
...
@@ -411,8 +413,9 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
List
<
SysUser
>
users
=
iSysUserService
.
list
(
qw
);
List
<
SysPost
>
sysPosts
=
iSysPostService
.
list
();
Date
finalStartDate
=
startDate
;
Date
finalEndDate
=
endDate
;
rts
.
forEach
(
arg
->
{
arg
.
setTime
(
finalStartDate
==
null
?
"
"
:
finalStartDate
.
toString
()
+
" — "
+
end
.
toString
());
arg
.
setTime
(
finalStartDate
==
null
?
"
--"
+
finalEndDate
.
toString
()
:
finalStartDate
.
toString
()
+
"--"
+
finalEndDate
.
toString
());
if
(
StrUtil
.
isBlank
(
arg
.
getUserName
()))
{
//关联用户信息
users
.
stream
().
filter
(
opt
->
arg
.
getUserId
().
equals
(
opt
.
getId
()
+
""
)).
findFirst
()
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/PageUtil.java
View file @
f040d952
...
...
@@ -13,13 +13,16 @@ import java.util.List;
public
class
PageUtil
{
public
static
<
T
>
Page
<
T
>
listConvertToPage
(
List
<
T
>
list
,
PageQuery
pageQuery
)
{
int
start
=
pageQuery
.
getPageNo
();
int
end
=
Math
.
min
((
start
+
pageQuery
.
getPageSize
()),
list
.
size
());
Page
<
T
>
page
=
new
Page
<>(
start
,
pageQuery
.
getPageSize
(),
list
.
size
());
if
(
start
*
page
.
getSize
()
>
list
.
size
())
{
int
start
=
pageQuery
.
getPageNo
()
>
0
?
pageQuery
.
getPageNo
()
:
1
;
int
pageSize
=
pageQuery
.
getPageSize
()
>
0
?
pageQuery
.
getPageSize
()
:
10
;
int
end
=
Math
.
min
((
start
*
pageSize
),
list
.
size
());
long
pageStart
=
(
start
-
1
)
*
pageSize
;
Page
<
T
>
page
=
new
Page
<>(
start
,
pageSize
,
list
.
size
());
if
(
pageStart
>=
list
.
size
())
{
return
page
;
}
page
.
setRecords
(
list
.
subList
((
int
)(
start
*
page
.
getSize
()),
end
));
page
.
setRecords
(
list
.
subList
((
int
)
(
pageStart
),
end
));
return
page
;
}
}
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