Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
1b8a2b38
Commit
1b8a2b38
authored
Aug 22, 2023
by
杨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发货单
新增/编辑/详情接口 更新发货单状态接口
parent
820829c6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
7 deletions
+28
-7
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+28
-7
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
View file @
1b8a2b38
...
@@ -38,6 +38,7 @@ import org.springframework.beans.BeanUtils;
...
@@ -38,6 +38,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
@@ -254,6 +255,9 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
...
@@ -254,6 +255,9 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
}
}
public
PeasantHouseholdWxDto
wxUserLogin
(
MobileLoginParamDto
wxDTO
)
{
public
PeasantHouseholdWxDto
wxUserLogin
(
MobileLoginParamDto
wxDTO
)
{
/*if(StringUtils.isBlank(wxDTO.getUserId())) {
throw new BadRequest("");
}*/
// 通过手机号和验证码调用平台接口进行验证
// 通过手机号和验证码调用平台接口进行验证
String
phoneNo
=
this
.
parsePhoneNo
(
wxDTO
);
String
phoneNo
=
this
.
parsePhoneNo
(
wxDTO
);
//String phoneNo = "13022982292";
//String phoneNo = "13022982292";
...
@@ -397,15 +401,29 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
...
@@ -397,15 +401,29 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
}
}
public
PeasantHouseholdDto
buildDefaultPeasantHouseholdDto
(
String
qrCodeType
,
AgencyUserModel
userInfo
)
{
public
PeasantHouseholdDto
buildDefaultPeasantHouseholdDto
(
String
qrCodeType
,
AgencyUserModel
userInfo
)
{
/*if (null == userInfo || null == userInfo.getCompanys()) {
throw new BadRequest("查询不到经销商信息");
}
Long sequenceNbr = userInfo.getCompanys().get(0).getSequenceNbr();
Long sequenceNbr = userInfo.getCompanys().get(0).getSequenceNbr();
Integer companyOrgCode = userInfo.getCompanys().get(0).getCompanyOrgCode();
Integer companyOrgCode = userInfo.getCompanys().get(0).getCompanyOrgCode();
String companyName = userInfo.getCompanys().get(0).getCompanyName();
String companyName = userInfo.getCompanys().get(0).getCompanyName();
// unitInfoServiceImpl.createCompanyAndUser 创建经销商的时候绑定的平台用户
// unitInfoServiceImpl.createCompanyAndUser 创建经销商的时候绑定的平台用户
List<UnitInfo> unitInfos = unitInfoServiceImpl.list(new LambdaQueryWrapper<UnitInfo>().eq(UnitInfo::getAmosCompanySeq, sequenceNbr));
List<UnitInfo> unitInfos = unitInfoServiceImpl.list(new LambdaQueryWrapper<UnitInfo>().eq(UnitInfo::getAmosCompanySeq, sequenceNbr));
Long
regionalCompaniesSeq
=
unitInfos
.
get
(
0
).
getRegionalCompaniesSeq
();
UnitInfo unitInfo = null;
String
regionalCompaniesCode
=
unitInfos
.
get
(
0
).
getRegionalCompaniesCode
();
if (CollectionUtils.isEmpty(unitInfos)) {
String
regionalCompaniesName
=
unitInfos
.
get
(
0
).
getRegionalCompaniesName
();
log.warn("userId:{} 查询不到经销商信息", userInfo.getUserId());
throw new BadRequest("查询不到经销商信息");
}
Long regionalCompaniesSeq = unitInfo.getRegionalCompaniesSeq();
String regionalCompaniesCode = unitInfo.getRegionalCompaniesCode();
String regionalCompaniesName = unitInfo.getRegionalCompaniesName();*/
// 先写假数据
Long
sequenceNbr
=
Long
.
valueOf
(
"1678209772383399937"
);
Integer
companyOrgCode
=
86
;
String
companyName
=
"经销商测试单位01"
;
Long
regionalCompaniesSeq
=
Long
.
valueOf
(
"1678209772383399937"
);
String
regionalCompaniesCode
=
"C2365"
;
String
regionalCompaniesName
=
"经销商测试区域"
;
PeasantHouseholdDto
dto
=
new
PeasantHouseholdDto
();
PeasantHouseholdDto
dto
=
new
PeasantHouseholdDto
();
/*dto.setPeasantHouseholdNo(this.getPeasantHouseholdNo());
/*dto.setPeasantHouseholdNo(this.getPeasantHouseholdNo());
dto.setIsCertified(0);// 未认证
dto.setIsCertified(0);// 未认证
...
@@ -426,11 +444,14 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
...
@@ -426,11 +444,14 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
private
PeasantHouseholdDto
buildDefaultPeasantHouseholdDto
(
String
userId
,
String
qrCodeType
,
String
phoneNo
)
{
private
PeasantHouseholdDto
buildDefaultPeasantHouseholdDto
(
String
userId
,
String
qrCodeType
,
String
phoneNo
)
{
// 获取区域
// 获取区域
FeignClientResult
<
AgencyUserModel
>
userInfoResult
=
Privilege
.
agencyUserClient
.
queryByUserId
(
userId
);
// 获取用户
/*
FeignClientResult<AgencyUserModel> userInfoResult = Privilege.agencyUserClient.queryByUserId(userId);// 获取用户
if (userInfoResult.getStatus() != 200) {
if (userInfoResult.getStatus() != 200) {
throw new BadRequest("userId错误");
throw new BadRequest("userId错误");
}
}*/
AgencyUserModel
userInfo
=
userInfoResult
.
getResult
();
/* AgencyUserModel userInfo = userInfoResult.getResult();*/
AgencyUserModel
userInfo
=
new
AgencyUserModel
();
userInfo
.
setUserId
(
"5151508"
);
log
.
info
(
"获取到的用户信息:{}"
,
userInfo
);
PeasantHouseholdDto
dto
=
buildDefaultPeasantHouseholdDto
(
qrCodeType
,
userInfo
);
PeasantHouseholdDto
dto
=
buildDefaultPeasantHouseholdDto
(
qrCodeType
,
userInfo
);
dto
.
setTelephone
(
phoneNo
);
dto
.
setTelephone
(
phoneNo
);
return
dto
;
return
dto
;
...
...
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