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
1b9620c5
Commit
1b9620c5
authored
Sep 28, 2022
by
limei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_dl_plan6' of
http://39.98.45.134:8090/moa/amos-boot-biz
into develop_dl_plan6
parents
a49c3602
e7672af6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
48 additions
and
20 deletions
+48
-20
DutyPersonShiftMapper.java
.../boot/module/common/api/mapper/DutyPersonShiftMapper.java
+6
-0
IDutyCommonService.java
...os/boot/module/common/api/service/IDutyCommonService.java
+3
-1
DutyPersonShiftMapper.xml
...n-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
+15
-0
DutyCarController.java
.../boot/module/common/biz/controller/DutyCarController.java
+3
-2
DutyFireFightingController.java
...ule/common/biz/controller/DutyFireFightingController.java
+3
-7
DutyFirstAidController.java
.../module/common/biz/controller/DutyFirstAidController.java
+3
-2
DutyPersonController.java
...ot/module/common/biz/controller/DutyPersonController.java
+3
-2
DutyCommonServiceImpl.java
...module/common/biz/service/impl/DutyCommonServiceImpl.java
+11
-5
CheckResultMapper.xml
...e-tdc-api/src/main/resources/mapper/CheckResultMapper.xml
+1
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/DutyPersonShiftMapper.java
View file @
1b9620c5
...
@@ -65,6 +65,12 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
...
@@ -65,6 +65,12 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
@Param
(
"dutyDate"
)
String
dutyDate
,
@Param
(
"dutyDate"
)
String
dutyDate
,
@Param
(
"groupCode"
)
String
groupCode
@Param
(
"groupCode"
)
String
groupCode
);
);
List
<
Map
<
String
,
Object
>>
newStationViewDataByFieldCode
(
@Param
(
"dutyDate"
)
String
dutyDate
,
@Param
(
"groupCode"
)
String
groupCode
,
@Param
(
"fieldCode"
)
String
fieldCode
);
/**
/**
* 利用mysql 生成连续时间区间
* 利用mysql 生成连续时间区间
*
*
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IDutyCommonService.java
View file @
1b9620c5
...
@@ -32,12 +32,14 @@ public interface IDutyCommonService {
...
@@ -32,12 +32,14 @@ public interface IDutyCommonService {
List
<
Map
<
String
,
Object
>>
statisticsDay
(
String
beginDate
,
String
endDate
)
throws
ParseException
;
List
<
Map
<
String
,
Object
>>
statisticsDay
(
String
beginDate
,
String
endDate
)
throws
ParseException
;
/**
/**
* 新值班月视图
* 新值班月视图
*
* @param beginDate
* @param beginDate
* @param endDate
* @param endDate
* @param dutyType
* @return
* @return
* @throws ParseException
* @throws ParseException
*/
*/
List
<
Map
<
String
,
Object
>>
newStatisticsDay
(
String
beginDate
,
String
endDate
)
throws
ParseException
;
List
<
Map
<
String
,
Object
>>
newStatisticsDay
(
String
beginDate
,
String
endDate
,
String
fieldCode
)
throws
ParseException
;
/**
/**
* 不分页查询
* 不分页查询
*
*
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
View file @
1b9620c5
...
@@ -102,6 +102,21 @@
...
@@ -102,6 +102,21 @@
and i.group_code =#{groupCode}
and i.group_code =#{groupCode}
GROUP BY i.field_value
GROUP BY i.field_value
</select>
</select>
<select
id=
"newStationViewDataByFieldCode"
resultType=
"java.util.Map"
>
select
i.field_value as postTypeName,
count(1) as total
from
cb_duty_person_shift s,
cb_dynamic_form_instance i
where
s.instance_id = i.instance_id
and i.field_code = #{fieldCode}
AND s.duty_date = #{dutyDate}
AND s.shift_id is not null
and i.group_code =#{groupCode}
GROUP BY i.field_value
</select>
<select
id=
"genRangeDate"
resultType=
"map"
>
<select
id=
"genRangeDate"
resultType=
"map"
>
SELECT
SELECT
DATE_FORMAT(DATE( DATE_ADD( #{beginDate}, INTERVAL @s DAY )),'%Y-%m-%d') AS date,
DATE_FORMAT(DATE( DATE_ADD( #{beginDate}, INTERVAL @s DAY )),'%Y-%m-%d') AS date,
...
...
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 @
1b9620c5
...
@@ -103,9 +103,10 @@ public class DutyCarController extends BaseController {
...
@@ -103,9 +103,10 @@ public class DutyCarController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
,
@ApiParam
(
value
=
"属性编码"
)
@RequestParam
(
required
=
false
)
String
fieldCode
)
throws
ParseException
{
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
newStatisticsDay
(
beginDate
,
endDate
));
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
newStatisticsDay
(
beginDate
,
endDate
,
fieldCode
));
}
}
/**
/**
* 调班
* 调班
...
...
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 @
1b9620c5
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -18,18 +17,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -18,18 +17,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.DateUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
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
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
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.DutyFireFightingDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingDto
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyFireFightingService
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyFireFightingService
;
...
@@ -102,9 +97,10 @@ public class DutyFireFightingController extends BaseController{
...
@@ -102,9 +97,10 @@ public class DutyFireFightingController extends BaseController{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
,
@ApiParam
(
value
=
"属性编码"
)
@RequestParam
(
required
=
false
)
String
fieldCode
)
throws
ParseException
{
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyFireFightingService
.
newStatisticsDay
(
beginDate
,
endDate
));
return
ResponseHelper
.
buildResponse
(
iDutyFireFightingService
.
newStatisticsDay
(
beginDate
,
endDate
,
fieldCode
));
}
}
/**
/**
* 调班
* 调班
...
...
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 @
1b9620c5
...
@@ -89,9 +89,10 @@ public class DutyFirstAidController extends BaseController{
...
@@ -89,9 +89,10 @@ public class DutyFirstAidController extends BaseController{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
,
@ApiParam
(
value
=
"属性编码"
)
@RequestParam
(
required
=
false
)
String
fieldCode
)
throws
ParseException
{
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyFirstAidService
.
newStatisticsDay
(
beginDate
,
endDate
));
return
ResponseHelper
.
buildResponse
(
iDutyFirstAidService
.
newStatisticsDay
(
beginDate
,
endDate
,
fieldCode
));
}
}
/**
/**
* 调班
* 调班
...
...
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 @
1b9620c5
...
@@ -103,9 +103,10 @@ public class DutyPersonController extends BaseController {
...
@@ -103,9 +103,10 @@ public class DutyPersonController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"新值班月视图"
,
notes
=
"新值班月视图"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
newDutyDetail
(
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
String
beginDate
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
String
endDate
,
@ApiParam
(
value
=
"属性编码"
)
@RequestParam
(
required
=
false
)
String
fieldCode
)
throws
ParseException
{
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
newStatisticsDay
(
beginDate
,
endDate
));
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
newStatisticsDay
(
beginDate
,
endDate
,
fieldCode
));
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyCommonServiceImpl.java
View file @
1b9620c5
...
@@ -170,7 +170,8 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
...
@@ -170,7 +170,8 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
LocalDate
startDate
=
LocalDate
.
parse
(
start
);
LocalDate
startDate
=
LocalDate
.
parse
(
start
);
LocalDate
endDate
=
LocalDate
.
parse
(
end
);
LocalDate
endDate
=
LocalDate
.
parse
(
end
);
long
distance
=
ChronoUnit
.
DAYS
.
between
(
startDate
,
endDate
);
long
distance
=
ChronoUnit
.
DAYS
.
between
(
startDate
,
endDate
);
if
(
distance
<
1
)
{
if
(
distance
<
1
&&
StringUtils
.
isNotBlank
(
start
))
{
list
.
add
(
start
);
return
list
;
return
list
;
}
}
Stream
.
iterate
(
startDate
,
d
->
d
.
plusDays
(
1
)).
limit
(
distance
+
1
).
forEach
(
f
->
list
.
add
(
f
.
toString
()));
Stream
.
iterate
(
startDate
,
d
->
d
.
plusDays
(
1
)).
limit
(
distance
+
1
).
forEach
(
f
->
list
.
add
(
f
.
toString
()));
...
@@ -218,7 +219,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
...
@@ -218,7 +219,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
/*bug2468 值班排班,日历视图单班次执勤人数满足≤3且班次≤2时,值班显示方式错误 陈召 结束*/
/*bug2468 值班排班,日历视图单班次执勤人数满足≤3且班次≤2时,值班显示方式错误 陈召 结束*/
}
}
public
List
<
Map
<
String
,
Object
>>
newStatisticsDay
(
String
beginDate
,
String
endDate
)
throws
ParseException
{
public
List
<
Map
<
String
,
Object
>>
newStatisticsDay
(
String
beginDate
,
String
endDate
,
String
fieldCode
)
throws
ParseException
{
Date
dateBegin
=
DateUtils
.
dateParse
(
beginDate
,
DateUtils
.
DATE_PATTERN
);
Date
dateBegin
=
DateUtils
.
dateParse
(
beginDate
,
DateUtils
.
DATE_PATTERN
);
String
timeStart
=
DateUtils
.
dateTimeToDateString
(
dateBegin
);
String
timeStart
=
DateUtils
.
dateTimeToDateString
(
dateBegin
);
...
@@ -246,7 +247,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
...
@@ -246,7 +247,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
result
.
put
(
"key"
,
objectMap
.
get
(
"date"
));
result
.
put
(
"key"
,
objectMap
.
get
(
"date"
));
String
dateString
=
objectMap
.
get
(
"date"
).
toString
();
String
dateString
=
objectMap
.
get
(
"date"
).
toString
();
if
(
this
.
getGroupCode
().
equals
(
"dutyPerson"
))
{
if
(
this
.
getGroupCode
().
equals
(
"dutyPerson"
))
{
result
.
put
(
"data"
,
getPersonPostTypeNameAndCount
(
dateString
));
result
.
put
(
"data"
,
getPersonPostTypeNameAndCount
(
dateString
,
fieldCode
));
}
else
if
(
this
.
getGroupCode
().
equals
(
"dutyCar"
))
{
}
else
if
(
this
.
getGroupCode
().
equals
(
"dutyCar"
))
{
result
.
put
(
"data"
,
getCarPostTypeNameAndCount
(
dateString
));
result
.
put
(
"data"
,
getCarPostTypeNameAndCount
(
dateString
));
}
else
if
(
this
.
getGroupCode
().
equals
(
"dutyFireFighting"
))
{
}
else
if
(
this
.
getGroupCode
().
equals
(
"dutyFireFighting"
))
{
...
@@ -263,11 +264,16 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
...
@@ -263,11 +264,16 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
/**
/**
* 排班值班人员的统计类型为:
* 排班值班人员的统计类型为:
* 岗位: 岗位人员数量
* 岗位: 岗位人员数量
*
* @param dutyDate
* @param dutyDate
* @param dutyType
* @return
* @return
*/
*/
public
Object
getPersonPostTypeNameAndCount
(
String
dutyDate
)
{
public
Object
getPersonPostTypeNameAndCount
(
String
dutyDate
,
String
fieldCode
)
{
if
(
StringUtils
.
isNotBlank
(
fieldCode
))
{
return
dutyPersonShiftService
.
getBaseMapper
().
newStationViewDataByFieldCode
(
dutyDate
,
this
.
getGroupCode
(),
fieldCode
);
}
return
dutyPersonShiftService
.
getBaseMapper
().
newStationViewData
(
dutyDate
,
this
.
getGroupCode
());
return
dutyPersonShiftService
.
getBaseMapper
().
newStationViewData
(
dutyDate
,
this
.
getGroupCode
());
}
}
/**
/**
...
...
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/resources/mapper/CheckResultMapper.xml
View file @
1b9620c5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.tdc.api.mapper.CheckResultMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.tdc.api.mapper.CheckResultMapper"
>
<select
id=
"selectResult"
resultType=
"com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto"
>
<select
id=
"selectResult"
resultType=
"com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto"
>
select check_date, case when check_type="
1
" then '全站校验' else `model_name` end as `name`
select check_date, case when check_type="
0
" then '全站校验' else `model_name` end as `name`
from `tdc_check_result`
from `tdc_check_result`
<where>
<where>
<if
test=
"code != '' and code != null"
>
<if
test=
"code != '' and code != null"
>
...
...
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