Commit 927aaad7 by wukaiqiang

场站,购砂单位用户Lisr查询、临时销售计划query增加场站返回数据

parent ce117018
......@@ -19,4 +19,5 @@ public interface WarehouseUserDao extends BaseDao {
List<KObject> queryPositionByName(String phone);
List<KObject> userNameRepeatCheck(String username);
List<KObject> getAllByUserId(List<UUID> userListId);
}
......@@ -86,4 +86,16 @@ public class SandUserDaoImpl extends AbstractBaseDao {
});
}
public List<KObject> getAllByUserListId(List<UUID> userListId) {
// TODO Auto-generated method stub
return getHibernateTemplate().execute(session -> {
StringBuffer sql = new StringBuffer(
"FROM " + getModelName() + " WHERE id in (:userListId) AND enabled = 1 AND discard = 0 ");
// 创建查询
Query<KObject> query = session.createQuery(sql.toString(), KObject.class);
query.setParameterList("userListId", userListId);
return query.getResultList();
});
}
}
......@@ -134,4 +134,17 @@ public class WarehouseUserDaoImpl extends AbstractBaseDao implements WarehouseUs
});
}
@Override
public List<KObject> getAllByUserId(List<UUID> userListId) {
// TODO Auto-generated method stub
return getHibernateTemplate().execute(session -> {
StringBuffer sql = new StringBuffer(
"FROM " + getModelName() + " WHERE id in (:userListId) AND enabled = 1 AND discard = 0 ");
// 创建查询
Query<KObject> query = session.createQuery(sql.toString(), KObject.class);
query.setParameterList("userListId", userListId);
return query.getResultList();
});
}
}
......@@ -219,6 +219,12 @@ public class SandUserServiceImpl implements SandUserService {
}
@Override
public List<KObject> getAllByUserListId(List<UUID> userListId) {
// TODO Auto-generated method stub
return dao.getAllByUserListId(userListId);
}
......
......@@ -225,6 +225,12 @@ public class WarehouseUserServiceImpl implements WarehouseUserService {
// TODO Auto-generated method stub
return dao.findAllByStationListId(stationListId);
}
@Override
public List<KObject> getAllByUserId(List<UUID> userListId) {
// TODO Auto-generated method stub
return dao.getAllByUserId(userListId);
}
......
......@@ -58,6 +58,7 @@ public interface SandUserService {
void updatePassword(UUID id, String newPassword);
List<KObject> getAllBySandId(UUID id);
List<KObject> getAllByUserListId(List<UUID> userListId);
Boolean repeatCheck(String parameter, String string);
......
......@@ -67,5 +67,7 @@ public interface WarehouseUserService {
Boolean phoneRepeatCheck(String parameter);
Boolean userNameRepeatCheck(String parameter);
List<KObject> getAllByUserId(List<UUID> userId);
}
......@@ -221,5 +221,26 @@ public class SandUserController {
return ResponseObj.error();
}
}/**
* 查询场站用户
* @param obj
* @return
*/
@PostMapping("/sandUser/user/userListId")
public Object getAllByUserId( @RequestBody List<UUID> userListId) {
if(userListId.size()<0) {
return ResponseObj.error("userListId不能为空");
}
try {
List<KObject> list = sandUserService.getAllByUserListId(userListId);
return ResponseObj.success("操作成功", list);
} catch (IllegalArgumentException e) {
e.printStackTrace();
return ResponseObj.error("stationId错误");
} catch (Exception e) {
e.printStackTrace();
return ResponseObj.error("操作失败");
}
}
}
......@@ -121,7 +121,28 @@ public class WarehouseUserController {
return ResponseObj.error("操作失败");
}
}
/**
* 查询场站用户
* @param obj
* @return
*/
@PostMapping("/warehouse/user/userListId")
public Object getAllByUserId( @RequestBody List<UUID> userListId) {
if(userListId.size()<0) {
return ResponseObj.error("userListId不能为空");
}
try {
List<KObject> list = warehouseUserService.getAllByUserId(userListId);
return ResponseObj.success("操作成功", list);
} catch (IllegalArgumentException e) {
e.printStackTrace();
return ResponseObj.error("stationId错误");
} catch (Exception e) {
e.printStackTrace();
return ResponseObj.error("操作失败");
}
}
/**
* 根据id查询用户
......@@ -143,6 +164,8 @@ public class WarehouseUserController {
}
}
/**
* 编辑
* @param obj
......
......@@ -129,6 +129,15 @@
</ref>
<description></description>
</field>
<field title='场站'>
<name>station.id</name>
<type>uuid</type>
<ref>
<type></type>
<name>com.xyst.dinas.biz.datamodel.Station</name>
</ref>
<description></description>
</field>
<field title='项目名称'>
<name>project.projectName</name>
<type>string</type>
......
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