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
682ad102
Commit
682ad102
authored
Nov 03, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化委托流程 产值计算功能
parent
d4b376b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
22 deletions
+51
-22
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+32
-3
PrecipriceServiceImpl.java
...c/cement/business/service/impl/PrecipriceServiceImpl.java
+1
-1
WeiXinService.java
...n/wise/sc/cement/business/service/impl/WeiXinService.java
+18
-18
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
682ad102
...
@@ -116,7 +116,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -116,7 +116,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
@Autowired
@Autowired
private
WeiXinService
weiXinService
;
private
WeiXinService
weiXinService
;
@Autowired
@Autowired
IPrecipriceService
iNormProductionService
;
private
INormProductionService
iNormProductionService
;
@Autowired
private
IPrecipriceService
iPrecipriceService
;
/**
/**
...
@@ -949,6 +951,15 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -949,6 +951,15 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setStatus
(
0
)
.
setStatus
(
0
)
.
setAlias
(
handle
.
getName
());
.
setAlias
(
handle
.
getName
());
sampleHandleEnclosureList
.
add
(
sampleHandleEnclosure
);
sampleHandleEnclosureList
.
add
(
sampleHandleEnclosure
);
//获取产值信息
QueryWrapper
<
NormProduction
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"assess_id"
,
handle
.
getId
());
queryWrapper
.
eq
(
"type"
,
0
);
queryWrapper
.
eq
(
"status"
,
1
);
NormProduction
normProduction
=
iNormProductionService
.
getOne
(
queryWrapper
);
if
(
normProduction
==
null
){
return
BaseResponse
.
errorMsg
(
"联系管理员.配置产值信息!"
);
}
}
}
sampleHandleEnclosureService
.
saveBatch
(
sampleHandleEnclosureList
);
sampleHandleEnclosureService
.
saveBatch
(
sampleHandleEnclosureList
);
}
}
...
@@ -1236,7 +1247,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -1236,7 +1247,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(
sampleHandle
.
getContent
()
!=
null
)
{
if
(
sampleHandle
.
getContent
()
!=
null
)
{
String
[]
handIdS
=
sampleHandle
.
getContent
().
split
(
"、"
);
String
[]
handIdS
=
sampleHandle
.
getContent
().
split
(
"、"
);
for
(
String
handleId
:
handIdS
)
{
for
(
String
handleId
:
handIdS
)
{
iNormProductionService
.
createPreciprice
(
sampleHandle
.
getUserId
(),
entrust
.
getId
(),
Integer
.
valueOf
(
handleId
),
0
,
sample
.
getId
());
try
{
iPrecipriceService
.
createPreciprice
(
sampleHandle
.
getUserId
(),
entrust
.
getId
(),
Integer
.
valueOf
(
handleId
),
0
,
sample
.
getId
());
}
catch
(
Exception
e
){
return
BaseResponse
.
errorMsg
(
e
.
getMessage
());
}
}
}
}
}
QueryWrapper
<
SampleHandle
>
sampleHandleWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
SampleHandle
>
sampleHandleWrapper
=
new
QueryWrapper
<>();
...
@@ -1329,6 +1344,16 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -1329,6 +1344,16 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setStatus
(
0
)
.
setStatus
(
0
)
.
setCreateTime
(
LocalDateTime
.
now
());
.
setCreateTime
(
LocalDateTime
.
now
());
sampleDistributionList
.
add
(
sampleDistribution
);
sampleDistributionList
.
add
(
sampleDistribution
);
//获取产值信息
QueryWrapper
<
NormProduction
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"assess_id"
,
distributionTeamQuery
.
getTeamGroupId
());
queryWrapper
.
eq
(
"type"
,
1
);
queryWrapper
.
eq
(
"status"
,
1
);
NormProduction
normProduction
=
iNormProductionService
.
getOne
(
queryWrapper
);
if
(
normProduction
==
null
){
return
BaseResponse
.
errorMsg
(
"联系管理员.配置产值信息!"
);
}
//消息推送
//消息推送
BaseResponse
wrapper
=
userMessageService
.
sendMessage
(
distributionTeamQuery
.
getUserId
(),
"您有一条样品检测信息等待接受"
,
entrust
.
getId
(),
SysUserMessage
.
MessageType
.
ENTRUST
);
BaseResponse
wrapper
=
userMessageService
.
sendMessage
(
distributionTeamQuery
.
getUserId
(),
"您有一条样品检测信息等待接受"
,
entrust
.
getId
(),
SysUserMessage
.
MessageType
.
ENTRUST
);
if
(
wrapper
.
getCode
()
!=
200
){
if
(
wrapper
.
getCode
()
!=
200
){
...
@@ -1593,7 +1618,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -1593,7 +1618,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
List
<
SampleDistributionTeamVo
>
sampleDistributionTeamGroupVoList
=
distributionMapper
.
getDistributionTeamGroupList
(
sample
.
getId
(),
loginUser
.
getId
());
List
<
SampleDistributionTeamVo
>
sampleDistributionTeamGroupVoList
=
distributionMapper
.
getDistributionTeamGroupList
(
sample
.
getId
(),
loginUser
.
getId
());
if
(
sampleDistributionTeamGroupVoList
!=
null
&&
sampleDistributionTeamGroupVoList
.
size
()
>
0
)
{
if
(
sampleDistributionTeamGroupVoList
!=
null
&&
sampleDistributionTeamGroupVoList
.
size
()
>
0
)
{
for
(
SampleDistributionTeamVo
sdVo
:
sampleDistributionTeamGroupVoList
)
{
for
(
SampleDistributionTeamVo
sdVo
:
sampleDistributionTeamGroupVoList
)
{
iNormProductionService
.
createPreciprice
(
sdVo
.
getUserId
(),
entrust
.
getId
(),
sdVo
.
getTeamGroupId
(),
1
,
sample
.
getId
());
try
{
iPrecipriceService
.
createPreciprice
(
sdVo
.
getUserId
(),
entrust
.
getId
(),
sdVo
.
getTeamGroupId
(),
1
,
sample
.
getId
());
}
catch
(
Exception
e
){
return
BaseResponse
.
errorMsg
(
e
.
getMessage
());
}
}
}
}
}
sampleIdS
.
add
(
sample
.
getId
());
sampleIdS
.
add
(
sample
.
getId
());
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PrecipriceServiceImpl.java
View file @
682ad102
...
@@ -153,7 +153,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
...
@@ -153,7 +153,7 @@ public class PrecipriceServiceImpl extends ServiceImpl<PrecipriceMapper, Precipr
if
(
BeanUtil
.
isEmpty
(
normProduction
))
{
if
(
BeanUtil
.
isEmpty
(
normProduction
))
{
log
.
debug
(
"产值记录新增失败,产值信息没找到!"
);
log
.
debug
(
"产值记录新增失败,产值信息没找到!"
);
throw
new
IllegalArgumentException
(
"
处理项产值未配置配置
!"
);
throw
new
IllegalArgumentException
(
"
联系管理员.配置产值信息
!"
);
}
}
preciprice
.
setAnalyseRate
(
BigDecimal
.
valueOf
(
normProduction
.
getAnalyseRate
()));
preciprice
.
setAnalyseRate
(
BigDecimal
.
valueOf
(
normProduction
.
getAnalyseRate
()));
preciprice
.
setAssessRate
(
BigDecimal
.
valueOf
(
normProduction
.
getAssessId
()));
preciprice
.
setAssessRate
(
BigDecimal
.
valueOf
(
normProduction
.
getAssessId
()));
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/WeiXinService.java
View file @
682ad102
...
@@ -50,24 +50,24 @@ public class WeiXinService {
...
@@ -50,24 +50,24 @@ public class WeiXinService {
System
.
out
.
println
(
"==================code==================="
);
System
.
out
.
println
(
"==================code==================="
);
System
.
out
.
println
(
code
);
System
.
out
.
println
(
code
);
try
{
try
{
/*
String accessToken = null;
//
String accessToken = null;
if (type.equals("PC")) {
//
if (type.equals("PC")) {
accessToken = getAccessToken();
//
accessToken = getAccessToken();
} else if (type.equals("APP")) {
//
} else if (type.equals("APP")) {
accessToken = getPCAccessToken();
//
accessToken = getPCAccessToken();
} else {
//
} else {
return BaseResponse.errorMsg("参数错误");
//
return BaseResponse.errorMsg("参数错误");
}
//
}
String param = "access_token=%s&code=%s";
//
String param = "access_token=%s&code=%s";
param = String.format(param, accessToken, code);
//
param = String.format(param, accessToken, code);
JSONObject jsonObject = WeixinInterfaceUtil.doGet(Global.USERINFOURL, param);
//
JSONObject jsonObject = WeixinInterfaceUtil.doGet(Global.USERINFOURL, param);
if (jsonObject.get("errcode").toString().equals("40029")) {
//
if (jsonObject.get("errcode").toString().equals("40029")) {
return BaseResponse.errorMsg("code失效!");
//
return BaseResponse.errorMsg("code失效!");
}
//
}
String UserId = jsonObject.getString("UserId");
//
String UserId = jsonObject.getString("UserId");
System.out.println("==================UserId===================");
//
System.out.println("==================UserId===================");
System.out.println(UserId);
//
System.out.println(UserId);
JSONObject userJson = getUser(accessToken, UserId);*/
// JSONObject userJson = getUser(accessToken, UserId);
QueryWrapper
<
SysUser
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
SysUser
>
wrapper
=
new
QueryWrapper
<>();
// wrapper.eq("phone", userJson.get("mobile"));
// wrapper.eq("phone", userJson.get("mobile"));
wrapper
.
eq
(
"phone"
,
code
);
//暂时用手机号代替code
wrapper
.
eq
(
"phone"
,
code
);
//暂时用手机号代替code
...
...
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