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
12ef22ec
Commit
12ef22ec
authored
Dec 20, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段名修改,枚举修改提交
parent
776dbefb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
178 additions
and
70 deletions
+178
-70
JgScrapCancelDto.java
...yeejoin/amos/boot/module/jg/api/dto/JgScrapCancelDto.java
+20
-1
JgScrapCancel.java
...yeejoin/amos/boot/module/jg/api/entity/JgScrapCancel.java
+4
-0
CancelFlowStatusEnum.java
...n/amos/boot/module/jg/api/enums/CancelFlowStatusEnum.java
+36
-0
JgScrapCancelMapper.java
...n/amos/boot/module/jg/api/mapper/JgScrapCancelMapper.java
+27
-0
JgScrapCancelMapper.xml
...-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
+0
-0
JgScrapCancelController.java
...oot/module/jg/biz/controller/JgScrapCancelController.java
+91
-69
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+0
-0
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/JgScrapCancelDto.java
View file @
12ef22ec
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
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
;
import
java.util.Map
;
/**
* 设备注销报废
...
...
@@ -15,7 +19,7 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JgScrapCancelDto"
,
description
=
"设备注销报废"
)
@ApiModel
(
value
=
"JgScrapCancelDto"
,
description
=
"设备注销报废"
)
public
class
JgScrapCancelDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -63,7 +67,22 @@ public class JgScrapCancelDto extends BaseDto {
@ApiModelProperty
(
value
=
"注销证明"
)
private
String
cancelCertificate
;
@ApiModelProperty
(
value
=
"注销证明文件集合格式"
)
private
List
<
Map
<
String
,
Object
>>
cancelCertificateList
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
@ApiModelProperty
(
value
=
"终审通过时间"
)
private
Date
auditPassDate
;
private
List
<
String
>
roleIds
;
// 区分监管和企业
private
String
type
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgScrapCancel.java
View file @
12ef22ec
...
...
@@ -112,4 +112,8 @@ public class JgScrapCancel extends BaseEntity {
@TableField
(
"audit_pass_date"
)
private
Date
auditPassDate
;
@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/CancelFlowStatusEnum.java
0 → 100644
View file @
12ef22ec
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 使用登记状态西悉尼
*/
@Getter
@AllArgsConstructor
public
enum
CancelFlowStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级待受理"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级待受理"
),
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级待受理"
);
private
final
String
name
;
private
final
String
code
;
private
final
String
pass
;
public
static
CancelFlowStatusEnum
getMessage
(
String
name
){
for
(
CancelFlowStatusEnum
constants
:
values
())
{
if
(
constants
.
getName
().
equals
(
name
))
{
return
constants
;
}
}
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgScrapCancelMapper.java
View file @
12ef22ec
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.JgScrapCancelDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel
;
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 接口
...
...
@@ -11,4 +19,23 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
JgScrapCancelMapper
extends
BaseMapper
<
JgScrapCancel
>
{
Page
<
Map
<
String
,
Object
>>
getListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"dto"
)
JgScrapCancelDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"orgCode"
)
String
orgCode
);
Map
<
String
,
Object
>
getDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getInspectDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getUseDetail
(
@Param
(
"id"
)
String
id
);
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
);
/**
* 根据安装告知编号查询设备、设计、制造等信息
*
* @param sequenceNbr 安装告知编号
*/
Map
<
String
,
Object
>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
View file @
12ef22ec
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/JgScrapCancelController.java
View file @
12ef22ec
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
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
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.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgScrapCancelServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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.*
;
/**
* 设备注销报废
...
...
@@ -29,88 +36,103 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
public
class
JgScrapCancelController
extends
BaseController
{
@Autowired
JgScrapCancelServiceImpl
jgScrapCancelServiceImpl
;
JgScrapCancelServiceImpl
jgScrapCancelService
;
/**
* 新增设备注销报废
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增
设备注销报废"
,
notes
=
"新增设备注销报废
"
)
public
ResponseModel
<
JgScrapCancelDto
>
save
(
@RequestBody
JgScrapCancelDto
model
)
{
model
=
jgScrapCancelServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增
"
,
notes
=
"新增
"
)
public
ResponseModel
<
Object
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JgScrapCancelDto
>
model
)
{
jgScrapCancelService
.
save
(
submitType
,
model
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
* @param model 安装告知
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新设备注销报废"
,
notes
=
"根据sequenceNbr更新设备注销报废"
)
public
ResponseModel
<
JgScrapCancelDto
>
updateBySequenceNbrJgScrapCancel
(
@RequestBody
JgScrapCancelDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jgScrapCancelServiceImpl
.
updateWithModel
(
model
));
@PostMapping
(
value
=
"/updateInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据sequenceNbr更新安装告知"
,
notes
=
"根据sequenceNbr更新安装告知"
)
public
ResponseModel
<
JgScrapCancelDto
>
updateInfo
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgScrapCancelDto
jgScrapCancelDto
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"jgScrapCancelAdd"
)),
JgScrapCancelDto
.
class
,
true
);
if
(
Objects
.
isNull
(
jgScrapCancelDto
))
{
throw
new
IllegalArgumentException
(
"参数jgScrapCancelAdd不能为空"
);
}
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"jgScrapCancelAdd"
)).
get
(
"cancelCertificateList"
);
jgScrapCancelDto
.
setCancelCertificateList
((
List
<
Map
<
String
,
Object
>>)
o
);
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
updateInfo
(
submitType
,
jgScrapCancelDto
,
op
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除设备注销报废"
,
notes
=
"根据sequenceNbr删除设备注销报废"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
jgScrapCancelServiceImpl
.
removeById
(
sequenceNbr
));
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
LinkedHashMap
model1
=
(
LinkedHashMap
)
map
.
get
(
"model"
);
LinkedHashMap
jgScrapCancelInfo
=
(
LinkedHashMap
)
model1
.
get
(
"jgScrapCancelAdd"
);
JgScrapCancelDto
jgScrapCancelDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgScrapCancelInfo
),
JgScrapCancelDto
.
class
);
jgScrapCancelService
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
())),
jgScrapCancelDto
.
getInstanceId
(),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"opinion"
)),
true
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个设备注销报废"
,
notes
=
"根据sequenceNbr查询单个设备注销报废"
)
public
ResponseModel
<
JgScrapCancelDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgScrapCancelServiceImpl
.
queryBySeq
(
sequenceNbr
));
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
withdraw
(
@RequestBody
JSONObject
map
)
{
jgScrapCancelService
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Object
>
deleteBatch
(
@RequestBody
JSONObject
map
)
{
List
<
Long
>
ids
=
(
List
<
Long
>)
map
.
get
(
"ids"
);
jgScrapCancelService
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备注销报废分页查询"
,
notes
=
"设备注销报废分页查询"
)
public
ResponseModel
<
Page
<
JgScrapCancelDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
JgScrapCancelDto
>
page
=
new
Page
<
JgScrapCancelDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
jgScrapCancelServiceImpl
.
queryForJgScrapCancelPage
(
page
));
@PostMapping
(
value
=
"/deleteMessage"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Object
>
deleteMessage
(
@RequestParam
(
"id"
)
Long
id
)
{
ArrayList
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
id
);
jgScrapCancelService
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@PostMapping
(
value
=
"/getList"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
JgScrapCancelDto
dto
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
getList
(
dto
,
page
,
dto
.
getRoleIds
()));
}
/**
*
列表全部数据
查询
*
根据sequenceNbr
查询
*
* @
return
* @
param sequenceNbr 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@
ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备注销报废列表全部数据查询"
,
notes
=
"设备注销报废列表全部数据查询
"
)
@
GetMapping
(
value
=
"/list
"
)
public
ResponseModel
<
List
<
JgScrapCancelDto
>>
selectForList
(
)
{
return
ResponseHelper
.
buildResponse
(
jgScrapCancelServiceImpl
.
queryForJgScrapCancelList
(
));
@
GetMapping
(
value
=
"/details
"
)
@
ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个详情"
,
notes
=
"根据sequenceNbr查询单个详情
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
selectOne
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
queryBySequenceNbr
(
sequenceNbr
));
}
}
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/JgScrapCancelServiceImpl.java
View file @
12ef22ec
This diff is collapsed.
Click to expand it.
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