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
c61b6183
Commit
c61b6183
authored
Sep 28, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
f79adf54
1b9620c5
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
130 additions
and
33 deletions
+130
-33
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
CheckModelDto.java
...m/yeejoin/amos/boot/module/tdc/api/dto/CheckModelDto.java
+55
-0
CheckModel.java
...m/yeejoin/amos/boot/module/tdc/api/entity/CheckModel.java
+0
-1
CheckModelMapper.java
...oin/amos/boot/module/tdc/api/mapper/CheckModelMapper.java
+5
-0
CheckModelService.java
...n/amos/boot/module/tdc/api/service/CheckModelService.java
+2
-1
CheckModelMapper.xml
...le-tdc-api/src/main/resources/mapper/CheckModelMapper.xml
+9
-0
CheckResultMapper.xml
...e-tdc-api/src/main/resources/mapper/CheckResultMapper.xml
+1
-1
CheckModelController.java
.../boot/module/tdc/biz/controller/CheckModelController.java
+2
-1
CheckModelImpl.java
...amos/boot/module/tdc/biz/service/impl/CheckModelImpl.java
+9
-10
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 @
c61b6183
...
@@ -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 @
c61b6183
...
@@ -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 @
c61b6183
...
@@ -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 @
c61b6183
...
@@ -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 @
c61b6183
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 @
c61b6183
...
@@ -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 @
c61b6183
...
@@ -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 @
c61b6183
...
@@ -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/java/com/yeejoin/amos/boot/module/tdc/api/dto/CheckModelDto.java
0 → 100644
View file @
c61b6183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
CheckModelDto
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"sequence_nbr"
,
type
=
IdType
.
ID_WORKER
)
protected
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"模型名称"
)
private
String
modelName
;
@ApiModelProperty
(
value
=
"机构code"
)
private
String
amosOrgCode
;
@ApiModelProperty
(
value
=
"机构名称"
)
private
String
amosOrgName
;
@ApiModelProperty
(
value
=
"指标表名"
)
private
String
idxTableName
;
@ApiModelProperty
(
value
=
"校验状态"
)
private
int
checkStatus
;
@ApiModelProperty
(
value
=
"校验时间"
)
private
Date
checkDate
;
@ApiModelProperty
(
value
=
"模型图片地址"
)
private
String
modelPictureUrl
;
@ApiModelProperty
(
value
=
"模型规则知识包"
)
private
String
modelRule
;
@ApiModelProperty
(
value
=
"指标模型所属项目id"
)
private
String
projectId
;
@ApiModelProperty
(
value
=
"指标模型表id"
)
private
String
tableId
;
@ApiModelProperty
(
value
=
"模型校验项数量"
)
private
int
checkItemAmount
;
private
String
circle
;
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/entity/CheckModel.java
View file @
c61b6183
...
@@ -58,5 +58,4 @@ public class CheckModel {
...
@@ -58,5 +58,4 @@ public class CheckModel {
@ApiModelProperty
(
value
=
"模型校验项数量"
)
@ApiModelProperty
(
value
=
"模型校验项数量"
)
private
int
checkItemAmount
;
private
int
checkItemAmount
;
}
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/mapper/CheckModelMapper.java
View file @
c61b6183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mapper
;
...
@@ -10,4 +13,6 @@ import org.mapstruct.Mapper;
...
@@ -10,4 +13,6 @@ import org.mapstruct.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
CheckModelMapper
extends
BaseMapper
<
CheckModel
>
{
public
interface
CheckModelMapper
extends
BaseMapper
<
CheckModel
>
{
IPage
<
CheckModelDto
>
selectByOrgCode
(
Page
page
,
String
amosOrgCode
);
}
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/service/CheckModelService.java
View file @
c61b6183
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tdc.api.service;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tdc.api.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -19,7 +20,7 @@ public interface CheckModelService extends IService<CheckModel> {
...
@@ -19,7 +20,7 @@ public interface CheckModelService extends IService<CheckModel> {
* @return 模型list
* @return 模型list
*/
*/
// List<CheckModel> selectByOrgCode(String amosOrgCode);
// List<CheckModel> selectByOrgCode(String amosOrgCode);
IPage
<
CheckModel
>
selectByOrgCode
(
int
current
,
int
size
,
String
amosOrgCode
);
IPage
<
CheckModel
Dto
>
selectByOrgCode
(
int
current
,
int
size
,
String
amosOrgCode
);
List
<
CheckModel
>
selectByOrgCode
(
String
amosOrgCode
);
List
<
CheckModel
>
selectByOrgCode
(
String
amosOrgCode
);
...
...
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/resources/mapper/CheckModelMapper.xml
View file @
c61b6183
...
@@ -2,4 +2,13 @@
...
@@ -2,4 +2,13 @@
<!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.CheckModelMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.tdc.api.mapper.CheckModelMapper"
>
<select
id=
"selectByOrgCode"
resultType=
"com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto"
>
select `*`,'●' as circle from tdc_model
<where>
<if
test =
"amosOrgCode != null and amosOrgCode != ''"
>
and amosOrgCode=#{amosOrgCode}
</if>
</where>
</select>
</mapper>
</mapper>
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/resources/mapper/CheckResultMapper.xml
View file @
c61b6183
...
@@ -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"
>
...
...
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/controller/CheckModelController.java
View file @
c61b6183
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
com.yeejoin.amos.boot.module.tdc.api.service.CheckModelService
;
import
com.yeejoin.amos.boot.module.tdc.api.service.CheckModelService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -32,7 +33,7 @@ public class CheckModelController {
...
@@ -32,7 +33,7 @@ public class CheckModelController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"selectByOrgCode"
)
@GetMapping
(
value
=
"selectByOrgCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据amosOrgCode查询模型列表"
,
notes
=
"根据amosOrgCode查询模型列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据amosOrgCode查询模型列表"
,
notes
=
"根据amosOrgCode查询模型列表"
)
public
ResponseModel
<
IPage
<
CheckModel
>>
selectByOrgCode
(
int
current
,
int
size
,
String
amosOrgCode
)
{
public
ResponseModel
<
IPage
<
CheckModel
Dto
>>
selectByOrgCode
(
int
current
,
int
size
,
String
amosOrgCode
)
{
return
ResponseHelper
.
buildResponse
(
checkModelService
.
selectByOrgCode
(
current
,
size
,
amosOrgCode
));
return
ResponseHelper
.
buildResponse
(
checkModelService
.
selectByOrgCode
(
current
,
size
,
amosOrgCode
));
}
}
...
...
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/service/impl/CheckModelImpl.java
View file @
c61b6183
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckModelDto
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckModel
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckReport
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult
;
...
@@ -39,27 +40,23 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
...
@@ -39,27 +40,23 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
CheckResultMapper
checkResultMapper
;
CheckResultMapper
checkResultMapper
;
@Autowired
@Autowired
CheckModelMapper
checkModelMapper
;
@Autowired
IdxFeignService
idxFeignService
;
IdxFeignService
idxFeignService
;
@Autowired
@Autowired
RuleTrigger
ruleTrigger
;
RuleTrigger
ruleTrigger
;
@Override
@Override
public
IPage
<
CheckModel
>
selectByOrgCode
(
int
current
,
int
size
,
String
amosOrgCode
)
{
public
IPage
<
CheckModel
Dto
>
selectByOrgCode
(
int
current
,
int
size
,
String
amosOrgCode
)
{
Page
page
=
new
Page
(
current
,
size
);
Page
page
=
new
Page
(
current
,
size
);
if
(
ValidationUtil
.
isEmpty
(
amosOrgCode
)){
return
checkModelMapper
.
selectByOrgCode
(
page
,
amosOrgCode
);
return
this
.
page
(
page
);
}
else
{
LambdaQueryWrapper
<
CheckModel
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
CheckModel:
:
getAmosOrgCode
,
amosOrgCode
);
// return baseMapper.selectList(wrapper);
return
this
.
page
(
page
,
wrapper
);
}
}
}
@Override
@Override
public
List
<
CheckModel
>
selectByOrgCode
(
String
amosOrgCode
)
{
public
List
<
CheckModel
>
selectByOrgCode
(
String
amosOrgCode
)
{
LambdaQueryWrapper
<
CheckModel
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
CheckModel
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
@@ -67,6 +64,8 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
...
@@ -67,6 +64,8 @@ public class CheckModelImpl extends ServiceImpl<CheckModelMapper, CheckModel> im
return
baseMapper
.
selectList
(
wrapper
);
return
baseMapper
.
selectList
(
wrapper
);
}
}
@Override
@Override
public
CheckModel
selectOneByDate
(
String
amosOrgCode
)
{
public
CheckModel
selectOneByDate
(
String
amosOrgCode
)
{
LambdaQueryWrapper
<
CheckModel
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
CheckModel
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
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