增加用户分配功能和用户分配按钮功能

This commit is contained in:
季圣华 2021-04-27 23:33:08 +08:00
parent 1882d8cc3f
commit 62ed476d09
4 changed files with 24 additions and 15 deletions

View File

@ -67,7 +67,7 @@ public class DepotController {
* @param request
* @return
*/
@PostMapping(value = "/findUserDepot")
@GetMapping(value = "/findUserDepot")
public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
HttpServletRequest request) throws Exception{
JSONArray arr = new JSONArray();
@ -75,16 +75,21 @@ public class DepotController {
List<Depot> dataList = depotService.findUserDepot();
//开始拼接json数据
JSONObject outer = new JSONObject();
outer.put("id", 1);
outer.put("text", "仓库列表");
outer.put("state", "open");
outer.put("id", 0);
outer.put("key", 0);
outer.put("value", 0);
outer.put("title", "仓库列表");
outer.put("attributes", "仓库列表");
//存放数据json数组
JSONArray dataArray = new JSONArray();
if (null != dataList) {
for (Depot depot : dataList) {
JSONObject item = new JSONObject();
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
Boolean flag = false;
try {

View File

@ -203,10 +203,9 @@ public class FunctionController {
if (null != dataList) {
for (Function function : dataList) {
JSONObject item = new JSONObject();
item.put("Id", function.getId());
item.put("Name", function.getName());
item.put("PushBtn", function.getPushBtn());
item.put("op", 1);
item.put("id", function.getId());
item.put("name", function.getName());
item.put("pushBtn", function.getPushBtn());
dataArray.add(item);
}
}

View File

@ -246,7 +246,7 @@ public class SupplierController {
* @param request
* @return
*/
@PostMapping(value = "/findUserCustomer")
@GetMapping(value = "/findUserCustomer")
public JSONArray findUserCustomer(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
HttpServletRequest request) throws Exception{
JSONArray arr = new JSONArray();
@ -254,16 +254,21 @@ public class SupplierController {
List<Supplier> dataList = supplierService.findUserCustomer();
//开始拼接json数据
JSONObject outer = new JSONObject();
outer.put("id", 1);
outer.put("text", "客户列表");
outer.put("state", "open");
outer.put("id", 0);
outer.put("key", 0);
outer.put("value", 0);
outer.put("title", "客户列表");
outer.put("attributes", "客户列表");
//存放数据json数组
JSONArray dataArray = new JSONArray();
if (null != dataList) {
for (Supplier supplier : dataList) {
JSONObject item = new JSONObject();
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
Boolean flag = false;
try {

View File

@ -195,7 +195,7 @@ public class FunctionService {
public List<Function> findByIds(String functionsIds)throws Exception{
List<Long> idList = StringUtil.strToLongList(functionsIds);
FunctionExample example = new FunctionExample();
example.createCriteria().andEnabledEqualTo(true).andIdIn(idList)
example.createCriteria().andEnabledEqualTo(true).andIdIn(idList).andPushBtnIsNotNull().andPushBtnNotEqualTo("")
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("Sort asc");
List<Function> list=null;