增加用户分配功能和用户分配按钮功能
This commit is contained in:
@@ -67,7 +67,7 @@ public class DepotController {
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/findUserDepot")
|
@GetMapping(value = "/findUserDepot")
|
||||||
public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
@@ -75,16 +75,21 @@ public class DepotController {
|
|||||||
List<Depot> dataList = depotService.findUserDepot();
|
List<Depot> dataList = depotService.findUserDepot();
|
||||||
//开始拼接json数据
|
//开始拼接json数据
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("id", 1);
|
outer.put("id", 0);
|
||||||
outer.put("text", "仓库列表");
|
outer.put("key", 0);
|
||||||
outer.put("state", "open");
|
outer.put("value", 0);
|
||||||
|
outer.put("title", "仓库列表");
|
||||||
|
outer.put("attributes", "仓库列表");
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
JSONArray dataArray = new JSONArray();
|
JSONArray dataArray = new JSONArray();
|
||||||
if (null != dataList) {
|
if (null != dataList) {
|
||||||
for (Depot depot : dataList) {
|
for (Depot depot : dataList) {
|
||||||
JSONObject item = new JSONObject();
|
JSONObject item = new JSONObject();
|
||||||
item.put("id", depot.getId());
|
item.put("id", depot.getId());
|
||||||
item.put("text", depot.getName());
|
item.put("key", depot.getId());
|
||||||
|
item.put("value", depot.getId());
|
||||||
|
item.put("title", depot.getName());
|
||||||
|
item.put("attributes", depot.getName());
|
||||||
//勾选判断1
|
//勾选判断1
|
||||||
Boolean flag = false;
|
Boolean flag = false;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -203,10 +203,9 @@ public class FunctionController {
|
|||||||
if (null != dataList) {
|
if (null != dataList) {
|
||||||
for (Function function : dataList) {
|
for (Function function : dataList) {
|
||||||
JSONObject item = new JSONObject();
|
JSONObject item = new JSONObject();
|
||||||
item.put("Id", function.getId());
|
item.put("id", function.getId());
|
||||||
item.put("Name", function.getName());
|
item.put("name", function.getName());
|
||||||
item.put("PushBtn", function.getPushBtn());
|
item.put("pushBtn", function.getPushBtn());
|
||||||
item.put("op", 1);
|
|
||||||
dataArray.add(item);
|
dataArray.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ public class SupplierController {
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/findUserCustomer")
|
@GetMapping(value = "/findUserCustomer")
|
||||||
public JSONArray findUserCustomer(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
public JSONArray findUserCustomer(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
|
||||||
HttpServletRequest request) throws Exception{
|
HttpServletRequest request) throws Exception{
|
||||||
JSONArray arr = new JSONArray();
|
JSONArray arr = new JSONArray();
|
||||||
@@ -254,16 +254,21 @@ public class SupplierController {
|
|||||||
List<Supplier> dataList = supplierService.findUserCustomer();
|
List<Supplier> dataList = supplierService.findUserCustomer();
|
||||||
//开始拼接json数据
|
//开始拼接json数据
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("id", 1);
|
outer.put("id", 0);
|
||||||
outer.put("text", "客户列表");
|
outer.put("key", 0);
|
||||||
outer.put("state", "open");
|
outer.put("value", 0);
|
||||||
|
outer.put("title", "客户列表");
|
||||||
|
outer.put("attributes", "客户列表");
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
JSONArray dataArray = new JSONArray();
|
JSONArray dataArray = new JSONArray();
|
||||||
if (null != dataList) {
|
if (null != dataList) {
|
||||||
for (Supplier supplier : dataList) {
|
for (Supplier supplier : dataList) {
|
||||||
JSONObject item = new JSONObject();
|
JSONObject item = new JSONObject();
|
||||||
item.put("id", supplier.getId());
|
item.put("id", supplier.getId());
|
||||||
item.put("text", supplier.getSupplier());
|
item.put("key", supplier.getId());
|
||||||
|
item.put("value", supplier.getId());
|
||||||
|
item.put("title", supplier.getSupplier());
|
||||||
|
item.put("attributes", supplier.getSupplier());
|
||||||
//勾选判断1
|
//勾选判断1
|
||||||
Boolean flag = false;
|
Boolean flag = false;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ public class FunctionService {
|
|||||||
public List<Function> findByIds(String functionsIds)throws Exception{
|
public List<Function> findByIds(String functionsIds)throws Exception{
|
||||||
List<Long> idList = StringUtil.strToLongList(functionsIds);
|
List<Long> idList = StringUtil.strToLongList(functionsIds);
|
||||||
FunctionExample example = new FunctionExample();
|
FunctionExample example = new FunctionExample();
|
||||||
example.createCriteria().andEnabledEqualTo(true).andIdIn(idList)
|
example.createCriteria().andEnabledEqualTo(true).andIdIn(idList).andPushBtnIsNotNull().andPushBtnNotEqualTo("")
|
||||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||||
example.setOrderByClause("Sort asc");
|
example.setOrderByClause("Sort asc");
|
||||||
List<Function> list=null;
|
List<Function> list=null;
|
||||||
|
|||||||
Reference in New Issue
Block a user