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
62d022b9
Commit
62d022b9
authored
Dec 21, 2023
by
LiuLin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):设备移交代码提交
parent
2d094de9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
124 additions
and
11 deletions
+124
-11
JgEquipTransferDto.java
...ejoin/amos/boot/module/jg/api/dto/JgEquipTransferDto.java
+12
-1
JgEquipTransfer.java
...ejoin/amos/boot/module/jg/api/entity/JgEquipTransfer.java
+6
-0
JgEquipTransferEqMapper.java
...os/boot/module/jg/api/mapper/JgEquipTransferEqMapper.java
+1
-2
JgEquipTransferMapper.java
...amos/boot/module/jg/api/mapper/JgEquipTransferMapper.java
+3
-1
JgEquipTransferByWorkFlowController.java
...g/biz/controller/JgEquipTransferByWorkFlowController.java
+69
-0
JgEquipTransferController.java
...t/module/jg/biz/controller/JgEquipTransferController.java
+31
-5
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+0
-0
CreateCodeServiceImpl.java
...ot/module/ymt/api/service/impl/CreateCodeServiceImpl.java
+1
-1
GenerateCodeServiceImpl.java
.../module/ymt/biz/service/impl/GenerateCodeServiceImpl.java
+1
-1
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/JgEquipTransferDto.java
View file @
62d022b9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 设备移交
* 设备移交
...
@@ -20,7 +23,6 @@ public class JgEquipTransferDto extends BaseDto {
...
@@ -20,7 +23,6 @@ public class JgEquipTransferDto extends BaseDto {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"申请编号"
)
@ApiModelProperty
(
value
=
"申请编号"
)
private
String
applyNo
;
private
String
applyNo
;
...
@@ -78,4 +80,13 @@ public class JgEquipTransferDto extends BaseDto {
...
@@ -78,4 +80,13 @@ public class JgEquipTransferDto extends BaseDto {
@ApiModelProperty
(
value
=
"任务发起人id"
)
@ApiModelProperty
(
value
=
"任务发起人id"
)
private
String
promoter
;
private
String
promoter
;
@ApiModelProperty
(
value
=
"任务名称"
)
private
String
taskName
;
@ApiModelProperty
(
value
=
"流程执行角色"
)
private
String
instanceRoles
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgEquipTransfer.java
View file @
62d022b9
...
@@ -136,4 +136,10 @@ public class JgEquipTransfer extends BaseEntity {
...
@@ -136,4 +136,10 @@ public class JgEquipTransfer extends BaseEntity {
@TableField
(
value
=
"task_name"
)
@TableField
(
value
=
"task_name"
)
private
String
taskName
;
private
String
taskName
;
/**
* 任务发起人id
*/
@TableField
(
value
=
"instance_roles"
)
private
String
instanceRoles
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgEquipTransferEqMapper.java
View file @
62d022b9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransferEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransferEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
/**
* 设备移交关系表 Mapper 接口
* 设备移交关系表 Mapper 接口
...
@@ -9,6 +8,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -9,6 +8,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @author system_generator
* @date 2023-12-20
* @date 2023-12-20
*/
*/
public
interface
JgEquipTransferEqMapper
extends
BaseMapper
<
JgEquipTransferEq
>
{
public
interface
JgEquipTransferEqMapper
extends
Custom
BaseMapper
<
JgEquipTransferEq
>
{
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgEquipTransferMapper.java
View file @
62d022b9
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -15,7 +17,7 @@ import java.util.Map;
...
@@ -15,7 +17,7 @@ import java.util.Map;
* @date 2023-12-20
* @date 2023-12-20
*/
*/
public
interface
JgEquipTransferMapper
extends
CustomBaseMapper
<
JgEquipTransfer
>
{
public
interface
JgEquipTransferMapper
extends
CustomBaseMapper
<
JgEquipTransfer
>
{
Page
<
JgEquipTransfer
>
queryForPage
(
Page
<
JgEquipTransfer
>
page
,
JgEquipTransferDto
dto
,
String
type
,
String
companyCode
);
Page
<
JgEquipTransfer
>
queryForPage
(
Page
<
JgEquipTransfer
>
page
,
@Param
(
"param"
)
JgEquipTransferDto
model
,
@Param
(
"type"
)
String
type
,
@Param
(
"companyCode"
)
String
companyCode
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgEquipTransferByWorkFlowController.java
0 → 100644
View file @
62d022b9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEquipTransferServiceImpl
;
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.LinkedHashMap
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* 设备移交
*
* @author system_generator
* @date 2023-12-20
*/
@RestController
@Api
(
tags
=
"设备移交Api"
)
@RequestMapping
(
value
=
"/jg-equip-transfer"
)
public
class
JgEquipTransferByWorkFlowController
extends
BaseController
{
@Autowired
JgEquipTransferServiceImpl
jgEquipTransferServiceImpl
;
private
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
/**
* 受理
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/accept"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备移交受理"
,
notes
=
"设备移交受理"
)
public
ResponseModel
<
JgEquipTransferDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
equipTransferInfo
=
(
LinkedHashMap
)
model1
.
get
(
TABLE_PAGE_ID
);
JgEquipTransferDto
jgEquipTransferDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipTransferInfo
),
JgEquipTransferDto
.
class
);
jgEquipTransferServiceImpl
.
accept
(
jgEquipTransferDto
,
op
);
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
* 设备移交撤销
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/cancel"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备移交撤销"
,
notes
=
"设备移交撤销"
)
public
ResponseModel
<
JgEquipTransferDto
>
cancel
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
JgEquipTransferDto
equipTransferInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
TABLE_PAGE_ID
)),
JgEquipTransferDto
.
class
,
true
);
if
(
Objects
.
isNull
(
equipTransferInfo
))
{
throw
new
IllegalArgumentException
(
"参数equipTransferInfo不能为空"
);
}
jgEquipTransferServiceImpl
.
cancel
(
equipTransferInfo
);
return
ResponseHelper
.
buildResponse
(
equipTransferInfo
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgEquipTransferController.java
View file @
62d022b9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -8,8 +9,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -8,8 +9,7 @@ import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEquipTransferServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEquipTransferServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -31,6 +31,8 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -31,6 +31,8 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@RequestMapping
(
value
=
"/jg-equip-transfer"
)
@RequestMapping
(
value
=
"/jg-equip-transfer"
)
public
class
JgEquipTransferController
extends
BaseController
{
public
class
JgEquipTransferController
extends
BaseController
{
private
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
@Autowired
@Autowired
JgEquipTransferServiceImpl
jgEquipTransferServiceImpl
;
JgEquipTransferServiceImpl
jgEquipTransferServiceImpl
;
...
@@ -42,8 +44,32 @@ public class JgEquipTransferController extends BaseController {
...
@@ -42,8 +44,32 @@ public class JgEquipTransferController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增设备移交"
,
notes
=
"新增设备移交"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增设备移交"
,
notes
=
"新增设备移交"
)
public
ResponseModel
<
JgEquipTransferDto
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JgEquipTransferDto
>
dto
)
{
public
ResponseModel
<
Object
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JgEquipTransferDto
>
modelMap
)
{
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
saveOrUpdateModel
(
dto
,
false
));
jgEquipTransferServiceImpl
.
saveOrUpdateModel
(
submitType
,
modelMap
.
get
(
TABLE_PAGE_ID
),
getSelectedOrgInfo
());
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新设备移交"
,
notes
=
"根据sequenceNbr更新设备移交"
)
public
ResponseModel
<
JgEquipTransferDto
>
updateBySequenceNbr
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
modelMap
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgEquipTransferDto
equipTransferDto
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
modelMap
.
get
(
TABLE_PAGE_ID
)),
JgEquipTransferDto
.
class
,
true
);
if
(
Objects
.
isNull
(
equipTransferDto
))
{
throw
new
IllegalArgumentException
(
"参数equipTransferDto不能为空"
);
}
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
updateEquipTransfer
(
submitType
,
equipTransferDto
,
op
));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/delete"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除设备移交"
,
notes
=
"根据sequenceNbr删除设备移交"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"sequenceNbr"
)
Long
[]
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
removeById
(
sequenceNbr
));
}
}
/**
/**
...
@@ -54,7 +80,7 @@ public class JgEquipTransferController extends BaseController {
...
@@ -54,7 +80,7 @@ public class JgEquipTransferController extends BaseController {
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
@DeleteMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"
POST
"
,
value
=
"批量删除设备移交"
,
notes
=
"批量删除设备移交"
)
@ApiOperation
(
httpMethod
=
"
DELETE
"
,
value
=
"批量删除设备移交"
,
notes
=
"批量删除设备移交"
)
public
ResponseModel
<
Object
>
deleteBySequenceNbr
(
@RequestParam
String
ids
)
{
public
ResponseModel
<
Object
>
deleteBySequenceNbr
(
@RequestParam
String
ids
)
{
if
(
StringUtils
.
isEmpty
(
ids
))
{
if
(
StringUtils
.
isEmpty
(
ids
))
{
throw
new
RuntimeException
(
"请选择需要删除的行!"
);
throw
new
RuntimeException
(
"请选择需要删除的行!"
);
...
...
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/JgEquipTransferServiceImpl.java
View file @
62d022b9
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/service/impl/CreateCodeServiceImpl.java
View file @
62d022b9
...
@@ -74,7 +74,7 @@ public class CreateCodeServiceImpl implements ICreateCodeService {
...
@@ -74,7 +74,7 @@ public class CreateCodeServiceImpl implements ICreateCodeService {
@Override
@Override
public
String
createUseRegistrationCode
(
String
key
)
{
public
String
createUseRegistrationCode
(
String
key
)
{
rulePrefix
=
"("
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yy"
))
+
")"
;
rulePrefix
=
"("
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yy"
))
+
")"
;
return
generateSequence
(
key
,
SEQUENCE_TYPE_UR
,
LOCK_KEY_UR
)
;
return
(
key
.
length
()
==
5
)
?
generateSequence
(
key
,
SEQUENCE_TYPE_UR
,
LOCK_KEY_UR
):
"生成码规则不对!"
;
}
}
@Override
@Override
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/GenerateCodeServiceImpl.java
View file @
62d022b9
...
@@ -75,7 +75,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
...
@@ -75,7 +75,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
@Override
@Override
public
String
createUseRegistrationCode
(
String
key
)
{
public
String
createUseRegistrationCode
(
String
key
)
{
rulePrefix
=
"("
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yy"
))
+
")"
;
rulePrefix
=
"("
+
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yy"
))
+
")"
;
return
generateSequence
(
key
,
SEQUENCE_TYPE_UR
,
LOCK_KEY_UR
)
;
return
(
key
.
length
()
==
5
)
?
generateSequence
(
key
,
SEQUENCE_TYPE_UR
,
LOCK_KEY_UR
)
:
"生成码规则不对!"
;
}
}
@Override
@Override
...
...
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