license流量月度明细增加根据license过滤
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
<el-select v-model="listQuery.userId" placeholder="请选择用户" clearable>
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
<el-select v-model="listQuery.licenseId" placeholder="请选择License" clearable>
|
||||
<el-option v-for="item in licenseList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
<el-button type="primary" v-waves icon="el-icon-search" @click="handleFilter">{{$t('table.search')}}</el-button>
|
||||
</div>
|
||||
|
||||
@@ -52,6 +55,7 @@
|
||||
import { fetchLicenseFlowMonthReportList } from '@/api/report'
|
||||
import { userList } from '@/api/user'
|
||||
import waves from '@/directive/waves'
|
||||
import { licenseList } from '@/api/license'
|
||||
|
||||
export default {
|
||||
name: 'jobLog',
|
||||
@@ -67,9 +71,11 @@ export default {
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
jobId: undefined
|
||||
userId: undefined,
|
||||
licenseId: undefined
|
||||
},
|
||||
userList: [],
|
||||
licenseList: [],
|
||||
dialogVisible: false,
|
||||
selectRow: {}
|
||||
}
|
||||
@@ -79,9 +85,11 @@ export default {
|
||||
created() {
|
||||
this.getList()
|
||||
this.getUserList()
|
||||
this.getLicenseList()
|
||||
},
|
||||
activated() {
|
||||
this.getUserList()
|
||||
this.getLicenseList()
|
||||
if (this.$route.query.jobId) {
|
||||
this.listQuery.jobId = this.$route.query.jobId
|
||||
this.getList()
|
||||
@@ -101,6 +109,11 @@ export default {
|
||||
this.userList = response.data.data
|
||||
})
|
||||
},
|
||||
getLicenseList() {
|
||||
licenseList().then(response => {
|
||||
this.licenseList = response.data.data
|
||||
})
|
||||
},
|
||||
handleFilter() {
|
||||
this.listQuery.current = 1
|
||||
this.getList()
|
||||
|
||||
+1
-1
@@ -40,5 +40,5 @@ public interface ReportMapper {
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<LicenseFlowMonthReportRes> licenseFLowMonthReportList(@Param("userId") Integer userId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||
List<LicenseFlowMonthReportRes> licenseFLowMonthReportList(@Param("userId") Integer userId, @Param("licenseId") Integer licenseId, @Param("curMonthBeginDate") Date curMonthBeginDate, @Param("curDayBeginDate") Date curDayBeginDate, @Param("curDate") Date curDate);
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class LicenseService implements Lifecycle {
|
||||
|
||||
public List<LicenseListRes> list(LicenseListReq req) {
|
||||
List<LicenseDO> list = licenseMapper.selectList(new LambdaQueryWrapper<LicenseDO>()
|
||||
.eq(LicenseDO::getEnable, EnableStatusEnum.ENABLE.getStatus())
|
||||
.eq(null != req.getEnable(), LicenseDO::getEnable, req.getEnable())
|
||||
);
|
||||
List<LicenseListRes> licenseList = assembleConvertLicenses(list);
|
||||
return licenseList;
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ public class ReportService {
|
||||
public PageInfo<LicenseFlowMonthReportRes> licenseFlowMonthReportPage(PageQuery pageQuery, LicenseFlowMonthReportReq req) {
|
||||
Page<LicenseFlowMonthReportRes> result = PageHelper.startPage(pageQuery.getCurrent(), pageQuery.getSize());
|
||||
Date now = new Date();
|
||||
List<LicenseFlowMonthReportRes> list = reportMapper.licenseFLowMonthReportList(req.getUserId(), DateUtil.getMonthBegin(now), DateUtil.getDayBegin(now), now);
|
||||
List<LicenseFlowMonthReportRes> list = reportMapper.licenseFLowMonthReportList(req.getUserId(), req.getLicenseId(), DateUtil.getMonthBegin(now), DateUtil.getDayBegin(now), now);
|
||||
fillLicenseFlowMonthReport(list);
|
||||
return PageInfo.of(list, result.getTotal(), pageQuery.getCurrent(), pageQuery.getSize());
|
||||
}
|
||||
|
||||
@@ -184,6 +184,9 @@
|
||||
<if test="userId != null">
|
||||
AND u.id = #{userId}
|
||||
</if>
|
||||
<if test="licenseId != null">
|
||||
AND l.id = #{licenseId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY T2.user_id ASC,T2.license_id,T2.date DESC
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user