feat(pocket): 添加数据查询倒序排列功能

- 在Klptcm1ProPlantStateCurrentMapper.xml中添加ORDER BY INSDATE DESC排序
- 在Klptcm1ProPlantStateHistoryServiceImpl中添加倒序查询逻辑- 在Klptcm1ProStoppageServiceImpl中添加倒序查询逻辑
This commit is contained in:
2025-10-31 14:00:31 +08:00
parent bcc27e76c1
commit 456367a63f
3 changed files with 6 additions and 1 deletions

View File

@@ -169,6 +169,8 @@ public class Klptcm1ProPlantStateHistoryServiceImpl implements IKlptcm1ProPlantS
lqw.eq(bo.getVALUE97() != null, Klptcm1ProPlantStateHistory::getValue97, bo.getVALUE97());
lqw.eq(bo.getVALUE98() != null, Klptcm1ProPlantStateHistory::getValue98, bo.getVALUE98());
lqw.eq(bo.getVALUE99() != null, Klptcm1ProPlantStateHistory::getValue99, bo.getVALUE99());
//倒叙
lqw.orderByDesc(Klptcm1ProPlantStateHistory::getInsdate);
return lqw;
}

View File

@@ -76,6 +76,8 @@ public class Klptcm1ProStoppageServiceImpl implements IKlptcm1ProStoppageService
lqw.eq(bo.getDURATION() != null, Klptcm1ProStoppage::getDuration, bo.getDURATION());
lqw.eq(bo.getInsDate() != null, Klptcm1ProStoppage::getInsDate, bo.getInsDate());
lqw.eq(StringUtils.isNotBlank(bo.getStopType()), Klptcm1ProStoppage::getStopType, bo.getStopType());
//倒叙
lqw.orderByDesc(Klptcm1ProStoppage::getInsDate);
return lqw;
}

View File

@@ -132,6 +132,7 @@
SELECT
<include refid="Base_Column_List"/>
FROM klptcm1_pro_plant_state_current
ORDER BY INSDATE DESC
</select>
<!-- 按复合键查询INSDATE + TYPE -->
@@ -167,7 +168,7 @@
<!-- 修改(按复合键) -->
<update id="updateByKey" parameterType="com.klp.pocket.domain.Klptcm1ProPlantStateCurrent">
UPDATE klptcm1_pro_plant_state_current
SET
SET
YEAR=#{year}, MONTH=#{month}, DAY=#{day}, HOUR=#{hour}, MINUTE=#{minute},
VALUE1=#{value1}, VALUE2=#{value2}, VALUE3=#{value3}, VALUE4=#{value4}, VALUE5=#{value5}, VALUE6=#{value6}, VALUE7=#{value7}, VALUE8=#{value8}, VALUE9=#{value9}, VALUE10=#{value10},
VALUE11=#{value11}, VALUE12=#{value12}, VALUE13=#{value13}, VALUE14=#{value14}, VALUE15=#{value15}, VALUE16=#{value16}, VALUE17=#{value17}, VALUE18=#{value18}, VALUE19=#{value19}, VALUE20=#{value20},