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
990c1955
Commit
990c1955
authored
Nov 16, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
样品增加产地字段
parents
e327978d
953a2575
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
136 additions
and
36 deletions
+136
-36
NonStandardApprovalController.java
...nt/business/controller/NonStandardApprovalController.java
+27
-2
AppraisalValue.java
...ava/cn/wise/sc/cement/business/entity/AppraisalValue.java
+24
-0
NonStandardApply.java
...a/cn/wise/sc/cement/business/entity/NonStandardApply.java
+1
-1
NonStandardApproval.java
...n/wise/sc/cement/business/entity/NonStandardApproval.java
+4
-4
NonStandardValue.java
...a/cn/wise/sc/cement/business/entity/NonStandardValue.java
+2
-2
AppraisalValueMapper.java
.../wise/sc/cement/business/mapper/AppraisalValueMapper.java
+21
-0
AppraisalValueMapper.xml
...se/sc/cement/business/mapper/xml/AppraisalValueMapper.xml
+14
-0
NonStandardValueMapper.xml
.../sc/cement/business/mapper/xml/NonStandardValueMapper.xml
+2
-3
NonStandardApplyQuery.java
...sc/cement/business/model/query/NonStandardApplyQuery.java
+1
-1
NonStandardApprovalQuery.java
...cement/business/model/query/NonStandardApprovalQuery.java
+3
-3
NonStandardValueQuery.java
...sc/cement/business/model/query/NonStandardValueQuery.java
+2
-2
NonStandardApplyVo.java
.../wise/sc/cement/business/model/vo/NonStandardApplyVo.java
+1
-1
NonStandardApprovalVo.java
...se/sc/cement/business/model/vo/NonStandardApprovalVo.java
+4
-4
NonStandardValueVo.java
.../wise/sc/cement/business/model/vo/NonStandardValueVo.java
+2
-2
INonStandardApprovalService.java
.../cement/business/service/INonStandardApprovalService.java
+9
-0
NonStandardApprovalServiceImpl.java
...business/service/impl/NonStandardApprovalServiceImpl.java
+11
-2
NonStandardValueServiceImpl.java
...nt/business/service/impl/NonStandardValueServiceImpl.java
+8
-9
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardApprovalController.java
View file @
990c1955
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.
entity.NonStandardApproval
;
import
cn.wise.sc.cement.business.
mapper.AppraisalValueMapper
;
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
;
...
...
@@ -14,6 +13,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
...
...
@@ -34,6 +34,9 @@ public class NonStandardApprovalController {
@Autowired
private
INonStandardApprovalService
iNonStandardApprovalService
;
@Resource
private
AppraisalValueMapper
appraisalValueMapper
;
@ApiOperation
(
value
=
"非标产值审批分页"
)
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
String
name
,
Integer
status
)
{
...
...
@@ -71,6 +74,17 @@ public class NonStandardApprovalController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"获取考核公值"
)
@GetMapping
(
"/getAppraisalValues"
)
public
Object
getAppraisalValues
()
{
try
{
return
appraisalValueMapper
.
getAppraisalValue
();
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取所有的非标产值审批{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"审批通过/驳回"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
NonStandardApprovalQuery
nonStandardApprovalQuery
)
{
...
...
@@ -82,6 +96,17 @@ public class NonStandardApprovalController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"改变考核公值"
)
@PostMapping
(
"/updateAppraisal"
)
public
BaseResponse
update
(
@RequestBody
Double
appraisalValue
)
{
try
{
return
iNonStandardApprovalService
.
updateAppraisal
(
appraisalValue
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"审批通过/驳回{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"审批操作按钮实现"
)
@PostMapping
(
"/status"
)
public
BaseResponse
status
(
Integer
status
,
Integer
id
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/AppraisalValue.java
0 → 100644
View file @
990c1955
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
* 考核公值
* </p>
*
* @author wlb
* @since 2020-09-22
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@TableName
(
value
=
"appraisal_value"
)
public
class
AppraisalValue
{
@ApiModelProperty
(
"考核公值"
)
private
Double
appraisalValues
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NonStandardApply.java
View file @
990c1955
...
...
@@ -36,7 +36,7 @@ public class NonStandardApply implements Serializable {
@ApiModelProperty
(
"起止日期"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工
时
"
)
@ApiModelProperty
(
"上报工
日
"
)
private
Double
reportedHours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NonStandardApproval.java
View file @
990c1955
...
...
@@ -37,10 +37,10 @@ public class NonStandardApproval implements Serializable {
@ApiModelProperty
(
"起止日期"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工
时
"
)
@ApiModelProperty
(
"上报工
日
"
)
private
Double
reportedHours
;
@ApiModelProperty
(
"审批工
时
"
)
@ApiModelProperty
(
"审批工
日
"
)
private
Double
approvalHours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
...
...
@@ -49,8 +49,8 @@ public class NonStandardApproval implements Serializable {
@ApiModelProperty
(
"最终产值"
)
private
Double
finalValue
;
@ApiModelProperty
(
"考核公值"
)
private
Double
appraisalValue
;
//
@ApiModelProperty("考核公值")
//
private Double appraisalValue;
@ApiModelProperty
(
"驳回意见"
)
private
String
finalRejection
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NonStandardValue.java
View file @
990c1955
...
...
@@ -41,8 +41,8 @@ public class NonStandardValue implements Serializable {
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"考核公值"
)
private
Double
appraisalValue
;
//
@ApiModelProperty("考核公值")
//
private Double appraisalValue;
@ApiModelProperty
(
"最终产值"
)
private
Double
finalValue
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/AppraisalValueMapper.java
0 → 100644
View file @
990c1955
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.AppraisalValue
;
import
cn.wise.sc.cement.business.entity.NonStandardApproval
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author wlb
* @since 2020-09-22
*/
public
interface
AppraisalValueMapper
extends
BaseMapper
<
AppraisalValue
>
{
void
update
(
String
appraisalValue
,
@Param
(
"params"
)
Double
appraisalValue1
);
Double
getAppraisalValue
();
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/AppraisalValueMapper.xml
0 → 100644
View file @
990c1955
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.AppraisalValueMapper"
>
<update
id=
"update"
>
update appraisal_value set appraisal_values = #{params}
</update>
<select
id=
"getAppraisalValue"
resultType=
"java.lang.Double"
>
select av.appraisal_values as appraisalValues
from appraisal_value av
</select>
</mapper>
\ No newline at end of file
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardValueMapper.xml
View file @
990c1955
...
...
@@ -31,7 +31,7 @@
LEFT JOIN sys_user su ON su.id = na.user_id
LEFT JOIN sys_group sg ON sg.id = su.group_id
<include
refid=
"where"
/>
order by na.
id a
sc
order by na.
start_time de
sc
</select>
<select
id=
"getList"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardValueVo"
>
...
...
@@ -61,13 +61,12 @@
su.username as 账户,
na.statistical as 起止日期,
na.approval_hours as 审批工时,
na.appraisal_value as 考核公值,
na.final_value as 最终产值,
na.work_type as 工作类别,
na.work_description as 工作描述,
na.start_time as 开始时间,
su.group_id as 部门id,
sg.name as
groupname
sg.name as
部门名
FROM nonstandard_apply na
left join sys_user su on na.user_id = su.id
LEFT JOIN sys_group sg ON sg.id = su.group_id
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardApplyQuery.java
View file @
990c1955
...
...
@@ -18,7 +18,7 @@ import java.time.LocalDate;
public
class
NonStandardApplyQuery
{
private
Integer
id
;
@ApiModelProperty
(
name
=
"reportedHours"
,
value
=
"上报工
时
"
)
@ApiModelProperty
(
name
=
"reportedHours"
,
value
=
"上报工
日
"
)
private
Double
reportedHours
;
@ApiModelProperty
(
name
=
"workType"
,
value
=
"工作类别"
)
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardApprovalQuery.java
View file @
990c1955
...
...
@@ -16,11 +16,11 @@ import lombok.RequiredArgsConstructor;
public
class
NonStandardApprovalQuery
{
private
Integer
id
;
@ApiModelProperty
(
name
=
"approvalHours"
,
value
=
"审批工
时
"
)
@ApiModelProperty
(
name
=
"approvalHours"
,
value
=
"审批工
日
"
)
private
Double
approvalHours
;
@ApiModelProperty
(
name
=
"appraisalValue"
,
value
=
"考核公值"
)
private
Double
appraisalValue
;
//
@ApiModelProperty(name = "appraisalValue", value = "考核公值")
//
private Double appraisalValue;
@ApiModelProperty
(
value
=
"按钮类型 (1通过,2拒绝)"
)
private
Integer
menuId
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardValueQuery.java
View file @
990c1955
...
...
@@ -33,8 +33,8 @@ public class NonStandardValueQuery {
@ApiModelProperty
(
name
=
"status"
,
value
=
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
@ApiModelProperty
(
name
=
"appraisalValue"
,
value
=
"考核公值"
)
private
Double
appraisalValue
;
//
@ApiModelProperty(name = "appraisalValue", value = "考核公值")
//
private Double appraisalValue;
@ApiModelProperty
(
name
=
"finalValue"
,
value
=
"最终产值"
)
private
Double
finalValue
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardApplyVo.java
View file @
990c1955
...
...
@@ -25,7 +25,7 @@ public class NonStandardApplyVo {
@ApiModelProperty
(
"起止时间"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工
时
"
)
@ApiModelProperty
(
"上报工
日
"
)
private
Double
reportedHours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardApprovalVo.java
View file @
990c1955
...
...
@@ -26,10 +26,10 @@ public class NonStandardApprovalVo {
@ApiModelProperty
(
"起止时间"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工
时
"
)
@ApiModelProperty
(
"上报工
日
"
)
private
Double
reportedHours
;
@ApiModelProperty
(
"审批工
时
"
)
@ApiModelProperty
(
"审批工
日
"
)
private
Double
approvalHours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
...
...
@@ -38,8 +38,8 @@ public class NonStandardApprovalVo {
@ApiModelProperty
(
"最终产值"
)
private
Double
finalValue
;
@ApiModelProperty
(
"考核公值"
)
private
Double
appraisalValue
;
//
@ApiModelProperty("考核公值")
//
private Double appraisalValue;
@ApiModelProperty
(
"驳回意见"
)
private
String
finalRejection
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardValueVo.java
View file @
990c1955
...
...
@@ -31,8 +31,8 @@ public class NonStandardValueVo {
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"考核公值"
)
private
Double
appraisalValue
;
//
@ApiModelProperty("考核公值")
//
private Double appraisalValue;
@ApiModelProperty
(
"最终产值"
)
private
Double
finalValue
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardApprovalService.java
View file @
990c1955
...
...
@@ -51,6 +51,15 @@ public interface INonStandardApprovalService extends IService<NonStandardApprova
*/
BaseResponse
<
NonStandardApproval
>
update
(
NonStandardApprovalQuery
query
);
/**
* 修改考核公值
*
*
* @return NoneStandardApprovalVo
*/
BaseResponse
<
Double
>
updateAppraisal
(
Double
appraisalValue
);
/**
* 通过id删除指定审批信息
*
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApprovalServiceImpl.java
View file @
990c1955
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.NonStandardApproval
;
import
cn.wise.sc.cement.business.mapper.AppraisalValueMapper
;
import
cn.wise.sc.cement.business.mapper.NonStandardApprovalMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
...
...
@@ -37,6 +38,9 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
@Resource
private
NonStandardApprovalMapper
nonStandardApprovalMapper
;
@Resource
private
AppraisalValueMapper
appraisalValueMapper
;
@Override
public
BaseResponse
<
IPage
<
NonStandardApprovalVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
,
Integer
status
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -75,10 +79,9 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
return
BaseResponse
.
errorMsg
(
"按钮参数不能为空"
);
}
if
(
query
.
getMenuId
()
==
1
)
{
//通过
nonStandardApproval
.
setAppraisalValue
(
query
.
getAppraisalValue
());
nonStandardApproval
.
setApprovalHours
(
query
.
getApprovalHours
());
//计算最终产值
Double
finalValue
=
query
.
getAppraisalValue
()
*
query
.
getApprovalHours
();
Double
finalValue
=
appraisalValueMapper
.
getAppraisalValue
()
*
query
.
getApprovalHours
();
nonStandardApproval
.
setFinalValue
(
finalValue
);
nonStandardApproval
.
setStatus
(
2
);
}
else
if
(
query
.
getMenuId
()
==
2
)
{
//拒绝
...
...
@@ -92,6 +95,12 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
return
BaseResponse
.
okData
(
nonStandardApproval
);
}
@Override
public
BaseResponse
<
Double
>
updateAppraisal
(
Double
appraisalValue
)
{
appraisalValueMapper
.
update
(
"appraisalValues"
,
appraisalValue
);
return
BaseResponse
.
okData
(
appraisalValue
);
}
@Override
@Transactional
public
BaseResponse
<
String
>
status
(
Integer
status
,
Integer
id
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardValueServiceImpl.java
View file @
990c1955
...
...
@@ -89,7 +89,7 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
//其他不需要累加的数据==> 比如名字
finalNonStandardValue
.
setStatistical
(
nonStandardValue
.
getStatistical
());
finalNonStandardValue
.
setAppraisalValue
(
nonStandardValue
.
getAppraisalValue
().
doubleValue
());
//
finalNonStandardValue.setAppraisalValue(nonStandardValue.getAppraisalValue().doubleValue());
finalNonStandardValue
.
setUserId
(
nonStandardValue
.
getUserId
());
finalNonStandardValue
.
setStartTime
(
nonStandardValue
.
getStartTime
());
finalNonStandardValue
.
setWorkType
(
nonStandardValue
.
getWorkType
());
...
...
@@ -149,19 +149,18 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
1
2
];
String
[]
headers
=
new
String
[
1
1
];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"姓名"
;
headers
[
2
]
=
"账户"
;
headers
[
3
]
=
"起止日期"
;
headers
[
4
]
=
"审批工时"
;
headers
[
5
]
=
"考核公值"
;
headers
[
6
]
=
"最终产值"
;
headers
[
7
]
=
"工作类别"
;
headers
[
8
]
=
"工作描述"
;
headers
[
9
]
=
"开始时间"
;
headers
[
10
]
=
"部门id"
;
headers
[
11
]
=
"部门名"
;
headers
[
5
]
=
"最终产值"
;
headers
[
6
]
=
"工作类别"
;
headers
[
7
]
=
"工作描述"
;
headers
[
8
]
=
"开始时间"
;
headers
[
9
]
=
"部门id"
;
headers
[
10
]
=
"部门名"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
for
(
Map
<
String
,
Object
>
m
:
list
)
{
...
...
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