大数据与最优化研究所 1 年之前
父节点
当前提交
e0f60c2357

+ 6 - 7
src/main/java/com/xjrsoft/module/asset/controller/WfAssetManageController.java

@@ -92,9 +92,10 @@ public class WfAssetManageController {
                     PlaceTreeVo placeTreeVo = new PlaceTreeVo();
                     placeTreeVo.setId(customUniqueId);
                     if(!v.isEmpty() && v.get(0) != null){
-                        placeTreeVo.setName(v.get(0).getName());
+                        placeTreeVo.setName(v.get(0).getBuildTypeCn());
                     }
                     placeTreeVo.setParentId(8888L);
+                    voList.add(placeTreeVo);
 
                     if(!v.isEmpty()){
                         for (BaseOfficeBuildVo baseOfficeBuildVo : v){
@@ -102,6 +103,7 @@ public class WfAssetManageController {
                             p.setId(baseOfficeBuildVo.getId());
                             p.setName(baseOfficeBuildVo.getName());
                             p.setParentId(customUniqueId);
+                            voList.add(p);
                         }
                     }
 
@@ -128,6 +130,7 @@ public class WfAssetManageController {
                     placeTreeVo.setId(customUniqueId);
                     placeTreeVo.setName(k + "楼");
                     placeTreeVo.setParentId(key);
+                    voList.add(placeTreeVo);
 
                     if(!v.isEmpty()){
                         for (BaseClassroom baseClassroom : v){
@@ -135,6 +138,7 @@ public class WfAssetManageController {
                             p.setId(baseClassroom.getId());
                             p.setName(baseClassroom.getName());
                             p.setParentId(customUniqueId);
+                            voList.add(p);
                         }
                     }
 
@@ -152,12 +156,7 @@ public class WfAssetManageController {
     @ApiOperation(value="资产管理列表(分页)")
     @SaCheckPermission("wfassetmanage:detail")
     public RT<PageOutput<WfAssetManagePageVo>> page(@Valid WfAssetManagePageDto dto){
-
-        LambdaQueryWrapper<WfAssetManage> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper
-                    .orderByDesc(WfAssetManage::getId)
-                .select(WfAssetManage.class,x -> VoToColumnUtil.fieldsToColumns(WfAssetManagePageVo.class).contains(x.getProperty()));
-        IPage<WfAssetManage> page = wfAssetManageService.page(ConventPage.getPage(dto), queryWrapper);
+        IPage<WfAssetManagePageVo> page = wfAssetManageService.getPage(dto);
         PageOutput<WfAssetManagePageVo> pageOutput = ConventPage.getPageOutput(page, WfAssetManagePageVo.class);
         return RT.ok(pageOutput);
     }

+ 30 - 1
src/main/java/com/xjrsoft/module/asset/dto/WfAssetManagePageDto.java

@@ -21,6 +21,35 @@ import java.util.Date;
 @Data
 @EqualsAndHashCode(callSuper = false)
 public class WfAssetManagePageDto extends PageInput {
-
+    /**
+     * 资产类型
+     */
+    @ApiModelProperty("资产类型")
+    private String assetType;
+    /**
+     * 资产类别
+     */
+    @ApiModelProperty("资产类别")
+    private String assetCategory;
+    /**
+     * 资产种类
+     */
+    @ApiModelProperty("资产种类")
+    private String assetSpecies;
+    /**
+     * 名称
+     */
+    @ApiModelProperty("名称")
+    private String name;
+    /**
+     * 所属部门[xjr_department]
+     */
+    @ApiModelProperty("所属部门[xjr_department]")
+    private Long deptId;
+    /**
+     * 使用人id[xjr_user]
+     */
+    @ApiModelProperty("使用人id[xjr_user]")
+    private Long userId;
 
 }

+ 8 - 0
src/main/java/com/xjrsoft/module/asset/mapper/WfAssetManageMapper.java

@@ -1,8 +1,14 @@
 package com.xjrsoft.module.asset.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.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.asset.dto.WfAssetManagePageDto;
 import com.xjrsoft.module.asset.entity.WfAssetManage;
+import com.xjrsoft.module.asset.vo.WfAssetManagePageVo;
+import com.xjrsoft.module.textbook.dto.TextbookPageDto;
+import com.xjrsoft.module.textbook.vo.TextbookPageVo;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -14,4 +20,6 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface WfAssetManageMapper extends MPJBaseMapper<WfAssetManage> {
 
+    IPage<WfAssetManagePageVo> getPage(Page<TextbookPageDto> page, WfAssetManagePageDto dto);
+    Page<TextbookPageVo> getPage(Page<TextbookPageDto> page, TextbookPageDto dto);
 }

+ 4 - 0
src/main/java/com/xjrsoft/module/asset/service/IWfAssetManageService.java

@@ -1,8 +1,11 @@
 package com.xjrsoft.module.asset.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.asset.dto.WfAssetManagePageDto;
 import com.xjrsoft.module.asset.entity.WfAssetManage;
+import com.xjrsoft.module.asset.vo.WfAssetManagePageVo;
 import lombok.Data;
 import java.util.List;
 
@@ -14,4 +17,5 @@ import java.util.List;
 */
 
 public interface IWfAssetManageService extends MPJBaseService<WfAssetManage> {
+    IPage<WfAssetManagePageVo> getPage(WfAssetManagePageDto dto);
 }

+ 21 - 0
src/main/java/com/xjrsoft/module/asset/service/impl/WfAssetManageServiceImpl.java

@@ -1,10 +1,17 @@
 package com.xjrsoft.module.asset.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.asset.dto.WfAssetManagePageDto;
 import com.xjrsoft.module.asset.entity.WfAssetManage;
 import com.xjrsoft.module.asset.mapper.WfAssetManageMapper;
 import com.xjrsoft.module.asset.service.IWfAssetManageService;
+import com.xjrsoft.module.asset.vo.WfAssetManagePageVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -22,4 +29,18 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 @Service
 @AllArgsConstructor
 public class WfAssetManageServiceImpl extends MPJBaseServiceImpl<WfAssetManageMapper, WfAssetManage> implements IWfAssetManageService {
+
+    private final WfAssetManageMapper wfAssetManageMapper;
+    @Override
+    public IPage<WfAssetManagePageVo> getPage(WfAssetManagePageDto dto) {
+        /*MPJLambdaWrapper<WfAssetManage> wfAssetManageMPJLambdaWrapper = new MPJLambdaWrapper<>();
+        wfAssetManageMPJLambdaWrapper
+
+                .select(WfAssetManage.class,x -> VoToColumnUtil.fieldsToColumns(WfAssetManagePageVo.class).contains(x.getProperty()))
+
+                .orderByDesc(WfAssetManage::getId)
+        ;
+        this.selectJoinListPage(ConventPage.getPage(dto))*/
+        return null;
+    }
 }

+ 25 - 35
src/main/java/com/xjrsoft/module/asset/vo/WfAssetManagePageVo.java

@@ -20,56 +20,36 @@ import java.util.Date;
 @Data
 public class WfAssetManagePageVo {
 
-    /**
-    * 
-    */
-    @ApiModelProperty("")
-    private String id;
-    /**
-    * 
-    */
-    @ApiModelProperty("")
-    private Long createUserId;
-    /**
-    * 
-    */
-    @ApiModelProperty("")
-    private Date createDate;
-    /**
-    * 
-    */
-    @ApiModelProperty("")
-    private Long modifyUserId;
-    /**
-    * 
-    */
-    @ApiModelProperty("")
-    private Date modifyDate;
-    /**
-    * 
-    */
-    @ApiModelProperty("")
-    private Integer deleteMark;
-    /**
-    * 
-    */
-    @ApiModelProperty("")
-    private Integer enabledMark;
     /**
     * 资产类型
     */
     @ApiModelProperty("资产类型")
     private String assetType;
+    /**
+     * 资产类型
+     */
+    @ApiModelProperty("资产类型")
+    private String assetTypeCn;
     /**
     * 资产类别
     */
     @ApiModelProperty("资产类别")
     private String assetCategory;
+    /**
+     * 资产类别
+     */
+    @ApiModelProperty("资产类别")
+    private String assetCategoryCn;
     /**
     * 资产种类
     */
     @ApiModelProperty("资产种类")
     private String assetSpecies;
+    /**
+     * 资产种类
+     */
+    @ApiModelProperty("资产种类")
+    private String assetSpeciesCn;
     /**
     * 名称
     */
@@ -80,11 +60,21 @@ public class WfAssetManagePageVo {
     */
     @ApiModelProperty("所属部门[xjr_department]")
     private Long deptId;
+    /**
+     * 所属部门[xjr_department]
+     */
+    @ApiModelProperty("所属部门[xjr_department]")
+    private Long deptIdCn;
     /**
     * 使用人id[xjr_user]
     */
     @ApiModelProperty("使用人id[xjr_user]")
     private Long userId;
+    /**
+     * 使用人id[xjr_user]
+     */
+    @ApiModelProperty("使用人id[xjr_user]")
+    private Long userIdCn;
     /**
     * 金额
     */

+ 1 - 1
src/main/resources/mapper/oa/OfficialDocumentPostMapper.xml

@@ -4,7 +4,7 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.oa.mapper.OfficialDocumentPostMapper">
     <select id="getMaxPostNumber" resultType="java.lang.Integer">
-        SELECT IFNULL(MAX(SUBSTR(received_number, 6, 3)), 0) + 1 FROM official_document_received WHERE YEAR(received_date) = YEAR(NOW())
+        SELECT IFNULL(MAX(SUBSTR(post_number, 6, 3)), 0) + 1 FROM official_document_post WHERE YEAR(post_date) = YEAR(NOW())
     </select>
 
 </mapper>