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
e5922508
Commit
e5922508
authored
Feb 09, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业微信消息推送
parent
a4dee111
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
471 additions
and
442 deletions
+471
-442
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+144
-109
PlanPeopleController.java
...e/sc/cement/business/controller/PlanPeopleController.java
+0
-1
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+12
-0
WeiXinController.java
.../wise/sc/cement/business/controller/WeiXinController.java
+11
-5
SampleHandleEnclosure.java
...wise/sc/cement/business/entity/SampleHandleEnclosure.java
+5
-0
Team.java
...src/main/java/cn/wise/sc/cement/business/entity/Team.java
+5
-0
EntrustMapper.xml
...a/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
+7
-0
SampleDistributionEnclosureMapper.xml
...business/mapper/xml/SampleDistributionEnclosureMapper.xml
+3
-0
PageQuery.java
...main/java/cn/wise/sc/cement/business/model/PageQuery.java
+1
-1
TeamQuery.java
...ava/cn/wise/sc/cement/business/model/query/TeamQuery.java
+3
-0
TeamVo.java
...main/java/cn/wise/sc/cement/business/model/vo/TeamVo.java
+4
-0
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+22
-27
IPlanPeopleService.java
...n/wise/sc/cement/business/service/IPlanPeopleService.java
+0
-6
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+231
-274
WeiXinService.java
...n/wise/sc/cement/business/service/impl/WeiXinService.java
+2
-2
ObjUtils.java
...c/main/java/cn/wise/sc/cement/business/util/ObjUtils.java
+2
-0
application.yml
cement-business/src/main/resources/application.yml
+3
-2
application.yml
config/application.yml
+16
-15
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/EntrustController.java
View file @
e5922508
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PlanPeopleController.java
View file @
e5922508
...
...
@@ -3,7 +3,6 @@ package cn.wise.sc.cement.business.controller;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.PlanPeopleQuery
;
import
cn.wise.sc.cement.business.model.query.SampleDistributionEnclosureQuery
;
import
cn.wise.sc.cement.business.service.IPlanPeopleService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
View file @
e5922508
...
...
@@ -291,4 +291,16 @@ public class ReportController {
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/WeiXinController.java
View file @
e5922508
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.URLUtil
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.service.impl.WeiXinService
;
import
cn.wise.sc.cement.business.util.weixin.Global
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -139,14 +139,19 @@ public class WeiXinController {
@ApiOperation
(
value
=
"发送消息"
)
@GetMapping
(
"/sendTextMessage"
)
public
BaseResponse
sendTextMessage
()
{
public
BaseResponse
sendTextMessage
(
String
touser
)
{
try
{
//发送企业微信消息内容
Integer
notice
=
(
int
)(
1
+
Math
.
random
()*(
10
-
1
+
1
));
String
URL
=
"https://lab.wisenergy.cn/lab-bangye?id="
+
269
+
"&path=/blanche/entrustdetail¬ice="
+
notice
;
String
systemUrL
=
systemUrl
.
replace
(
"U_R_L"
,
URLUtil
.
encode
(
URL
));
String
content
=
"你好!"
+
"竹天卫"
+
"向您申请了一条委托,请前往\n"
+
systemUr
l
+
"进行评审。"
;
systemUr
L
+
"进行评审。"
;
System
.
out
.
println
(
"**************************content**********************"
);
System
.
out
.
println
(
content
);
weiXinService
.
sendTextMessage
(
"ZhuTianWei"
,
content
);
weiXinService
.
sendTextMessage
(
touser
,
content
);
// weiXinService.sendTextMessage("1","hello");
...
...
@@ -157,4 +162,5 @@ public class WeiXinController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/SampleHandleEnclosure.java
View file @
e5922508
...
...
@@ -62,4 +62,9 @@ public class SampleHandleEnclosure implements Serializable {
@ApiModelProperty
(
"pdf路径"
)
private
String
pdfUrl
;
/**
* 是否允许委托人查看 是否公开 (0不公开,1公开)
*/
private
Integer
isPublic
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/Team.java
View file @
e5922508
...
...
@@ -84,4 +84,9 @@ public class Team extends BaseEntity implements Serializable {
@ApiModelProperty
(
"是否需要平行(0否,1是)"
)
private
Integer
isParallel
;
@ApiModelProperty
(
"是否需要派发(0否 样品处理完直接校核,1是样品处理完需要检测再校核)"
)
private
Integer
isPf
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
View file @
e5922508
...
...
@@ -185,6 +185,9 @@
<if
test=
"params.status != null"
>
and e.status = #{params.status}
</if>
<if
test=
"params.handleStatus != null"
>
and e.status = #{params.handleStatus}
</if>
<if
test=
"params.isUrgent != null"
>
and e.is_urgent = #{params.isUrgent}
</if>
...
...
@@ -241,6 +244,10 @@
<if
test=
"params.status != null"
>
and e.status = #{params.status}
</if>
<if
test=
"params.distributionStatus != null"
>
and t.status = #{params.distributionStatus}
</if>
<if
test=
"params.isUrgent != null"
>
and e.is_urgent = #{params.isUrgent}
</if>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleDistributionEnclosureMapper.xml
View file @
e5922508
...
...
@@ -16,6 +16,9 @@
from sample_distribution_enclosure t
left join sys_user su on su.id = t.user_id
where t.sample_distribution_id = #{params.sampleDistributionId}
<if
test=
"params.userId != null"
>
and t.user_id = #{params.userId}
</if>
order by t.id ASC
</select>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/PageQuery.java
View file @
e5922508
...
...
@@ -24,5 +24,5 @@ public class PageQuery implements Serializable {
@ApiModelProperty
(
value
=
"每页显示数量"
)
@NonNull
private
Integer
pageSize
=
1
0
;
private
Integer
pageSize
=
2
0
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/TeamQuery.java
View file @
e5922508
...
...
@@ -45,4 +45,7 @@ public class TeamQuery {
@ApiModelProperty
(
"是否需要平行(0否,1是)"
)
private
Integer
isParallel
;
@ApiModelProperty
(
"是否需要派发(0否 样品处理完直接校核,1是样品处理完需要检测再校核)"
)
private
Integer
isPf
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/TeamVo.java
View file @
e5922508
...
...
@@ -71,5 +71,9 @@ public class TeamVo {
@ApiModelProperty
(
"是否需要平行(0否,1是)"
)
private
Integer
isParallel
;
@ApiModelProperty
(
"是否需要派发(0否 样品处理完直接校核,1是样品处理完需要检测再校核)"
)
private
Integer
isPf
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
e5922508
...
...
@@ -45,20 +45,13 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
String
>
sureUpdate
(
sureUpdateQuery
query
);
// BaseResponse<String> handle(HandleQuery query);
//派发处理
//样品处理
BaseResponse
<
IPage
<
EntrustVo
>>
getSampleHandlePage
(
PageQuery
pageQuery
,
String
entrustCode
,
Integer
status
,
String
clientName
,
String
projectName
,
String
projectCode
,
Integer
isUrgent
);
String
clientName
,
String
projectName
,
String
projectCode
,
Integer
isUrgent
,
Integer
handleStatus
);
BaseResponse
<
Map
<
String
,
Object
>>
getSampleHandleList
(
Integer
id
);
BaseResponse
<
String
>
acceptHandle
(
Integer
[]
ids
);
BaseResponse
<
List
<
SampleHandleEnclosureVo
>>
getSampleHandleEnclosureList
(
Integer
sampleHandleId
);
BaseResponse
<
SampleHandleEnclosure
>
uploadEnclosureCL
(
SampleHandleEnclosureQuery
query
);
BaseResponse
<
SampleHandleVo
>
getHandleDtail
(
Integer
id
);
BaseResponse
<
String
>
finishHandle
(
Integer
id
);
...
...
@@ -70,22 +63,18 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
String
>
handleAgain
(
HandleAgainQuery
query
);
//派发检测
//样品检测
BaseResponse
<
String
>
distribution
(
DistributionQuery
query
);
BaseResponse
<
IPage
<
EntrustVo
>>
getSampleDistributionPage
(
PageQuery
pageQuery
,
String
entrustCode
,
Integer
status
,
String
clientName
,
String
projectName
,
String
projectCode
,
Integer
isUrgent
);
String
clientName
,
String
projectName
,
String
projectCode
,
Integer
isUrgent
,
Integer
distributionStatus
);
BaseResponse
<
Map
<
String
,
Object
>>
getSampleDistributionList
(
Integer
id
);
BaseResponse
<
String
>
acceptDistribution
(
Integer
[]
ids
);
BaseResponse
<
List
<
SampleDistributionEnclosureVo
>>
getSampleDistributionEnclosureList
(
Integer
sampleDistributionId
);
BaseResponse
<
SampleDistributionEnclosure
>
uploadEnclosurePF
(
SampleHandleEnclosureQuery
query
);
// BaseResponse<SampleDistribution> uploadEnclosurePF(SampleDistributionEnclosureQuery query);
BaseResponse
<
String
>
finishDistribution
(
FinishCheckGroupQuery
query
);
...
...
@@ -97,12 +86,7 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
String
>
distributioAgain
(
HandleAgainQuery
query
);
//校核
BaseResponse
<
IPage
<
EntrustVo
>>
getCheckPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
status
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
...
...
@@ -110,14 +94,27 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
CheckUserResultVo
>
getCheckResult
(
Integer
entrustId
,
Integer
userId
);
BaseResponse
<
List
<
SampleCheckVo
>>
getCheckDetail
(
String
cementCode
);
BaseResponse
<
Map
<
String
,
String
>>
checkCountFast
(
CheckCountFastQuery
query
);
BaseResponse
<
String
>
checkCountNew
(
CheckCountNewQuery
query
);
/*BaseResponse<String> check(CheckQuery query);*/
//附件的操作
BaseResponse
<
List
<
SampleHandleEnclosureVo
>>
getSampleHandleEnclosureList
(
Integer
sampleHandleId
);
BaseResponse
<
SampleHandleEnclosure
>
uploadEnclosureCL
(
SampleHandleEnclosureQuery
query
);
BaseResponse
<
List
<
SampleDistributionEnclosureVo
>>
getSampleDistributionEnclosureList
(
Integer
sampleDistributionId
);
BaseResponse
<
SampleDistributionEnclosure
>
uploadEnclosurePF
(
SampleHandleEnclosureQuery
query
);
BaseResponse
<
String
>
deleteEnclosure
(
Integer
id
,
Integer
type
);
BaseResponse
<
String
>
makePublicEnclosure
(
Integer
isPublic
,
Integer
id
,
Integer
type
);
//报告
BaseResponse
<
IPage
<
EntrustVo
>>
getReportPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
...
...
@@ -143,8 +140,6 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
List
<
SampleHandleVo
>>
getSampleHandleDtail
(
Integer
id
);
BaseResponse
<
List
<
SampleHandleEnclosureVo
>>
getSampleHandleDtailEnclosureList
(
Integer
sampleHandleId
);
BaseResponse
<
List
<
SampleVo
>>
getSampleCheckDtail
(
Integer
id
);
/**
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IPlanPeopleService.java
View file @
e5922508
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.PlanPeople
;
import
cn.wise.sc.cement.business.entity.PlanTraining
;
import
cn.wise.sc.cement.business.entity.SampleDistribution
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.PlanPeopleQuery
;
import
cn.wise.sc.cement.business.model.query.SampleDistributionEnclosureQuery
;
import
cn.wise.sc.cement.business.model.vo.PlanPeopleVo
;
import
cn.wise.sc.cement.business.model.vo.PlanTrainingVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
public
interface
IPlanPeopleService
extends
IService
<
PlanPeople
>
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
e5922508
This diff is collapsed.
Click to expand it.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/WeiXinService.java
View file @
e5922508
...
...
@@ -287,7 +287,7 @@ public class WeiXinService {
//1.2必需
message
.
setMsgtype
(
"text"
);
message
.
setAgentid
(
agentId
);
message
.
setAgentid
(
agentId
PC
);
Text
text
=
new
Text
();
text
.
setContent
(
content
);
...
...
@@ -295,7 +295,7 @@ public class WeiXinService {
//2.获取access_token:根据企业id和通讯录密钥获取access_token,并拼接请求url
// String accessToken= WeiXinUtil.getAccessToken(corpid, WeiXinParamesUtil.agentSecret).getToken();
String
accessToken
=
getAccessToken
();
String
accessToken
=
get
PC
AccessToken
();
System
.
out
.
println
(
"accessToken:"
+
accessToken
);
//3.发送消息:调用业务类,发送消息
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/ObjUtils.java
View file @
e5922508
package
cn
.
wise
.
sc
.
cement
.
business
.
util
;
import
cn.hutool.core.net.URLEncoder
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.URLUtil
;
import
cn.wise.sc.cement.business.service.impl.KeyValueMap
;
import
com.alibaba.fastjson.JSON
;
import
java.util.ArrayList
;
...
...
cement-business/src/main/resources/application.yml
View file @
e5922508
server
:
port
:
7007
#-Dspring.config.location=D:\idea_workspases\tianjin-cement\cement-business\src\main\resources\application.yml
spring
:
application
:
tianjin-cement
profiles
:
...
...
@@ -57,8 +58,8 @@ weixin:
agentIdPC
:
1000003
agentSecret
:
gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
agentSecretPC
:
itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
backUrl
:
https%3a%2f%2f
ccdcmtl.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>,'
backUrl
:
https%3a%2f%2f
lab.wisenergy.cn%2flab-bangye
systemUrl
:
'
<a
href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=
U_R_L
&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
...
...
config/application.yml
View file @
e5922508
...
...
@@ -42,21 +42,22 @@ mybatis-plus:
mapper-locations
:
classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
#天津
weixin
:
corpId
:
ww348f91b2573c1867
agentId
:
1000002
agentIdPC
:
1000003
agentSecret
:
gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
agentSecretPC
:
itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
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>,
#邦业
#weixin:
# corpId: ww348f91b2573c1867
# agentId: 1000004
# agentIdPC: 1000005
# agentSecret: flISLojPiE1_ieO9bPgyZ4g_4O-Rr-FKzs7e7p3HEtA
# agentSecretPC: ABagJNftdn1uOYsDLrhlCIM8jZdcTgEA9DyX6kn_-hY
# backUrl: https%3a%2f%2flab.wisenergy.cn%2flab-bangye
# agentId: 1000002
# agentIdPC: 1000003
# agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
# agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
# 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>,
#邦业
weixin
:
corpId
:
ww348f91b2573c1867
agentId
:
1000004
agentIdPC
:
1000005
agentSecret
:
flISLojPiE1_ieO9bPgyZ4g_4O-Rr-FKzs7e7p3HEtA
agentSecretPC
:
ABagJNftdn1uOYsDLrhlCIM8jZdcTgEA9DyX6kn_-hY
backUrl
:
https%3a%2f%2flab.wisenergy.cn%2flab-bangye
systemUrl
:
'
<a
href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=U_R_L&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%2flab.wisenergy.cn%2flab-bangye"%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