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
ffec8f21
Commit
ffec8f21
authored
Jan 03, 2024
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加施工管理
parent
062e6fd8
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
298 additions
and
27 deletions
+298
-27
CodeEnum.java
.../com/yeejoin/amos/boot/module/hygf/api/Enum/CodeEnum.java
+2
-0
WorkOrderEnum.java
...yeejoin/amos/boot/module/hygf/api/Enum/WorkOrderEnum.java
+48
-0
WorkOrderDto.java
...m/yeejoin/amos/boot/module/hygf/api/dto/WorkOrderDto.java
+3
-0
PeasantHousehold.java
...in/amos/boot/module/hygf/api/entity/PeasantHousehold.java
+8
-0
WorkOrder.java
...m/yeejoin/amos/boot/module/hygf/api/entity/WorkOrder.java
+6
-0
PeasantHouseholdMapper.java
...s/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
+5
-0
UnitInfoMapper.java
...join/amos/boot/module/hygf/api/mapper/UnitInfoMapper.java
+3
-1
PeasantHouseholdMapper.xml
...rc/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
+24
-1
UnitInfoMapper.xml
...gf-api/src/main/resources/mapper/mysql/UnitInfoMapper.xml
+24
-22
UnitInfoController.java
...s/boot/module/hygf/biz/controller/UnitInfoController.java
+69
-0
WorkOrderController.java
.../boot/module/hygf/biz/controller/WorkOrderController.java
+3
-2
PowerStationServiceImpl.java
...module/hygf/biz/service/impl/PowerStationServiceImpl.java
+1
-0
PreparationMoneyServiceImpl.java
...le/hygf/biz/service/impl/PreparationMoneyServiceImpl.java
+41
-0
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+17
-1
WorkOrderServiceImpl.java
...ot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
+44
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/CodeEnum.java
View file @
ffec8f21
...
...
@@ -23,6 +23,8 @@ public enum CodeEnum {
货单
(
"HD"
,
"HD"
),
派工单
(
"PG"
,
"PG"
),
档案
(
"DA"
,
"DA"
);
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/Enum/WorkOrderEnum.java
0 → 100644
View file @
ffec8f21
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* @description:
* @author: tw
* @createDate: 2023/12/13
*/
@Getter
@AllArgsConstructor
public
enum
WorkOrderEnum
{
待施工
(
"待施工"
,
"待施工"
),
施工中
(
"施工中"
,
"施工中"
),
登记中
(
"登记中"
,
"登记中"
),
审核中
(
"审核中"
,
"审核中"
),
未通过
(
"未通过"
,
"未通过"
),
已完工
(
"已完工"
,
"已完工"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
public
static
ContractStatusEnum
getNodeByCode
(
String
code
)
{
ContractStatusEnum
dealerReviewEnum
=
null
;
for
(
ContractStatusEnum
type:
ContractStatusEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
dealerReviewEnum
=
type
;
break
;
}
}
return
dealerReviewEnum
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/WorkOrderDto.java
View file @
ffec8f21
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.List
;
/**
* 施工派工工单
...
...
@@ -60,4 +62,5 @@ public class WorkOrderDto extends BaseDto {
@ApiModelProperty
(
value
=
"派工单状态"
)
private
String
workOrderStatus
;
List
<
PeasantHousehold
>
peasantHouseholdId
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/PeasantHousehold.java
View file @
ffec8f21
...
...
@@ -188,4 +188,12 @@ public class PeasantHousehold extends BaseEntity {
@TableField
(
exist
=
false
)
protected
Long
stationId
;
/**施工状态**/
/**
* 已发货,已收货,
*/
@TableField
(
"construction_state"
)
private
String
constructionState
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/WorkOrder.java
View file @
ffec8f21
...
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.List
;
/**
* 施工派工工单
...
...
@@ -100,4 +101,9 @@ public class WorkOrder extends BaseEntity {
@TableField
(
"work_order_status"
)
private
String
workOrderStatus
;
@TableField
(
exist
=
false
)
List
<
PeasantHousehold
>
peasantHouseholdId
;
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
View file @
ffec8f21
...
...
@@ -18,4 +18,9 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
@Param
(
"peasantHouseholdNo"
)
String
peasantHouseholdNo
,
@Param
(
"ownersName"
)
String
ownersName
);
List
<
PeasantHousehold
>
selectPeasantHouseholdListsg
(
@Param
(
"developerId"
)
Long
developerId
,
@Param
(
"regionalCompaniesSeq"
)
Long
regionalCompaniesSeq
,
@Param
(
"peasantHouseholdNo"
)
String
peasantHouseholdNo
,
@Param
(
"ownersName"
)
String
ownersName
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/UnitInfoMapper.java
View file @
ffec8f21
...
...
@@ -19,7 +19,9 @@ import java.util.Map;
public
interface
UnitInfoMapper
extends
BaseMapper
<
UnitInfo
>
{
//获取单位分页列表 @Param("offset") long offset, @Param("pageSize") long pageSize,
IPage
<
CompanyDto
>
getCompanyDto
(
@Param
(
"dto"
)
CompanyDto
dto
);
Map
<
String
,
Integer
>
getCompanyDtoCount
(
@Param
(
"dto"
)
CompanyDto
dto
);
List
<
Map
<
String
,
Object
>>
getuserList
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"role"
)
Long
role
,
@Param
(
"regionalCompaniesSeq"
)
Long
regionalCompaniesSeq
,
@Param
(
"amosUnitId"
)
Long
amosUnitId
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
View file @
ffec8f21
...
...
@@ -9,7 +9,11 @@ SELECT *,
hygf_household_contract.`status`='双方已签署'
and hygf_peasant_household.developer_id=#{developerId}
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
and hygf_peasant_household.survey_or_not=3
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 LEFT JOIN hygf_document_station
on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nbr where hygf_preparation_money.delivery_state !='已作废'
and hygf_document_station.station_id is not null
)
<if
test=
"peasantHouseholdNo!=null and peasantHouseholdNo !=''"
>
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{peasantHouseholdNo}),"%")
</if>
...
...
@@ -18,4 +22,23 @@ and hygf_peasant_household.survey_or_not=3
</if>
</select>
<select
id=
"selectPeasantHouseholdListsg"
resultType=
"com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold"
>
SELECT *,
hygf_peasant_household.sequence_nbr stationId
FROM hygf_peasant_household
where
hygf_peasant_household.construction_state='已收货'
and hygf_peasant_household.developer_id=#{developerId}
and hygf_peasant_household.regional_companies_seq=#{regionalCompaniesSeq}
<if
test=
"peasantHouseholdNo!=null and peasantHouseholdNo !=''"
>
and hygf_peasant_household.peasant_household_no like concat(concat("%",#{peasantHouseholdNo}),"%")
</if>
<if
test=
"ownersName!=null and ownersName !='' "
>
and hygf_peasant_household.owners_name like concat(concat("%",#{ownersName}),"%")
</if>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/UnitInfoMapper.xml
View file @
ffec8f21
...
...
@@ -37,29 +37,31 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
</select>
<!-- <select id="getCompanyDtoCount" resultType="Map">-->
<!--select-->
<!--count (*) num-->
<!-- from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'-->
<!-- <if test="dto.companyName!=null">-->
<!-- and privilege_company.COMPANY_NAME like concat(concat("%",#{dto.companyName}),"%")-->
<!-- </if>-->
<!-- <if test="dto.level!=null">-->
<!-- and privilege_company.LEVEL=#{dto.level}-->
<!-- </if>-->
<!-- <if test="dto.companyType!=null">-->
<!-- and privilege_company.COMPANY_TYPE=#{dto.companyType}-->
<!-- </if>-->
<!-- <if test="dto.orgCode!=null">-->
<!-- and privilege_company.ORG_CODE like concat(concat(#{dto.orgCode}),"%")-->
<!-- </if>-->
<select
id=
"getuserList"
resultType=
"Map"
>
select
std_user_biz.amos_user_id amosUserId,
std_user_biz.real_name realName,
std_user_biz.emergency_telephone emergencyTelephone
from
std_user_biz LEFT JOIN hygf_personnel_business on std_user_biz.sequence_nbr =hygf_personnel_business.foundation_id
<where>
<if
test=
"role!=null"
>
and std_user_biz.role like concat(concat("%",#{role}),"%")
</if>
<if
test=
"regionalCompaniesSeq!=null"
>
and hygf_personnel_business.regional_companies_seq=#{regionalCompaniesSeq}
</if>
<if
test=
"amosUnitId!=null"
>
and hygf_personnel_business.amos_unit_id=#{amosUnitId}
</if>
<if
test=
"userName!=null"
>
and std_user_biz.amos_user_id=#{userName}
</if>
</where>
<!-- </select>--
>
</select
>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/UnitInfoController.java
View file @
ffec8f21
...
...
@@ -25,6 +25,7 @@ import com.yeejoin.amos.feign.privilege.model.GroupModel;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.util.ArrayUtil
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpRequest
;
...
...
@@ -775,4 +776,72 @@ public class UnitInfoController extends BaseController {
)
{
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
getPeasantHouseholdData
(
unitInfoId
,
regionalCompaniesSeq
,
current
,
size
,
peasantHouseholdNo
,
ownersName
));
}
/**获取当前登录人区域公司*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/getRegionalCompanieByuser"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>
>
getRegionalCompanieByuser
(
)
{
UserUnitInformationDto
userUnitInformationDto
=
personnelBusinessMapper
.
getUserUnitInformationDto
(
getUserInfo
().
getUserId
());
List
<
Map
<
String
,
Object
>>
date
=
new
ArrayList
<>();
if
(
userUnitInformationDto
!=
null
&&
userUnitInformationDto
.
getRegionalCompaniesSeq
()!=
null
&&
userUnitInformationDto
.
getRegionalCompaniesName
()!=
null
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
userUnitInformationDto
.
getRegionalCompaniesSeq
());
map
.
put
(
"name"
,
userUnitInformationDto
.
getRegionalCompaniesName
());
date
.
add
(
map
);
}
return
ResponseHelper
.
buildResponse
(
date
);
}
/***获取经销商,区域公司下 工程负责人**/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/getuserList"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>
>
getuserList
(
@RequestParam
(
required
=
false
)
Long
role
,
@RequestParam
(
required
=
false
)
Long
regionalCompaniesSeq
)
{
UserUnitInformationDto
userUnitInformationDto
=
personnelBusinessMapper
.
getUserUnitInformationDto
(
getUserInfo
().
getUserId
());
List
<
Map
<
String
,
Object
>>
date
=
unitInfoMapper
.
getuserList
(
null
,
role
,
regionalCompaniesSeq
,
userUnitInformationDto
.
getAmosDealerId
());
return
ResponseHelper
.
buildResponse
(
date
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/getuserTelephone"
)
public
ResponseModel
<
Map
<
String
,
Object
>
>
getuserTelephone
(
@RequestParam
(
required
=
false
)
String
userName
)
{
Map
<
String
,
Object
>
data
=
null
;
if
(
StringUtils
.
isNotEmpty
(
userName
)){
List
<
Map
<
String
,
Object
>>
date
=
unitInfoMapper
.
getuserList
(
userName
,
null
,
null
,
null
);
if
(
date
!=
null
&&!
date
.
isEmpty
()){
data
=
date
.
get
(
0
);
}
}
return
ResponseHelper
.
buildResponse
(
data
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/selectPeasantHouseholdListsg"
)
public
ResponseModel
<
Page
<
PeasantHousehold
>>
selectPeasantHouseholdListsg
(
@RequestParam
(
required
=
false
)
Long
regionalCompaniesSeq
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
required
=
false
)
String
peasantHouseholdNo
,
@RequestParam
(
required
=
false
)
String
ownersName
)
{
UserUnitInformationDto
userUnitInformationDto
=
personnelBusinessMapper
.
getUserUnitInformationDto
(
getUserInfo
().
getUserId
());
return
ResponseHelper
.
buildResponse
(
unitInfoServiceImpl
.
selectPeasantHouseholdListsg
(
userUnitInformationDto
.
getAmosDealerId
(),
regionalCompaniesSeq
,
current
,
size
,
peasantHouseholdNo
,
ownersName
));
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/WorkOrderController.java
View file @
ffec8f21
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrder
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -39,8 +40,8 @@ public class WorkOrderController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增施工派工工单"
,
notes
=
"新增施工派工工单"
)
public
ResponseModel
<
WorkOrder
Dto
>
save
(
@RequestBody
WorkOrderDto
model
)
{
model
=
workOrderServiceImpl
.
createWithModel
(
model
);
public
ResponseModel
<
WorkOrder
>
save
(
@RequestBody
WorkOrder
model
)
{
model
=
workOrderServiceImpl
.
saveWorkOrder
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PowerStationServiceImpl.java
View file @
ffec8f21
...
...
@@ -206,6 +206,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
return
fl
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
BaseException
(
"获取工作流节点失败!"
,
"400"
,
"获取工作流节点失败!"
);
}
}
...
...
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 @
ffec8f21
...
...
@@ -79,6 +79,8 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
DesignInformationMapper
designInformationMapper
;
@Autowired
PreparationMoneyLogMapper
preparationMoneyLogMapper
;
@Autowired
PeasantHouseholdMapper
peasantHouseholdMapper
;
private
static
final
String
regionRedis
=
"app_region_redis"
;
/**
...
...
@@ -303,6 +305,20 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
if
(
model
.
getDeliveryFile
()!=
null
&&!
model
.
getDeliveryFile
().
isEmpty
()){
model
.
setDeliveryState
(
DeliveryStateeEnum
.
已发货
.
getCode
());
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
已发货
.
getCode
());
List
<
DocumentStation
>
idsk
=
model
.
getPeasantHouseholdId
();
List
<
Long
>
idsH
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
idsk
)
{
idsH
.
add
(
documentStation
.
getStationId
());
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
peasantHouseholdMapper
.
update
(
null
,
up
);
model
.
setArrivalState
(
ArrivalStateeEnum
.
待收货
.
getCode
());
model
.
setDeliveryTime
(
new
Date
());
}
else
{
...
...
@@ -371,11 +387,36 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
model
.
setDeliveryState
(
ArrivalStateeEnum
.
已收货
.
getCode
());
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
ArrivalStateeEnum
.
已收货
.
getCode
());
List
<
DocumentStation
>
idsk
=
model
.
getPeasantHouseholdId
();
List
<
Long
>
idsH
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
idsk
)
{
idsH
.
add
(
documentStation
.
getStationId
());
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
peasantHouseholdMapper
.
update
(
null
,
up
);
}
else
{
if
(
model
.
getDeliveryFile
()!=
null
&&!
model
.
getDeliveryFile
().
isEmpty
()){
model
.
setDeliveryState
(
DeliveryStateeEnum
.
已发货
.
getCode
());
//更新电站施工状态
LambdaUpdateWrapper
<
PeasantHousehold
>
up
=
new
LambdaUpdateWrapper
<>();
up
.
set
(
PeasantHousehold:
:
getConstructionState
,
DeliveryStateeEnum
.
已发货
.
getCode
());
List
<
DocumentStation
>
idsk
=
model
.
getPeasantHouseholdId
();
List
<
Long
>
idsH
=
new
ArrayList
<>();
for
(
DocumentStation
documentStation
:
idsk
)
{
idsH
.
add
(
documentStation
.
getStationId
());
}
up
.
in
(
PeasantHousehold:
:
getSequenceNbr
,
idsH
);
peasantHouseholdMapper
.
update
(
null
,
up
);
model
.
setArrivalState
(
ArrivalStateeEnum
.
待收货
.
getCode
());
model
.
setDeliveryTime
(
new
Date
());
}
else
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
View file @
ffec8f21
...
...
@@ -833,5 +833,20 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
pagenew
.
setRecords
(
page
.
getList
());
return
pagenew
;
}
public
Page
<
PeasantHousehold
>
selectPeasantHouseholdListsg
(
Long
unitInfoId
,
Long
regionalCompaniesSeq
,
int
pageNum
,
int
pageSize
,
String
peasantHouseholdNo
,
String
ownersName
){
PageHelper
.
startPage
(
pageNum
,
pageSize
);
List
<
PeasantHousehold
>
list
=
peasantHouseholdMapper
.
selectPeasantHouseholdListsg
(
unitInfoId
,
regionalCompaniesSeq
,
peasantHouseholdNo
,
ownersName
);
PageInfo
<
PeasantHousehold
>
page
=
new
PageInfo
(
list
);
Page
<
PeasantHousehold
>
pagenew
=
new
Page
<
PeasantHousehold
>();
pagenew
.
setCurrent
(
pageNum
);
pagenew
.
setTotal
(
page
.
getTotal
());
pagenew
.
setSize
(
pageSize
);
pagenew
.
setRecords
(
page
.
getList
());
return
pagenew
;
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/WorkOrderServiceImpl.java
View file @
ffec8f21
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.CodeEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.Enum.WorkOrderEnum
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.RegionalCompanies
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.WorkOrder
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.RegionalCompaniesMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.WorkOrderMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IWorkOrderService
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.WorkOrderDto
;
import
com.yeejoin.amos.boot.module.hygf.api.util.NumberUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -17,6 +25,12 @@ import java.util.List;
*/
@Service
public
class
WorkOrderServiceImpl
extends
BaseService
<
WorkOrderDto
,
WorkOrder
,
WorkOrderMapper
>
implements
IWorkOrderService
{
@Autowired
RegionalCompaniesMapper
regionalCompaniesMapper
;
@Autowired
WorkOrderMapper
workOrderMapper
;
/**
* 分页查询
*/
...
...
@@ -30,4 +44,33 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
public
List
<
WorkOrderDto
>
queryForWorkOrderList
()
{
return
this
.
queryForList
(
""
,
false
);
}
public
WorkOrder
saveWorkOrder
(
WorkOrder
model
)
{
//保存派工单
RegionalCompanies
regionalCompanies
=
regionalCompaniesMapper
.
selectRegionName
(
model
.
getRegionCompanyId
());
String
code
=
NumberUtil
.
getCode
(
CodeEnum
.
派工单
.
getCode
(),
regionalCompanies
.
getCompanyCode
(),
regionalCompanies
.
getRegionalAddress
());
model
.
setWorkOrderNum
(
code
);
model
.
setRegionCompanyName
(
regionalCompanies
.
getRegionalCompaniesName
());
model
.
setRegionCode
(
regionalCompanies
.
getRegionalCompaniesCode
());
model
.
setWorkOrderStatus
(
WorkOrderEnum
.
待施工
.
getCode
());
workOrderMapper
.
insert
(
model
);
//保存派工单 电站信息
List
<
PeasantHousehold
>
peasantHouseholdId
=
model
.
getPeasantHouseholdId
();
return
model
;
}
}
\ No newline at end of file
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