306f03ca by 荆蔚杰

左侧菜单列表接口.卷内目录对应不动产查询接口.

1 parent 9b908a35
package com.pashanhoo.archive.controller;
import com.pashanhoo.archive.entity.vo.AddDgArchivesRequest;
import com.pashanhoo.archive.service.DgArchivesService;
import com.pashanhoo.common.Result;
......@@ -70,4 +69,15 @@ public class DgArchivesController {
request.defaultFillPageProp("","");
return Result.ok(dgarchivesService.searchDgArchivesList(request));
}
/**
* 通过案卷标识码加载左菜单目录
* @param bsmArchives 案卷标识码
* @return
*/
@GetMapping("getLifeMenu")
@ApiOperation(value = "通过案卷标识码加载左菜单目录")
public Result getArchiveLiftMenu(@ApiParam("案卷标识码") @RequestParam String bsmArchives) {
return Result.ok(dgarchivesService.getArchiveLiftMenu(bsmArchives));
}
}
......
......@@ -8,6 +8,8 @@ import com.pashanhoo.archive.entity.vo.UpdateDgArchivesRequest;
import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* <p>
* 案卷基本信息 服务类
......@@ -44,4 +46,11 @@ public interface DgArchivesService extends IService<DgArchivesDO> {
* @return
*/
Page searchDgArchivesList(DgArchivesSearchRequest request);
/**
* 根据档案标识码加载左侧菜单
* @param bsmArchives 档案标识码
* @return
*/
List getArchiveLiftMenu(String bsmArchives);
}
......
package com.pashanhoo.archive.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pashanhoo.archive.entity.DgArchivesConverter;
import com.pashanhoo.archive.entity.DgArchivesDO;
......@@ -10,12 +9,17 @@ import com.pashanhoo.archive.entity.vo.UpdateDgArchivesRequest;
import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest;
import com.pashanhoo.archive.mapper.DgArchivesMapper;
import com.pashanhoo.archive.service.DgArchivesService;
import com.pashanhoo.bdcdy.entity.DgBdcdyDO;
import com.pashanhoo.bdcdy.mapper.DgBdcdyMapper;
import com.pashanhoo.bdcdy.service.DgBdcdyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.util.List;
/**
* <p>
* 案卷基本信息 服务实现类
......@@ -33,6 +37,12 @@ public class DgArchivesServiceImpl extends ServiceImpl<DgArchivesMapper, DgArchi
@Autowired
private DgArchivesMapper dgarchivesMapper;
@Autowired
private DgBdcdyService dgBdcdyService;
@Autowired
private DgBdcdyMapper dgBdcdyMapper;
/**
* 新增记录
* @param request
......@@ -103,4 +113,27 @@ public class DgArchivesServiceImpl extends ServiceImpl<DgArchivesMapper, DgArchi
return page.setRecords(dgarchivesConverter.doList2ListVOList(page.getRecords()));
}
/**
* 根据档案标识码加载左侧菜单
*
* @param bsmArchives 档案标识码
* @return
*/
@Override
public List getArchiveLiftMenu(String bsmArchives) {
DgArchivesDO archivesDO = this.getById(bsmArchives);
Integer status = archivesDO.getDazt().intValue();
/*状态判断.如果状态为:1,2,3显示为不动产单元号
如果状态为:4,5,6,7,8显示为档案号
*/
List<DgBdcdyDO> dgBdcdyDOS = null;
if (status.equals(1)||status.equals(2)||status.equals(3)){
QueryWrapper<DgBdcdyDO> bdcdyWrapper = new QueryWrapper<>();
bdcdyWrapper.lambda().eq(DgBdcdyDO::getBsmArchives, bsmArchives);
dgBdcdyDOS = dgBdcdyMapper.selectList(bdcdyWrapper);
return dgBdcdyDOS;
}
return dgBdcdyDOS;
}
}
......
package com.pashanhoo.catalog.controller;
import com.pashanhoo.catalog.entity.vo.AddDgArchivesCatalogRequest;
import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogSearchRequest;
import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogListVO;
import com.pashanhoo.catalog.entity.vo.UpdateDgArchivesCatalogRequest;
import com.pashanhoo.catalog.service.DgArchivesCatalogService;
import com.pashanhoo.common.Result;
......@@ -66,9 +64,7 @@ public class DgArchivesCatalogController {
@PostMapping("search")
@ApiOperation(value = "根据条件进行列表查询")
public Result searchDgArchivesCatalogList(@RequestBody DgArchivesCatalogSearchRequest request) {
//TODO 默认排序条件设置
request.defaultFillPageProp("","");
return Result.ok(dgarchivescatalogService.searchDgArchivesCatalogList(request));
public Result<List<DgArchivesCatalogListVO>> searchDgArchivesCatalogList(@ApiParam("档案标识码集合") @RequestParam List<String> bsmArchives) {
return Result.ok(dgarchivescatalogService.searchDgArchivesCatalogList(bsmArchives));
}
}
......
package com.pashanhoo.catalog.entity.vo;
import java.io.Serializable;
import com.pashanhoo.bdcdy.entity.DgBdcdyDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -17,7 +18,6 @@ import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="档案目录信息列表VO")
//TODO 该类属性暂时是完整的全部属性,需进行个性化的增删
public class DgArchivesCatalogListVO implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -94,5 +94,9 @@ public class DgArchivesCatalogListVO implements Serializable {
@ApiModelProperty(name = "bz", value = "备注")
private String bz;
/**
* 不动产单元
*/
@ApiModelProperty(name = "bdcdyDO",value = "不动产单元")
private DgBdcdyDO bdcdyDO;
}
......
package com.pashanhoo.catalog.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pashanhoo.catalog.entity.DgArchivesCatalogDO;
import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogListVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
......@@ -14,4 +17,11 @@ import com.pashanhoo.catalog.entity.DgArchivesCatalogDO;
*/
public interface DgArchivesCatalogMapper extends BaseMapper<DgArchivesCatalogDO> {
/**
* 获取目录和不动产信息
*
* @param bsmArchives 档案标识码集合
* @return
*/
List<DgArchivesCatalogListVO> getCatalog(@Param("bsmArchives") List<String> bsmArchives);
}
......
package com.pashanhoo.catalog.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pashanhoo.catalog.entity.*;
import com.pashanhoo.catalog.entity.vo.AddDgArchivesCatalogRequest;
import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogDetailVO;
import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogSearchRequest;
import com.pashanhoo.catalog.entity.vo.UpdateDgArchivesCatalogRequest;
import com.pashanhoo.catalog.entity.vo.*;
import java.util.List;
/**
* <p>
......@@ -41,8 +38,8 @@ public interface DgArchivesCatalogService extends IService<DgArchivesCatalogDO>
/**
* 根据条件进行列表查询
* @param request
* @param bsmArchives 档案标识码
* @return
*/
Page searchDgArchivesCatalogList(DgArchivesCatalogSearchRequest request);
List<DgArchivesCatalogListVO> searchDgArchivesCatalogList(List<String> bsmArchives);
}
......
package com.pashanhoo.catalog.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pashanhoo.catalog.entity.*;
import com.pashanhoo.catalog.entity.vo.AddDgArchivesCatalogRequest;
import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogDetailVO;
import com.pashanhoo.catalog.entity.vo.DgArchivesCatalogSearchRequest;
import com.pashanhoo.catalog.entity.vo.UpdateDgArchivesCatalogRequest;
import com.pashanhoo.catalog.entity.vo.*;
import com.pashanhoo.catalog.mapper.DgArchivesCatalogMapper;
import com.pashanhoo.catalog.service.DgArchivesCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.util.List;
/**
* <p>
......@@ -67,21 +62,13 @@ public class DgArchivesCatalogServiceImpl extends ServiceImpl<DgArchivesCatalogM
/**
* 根据条件进行列表查询
* @param request
* @param bsmArchives 档案标识码集合
* @return
*/
@Override
public Page searchDgArchivesCatalogList(DgArchivesCatalogSearchRequest request) {
Page<DgArchivesCatalogDO> pageParam = new Page<DgArchivesCatalogDO>(request.getCurrentPage(), request.getPageSize());
QueryWrapper<DgArchivesCatalogDO> wrapper = new QueryWrapper<>();
//设置默认排序
wrapper = "desc".equals(request.getSortOrder()) ? wrapper.orderByDesc(request.getSortField()) : wrapper.orderByAsc(request.getSortField());
//TODO 根据当前情况设置wrapper条件
public List<DgArchivesCatalogListVO> searchDgArchivesCatalogList(List<String> bsmArchives) {
Page page = this.page(pageParam, wrapper);
//将查询出来的DO List转为 ListVO List并重新设置到page对象中,并返回page对象
return page.setRecords(dgarchivescatalogConverter.doList2ListVOList(page.getRecords()));
return dgarchivescatalogMapper.getCatalog(bsmArchives);
}
}
......
......@@ -71,7 +71,7 @@ public class CodeGenerator {
//4、策略配置
StrategyConfig strategy = new StrategyConfig();
// 设置要映射的表名
strategy.setInclude("DG_STAFF");
strategy.setInclude("DG_LEND_FILE");
strategy.setNaming(NamingStrategy.underline_to_camel);
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
// 自动lombok;
......
......@@ -3,6 +3,7 @@ package com.pashanhoo.common.util.fileupload;
import com.pashanhoo.common.Result;
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.multipart.MultipartFile;
......@@ -48,7 +49,7 @@ public class FileController {
@DeleteMapping("/deleteFile")
@ApiOperation("删除文件")
public Result deleteFile(@RequestParam("saveUrl") String saveUrl){
public Result deleteFile(@ApiParam("存储url") @RequestParam("saveUrl") String saveUrl){
try {
minioUtil.removeObject(minioConfig.getBucket(), saveUrl);
return Result.ok();
......
package com.pashanhoo.destroy.controller;
import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest;
import com.pashanhoo.common.Result;
import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest;
......@@ -102,4 +101,10 @@ public class DgArchivesDestructionController {
public Result updateArchivesStateByDestruction(@ApiParam("档案销毁记录ID") @RequestParam(value = "bsm_destruction") String bsm_destruction) {
return dgarchivesdestructionService.updateArchivesStateByDestruction(bsm_destruction);
}
@GetMapping("getDestroyLeftMenu")
@ApiOperation(value = "根据销毁清册编号获取左侧档案号菜单")
public Result getDestroyLeftMenu(@ApiParam("销毁清册编号") @RequestParam String xhqcbh) {
return Result.ok(dgarchivesdestructionService.getDestroyLeftMenu(xhqcbh));
}
}
......
package com.pashanhoo.destroy.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pashanhoo.archive.entity.DgArchivesDO;
import com.pashanhoo.archive.entity.vo.DgArchivesListVO;
import com.pashanhoo.destroy.entity.DgArchivesDestructionDO;
import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionListVO;
import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionListVO;
import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest;
/**
* <p>
......@@ -20,6 +20,14 @@ import java.util.List;
*/
public interface DgArchivesDestructionMapper extends BaseMapper<DgArchivesDestructionDO> {
/**
* 根据销毁清册编号获取左侧档案号菜单
*
* @param xhqcbh 销毁清册编号
* @return
*/
List<DgArchivesDO> getDestroyLeftMenu(@Param("xhqcbh") String xhqcbh);
List<DgArchivesDestructionListVO> selectXhResult(DgArchivesDestructionSearchRequest request);
boolean updateArchivesStatus(@Param("bsm_destruction") String bsm_destruction,@Param("dazt") String dazt);
......
......@@ -67,7 +67,9 @@ public interface DgArchivesDestructionService extends IService<DgArchivesDestruc
Result updateStateByArchives(List<String> idList);
/**
/**
* 新增记录
*
* @param request
* @return
*/
......@@ -80,6 +82,7 @@ public interface DgArchivesDestructionService extends IService<DgArchivesDestruc
Result showArchivesForDestruction( DgArchivesSearchRequest request);
/**
* 根据主键查询记录详情
*
* @param id
* @return
*/
......@@ -87,10 +90,19 @@ public interface DgArchivesDestructionService extends IService<DgArchivesDestruc
/**
* 修改单条记录
*
* @param request
* @return
*/
boolean updateDgArchivesDestruction(UpdateDgArchivesDestructionRequest request);
/**
* 根据销毁清册编号获取左侧档案号菜单
*
* @param xhqcbh 销毁清册编号
* @return
*/
List getDestroyLeftMenu(String xhqcbh);
}
......
package com.pashanhoo.destroy.service.impl;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
......@@ -11,6 +10,11 @@ import com.pashanhoo.common.Result;
import com.pashanhoo.destroy.entity.DgArchivesDestructionConverter;
import com.pashanhoo.destroy.entity.DgArchivesDestructionDO;
import com.pashanhoo.destroy.entity.vo.*;
import com.pashanhoo.archive.entity.DgArchivesDO;
import com.pashanhoo.destroy.entity.vo.AddDgArchivesDestructionRequest;
import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionDetailVO;
import com.pashanhoo.destroy.entity.vo.DgArchivesDestructionSearchRequest;
import com.pashanhoo.destroy.entity.vo.UpdateDgArchivesDestructionRequest;
import com.pashanhoo.destroy.mapper.DgArchivesDestructionMapper;
import com.pashanhoo.destroy.service.DgArchivesDestructionService;
import com.pashanhoo.destroycatalog.entity.DgDestructionCatalogConverter;
......@@ -150,4 +154,16 @@ public class DgArchivesDestructionServiceImpl extends ServiceImpl<DgArchivesDest
/**
* 根据销毁清册编号获取左侧档案号菜单
*
* @param xhqcbh 销毁清册编号
* @return
*/
@Override
public List getDestroyLeftMenu(String xhqcbh) {
List<DgArchivesDO> dgArchivesDestructionDOS = dgarchivesdestructionMapper.getDestroyLeftMenu(xhqcbh);
return dgArchivesDestructionDOS;
}
}
......
......@@ -75,8 +75,6 @@ public class DgFileServiceImpl extends ServiceImpl<DgFileMapper, DgFileDO> imple
@Override
public List<DgFileListVO> searchDgFileList(DgFileSearchRequest request) {
QueryWrapper<DgFileDO> wrapper = new QueryWrapper<>();
List<DgFileListVO> fileListVOS = dgfileMapper.selectFileWithNameAndSort(request);
for (DgFileListVO fileListVO : fileListVOS) {
......
......@@ -22,4 +22,45 @@
<sql id="Base_Column_List">
BSM_CATALOG, BSM_ARCHIVES, XH, WJBM, WJMC, CLLXBM, CLLXMC, YS, YH, FS, WH, BZ
</sql>
<resultMap id="getCatalogAndBDCDY" type="com.pashanhoo.catalog.entity.vo.DgArchivesCatalogListVO">
<result column="bsm_catalog" property="bsmCatalog"/>
<result column="bsm_archives" property="bsmArchives"/>
<result column="xh" property="xh"/>
<result column="wjbm" property="wjbm"/>
<result column="wjmc" property="wjmc"/>
<result column="cllxbm" property="cllxbm"/>
<result column="cllxmc" property="cllxmc"/>
<result column="ys" property="ys"/>
<result column="yh" property="yh"/>
<result column="fs" property="fs"/>
<result column="wh" property="wh"/>
<result column="bz" property="bz"/>
<association property="bdcdyDO" javaType="com.pashanhoo.bdcdy.entity.DgBdcdyDO">
<result column="BSM_BDCDY" property="bsmBdcdy"/>
<result column="BSM_ARCHIVES" property="bsmArchives"/>
<result column="BSM_QL" property="bsmQl"/>
<result column="bdcdyid" property="bdcdyid"/>
<result column="bdcdyh" property="bdcdyh"/>
<result column="zl" property="zl"/>
<result column="qlr" property="qlr"/>
<result column="zjhm" property="zjhm"/>
<result column="ywr" property="ywr"/>
<result column="bdcqzh" property="bdcqzh"/>
<result column="djsj" property="djsj"/>
<result column="zxsj" property="zxsj"/>
</association>
</resultMap>
<select id="getCatalog" resultMap="getCatalogAndBDCDY">
select DAC.*,db.* from DG_ARCHIVES_CATALOG DAC join DG_BDCDY DB on DAC.BSM_ARCHIVES = DB.BSM_ARCHIVES
<where>
<if test="bsmArchives != null and bsmArchives.size() != 0">
DAC.BSM_ARCHIVES in
<foreach collection="bsmArchives" item="bsmArchive" separator="," open="(" close=")">
#{bsmArchive,jdbcType=VARCHAR}
</foreach>
</if>
</where>
</select>
</mapper>
......
......@@ -3,15 +3,15 @@
<mapper namespace="com.pashanhoo.destroy.mapper.DgArchivesDestructionMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.pashanhoo.destroy.entity.DgArchivesDestructionDO">
<id column="BSM_DESTRUCTION" property="bsmDestruction" />
<result column="XHQCBH" property="xhqcbh" />
<result column="FQR" property="fqr" />
<result column="FQRQ" property="fqrq" />
<result column="XHYY" property="xhyy" />
<result column="SHRY" property="shry" />
<result column="SHYJ" property="shyj" />
<result column="XHR" property="xhr" />
<result column="XHRQ" property="xhrq" />
<id column="BSM_DESTRUCTION" property="bsmDestruction"/>
<result column="XHQCBH" property="xhqcbh"/>
<result column="FQR" property="fqr"/>
<result column="FQRQ" property="fqrq"/>
<result column="XHYY" property="xhyy"/>
<result column="SHRY" property="shry"/>
<result column="SHYJ" property="shyj"/>
<result column="XHR" property="xhr"/>
<result column="XHRQ" property="xhrq"/>
</resultMap>
<!-- 销毁页面记录查询 -->
<resultMap id="ShowDestructionResultMap" type="com.pashanhoo.destroy.entity.vo.DgArchivesDestructionListVO">
......@@ -54,7 +54,15 @@
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
BSM_DESTRUCTION, XHQCBH, FQR, FQRQ, XHYY, SHRY, SHYJ, XHR, XHRQ
BSM_DESTRUCTION,
XHQCBH,
FQR,
FQRQ,
XHYY,
SHRY,
SHYJ,
XHR,
XHRQ
</sql>
<update id="updateArchivesStatus" parameterType="java.lang.String">
update dg_archives b
......@@ -106,4 +114,12 @@
where a.bsm_destruction = #{bsm_destruction,jdbcType=VARCHAR}
and b.bsm_archives = a.bsm_archives)
</select>
<select id="getDestroyLeftMenu" resultType="com.pashanhoo.archive.entity.DgArchivesDO">
select DA.*
from DG_ARCHIVES DA
join DG_DESTRUCTION_CATALOG DDC on DA.BSM_ARCHIVES = DDC.BSM_ARCHIVES
join DG_ARCHIVES_DESTRUCTION DAD on DDC.BSM_DESTRUCTION = DAD.BSM_DESTRUCTION
where DAD.XHQCBH = #{xhqcbh,jdbcType=VARCHAR}
</select>
</mapper>
......