1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 23:11:24 +08:00

workVue update2

This commit is contained in:
GGB
2023-05-06 00:27:55 +08:00
parent bc12df2ea1
commit 621d67c52c
4 changed files with 15 additions and 11 deletions

View File

@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.DecimalFormat;
import java.util.List;
/**
@@ -76,6 +77,7 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, Work> implements IW
double completeNum = userWorkMapper.selectCount(new QueryWrapper<UserWork>().eq("work_id",workId).eq("status",1));
double progress = 0;
progress = (completeNum / workNum) * 100;
progress = (double) Math.round(progress * 100) / 100;
return progress;
}