Merge branch 'deng' into deng-release
# Conflicts: # src/main/java/com/sipai/controller/equipment/MaintenancePlanController.java
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;
|
||||
@ -866,6 +867,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";
|
||||
|
||||
@ -4152,8 +4152,15 @@ public class MPointController {
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
com.alibaba.fastjson.JSONObject jsonObject2 = new com.alibaba.fastjson.JSONObject();
|
||||
|
||||
//通过es查询bizid
|
||||
MPoint mPoint_es = mPointService.selectById(ids[i]);
|
||||
//通过数据库查询测点(优先通过unitId和测点编码查询)
|
||||
MPoint mPoint_es = mPointService.selectById(unitId, ids[i]);
|
||||
if (mPoint_es == null) {
|
||||
// 尝试通过测点编码查询
|
||||
List<MPoint> mPointList = mPointService.selectListByWhere(unitId, "where mpointcode='" + ids[i] + "'");
|
||||
if (mPointList != null && mPointList.size() > 0) {
|
||||
mPoint_es = mPointList.get(0);
|
||||
}
|
||||
}
|
||||
if (mPoint_es != null) {
|
||||
unitId = mPoint_es.getBizid();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user