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
820829c6
Commit
820829c6
authored
Aug 22, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
6f293c6a
f9dfa05d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
32 deletions
+25
-32
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+1
-1
PeasantHouseholdDto.java
...in/amos/boot/module/hygf/api/dto/PeasantHouseholdDto.java
+2
-2
PeasantHousehold.java
...in/amos/boot/module/hygf/api/entity/PeasantHousehold.java
+2
-3
PeasantHouseholdWxController.java
...ule/hygf/biz/controller/PeasantHouseholdWxController.java
+3
-3
HouseholdContractServiceImpl.java
...e/hygf/biz/service/impl/HouseholdContractServiceImpl.java
+9
-19
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+8
-4
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
820829c6
...
...
@@ -99,7 +99,7 @@ public class ControllerAop {
urls
.
add
(
"/tzs/reg-unit-info/save"
);
urls
.
add
(
"/hygf/unit-info/region/tree"
);
urls
.
add
(
"/hygf/unit-info/management-unit/tree"
);
urls
.
add
(
"/hygf/unit-info/hasExistPhone/*"
);
urls
.
add
(
"/hygf/unit-info/hasExistPhone/
.
*"
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PeasantHouseholdDto.java
View file @
820829c6
...
...
@@ -118,11 +118,11 @@ public class PeasantHouseholdDto extends BaseDto {
@ApiModelProperty
(
value
=
"身份证正面"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
idCardFront
;
private
List
<
Object
>
idCardFront
;
@ApiModelProperty
(
value
=
"身份证反面"
)
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
idCardOpposite
;
private
List
<
Object
>
idCardOpposite
;
@ApiModelProperty
(
value
=
"微信唯一id"
)
private
String
openId
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PeasantHousehold.java
View file @
820829c6
...
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
@@ -159,12 +158,12 @@ public class PeasantHousehold extends BaseEntity {
* 身份证正面
* */
@TableField
(
value
=
"id_card_front"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
idCardFront
;
private
List
<
Object
>
idCardFront
;
/*
* 身份证反面
* */
@TableField
(
value
=
"id_card_opposite"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
String
>
idCardOpposite
;
private
List
<
Object
>
idCardOpposite
;
/*
* 微信唯一id
* */
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PeasantHouseholdWxController.java
View file @
820829c6
...
...
@@ -128,7 +128,7 @@ public class PeasantHouseholdWxController extends BaseController {
@RequestMapping
(
value
=
"/register"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"微信农户注册"
,
notes
=
"微信农户注册"
)
public
ResponseModel
<
PeasantHouseholdDto
>
wxUserRegister
(
@ApiParam
@RequestBody
MobileLoginParamDto
mobileLoginParam
)
{
log
.
info
(
"微信农户注册, 入参 => {}"
,
JSONObject
.
toJSONString
(
mobileLoginParam
));
//
log.info("微信农户注册, 入参 => {}", JSONObject.toJSONString(mobileLoginParam));
if
(
null
==
mobileLoginParam
.
getPeasantHouseholdDto
())
{
throw
new
BadRequest
(
"农户信息不能为空"
);
}
...
...
@@ -143,7 +143,7 @@ public class PeasantHouseholdWxController extends BaseController {
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
// 处理项目地址
String
area
=
""
;
if
(
model
.
getProjectAddress
().
size
()
!=
0
)
{
if
(
model
.
getProjectAddress
()
!=
null
&&
model
.
getProjectAddress
()
.
size
()
!=
0
)
{
for
(
Integer
reg
:
model
.
getProjectAddress
())
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
...
...
@@ -158,7 +158,7 @@ public class PeasantHouseholdWxController extends BaseController {
}
else
{
// 处理常住地址
String
permanent
=
""
;
if
(
model
.
getPermanentAddress
().
size
()
!=
0
)
{
if
(
model
.
getPermanentAddress
()
!=
null
&&
model
.
getPermanentAddress
()
.
size
()
!=
0
)
{
for
(
Integer
reg
:
model
.
getPermanentAddress
())
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HouseholdContractServiceImpl.java
View file @
820829c6
...
...
@@ -40,12 +40,12 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
@Autowired
QiyuesuoServiceImpl
qiyuesuoServiceImpl
;
@Value
(
"${qiyuesuo.category}"
)
String
category
;
@Value
(
"${qiyuesuo.companyTenantName}"
)
String
companyTenantName
;
@Value
(
"${qiyuesuo.companyUsername}"
)
String
companyUsername
;
//
@Value("${qiyuesuo.category}")
String
category
=
"智信能源合同"
;
//
@Value("${qiyuesuo.companyTenantName}")
String
companyTenantName
=
"智信能源科技有限公司-测试"
;
//
@Value("${qiyuesuo.companyUsername}")
String
companyUsername
=
"唐伟"
;
@Value
(
"${qiyuesuo.companyContact}"
)
String
companyContact
;
...
...
@@ -143,19 +143,9 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
// contractDataDto.setEndTime(sdf.format(afterOneMonth));
//// contractDataDto.setExpireTime(sdf.format(model.getLeaseEndDate()));
try
{
contractDataDto
.
setCategory
(
new
String
(
category
.
getBytes
(
"ISO8859-1"
),
"UTF-8"
));
contractDataDto
.
setCompanyTenantName
(
new
String
(
companyTenantName
.
getBytes
(
"ISO8859-1"
),
"UTF-8"
));
contractDataDto
.
setCompanyUsername
(
new
String
(
companyUsername
.
getBytes
(
"ISO8859-1"
),
"UTF-8"
));
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
contractDataDto
.
setCategory
(
category
);
contractDataDto
.
setCompanyTenantName
(
companyTenantName
);
contractDataDto
.
setCompanyUsername
(
companyUsername
);
contractDataDto
.
setCompanyContact
(
companyContact
);
contractDataDto
.
setEmplateId
(
model
.
getContractTemplateId
());
...
...
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 @
820829c6
...
...
@@ -31,6 +31,7 @@ import com.yeejoin.amos.feign.privilege.model.VerifyCodeAuthModel;
import
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -50,9 +51,11 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
javax.crypto.Cipher
;
import
javax.crypto.NoSuchPaddingException
;
import
javax.crypto.spec.IvParameterSpec
;
import
javax.crypto.spec.SecretKeySpec
;
import
java.io.InputStream
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.spec.AlgorithmParameterSpec
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -72,6 +75,7 @@ import java.util.stream.Collectors;
* @date 2023-07-07
*/
@Service
@Slf4j
public
class
PeasantHouseholdServiceImpl
extends
BaseService
<
PeasantHouseholdDto
,
PeasantHousehold
,
PeasantHouseholdMapper
>
implements
IPeasantHouseholdService
{
private
Long
TOKEN_TIME
=
1209600
l
;
...
...
@@ -256,12 +260,14 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
if
(
phoneNo
==
null
)
{
throw
new
BadRequest
(
"获取手机号失败!"
);
}
log
.
info
(
"getPhoneNo:{}"
,
phoneNo
);
wxDTO
.
setPhoneNo
(
phoneNo
);
// 在平台里注册过但是没有农户信息
FeignClientResult
<
LoginInfoModel
>
loginInfo
=
Privilege
.
agencyUserClient
.
getLoginInfo
(
phoneNo
);
if
(
200
==
loginInfo
.
getStatus
())
{
LoginInfoModel
loginInfoModel
=
loginInfo
.
getResult
();
if
(
loginInfoModel
==
null
||
!
StringUtils
.
isNotBlank
(
loginInfoModel
.
getLoginId
()))
{
log
.
info
(
"没有发现用户,开始注册:{}"
,
phoneNo
);
doRegister
(
wxDTO
);
}
}
...
...
@@ -315,7 +321,7 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
agencyUserModel
.
setAppCodes
(
split
);
agencyUserModel
.
setOrgRoles
(
orgRoles
);
agencyUserModel
.
setOrgRoleSeqs
(
roleSeqMap
);
log
.
info
(
"agencyUserModel:{}"
,
agencyUserModel
);
FeignClientResult
<
AgencyUserModel
>
userResult
=
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
if
(
userResult
.
getStatus
()
!=
200
)
{
log
.
error
(
"调用平台创建用户信息失败:{}"
+
userResult
.
getDevMessage
());
...
...
@@ -461,6 +467,7 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
resultString
=
new
String
(
cipher
.
doFinal
(
encrypData
),
"UTF-8"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"getPhoneNumber error:"
,
e
);
}
JSONObject
object
=
JSONObject
.
parseObject
(
resultString
);
if
(
object
!=
null
)
{
...
...
@@ -482,9 +489,6 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
authModel
.
setLoginId
(
"admin_jxiop"
);
authModel
.
setPassword
(
"AC286A35E74D2DD281EB979789DECF3A"
);
/*IdPasswordAuthModel authModel = new IdPasswordAuthModel();
authModel.setLoginId(platfromAccessLoginId);
authModel.setPassword(DesUtil.encode(,"qaz"));*/
/* IdPasswordAuthModel authModel = new IdPasswordAuthModel();
authModel.setLoginId(platfromAccessLoginId);
authModel.setPassword(platfromAccessPassword);*/
...
...
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