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
7ed40113
Commit
7ed40113
authored
Dec 15, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
1d2e29af
04cde04b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
26 deletions
+53
-26
JgInstallationNoticeDto.java
.../amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
+2
-2
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+20
-21
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+25
-1
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+6
-2
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/JgInstallationNoticeDto.java
View file @
7ed40113
...
...
@@ -164,10 +164,10 @@ public class JgInstallationNoticeDto extends BaseDto {
private
String
inputUnitNo
;
@ApiModelProperty
(
value
=
"安装委托书图片"
)
private
List
<
Map
<
String
,
String
>>
proxyStatementAttachmentList
;
private
String
proxyStatementAttachmentList
;
@ApiModelProperty
(
value
=
"安装合同照片"
)
private
List
<
Map
<
String
,
String
>>
installContractAttachmentList
;
private
String
installContractAttachmentList
;
@ApiModelProperty
(
value
=
"安装委托书图片"
)
private
String
proxyStatementAttachment
;
...
...
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 @
7ed40113
...
...
@@ -11,20 +11,14 @@ import com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRelationEquipMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ICreateCodeService
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -47,10 +41,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
PROCESS_DEFINITION_KEY
=
"installationNotification"
;
public
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
@Autowired
private
JgRelationEquipMapper
jgRelationEquipMapper
;
@Autowired
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
@Autowired
@SuppressWarnings
(
"all"
)
private
ICreateCodeService
iCreateCodeService
;
/**
* 根据sequenceNbr查询
...
...
@@ -82,14 +79,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
*
* @param noticeDto 安装告知
*/
@SuppressWarnings
(
"rawtypes"
)
@SuppressWarnings
(
{
"rawtypes"
,
"Duplicates"
}
)
public
JgInstallationNoticeDto
updateInstallationNotice
(
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
op
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
// 字段转换
this
.
convertField
(
noticeDto
);
AjaxResult
ajaxResult
;
// 发起流程
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"installationNotification"
);
dto
.
setBusinessKey
(
"1"
);
AjaxResult
ajaxResult
;
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
...
...
@@ -102,6 +106,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
...
...
@@ -121,7 +126,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
noticeDto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
dto
,
bean
);
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
}
}
catch
(
Exception
e
)
{
...
...
@@ -130,11 +135,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return
noticeDto
;
}
@Autowired
private
ICreateCodeService
iCreateCodeService
;
@Autowired
JgRelationEquipMapper
jgRelationEquipMapper
;
/**
* 分页查询
*
...
...
@@ -194,6 +194,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
@Override
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
jgInstallationNoticeDtoMap
)
{
JgInstallationNoticeDto
model
=
jgInstallationNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
...
...
@@ -217,7 +218,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
"1"
);
AjaxResult
ajaxResult
=
null
;
...
...
@@ -282,10 +283,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
void
convertField
(
JgInstallationNoticeDto
model
)
{
// 处理图片
String
proxyStatementAttachment
=
convertImageUrl
(
model
.
getInstallContractAttachmentList
());
String
installContractAttachment
=
convertImageUrl
(
model
.
getProxyStatementAttachmentList
());
model
.
setProxyStatementAttachment
(
proxyStatementAttachment
);
model
.
setInstallContractAttachment
(
installContractAttachment
);
model
.
setProxyStatementAttachment
(
model
.
getProxyStatementAttachmentList
());
model
.
setInstallContractAttachment
(
model
.
getInstallContractAttachmentList
());
// 分割省市区字段
String
province
=
model
.
getProvince
();
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcOpeningApplicationController.java
View file @
7ed40113
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
controller
;
import
cn.hutool.core.map.MapBuilder
;
import
com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -23,6 +24,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -127,6 +129,25 @@ public class JyjcOpeningApplicationController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
queryForJyjcOpeningApplicationPage
(
page
,
jyjcOpeningApplicationDto
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/pageForCompany"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询-公司"
,
notes
=
"分页查询-公司"
)
public
ResponseModel
<
Page
<
JyjcOpeningApplicationModel
>>
querypageForCompany
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationDto
)
{
Page
<
JyjcOpeningApplication
>
page
=
new
Page
<
JyjcOpeningApplication
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
querypageForCompany
(
page
,
jyjcOpeningApplicationDto
));
}
/**
* 列表全部数据查询
*
...
...
@@ -149,9 +170,12 @@ public class JyjcOpeningApplicationController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"接收或者驳回业务开通申请"
,
notes
=
"接收或者驳回业务开通申请"
)
@PostMapping
(
value
=
"/execueFlow"
)
public
void
execueFlow
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
public
ResponseModel
<
HashMap
<
String
,
String
>>
execueFlow
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
jyjcOpeningApplicationServiceImpl
.
execueFlow
(
params
);
HashMap
<
String
,
String
>
result
=
new
HashMap
<>();
result
.
put
(
"result"
,
"success"
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
7ed40113
...
...
@@ -165,6 +165,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
public
Page
<
JyjcOpeningApplicationModel
>
queryForJyjcOpeningApplicationPage
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
)
{
return
jyjcOpeningApplicationMapper
.
selectJyjcOpeningApplicationList
(
page
,
jyjcOpeningApplicationModel
);
}
public
Page
<
JyjcOpeningApplicationModel
>
querypageForCompany
(
Page
<
JyjcOpeningApplication
>
page
,
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
)
{
//根据申请单中的单位信息对于列表数据进行过滤
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
if
(
companyBo
.
getLevel
().
equals
(
"company"
))
{
...
...
@@ -298,9 +302,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
String
originalDataId
=
params
.
get
(
"originalDataId"
).
toString
();
JyjcOpeningApplication
jyjcOpeningApplication
=
jyjcOpeningApplicationMapper
.
selectById
(
originalDataId
);
List
<
String
>
detectionRegion
=
Arrays
.
asList
(
params
.
get
(
"detectionRegion"
).
toString
().
split
(
","
))
;
String
detectionRegionName
=
params
.
get
(
"detectionRegionName"
).
toString
();
//
String detectionRegionName = params.get("detectionRegionName").toString();
jyjcOpeningApplication
.
setDetectionRegion
(
detectionRegion
);
jyjcOpeningApplication
.
setDetectionRegionName
(
detectionRegionName
);
//
jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
jyjcOpeningApplicationMapper
.
updateById
(
jyjcOpeningApplication
);
}
}
catch
(
Exception
e
)
{
...
...
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