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
2f8f02c3
Commit
2f8f02c3
authored
Oct 21, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug 2912
parent
dc51dd32
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
50 deletions
+67
-50
DutyCarController.java
.../boot/module/common/biz/controller/DutyCarController.java
+22
-17
DutyFireFightingController.java
...ule/common/biz/controller/DutyFireFightingController.java
+0
-4
DutyFirstAidController.java
.../module/common/biz/controller/DutyFirstAidController.java
+0
-4
DutyPersonController.java
...ot/module/common/biz/controller/DutyPersonController.java
+0
-5
DutyShiftController.java
...oot/module/common/biz/controller/DutyShiftController.java
+8
-1
DutyPersonShiftServiceImpl.java
...e/common/biz/service/impl/DutyPersonShiftServiceImpl.java
+21
-4
DynamicFormInstanceServiceImpl.java
...mmon/biz/service/impl/DynamicFormInstanceServiceImpl.java
+16
-15
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyCarController.java
View file @
2f8f02c3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyCarServic
e
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRespons
e
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -18,10 +23,14 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyCarService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
/**
...
...
@@ -144,10 +153,6 @@ public class DutyCarController extends BaseController {
||
ValidationUtil
.
isEmpty
(
endTime
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
List
<
Map
<
String
,
Object
>>
list
=
iDutyCarService
.
list
(
null
,
startTime
,
DateUtils
.
getDateNowShortStr
());
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
return
ResponseHelper
.
buildResponse
(
0
);
}
// BUG 2807 删除逻辑缺陷,现在前端后端传入 删除月份 2021-09-10 by kongfm
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
deleteDutyData
(
instanceId
,
startTime
,
endTime
));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyFireFightingController.java
View file @
2f8f02c3
...
...
@@ -152,10 +152,6 @@ public class DutyFireFightingController extends BaseController{
||
ValidationUtil
.
isEmpty
(
endTime
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
List
<
Map
<
String
,
Object
>>
list
=
iDutyFireFightingService
.
list
(
null
,
startTime
,
DateUtils
.
getDateNowShortStr
());
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
return
ResponseHelper
.
buildResponse
(
0
);
}
return
ResponseHelper
.
buildResponse
(
iDutyFireFightingService
.
deleteDutyData
(
instanceId
,
startTime
,
endTime
));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyFirstAidController.java
View file @
2f8f02c3
...
...
@@ -145,10 +145,6 @@ public class DutyFirstAidController extends BaseController{
||
ValidationUtil
.
isEmpty
(
endTime
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
List
<
Map
<
String
,
Object
>>
list
=
iDutyFirstAidService
.
list
(
null
,
startTime
,
DateUtils
.
getDateNowShortStr
());
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
return
ResponseHelper
.
buildResponse
(
0
);
}
return
ResponseHelper
.
buildResponse
(
iDutyFirstAidService
.
deleteDutyData
(
instanceId
,
startTime
,
endTime
));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyPersonController.java
View file @
2f8f02c3
...
...
@@ -142,11 +142,6 @@ public class DutyPersonController extends BaseController {
||
ValidationUtil
.
isEmpty
(
endTime
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
List
<
Map
<
String
,
Object
>>
list
=
iDutyPersonService
.
list
(
null
,
startTime
,
DateUtils
.
getDateNowShortStr
());
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
// throw new BadRequest("班次已有值班数据,无法删除");
return
ResponseHelper
.
buildResponse
(
0
);
}
// BUG 2807 删除逻辑缺陷,现在前端后端传入 删除月份 2021-09-10 by kongfm
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
deleteDutyData
(
instanceId
,
startTime
,
endTime
));
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyShiftController.java
View file @
2f8f02c3
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyShift
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonShiftServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.DutyShiftServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -31,7 +32,9 @@ public class DutyShiftController extends BaseController {
@Autowired
DutyShiftServiceImpl
dutyShiftServiceImpl
;
@Autowired
DutyPersonShiftServiceImpl
dutyPersonShiftServiceImpl
;
/**
* 新增值班班次
*
...
...
@@ -73,6 +76,10 @@ public class DutyShiftController extends BaseController {
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除值班班次"
,
notes
=
"根据sequenceNbr删除值班班次"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
if
(
dutyPersonShiftServiceImpl
.
checkCurrentDutyIsUser
(
sequenceNbr
))
{
return
ResponseHelper
.
buildResponse
(
false
);
};
DutyShift
dutyShift
=
dutyShiftServiceImpl
.
getById
(
sequenceNbr
);
if
(
null
!=
dutyShift
)
{
dutyShift
.
setIsDelete
(
true
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyPersonShiftServiceImpl.java
View file @
2f8f02c3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift
;
import
com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyPersonShiftService
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.List
;
/**
* 值班人员日期关联关系表服务实现类
...
...
@@ -33,4 +35,19 @@ public class DutyPersonShiftServiceImpl extends BaseService<DutyPersonShiftDto,
public
List
<
DutyPersonShiftDto
>
queryForDutyPersonShiftList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 查询指定的班次是否被关联使用
* @return
*/
public
boolean
checkCurrentDutyIsUser
(
Long
shiftId
)
{
LambdaQueryWrapper
<
DutyPersonShift
>
wrapper
=
new
LambdaQueryWrapper
<
DutyPersonShift
>();
wrapper
.
eq
(
DutyPersonShift:
:
getIsDelete
,
false
);
wrapper
.
eq
(
DutyPersonShift:
:
getShiftId
,
shiftId
);
List
<
DutyPersonShift
>
list
=
this
.
baseMapper
.
selectList
(
wrapper
);
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
return
true
;
}
return
false
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DynamicFormInstanceServiceImpl.java
View file @
2f8f02c3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
...
...
@@ -11,20 +26,6 @@ import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.mapper.DynamicFormInstanceMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IDynamicFormInstanceService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* 动态表单实例表服务实现类
...
...
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