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
68c6fed4
Commit
68c6fed4
authored
Sep 20, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg):改造告知作废
parent
57c368c2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
63 additions
and
11 deletions
+63
-11
JgReformNoticeDto.java
...eejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
+11
-3
JgReformNotice.java
...eejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
+25
-0
IJgMaintainNoticeService.java
.../boot/module/jg/api/service/IJgMaintainNoticeService.java
+1
-1
IJgReformNoticeService.java
...os/boot/module/jg/api/service/IJgReformNoticeService.java
+9
-0
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+2
-1
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+1
-1
JgMaintainNoticeController.java
.../module/jg/biz/controller/JgMaintainNoticeController.java
+2
-2
JgReformNoticeController.java
...ot/module/jg/biz/controller/JgReformNoticeController.java
+8
-0
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+4
-3
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.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/JgReformNoticeDto.java
View file @
68c6fed4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer
;
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
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
@@ -270,4 +268,14 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -270,4 +268,14 @@ public class JgReformNoticeDto extends BaseDto {
*/
*/
@ApiModelProperty
(
value
=
"工作流下一节点任务id"
)
@ApiModelProperty
(
value
=
"工作流下一节点任务id"
)
private
String
nextTaskId
;
private
String
nextTaskId
;
@ApiModelProperty
(
"作废原因"
)
private
String
cancelReason
;
@ApiModelProperty
(
"作废日期"
)
private
Date
cancelDate
;
@ApiModelProperty
(
"作废人员id"
)
private
String
cancelUserId
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
View file @
68c6fed4
...
@@ -11,6 +11,7 @@ import lombok.experimental.Accessors;
...
@@ -11,6 +11,7 @@ import lombok.experimental.Accessors;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 改造告知
* 改造告知
...
@@ -382,4 +383,28 @@ public class JgReformNotice extends BaseEntity {
...
@@ -382,4 +383,28 @@ public class JgReformNotice extends BaseEntity {
*/
*/
@TableField
(
"receive_company_org_code"
)
@TableField
(
"receive_company_org_code"
)
private
String
receiveCompanyOrgCode
;
private
String
receiveCompanyOrgCode
;
/**
* 告知设备列表
*/
@TableField
(
exist
=
false
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
/**
* 作废原因
*/
@TableField
(
"cancel_reason"
)
private
String
cancelReason
;
/**
* 作废日期
*/
@TableField
(
"cancel_date"
)
private
Date
cancelDate
;
/**
* 作废人员id
*/
@TableField
(
"cancel_user_id"
)
private
String
cancelUserId
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgMaintainNoticeService.java
View file @
68c6fed4
...
@@ -68,5 +68,5 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
...
@@ -68,5 +68,5 @@ public interface IJgMaintainNoticeService extends IService<JgMaintainNotice> {
* @param cancelReason 作废原因
* @param cancelReason 作废原因
* @return JgInstallationNoticeDto
* @return JgInstallationNoticeDto
*/
*/
JgMaintainNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
,
Map
<
String
,
Object
>
model
);
JgMaintainNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgReformNoticeService.java
View file @
68c6fed4
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgReformNotice
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -67,4 +68,12 @@ public interface IJgReformNoticeService extends IService<JgReformNotice> {
...
@@ -67,4 +68,12 @@ public interface IJgReformNoticeService extends IService<JgReformNotice> {
* @return pdf文件路径
* @return pdf文件路径
*/
*/
void
generateInstallationNoticeReport
(
Long
sequenceNbr
,
HttpServletResponse
response
);
void
generateInstallationNoticeReport
(
Long
sequenceNbr
,
HttpServletResponse
response
);
/**
* 作废申请
* @param sequenceNbr 业务唯一标识
* @param cancelReason 作废原因
* @return JgInstallationNoticeDto
*/
JgReformNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
68c6fed4
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
isn.instance_status AS instanceStatus,
isn.instance_status AS instanceStatus,
isn.inform_number AS informNumber,
isn.inform_number AS informNumber,
isn.next_task_id as nextTaskId,
isn.next_task_id as nextTaskId,
isn.cancel_reason as cancelReason,
DATE_FORMAT(isn.plan_date,'%Y-%m-%d') AS planDate,
DATE_FORMAT(isn.plan_date,'%Y-%m-%d') AS planDate,
DATE_FORMAT(isn.notice_date,'%Y-%m-%d') AS noticeDate,
DATE_FORMAT(isn.notice_date,'%Y-%m-%d') AS noticeDate,
DATE_FORMAT(isn.accept_date,'%Y-%m-%d') AS acceptDate,
DATE_FORMAT(isn.accept_date,'%Y-%m-%d') AS acceptDate,
...
@@ -84,7 +85,7 @@
...
@@ -84,7 +85,7 @@
</if>
</if>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND (isn.notice_status in ('6612', '6613', '6614', '6616') )
AND (isn.notice_status in ('6612', '6613', '6614', '6616'
,'6617'
) )
AND (isn.receive_org_code = #{orgCode} or isn.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
AND (isn.receive_org_code = #{orgCode} or isn.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
AND isn.instance_id
<![CDATA[<>]]>
''
AND isn.instance_id
<![CDATA[<>]]>
''
</if>
</if>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
68c6fed4
...
@@ -241,7 +241,7 @@ public class CommonController extends BaseController {
...
@@ -241,7 +241,7 @@ public class CommonController extends BaseController {
}
}
private
Map
<
String
,
Object
>
mapPointTypeToMap
(
FlowStatusEnum
e
)
{
private
Map
<
String
,
Object
>
mapPointTypeToMap
(
FlowStatusEnum
e
)
{
if
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()
==
e
.
getCode
()
||
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()
==
e
.
getCode
()
)
{
if
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()
==
e
.
getCode
())
{
return
null
;
return
null
;
}
}
Map
<
String
,
Object
>
record
=
new
HashMap
<>();
Map
<
String
,
Object
>
record
=
new
HashMap
<>();
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintainNoticeController.java
View file @
68c6fed4
...
@@ -148,8 +148,8 @@ public class JgMaintainNoticeController extends BaseController {
...
@@ -148,8 +148,8 @@ public class JgMaintainNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"维修告知单个作废"
,
notes
=
"维修告知单个作废"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"维修告知单个作废"
,
notes
=
"维修告知单个作废"
)
@PutMapping
(
value
=
"/cancel/application"
)
@PutMapping
(
value
=
"/cancel/application"
)
public
ResponseModel
<
JgMaintainNotice
>
cancelApplication
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
public
ResponseModel
<
JgMaintainNotice
>
cancelApplication
(
@RequestBody
JgMaintainNoticeDto
dto
)
{
JgMaintainNotice
result
=
iJgMaintainNoticeService
.
cancelApplication
(
Long
.
parseLong
((
String
)
model
.
get
(
"sequenceNbr"
)),
(
String
)
model
.
get
(
"cancelReason"
),
model
);
JgMaintainNotice
result
=
iJgMaintainNoticeService
.
cancelApplication
(
dto
.
getSequenceNbr
(),
dto
.
getCancelReason
()
);
return
ResponseHelper
.
buildResponse
(
result
);
return
ResponseHelper
.
buildResponse
(
result
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformNoticeController.java
View file @
68c6fed4
...
@@ -146,4 +146,12 @@ public class JgReformNoticeController extends BaseController {
...
@@ -146,4 +146,12 @@ public class JgReformNoticeController extends BaseController {
public
void
generateReport
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
void
generateReport
(
HttpServletResponse
response
,
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
jgReformNoticeService
.
generateInstallationNoticeReport
(
sequenceNbr
,
response
);
jgReformNoticeService
.
generateInstallationNoticeReport
(
sequenceNbr
,
response
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"改造告知单个作废"
,
notes
=
"改造告知单个作废"
)
@PutMapping
(
value
=
"/cancel/application"
)
public
ResponseModel
<
JgReformNotice
>
cancelApplication
(
@RequestBody
JgReformNoticeDto
dto
)
{
JgReformNotice
result
=
jgReformNoticeService
.
cancelApplication
(
dto
.
getSequenceNbr
(),
dto
.
getCancelReason
());
return
ResponseHelper
.
buildResponse
(
result
);
}
}
}
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/JgMaintainNoticeServiceImpl.java
View file @
68c6fed4
...
@@ -434,6 +434,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -434,6 +434,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
});
});
jgMaintainNoticeEqMapper
.
insertBatchSomeColumn
(
equipList
);
jgMaintainNoticeEqMapper
.
insertBatchSomeColumn
(
equipList
);
// 更新历史表
// 更新历史表
notice
.
setDeviceList
(
deviceList
);
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getName
(),
JSON
.
parseObject
(
JSON
.
toJSONString
(
notice
)),
""
,
notice
.
getSequenceNbr
().
toString
());
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getName
(),
JSON
.
parseObject
(
JSON
.
toJSONString
(
notice
)),
""
,
notice
.
getSequenceNbr
().
toString
());
return
noticeDto
;
return
noticeDto
;
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
...
@@ -1108,7 +1109,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -1108,7 +1109,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
JgMaintainNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
,
Map
<
String
,
Object
>
model
)
{
public
JgMaintainNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
)
{
// 1.更新为已作废
// 1.更新为已作废
JgMaintainNotice
maintainNotice
=
this
.
getById
(
sequenceNbr
);
JgMaintainNotice
maintainNotice
=
this
.
getById
(
sequenceNbr
);
String
oldNoticeStatus
=
maintainNotice
.
getNoticeStatus
();
String
oldNoticeStatus
=
maintainNotice
.
getNoticeStatus
();
...
@@ -1120,7 +1121,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -1120,7 +1121,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
maintainNotice
.
setPromoter
(
null
);
maintainNotice
.
setPromoter
(
null
);
this
.
updateById
(
maintainNotice
);
this
.
updateById
(
maintainNotice
);
// 2.更新关联的业务
// 2.更新关联的业务
this
.
processElseDataByStatus
(
Objects
.
requireNonNull
(
FlowStatusEnum
.
getEumByCode
(
Integer
.
parseInt
(
oldNoticeStatus
))),
maintainNotice
,
model
);
this
.
processElseDataByStatus
(
Objects
.
requireNonNull
(
FlowStatusEnum
.
getEumByCode
(
Integer
.
parseInt
(
oldNoticeStatus
))),
maintainNotice
);
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
@Override
public
void
afterCommit
()
{
public
void
afterCommit
()
{
...
@@ -1137,7 +1138,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -1137,7 +1138,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
return
jgInstallationNoticeEqs
.
stream
().
map
(
JgMaintainNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
return
jgInstallationNoticeEqs
.
stream
().
map
(
JgMaintainNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
}
}
private
void
processElseDataByStatus
(
FlowStatusEnum
oldNoticeStatus
,
JgMaintainNotice
maintainNotice
,
Map
<
String
,
Object
>
model
)
{
private
void
processElseDataByStatus
(
FlowStatusEnum
oldNoticeStatus
,
JgMaintainNotice
maintainNotice
)
{
switch
(
oldNoticeStatus
)
{
switch
(
oldNoticeStatus
)
{
case
TO_BE_SUBMITTED:
// 待提交
case
TO_BE_SUBMITTED:
// 待提交
// 1.删除暂存时生成的待办
// 1.删除暂存时生成的待办
...
...
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/JgReformNoticeServiceImpl.java
View file @
68c6fed4
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