Commit ac8609a1 authored by 朱翔's avatar 朱翔
Browse files

优化

parent 89409cea
......@@ -5,11 +5,14 @@ import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruzhoukj.sms.dao.ReportDataInfoDao;
import com.ruzhoukj.sms.entity.ReportDataInfoEntity;
import com.ruzhoukj.sms.entity.UserEntity;
import com.ruzhoukj.sms.model.dto.ReportDataInfoDTO;
import com.ruzhoukj.sms.model.vo.ReportDataInfoVO;
import com.ruzhoukj.sms.service.ReportDataInfoService;
import com.ruzhoukj.sms.service.UserService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
......@@ -22,6 +25,9 @@ import java.util.List;
*/
@Service
public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, ReportDataInfoEntity> implements ReportDataInfoService {
@Resource
private UserService userService;
@Override
public List<ReportDataInfoVO> queryList(ReportDataInfoDTO reportDataInfoDTO) {
return baseMapper.queryList(reportDataInfoDTO);
......@@ -50,6 +56,9 @@ public class ReportDataInfoServiceImpl extends ServiceImpl<ReportDataInfoDao, Re
@Override
public boolean saveOrUpdateReportData(ReportDataInfoDTO reportDataInfoDTO) {
//查看当前用户所属部门
UserEntity user = userService.getById(reportDataInfoDTO.getLoginUserId());
reportDataInfoDTO.setDeptId(user.getDeptId());
return saveOrUpdate(reportDataInfoDTO);
}
}
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