Commit 927aaad7 by wukaiqiang

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

parent ce117018
...@@ -19,4 +19,5 @@ public interface WarehouseUserDao extends BaseDao { ...@@ -19,4 +19,5 @@ public interface WarehouseUserDao extends BaseDao {
List<KObject> queryPositionByName(String phone); List<KObject> queryPositionByName(String phone);
List<KObject> userNameRepeatCheck(String username); List<KObject> userNameRepeatCheck(String username);
List<KObject> getAllByUserId(List<UUID> userListId);
} }
...@@ -86,4 +86,16 @@ public class SandUserDaoImpl extends AbstractBaseDao { ...@@ -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 ...@@ -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 { ...@@ -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);
}
......
...@@ -226,6 +226,12 @@ public class WarehouseUserServiceImpl implements WarehouseUserService { ...@@ -226,6 +226,12 @@ public class WarehouseUserServiceImpl implements WarehouseUserService {
return dao.findAllByStationListId(stationListId); 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 { ...@@ -58,6 +58,7 @@ public interface SandUserService {
void updatePassword(UUID id, String newPassword); void updatePassword(UUID id, String newPassword);
List<KObject> getAllBySandId(UUID id); List<KObject> getAllBySandId(UUID id);
List<KObject> getAllByUserListId(List<UUID> userListId);
Boolean repeatCheck(String parameter, String string); Boolean repeatCheck(String parameter, String string);
......
...@@ -68,4 +68,6 @@ public interface WarehouseUserService { ...@@ -68,4 +68,6 @@ public interface WarehouseUserService {
Boolean userNameRepeatCheck(String parameter); Boolean userNameRepeatCheck(String parameter);
List<KObject> getAllByUserId(List<UUID> userId);
} }
...@@ -221,5 +221,26 @@ public class SandUserController { ...@@ -221,5 +221,26 @@ public class SandUserController {
return ResponseObj.error(); 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 { ...@@ -121,7 +121,28 @@ public class WarehouseUserController {
return ResponseObj.error("操作失败"); 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查询用户 * 根据id查询用户
...@@ -143,6 +164,8 @@ public class WarehouseUserController { ...@@ -143,6 +164,8 @@ public class WarehouseUserController {
} }
} }
/** /**
* 编辑 * 编辑
* @param obj * @param obj
......
...@@ -129,6 +129,15 @@ ...@@ -129,6 +129,15 @@
</ref> </ref>
<description></description> <description></description>
</field> </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='项目名称'> <field title='项目名称'>
<name>project.projectName</name> <name>project.projectName</name>
<type>string</type> <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