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
3d634912
Commit
3d634912
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
d8d25565
c38bec17
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
164 additions
and
112 deletions
+164
-112
pom.xml
...m-tzs/amos-boot-module-jg/amos-boot-module-jg-api/pom.xml
+5
-0
JgInstallationNoticeDto.java
.../amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
+24
-15
IJgInstallationNoticeService.java
...t/module/jg/api/service/IJgInstallationNoticeService.java
+5
-2
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+1
-4
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+5
-1
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+32
-20
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+2
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+90
-15
CreateCodeController.java
.../boot/module/tcm/api/controller/CreateCodeController.java
+0
-54
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/pom.xml
View file @
3d634912
...
...
@@ -23,6 +23,11 @@
</dependency>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-tcm-api
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-common-api
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
...
...
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 @
3d634912
...
...
@@ -2,27 +2,28 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
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
lombok.Getter
;
import
org.springframework.util.StringUtils
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
*
*
* @author system_generator
* @date 2023-12-12
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JgInstallationNoticeDto"
,
description
=
""
)
public
class
JgInstallationNoticeDto
extends
BaseDto
{
@ApiModel
(
value
=
"JgInstallationNoticeDto"
,
description
=
""
)
public
class
JgInstallationNoticeDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"告知单编号"
)
...
...
@@ -166,13 +167,13 @@ public class JgInstallationNoticeDto extends BaseDto {
private
List
<
Map
<
String
,
String
>>
proxyStatementAttachmentList
;
@ApiModelProperty
(
value
=
"安装合同照片"
)
private
List
<
Map
<
String
,
String
>>
installContractAttachmentList
;
private
List
<
Map
<
String
,
String
>>
installContractAttachmentList
;
@ApiModelProperty
(
value
=
"安装委托书图片"
)
private
String
proxyStatementAttachment
;
@ApiModelProperty
(
value
=
"安装委托书图片"
)
private
String
proxyStatementAttachment
;
@ApiModelProperty
(
value
=
"安装合同照片"
)
private
String
installContractAttachment
;
@ApiModelProperty
(
value
=
"安装合同照片"
)
private
String
installContractAttachment
;
@ApiModelProperty
(
value
=
"是否西咸"
)
private
String
isXixian
;
...
...
@@ -186,15 +187,23 @@ public class JgInstallationNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"区名字"
)
private
String
countyName
;
@ApiModelProperty
(
value
=
"市名字"
)
private
String
cityName
;
@ApiModelProperty
(
value
=
"市名字"
)
private
String
cityName
;
@ApiModelProperty
(
value
=
"省名字"
)
private
String
provinceName
;
@ApiModelProperty
(
value
=
"省名字"
)
private
String
provinceName
;
@ApiModelProperty
(
value
=
"完整地址"
)
private
String
fullAddress
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
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/service/IJgInstallationNoticeService.java
View file @
3d634912
...
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.api.service;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
java.util.Map
;
/**
* 接口类
*
...
...
@@ -13,7 +15,8 @@ public interface IJgInstallationNoticeService {
/**
* 保存安装告知单
* @param model
* @param model 数据
* @param submitType 保存类型
*/
void
saveNotice
(
JgInstallationNoticeDto
model
);
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
model
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
3d634912
...
...
@@ -4,11 +4,8 @@
<select
id=
"getUnitListByType"
resultType=
"java.util.Map"
>
SELECT
sequence_nbr sequenceNbr,
use_code useCode,
use_unit useUnit,
use_contact useContact,
contact_phone contactPhone
use_unit useUnit
FROM
tz_base_enterprise_info
WHERE
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
3d634912
...
...
@@ -12,7 +12,11 @@
isn.region_no AS regionNo,
isn.address AS address,
isn.notice_status AS noticeStatus,
isn.install_unit_name AS installUnitName
isn.install_unit_name AS installUnitName,
isn.province_name AS provinceName,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.instance_id AS instanceId
FROM
tzs_jg_installation_notice isn
<where>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationNoticeController.java
View file @
3d634912
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
org.omg.PortableInterceptor.SUCCESSFUL
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl
;
...
...
@@ -19,6 +26,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
/**
...
...
@@ -41,12 +49,12 @@ public class JgInstallationNoticeController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增安装告知"
,
notes
=
"新增安装告知"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
save
(
@RequestBody
JgInstallationNoticeDto
model
)
{
jgInstallationNoticeServiceImpl
.
saveNotice
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增安装告知"
,
notes
=
"新增安装告知"
)
public
ResponseModel
<
String
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JgInstallationNoticeDto
>
model
)
{
jgInstallationNoticeServiceImpl
.
saveNotice
(
submitType
,
model
);
return
ResponseHelper
.
buildResponse
(
""
);
}
/**
* 根据sequenceNbr更新
...
...
@@ -56,12 +64,12 @@ public class JgInstallationNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新安装告知"
,
notes
=
"根据sequenceNbr更新安装告知"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
updateBySequenceNbrJgInstallationNotice
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
public
ResponseModel
<
JgInstallationNoticeDto
>
updateBySequenceNbrJgInstallationNotice
(
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
"op"
)
String
op
)
{
JgInstallationNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"installationInfo"
)),
JgInstallationNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数installationInfo不能为空"
);
}
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
updateInstallationNotice
(
installationInfo
));
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
updateInstallationNotice
(
installationInfo
,
op
));
}
/**
...
...
@@ -77,6 +85,22 @@ public class JgInstallationNoticeController extends BaseController {
}
/**
* 根据sequenceNbr批量删除
*
* @param sequenceNbrs 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/batchDelete"
)
@ApiOperation
(
value
=
"根据sequenceNbr删除维保合同备案"
,
notes
=
"根据sequenceNbr删除维保合同备案"
)
public
ResponseModel
<
Boolean
>
deleteForBatch
(
@RequestParam
(
"sequenceNbrs"
)
Long
[]
sequenceNbrs
)
{
try
{
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
deleteForBatch
(
sequenceNbrs
));
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
...
...
@@ -89,18 +113,6 @@ public class JgInstallationNoticeController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
queryBySequenceNbr
(
sequenceNbr
));
}
/**
* 根据sequenceNbr批量删除
*
* @param sequenceNbrs 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/batchDelete"
)
@ApiOperation
(
value
=
"根据sequenceNbr删除维保合同备案"
,
notes
=
"根据sequenceNbr删除维保合同备案"
)
public
ResponseModel
<
Boolean
>
deleteForBatch
(
@RequestParam
(
"sequenceNbrs"
)
Long
[]
sequenceNbrs
)
{
return
ResponseHelper
.
buildResponse
(
jgInstallationNoticeServiceImpl
.
deleteForBatch
(
sequenceNbrs
));
}
/**
* 列表分页查询
...
...
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/CommonServiceImpl.java
View file @
3d634912
...
...
@@ -162,8 +162,9 @@ public class CommonServiceImpl implements ICommonService {
type
=
"使用单位"
;
}
else
if
(
type
.
equals
(
"maintenance"
))
{
type
=
"维保单位"
;
}
else
if
(
type
.
equals
(
"inspection"
))
{
type
=
"检验检测机构"
;
}
return
commonMapper
.
getUnitListByType
(
type
);
}
...
...
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 @
3d634912
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
...
...
@@ -9,16 +11,25 @@ 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
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.*
;
...
...
@@ -33,12 +44,13 @@ import java.util.stream.Collectors;
@Service
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
@Autowired
JgRelationEquipMapper
jgRelationEquipMapper
;
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
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
@Autowired
private
ICommonService
commonService
;
/**
* 根据sequenceNbr查询
...
...
@@ -70,7 +82,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @param noticeDto 安装告知
*/
@SuppressWarnings
(
"rawtypes"
)
public
JgInstallationNoticeDto
updateInstallationNotice
(
JgInstallationNoticeDto
noticeDto
)
{
public
JgInstallationNoticeDto
updateInstallationNotice
(
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
this
.
convertField
(
noticeDto
);
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
...
...
@@ -82,15 +94,46 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
noticeDto
.
setInstanceId
(
instanceId
);
noticeDto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
noticeDto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
//组装信息
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
taskResultDTO
.
setTaskId
(
taskId
);
taskResultDTO
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
taskResultDTO
.
setVariable
(
map
);
//执行流程
AjaxResult
ajaxResult1
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
if
(
ObjectUtils
.
isEmpty
(
ajaxResult1
))
{
noticeDto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
dto
,
bean
);
jgInstallationNoticeMapper
.
updateById
(
bean
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
return
noticeDto
;
}
@Autowired
private
ICreateCodeService
iCreateCodeService
;
@Autowired
JgRelationEquipMapper
jgRelationEquipMapper
;
/**
* 分页查询
*
...
...
@@ -138,24 +181,50 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
return
false
;
}
Collection
<
JgInstallationNotice
>
jgInstallationNotices
=
this
.
listByIds
(
Arrays
.
asList
(
sequenceNbrs
));
jgInstallationNotices
.
forEach
(
notice
->
notice
.
setIsDelete
(
true
));
jgInstallationNotices
.
forEach
(
notice
->
{
if
(
StringUtils
.
hasText
(
notice
.
getInspectUnitId
()))
{
throw
new
IllegalStateException
(
"所选数据已存在流程,不能删除!"
);
}
notice
.
setIsDelete
(
true
);
});
return
this
.
updateBatchById
(
jgInstallationNotices
);
}
@Override
public
void
saveNotice
(
JgInstallationNoticeDto
model
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgInstallationNoticeDto
>
jgInstallationNoticeDtoMap
)
{
JgInstallationNoticeDto
model
=
jgInstallationNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
// 字段转换
convertField
(
model
);
// 获取告知设备列表
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
return
;
}
// 获取告知单号
// 调用方法
List
<
String
>
applyNoList
=
new
ArrayList
<>();
Random
random
=
new
Random
();
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
applyNoList
.
add
(
String
.
valueOf
(
random
.
nextInt
()));
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
GZ
.
getCode
(),
deviceList
.
size
());
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
{
return
;
}
// 判断当前是否为提交
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
AjaxResult
ajaxResult
=
null
;
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
instanceIdList
.
add
(
instanceId
);
}
catch
(
Exception
e
)
{
log
.
error
(
"流程启动失败:{}"
,
e
);
}
}
}
List
<
JgInstallationNotice
>
list
=
new
ArrayList
<>();
...
...
@@ -167,10 +236,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
int
i
=
deviceList
.
indexOf
(
obj
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"
sequenceNbr
"
)));
jgRelationEquip
.
setEquipId
(
String
.
valueOf
(
obj
.
get
(
"
sequenceNbr
"
)));
dto
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"
SEQUENCE_NBR
"
)));
jgRelationEquip
.
setEquipId
(
String
.
valueOf
(
obj
.
get
(
"
SEQUENCE_NBR
"
)));
jgRelationEquip
.
setApplyNo
(
applyNo
);
jgRelationEquip
.
setBusinessType
(
"GZ"
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
}
else
{
dto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
});
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/controller/CreateCodeController.java
deleted
100644 → 0
View file @
d8d25565
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ICreateCodeService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
/**
*
* 生成顺序码
* @author LiuLin
* @date 2023-12-14
*/
@RestController
@Api
(
tags
=
"生成顺序码"
)
@RequestMapping
(
value
=
"/code"
)
public
class
CreateCodeController
extends
BaseController
{
@Autowired
private
ICreateCodeService
createCodeService
;
/**
* 申请单编号生成
* @param type type
* @param batchSize batchSize
* @return List
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/ANCode"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"申请单编号生成"
,
notes
=
"申请单编号生成"
)
public
ResponseModel
<
List
<
String
>>
createANCode
(
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"batchSize"
)
int
batchSize
)
{
return
ResponseHelper
.
buildResponse
(
createCodeService
.
createApplicationFormCode
(
type
,
batchSize
));
}
/**
* 生成设备注册编码
* @param key key
* @return String
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/DRCode"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"申请单编号生成"
,
notes
=
"申请单编号生成"
)
public
ResponseModel
<
String
>
createDRCode
(
@RequestParam
(
"key"
)
String
key
)
{
return
ResponseHelper
.
buildResponse
(
createCodeService
.
createDeviceRegistrationCode
(
key
));
}
}
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