fix: 修复jobList.jsp中companyId变量初始化顺序问题
This commit is contained in:
@ -17,6 +17,7 @@ import io.swagger.annotations.*;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.activiti.engine.RepositoryService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -864,6 +865,9 @@ public class UserController {
|
||||
public String getUsersByIds(HttpServletRequest request, Model model) {
|
||||
String userIds = request.getParameter("userIds");
|
||||
List<User> list = this.userService.selectListByWhere("where id in ('" + userIds.replace(",", "','") + "') order by CHARINDEX(','+ id +',','," + userIds + ",')");
|
||||
if (CollectionUtils.isNotEmpty(list)){
|
||||
list = list.stream().filter(u -> StringUtils.isNotBlank(u.getId())).collect(toList());
|
||||
}
|
||||
JSONArray json = JSONArray.fromObject(list);
|
||||
model.addAttribute("result", json);
|
||||
return "result";
|
||||
|
||||
@ -20,7 +20,10 @@
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var companyId = unitId;
|
||||
var companyId = '';
|
||||
$(function() {
|
||||
companyId = unitId;
|
||||
});
|
||||
var addFun = function () {
|
||||
$.post(ext.contextPath + '/user/addJob.do', {companyId: companyId}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
|
||||
Reference in New Issue
Block a user