Commit 498529a5 authored by 赵啸非's avatar 赵啸非

重新调整统计线程实现

parent 997c7807
package com.mortals.xhx.module.stat.service.impl;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.mortals.framework.common.Rest;
......@@ -37,12 +38,12 @@ import java.util.Date;
import java.util.List;
/**
* StatService
* 汇总统计 service实现
*
* @author zxfei
* @date 2024-07-02
*/
* StatService
* 汇总统计 service实现
*
* @author zxfei
* @date 2024-07-02
*/
@Service("statService")
@Slf4j
public class StatServiceImpl extends AbstractCRUDServiceImpl<StatDao, StatEntity, Long> implements StatService {
......@@ -111,22 +112,21 @@ public class StatServiceImpl extends AbstractCRUDServiceImpl<StatDao, StatEntity
StatEntity.setSiteId(entity.getSiteId());
StatEntity.setSiteCode(entity.getSiteCode());
StatEntity.setSiteName(entity.getSiteName());
StatEntity.setCount(pjcount+phcount);
StatEntity.setCount(pjcount + phcount);
StatEntity.setYear(entity.getYear());
StatEntity.setMonth(entity.getMonth());
StatEntity.setDay(entity.getDay());
StatEntity.setCreateTime(new Date());
StatEntity.setCreateUserId(1L);
this.save(StatEntity);
} else {
StatEntity.setCount(pjcount+phcount);
StatEntity.setYear(entity.getYear());
StatEntity.setMonth(entity.getMonth());
StatEntity.setDay(entity.getDay());
StatEntity.setUpdateTime(new Date());
StatEntity.setUpdateUserId(1L);
this.update(StatEntity);
return Rest.ok();
}
StatEntity.setSiteCode(entity.getSiteCode());
StatEntity.setSiteName(entity.getSiteName());
StatEntity.setCount(pjcount + phcount);
StatEntity.setUpdateTime(new Date());
StatEntity.setUpdateUserId(1L);
this.update(StatEntity);
return Rest.ok();
}
......
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