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
8cc7b17c
Commit
8cc7b17c
authored
Feb 04, 2021
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志
parent
587a0716
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
165 additions
and
6 deletions
+165
-6
DataStatisticsController.java
.../cement/business/controller/DataStatisticsController.java
+2
-1
EntrustLogsController.java
.../sc/cement/business/controller/EntrustLogsController.java
+32
-0
EntrustLogs.java
...n/java/cn/wise/sc/cement/business/entity/EntrustLogs.java
+40
-0
EntrustLogsMapper.java
.../cn/wise/sc/cement/business/mapper/EntrustLogsMapper.java
+16
-0
DataStatisticsMapper.xml
...se/sc/cement/business/mapper/xml/DataStatisticsMapper.xml
+1
-1
EntrustLogsMapper.xml
.../wise/sc/cement/business/mapper/xml/EntrustLogsMapper.xml
+5
-0
IEntrustLogsService.java
.../wise/sc/cement/business/service/IEntrustLogsService.java
+26
-0
DataStatisticsServiceImpl.java
...ment/business/service/impl/DataStatisticsServiceImpl.java
+0
-4
EntrustLogsServiceImpl.java
.../cement/business/service/impl/EntrustLogsServiceImpl.java
+43
-0
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/DataStatisticsController.java
View file @
8cc7b17c
...
...
@@ -153,7 +153,8 @@ public class DataStatisticsController {
@ApiOperation
(
"检测项分布统计"
)
@PostMapping
(
"/item/download"
)
public
BaseResponse
<
Page
<
ItemDistributionVo
>>
downloadItemDistribution
(
@RequestBody
CountItemDistributionQuery
query
,
HttpServletResponse
response
)
{
public
BaseResponse
<
Page
<
ItemDistributionVo
>>
downloadItemDistribution
(
@RequestBody
CountItemDistributionQuery
query
,
HttpServletResponse
response
)
{
return
dataStatisticsService
.
countItemDistribution
(
query
,
response
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustLogsController.java
0 → 100644
View file @
8cc7b17c
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.service.IEntrustLogsService
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* <p>
* 日志
* </p>
*
* @author ztw
* @since 2021-01-27
*/
@RestController
@RequestMapping
(
"/business/entrust-logs"
)
public
class
EntrustLogsController
{
@Autowired
IEntrustLogsService
iEntrustLogsService
;
@GetMapping
(
"/test"
)
public
void
test
(){
iEntrustLogsService
.
addLog
(
1L
,
"委托派发"
,
"派发"
,
"张三派发六元素检测给李四"
,
3L
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EntrustLogs.java
0 → 100644
View file @
8cc7b17c
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.io.Serializable
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-01-27
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
EntrustLogs
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
entrustId
;
private
String
nodeName
;
private
String
operation
;
private
String
content
;
private
Long
operatorId
;
private
Long
acceptId
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EntrustLogsMapper.java
0 → 100644
View file @
8cc7b17c
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EntrustLogs
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-01-27
*/
public
interface
EntrustLogsMapper
extends
BaseMapper
<
EntrustLogs
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/DataStatisticsMapper.xml
View file @
8cc7b17c
...
...
@@ -216,7 +216,7 @@
LEFT JOIN sample s ON sd.sample_id = s.id
LEFT JOIN team t ON t.id = sd.team_id
WHERE (sd.finish_time between #{start} and #{end})
<if
test=
"origins != null"
>
<if
test=
"origins != null
and origins.size()>0
"
>
AND s.origin in
<foreach
collection=
"origins"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EntrustLogsMapper.xml
0 → 100644
View file @
8cc7b17c
<?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.EntrustLogsMapper"
>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustLogsService.java
0 → 100644
View file @
8cc7b17c
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EntrustLogs
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2021-01-27
*/
public
interface
IEntrustLogsService
extends
IService
<
EntrustLogs
>
{
/**
* 新增日志
* @param entrustId 委托id
* @param operation 操作名
* @param nodeName 节点名
* @param content 内容
* @param acceptId 接收人
* @return 是否成功
*/
Boolean
addLog
(
Long
entrustId
,
String
operation
,
String
nodeName
,
String
content
,
Long
acceptId
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/DataStatisticsServiceImpl.java
View file @
8cc7b17c
...
...
@@ -296,10 +296,6 @@ public class DataStatisticsServiceImpl implements IDataStatisticsService {
}
@Override
public
BaseResponse
<
Page
<
ItemDistributionVo
>>
countItemDistribution
(
CountItemDistributionQuery
query
,
HttpServletResponse
response
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustLogsServiceImpl.java
0 → 100644
View file @
8cc7b17c
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EntrustLogs
;
import
cn.wise.sc.cement.business.mapper.EntrustLogsMapper
;
import
cn.wise.sc.cement.business.model.LoginUser
;
import
cn.wise.sc.cement.business.service.IEntrustLogsService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.Assert
;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2021-01-27
*/
@Service
public
class
EntrustLogsServiceImpl
extends
ServiceImpl
<
EntrustLogsMapper
,
EntrustLogs
>
implements
IEntrustLogsService
{
@Autowired
ISysUserService
iSysUserService
;
@Override
public
Boolean
addLog
(
Long
entrustId
,
String
operation
,
String
nodeName
,
String
content
,
Long
acceptId
)
{
Assert
.
notNull
(
entrustId
,
"委托id不能为空!"
);
EntrustLogs
logs
=
new
EntrustLogs
();
logs
.
setEntrustId
(
entrustId
);
logs
.
setOperation
(
operation
);
logs
.
setContent
(
content
);
logs
.
setAcceptId
(
acceptId
);
logs
.
setNodeName
(
nodeName
);
LoginUser
loginUser
=
iSysUserService
.
getLoginUser
();
logs
.
setOperatorId
(
Long
.
valueOf
(
loginUser
.
getId
()));
return
this
.
save
(
logs
);
}
}
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