一点优化
This commit is contained in:
parent
940fc384aa
commit
7f7c4d2b15
|
@ -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);
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue