Commit 80cc1813 authored by zhengjuzi's avatar zhengjuzi

修改列表查询接口,使倒序

parent 28af09ec
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
</mapper> </mapper>
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
inspection_unit_id, inspection_unit_id,
notice_status, notice_status,
notice_date, notice_date,
approved approved,
tz_ugp_install_notice.rec_date
FROM FROM
tz_ugp_install_notice tz_ugp_install_notice
LEFT JOIN tz_ugp_project ON tz_ugp_install_notice.project_id = tz_ugp_project.sequence_nbr LEFT JOIN tz_ugp_project ON tz_ugp_install_notice.project_id = tz_ugp_project.sequence_nbr
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
</foreach> </foreach>
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
<!-- //根据project_id查询一条数据--> <!-- //根据project_id查询一条数据-->
......
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
target_unit_id, target_unit_id,
target_person_id, target_person_id,
content, content,
send_time send_time,
tz_ugp_project.rec_date
FROM tz_ugp_project, FROM tz_ugp_project,
tz_ugp_install_notice_msg, tz_ugp_install_notice_msg,
tz_ugp_install_notice tz_ugp_install_notice
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
order by rec_date desc
</select> </select>
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto"> <select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto">
SELECT name, SELECT name,
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
pt.charge_person , pt.charge_person ,
pt.start_date , pt.start_date ,
pt.submit_date pt.submit_date,
qy.rec_date
from from
tz_ugp_quality_info qy , tz_ugp_quality_info qy ,
...@@ -53,6 +54,7 @@ ...@@ -53,6 +54,7 @@
and and
pt.name like concat( '%',#{name},'%') pt.name like concat( '%',#{name},'%')
</if> </if>
order by rec_date desc
......
...@@ -45,5 +45,6 @@ ...@@ -45,5 +45,6 @@
and `construction_Unit` like concat('%',#{project.constructionUnit},'%') and `construction_Unit` like concat('%',#{project.constructionUnit},'%')
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
</mapper> </mapper>
...@@ -167,6 +167,7 @@ ...@@ -167,6 +167,7 @@
</foreach> </foreach>
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
...@@ -180,7 +181,8 @@ ...@@ -180,7 +181,8 @@
equipment.service_life, equipment.service_life,
equipment.verify_status, equipment.verify_status,
equipment.sequence_nbr, equipment.sequence_nbr,
project.`name` AS projectName project.`name` AS projectName,
resource.rec_date
FROM tz_ugp_project_resource resource FROM tz_ugp_project_resource resource
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
LEFT JOIN tz_ugp_equipment AS equipment ON equipment.sequence_nbr = resource.resource_id LEFT JOIN tz_ugp_equipment AS equipment ON equipment.sequence_nbr = resource.resource_id
...@@ -201,5 +203,6 @@ ...@@ -201,5 +203,6 @@
</foreach> </foreach>
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
</mapper> </mapper>
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
uv.charger_person_id, uv.charger_person_id,
uv.inspector_id, uv.inspector_id,
ou.biz_org_name AS supervise_dept_name, ou.biz_org_name AS supervise_dept_name,
cou.biz_org_name AS inspection_unit_name cou.biz_org_name AS inspection_unit_name,
qi.rec_date
FROM FROM
tz_ugp_quality_problem AS qi tz_ugp_quality_problem AS qi
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
</foreach> </foreach>
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
<select id="getInfoBySequenceNbr" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto"> <select id="getInfoBySequenceNbr" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto">
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
and and
vf.stage =#{stage} vf.stage =#{stage}
</if> </if>
<if test="smartListDto !=null">
<if test="smartListDto.name !='' and smartListDto.name != null"> <if test="smartListDto.name !='' and smartListDto.name != null">
and and
pt.name like '%${smartListDto.name}%' pt.name like '%${smartListDto.name}%'
...@@ -61,6 +62,8 @@ ...@@ -61,6 +62,8 @@
and and
pt.code like '%${smartListDto.projectCode}%' pt.code like '%${smartListDto.projectCode}%'
</if> </if>
</if>
<if test="listId != null and ! listId.isEmpty() and listId.size() > 0"> <if test="listId != null and ! listId.isEmpty() and listId.size() > 0">
and vf.project_id in and vf.project_id in
...@@ -68,7 +71,7 @@ ...@@ -68,7 +71,7 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
order by vf.verify_time desc
</select> </select>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<select id="queryForWeldPage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto"> <select id="queryForWeldPage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto">
SELECT tz_ugp_weld.`sequence_nbr`,`code`,project_id,install_company,region,coding_status,coding_method,coding_date,project.`name` FROM tz_ugp_weld, SELECT tz_ugp_weld.`sequence_nbr`,`code`,project_id,install_company,region,coding_status,coding_method,coding_date,project.`name`, tz_ugp_weld.rec_date FROM tz_ugp_weld,
(SELECT `sequence_nbr`,`name` FROM tz_ugp_project ) AS project (SELECT `sequence_nbr`,`name` FROM tz_ugp_project ) AS project
<where> <where>
project.sequence_nbr=tz_ugp_weld.project_id project.sequence_nbr=tz_ugp_weld.project_id
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
</foreach> </foreach>
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
</mapper> </mapper>
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<select id="pageList" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WorkHistoryDto"> <select id="pageList" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WorkHistoryDto">
SELECT wh.*,ou.biz_org_name AS name FROM `tz_ugp_work_history` AS wh LEFT JOIN cb_org_usr AS ou ON ou.sequence_nbr = wh.welder_id SELECT wh.*,ou.biz_org_name AS name FROM `tz_ugp_work_history` AS wh LEFT JOIN cb_org_usr AS ou ON ou.sequence_nbr = wh.welder_id
<where> <where>
<if test="tzUgpWorkHistory !=null">
<if test="tzUgpWorkHistory.companyName!='' and tzUgpWorkHistory.companyName!=null"> <if test="tzUgpWorkHistory.companyName!='' and tzUgpWorkHistory.companyName!=null">
and wh.company_name like concat("%",#{tzUgpWorkHistory.companyName},"%") and wh.company_name like concat("%",#{tzUgpWorkHistory.companyName},"%")
</if> </if>
...@@ -23,9 +24,12 @@ ...@@ -23,9 +24,12 @@
<if test="tzUgpWorkHistory.endDate!='' and tzUgpWorkHistory.endDate!=null"> <if test="tzUgpWorkHistory.endDate!='' and tzUgpWorkHistory.endDate!=null">
and wh.end_date like concat("%",#{tzUgpWorkHistory.endDate},"%") and wh.end_date like concat("%",#{tzUgpWorkHistory.endDate},"%")
</if> </if>
</if>
<if test="sequenceNbr!='' and sequenceNbr!=null"> <if test="sequenceNbr!='' and sequenceNbr!=null">
and wh.welder_id = #{sequenceNbr} and wh.welder_id = #{sequenceNbr}
</if> </if>
</where> </where>
order by rec_date desc
</select> </select>
</mapper> </mapper>
...@@ -155,7 +155,7 @@ public class WorkHistoryController extends BaseController { ...@@ -155,7 +155,7 @@ public class WorkHistoryController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST",value = "分页查询", notes = "分页查询") @ApiOperation(httpMethod = "POST",value = "分页查询", notes = "分页查询")
@PostMapping(value = "/pageList") @PostMapping(value = "/pageList")
public ResponseModel<IPage<WorkHistoryDto>> pageList(String pageNum, String pageSize,String sequenceNbr,@RequestBody WorkHistoryDto tzUgpWorkHistory){ public ResponseModel<IPage<WorkHistoryDto>> pageList(String pageNum, String pageSize,String sequenceNbr,@RequestBody(required = false) WorkHistoryDto tzUgpWorkHistory){
if(ValidationUtil.isEmpty(pageNum)){ if(ValidationUtil.isEmpty(pageNum)){
pageNum = "1"; pageNum = "1";
} }
......
...@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSON; ...@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum; import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.*; import com.yeejoin.amos.boot.module.ugp.api.entity.*;
...@@ -56,7 +57,7 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -56,7 +57,7 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
* 分页查询 * 分页查询
*/ */
public Page<EquipmentDto> queryForEquipmentPage(Page<EquipmentDto> page, String name, String code, String verifyStatus) { public Page<EquipmentDto> queryForEquipmentPage(Page<EquipmentDto> page, String name, String code, String verifyStatus) {
return this.queryForPage(page, null, false,name,code,verifyStatus); return this.queryForPage(page, "recDate", false,name,code,verifyStatus);
} }
/** /**
......
...@@ -43,7 +43,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate ...@@ -43,7 +43,7 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
* 分页查询 * 分页查询
*/ */
public Page<MaterialDto> queryForMaterialPage(Page<MaterialDto> page,String name ,String code,Long companyId) { public Page<MaterialDto> queryForMaterialPage(Page<MaterialDto> page,String name ,String code,Long companyId) {
return this.queryForPage(page, null, false,name,code,companyId); return this.queryForPage(page, "rec_date", false,name,code,companyId);
} }
/** /**
......
...@@ -312,6 +312,7 @@ public class OrgServiceImpl { ...@@ -312,6 +312,7 @@ public class OrgServiceImpl {
LambdaQueryWrapper<OrgUsr> wrapper1 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OrgUsr> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(OrgUsr :: getParentId,orgUsrServiceImpl.getOne(wrapper).getSequenceNbr()) wrapper1.eq(OrgUsr :: getParentId,orgUsrServiceImpl.getOne(wrapper).getSequenceNbr())
.eq(OrgUsr ::getBizOrgType, OrgEnum.部门.getKey()); .eq(OrgUsr ::getBizOrgType, OrgEnum.部门.getKey());
wrapper1.orderByDesc(OrgUsr::getRecDate);
IPage<OrgUsr> list = orgUsrServiceImpl.page(page,wrapper1); IPage<OrgUsr> list = orgUsrServiceImpl.page(page,wrapper1);
List<Map> mapList = new ArrayList<>(); List<Map> mapList = new ArrayList<>();
for(OrgUsr orgUsr: list.getRecords()){ for(OrgUsr orgUsr: list.getRecords()){
...@@ -458,6 +459,7 @@ public class OrgServiceImpl { ...@@ -458,6 +459,7 @@ public class OrgServiceImpl {
LambdaQueryWrapper<OrgUsr> welderWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OrgUsr> welderWrapper = new LambdaQueryWrapper<>();
welderWrapper.likeRight(OrgUsr :: getBizOrgCode,orgUsrCompany.getBizOrgCode()).eq(OrgUsr :: getBizOrgType, OrgEnum.普通人员.getKey()); welderWrapper.likeRight(OrgUsr :: getBizOrgCode,orgUsrCompany.getBizOrgCode()).eq(OrgUsr :: getBizOrgType, OrgEnum.普通人员.getKey());
welderWrapper.orderByDesc(OrgUsr::getRecDate);
List<OrgUsr> orgUsrList = new ArrayList<>(); List<OrgUsr> orgUsrList = new ArrayList<>();
if(ValidationUtil.isEmpty(page)){ if(ValidationUtil.isEmpty(page)){
orgUsrList = orgUsrServiceImpl.list(welderWrapper); orgUsrList = orgUsrServiceImpl.list(welderWrapper);
......
...@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl; ...@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule; import com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule;
import com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper; import com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.ISuperviseRuleService; import com.yeejoin.amos.boot.module.ugp.api.service.ISuperviseRuleService;
...@@ -15,6 +17,7 @@ import org.springframework.stereotype.Service; ...@@ -15,6 +17,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
/** /**
...@@ -52,6 +55,7 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super ...@@ -52,6 +55,7 @@ public class SuperviseRuleServiceImpl extends BaseService<SuperviseRuleDto,Super
if (!ValidationUtil.isEmpty(inspectionUnitId)) { if (!ValidationUtil.isEmpty(inspectionUnitId)) {
wrapper.like(SuperviseRule::getInspectionUnitId, inspectionUnitId); wrapper.like(SuperviseRule::getInspectionUnitId, inspectionUnitId);
} }
wrapper.orderByDesc(BaseEntity::getRecDate);
page = this.page(page, wrapper); page = this.page(page, wrapper);
List<SuperviseRule> superviseRuleList = page.getRecords(); List<SuperviseRule> superviseRuleList = page.getRecords();
List<SuperviseRuleDto> superviseRuleDtoList = new ArrayList<>(); List<SuperviseRuleDto> superviseRuleDtoList = new ArrayList<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment