fix:空木箱入库校验优化
This commit is contained in:
@@ -33,6 +33,13 @@ public class InterfaceLogController {
|
||||
return new ResponseEntity<>(interfaceLogService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/error/{id}")
|
||||
|
||||
// @SaCheckPermission("@el.check()")
|
||||
public ResponseEntity<Object> queryErrorLogs(@PathVariable String id) {
|
||||
return new ResponseEntity<>(interfaceLogService.findByErrDetail(id), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@DeleteMapping(value = "/delLogs")
|
||||
@Log("删除所有接口日志")
|
||||
|
||||
|
||||
@@ -41,5 +41,8 @@ public interface InterfaceLogService {
|
||||
*/
|
||||
void delLogs();
|
||||
|
||||
|
||||
JSONArray logTypeList();
|
||||
|
||||
Object findByErrDetail(String id);
|
||||
}
|
||||
|
||||
@@ -15,15 +15,23 @@
|
||||
*/
|
||||
package org.nl.modules.logging.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.utils.ValidationUtil;
|
||||
import org.nl.modules.logging.InterfaceLogType;
|
||||
import org.nl.modules.logging.service.InterfaceLogService;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.system.service.logging.dao.SysInterfaceLog;
|
||||
import org.nl.system.service.logging.dao.SysLog;
|
||||
import org.nl.system.service.logging.dao.mapper.SysInterfaceLogMapper;
|
||||
import org.nl.system.service.logging.dao.mapper.SysLogMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -39,15 +47,30 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
public class InterfaceLogServiceImpl implements InterfaceLogService {
|
||||
|
||||
@Autowired
|
||||
private SysInterfaceLogMapper interfaceLogMapper;
|
||||
|
||||
@Override
|
||||
public Object findByErrDetail(String id) {
|
||||
SysInterfaceLog sysLog = interfaceLogMapper.selectById(id);
|
||||
if (ObjectUtil.isEmpty(sysLog)) {
|
||||
sysLog = new SysInterfaceLog();
|
||||
}
|
||||
ValidationUtil.isNull(sysLog.getLog_id(), "SysLog", "log_id", id);
|
||||
byte[] details = sysLog.getException_detail();
|
||||
return Dict.create().set("exception", new String(ObjectUtil.isNotNull(details) ? details : "".getBytes()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable pageable) {
|
||||
HashMap map = new HashMap();
|
||||
map.put("flag", "1");
|
||||
map.put("blurry", whereJson.get("blurry"));
|
||||
map.put("logType", whereJson.get("logType"));
|
||||
map.put("begin_time", whereJson.get("begin_time"));
|
||||
map.put("end_time", whereJson.get("end_time"));
|
||||
map.put("log_dtl_info", whereJson.get("log_dtl_info"));
|
||||
map.put("log_type", whereJson.get("log_type"));
|
||||
map.put("method", whereJson.get("method"));
|
||||
JSONObject json = WQL.getWO("QSCH_INTERFACE_LOGS").addParamMap(map).pageQuery(WqlUtil.getHttpContext(pageable), "create_time desc");
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.blurry TYPEAS s_string
|
||||
输入.method TYPEAS s_string
|
||||
输入.log_type TYPEAS s_string
|
||||
输入.log_dtl_info TYPEAS s_string
|
||||
输入.logType TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
@@ -51,11 +54,20 @@
|
||||
WHERE
|
||||
1=1
|
||||
OPTION 输入.blurry <> ""
|
||||
description like "%" 输入.blurry "%"
|
||||
params like "%" 输入.blurry "%"
|
||||
ENDOPTION
|
||||
OPTION 输入.logType <> ""
|
||||
log_type = 输入.logType
|
||||
ENDOPTION
|
||||
OPTION 输入.log_dtl_info <> ""
|
||||
log_dtl_info = 输入.log_dtl_info
|
||||
ENDOPTION
|
||||
OPTION 输入.method <> ""
|
||||
method = 输入.method
|
||||
ENDOPTION
|
||||
OPTION 输入.log_type <> ""
|
||||
log_type = 输入.log_type
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
create_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
Binary file not shown.
@@ -125,5 +125,12 @@ public class ClassstandardController {
|
||||
return new ResponseEntity<>(ClassstandardService.getClassName(), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getCasClass")
|
||||
@Log("获取对应下拉框-多级下拉框")
|
||||
|
||||
public ResponseEntity<Object> getSect(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(ClassstandardService.getCasClass(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -129,4 +129,6 @@ public interface ClassstandardService {
|
||||
* @return
|
||||
*/
|
||||
JSONArray getClassName();
|
||||
|
||||
JSONObject getCasClass(JSONObject jo);
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
||||
//"('1','2','3')"
|
||||
}
|
||||
if (!StrUtil.isEmpty(parent_class_id)) {
|
||||
where = " AND parent_class_id = " + parent_class_id;
|
||||
where += " AND parent_class_id = " + parent_class_id;
|
||||
}
|
||||
|
||||
ja = WQLObject.getWQLObject("MD_PB_ClassStandard").query(where + " order by class_id").getResultJSONArray(0);
|
||||
@@ -528,6 +528,44 @@ public class ClassstandardServiceImpl implements ClassstandardService {
|
||||
return str;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getCasClass(JSONObject whereJson) {
|
||||
/*
|
||||
* 获取人员对应仓库下拉框公共方法 多级下拉框
|
||||
*/
|
||||
JSONArray new_ja = new JSONArray();
|
||||
HashMap<String, String> stor_map = new HashMap<>();
|
||||
stor_map.put("flag", "2");
|
||||
stor_map.put("class_code", whereJson.getString("class_code"));
|
||||
|
||||
JSONArray class_ja = WQL.getWO("QMD_PB_CLASSBASE").addParamMap(stor_map).process().getResultJSONArray(0);
|
||||
for (int i = 0; i < class_ja.size(); i++) {
|
||||
JSONObject class_jo = class_ja.getJSONObject(i);
|
||||
JSONObject class_cas = new JSONObject();
|
||||
class_cas.put("value", class_jo.getString("class_code"));
|
||||
class_cas.put("label", class_jo.getString("class_name"));
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "2");
|
||||
map.put("class_code", class_jo.getString("class_code"));
|
||||
JSONArray ja = WQL.getWO("QMD_PB_CLASSBASE").addParamMap(map).process().getResultJSONArray(0);
|
||||
if (ja.size() > 0) {
|
||||
JSONArray sect_ja = new JSONArray();
|
||||
for (int j = 0; j < ja.size(); j++) {
|
||||
JSONObject sect_jo = ja.getJSONObject(j);
|
||||
JSONObject sect_cas = new JSONObject();
|
||||
sect_cas.put("value", sect_jo.getString("class_code"));
|
||||
sect_cas.put("label", sect_jo.getString("class_name"));
|
||||
sect_ja.add(sect_cas);
|
||||
}
|
||||
class_cas.put("children", sect_ja);
|
||||
}
|
||||
new_ja.add(class_cas);
|
||||
}
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("content", new_ja);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getClassName() {
|
||||
WQLObject wo = WQLObject.getWQLObject("MD_PB_ClassStandard");
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.search TYPEAS s_string
|
||||
输入.class_code TYPEAS class_code
|
||||
输入.classIds TYPEAS f_string
|
||||
|
||||
|
||||
@@ -62,5 +63,19 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
class2.*
|
||||
FROM
|
||||
md_pb_classstandard class
|
||||
left join
|
||||
md_pb_classstandard class2 ON class.class_id = class2.parent_class_id
|
||||
where
|
||||
class.class_code = 输入.class_code
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user