新部门员工接口
parent
ea972cfdb7
commit
6d709c2b2f
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.gunshi.project.xyt.controller;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.gunshi.core.result.R;
|
||||||
|
import com.gunshi.project.xyt.model.AppVersionRecord;
|
||||||
|
import com.gunshi.project.xyt.service.AppVersionRecordService;
|
||||||
|
import com.gunshi.project.xyt.service.DeptempService;
|
||||||
|
import com.ruoyi.common.config.RuoYiConfig;
|
||||||
|
import com.ruoyi.common.constant.HttpStatus;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Tag(name = "dept")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value="/deptemp")
|
||||||
|
public class DeptempController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DeptempService deptempService;
|
||||||
|
|
||||||
|
@GetMapping("/deptlist")
|
||||||
|
public R<List<SysDept>> deptlist(SysDept dept)
|
||||||
|
{
|
||||||
|
List<SysDept> depts = deptempService.selectDeptList(dept);
|
||||||
|
return R.ok(depts);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/userlist")
|
||||||
|
public TableDataInfo userlist(SysUser user)
|
||||||
|
{
|
||||||
|
PageUtils.startPage();
|
||||||
|
List<SysUser> list = deptempService.selectUserList(user);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TableDataInfo getDataTable(List<?> list)
|
||||||
|
{
|
||||||
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
rspData.setMsg("查询成功");
|
||||||
|
rspData.setRows(list);
|
||||||
|
rspData.setTotal(new PageInfo(list).getTotal());
|
||||||
|
return rspData;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
package com.gunshi.project.xyt.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gunshi.project.xyt.mapper.AppVersionRecordMapper;
|
||||||
|
import com.gunshi.project.xyt.model.AppVersionRecord;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||||
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: APP版本记录
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-11-12 10:14:50
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class DeptempService{
|
||||||
|
@Autowired
|
||||||
|
private SysDeptMapper deptMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserMapper userMapper;
|
||||||
|
|
||||||
|
public List<SysUser> selectUserList(SysUser user)
|
||||||
|
{
|
||||||
|
return userMapper.selectUserList(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<SysDept> selectDeptList(SysDept dept)
|
||||||
|
{
|
||||||
|
return deptMapper.selectDeptList(dept);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -75,8 +75,10 @@ public class ReservoirWaterService {
|
||||||
StZvarlB equals = zvarlBS.stream().filter(e -> e.getRz().compareTo(vo.getRz()) == 0).findFirst().orElse(new StZvarlB());
|
StZvarlB equals = zvarlBS.stream().filter(e -> e.getRz().compareTo(vo.getRz()) == 0).findFirst().orElse(new StZvarlB());
|
||||||
//死水位库容
|
//死水位库容
|
||||||
StZvarlB dead = zvarlBS.stream().filter(e -> e.getRz().compareTo(vo.getDeadCap()) == 0).findFirst().orElse(new StZvarlB());
|
StZvarlB dead = zvarlBS.stream().filter(e -> e.getRz().compareTo(vo.getDeadCap()) == 0).findFirst().orElse(new StZvarlB());
|
||||||
|
if(Objects.nonNull(equals) && Objects.nonNull(dead)){
|
||||||
BigDecimal subtract = equals.getW().subtract(dead.getW());
|
BigDecimal subtract = equals.getW().subtract(dead.getW());
|
||||||
vo.setNowCap(subtract);
|
vo.setNowCap(subtract);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Map<BigDecimal, BigDecimal> stZvalMap = zvarlBS.stream().collect(Collectors.toMap(StZvarlB::getRz, StZvarlB::getW));
|
Map<BigDecimal, BigDecimal> stZvalMap = zvarlBS.stream().collect(Collectors.toMap(StZvarlB::getRz, StZvarlB::getW));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue