全所统计
This commit is contained in:
+28
-11
@@ -20,6 +20,7 @@ import com.jero.data.entity.PayCaseCommitteeSubitem;
|
||||
import com.jero.data.service.IPayCaseCommitteeSubitemService;
|
||||
import com.jero.modules.message.handle.impl.EmailSendMsgHandle;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import com.jero.project.entity.DownloadFileRecord;
|
||||
import com.jero.project.entity.PayWorkingGroupDistributionRecord;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import com.jero.project.service.IPayWorkingGroupDistributionRecordService;
|
||||
@@ -53,23 +54,33 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
|
||||
private IPayCaseCommitteeSubitemService payCaseCommitteeSubitemService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* 企业端-资料下载列表查询
|
||||
*
|
||||
* @param payWorkingGroupDistributionRecord
|
||||
* @param fileName
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
// @ApiOperation(value="资料分发-分页列表查询", notes="资料分发-分页列表查询")
|
||||
// @GetMapping(value = "/list")
|
||||
public Result<?> queryPageList(PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecord,
|
||||
@ApiOperation(value="企业端-资料下载列表查询", notes="企业端-资料下载列表查询")
|
||||
@GetMapping(value = "/listForFile")
|
||||
public Result<?> queryPageList(@RequestParam(name="fileName",required = false) String fileName,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PayWorkingGroupDistributionRecord> queryWrapper = QueryGenerator.initQueryWrapper(payWorkingGroupDistributionRecord, req.getParameterMap());
|
||||
Page<PayWorkingGroupDistributionRecord> page = new Page<PayWorkingGroupDistributionRecord>(pageNo, pageSize);
|
||||
IPage<PayWorkingGroupDistributionRecord> pageList = payWorkingGroupDistributionRecordService.page(page, queryWrapper);
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize
|
||||
) {
|
||||
Page<DownloadFileRecord> page = new Page(pageNo, pageSize);
|
||||
IPage<DownloadFileRecord> pageList = payWorkingGroupDistributionRecordService.pageFileList(page,fileName);
|
||||
if(!pageList.getRecords().isEmpty()) {
|
||||
for (DownloadFileRecord s : pageList.getRecords()) {
|
||||
if (s.getFileType().equals("1")) {
|
||||
s.setFileType("工作组");
|
||||
} else if (s.getFileType().equals("2")) {
|
||||
s.setFileType("分标委");
|
||||
} else {
|
||||
s.setFileType("会议");
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@@ -127,6 +138,7 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
|
||||
* @param payWorkingGroupDistributionRecord
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "资料分发-分发")
|
||||
@RequiresPermissions("fileMaintenance:distribute")
|
||||
@ApiOperation(value="资料分发-分发", notes="资料分发-分发")
|
||||
@PostMapping(value = "/add")
|
||||
@@ -141,6 +153,7 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
|
||||
* @param payWorkingGroupDistributionRecord
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "资料分发-批量分发")
|
||||
@RequiresPermissions("fileMaintenance:batchDistribute")
|
||||
@ApiOperation(value="资料分发-分发", notes="资料分发-批量分发")
|
||||
@PostMapping(value = "/addBatch")
|
||||
@@ -155,6 +168,7 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
|
||||
* @param payWorkingGroupDistributionRecord
|
||||
* @return
|
||||
*/
|
||||
// @AutoLog(value = "资料分发-编辑")
|
||||
// @ApiOperation(value="资料分发-编辑", notes="资料分发-编辑")
|
||||
// @PutMapping(value = "/edit")
|
||||
public Result<?> edit(@RequestBody PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecord) {
|
||||
@@ -168,6 +182,7 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
// @AutoLog(value = "资料分发-通过id删除")
|
||||
// @ApiOperation(value="资料分发-通过id删除", notes="资料分发-通过id删除")
|
||||
// @DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id") String id) {
|
||||
@@ -181,6 +196,7 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
// @AutoLog(value = "资料分发-批量删除")
|
||||
// @ApiOperation(value="资料分发-批量删除", notes="资料分发-批量删除")
|
||||
// @DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids") String ids) {
|
||||
@@ -194,6 +210,7 @@ public class PayWorkingGroupDistributionRecordController extends JeroController<
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
// @AutoLog(value = "资料分发-通过id查询")
|
||||
// @ApiOperation(value="资料分发-通过id查询", notes="资料分发-通过id查询")
|
||||
// @GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id") String id) {
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.jero.project.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zql
|
||||
* @date 2021/9/29 10:34
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="资料下载列表文件", description="资料下载列表文件")
|
||||
public class DownloadFileRecord {
|
||||
|
||||
@ApiModelProperty(value = "文件id")
|
||||
private String fileId;
|
||||
|
||||
@ApiModelProperty(value = "文件名")
|
||||
private String fileName;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty(value = "文件来源")
|
||||
private String fileCome;
|
||||
|
||||
@ApiModelProperty(value = "上传时间")
|
||||
private Date uploadTime;
|
||||
|
||||
}
|
||||
+11
@@ -1,7 +1,11 @@
|
||||
package com.jero.project.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.project.entity.DownloadFileRecord;
|
||||
import com.jero.project.entity.PayWorkingGroupDistributionRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: pay_working_group_distribution_record
|
||||
@@ -11,4 +15,11 @@ import com.jero.project.entity.PayWorkingGroupDistributionRecord;
|
||||
*/
|
||||
public interface PayWorkingGroupDistributionRecordMapper extends BaseMapper<PayWorkingGroupDistributionRecord> {
|
||||
|
||||
/**
|
||||
* 企业端资料下载分页列表查询
|
||||
* @param page
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
IPage<DownloadFileRecord> pageFileList(Page<DownloadFileRecord> page,@Param("fileName") String fileName);
|
||||
}
|
||||
|
||||
+44
@@ -1,5 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.project.mapper.PayWorkingGroupDistributionRecordMapper">
|
||||
<select id="pageFileList" resultType="com.jero.project.entity.DownloadFileRecord">
|
||||
select * from
|
||||
(SELECT
|
||||
ossf.id as fileId,
|
||||
ossf.file_name as fileName,
|
||||
pwdg.project_type as fileType,
|
||||
pwg.working_group_project as fileCome,
|
||||
pwdg.create_time as uploadTime
|
||||
FROM pay_working_group_distribution_record pwdg
|
||||
LEFT JOIN oss_file ossf on(pwdg.file_id=ossf.id)
|
||||
left join pay_working_group pwg on(pwdg.project_id=pwg.id) where pwdg.project_type=1
|
||||
union all
|
||||
SELECT
|
||||
ossf.id as fileId ,
|
||||
ossf.file_name as fileName,
|
||||
pwdg.project_type as fileType,
|
||||
pcc.`name` as fileCome,
|
||||
pwdg.create_time as uploadTime
|
||||
FROM pay_working_group_distribution_record pwdg
|
||||
LEFT JOIN oss_file ossf on(pwdg.file_id=ossf.id)
|
||||
left join pay_case_committee pcc on(pwdg.project_id=pcc.id) where pwdg.project_type=2
|
||||
union all
|
||||
SELECT
|
||||
ossf.id as fileId,
|
||||
ossf.file_name as fileName,
|
||||
pht.fileType,
|
||||
pht.fileCome,
|
||||
pht.uploadTime
|
||||
from (
|
||||
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(pm.meeting_data,',',help_topic_id+1),',',-1) AS fileId,
|
||||
pm.meeting_name as fileCome
|
||||
,3 as fileType,
|
||||
pm.create_time as uploadTime
|
||||
from pay_meeting pm join mysql.help_topic ht on ht.help_topic_id <![CDATA[<]]> LENGTH(pm.meeting_data)-LENGTH(REPLACE(pm.meeting_data,',',''))+1 WHERE pm.meeting_data is not null) pht
|
||||
left join oss_file ossf on (pht.fileId=ossf.id)) ail
|
||||
<where>
|
||||
<if test="fileName!=null and fileName!=''">
|
||||
ail.fileName like concat(%,concat(%,#{fileName},%),%)
|
||||
</if>
|
||||
</where>
|
||||
order by ail.uploadTime desc
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+11
@@ -1,7 +1,10 @@
|
||||
package com.jero.project.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.project.entity.DownloadFileRecord;
|
||||
import com.jero.project.entity.PayWorkingGroupDistributionRecord;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@@ -31,4 +34,12 @@ public interface IPayWorkingGroupDistributionRecordService extends IService<PayW
|
||||
* @Exception
|
||||
*/
|
||||
void addBatch(PayWorkingGroupDistributionRecord payWorkingGroupDistributionRecord);
|
||||
|
||||
/**
|
||||
* 企业端资料下载分页列表查询
|
||||
* @param page
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
IPage<DownloadFileRecord> pageFileList(Page<DownloadFileRecord> page, String fileName);
|
||||
}
|
||||
|
||||
+10
-4
@@ -3,6 +3,8 @@ package com.jero.project.service.impl;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.dto.SendMessageDTO;
|
||||
import com.jero.common.enums.CompanyMessageEnums;
|
||||
@@ -19,10 +21,7 @@ import com.jero.data.service.IPayCaseCommitteeSubitemService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import com.jero.project.entity.PayWorkingGroup;
|
||||
import com.jero.project.entity.PayWorkingGroupDataFile;
|
||||
import com.jero.project.entity.PayWorkingGroupDistributionRecord;
|
||||
import com.jero.project.entity.PayWorkingGroupSubItem;
|
||||
import com.jero.project.entity.*;
|
||||
import com.jero.project.mapper.PayWorkingGroupDistributionRecordMapper;
|
||||
import com.jero.project.service.IPayWorkingGroupDataFileService;
|
||||
import com.jero.project.service.IPayWorkingGroupDistributionRecordService;
|
||||
@@ -72,6 +71,8 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
|
||||
private IPayWorkingGroupDistributionRecordService payWorkingGroupDistributionRecordService;
|
||||
@Resource
|
||||
private IPayCaseCommitteeSubitemService payCaseCommitteeSubitemService;
|
||||
@Resource
|
||||
private PayWorkingGroupDistributionRecordMapper payWorkingGroupDistributionRecordMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@@ -333,4 +334,9 @@ public class PayWorkingGroupDistributionRecordServiceImpl extends ServiceImpl<Pa
|
||||
sendMessageService.SendMessageService(sendMessageDTO);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<DownloadFileRecord> pageFileList(Page<DownloadFileRecord> page, String fileName) {
|
||||
return payWorkingGroupDistributionRecordMapper.pageFileList(page,fileName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user