Browse Source

opt:异常代码处理

master
zds 3 weeks ago
parent
commit
07f391dcf7
  1. 4
      lms/nladmin-system/src/main/java/org/nl/b_lms/sch/task/controller/TaskController.java
  2. 2
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/userarea/service/dao/mapper/UserAreaPermissionMapper.xml
  3. 16
      lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/hotpoint/service/impl/HotPointIvtServiceImpl.java

4
lms/nladmin-system/src/main/java/org/nl/b_lms/sch/task/controller/TaskController.java

@ -90,7 +90,9 @@ public class TaskController {
@Log("任务操作")
@SaIgnore
public ResponseEntity<Object> update(@RequestBody Map<String, Object> map) {
schBaseTaskService.operation(map);
SchBaseTask task = new SchBaseTask();
task.copyFrom((JSONObject) JSONObject.toJSON(map));
schBaseTaskService.operation(task);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}

2
lms/nladmin-system/src/main/java/org/nl/wms/basedata/st/userarea/service/dao/mapper/UserAreaPermissionMapper.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.nl.wms.basedata.st.areapermissions.service.dao.mapper.UserAreaPermissionMapper">
<mapper namespace="org.nl.wms.basedata.st.userarea.service.dao.mapper.UserAreaPermissionMapper">
<select id="selectPageLeftJoin" resultType="org.nl.wms.basedata.st.userarea.service.vo.UsersVo">
SELECT

16
lms/nladmin-system/src/main/java/org/nl/wms/pdm/ivt/hotpoint/service/impl/HotPointIvtServiceImpl.java

@ -1,16 +1,12 @@
package org.nl.wms.pdm.ivt.hotpoint.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -20,14 +16,12 @@ import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.common.utils.RedisUtils;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.modules.wql.util.WqlUtil;
import org.nl.system.service.param.impl.SysParamServiceImpl;
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack;
import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper;
import org.nl.wms.basedata.st.areapermissions.service.IUserAreaPermissionService;
import org.nl.wms.basedata.st.userarea.service.IUserAreaPermissionService;
import org.nl.wms.ext.mes.service.LmsToMesService;
import org.nl.wms.pdm.ivt.hotpoint.service.HotPointIvtService;
import org.nl.wms.pdm.ivt.hotpoint.service.dao.HotPointIvt;
@ -42,7 +36,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
@ -61,16 +54,15 @@ public class HotPointIvtServiceImpl extends ServiceImpl<HotPointIvtMappper, HotP
@Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
//获取人员对应的区域
String in_area_id = userAreaPermissionService.getInArea();
String area_id = in_area_id.substring(1, in_area_id.length() - 1).replace("'", "");
String[] split = area_id.split(",");
String currentUserId = SecurityUtils.getCurrentUserId();
List<String> in_area_id = userAreaPermissionService.getCurrentUserAreas(currentUserId);
LambdaQueryWrapper<HotPointIvt> wrapper = Wrappers.lambdaQuery(HotPointIvt.class)
.like(ObjectUtil.isNotEmpty(whereJson.get("point_code")), HotPointIvt::getPoint_code, whereJson.get("point_code"))
.eq(ObjectUtil.isNotEmpty(whereJson.get("point_status")), HotPointIvt::getPoint_status, whereJson.get("point_status"))
.eq(ObjectUtil.isNotEmpty(whereJson.get("product_area")), HotPointIvt::getProduct_area, whereJson.get("product_area"))
.eq(ObjectUtil.isNotEmpty(whereJson.get("is_used")), HotPointIvt::getIs_used, whereJson.get("is_used"))
.eq(ObjectUtil.isNotEmpty(whereJson.get("point_location")), HotPointIvt::getPoint_location, whereJson.get("point_location"))
.in(ObjectUtil.isNotEmpty(split), HotPointIvt::getProduct_area, split)
.in(ObjectUtil.isNotEmpty(in_area_id), HotPointIvt::getProduct_area, in_area_id)
.eq(ObjectUtil.isNotEmpty(whereJson.get("begin_time")), HotPointIvt::getInstorage_time, whereJson.get("begin_time"))
.eq(ObjectUtil.isNotEmpty(whereJson.get("end_time")), HotPointIvt::getInstorage_time, whereJson.get("end_time"));

Loading…
Cancel
Save