显示顾客

zhc4dev
wangjiadong 2 years ago
parent b9aa33680f
commit 2e46dfddfc
  1. 11
      jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/controller/ZyUserController.java
  2. 7
      jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/mapper/ZyUserMapper.java
  3. 6
      jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/mapper/xml/ZyUserMapper.xml
  4. 2
      jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/service/IZyUserService.java
  5. 25
      jeecg-boot/jeecg-boot-module-personnel/src/main/java/org/jeecg/modules/person/service/Impl/ZyUserServiceImpl.java

@ -30,6 +30,17 @@ public class ZyUserController {
@AutoLog(value = "查询所有流水线员工基本信息")
@ApiOperation(value = "查询所有流水线员工基本信息", notes = "查询所有流水线员工基本信息")
@GetMapping(value = "/allgk")
public Result<?> getAllgk() {
List<User1> allUsergk = iZyUserService.getAllUsergk();
System.out.println(allUsergk);
return Result.OK(allUsergk);
}
@AutoLog(value = "查询所有流水线员工基本信息")
@ApiOperation(value = "查询所有流水线员工基本信息", notes = "查询所有流水线员工基本信息")
@GetMapping(value = "/allUserOnLine")

@ -2,6 +2,7 @@ package org.jeecg.modules.person.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.person.vo.*;
import org.jeecg.modules.person.entity.SysUser;
import org.jeecg.modules.person.vo.*;
@ -23,4 +24,10 @@ public interface ZyUserMapper extends BaseMapper<SysUser> {
List<ZyIdentity1> getWorkIdentityByMachine(String id);
List<GetWorker> getWorkByIdentityId(List<String> ids);
@Select("select id,username,realname,avatar,sex,email,phone,status from sys_user")
List<User1> getAllUsergk();
@Select("select count(1) from sys_user_role where user_id=#{id} and role_id='1601135568301318146'")
Boolean isboolc(String id);
}

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="org.jeecg.modules.person.mapper.ZyUserMapper">
<!-- 查询所有流水线的员工的工位,工号,姓名和角色 -->
<!-- 查询所有流水线的员工的工位,工号,姓名和角色 -->
<select id="getAllUserOnLine" resultType="org.jeecg.modules.person.vo.station">
SELECT a.name AS lineName,b.code AS stationNumber,d.*
FROM zy_fabric_warehouse a

@ -17,4 +17,6 @@ public interface IZyUserService extends IService<SysUser> {
List<ZyIdentity1> getWorkIdentityByMachine(String machineId);
List<GetWorker> getWorkByIdentityId(List<String> list);
List<User1> getAllUsergk();
}

@ -17,6 +17,29 @@ public class ZyUserServiceImpl extends ServiceImpl<ZyUserMapper, SysUser> implem
@Autowired
private ZyUserMapper zyUserMapper;
@Override
public List<User1> getAllUsergk() {
List<User1> allUsergk = zyUserMapper.getAllUsergk();
List<User1> userList = new ArrayList<>();
for(User1 s:allUsergk){
User1 user = new User1();
String id = s.getId();
Boolean c= zyUserMapper.isboolc(id);
if (c){
user.setId(s.getId());
user.setRealName(s.getRealName());
user.setUserName(s.getUserName());
user.setAvatar(s.getAvatar());
user.setEmail(s.getEmail());
user.setPhone(s.getPhone());
user.setSex(s.getSex());
userList.add(user);
}
}
return userList;
}
@Override
public List<User> getAllUserOnLine() {
List<station> allUserOnLine = zyUserMapper.getAllUserOnLine();
@ -88,4 +111,6 @@ public class ZyUserServiceImpl extends ServiceImpl<ZyUserMapper, SysUser> implem
}
}

Loading…
Cancel
Save