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
e314d28d
Commit
e314d28d
authored
Dec 19, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
e0cdf2b5
bb8b7d89
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
336 additions
and
66 deletions
+336
-66
JgTransferNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
+34
-0
JgTransferNotice.java
...join/amos/boot/module/jg/api/entity/JgTransferNotice.java
+10
-0
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+5
-0
UseStatusEnum.java
.../yeejoin/amos/boot/module/jg/api/enums/UseStatusEnum.java
+3
-3
JgTransferNoticeEqMapper.java
...s/boot/module/jg/api/mapper/JgTransferNoticeEqMapper.java
+1
-2
JgTransferNoticeMapper.java
...mos/boot/module/jg/api/mapper/JgTransferNoticeMapper.java
+12
-2
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+1
-0
IJgTransferNoticeEqService.java
...oot/module/jg/api/service/IJgTransferNoticeEqService.java
+4
-1
IJgTransferNoticeService.java
.../boot/module/jg/api/service/IJgTransferNoticeService.java
+20
-1
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+2
-1
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+118
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+6
-1
JgTransferNoticeController.java
.../module/jg/biz/controller/JgTransferNoticeController.java
+80
-40
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+1
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+0
-4
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+0
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+39
-10
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
View file @
e314d28d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
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
org.springframework.util.StringUtils
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 移装造告知
...
...
@@ -84,6 +88,7 @@ public class JgTransferNoticeDto extends BaseDto {
private
String
address
;
@ApiModelProperty
(
value
=
"计划施工日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
planDate
;
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
...
...
@@ -146,4 +151,33 @@ public class JgTransferNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)-名称"
)
private
String
streetName
;
@ApiModelProperty
(
value
=
"委托书附件"
)
private
List
<
Map
<
String
,
Object
>>
powerOfAttorneyList
;
@ApiModelProperty
(
value
=
"施工合同附件"
)
private
List
<
Map
<
String
,
Object
>>
constructionContractList
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
@ApiModelProperty
(
value
=
"区名字"
)
private
String
countyName
;
@ApiModelProperty
(
value
=
"市名字"
)
private
String
cityName
;
@ApiModelProperty
(
value
=
"省名字"
)
private
String
provinceName
;
@ApiModelProperty
(
value
=
"完整地址"
)
private
String
fullAddress
;
public
String
getFullAddress
()
{
return
(
StringUtils
.
isEmpty
(
this
.
provinceName
)
?
""
:
this
.
provinceName
)
+
(
StringUtils
.
isEmpty
(
this
.
cityName
)
?
""
:
this
.
cityName
)
+
(
StringUtils
.
isEmpty
(
this
.
countyName
)
?
""
:
this
.
countyName
)
+
(
StringUtils
.
isEmpty
(
this
.
address
)
?
""
:
this
.
address
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgTransferNotice.java
View file @
e314d28d
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
@@ -269,4 +270,13 @@ public class JgTransferNotice extends BaseEntity {
@TableField
(
value
=
"\"street_name\""
)
private
String
streetName
;
@TableField
(
"county_name"
)
private
String
countyName
;
@TableField
(
"city_name"
)
private
String
cityName
;
@TableField
(
"province_name"
)
private
String
provinceName
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgUseRegistration.java
View file @
e314d28d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
...
@@ -169,5 +170,9 @@ public class JgUseRegistration extends BaseEntity {
private
String
nextExecuteIds
;
@TableField
(
value
=
"promoter"
)
private
String
promoter
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/UseStatusEnum.java
View file @
e314d28d
...
...
@@ -14,9 +14,9 @@ import java.util.Map;
public
enum
UseStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级
受理
待受理"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级
受理
待受理"
),
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级
受理
待受理"
);
RECEIVE
(
"一级受理"
,
"receive"
,
"一级待受理"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级待受理"
),
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级待受理"
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgTransferNoticeEqMapper.java
View file @
e314d28d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 移装告知设备关系表 Mapper 接口
...
...
@@ -9,6 +8,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @date 2023-12-19
*/
public
interface
JgTransferNoticeEqMapper
extends
BaseMapper
<
JgTransferNoticeEq
>
{
public
interface
JgTransferNoticeEqMapper
extends
Custom
BaseMapper
<
JgTransferNoticeEq
>
{
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgTransferNoticeMapper.java
View file @
e314d28d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 移装造告知 Mapper 接口
...
...
@@ -9,6 +15,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @date 2023-12-19
*/
public
interface
JgTransferNoticeMapper
extends
BaseMapper
<
JgTransferNotice
>
{
public
interface
JgTransferNoticeMapper
extends
CustomBaseMapper
<
JgTransferNotice
>
{
Page
<
JgTransferNotice
>
queryForPage
(
Page
<
JgTransferNotice
>
page
,
@Param
(
"param"
)
JgTransferNoticeDto
model
,
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
);
@MapKey
(
"sequenceNbr"
)
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
e314d28d
...
...
@@ -27,4 +27,5 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Page
<
Map
<
String
,
Object
>>
getEquipListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"factoryNum"
)
String
factoryNum
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"equCategory"
)
String
equCategory
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgTransferNoticeEqService.java
View file @
e314d28d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
/**
* 移装告知设备关系表接口类
*
* @author system_generator
* @date 2023-12-19
*/
public
interface
IJgTransferNoticeEqService
{
public
interface
IJgTransferNoticeEqService
extends
IService
<
JgTransferNoticeEq
>
{
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgTransferNoticeService.java
View file @
e314d28d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
java.util.Map
;
/**
* 移装造告知接口类
*
* @author system_generator
* @date 2023-12-19
*/
public
interface
IJgTransferNoticeService
{
public
interface
IJgTransferNoticeService
extends
IService
<
JgTransferNotice
>
{
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
);
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
);
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
);
Boolean
deleteForBatch
(
Long
[]
sequenceNbrs
);
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgTransferNoticeDto
>
model
,
ReginParams
reginParams
);
String
generateTransferNoticeReport
(
Long
sequenceNbr
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
e314d28d
...
...
@@ -42,8 +42,9 @@
</if>
<if
test=
"type == 'supervision'"
>
AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )
AND isn.receive_org_credit_code = #{orgCode}
</if>
<if
test=
"
orgCode != null and orgCode != '
'"
>
<if
test=
"
type == 'enterprise
'"
>
AND isn.install_unit_credit_code = #{orgCode}
</if>
</where>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
e314d28d
...
...
@@ -2,4 +2,122 @@
<!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.jg.api.mapper.JgTransferNoticeMapper"
>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice"
>
select
tjtn.sequence_nbr AS sequenceNbr,
tjtn.apply_no AS applyNo,
tjtn.notice_date AS noticeDate,
tjtn.use_unit_name AS useUnitName,
tjtn.receive_org_name AS receiveOrgName,
tjtn.address AS address,
tjtn.notice_status AS noticeStatus,
tjtn.install_unit_name AS installUnitName,
tjtn.province AS provinceName,
tjtn.city AS cityName,
tjtn.county AS countyName,
tjtn.instance_id AS instanceId,
tjtn.transfer_type AS transferType,
tjtn.plan_date AS planDate
FROM
tzs_jg_transfer_notice tjtn
<where>
tjtn.is_delete = false
<if
test=
"param != null "
>
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
AND tjtn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
</if>
<if
test=
"param.receiveOrgName != null and param.receiveOrgName != ''"
>
AND tjtn.receive_org_name LIKE CONCAT('%', #{param.receiveOrgName}, '%')
</if>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
AND tjtn.use_unit_name LIKE CONCAT('%', #{param.useUnitName}, '%')
</if>
<if
test=
"param.installUnitName != null and param.installUnitName != ''"
>
AND tjtn.install_unit_name LIKE CONCAT('%', #{param.installUnitName}, '%')
</if>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
AND tjtn.notice_status = #{param.noticeStatus}
</if>
</if>
<if
test=
"type == 'supervision'"
>
AND (tjtn.notice_status in ('6612', '6613', '6614') or tjtn.status in('6614') )
</if>
<if
test=
"orgCode != null and orgCode != ''"
>
AND tjtn.install_unit_credit_code = #{orgCode}
</if>
</where>
ORDER BY
tjtn.notice_date DESC
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
select
tjtn.sequence_nbr AS sequenceNbr,
tjtn.install_unit_name AS installUnitName,
tjtn.apply_no AS applyNo,
tjtn.province,
tjtn.city AS cityName,
tjtn.county AS countyName,
tjtn.address AS address,
tjtn.use_unit_name AS useUnitName,
tjtn.install_unit_credit_code AS installUnitCreditCode,
tjtn.install_unit_name AS installUnitName,
tjtn.equip_num AS equipName,
tjtn.rec_date AS recDate,
tjtn.create_date AS createDate,
tjtn.create_user_name AS createUserName,
tjtn.accept_date AS acceptDate,
tjtn.receive_company_code AS receiveCompanyCode,
tjtn.construction_contract AS constructionContract,
tjtn.transfer_type AS transferType,
tjtn.factory_use_site_street AS factoryUseSiteStreet,
tjtn.province AS provinceName,
tjtn.city AS cityName,
tjtn.county AS countyName,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
ri.equ_price AS equPrice,
ri.product_photo AS productPhoto,
di.design_unit_credit_code AS designUnitCreditCode,
di.design_unit_name AS designUnitName,
di.design_license_num AS designLicenseNum,
di.design_use_date AS designUseDate,
di.design_date AS designDate,
di.drawing_do AS drawingDo,
di.appraisal_unit AS appraisalUnit,
di.appraisal_date AS appraisalDate,
di.design_doc AS designDoc,
di.design_standard AS designStandard,
fi.produce_unit_credit_code AS produceUnitCreditCode,
fi.produce_unit_name AS produceUnitName,
fi.produce_license_num AS produceLicenseNum,
fi.factory_num AS factoryNum,
fi.produce_date AS produceDate,
fi.imported AS imported,
fi.produce_country AS produceCountry,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ui.phone AS safetyManagerPhone,
ui.PROVINCE_NAME AS useUnitProvinceName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.ADDRESS AS useUnitAddress
FROM
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
WHERE
tjtn.sequence_nbr = #{sequenceNbr}
LIMIT 1
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
e314d28d
<?xml version="1.0" encoding="UTF-8"?>
<!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.jg.api.mapper.JgUseRegistrationMapper"
>
<update
id=
"updatePromoter"
>
UPDATE tzs_jg_use_registration set promoter = null
where sequence_nbr = #{id}
</update>
<select
id=
"getListPage"
resultType=
"java.util.Map"
>
...
...
@@ -18,7 +22,8 @@
ur.instance_id as instanceId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.next_execute_ids as nextExecuteIds
ur.next_execute_ids as nextExecuteIds,
ur.promoter
from tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgTransferNoticeController.java
View file @
e314d28d
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
e314d28d
...
...
@@ -54,7 +54,7 @@ public class JgUseRegistrationController extends BaseController {
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgUseRegistrationServiceImpl
.
flowExecute
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
jgUseRegistrationServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
e314d28d
...
...
@@ -240,11 +240,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
public
Page
<
JgInstallationNoticeDto
>
queryForJgInstallationNoticePage
(
Page
<
JgInstallationNotice
>
page
,
JgInstallationNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
;
if
(
type
.
equals
(
"enterprise"
))
{
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
}
else
{
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
}
Page
<
JgInstallationNotice
>
noticePage
=
jgInstallationNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
View file @
e314d28d
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
e314d28d
...
...
@@ -7,6 +7,9 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
...
...
@@ -29,7 +32,9 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
...
...
@@ -58,7 +63,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
WorkFlowFeignService
workFlowFeginService
;
@Autowired
private
ICreateCodeService
iCreateCodeService
;
@Autowired
RedisUtils
redisUtils
;
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
return
listPage
;
...
...
@@ -69,6 +75,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
@Transactional
public
void
save
(
JSONObject
map
)
{
UseInfo
useInfo
=
new
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
...
...
@@ -96,6 +103,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
}
else
{
...
...
@@ -120,12 +128,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
else
{
// 启动并执行流程
instanceId
=
startByVariable
();
jgUseRegistration
.
setInstanceStatus
(
"1460532889249755137"
);
jgUseRegistration
.
setUseUnitCreditCode
(
"91610131628001738N"
);
jgUseRegistration
.
setReceiveCompanyCode
(
"610000"
);
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 执行流程
String
status
=
flowExecute
(
instanceId
,
"0"
,
""
,
false
);
jgUseRegistration
.
setInstanceStatus
(
status
);
String
status
=
flowExecute
(
jgUseRegistration
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
,
true
);
jgUseRegistration
.
setAuditStatus
(
"已提交"
);
jgUseRegistration
.
setStatus
(
UseStatusEnum
.
RECEIVE
.
getPass
());
}
...
...
@@ -150,7 +160,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
instanceId
;
}
public
String
flowExecute
(
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
public
String
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
String
role
=
""
;
String
taskName
=
"流程结束"
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
...
...
@@ -187,20 +197,23 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
role
=
String
.
join
(
","
,
roleList
);
if
(
update
)
{
updateStatus
(
instanceId
,
taskName
,
role
);
Boolean
rollBack
=
"1"
.
equals
(
operate
)
?
true
:
false
;
updateStatus
(
id
,
instanceId
,
taskName
,
role
,
rollBack
);
}
return
role
;
}
public
void
updateStatus
(
String
instanceId
,
String
taskName
,
String
role
)
{
public
void
updateStatus
(
Long
id
,
String
instanceId
,
String
taskName
,
String
role
,
Boolean
rollBack
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
get
InstanceId
,
instanceI
d
);
lambda
.
eq
(
JgUseRegistration:
:
get
SequenceNbr
,
i
d
);
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
"流程结束"
.
equals
(
taskName
))
{
jgUseRegistration
.
setStatus
(
taskName
);
jgUseRegistration
.
setAuditStatus
(
"已完成"
);
}
else
{
jgUseRegistration
.
setNextExecuteIds
(
role
);
jgUseRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getInstanceStatus
()))
{
jgUseRegistration
.
setInstanceStatus
(
jgUseRegistration
.
getInstanceStatus
()
+
","
+
role
);
}
else
{
...
...
@@ -209,21 +222,35 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
jgUseRegistration
.
setStatus
(
message
.
getPass
());
}
if
(
rollBack
){
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
this
.
getBaseMapper
().
updatePromoter
(
jgUseRegistration
.
getSequenceNbr
());
}
else
{
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
}
}
public
void
withdraw
(
String
instanceId
)
{
String
taskName
=
""
;
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
getInstanceId
,
instanceId
);
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
try
{
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
taskName
=
nextTask
.
getString
(
"name"
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
roleList
.
add
(((
Map
)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -232,7 +259,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setStatus
(
message
.
getPass
());
}
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
String
join
=
String
.
join
(
","
,
roleList
);
JgUseRegistration
jgUseRegistration1
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
this
.
updateStatus
(
jgUseRegistration1
.
getSequenceNbr
(),
instanceId
,
taskName
,
join
,
true
);
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
...
...
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