增加租户的功能

This commit is contained in:
季圣华
2019-03-19 23:11:38 +08:00
parent d845b9dfbe
commit 54bf489723
103 changed files with 23174 additions and 21773 deletions

View File

@@ -420,7 +420,7 @@ public class DepotItemController {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, currentPage, pageSize);
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, (currentPage-1)*pageSize, pageSize);
String[] mpArr = mpList.split(",");
int total = depotItemService.findByAllCount(headIds, materialIds);
map.put("total", total);
@@ -533,7 +533,7 @@ public class DepotItemController {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, currentPage, pageSize);
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, (currentPage-1)*pageSize, pageSize);
String[] mpArr = mpList.split(",");
int total = depotItemService.findByAllCount(headIds, materialIds);
map.put("total", total);
@@ -593,7 +593,7 @@ public class DepotItemController {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, currentPage, pageSize);
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, (currentPage-1)*pageSize, pageSize);
String[] mpArr = mpList.split(",");
int total = depotItemService.findByAllCount(headIds, materialIds);
map.put("total", total);
@@ -659,7 +659,7 @@ public class DepotItemController {
Map<String, Object> map = new HashMap<String, Object>();
String message = "成功";
try {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, currentPage, pageSize);
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(headIds, materialIds, (currentPage-1)*pageSize, pageSize);
//存放数据json数组
Integer pid = projectId;
String[] names = {"名称", "型号", "单位", "单价", "上月结存数量", "入库数量", "出库数量", "本月结存数量", "结存金额"};

View File

@@ -71,4 +71,9 @@ public class RoleController {
}
return arr;
}
@PostMapping(value = "/list")
public List<Role> list(HttpServletRequest request) {
return roleService.getRole();
}
}

View File

@@ -17,11 +17,13 @@ import com.jsh.erp.service.user.UserService;
import com.jsh.erp.utils.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.*;
@@ -36,6 +38,9 @@ import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
public class UserController {
private Logger logger = LoggerFactory.getLogger(ResourceController.class);
@Value("${mybatis-plus.status}")
private String mybatisPlusStatus;
@Resource
private UserService userService;
@@ -91,6 +96,8 @@ public class UserController {
// new Timestamp(System.currentTimeMillis()), (short) 0, "管理用户:" + username + " 登录系统", username + " 登录系统"));
msgTip = "user can login";
request.getSession().setAttribute("user",user);
request.getSession().setAttribute("tenantId",1L); //租户id
request.getSession().setAttribute("mybatisPlusStatus",mybatisPlusStatus); //开启状态
} catch (Exception e) {
logger.error(">>>>>>>>>>>>>>>查询用户名为:" + username + " ,用户信息异常", e);
}