qinhouyu 1 рік тому
батько
коміт
f03a1633d2

+ 2 - 4
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZAreaServiceImpl.java

@@ -10,9 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ruoyi.framework.obs.FileUtil;
 import com.ruoyi.system.mapper.SysDictDataMapper;
-import com.ruoyi.zdsz.domain.ZBuilding;
-import com.ruoyi.zdsz.domain.ZHouse;
-import com.ruoyi.zdsz.domain.ZUnit;
+import com.ruoyi.zdsz.domain.*;
 import com.ruoyi.zdsz.domain.vo.GExportsVo;
 import com.ruoyi.zdsz.domain.vo.GImportVo;
 import com.ruoyi.zdsz.mapper.ZBuildingMapper;
@@ -27,7 +25,6 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import com.ruoyi.zdsz.domain.bo.ZAreaBo;
 import com.ruoyi.zdsz.domain.vo.ZAreaVo;
-import com.ruoyi.zdsz.domain.ZArea;
 import com.ruoyi.zdsz.mapper.ZAreaMapper;
 import com.ruoyi.zdsz.service.IZAreaService;
 import org.springframework.util.ObjectUtils;
@@ -284,6 +281,7 @@ public class ZAreaServiceImpl implements IZAreaService {
     private LambdaQueryWrapper<ZArea> buildQueryWrapper(ZAreaBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<ZArea> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZArea::getCreateTime);
         lqw.like(StringUtils.isNotBlank(bo.getName()), ZArea::getName, bo.getName());
         lqw.eq(StringUtils.isNotBlank(bo.getScale()), ZArea::getScale, bo.getScale());
         lqw.eq(bo.getReleaseIs() != null, ZArea::getReleaseIs, bo.getReleaseIs());

+ 3 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZBuildingServiceImpl.java

@@ -9,6 +9,7 @@ import com.ruoyi.common.core.domain.PageQuery;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.zdsz.domain.ZArea;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 import com.ruoyi.zdsz.domain.bo.ZBuildingBo;
@@ -45,6 +46,7 @@ public class ZBuildingServiceImpl implements IZBuildingService {
     @Override
     public int getBuildingListByAreaId(Collection<String> ids) {
         LambdaQueryWrapper<ZBuilding> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZBuilding::getCreateTime);
         lqw.in(!ids.isEmpty(), ZBuilding::getAreaId, ids);
         return baseMapper.selectVoList(lqw).size();
     }
@@ -79,6 +81,7 @@ public class ZBuildingServiceImpl implements IZBuildingService {
     private LambdaQueryWrapper<ZBuilding> buildQueryWrapper(ZBuildingBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<ZBuilding> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZBuilding::getCreateTime);
         lqw.eq(StringUtils.isNotBlank(bo.getAreaId()), ZBuilding::getAreaId, bo.getAreaId());
         lqw.like(StringUtils.isNotBlank(bo.getName()), ZBuilding::getName, bo.getName());
         return lqw;

+ 2 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEnginMaterialQualityServiceImpl.java

@@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.PageQuery;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.zdsz.domain.ZEngineeringMaterialsResets;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 import com.ruoyi.zdsz.domain.bo.ZEnginMaterialQualityBo;
@@ -61,6 +62,7 @@ public class ZEnginMaterialQualityServiceImpl implements IZEnginMaterialQualityS
     private LambdaQueryWrapper<ZEnginMaterialQuality> buildQueryWrapper(ZEnginMaterialQualityBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<ZEnginMaterialQuality> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZEnginMaterialQuality::getCreateTime);
         lqw.like(StringUtils.isNotBlank(bo.getEnginType()), ZEnginMaterialQuality::getEnginType, bo.getEnginType());
         lqw.like(StringUtils.isNotBlank(bo.getName()), ZEnginMaterialQuality::getName, bo.getName());
         return lqw;

+ 1 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringMaterialServiceImpl.java

@@ -104,6 +104,7 @@ public class ZEngineeringMaterialServiceImpl implements IZEngineeringMaterialSer
     private LambdaQueryWrapper<ZEngineeringMaterial> buildQueryWrapper(ZEngineeringMaterialBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<ZEngineeringMaterial> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZEngineeringMaterial::getCreateTime);
         lqw.eq(StringUtils.isNotBlank(bo.getDetailsId()), ZEngineeringMaterial::getDetailsId, bo.getDetailsId());
         lqw.eq(StringUtils.isNotBlank(bo.getCorrosionLevel()), ZEngineeringMaterial::getCorrosionLevel, bo.getCorrosionLevel());
         lqw.eq(StringUtils.isNotBlank(bo.getBrand()), ZEngineeringMaterial::getBrand, bo.getBrand());

+ 2 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringMaterialsResetsServiceImpl.java

@@ -67,6 +67,7 @@ public class ZEngineeringMaterialsResetsServiceImpl implements IZEngineeringMate
     private LambdaQueryWrapper<ZEngineeringMaterialsResets> buildQueryWrapper(ZEngineeringMaterialsResetsBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<ZEngineeringMaterialsResets> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZEngineeringMaterialsResets::getCreateTime);
         lqw.eq(StringUtils.isNotBlank(bo.getAreaId()), ZEngineeringMaterialsResets::getAreaId, bo.getAreaId());
         lqw.eq(StringUtils.isNotBlank(bo.getMaterialQuality()), ZEngineeringMaterialsResets::getMaterialQuality, bo.getMaterialQuality());
         lqw.eq(StringUtils.isNotBlank(bo.getEstimatedSpecifications()), ZEngineeringMaterialsResets::getEstimatedSpecifications, bo.getEstimatedSpecifications());
@@ -121,6 +122,7 @@ public class ZEngineeringMaterialsResetsServiceImpl implements IZEngineeringMate
     @Override
     public int getMaterialByAreaId(Collection<String> ids) {
         LambdaQueryWrapper<ZEngineeringMaterialsResets> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZEngineeringMaterialsResets::getCreateTime);
         lqw.in(!ids.isEmpty(), ZEngineeringMaterialsResets::getAreaId, ids);
         return baseMapper.selectVoList(lqw).size();
     }

+ 1 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringPipeJackingServiceImpl.java

@@ -112,6 +112,7 @@ public class ZEngineeringPipeJackingServiceImpl implements IZEngineeringPipeJack
     private LambdaQueryWrapper<ZEngineeringPipeJacking> buildQueryWrapper(ZEngineeringPipeJackingBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<ZEngineeringPipeJacking> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZEngineeringPipeJacking::getCreateTime);
         lqw.like(StringUtils.isNotBlank(bo.getEnginId()), ZEngineeringPipeJacking::getEnginId, bo.getEnginId());
         lqw.like(StringUtils.isNotBlank(bo.getEnginName()), ZEngineeringPipeJacking::getEnginName, bo.getEnginName());
         lqw.eq(StringUtils.isNotBlank(bo.getEnginAddre()), ZEngineeringPipeJacking::getEnginAddre, bo.getEnginAddre());

+ 2 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZHouseServiceImpl.java

@@ -67,6 +67,7 @@ public class ZHouseServiceImpl implements IZHouseService {
     private LambdaQueryWrapper<ZHouse> buildQueryWrapper(ZHouseBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<ZHouse> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZHouse::getCreateTime);
         lqw.eq(StringUtils.isNotBlank(bo.getAreaId()), ZHouse::getAreaId, bo.getAreaId());
         lqw.eq(StringUtils.isNotBlank(bo.getBuildingId()), ZHouse::getBuildingId, bo.getBuildingId());
         lqw.eq(StringUtils.isNotBlank(bo.getUnitId()), ZHouse::getUnitId, bo.getUnitId());
@@ -119,6 +120,7 @@ public class ZHouseServiceImpl implements IZHouseService {
     @Override
     public int getHouseByUnitId(Collection<String> ids) {
         LambdaQueryWrapper<ZHouse> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZHouse::getCreateTime);
         lqw.in(!ids.isEmpty(), ZHouse::getUnitId, ids);
         return baseMapper.selectVoList(lqw).size();
     }

+ 2 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZUnitServiceImpl.java

@@ -69,6 +69,7 @@ public class ZUnitServiceImpl implements IZUnitService {
     private LambdaQueryWrapper<ZUnit> buildQueryWrapper(ZUnitBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<ZUnit> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZUnit::getCreateTime);
         lqw.eq(StringUtils.isNotBlank(bo.getAreaId()), ZUnit::getAreaId, bo.getAreaId());
         lqw.eq(StringUtils.isNotBlank(bo.getBuildingId()), ZUnit::getBuildingId, bo.getBuildingId());
         lqw.like(StringUtils.isNotBlank(bo.getName()), ZUnit::getName, bo.getName());
@@ -120,6 +121,7 @@ public class ZUnitServiceImpl implements IZUnitService {
     @Override
     public int getListByUnitId(Collection<String> ids) {
         LambdaQueryWrapper<ZUnit> lqw = Wrappers.lambdaQuery();
+        lqw.orderByDesc(ZUnit::getCreateTime);
         lqw.in(!ids.isEmpty(), ZUnit::getBuildingId, ids);
         return baseMapper.selectVoList(lqw).size();
     }

+ 4 - 1
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZAreaMapper.xml

@@ -26,6 +26,7 @@
         from z_area
         where name = #{name}
           and del_flag = '0'
+        order by create_time desc
     </select>
 
     <select id="getArea" resultType="com.ruoyi.zdsz.domain.vo.ZAreaVo">
@@ -36,6 +37,7 @@
         <if test="district != null and district != ''">
             and district = #{district}
         </if>
+        order by create_time desc
     </select>
     <select id="selectGExportsList" resultType="com.ruoyi.zdsz.domain.vo.GImportVo">
         SELECT za.name AS areaName,
@@ -49,6 +51,7 @@
                  LEFT JOIN z_unit zn on zn.building_id = zb.id and zn.del_flag = 0
                  LEFT JOIN z_house zh on zh.unit_id = zn.id and zh.del_flag = 0
         WHERE za.del_flag = 0
+        order by za.create_time desc
     </select>
     <select id="getExport" resultType="com.ruoyi.zdsz.domain.vo.GExportsVo">
         SELECT a.name               AS areaName,
@@ -64,7 +67,7 @@
           AND a.calculate_district = #{calculateDistrict}
           AND a.belonging_pack = #{belongingPack}
         GROUP BY b.area_id
-
+        order by a.create_time desc
     </select>
     <select id="getDictNameOfAffiliatedPackage" resultType="string">
         SELECT CONCAT(a.dict_label, '-工程任务单(', b.dict_label, ')') AS name

+ 2 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZBuildingMapper.xml

@@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="areaId != null and areaId != ''">
             and area_id = #{areaId}
         </if>
+        order by create_time desc
     </select>
 
     <select id="getPageList" resultType="com.ruoyi.zdsz.domain.vo.ZBuildingVo">
@@ -48,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and a.area_id = #{p.areaId}
             </if>
         </where>
+        order by a.create_time desc
     </select>
 
 </mapper>

+ 1 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZEnginMaterialQualityMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and zc.engin_type LIKE CONCAT('%',#{enginType},'%')
             </if>
         </where>
+        order by zc.create_time desc
     </select>
 
 </mapper>

+ 4 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZEnginSpecificationsMapper.xml

@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                  left join z_engin_material_quality b on b.id = a.mater_id
         where a.del_flag = '0'
           and a.id = #{id}
+        order by a.create_time desc
     </select>
     <select id="getPageList" resultType="com.ruoyi.zdsz.domain.vo.ZEnginSpecificationsVo">
         select a.id as id,
@@ -43,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and a.mater_id = #{p.materId}
             </if>
         </where>
+        order by a.create_time desc
     </select>
 
     <select id="getEnginSpecifications" resultType="com.ruoyi.zdsz.domain.vo.ZEnginSpecificationsVo">
@@ -50,5 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="materId != null and materId != ''">
             and ze.mater_id = #{materId}
         </if>
+        order by ze.create_time desc
+
     </select>
 </mapper>

+ 1 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZEngineeringMaterialsResetsMapper.xml

@@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="p.areaId != null  and p.areaId != ''">
             and ze.area_id LIKE CONCAT('%',#{p.areaId},'%')
         </if>
+        order by ze.create_time desc
     </select>
 
 </mapper>

+ 1 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZEngineeringPipeJackingMapper.xml

@@ -49,5 +49,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="enginName != null  and enginName != ''">
             and engin_name like concat('%',#{enginName},'%')
         </if>
+        order by create_time desc
     </select>
 </mapper>

+ 2 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZHouseMapper.xml

@@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and a.unit_id = #{p.unitId}
             </if>
         </where>
+        order by a.create_time desc
     </select>
 
 
@@ -57,5 +58,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="unitId != null  and unitId != ''">
             and zh.unit_id = #{unitId}
         </if>
+        order by zh.create_time desc
     </select>
 </mapper>

+ 2 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZUnitMapper.xml

@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="buildingId != null and buildingId != ''">
             and building_id = #{buildingId}
         </if>
+        order by create_time desc
     </select>
 
     <select id="getPageList" resultType="com.ruoyi.zdsz.domain.vo.ZUnitVo">
@@ -53,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and a.building_id = #{p.buildingId}
             </if>
         </where>
+        order by a.create_time desc
     </select>
 
 </mapper>