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
f0fe82cf
Commit
f0fe82cf
authored
Jul 05, 2024
by
hezhuozhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
e6e2e585
f462b681
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
103 additions
and
68 deletions
+103
-68
HygfReplenishmentDto.java
...n/amos/boot/module/hygf/api/dto/HygfReplenishmentDto.java
+3
-1
HygfReplenishment.java
...n/amos/boot/module/hygf/api/entity/HygfReplenishment.java
+1
-1
HygfReplenishmentMapper.java
.../boot/module/hygf/api/mapper/HygfReplenishmentMapper.java
+4
-0
PeasantHouseholdMapper.java
...s/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
+0
-2
HygfReplenishmentMapper.xml
...c/main/resources/mapper/mysql/HygfReplenishmentMapper.xml
+5
-0
PreparationMoneyMapper.xml
...rc/main/resources/mapper/mysql/PreparationMoneyMapper.xml
+1
-1
HouseholdContractController.java
...dule/hygf/biz/controller/HouseholdContractController.java
+3
-0
MaintenanceController.java
...oot/module/hygf/biz/controller/MaintenanceController.java
+10
-1
PreparationMoneyController.java
...odule/hygf/biz/controller/PreparationMoneyController.java
+7
-5
QiyuesuoController.java
...s/boot/module/hygf/biz/controller/QiyuesuoController.java
+3
-0
FinancingInfoServiceImpl.java
...odule/hygf/biz/service/impl/FinancingInfoServiceImpl.java
+1
-1
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+1
-1
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+64
-55
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 @
f0fe82cf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
...
@@ -29,6 +31,6 @@ public class HygfReplenishmentDto extends BaseDto {
private
String
comment
;
@ApiModelProperty
(
value
=
"补货文件"
)
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/HygfReplenishment.java
View file @
f0fe82cf
...
...
@@ -41,6 +41,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件
*/
@TableField
(
value
=
"file"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
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/mapper/HygfReplenishmentMapper.java
View file @
f0fe82cf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.HygfReplenishmentDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HygfReplenishment
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
java.util.List
;
/**
* Mapper 接口
*
...
...
@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
HygfReplenishmentMapper
extends
BaseMapper
<
HygfReplenishment
>
{
List
<
HygfReplenishmentDto
>
selectData
(
Long
sequenceNbr
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
View file @
f0fe82cf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserEmpower
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PeasantHouseholdDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
org.apache.ibatis.annotations.Param
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/HygfReplenishmentMapper.xml
View file @
f0fe82cf
...
...
@@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.HygfReplenishmentMapper"
>
<select
id=
"selectData"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.dto.HygfReplenishmentDto"
>
select * from hygf_replenishment where preparation_money_id = #{sequenceNbr}
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PreparationMoneyMapper.xml
View file @
f0fe82cf
...
...
@@ -31,7 +31,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
and hygf_preparation_money.amos_unit_id = #{dto.amosUnitId}
</if>
<if
test=
"dto.flag != null and dto.flag != ''"
>
and hygf_preparation_money.delivery_state != "已作废"
and hygf_preparation_money.delivery_state != "已作废"
and hygf_preparation_money.delivery_state != "待发货"
</if>
<if
test=
"dto.deliveryTimeStart != null and dto.deliveryTimeEnd != ''"
>
and hygf_preparation_money.delivery_time between #{dto.deliveryTimeStart} and #{dto.deliveryTimeEnd}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/HouseholdContractController.java
View file @
f0fe82cf
...
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.feign.privilege.Privilege;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -47,6 +48,7 @@ import java.util.stream.Collectors;
@RestController
@Api
(
tags
=
"Api"
)
@RequestMapping
(
value
=
"/household-contract"
)
@Slf4j
public
class
HouseholdContractController
extends
BaseController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
HouseholdContractController
.
class
);
@Autowired
...
...
@@ -319,6 +321,7 @@ public class HouseholdContractController extends BaseController {
try
{
householdContract
=
householdContractServiceImpl
.
reissueinitiateHouseholdContract
(
model
);
}
catch
(
Exception
e
){
log
.
error
(
"重新发起合同错误, 入参: {}, error:"
,
JSON
.
toJSONString
(
model
),
e
);
throw
new
BadRequest
(
e
.
getMessage
());
}
return
ResponseHelper
.
buildResponse
(
householdContract
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/MaintenanceController.java
View file @
f0fe82cf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.DropDown
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.Maintenance
;
...
...
@@ -9,6 +10,7 @@ import com.yeejoin.amos.boot.module.hygf.api.mapper.JpStationMapper;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.MaintenanceMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.json.JSONObject
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -22,6 +24,7 @@ import java.util.List;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.MaintenanceServiceImpl
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -43,6 +46,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@RestController
@Api
(
tags
=
"运维人员Api"
)
@RequestMapping
(
value
=
"/maintenance"
)
@Slf4j
public
class
MaintenanceController
extends
BaseController
{
@Autowired
...
...
@@ -62,7 +66,12 @@ public class MaintenanceController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增运维人员"
,
notes
=
"新增运维人员"
)
public
ResponseModel
<
Maintenance
>
save
(
@RequestBody
Maintenance
model
)
{
model
=
maintenanceServiceImpl
.
saveMaintenance
(
model
);
try
{
model
=
maintenanceServiceImpl
.
saveMaintenance
(
model
);
}
catch
(
Exception
e
)
{
log
.
error
(
"农户注册错误, 入参: {}, error:"
,
JSON
.
toJSONString
(
model
),
e
);
throw
new
BadRequest
(
e
.
getMessage
());
}
return
ResponseHelper
.
buildResponse
(
model
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PreparationMoneyController.java
View file @
f0fe82cf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.hygf.api.config.UserLimits
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PeasantHouseholdDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PreparationMoneyDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.PreparationPageDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.*
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.DesignInformation
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.HygfReplenishment
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
...
...
@@ -24,6 +22,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
io.seata.spring.annotation.GlobalTransactional
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -69,6 +68,7 @@ public class PreparationMoneyController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增发货单"
,
notes
=
"新增发货单"
)
@GlobalTransactional
@UserLimits
public
ResponseModel
<
PreparationMoney
>
save
(
@RequestParam
(
"isSubmit"
)
String
isSubmit
,
@RequestBody
PreparationMoney
model
)
{
AgencyUserModel
agencyUserModel
=
getUserInfo
();
model
=
preparationMoneyServiceImpl
.
saveOrUpdateObjectNew
(
model
,
agencyUserModel
,
isSubmit
);
...
...
@@ -278,7 +278,9 @@ public class PreparationMoneyController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"补货申请"
,
notes
=
"补货申请"
)
@GlobalTransactional
public
ResponseModel
replenishmentSubmit
(
@RequestBody
HygfReplenishment
hygfReplenishment
)
{
// HygfReplenishment hygfReplenishment1 = new HygfReplenishment();
// BeanUtils.copyProperties(hygfReplenishment,hygfReplenishment1);
// hygfReplenishment1.setFile(JSON.toJSONString(hygfReplenishment.getFile()));
hygfReplenishmentService
.
save
(
hygfReplenishment
);
preparationMoneyServiceImpl
.
replenishmentSubmit
(
hygfReplenishment
.
getPreparationMoneyId
());
return
CommonResponseNewUtil
.
success
();
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/QiyuesuoController.java
View file @
f0fe82cf
...
...
@@ -30,6 +30,7 @@ import com.yeejoin.amos.boot.module.hygf.biz.service.impl.QiyuesuoServiceImpl;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.ToDoTasksServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -59,6 +60,7 @@ import java.util.Map;
@RestController
@Api
(
tags
=
"契税锁Api"
)
@RequestMapping
(
value
=
"/qiyuesuo"
)
@Slf4j
public
class
QiyuesuoController
extends
BaseController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
QiyuesuoController
.
class
);
...
...
@@ -139,6 +141,7 @@ public class QiyuesuoController extends BaseController {
try
{
householdContract
=
householdContractServiceImpl
.
initiateHouseholdContract
(
model
);
}
catch
(
Exception
e
)
{
log
.
error
(
"创建合同错误, 入参: {}, error:"
,
JSON
.
toJSONString
(
model
),
e
);
throw
new
BadRequest
(
e
.
getMessage
());
}
return
ResponseHelper
.
buildResponse
(
householdContract
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/FinancingInfoServiceImpl.java
View file @
f0fe82cf
...
...
@@ -281,7 +281,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
if
(
null
==
financingAuditingDto
.
getInstanceId
())
{
financingAuditingDto
.
setInstanceId
(
financingAuditing
.
getInstanceId
());
}
financingAuditingDto
.
setStatus
(
params
.
get
OrDefault
(
"comments"
,
"
"
).
toString
());
financingAuditingDto
.
setStatus
(
params
.
get
(
"approvalStatus
"
).
toString
());
financingAuditingDto
.
setNodeRouting
(
FinancingAuditEnum
.
getNodeByCode
(
workflowResultDto
.
getNextNodeKey
()));
financingAuditingService
.
createWithModel
(
financingAuditingDto
);
...
...
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 @
f0fe82cf
...
...
@@ -818,7 +818,7 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
return
true
;
}
catch
(
Exception
e
)
{
throw
new
BadRequest
(
"删除失败!"
);
throw
new
BadRequest
(
"删除失败!"
+
e
.
getMessage
()
);
}
}
...
...
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 @
f0fe82cf
...
...
@@ -190,17 +190,16 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
List
<
DocumentStation
>
li
=
documentStationMapper
.
selectList
(
q
);
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
);
List
<
HygfReplenishment
>
hygfReplenishments
=
new
ArrayList
<>();
List
<
HygfReplenishmentDto
>
hygfReplenishmentDtos
=
hygfReplenishmentMapper
.
selectData
(
sequenceNbr
);
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishmentDtos
)
&&
!
hygfReplenishmentDtos
.
isEmpty
()
){
hygfReplenishmentDtos
.
forEach
(
e
->{
HygfReplenishment
hygfReplenishment
=
new
HygfReplenishment
();
BeanUtils
.
copyProperties
(
e
,
hygfReplenishment
);
hygfReplenishment
.
setFile
(
JSON
.
parseArray
(
e
.
getFile
()));
hygfReplenishments
.
add
(
hygfReplenishment
);
});
preparationMoney
.
setFiles
(
hygfReplenishmentDtos
);
...
...
@@ -228,11 +227,11 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
public
Map
<
String
,
Object
>
selectOnePreparationMoney
(
String
sequenceNbr
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Lambda
UpdateWrapper
<
PreparationMoney
>
qu
=
new
LambdaUpdate
Wrapper
<>();
Lambda
QueryWrapper
<
PreparationMoney
>
qu
=
new
LambdaQuery
Wrapper
<>();
qu
.
eq
(
PreparationMoney:
:
getSequenceNbr
,
sequenceNbr
);
PreparationMoney
preparationMoney
=
preparationMoneyMapper
.
selectOne
(
qu
);
Lambda
UpdateWrapper
<
HygfPreparationMoneyAuditing
>
audit
=
new
LambdaUpdate
Wrapper
<>();
Lambda
QueryWrapper
<
HygfPreparationMoneyAuditing
>
audit
=
new
LambdaQuery
Wrapper
<>();
audit
.
eq
(
HygfPreparationMoneyAuditing:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
HygfPreparationMoneyAuditing
>
hygfPreparationMoneyAuditings
=
hygfPreparationMoneyAuditingService
.
getBaseMapper
().
selectList
(
audit
);
if
(
CollectionUtil
.
isNotEmpty
(
hygfPreparationMoneyAuditings
)
&&
hygfPreparationMoneyAuditings
.
size
()>
0
){
...
...
@@ -271,7 +270,7 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
Lambda
UpdateWrapper
<
DocumentStation
>
q
=
new
LambdaUpdate
Wrapper
<>();
Lambda
QueryWrapper
<
DocumentStation
>
q
=
new
LambdaQuery
Wrapper
<>();
q
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
sequenceNbr
);
List
<
DocumentStation
>
lih
=
documentStationMapper
.
selectList
(
q
);
preparationMoney
.
setPeasantHouseholdId
(
lih
);
...
...
@@ -321,22 +320,23 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
designInformation
.
setCable
(
cable
);
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
);
List
<
HygfReplenishment
>
hygfReplenishments
=
new
ArrayList
<>();
List
<
HygfReplenishmentDto
>
hygfReplenishmentDtos
=
hygfReplenishmentMapper
.
selectData
(
Long
.
valueOf
(
sequenceNbr
));
if
(
CollectionUtil
.
isNotEmpty
(
hygfReplenishmentDtos
)
&&
!
hygfReplenishmentDtos
.
isEmpty
()
)
{
hygfReplenishmentDtos
.
forEach
(
e
->
{
HygfReplenishment
hygfReplenishment
=
new
HygfReplenishment
();
BeanUtils
.
copyProperties
(
e
,
hygfReplenishment
);
hygfReplenishment
.
setFile
(
JSON
.
parseArray
(
e
.
getFile
()));
hygfReplenishments
.
add
(
hygfReplenishment
);
});
map2
.
put
(
"files"
,
hygfReplenishments
);
}
map
.
put
(
"preparationMoney"
,
map2
);
map
.
put
(
"designInformation"
,
designInformation
);
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
...
...
@@ -619,15 +619,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
model
.
setOddNumbers
(
code
);
// if(model.getDeliveryFile()!=null&&!model.getDeliveryFile().isEmpty() && isSubmit.equals("0")){
//
// model.setDeliveryState(DeliveryStateeEnum.已发货.getCode());
// model.setArrivalState(ArrivalStateeEnum.待收货.getCode());
// model.setDeliveryTime(new Date());
// }else{
// model.setDeliveryState(DeliveryStateeEnum.待提交.getCode());
// model.setArrivalState(DeliveryStateeEnum.待发货.getCode());
// }
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
...
...
@@ -720,13 +711,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
}
List
<
DocumentStation
>
ids
=
model
.
getPeasantHouseholdId
();
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
String
cState
=
"暂存发货"
;
String
pState
=
"暂存发货"
;
if
(
isSubmit
.
equals
(
"0"
))
{
if
(
CollUtil
.
isEmpty
(
ids
)
&&
ids
.
isEmpty
()
){
throw
new
BadRequest
(
"提交时选择电站不可为空"
);
}
// LambdaUpdateWrapper<PeasantHousehold> up1 = new LambdaUpdateWrapper<>();
//更新电站施工状态
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
已发货
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
已发货
.
getCode
());
cState
=
DeliveryStateeEnum
.
已发货
.
getCode
();
pState
=
DeliveryStateeEnum
.
已发货
.
getCode
();
//提交时 赋值发货时间及订单状态
model
.
setDeliveryTime
(
new
Date
());
model
.
setOrderStatus
(
DeliveryStateeEnum
.
待确认
.
getName
());
...
...
@@ -753,8 +751,12 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
hygfPreparationMoneyAuditingDto
.
setPreparationMoneyId
(
model
.
getSequenceNbr
());
hygfPreparationMoneyAuditingDto
.
setPromoter
(
RequestContext
.
getExeUserId
());
hygfPreparationMoneyAuditingService
.
createWithModel
(
hygfPreparationMoneyAuditingDto
);
peasantHouseholdMapper
.
update
(
null
,
up
);
List
<
Long
>
collect
=
ids
.
stream
().
map
(
DocumentStation:
:
getStationId
).
collect
(
Collectors
.
toList
());
// up1.in(BaseEntity::getSequenceNbr,collect);
// peasantHouseholdMapper.update(null, up1);
}
else
{
up
.
set
(
PeasantHousehold:
:
getPreparationMoneyState
,
DeliveryStateeEnum
.
暂存发货
.
getCode
());
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
暂存发货
.
getCode
());
}
preparationMoneyMapper
.
updateById
(
model
);
...
...
@@ -762,16 +764,18 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
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
);
if
(
CollectionUtil
.
isNotEmpty
(
oldIds
)){
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
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
LambdaUpdateWrapper
<
DocumentStation
>
up3
=
new
LambdaUpdateWrapper
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
}
//电站信息存储
if
(
CollectionUtil
.
isNotEmpty
(
ids
)
&&
ids
.
size
()>
0
){
...
...
@@ -1119,15 +1123,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
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
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
if
(
CollectionUtil
.
isNotEmpty
(
oldIds
)){
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
();
up3
.
eq
(
DocumentStation:
:
getPreparationMoneyId
,
model
.
getSequenceNbr
());
documentStationMapper
.
delete
(
up3
);
}
//电站信息存储
...
...
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