一点优化

This commit is contained in:
wangliwen 2022-04-28 09:18:24 +08:00
parent 940fc384aa
commit 7f7c4d2b15
2 changed files with 5 additions and 3 deletions

View File

@ -35,10 +35,10 @@ public class ActivitiServiceImpl extends BaseServiceImpl<ProcessActivityDao, Pro
@Override
public List<HistoryDetailDTO> getTaskHandleDetailInfo(String processInstanceId) {
List<HistoryDetailEntity> listEntity = baseDao.getTaskHandleDetailInfo(processInstanceId);
for(HistoryDetailEntity entity : listEntity){
if(entity.getEndTime() != null && entity.getStartTime() != null){
for (HistoryDetailEntity entity : listEntity) {
if (entity.getEndTime() != null && entity.getStartTime() != null) {
long diff = entity.getEndTime().getTime() - entity.getStartTime().getTime();
entity.setDurationInSeconds(diff/1000);
entity.setDurationInSeconds(diff / 1000);
}
}
return ConvertUtils.sourceToTarget(listEntity, HistoryDetailDTO.class);

View File

@ -53,6 +53,8 @@
<if test="finishedEndTime != null">
<![CDATA[and ahp.END_TIME_ <= #{finishedEndTime}]]>
</if>
ORDER BY
ahp.START_TIME_ DESC
</select>
<select id="getTaskHandleDetailInfo" resultMap="HistoryDetail">