Commit bdd7d4fd authored by wujipeng's avatar wujipeng
Browse files

日期计算优化

parent 746b2bf5
......@@ -29,9 +29,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity
List<ContractVO> contractList = baseMapper.pageContract(contractDTO);
//计算剩余多少天
for (ContractVO contractVO : contractList) {
Date beginTime = contractVO.getBeginTime();
Date endTime = contractVO.getEndTime();
int differ = (int) DateUtils.daysBetween(beginTime, endTime);
int differ = (int) DateUtils.daysBetween(new Date(), endTime);
if (differ > NumberConstant.ZERO) {
contractVO.setRemainingDays(differ);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment