diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml index 12f2cc9..b8625fe 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml @@ -361,7 +361,6 @@ FROM hz_ims_duty_main DM JOIN hz_ims_duty_class DC ON DM.`CLASS_ID` = DC.`ID` - WHERE DG.MANAGER_ID IS NOT NULL AND DM.ID = #{dutyId} order by DM.duty_date desc limit 1; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java index 295ff91..94f869f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java @@ -1033,6 +1033,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl() {{ eq(ImsDutyMainPersonEntity::getDutyMainId, s.getDutyId()); + last("limit 1"); }}); s.setManagerId(imsDutyMainPersonEntity.getDutyChargePerson()); } else { @@ -1187,6 +1188,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl() {{ eq(ImsDutyMainPersonEntity::getDutyMainId, s.getId()); + last(" limit 1"); }}); s.setManagerId(imsDutyMainPersonEntity.getDutyChargePerson().toString()); } else { @@ -1382,6 +1384,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl() {{ eq(ImsDutyMainPersonEntity::getDutyMainId, dutyMainInfoVo.getId()); + last(" LIMIT 1"); }}); dutyMainInfoVo.setManagerId(imsDutyMainPersonEntity.getDutyChargePerson().toString()); } else {