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
79d3ccf4
Commit
79d3ccf4
authored
Jan 06, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评审时 增加样品删除功能
parent
3a112151
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
99 additions
and
41 deletions
+99
-41
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+13
-0
WeiXinController.java
.../wise/sc/cement/business/controller/WeiXinController.java
+4
-4
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+2
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+43
-0
CheckCountUtil.java
.../java/cn/wise/sc/cement/business/util/CheckCountUtil.java
+1
-1
application.yml
cement-business/src/main/resources/application.yml
+18
-18
cement-business-1.0-SNAPSHOT.jar.original
...business/target/cement-business-1.0-SNAPSHOT.jar.original
+0
-0
application.yml
cement-business/target/classes/application.yml
+18
-18
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustController.java
View file @
79d3ccf4
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.SysUser
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.enumation.FileExt
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.PageQuery
;
...
@@ -9,6 +10,7 @@ import cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo;
...
@@ -9,6 +10,7 @@ import cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo;
import
cn.wise.sc.cement.business.model.vo.SampleVo
;
import
cn.wise.sc.cement.business.model.vo.SampleVo
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.util.WordUtil
;
import
cn.wise.sc.cement.business.util.WordUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
...
@@ -103,6 +105,17 @@ public class EntrustController {
...
@@ -103,6 +105,17 @@ public class EntrustController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@ApiOperation
(
value
=
"评审时删除委托样品"
)
@PostMapping
(
"/deleteSample/{sampleId}"
)
public
BaseResponse
deleteSample
(
@PathVariable
Integer
sampleId
)
{
try
{
return
entrustService
.
deleteSample
(
sampleId
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"评审时删除委托样品{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"委托详情"
)
@ApiOperation
(
value
=
"委托详情"
)
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getDtail
(
@PathVariable
Integer
id
)
{
public
BaseResponse
getDtail
(
@PathVariable
Integer
id
)
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/WeiXinController.java
View file @
79d3ccf4
...
@@ -40,9 +40,9 @@ public class WeiXinController {
...
@@ -40,9 +40,9 @@ public class WeiXinController {
log
.
debug
(
"============================================="
);
log
.
debug
(
"============================================="
);
try
{
try
{
//测试服务器
//测试服务器
//
return weiXinService.getTestToken(code);
return
weiXinService
.
getTestToken
(
code
);
//正式服务器
//正式服务器
return
weiXinService
.
getToken
(
code
,
"APP"
);
//
return weiXinService.getToken(code, "APP");
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取登录token{}"
,
e
);
log
.
debug
(
"获取登录token{}"
,
e
);
}
}
...
@@ -54,9 +54,9 @@ public class WeiXinController {
...
@@ -54,9 +54,9 @@ public class WeiXinController {
public
BaseResponse
getPCToken
(
String
code
)
{
public
BaseResponse
getPCToken
(
String
code
)
{
try
{
try
{
//测试服务器
//测试服务器
//
return weiXinService.getTestToken(code);
return
weiXinService
.
getTestToken
(
code
);
//正式服务器
//正式服务器
return
weiXinService
.
getToken
(
code
,
"PC"
);
//
return weiXinService.getToken(code, "PC");
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取登录token{}"
,
e
);
log
.
debug
(
"获取登录token{}"
,
e
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
79d3ccf4
...
@@ -35,6 +35,8 @@ public interface IEntrustService extends IService<Entrust> {
...
@@ -35,6 +35,8 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
Entrust
>
create
(
EntrustQuery
query
);
BaseResponse
<
Entrust
>
create
(
EntrustQuery
query
);
BaseResponse
<
String
>
deleteSample
(
Integer
sampleId
);
BaseResponse
<
EntrustVo
>
getDtail
(
Integer
id
);
BaseResponse
<
EntrustVo
>
getDtail
(
Integer
id
);
BaseResponse
<
EntrustVo
>
getDetailCapacity
(
Integer
id
);
BaseResponse
<
EntrustVo
>
getDetailCapacity
(
Integer
id
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
79d3ccf4
...
@@ -363,6 +363,48 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -363,6 +363,48 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
return
BaseResponse
.
okData
(
entrust
);
return
BaseResponse
.
okData
(
entrust
);
}
}
/**
* 删除委托样品
* @param sampleId
* @return
*/
@Override
public
BaseResponse
<
String
>
deleteSample
(
Integer
sampleId
)
{
LoginUser
loginUser
=
userService
.
getLoginUser
();
if
(
loginUser
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请登录账号"
);
}
List
<
Integer
>
approvalIdList
=
sysApprovalMapper
.
getApprovalId
(
"委托评审"
);
if
(
approvalIdList
==
null
)
{
return
BaseResponse
.
errorMsg
(
"委托评审信息错误"
);
}
if
(!
approvalIdList
.
contains
(
loginUser
.
getId
()))
{
return
BaseResponse
.
errorMsg
(
"权限不足"
);
}
if
(
sampleId
==
null
)
{
return
BaseResponse
.
errorMsg
(
"参数错误"
);
}
SampleTmp
sampleTmp
=
sampleTmpService
.
getById
(
sampleId
);
if
(
sampleTmp
==
null
||
sampleTmp
.
getEntrustId
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"信息错误"
);
}
Entrust
entrust
=
entrustMapper
.
selectById
(
sampleTmp
.
getEntrustId
());
if
(
entrust
==
null
)
{
return
BaseResponse
.
errorMsg
(
"委托信息错误"
);
}
if
(
entrust
.
getStatus
()
!=
0
){
return
BaseResponse
.
errorMsg
(
"状态不允许删除"
);
}
QueryWrapper
<
SampleTmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"entrust_id"
,
sampleTmp
.
getEntrustId
());
Integer
conunts
=
sampleTmpService
.
count
(
queryWrapper
);
if
(
conunts
<
2
)
{
return
BaseResponse
.
errorMsg
(
"至少保留一个样品信息"
);
}
sampleTmpService
.
removeById
(
sampleId
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
/**
/**
* 委托详情
* 委托详情
*
*
...
@@ -905,6 +947,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -905,6 +947,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
return
BaseResponse
.
okData
(
maxCementCode
);
return
BaseResponse
.
okData
(
maxCementCode
);
}
}
/**
/**
* 委托评审
* 委托评审
*
*
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/CheckCountUtil.java
View file @
79d3ccf4
...
@@ -128,7 +128,7 @@ public class CheckCountUtil {
...
@@ -128,7 +128,7 @@ public class CheckCountUtil {
StringUtils
.
isNotBlank
(
resultMap
.
get
(
"VCuSO<sub>4</sub>(II)"
))
StringUtils
.
isNotBlank
(
resultMap
.
get
(
"VCuSO<sub>4</sub>(II)"
))
){
){
BigDecimal
TAl2O3
=
getBigDecimal
(
resultMap
.
get
(
"TAl<sub>2</sub>O<sub>3</sub>"
).
trim
());
BigDecimal
TAl2O3
=
getBigDecimal
(
resultMap
.
get
(
"TAl<sub>2</sub>O<sub>3</sub>"
).
trim
());
BigDecimal
VAl2O3
=
getBigDecimal
(
resultMap
.
get
(
"VAl<sub>2</sub>O
3
"
).
trim
());
BigDecimal
VAl2O3
=
getBigDecimal
(
resultMap
.
get
(
"VAl<sub>2</sub>O
<sub>3</sub>
"
).
trim
());
BigDecimal
K
=
getBigDecimal
(
resultMap
.
get
(
"K"
).
trim
());
BigDecimal
K
=
getBigDecimal
(
resultMap
.
get
(
"K"
).
trim
());
BigDecimal
VCuSO4_I
=
getBigDecimal
(
resultMap
.
get
(
"VCuSO<sub>4</sub>(I)"
).
trim
());
BigDecimal
VCuSO4_I
=
getBigDecimal
(
resultMap
.
get
(
"VCuSO<sub>4</sub>(I)"
).
trim
());
BigDecimal
m
=
getBigDecimal
(
resultMap
.
get
(
"样重m"
).
trim
());
BigDecimal
m
=
getBigDecimal
(
resultMap
.
get
(
"样重m"
).
trim
());
...
...
cement-business/src/main/resources/application.yml
View file @
79d3ccf4
...
@@ -7,9 +7,9 @@ spring:
...
@@ -7,9 +7,9 @@ spring:
active
:
dev
active
:
dev
datasource
:
datasource
:
# 192.168.110.85 admin!@#123
# 192.168.110.85 admin!@#123
#
url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://192.168.110.85:3306/sinoma_bangye?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://192.168.110.85:3306/sinoma_bangye?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
#
url: jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username
:
root
username
:
root
password
:
admin!@#123
password
:
admin!@#123
driverClassName
:
com.mysql.cj.jdbc.Driver
driverClassName
:
com.mysql.cj.jdbc.Driver
...
@@ -40,25 +40,25 @@ mybatis-plus:
...
@@ -40,25 +40,25 @@ mybatis-plus:
mapper-locations
:
classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
mapper-locations
:
classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
#正式服务器
#正式服务器
weixin
:
#
weixin:
corpId
:
wwc7ae84e6af6ba921
#
corpId: wwc7ae84e6af6ba921
agentIdPC
:
1000151
#
agentIdPC: 1000151
agentSecretPC
:
h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg
#
agentSecretPC: h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg
agentId
:
1000150
#
agentId: 1000150
agentSecret
:
zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc
#
agentSecret: zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc
backUrl
:
https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
#
backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
systemUrl
:
'
<a
href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#测试服务器
#测试服务器
#
weixin:
weixin
:
#
corpId: ww348f91b2573c1867
corpId
:
ww348f91b2573c1867
#
agentId: 1000002
agentId
:
1000002
#
agentIdPC: 1000003
agentIdPC
:
1000003
#
agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
agentSecret
:
gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
#
agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
agentSecretPC
:
itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
#
backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
backUrl
:
https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
#
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
systemUrl
:
'
<a
href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
...
...
cement-business/target/cement-business-1.0-SNAPSHOT.jar.original
View file @
79d3ccf4
No preview for this file type
cement-business/target/classes/application.yml
View file @
79d3ccf4
...
@@ -7,9 +7,9 @@ spring:
...
@@ -7,9 +7,9 @@ spring:
active
:
dev
active
:
dev
datasource
:
datasource
:
# 192.168.110.85 admin!@#123
# 192.168.110.85 admin!@#123
#
url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://192.168.110.85:3306/sinoma_bangye?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://192.168.110.85:3306/sinoma_bangye?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
#
url: jdbc:mysql://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username
:
root
username
:
root
password
:
admin!@#123
password
:
admin!@#123
driverClassName
:
com.mysql.cj.jdbc.Driver
driverClassName
:
com.mysql.cj.jdbc.Driver
...
@@ -40,25 +40,25 @@ mybatis-plus:
...
@@ -40,25 +40,25 @@ mybatis-plus:
mapper-locations
:
classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
mapper-locations
:
classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
#正式服务器
#正式服务器
weixin
:
#
weixin:
corpId
:
wwc7ae84e6af6ba921
#
corpId: wwc7ae84e6af6ba921
agentIdPC
:
1000151
#
agentIdPC: 1000151
agentSecretPC
:
h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg
#
agentSecretPC: h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg
agentId
:
1000150
#
agentId: 1000150
agentSecret
:
zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc
#
agentSecret: zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc
backUrl
:
https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
#
backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
systemUrl
:
'
<a
href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#测试服务器
#测试服务器
#
weixin:
weixin
:
#
corpId: ww348f91b2573c1867
corpId
:
ww348f91b2573c1867
#
agentId: 1000002
agentId
:
1000002
#
agentIdPC: 1000003
agentIdPC
:
1000003
#
agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
agentSecret
:
gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
#
agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
agentSecretPC
:
itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
#
backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
backUrl
:
https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
#
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
systemUrl
:
'
<a
href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
...
...
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