Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
c597bc22
Commit
c597bc22
authored
Jul 05, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
f8a6473a
528f434d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
124 additions
and
38 deletions
+124
-38
HygfReplenishmentDto.java
...n/amos/boot/module/hygf/api/dto/HygfReplenishmentDto.java
+2
-1
HygfReplenishment.java
...n/amos/boot/module/hygf/api/entity/HygfReplenishment.java
+1
-1
PreparationMoney.java
...in/amos/boot/module/hygf/api/entity/PreparationMoney.java
+4
-0
PeasantHouseholdMapper.xml
...rc/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
+4
-6
QiyuesuoController.java
...s/boot/module/hygf/biz/controller/QiyuesuoController.java
+11
-6
SurveyInformationController.java
...dule/hygf/biz/controller/SurveyInformationController.java
+2
-1
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+79
-16
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+21
-7
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/HygfReplenishmentDto.java
View file @
c597bc22
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
*
*
...
@@ -28,6 +29,6 @@ public class HygfReplenishmentDto extends BaseDto {
...
@@ -28,6 +29,6 @@ public class HygfReplenishmentDto extends BaseDto {
private
String
comment
;
private
String
comment
;
@ApiModelProperty
(
value
=
"补货文件"
)
@ApiModelProperty
(
value
=
"补货文件"
)
private
String
file
;
private
List
<
Object
>
file
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/HygfReplenishment.java
View file @
c597bc22
...
@@ -41,6 +41,6 @@ public class HygfReplenishment extends BaseEntity {
...
@@ -41,6 +41,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件
* 补货文件
*/
*/
@TableField
(
value
=
"file"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
@TableField
(
value
=
"file"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
file
;
private
String
file
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PreparationMoney.java
View file @
c597bc22
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HygfReplenishmentDto
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -150,6 +151,9 @@ public class PreparationMoney extends BaseEntity {
...
@@ -150,6 +151,9 @@ public class PreparationMoney extends BaseEntity {
private
List
<
PreparationMoneyLog
>
preparationMoneyLog
;
//发货单流水
private
List
<
PreparationMoneyLog
>
preparationMoneyLog
;
//发货单流水
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
HygfReplenishmentDto
>
files
;
//发货单流水
@TableField
(
exist
=
false
)
private
String
instanceId
;
//发货单流水
private
String
instanceId
;
//发货单流水
//订单状态
//订单状态
@TableField
(
"order_status"
)
@TableField
(
"order_status"
)
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
View file @
c597bc22
...
@@ -11,13 +11,11 @@ and hygf_peasant_household.developer_id=#{developerId}
...
@@ -11,13 +11,11 @@ and hygf_peasant_household.developer_id=#{developerId}
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
and hygf_peasant_household.survey_or_not=3 and hygf_peasant_household.sequence_nbr not in
and hygf_peasant_household.survey_or_not=3 and hygf_peasant_household.sequence_nbr not in
(select hygf_document_station.station_id from hygf_preparation_money RIGHT JOIN hygf_document_station
(select hygf_document_station.station_id from hygf_preparation_money RIGHT JOIN hygf_document_station
on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nbr where hygf_preparation_money.order_status ='待发货'
on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nbr where
hygf_document_station.station_id is not null
<if
test=
"ids!=null and ids !=''"
>
<if
test=
"ids!=null and ids !=''"
>
and hygf_document_station.preparation_money_id !=#{ids}
and hygf_document_station.preparation_money_id !=#{ids}
</if>
</if>
)
and hygf_document_station.station_id is not null
)
<if
test=
"peasantHouseholdNo!=null and peasantHouseholdNo !=''"
>
<if
test=
"peasantHouseholdNo!=null and peasantHouseholdNo !=''"
>
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{peasantHouseholdNo}),"%")
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{peasantHouseholdNo}),"%")
</if>
</if>
...
@@ -70,7 +68,7 @@ and hygf_document_station.station_id is not null
...
@@ -70,7 +68,7 @@ and hygf_document_station.station_id is not null
<if
test=
"developerCode!=null and developerCode !=''"
>
<if
test=
"developerCode!=null and developerCode !=''"
>
and developer_code = #{developerCode}
and developer_code = #{developerCode}
</if>
</if>
ORDER BY
rec_dat
e DESC
ORDER BY
creation_tim
e DESC
</select>
</select>
<select
id=
"selectUserIsHouse"
resultType=
"java.util.Map"
>
<select
id=
"selectUserIsHouse"
resultType=
"java.util.Map"
>
SELECT
SELECT
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/QiyuesuoController.java
View file @
c597bc22
...
@@ -108,17 +108,22 @@ public class QiyuesuoController extends BaseController {
...
@@ -108,17 +108,22 @@ public class QiyuesuoController extends BaseController {
@PostMapping
(
value
=
"/getContractTokengz/{sequenceNbr}"
)
@PostMapping
(
value
=
"/getContractTokengz/{sequenceNbr}"
)
public
ResponseModel
<
Object
>
getContractSdkResponseSequenceNbr
(
@RequestBody
ContractMiniappTicketRequest
request
,
public
ResponseModel
<
Object
>
getContractSdkResponseSequenceNbr
(
@RequestBody
ContractMiniappTicketRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
QueryWrapper
<
SealDictionary
>
queryWrapper
=
new
QueryWrapper
();
SealDictionary
sealDictionary
=
sealDictionaryMapper
.
selectById
(
sequenceNbr
);
queryWrapper
.
eq
(
"amos_company_seq"
,
sequenceNbr
);
request
.
setUser
(
new
User
(
sealDictionary
.
getSealedPhone
(),
"MOBILE"
));
List
<
SealDictionary
>
sealDictionaryList
=
sealDictionaryMapper
.
selectList
(
queryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
sealDictionaryList
)){
request
.
setUser
(
new
User
(
sealDictionaryList
.
get
(
0
).
getSealedPhone
(),
"MOBILE"
));
}
SdkResponse
<
MiniappTicketResult
>
result
=
qiyuesuoService
.
getContractSdkResponse
(
request
);
SdkResponse
<
MiniappTicketResult
>
result
=
qiyuesuoService
.
getContractSdkResponse
(
request
);
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
return
ResponseHelper
.
buildResponse
(
result
.
getResult
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取所有盖章人员"
,
notes
=
"获取所有盖章人员"
)
@GetMapping
(
value
=
"/getAllUserByCompanySeq"
)
public
ResponseModel
<
List
<
SealDictionary
>>
getAll
(
@RequestParam
(
value
=
"companySeq"
)
Long
companySeq
)
{
QueryWrapper
<
SealDictionary
>
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"amos_company_seq"
,
companySeq
);
return
ResponseHelper
.
buildResponse
(
sealDictionaryMapper
.
selectList
(
queryWrapper
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取合同浏览令牌"
,
notes
=
"获取合同浏览令牌"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取合同浏览令牌"
,
notes
=
"获取合同浏览令牌"
)
@GetMapping
(
value
=
"/getContractTokenTicket/{sequenceNbr}"
)
@GetMapping
(
value
=
"/getContractTokenTicket/{sequenceNbr}"
)
public
ResponseModel
<
Object
>
getContractTokenTicket
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
Object
>
getContractTokenTicket
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/SurveyInformationController.java
View file @
c597bc22
...
@@ -119,12 +119,13 @@ public class SurveyInformationController extends BaseController {
...
@@ -119,12 +119,13 @@ public class SurveyInformationController extends BaseController {
* 勘察信息数据提交
* 勘察信息数据提交
*
*
* @return
* @return
* @throws Exception
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"勘察信息数据提交"
,
notes
=
"勘察信息数据提交"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"勘察信息数据提交"
,
notes
=
"勘察信息数据提交"
)
@PostMapping
(
value
=
"/surveySubmit"
)
@PostMapping
(
value
=
"/surveySubmit"
)
public
ResponseModel
<
SurveyInfoAllDto
>
surveySubmit
(
@RequestBody
SurveyInfoAllDto
surveyInfoAllDto
,
public
ResponseModel
<
SurveyInfoAllDto
>
surveySubmit
(
@RequestBody
SurveyInfoAllDto
surveyInfoAllDto
,
@RequestParam
(
value
=
"operationType"
)
String
operationType
)
{
@RequestParam
(
value
=
"operationType"
)
String
operationType
)
throws
Exception
{
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
saveSurveyInfo
(
surveyInfoAllDto
,
operationType
);
SurveyInfoAllDto
returnDto
=
surveyInformationServiceImpl
.
saveSurveyInfo
(
surveyInfoAllDto
,
operationType
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
return
ResponseHelper
.
buildResponse
(
returnDto
);
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
View file @
c597bc22
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -47,6 +48,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -47,6 +48,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
java.time.format.DateTimeFormatter
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* 发货单服务实现类
* 发货单服务实现类
...
@@ -188,6 +190,21 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -188,6 +190,21 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
List
<
DocumentStation
>
li
=
documentStationMapper
.
selectList
(
q
);
List
<
DocumentStation
>
li
=
documentStationMapper
.
selectList
(
q
);
preparationMoney
.
setPeasantHouseholdId
(
li
);
preparationMoney
.
setPeasantHouseholdId
(
li
);
LambdaQueryWrapper
<
HygfReplenishment
>
h
=
new
LambdaQueryWrapper
<>();
h
.
eq
(
HygfReplenishment:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfReplenishment
>
hygfReplenishments
=
hygfReplenishmentMapper
.
selectList
(
h
);
List
<
HygfReplenishmentDto
>
hygfReplenishmentDtos
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments
)
&&
!
hygfReplenishments
.
isEmpty
()
){
hygfReplenishments
.
forEach
(
e
->{
HygfReplenishmentDto
hygfReplenishmentDto
=
new
HygfReplenishmentDto
();
BeanUtils
.
copyProperties
(
e
,
hygfReplenishmentDto
);
hygfReplenishmentDto
.
setFile
(
JSON
.
parseArray
(
e
.
getFile
()));
hygfReplenishmentDtos
.
add
(
hygfReplenishmentDto
);
});
preparationMoney
.
setFiles
(
hygfReplenishmentDtos
);
}
return
preparationMoney
;
return
preparationMoney
;
}
}
...
@@ -215,12 +232,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -215,12 +232,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
qu
.
eq
(
PreparationMoney:
:
getSequenceNbr
,
sequenceNbr
);
qu
.
eq
(
PreparationMoney:
:
getSequenceNbr
,
sequenceNbr
);
PreparationMoney
preparationMoney
=
preparationMoneyMapper
.
selectOne
(
qu
);
PreparationMoney
preparationMoney
=
preparationMoneyMapper
.
selectOne
(
qu
);
LambdaUpdateWrapper
<
HygfReplenishment
>
h
=
new
LambdaUpdateWrapper
<>();
h
.
eq
(
HygfReplenishment:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfReplenishment
>
hygfReplenishments
=
hygfReplenishmentMapper
.
selectList
(
h
);
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments
)
&&
hygfReplenishments
.
size
()>
0
){
map
.
put
(
"files"
,
hygfReplenishments
);
}
LambdaUpdateWrapper
<
HygfPreparationMoneyAuditing
>
audit
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
HygfPreparationMoneyAuditing
>
audit
=
new
LambdaUpdateWrapper
<>();
audit
.
eq
(
HygfPreparationMoneyAuditing:
:
getPreparationMoneyId
,
sequenceNbr
);
audit
.
eq
(
HygfPreparationMoneyAuditing:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfPreparationMoneyAuditing
>
hygfPreparationMoneyAuditings
=
hygfPreparationMoneyAuditingService
.
getBaseMapper
().
selectList
(
audit
);
List
<
HygfPreparationMoneyAuditing
>
hygfPreparationMoneyAuditings
=
hygfPreparationMoneyAuditingService
.
getBaseMapper
().
selectList
(
audit
);
...
@@ -308,7 +319,25 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -308,7 +319,25 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
designInformation
.
setInverter
(
inverter
);
designInformation
.
setInverter
(
inverter
);
designInformation
.
setElectricityMeter
(
electricityMeter
);
designInformation
.
setElectricityMeter
(
electricityMeter
);
designInformation
.
setCable
(
cable
);
designInformation
.
setCable
(
cable
);
map
.
put
(
"preparationMoney"
,
preparationMoney
);
Map
<
String
,
Object
>
map2
=
Bean
.
BeantoMap
(
preparationMoney
);
LambdaUpdateWrapper
<
HygfReplenishment
>
h
=
new
LambdaUpdateWrapper
<>();
h
.
eq
(
HygfReplenishment:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfReplenishment
>
hygfReplenishments
=
hygfReplenishmentMapper
.
selectList
(
h
);
List
<
HygfReplenishmentDto
>
hygfReplenishmentDtos
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishments
)
&&
!
hygfReplenishments
.
isEmpty
()
){
hygfReplenishments
.
forEach
(
e
->{
HygfReplenishmentDto
hygfReplenishmentDto
=
new
HygfReplenishmentDto
();
BeanUtils
.
copyProperties
(
e
,
hygfReplenishmentDto
);
hygfReplenishmentDto
.
setFile
(
JSON
.
parseArray
(
e
.
getFile
()));
hygfReplenishmentDtos
.
add
(
hygfReplenishmentDto
);
});
map2
.
put
(
"files"
,
hygfReplenishmentDtos
);
}
map
.
put
(
"preparationMoney"
,
map2
);
map
.
put
(
"designInformation"
,
designInformation
);
map
.
put
(
"designInformation"
,
designInformation
);
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"preparationMoneyLog"
,
liD
);
map1
.
put
(
"preparationMoneyLog"
,
liD
);
...
@@ -602,8 +631,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -602,8 +631,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
//更新电站施工状态
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
List
<
DocumentStation
>
idsk
=
model
.
getPeasantHouseholdId
();
preparationMoneyMapper
.
insert
(
model
);
preparationMoneyMapper
.
insert
(
model
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
if
(
isSubmit
.
equals
(
"0"
))
{
if
(
isSubmit
.
equals
(
"0"
))
{
...
@@ -655,9 +682,9 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -655,9 +682,9 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
listDocumentStation
.
add
(
documentStation
);
listDocumentStation
.
add
(
documentStation
);
}
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
peasantHouseholdMapper
.
update
(
null
,
up
);
documentStationService
.
saveBatch
(
listDocumentStation
);
documentStationService
.
saveBatch
(
listDocumentStation
);
}
}
peasantHouseholdMapper
.
update
(
null
,
up
);
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
...
@@ -732,10 +759,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -732,10 +759,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
//电站信息存储
//电站信息存储
LambdaQueryWrapper
<
DocumentStation
>
query1
=
new
LambdaQueryWrapper
<>();
query1
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
List
<
Long
>
oldIds
=
documentStationMapper
.
selectList
(
query1
).
stream
().
map
(
DocumentStation:
:
getStationId
).
collect
(
Collectors
.
toList
());
LambdaUpdateWrapper
<
PeasantHousehold
>
up1
=
new
LambdaUpdateWrapper
<>();
up1
.
in
(
BaseEntity:
:
getSequenceNbr
,
oldIds
);
up1
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
待发货
.
getCode
());
up1
.
set
(
PeasantHousehold:
:
getConstructionState
,
"勘察完成"
);
peasantHouseholdMapper
.
update
(
null
,
up1
);
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
documentStationMapper
.
delete
(
up3
);
//电站信息存储
//电站信息存储
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
...
@@ -1061,29 +1098,55 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
...
@@ -1061,29 +1098,55 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
if
(
"1"
.
equals
(
isSubmit
)){
if
(
"1"
.
equals
(
isSubmit
)){
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
}
else
{
}
else
{
if
(
CollectionUtil
.
isEmpty
(
model
.
getPeasantHouseholdId
())){
throw
new
BadRequest
(
"提交时选择电站不可为空"
);
}
if
(
CollectionUtil
.
isEmpty
(
model
.
getDeliveryFile
())){
throw
new
BadRequest
(
"提交时发货单不可为空"
);
}
//isSubmit = 0 表示提交 也对应工作流表达式 可直接使用
//isSubmit = 0 表示提交 也对应工作流表达式 可直接使用
model
.
setOrderStatus
(
DeliveryStateeEnum
.
待确认
.
getCode
());
model
.
setOrderStatus
(
DeliveryStateeEnum
.
待确认
.
getCode
());
preparationMoneyMapper
.
updateById
(
model
);
preparationMoneyMapper
.
updateById
(
model
);
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
待补货
.
getName
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
待补货
.
getName
());
peasantHouseholdMapper
.
update
(
null
,
up
);
this
.
wofkflowExcute
(
instanceId
,
isSubmit
,
""
);
this
.
wofkflowExcute
(
instanceId
,
isSubmit
,
""
);
}
}
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
//电站信息存储
//电站信息存储
LambdaQueryWrapper
<
DocumentStation
>
query1
=
new
LambdaQueryWrapper
<>();
query1
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
List
<
Long
>
oldIds
=
documentStationMapper
.
selectList
(
query1
).
stream
().
map
(
DocumentStation:
:
getStationId
).
collect
(
Collectors
.
toList
());
LambdaUpdateWrapper
<
PeasantHousehold
>
up1
=
new
LambdaUpdateWrapper
<>();
up1
.
in
(
BaseEntity:
:
getSequenceNbr
,
oldIds
);
up1
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
待发货
.
getCode
());
up1
.
set
(
PeasantHousehold:
:
getConstructionState
,
"勘察完成"
);
peasantHouseholdMapper
.
update
(
null
,
up1
);
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
documentStationMapper
.
delete
(
up3
);
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
//电站信息存储
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
List
<
DocumentStation
>
listDocumentStation
=
new
ArrayList
<>();
List
<
Long
>
idsH
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
ids
)
{
for
(
DocumentStation
documentStation
:
ids
)
{
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
documentStation
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
documentStation
.
setSequenceNbr
(
null
);
idsH
.
add
(
documentStation
.
getStationId
());
listDocumentStation
.
add
(
documentStation
);
listDocumentStation
.
add
(
documentStation
);
}
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
待补货
.
getName
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
待补货
.
getName
());
peasantHouseholdMapper
.
update
(
null
,
up
);
documentStationService
.
saveBatch
(
listDocumentStation
);
documentStationService
.
saveBatch
(
listDocumentStation
);
}
return
model
;
return
model
;
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
c597bc22
...
@@ -88,6 +88,8 @@ public class SurveyInformationServiceImpl
...
@@ -88,6 +88,8 @@ public class SurveyInformationServiceImpl
@Autowired
@Autowired
IPowerStationService
powerStationService
;
IPowerStationService
powerStationService
;
@Autowired
@Autowired
PowerStationMapper
powerStationMapper
;
@Autowired
ToDoTasksMapper
toDoTasksMapper
;
ToDoTasksMapper
toDoTasksMapper
;
@Autowired
@Autowired
UserMessageMapper
userMessageMapper
;
UserMessageMapper
userMessageMapper
;
...
@@ -170,10 +172,19 @@ public class SurveyInformationServiceImpl
...
@@ -170,10 +172,19 @@ public class SurveyInformationServiceImpl
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
()
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
()
.
selectOne
(
peasantHouseholdQueryWrapper
);
.
selectOne
(
peasantHouseholdQueryWrapper
);
PowerStation
powerStation
=
powerStationMapper
.
selectOne
(
new
LambdaQueryWrapper
<
PowerStation
>()
.
eq
(
PowerStation:
:
getPeasantHouseholdId
,
peasantHousehold
.
getSequenceNbr
()));
if
(
ArrivalStateeEnum
.
勘察中
.
getCode
().
equals
(
peasantHousehold
.
getConstructionState
()))
{
if
(
ArrivalStateeEnum
.
勘察中
.
getCode
().
equals
(
peasantHousehold
.
getConstructionState
()))
{
// 驳回后重新提交是勘察中->勘察中导致此逻辑有问题,所以去掉这种情况
if
(
powerStation
!=
null
&&
PowerStationProcessStateEnum
.
不通过
.
getName
().
equals
(
powerStation
.
getProcessStatus
()))
{
}
else
{
throw
new
BadRequest
(
"勘察中,请稍后再试!"
);
throw
new
BadRequest
(
"勘察中,请稍后再试!"
);
}
}
}
surveyInformation
.
setReview
(
0
);
surveyInformation
.
setReview
(
0
);
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
)
&&
null
==
surveyInformation
.
getCreatorTime
())
{
if
(
OPERATION_TYPE_APPLY
.
equals
(
operationType
)
&&
null
==
surveyInformation
.
getCreatorTime
())
{
surveyInformation
.
setCreatorTime
(
new
Date
());
surveyInformation
.
setCreatorTime
(
new
Date
());
...
@@ -187,7 +198,7 @@ public class SurveyInformationServiceImpl
...
@@ -187,7 +198,7 @@ public class SurveyInformationServiceImpl
// 避免生成多份数据
// 避免生成多份数据
extendedInformationService
.
saveOrUpdate
(
extendedInformation
,
new
LambdaQueryWrapper
<
ExtendedInformation
>()
extendedInformationService
.
saveOrUpdate
(
extendedInformation
,
new
LambdaQueryWrapper
<
ExtendedInformation
>()
.
eq
(
ExtendedInformation:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
.
eq
(
ExtendedInformation:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
//
extendedInformationService.saveOrUpdate(extendedInformation);
//
extendedInformationService.saveOrUpdate(extendedInformation);
// 更新勘察明细信息
// 更新勘察明细信息
SurveyDetailsDto
oldSurveyDetails
=
surveyInfoAllDto
.
getSurveyDetails
();
SurveyDetailsDto
oldSurveyDetails
=
surveyInfoAllDto
.
getSurveyDetails
();
...
@@ -196,7 +207,7 @@ public class SurveyInformationServiceImpl
...
@@ -196,7 +207,7 @@ public class SurveyInformationServiceImpl
// 避免生成多份数据
// 避免生成多份数据
surveyDetailsService
.
saveOrUpdate
(
surveyDetails
,
new
LambdaQueryWrapper
<
SurveyDetails
>()
surveyDetailsService
.
saveOrUpdate
(
surveyDetails
,
new
LambdaQueryWrapper
<
SurveyDetails
>()
.
eq
(
SurveyDetails:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
.
eq
(
SurveyDetails:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
//
surveyDetailsService.saveOrUpdate(surveyDetails);
//
surveyDetailsService.saveOrUpdate(surveyDetails);
// 更新商务信息
// 更新商务信息
CommercialDto
oldCommercial
=
surveyInfoAllDto
.
getCommercial
();
CommercialDto
oldCommercial
=
surveyInfoAllDto
.
getCommercial
();
...
@@ -215,11 +226,14 @@ public class SurveyInformationServiceImpl
...
@@ -215,11 +226,14 @@ public class SurveyInformationServiceImpl
// 避免生成多份数据
// 避免生成多份数据
commercialService
.
saveOrUpdate
(
commercial
,
new
LambdaQueryWrapper
<
Commercial
>()
commercialService
.
saveOrUpdate
(
commercial
,
new
LambdaQueryWrapper
<
Commercial
>()
.
eq
(
Commercial:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
.
eq
(
Commercial:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
//
commercialService.saveOrUpdate(commercial);
//
commercialService.saveOrUpdate(commercial);
// 勘察后,更新状态
// 勘察后,更新状态
// QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new QueryWrapper<>();
// QueryWrapper<PeasantHousehold> peasantHouseholdQueryWrapper = new
// peasantHouseholdQueryWrapper.eq("survey_information_id", surveyInformation.getSequenceNbr());
// QueryWrapper<>();
// PeasantHousehold peasantHousehold = peasantHouseholdServiceImpl.getBaseMapper()
// peasantHouseholdQueryWrapper.eq("survey_information_id",
// surveyInformation.getSequenceNbr());
// PeasantHousehold peasantHousehold =
// peasantHouseholdServiceImpl.getBaseMapper()
// .selectOne(peasantHouseholdQueryWrapper);
// .selectOne(peasantHouseholdQueryWrapper);
// 更新资料归档信息
// 更新资料归档信息
...
@@ -238,7 +252,7 @@ public class SurveyInformationServiceImpl
...
@@ -238,7 +252,7 @@ public class SurveyInformationServiceImpl
// 避免生成多份数据
// 避免生成多份数据
informationService
.
saveOrUpdate
(
information
,
new
LambdaQueryWrapper
<
Information
>()
informationService
.
saveOrUpdate
(
information
,
new
LambdaQueryWrapper
<
Information
>()
.
eq
(
Information:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
.
eq
(
Information:
:
getSurveyInformationId
,
surveyInformation
.
getSequenceNbr
()));
//
informationService.saveOrUpdate(information);
//
informationService.saveOrUpdate(information);
peasantHousehold
.
setOwnersName
(
surveyInfoAllDto
.
getSurveyInformation
().
getOwnersName
());
peasantHousehold
.
setOwnersName
(
surveyInfoAllDto
.
getSurveyInformation
().
getOwnersName
());
peasantHousehold
.
setTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephone
());
peasantHousehold
.
setTelephone
(
surveyInfoAllDto
.
getSurveyInformation
().
getTelephone
());
...
...
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