Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -452,6 +452,11 @@
|
|||||||
<artifactId>easyexcel</artifactId>
|
<artifactId>easyexcel</artifactId>
|
||||||
<version>2.2.6</version>
|
<version>2.2.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>8.0.20</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package org.nl.config;
|
||||||
|
|
||||||
|
import com.alibaba.druid.filter.FilterChain;
|
||||||
|
import com.alibaba.druid.filter.FilterEventAdapter;
|
||||||
|
import com.alibaba.druid.proxy.jdbc.JdbcParameter;
|
||||||
|
import com.alibaba.druid.proxy.jdbc.PreparedStatementProxy;
|
||||||
|
import com.alibaba.druid.proxy.jdbc.ResultSetProxy;
|
||||||
|
import com.alibaba.druid.proxy.jdbc.StatementProxy;
|
||||||
|
import com.alibaba.druid.sql.SQLUtils;
|
||||||
|
import com.alibaba.druid.util.JdbcUtils;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.mysql.cj.jdbc.result.ResultSetImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.slf4j.MDC;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author ZZQ
|
||||||
|
* @Date 2023/2/10 11:27 上午
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class DruidFilter extends FilterEventAdapter {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int preparedStatement_executeUpdate(FilterChain chain, PreparedStatementProxy statement) throws SQLException {
|
||||||
|
|
||||||
|
return super.preparedStatement_executeUpdate(chain, statement);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int statement_executeUpdate(FilterChain chain, StatementProxy statement, String sql) throws SQLException {
|
||||||
|
|
||||||
|
return super.statement_executeUpdate(chain, statement, sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void statementExecuteAfter(StatementProxy statement, String sql, boolean result) {
|
||||||
|
String traceId = MDC.get("traceId");
|
||||||
|
int size = statement.getParametersSize();
|
||||||
|
String executeSql = sql;
|
||||||
|
int count = 0;
|
||||||
|
try {
|
||||||
|
count=statement.getUpdateCount();
|
||||||
|
}catch (Exception ex){ }
|
||||||
|
if (StringUtils.isNotEmpty(traceId) && count>0) {
|
||||||
|
if (size > 0) {
|
||||||
|
Collection<JdbcParameter> values = statement.getParameters().values();
|
||||||
|
List<Object> params = new ArrayList<>();
|
||||||
|
for (JdbcParameter value : values) {
|
||||||
|
params.add(value.getValue());
|
||||||
|
}
|
||||||
|
executeSql = SQLUtils.format(executeSql, JdbcUtils.MYSQL, params);
|
||||||
|
}
|
||||||
|
log.info("[----SQL----][update][ SQL: {} ]", executeSql);
|
||||||
|
}
|
||||||
|
super.statementExecuteAfter(statement, sql, result);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public ResultSetProxy statement_getResultSet(FilterChain chain, StatementProxy statement) throws SQLException {
|
||||||
|
ResultSetProxy rs = super.statement_getResultSet(chain, statement);
|
||||||
|
String executeSql = statement.getLastExecuteSql();
|
||||||
|
String traceId = MDC.get("traceId");
|
||||||
|
if (StringUtils.isNotEmpty(traceId)){
|
||||||
|
int result = 0;
|
||||||
|
if (rs != null) {
|
||||||
|
ResultSetImpl rss = rs.getResultSetRaw().unwrap(ResultSetImpl.class);
|
||||||
|
result = rss.getRows().size();
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
int size = statement.getParametersSize();
|
||||||
|
if (size>0){
|
||||||
|
Collection<JdbcParameter> values = statement.getParameters().values();
|
||||||
|
List<Object> params = new ArrayList<>();
|
||||||
|
for (JdbcParameter value : values) {
|
||||||
|
params.add(value.getValue());
|
||||||
|
}
|
||||||
|
executeSql = SQLUtils.format(executeSql, JdbcUtils.MYSQL, params);
|
||||||
|
}
|
||||||
|
}catch (Exception ex){
|
||||||
|
log.warn("[-SQL解析异常-][{}]",ex.getMessage());
|
||||||
|
}
|
||||||
|
log.info("[----SQL----][select][执行结果:{}][ SQL: {} ]",result, executeSql);
|
||||||
|
}
|
||||||
|
return rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -116,21 +116,20 @@ public class LogAspect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch (Exception ex){
|
}catch (Exception ex){
|
||||||
StringBuffer errorInfo = new StringBuffer();
|
StringBuffer errorStack = new StringBuffer();
|
||||||
errorInfo.append(ex.getMessage()).append("\n");
|
String errorMsg = ex.getMessage();
|
||||||
int x = 0;
|
int x = 0;
|
||||||
StackTraceElement[] stackTrace = ex.getStackTrace();
|
StackTraceElement[] stackTrace = ex.getStackTrace();
|
||||||
if (stackTrace!=null && stackTrace.length>0){
|
if (stackTrace!=null && stackTrace.length>0){
|
||||||
errorInfo.append("---堆栈信息:");
|
|
||||||
for (StackTraceElement stack : stackTrace) {
|
for (StackTraceElement stack : stackTrace) {
|
||||||
x++;
|
x++;
|
||||||
errorInfo.append(stack.toString()).append("\n");
|
errorStack.append(stack.toString()).append(" | ");
|
||||||
if (x>10){
|
if (x>10){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.error("[--requestError--][请求接口:{}][请求参数:{}]【异常信息 :{}】", url,params, errorInfo.toString());
|
log.error("[-requestError-][请求接口:{}]【异常信息:{}】[请求参数:{}][异常堆栈:{}]", url,errorMsg,params, errorStack.toString());
|
||||||
Log log = new Log("ERROR", System.currentTimeMillis() - comming);
|
Log log = new Log("ERROR", System.currentTimeMillis() - comming);
|
||||||
log.setExceptionDetail(ThrowableUtil.getStackTrace(ex).getBytes());
|
log.setExceptionDetail(ThrowableUtil.getStackTrace(ex).getBytes());
|
||||||
logService.save(getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request), (ProceedingJoinPoint) joinPoint, log);
|
logService.save(getUsername(), StringUtils.getBrowser(request), StringUtils.getIp(request), (ProceedingJoinPoint) joinPoint, log);
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ public class EsLogController {
|
|||||||
private final EsLogService esLogService;
|
private final EsLogService esLogService;
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/labels")
|
@GetMapping("/labels/{type}")
|
||||||
@ApiOperation("获取标签")
|
@ApiOperation("获取标签")
|
||||||
public ResponseEntity<Object> labelsValues() {
|
public ResponseEntity<Object> labelsValues(@PathVariable String type) {
|
||||||
return new ResponseEntity<>(esLogService.getLabelsValues(), HttpStatus.OK);
|
return new ResponseEntity<>(esLogService.getLabelsValues(type), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/query")
|
@PostMapping("/query")
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public interface EsLogService {
|
|||||||
* 获取labels和values树
|
* 获取labels和values树
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONArray getLabelsValues();
|
JSONArray getLabelsValues(String type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志查询
|
* 日志查询
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ public class LogQuery {
|
|||||||
* 日志级别
|
* 日志级别
|
||||||
*/
|
*/
|
||||||
private String logLevel;
|
private String logLevel;
|
||||||
|
/**
|
||||||
|
* 系统标签
|
||||||
|
*/
|
||||||
|
private String system;
|
||||||
/**
|
/**
|
||||||
* 是否只查询Http相关请求
|
* 是否只查询Http相关请求
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.elasticsearch.action.search.SearchResponse;
|
||||||
import org.elasticsearch.index.query.BoolQueryBuilder;
|
import org.elasticsearch.index.query.BoolQueryBuilder;
|
||||||
import org.elasticsearch.index.query.QueryBuilders;
|
import org.elasticsearch.index.query.QueryBuilders;
|
||||||
import org.elasticsearch.script.Script;
|
import org.elasticsearch.script.Script;
|
||||||
|
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
||||||
|
import org.elasticsearch.search.aggregations.Aggregations;
|
||||||
|
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
import org.nl.common.enums.LevelEnum;
|
import org.nl.common.enums.LevelEnum;
|
||||||
import org.nl.modules.logging.repository.EsLogRepository;
|
import org.nl.modules.logging.repository.EsLogRepository;
|
||||||
@@ -21,12 +25,19 @@ import org.nl.wms.ext.acs.service.impl.AcsToWmsServiceImpl;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
|
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
|
||||||
import org.springframework.data.elasticsearch.core.aggregation.impl.AggregatedPageImpl;
|
import org.springframework.data.elasticsearch.core.aggregation.impl.AggregatedPageImpl;
|
||||||
|
import org.springframework.data.elasticsearch.core.query.FetchSourceFilter;
|
||||||
|
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ldjun
|
* @author ldjun
|
||||||
@@ -40,6 +51,8 @@ public class EsLogServiceImpl implements EsLogService {
|
|||||||
|
|
||||||
private final EsLogRepository esLogRepository;
|
private final EsLogRepository esLogRepository;
|
||||||
|
|
||||||
|
private final ElasticsearchRestTemplate elasticsearchRestTemplate;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page query(LogQuery logQuery){
|
public Page query(LogQuery logQuery){
|
||||||
Page<T> page = new Page<>();
|
Page<T> page = new Page<>();
|
||||||
@@ -60,6 +73,9 @@ public class EsLogServiceImpl implements EsLogService {
|
|||||||
if (StringUtils.isNotEmpty(logQuery.getLogLevel())){
|
if (StringUtils.isNotEmpty(logQuery.getLogLevel())){
|
||||||
query.must().add(QueryBuilders.matchQuery("logLevel", LevelEnum.checkLevel(logQuery.getLogLevel())));
|
query.must().add(QueryBuilders.matchQuery("logLevel", LevelEnum.checkLevel(logQuery.getLogLevel())));
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotEmpty(logQuery.getSystem())){
|
||||||
|
query.must().add(QueryBuilders.matchQuery("system", logQuery.getSystem()));
|
||||||
|
}
|
||||||
if (logQuery.getIsRequest()){
|
if (logQuery.getIsRequest()){
|
||||||
query.must().add(QueryBuilders.existsQuery("requestMethod"));
|
query.must().add(QueryBuilders.existsQuery("requestMethod"));
|
||||||
}
|
}
|
||||||
@@ -86,13 +102,23 @@ public class EsLogServiceImpl implements EsLogService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getLabelsValues() {
|
public JSONArray getLabelsValues(String type) {
|
||||||
JSONArray result = new JSONArray();
|
JSONArray result = new JSONArray();
|
||||||
for (LevelEnum value : LevelEnum.values()) {
|
FetchSourceFilter fetchSourceFilter = new FetchSourceFilter(new String[]{type}, null);
|
||||||
JSONObject level = new JSONObject();
|
NativeSearchQueryBuilder queryBuilder = new NativeSearchQueryBuilder();
|
||||||
level.put("label", value.name());
|
queryBuilder.withCollapseField(type+".keyword");
|
||||||
level.put("value", value.name());
|
queryBuilder.withSourceFilter(fetchSourceFilter);
|
||||||
result.add(level);
|
queryBuilder.addAggregation(AggregationBuilders.terms(type).field(type+".keyword").size(100));
|
||||||
|
Aggregations agg = elasticsearchRestTemplate.query(queryBuilder.build(), SearchResponse::getAggregations);
|
||||||
|
Terms terms = agg.get(type);
|
||||||
|
List<? extends Terms.Bucket> buckets = terms.getBuckets();
|
||||||
|
if (!CollectionUtils.isEmpty(buckets)){
|
||||||
|
buckets.stream().map(Terms.Bucket::getKeyAsString).forEach(v-> {
|
||||||
|
JSONObject item = new JSONObject();
|
||||||
|
item.put("label", v);
|
||||||
|
item.put("value", v);
|
||||||
|
result.add(item);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -465,6 +465,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
// 锁住点位
|
// 锁住点位
|
||||||
JSONObject jsonPoint = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0);
|
JSONObject jsonPoint = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + point_code + "'").uniqueResult(0);
|
||||||
jsonPoint.put("lock_type", "99");
|
jsonPoint.put("lock_type", "99");
|
||||||
|
jsonPoint.put("vehicle_code", vehicle_code);
|
||||||
WQLObject.getWQLObject("sch_base_point").update(jsonPoint);
|
WQLObject.getWQLObject("sch_base_point").update(jsonPoint);
|
||||||
}
|
}
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
|
|||||||
@@ -104,6 +104,14 @@ public class MesToLmsController {
|
|||||||
return new ResponseEntity<>(mesToLmsService.childRollInfoUpdate(jo), HttpStatus.OK);
|
return new ResponseEntity<>(mesToLmsService.childRollInfoUpdate(jo), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/cutPlanTransferCancel")
|
||||||
|
@Log("分切计划取消")
|
||||||
|
@ApiOperation("分切计划取消")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> cutPlanTransferCancel(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(mesToLmsService.cutPlanTransferCancel(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,4 +53,9 @@ public interface MesToLmsService {
|
|||||||
* 子卷信息更新:计划外需求有可能入库完成后,ERP才回传计划外需求SalesOrder
|
* 子卷信息更新:计划外需求有可能入库完成后,ERP才回传计划外需求SalesOrder
|
||||||
*/
|
*/
|
||||||
JSONObject childRollInfoUpdate(JSONObject param);
|
JSONObject childRollInfoUpdate(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分切计划取消
|
||||||
|
*/
|
||||||
|
JSONObject cutPlanTransferCancel(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1073,4 +1073,47 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
|||||||
log.info("childRollInfoUpdate接口输出参数为:-------------------" + result.toString());
|
log.info("childRollInfoUpdate接口输出参数为:-------------------" + result.toString());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public JSONObject cutPlanTransferCancel(JSONObject param){
|
||||||
|
log.info("cutPlanTransferCancel接口输入参数为:-------------------" + param.toString());
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
try {
|
||||||
|
String ContainerName = param.getString("ContainerName");
|
||||||
|
String CancelledDate = param.getString("CancelledDate");
|
||||||
|
|
||||||
|
if(StrUtil.isEmpty(ContainerName)){
|
||||||
|
throw new BadRequestException("子卷号不能为空!");
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject plan_jo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan").query("container_name = '"+ContainerName+"'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(plan_jo)){
|
||||||
|
throw new BadRequestException("系统中不存在子卷号为:"+ContainerName+"的分切计划!");
|
||||||
|
}
|
||||||
|
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
|
||||||
|
plan_jo.put("is_delete","1");
|
||||||
|
plan_jo.put("update_optid", currentUserId);
|
||||||
|
plan_jo.put("update_optname", nickName);
|
||||||
|
plan_jo.put("update_time", DateUtil.now());
|
||||||
|
result.put("RTYPE", "S");
|
||||||
|
result.put("RTMSG", "操作成功!");
|
||||||
|
result.put("RTOAL", 1);
|
||||||
|
result.put("RTDAT", null);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
result.put("RTYPE", "E");
|
||||||
|
result.put("RTMSG", "操作失败!," + e.getMessage());
|
||||||
|
result.put("RTOAL", 0);
|
||||||
|
result.put("RTDAT", null);
|
||||||
|
System.out.println(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("childRollInfoUpdate接口输出参数为:-------------------" + result.toString());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
hotParam.put("qty_unit_id", jsonMater.getString("base_unit_id"));
|
hotParam.put("qty_unit_id", jsonMater.getString("base_unit_id"));
|
||||||
hotParam.put("task_id", task_id);
|
hotParam.put("task_id", task_id);
|
||||||
hotParam.put("start_point_code", point_code1);
|
hotParam.put("start_point_code", point_code1);
|
||||||
hotParam.put("next_point_code", jsonHotIvt.getString("point_code"));
|
hotParam.put("end_point_code", jsonHotIvt.getString("point_code"));
|
||||||
hotParam.put("temperature", temperature);
|
hotParam.put("temperature", temperature);
|
||||||
hotParam.put("oven_time", hours);
|
hotParam.put("oven_time", hours);
|
||||||
this.createHotIoMst(hotParam);
|
this.createHotIoMst(hotParam);
|
||||||
@@ -160,7 +160,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
|
|
||||||
JSONObject point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
JSONObject point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(point_code2_jo)){
|
if (ObjectUtil.isEmpty(point_code2_jo)){
|
||||||
throw new BadRequestException("未查询到符合的对接位!");
|
throw new BadRequestException("未查询到可用的点位类型为入箱的烘箱对接位!");
|
||||||
}
|
}
|
||||||
String point_code2 = point_code2_jo.getString("point_code");
|
String point_code2 = point_code2_jo.getString("point_code");
|
||||||
/*if (ObjectUtil.isEmpty(pointArr)) {
|
/*if (ObjectUtil.isEmpty(pointArr)) {
|
||||||
@@ -178,7 +178,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
jsonMap.put("max_temperature", NumberUtil.add(temperature, temperature_lose));
|
jsonMap.put("max_temperature", NumberUtil.add(temperature, temperature_lose));
|
||||||
jsonMap.put("point_location", map.getString("point_location"));
|
jsonMap.put("point_location", map.getString("point_location"));
|
||||||
JSONObject jsonHotIvt = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().uniqueResult(0);
|
JSONObject jsonHotIvt = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonHotIvt)) throw new BadRequestException("烘烤区没有合适温度的空位");
|
if (ObjectUtil.isEmpty(jsonHotIvt)) throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||||
|
|
||||||
// 3.创建冷却区 --> 烘烤区任务
|
// 3.创建冷却区 --> 烘烤区任务
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
@@ -197,7 +197,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
// 4.插入烘箱区出入主表
|
// 4.插入烘箱区出入主表
|
||||||
JSONObject jsonRaw = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonRaw = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0);
|
||||||
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("物料不存在");
|
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("物料基础信息中无此物料!");
|
||||||
|
|
||||||
JSONObject hotParam = new JSONObject();
|
JSONObject hotParam = new JSONObject();
|
||||||
hotParam.put("container_name", container_name);
|
hotParam.put("container_name", container_name);
|
||||||
@@ -247,7 +247,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
String point_code1 = whereJson.getString("point_code");
|
String point_code1 = whereJson.getString("point_code");
|
||||||
if (ObjectUtil.isEmpty(point_code1)) throw new BadRequestException("点位不能为空");
|
if (ObjectUtil.isEmpty(point_code1)) throw new BadRequestException("点位不能为空");
|
||||||
JSONObject jsonHotIvt = hosIvtTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
JSONObject jsonHotIvt = hosIvtTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonHotIvt)) throw new BadRequestException("对应烘箱点位不存在");
|
if (ObjectUtil.isEmpty(jsonHotIvt)) throw new BadRequestException("烘烤区域无此点位!");
|
||||||
|
|
||||||
//查询该点位是否存在未完成的任务
|
//查询该点位是否存在未完成的任务
|
||||||
boolean have_task = new CutConveyorTask().isSingleTask(point_code1);
|
boolean have_task = new CutConveyorTask().isSingleTask(point_code1);
|
||||||
@@ -282,7 +282,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
map.put("point_type", "5");
|
map.put("point_type", "5");
|
||||||
|
|
||||||
JSONArray pointArr = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().getResultJSONArray(0);
|
JSONArray pointArr = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().getResultJSONArray(0);
|
||||||
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有可用的出箱暂存位");
|
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有可用的点位类型为出箱的烘箱对接位!");
|
||||||
|
|
||||||
// 2.判断暂存位是否有任务:找到无任务的暂存位
|
// 2.判断暂存位是否有任务:找到无任务的暂存位
|
||||||
String point_code2 = "";
|
String point_code2 = "";
|
||||||
@@ -299,7 +299,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(point_code2)) throw new BadRequestException("没有可用的出箱暂存位");
|
if (ObjectUtil.isEmpty(point_code2)) throw new BadRequestException("没有可用的点位类型为出箱的烘箱对接位!");
|
||||||
// 3.创建任务
|
// 3.创建任务
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("point_code1", point_code1);
|
param.put("point_code1", point_code1);
|
||||||
@@ -348,7 +348,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
|
|
||||||
// 1.获取此暂存位的生产区域和上下位置
|
// 1.获取此暂存位的生产区域和上下位置
|
||||||
JSONObject jsonPoint = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
JSONObject jsonPoint = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("点位不存在");
|
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("冷却区内此点位不存在!");
|
||||||
|
|
||||||
// 2.找冷却区空货位
|
// 2.找冷却区空货位
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
@@ -392,7 +392,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
|
|
||||||
JSONObject jsonRaw = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonRaw = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0);
|
||||||
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("物料不存在");
|
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("物料基础信息中无此物料!");
|
||||||
|
|
||||||
JSONObject jsonCool = new JSONObject();
|
JSONObject jsonCool = new JSONObject();
|
||||||
jsonCool.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
|
jsonCool.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
|||||||
|
|
||||||
JSONObject jsonRaw = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonRaw = rawTab.query("container_name = '" + container_name + "' and is_delete = '0'").uniqueResult(0);
|
||||||
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
JSONObject jsonMater = materTab.query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("物料不存在");
|
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("物料基础信息中无此物料");
|
||||||
|
|
||||||
if (StrUtil.equals(option, "1")) {
|
if (StrUtil.equals(option, "1")) {
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ public class HandleBakingServiceImpl implements HandleBakingService {
|
|||||||
} else if (StrUtil.equals(option, "2")) {
|
} else if (StrUtil.equals(option, "2")) {
|
||||||
JSONObject cool_ivt = WQLObject.getWQLObject("st_ivt_hotpointivt").query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
JSONObject cool_ivt = WQLObject.getWQLObject("st_ivt_hotpointivt").query("point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||||
if(ObjectUtil.isEmpty(cool_ivt)){
|
if(ObjectUtil.isEmpty(cool_ivt)){
|
||||||
throw new BadRequestException("请扫描正确的冷却区满轴点位!");
|
throw new BadRequestException("请扫描正确的烘烤区点位!");
|
||||||
}
|
}
|
||||||
String on_container_name = cool_ivt.getString("container_name");
|
String on_container_name = cool_ivt.getString("container_name");
|
||||||
if (!on_container_name.equals(container_name)) {
|
if (!on_container_name.equals(container_name)) {
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
AND
|
AND
|
||||||
is_child_ps_ok = 0
|
is_child_ps_ok = 0
|
||||||
AND
|
AND
|
||||||
is_delete = '0'
|
plan.is_delete = '0'
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -185,6 +185,8 @@
|
|||||||
is_child_tz_ok = 1
|
is_child_tz_ok = 1
|
||||||
AND
|
AND
|
||||||
is_child_ps_ok = 1
|
is_child_ps_ok = 1
|
||||||
|
AND
|
||||||
|
plan.is_delete = '0'
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -213,7 +215,7 @@
|
|||||||
AND
|
AND
|
||||||
is_child_ps_ok = 0
|
is_child_ps_ok = 0
|
||||||
AND
|
AND
|
||||||
is_delete = '0'
|
plan.is_delete = '0'
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -263,6 +265,8 @@
|
|||||||
plan.is_child_ps_ok = '1'
|
plan.is_child_ps_ok = '1'
|
||||||
AND
|
AND
|
||||||
plan.status = '03'
|
plan.status = '03'
|
||||||
|
AND
|
||||||
|
plan.is_delete = '0'
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
del.product_area = 输入.product_area
|
del.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -355,7 +359,7 @@
|
|||||||
AND
|
AND
|
||||||
is_parent_ok = 0
|
is_parent_ok = 0
|
||||||
AND
|
AND
|
||||||
is_delete = '0'
|
plan.is_delete = '0'
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
ivt.product_area = 输入.product_area
|
ivt.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -403,6 +407,7 @@
|
|||||||
task.task_type = '010402'
|
task.task_type = '010402'
|
||||||
AND IFNULL( plan.qzzno, '' ) <> ''
|
AND IFNULL( plan.qzzno, '' ) <> ''
|
||||||
AND task.is_delete = '0'
|
AND task.is_delete = '0'
|
||||||
|
AND plan.is_delete = '0'
|
||||||
AND task.task_status < '07'
|
AND task.task_status < '07'
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
cut.product_area = 输入.product_area
|
cut.product_area = 输入.product_area
|
||||||
@@ -421,6 +426,8 @@
|
|||||||
LEFT JOIN st_ivt_cutpointivt cut ON cut.ext_code = plan.resource_name
|
LEFT JOIN st_ivt_cutpointivt cut ON cut.ext_code = plan.resource_name
|
||||||
WHERE
|
WHERE
|
||||||
ivt.point_status = '03'
|
ivt.point_status = '03'
|
||||||
|
AND
|
||||||
|
plan.is_delete = '0'
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
cut.product_area = 输入.product_area
|
cut.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -437,6 +444,8 @@
|
|||||||
LEFT JOIN st_ivt_cutpointivt cut ON cut.ext_code = plan.resource_name
|
LEFT JOIN st_ivt_cutpointivt cut ON cut.ext_code = plan.resource_name
|
||||||
WHERE
|
WHERE
|
||||||
plan.qzzno = 输入.qzzno
|
plan.qzzno = 输入.qzzno
|
||||||
|
AND
|
||||||
|
plan.is_delete = '0'
|
||||||
OPTION 输入.product_area <> ""
|
OPTION 输入.product_area <> ""
|
||||||
cut.product_area = 输入.product_area
|
cut.product_area = 输入.product_area
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -464,6 +473,7 @@
|
|||||||
WHERE
|
WHERE
|
||||||
ivt.point_status = '03'
|
ivt.point_status = '03'
|
||||||
AND plan.`status` = '03'
|
AND plan.`status` = '03'
|
||||||
|
AND plan.is_delete = '0'
|
||||||
AND plan.resource_name = 输入.resource_name
|
AND plan.resource_name = 输入.resource_name
|
||||||
ORDER BY
|
ORDER BY
|
||||||
plan.manufacture_sort,
|
plan.manufacture_sort,
|
||||||
@@ -503,6 +513,8 @@
|
|||||||
is_child_ps_ok = '1'
|
is_child_ps_ok = '1'
|
||||||
AND
|
AND
|
||||||
`status` = '03'
|
`status` = '03'
|
||||||
|
AND
|
||||||
|
plan.is_delete = '0'
|
||||||
AND
|
AND
|
||||||
del.point_status = '03'
|
del.point_status = '03'
|
||||||
OPTION 输入.ext_code <> ""
|
OPTION 输入.ext_code <> ""
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class CoolInServiceImpl implements CoolInService {
|
|||||||
|
|
||||||
// 查询终点在冷却区是否存在
|
// 查询终点在冷却区是否存在
|
||||||
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + point_code + "' and full_point_status = '01' and empty_point_status = '01' and is_used = '1'").uniqueResult(0);
|
JSONObject jsonCoolIvt = coolIvtTab.query("full_point_code = '" + point_code + "' and full_point_status = '01' and empty_point_status = '01' and is_used = '1'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("此点位不存在或被占用"+point_code);
|
if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("冷却区不存在该满轴点位或空轴、满轴点位上有货!");
|
||||||
|
|
||||||
//查询该点位是否存在任务
|
//查询该点位是否存在任务
|
||||||
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 like '%"+jsonCoolIvt.getString("point_code")+"%' OR point_code2 like '%"+jsonCoolIvt.getString("point_code")+"%') AND is_delete = '0' AND task_status < '07'").uniqueResult(0);
|
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("(point_code1 like '%"+jsonCoolIvt.getString("point_code")+"%' OR point_code2 like '%"+jsonCoolIvt.getString("point_code")+"%') AND is_delete = '0' AND task_status < '07'").uniqueResult(0);
|
||||||
@@ -93,7 +93,7 @@ public class CoolInServiceImpl implements CoolInService {
|
|||||||
coolIvtTab.insert(jsonCool);*/
|
coolIvtTab.insert(jsonCool);*/
|
||||||
// 校验母卷号是否已存在
|
// 校验母卷号是否已存在
|
||||||
JSONObject json = coolIvtTab.query("container_name = '" + raw_jo.getString("container_name") + "'").uniqueResult(0);
|
JSONObject json = coolIvtTab.query("container_name = '" + raw_jo.getString("container_name") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(json)) throw new BadRequestException("此母卷库存已存在");
|
if (ObjectUtil.isNotEmpty(json)) throw new BadRequestException("冷却区中此母卷库存已存在");
|
||||||
|
|
||||||
//查询对应母卷信息
|
//查询对应母卷信息
|
||||||
JSONObject mom_jo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder").query("container_name = '"+raw_jo.getString("container_name")+"'").uniqueResult(0);
|
JSONObject mom_jo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder").query("container_name = '"+raw_jo.getString("container_name")+"'").uniqueResult(0);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||||
@@ -55,6 +56,7 @@ public class PdaCheckServiceImpl implements PdaCheckService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject checkQueryDtl(JSONObject whereJson) {
|
public JSONObject checkQueryDtl(JSONObject whereJson) {
|
||||||
|
|
||||||
String box_no = whereJson.getString("box_no");
|
String box_no = whereJson.getString("box_no");
|
||||||
|
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
@@ -64,8 +66,16 @@ public class PdaCheckServiceImpl implements PdaCheckService {
|
|||||||
|
|
||||||
JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0);
|
JSONArray resultJSONArray = WQL.getWO("PDA_CHECK").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
// 已盘点数: 不等于生成状态
|
||||||
|
JSONArray unCheckNumArr = WQLObject.getWQLObject("ST_IVT_CheckDtl").query("check_code = '" + whereJson.getString("check_code") + "' and status <> '1'").getResultJSONArray(0);
|
||||||
|
|
||||||
|
// 未盘点数:等于生成状态
|
||||||
|
JSONArray checkNumArr = WQLObject.getWQLObject("ST_IVT_CheckDtl").query("check_code = '" + whereJson.getString("check_code") + "' and status = '1'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", resultJSONArray);
|
jo.put("data", resultJSONArray);
|
||||||
|
jo.put("check_num", unCheckNumArr.size());
|
||||||
|
jo.put("uncheck_num", checkNumArr.size());
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,12 +129,14 @@
|
|||||||
dtl.check_optname,
|
dtl.check_optname,
|
||||||
dtl.check_time,
|
dtl.check_time,
|
||||||
dtl.remark,
|
dtl.remark,
|
||||||
|
sub.quanlity_in_box,
|
||||||
|
|
||||||
dtl.check_id,
|
dtl.check_id,
|
||||||
dtl.checkdtl_id
|
dtl.checkdtl_id
|
||||||
FROM
|
FROM
|
||||||
ST_IVT_CheckDtl dtl
|
ST_IVT_CheckDtl dtl
|
||||||
LEFT JOIN md_me_materialbase mater ON dtl.material_id = mater.material_id
|
LEFT JOIN md_me_materialbase mater ON dtl.material_id = mater.material_id
|
||||||
|
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_sn = dtl.storagevehicle_code
|
||||||
WHERE
|
WHERE
|
||||||
dtl.status = '1'
|
dtl.status = '1'
|
||||||
|
|
||||||
|
|||||||
@@ -58,31 +58,14 @@
|
|||||||
WHEN '06' THEN '执行中'
|
WHEN '06' THEN '执行中'
|
||||||
END
|
END
|
||||||
) AS task_status,
|
) AS task_status,
|
||||||
(
|
class.class_name AS task_type,
|
||||||
CASE task_type
|
|
||||||
WHEN '010101' THEN '标准任务'
|
|
||||||
WHEN '010102' THEN '取满(生箔->冷却)'
|
|
||||||
WHEN '010103' THEN '取空(冷却->生箔)'
|
|
||||||
WHEN '010201' THEN '冷却->烘箱'
|
|
||||||
WHEN '010202' THEN '烘箱->暂存位'
|
|
||||||
WHEN '010203' THEN '暂存位->烘箱'
|
|
||||||
WHEN '010204' THEN '暂存位->冷却'
|
|
||||||
WHEN '010301' THEN '标准任务'
|
|
||||||
WHEN '010302' THEN '取满(冷却->分切)'
|
|
||||||
WHEN '010303' THEN '取空(分切->冷却)'
|
|
||||||
WHEN '010401' THEN '输送出'
|
|
||||||
WHEN '010402' THEN '输送入'
|
|
||||||
WHEN '010403' THEN '桁架标准任务'
|
|
||||||
WHEN '010404' THEN '分切>输送线'
|
|
||||||
WHEN '010405' THEN '输送线>分切'
|
|
||||||
END
|
|
||||||
) AS task_type,
|
|
||||||
car_no,
|
car_no,
|
||||||
create_time,
|
create_time,
|
||||||
vehicle_code2,
|
vehicle_code2,
|
||||||
material_code
|
material_code
|
||||||
FROM
|
FROM
|
||||||
SCH_BASE_Task
|
SCH_BASE_Task task
|
||||||
|
LEFT JOIN md_pb_classstandard class ON class.class_code = task.task_type
|
||||||
WHERE
|
WHERE
|
||||||
is_delete = '0'
|
is_delete = '0'
|
||||||
AND task_status <> '07'
|
AND task_status <> '07'
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import org.nl.modules.common.exception.BadRequestException;
|
|||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.system.service.user.ISysUserService;
|
||||||
|
import org.nl.system.service.user.dao.SysUser;
|
||||||
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
||||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -31,6 +33,8 @@ public class InbillServiceImpl {
|
|||||||
|
|
||||||
private final StorPublicService storPublicService;
|
private final StorPublicService storPublicService;
|
||||||
|
|
||||||
|
private final ISysUserService iSysUserService;
|
||||||
|
|
||||||
public void operatePoint(String operate, JSONObject form) {
|
public void operatePoint(String operate, JSONObject form) {
|
||||||
WQLObject point_table = WQLObject.getWQLObject("SCH_BASE_Point");
|
WQLObject point_table = WQLObject.getWQLObject("SCH_BASE_Point");
|
||||||
WQLObject struct_table = WQLObject.getWQLObject("ST_IVT_StructAttr");
|
WQLObject struct_table = WQLObject.getWQLObject("ST_IVT_StructAttr");
|
||||||
@@ -191,7 +195,8 @@ public class InbillServiceImpl {
|
|||||||
// 调用接口回传
|
// 调用接口回传
|
||||||
JSONObject paramMesMst = new JSONObject();
|
JSONObject paramMesMst = new JSONObject();
|
||||||
paramMesMst.put("PackageBoxSN",box_row.getString("box_no"));
|
paramMesMst.put("PackageBoxSN",box_row.getString("box_no"));
|
||||||
paramMesMst.put("User",box_row.getString("confirm_optname"));
|
SysUser sysUser = iSysUserService.getById(box_row.getString("confirm_optid"));
|
||||||
|
paramMesMst.put("User",sysUser.getUsername());
|
||||||
// new LmsToMesServiceImpl().childRollFGInboundComplete(paramMesMst);
|
// new LmsToMesServiceImpl().childRollFGInboundComplete(paramMesMst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,13 @@ public class CheckController {
|
|||||||
checkService.insertDtl(whereJson);
|
checkService.insertDtl(whereJson);
|
||||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/allInsert")
|
||||||
|
@Log("新增全部在库木箱")
|
||||||
|
@ApiOperation("新增全部在库木箱")
|
||||||
|
public ResponseEntity<Object> allInsert(@RequestBody JSONObject whereJson){
|
||||||
|
checkService.allInsert(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
@GetMapping("/getStructIvt")
|
@GetMapping("/getStructIvt")
|
||||||
@Log("查询可盘点库存")
|
@Log("查询可盘点库存")
|
||||||
@ApiOperation("查询可盘点库存")
|
@ApiOperation("查询可盘点库存")
|
||||||
|
|||||||
@@ -114,4 +114,9 @@ public interface CheckService {
|
|||||||
* 处理确认
|
* 处理确认
|
||||||
*/
|
*/
|
||||||
void disposeConfirm(JSONObject whereJson);
|
void disposeConfirm(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增全部在库木箱
|
||||||
|
*/
|
||||||
|
void allInsert(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.common.utils.FileUtil;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
@@ -215,11 +216,26 @@ public class CheckServiceImpl implements CheckService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray getOutBillDtl(Map whereJson) {
|
public JSONArray getOutBillDtl(Map whereJson) {
|
||||||
|
String type = MapUtil.getStr(whereJson, "type");
|
||||||
|
|
||||||
|
JSONArray jo = new JSONArray();
|
||||||
|
if (ObjectUtil.isNotEmpty(type)) {
|
||||||
|
if (StrUtil.equals(type, "1")){
|
||||||
|
// 1-已盘点
|
||||||
|
whereJson.put("flag", "22");
|
||||||
|
jo = WQL.getWO("QST_IVT_CHECK").addParamMap((HashMap) whereJson).process().getResultJSONArray(0);
|
||||||
|
} else {
|
||||||
|
// 1-未盘点
|
||||||
|
whereJson.put("flag", "222");
|
||||||
|
jo = WQL.getWO("QST_IVT_CHECK").addParamMap((HashMap) whereJson).process().getResultJSONArray(0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
whereJson.put("flag", "2");
|
whereJson.put("flag", "2");
|
||||||
JSONArray jo = WQL.getWO("QST_IVT_CHECK")
|
jo = WQL.getWO("QST_IVT_CHECK")
|
||||||
.addParamMap((HashMap) whereJson)
|
.addParamMap((HashMap) whereJson)
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
|
}
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -666,51 +682,30 @@ public class CheckServiceImpl implements CheckService {
|
|||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
JSONObject jo = rows.getJSONObject(i);
|
JSONObject jo = rows.getJSONObject(i);
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("盘点单号", jo.getString("check_code"));
|
|
||||||
map.put("明细序号", jo.getString("seq_no"));
|
|
||||||
map.put("库区编码", jo.getString("sect_code"));
|
|
||||||
map.put("库区名称", jo.getString("sect_name"));
|
|
||||||
map.put("货位编码", jo.getString("struct_code"));
|
|
||||||
map.put("货位名称", jo.getString("struct_name"));
|
|
||||||
map.put("载具号", jo.getString("storagevehicle_code"));
|
|
||||||
map.put("物料编码", jo.getString("material_code"));
|
|
||||||
map.put("物料名称", jo.getString("material_name"));
|
|
||||||
map.put("桶数", jo.getString("base_qty"));
|
|
||||||
map.put("盘点桶数", jo.getString("fac_qty"));
|
|
||||||
map.put("单位", jo.getString("qty_unit_name"));
|
|
||||||
String check_result = jo.getString("check_result");
|
|
||||||
if (check_result.equals("0")) {
|
|
||||||
map.put("盘点结果", "正常");
|
|
||||||
} else if (check_result.equals("1")) {
|
|
||||||
map.put("盘点结果", "盘亏");
|
|
||||||
} else if (check_result.equals("2")) {
|
|
||||||
map.put("盘点结果", "盘盈");
|
|
||||||
}
|
|
||||||
String status = jo.getString("status");
|
String status = jo.getString("status");
|
||||||
if (status.equals("01")) {
|
if (StrUtil.equals(status, "1")) {
|
||||||
map.put("状态", "生成");
|
map.put("状态", "生成");
|
||||||
} else if (status.equals("04")) {
|
} else if (StrUtil.equals(status, "2")) {
|
||||||
map.put("状态", "盘点中");
|
map.put("状态", "盘点中");
|
||||||
} else if (status.equals("05")) {
|
} else if (StrUtil.equals(status, "3")) {
|
||||||
map.put("状态", "已盘点");
|
map.put("状态", "已盘点");
|
||||||
} else if (status.equals("06")) {
|
} else if (StrUtil.equals(status, "4")) {
|
||||||
map.put("状态", "异常处理中");
|
map.put("状态", "异常处理中");
|
||||||
} else if (status.equals("07")) {
|
} else if (StrUtil.equals(status, "5")) {
|
||||||
map.put("状态", "异常处理完成");
|
map.put("状态", "异常处理完成");
|
||||||
} else if (status.equals("99")) {
|
} else if (StrUtil.equals(status, "99")) {
|
||||||
map.put("状态", "确认完成");
|
map.put("状态", "确认完成");
|
||||||
}
|
}
|
||||||
map.put("异常处理人", jo.getString("process_optname"));
|
map.put("盘点库区", jo.getString("sect_name"));
|
||||||
map.put("异常处理时间", jo.getString("process_time"));
|
map.put("盘点货位", jo.getString("struct_name"));
|
||||||
String process_type = jo.getString("process_type");
|
map.put("箱号", jo.getString("storagevehicle_code"));
|
||||||
if (process_type.equals("0")) {
|
map.put("净重", jo.getString("base_qty"));
|
||||||
map.put("异常处理方式", "账务为准");
|
map.put("物料编码", jo.getString("material_code"));
|
||||||
} else if (process_type.equals("1")) {
|
map.put("物料名称", jo.getString("material_name"));
|
||||||
map.put("异常处理方式", "实物为准");
|
map.put("备注", jo.getString("remark"));
|
||||||
}
|
|
||||||
list.add(map);
|
list.add(map);
|
||||||
}
|
}
|
||||||
//FileUtil.downloadExcel(list, response);
|
FileUtil.downloadExcel(list, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -757,5 +752,60 @@ public class CheckServiceImpl implements CheckService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void allInsert(JSONObject jsonObject) {
|
||||||
|
WQLObject mstTab = WQLObject.getWQLObject("ST_IVT_CheckMst"); // 盘点单主表
|
||||||
|
WQLObject dtlTab = WQLObject.getWQLObject("ST_IVT_CheckDtl"); // 盘点单明细表
|
||||||
|
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
Long deptId = SecurityUtils.getDeptId();
|
||||||
|
|
||||||
|
// 查找库内所有在库木箱
|
||||||
|
JSONArray dtlArr = WQL.getWO("QST_IVT_CHECK").addParam("flag", "11").addParam("stor_id", jsonObject.getString("stor_id")).process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
// 插入主表
|
||||||
|
JSONObject jsonMst = new JSONObject();
|
||||||
|
jsonMst.put("check_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
jsonMst.put("check_code", CodeUtil.getNewCode("PD_CODE"));
|
||||||
|
jsonMst.put("buss_type", jsonObject.getString("check_type"));
|
||||||
|
jsonMst.put("check_type", jsonObject.getString("check_type"));
|
||||||
|
jsonMst.put("stor_id", jsonObject.getLongValue("stor_id"));
|
||||||
|
jsonMst.put("stor_name", jsonObject.getString("stor_name"));
|
||||||
|
jsonMst.put("dtl_num", dtlArr.size());
|
||||||
|
jsonMst.put("create_mode", "01");
|
||||||
|
jsonMst.put("is_nok", "0");
|
||||||
|
jsonMst.put("input_optid", currentUserId);
|
||||||
|
jsonMst.put("input_optname", nickName);
|
||||||
|
jsonMst.put("input_time", DateUtil.now());
|
||||||
|
jsonMst.put("remark", jsonObject.getString("remark"));
|
||||||
|
jsonMst.put("status", "1");
|
||||||
|
jsonMst.put("sysdeptid", deptId);
|
||||||
|
jsonMst.put("syscompanyid", deptId);
|
||||||
|
mstTab.insert(jsonMst);
|
||||||
|
|
||||||
|
// 插入明细
|
||||||
|
for (int i = 0; i < dtlArr.size(); i++) {
|
||||||
|
JSONObject json = dtlArr.getJSONObject(i);
|
||||||
|
JSONObject jsonDtl = new JSONObject();
|
||||||
|
jsonDtl.put("checkdtl_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
jsonDtl.put("check_id", jsonMst.getLongValue("check_id"));
|
||||||
|
jsonDtl.put("check_code", jsonMst.getString("check_code"));
|
||||||
|
jsonDtl.put("seq_no", i + 1);
|
||||||
|
jsonDtl.put("sect_id", json.getLongValue("sect_id"));
|
||||||
|
jsonDtl.put("sect_name", json.getString("sect_name"));
|
||||||
|
jsonDtl.put("struct_id", json.getLongValue("struct_id"));
|
||||||
|
jsonDtl.put("struct_name", json.getString("struct_name"));
|
||||||
|
jsonDtl.put("storagevehicle_code", json.getString("storagevehicle_code"));
|
||||||
|
jsonDtl.put("material_id", json.getLongValue("material_id"));
|
||||||
|
jsonDtl.put("qty_unit_id", json.getLongValue("measure_unit_id"));
|
||||||
|
jsonDtl.put("qty_unit_name", json.getString("qty_unit_name"));
|
||||||
|
jsonDtl.put("status", "1");
|
||||||
|
|
||||||
|
JSONObject jsonSub = WQL.getWO("PDA_CHECK").addParam("flag", "4").addParam("storagevehicle_code", json.getString("storagevehicle_code")).process().uniqueResult(0);
|
||||||
|
jsonDtl.put("base_qty", jsonSub.getDoubleValue("net_weight"));
|
||||||
|
dtlTab.insert(jsonDtl);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,6 +141,56 @@
|
|||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "22"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
CheckDtl.*,
|
||||||
|
struct.struct_code,
|
||||||
|
struct.sect_code,
|
||||||
|
mb.material_code,
|
||||||
|
mb.material_name,
|
||||||
|
user1.person_name AS process_optname
|
||||||
|
FROM
|
||||||
|
ST_IVT_CheckDtl CheckDtl
|
||||||
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||||
|
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||||
|
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||||
|
WHERE
|
||||||
|
CheckDtl.status <> '1'
|
||||||
|
OPTION 输入.check_id <> ""
|
||||||
|
CheckDtl.check_id = 输入.check_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
order by CheckDtl.seq_no
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "222"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
CheckDtl.*,
|
||||||
|
struct.struct_code,
|
||||||
|
struct.sect_code,
|
||||||
|
mb.material_code,
|
||||||
|
mb.material_name,
|
||||||
|
user1.person_name AS process_optname
|
||||||
|
FROM
|
||||||
|
ST_IVT_CheckDtl CheckDtl
|
||||||
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = CheckDtl.material_id
|
||||||
|
LEFT JOIN st_ivt_structattr struct ON struct.struct_id = CheckDtl.struct_id
|
||||||
|
LEFT JOIN sys_user user1 ON user1.user_id = CheckDtl.process_optid
|
||||||
|
WHERE
|
||||||
|
CheckDtl.status = '1'
|
||||||
|
OPTION 输入.check_id <> ""
|
||||||
|
CheckDtl.check_id = 输入.check_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
order by CheckDtl.seq_no
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "3"
|
IF 输入.flag = "3"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
@@ -433,3 +483,33 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "11"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
MAX(attr.sect_id) AS sect_id,
|
||||||
|
MAX(attr.sect_name) AS sect_name,
|
||||||
|
MAX(attr.struct_id) AS struct_id,
|
||||||
|
MAX(attr.struct_name) AS struct_name,
|
||||||
|
MAX(attr.storagevehicle_code) AS storagevehicle_code,
|
||||||
|
MAX(mater.material_id) AS material_id,
|
||||||
|
MAX(mater.base_unit_id) AS qty_unit_id,
|
||||||
|
'KG' AS qty_unit_name
|
||||||
|
FROM
|
||||||
|
st_ivt_structivt ivt
|
||||||
|
LEFT JOIN st_ivt_structattr attr ON ivt.struct_id = attr.struct_id
|
||||||
|
LEFT JOIN md_me_materialbase mater ON ivt.material_id = mater.material_id
|
||||||
|
WHERE
|
||||||
|
attr.sect_code in ('XN01','XN11')
|
||||||
|
AND IFNULL(attr.storagevehicle_code,'') <> ''
|
||||||
|
AND attr.lock_type = '1'
|
||||||
|
|
||||||
|
OPTION 输入.stor_id <> ""
|
||||||
|
attr.stor_id = 输入.stor_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
group by attr.struct_code
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|||||||
@@ -11,12 +11,15 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||||
|
import org.nl.system.service.user.ISysUserService;
|
||||||
|
import org.nl.system.service.user.dao.SysUser;
|
||||||
import org.nl.system.service.user.dto.CurrentUser;
|
import org.nl.system.service.user.dto.CurrentUser;
|
||||||
|
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.modules.wql.util.WqlUtil;
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
import org.nl.system.service.user.dto.UserDto;
|
||||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||||
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
||||||
import org.nl.wms.ext.sap.service.impl.LmsToSapServiceImpl;
|
import org.nl.wms.ext.sap.service.impl.LmsToSapServiceImpl;
|
||||||
@@ -42,6 +45,8 @@ import java.util.Map;
|
|||||||
public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||||
private final TransactionTemplate transactionTemplate;
|
private final TransactionTemplate transactionTemplate;
|
||||||
|
|
||||||
|
private final ISysUserService iSysUserService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
|
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
|
||||||
HashMap map = new HashMap<>(whereJson);
|
HashMap map = new HashMap<>(whereJson);
|
||||||
@@ -114,7 +119,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
// 调用接口回传
|
// 调用接口回传
|
||||||
JSONObject paramMesMst = new JSONObject();
|
JSONObject paramMesMst = new JSONObject();
|
||||||
paramMesMst.put("PackageBoxSN", box_row.getString("box_no"));
|
paramMesMst.put("PackageBoxSN", box_row.getString("box_no"));
|
||||||
paramMesMst.put("User", box_row.getString("confirm_optname"));
|
SysUser sysUser = iSysUserService.getById(box_row.getString("confirm_optid"));
|
||||||
|
paramMesMst.put("User", sysUser.getUsername());
|
||||||
new LmsToMesServiceImpl().childRollFGInboundComplete(paramMesMst);
|
new LmsToMesServiceImpl().childRollFGInboundComplete(paramMesMst);
|
||||||
|
|
||||||
jo_mst.put("is_upload", "1");
|
jo_mst.put("is_upload", "1");
|
||||||
@@ -706,7 +712,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
// 调用接口回传
|
// 调用接口回传
|
||||||
JSONObject paramMesMst = new JSONObject();
|
JSONObject paramMesMst = new JSONObject();
|
||||||
paramMesMst.put("PackageBoxSN", box_row.getString("box_no"));
|
paramMesMst.put("PackageBoxSN", box_row.getString("box_no"));
|
||||||
paramMesMst.put("User", box_row.getString("confirm_optname"));
|
SysUser sysUser = iSysUserService.getById(box_row.getString("confirm_optid"));
|
||||||
|
paramMesMst.put("User", sysUser.getUsername());
|
||||||
|
|
||||||
new LmsToMesServiceImpl().childRollFGInboundComplete(paramMesMst);
|
new LmsToMesServiceImpl().childRollFGInboundComplete(paramMesMst);
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,8 @@
|
|||||||
QUERY
|
QUERY
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
dis.box_no,
|
dis.box_no,
|
||||||
mst.confirm_optname
|
mst.confirm_optname,
|
||||||
|
mst.confirm_optid
|
||||||
FROM
|
FROM
|
||||||
st_ivt_iostorinvdis dis
|
st_ivt_iostorinvdis dis
|
||||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
druid.filters.DruidFilter=org.nl.config.DruidFilter
|
||||||
@@ -26,7 +26,6 @@ spring:
|
|||||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||||
# username: ${DB_USER:root}
|
# username: ${DB_USER:root}
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
# password: ${DB_PWD:123456}
|
|
||||||
password: ${DB_PWD:942464Yy}
|
password: ${DB_PWD:942464Yy}
|
||||||
# 初始连接数
|
# 初始连接数
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
@@ -59,16 +58,17 @@ spring:
|
|||||||
enabled: true
|
enabled: true
|
||||||
url-pattern: /druid/*
|
url-pattern: /druid/*
|
||||||
reset-enable: false
|
reset-enable: false
|
||||||
filter:
|
filters:
|
||||||
stat:
|
DruidFilter,stat
|
||||||
enabled: true
|
# stat:
|
||||||
# 记录慢SQL
|
# enabled: true
|
||||||
log-slow-sql: true
|
# # 记录慢SQL
|
||||||
slow-sql-millis: 1000
|
# log-slow-sql: true
|
||||||
merge-sql: true
|
# slow-sql-millis: 1000
|
||||||
wall:
|
# merge-sql: true
|
||||||
config:
|
# wall:
|
||||||
multi-statement-allow: true
|
# config:
|
||||||
|
# multi-statement-allow: true
|
||||||
redis:
|
redis:
|
||||||
#数据库索引
|
#数据库索引
|
||||||
database: ${REDIS_DB:15}
|
database: ${REDIS_DB:15}
|
||||||
|
|||||||
@@ -2,6 +2,22 @@ server:
|
|||||||
port: 8013
|
port: 8013
|
||||||
#配置数据源
|
#配置数据源
|
||||||
spring:
|
spring:
|
||||||
|
data:
|
||||||
|
elasticsearch:
|
||||||
|
repositories:
|
||||||
|
enabled: true
|
||||||
|
client:
|
||||||
|
reactive:
|
||||||
|
#endpoints: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||||
|
# endpoints: 47.96.133.178:8200 #外网
|
||||||
|
endpoints: http://10.1.3.90:9200 #外网
|
||||||
|
elasticsearch:
|
||||||
|
rest:
|
||||||
|
#uris: 172.31.185.110:9200,172.31.154.9:9200 #内网
|
||||||
|
# uris: 47.96.133.178:8200 #外网
|
||||||
|
uris: http://10.1.3.90:9200 #外网
|
||||||
|
# username: elastic
|
||||||
|
# password: 123456
|
||||||
datasource:
|
datasource:
|
||||||
druid:
|
druid:
|
||||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||||
@@ -43,16 +59,17 @@ spring:
|
|||||||
enabled: true
|
enabled: true
|
||||||
url-pattern: /druid/*
|
url-pattern: /druid/*
|
||||||
reset-enable: false
|
reset-enable: false
|
||||||
filter:
|
filters:
|
||||||
stat:
|
DruidFilter,stat
|
||||||
enabled: true
|
# stat:
|
||||||
# 记录慢SQL
|
# enabled: true
|
||||||
log-slow-sql: true
|
# # 记录慢SQL
|
||||||
slow-sql-millis: 1000
|
# log-slow-sql: true
|
||||||
merge-sql: true
|
# slow-sql-millis: 1000
|
||||||
wall:
|
# merge-sql: true
|
||||||
config:
|
# wall:
|
||||||
multi-statement-allow: true
|
# config:
|
||||||
|
# multi-statement-allow: true
|
||||||
redis:
|
redis:
|
||||||
#数据库索引
|
#数据库索引
|
||||||
database: ${REDIS_DB:14}
|
database: ${REDIS_DB:14}
|
||||||
@@ -70,6 +87,7 @@ spring:
|
|||||||
idleConnectionTimeout: 10000
|
idleConnectionTimeout: 10000
|
||||||
timeout: 3000
|
timeout: 3000
|
||||||
|
|
||||||
|
|
||||||
# 登录相关配置
|
# 登录相关配置
|
||||||
login:
|
login:
|
||||||
# 登录缓存
|
# 登录缓存
|
||||||
|
|||||||
@@ -195,6 +195,10 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<logger name="org.springframework" level="ERROR" additivity="false">
|
<logger name="org.springframework" level="ERROR" additivity="false">
|
||||||
<appender-ref ref="asyncFileAppender"/>
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
</logger>
|
</logger>
|
||||||
|
<logger name="es-logger" level="warn" additivity="false">
|
||||||
|
<appender-ref ref="esLogAppender" />
|
||||||
|
<appender-ref ref="CONSOLE"/>
|
||||||
|
</logger>
|
||||||
<logger name="org.apache" level="ERROR" additivity="false">
|
<logger name="org.apache" level="ERROR" additivity="false">
|
||||||
<appender-ref ref="asyncFileAppender"/>
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
</logger>
|
</logger>
|
||||||
|
|||||||
@@ -9,11 +9,12 @@
|
|||||||
@close="close"
|
@close="close"
|
||||||
>
|
>
|
||||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||||
<el-col :span="20" style="border: 1px solid white">
|
<el-col :span="18" style="border: 1px solid white">
|
||||||
<span />
|
<span />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<span>
|
<span>
|
||||||
|
<el-button icon="el-icon-check" size="mini" :loading="showLoading" type="primary" @click="allInsert">一键保存</el-button>
|
||||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
@@ -89,7 +90,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="crud-opts2">
|
<div class="crud-opts2">
|
||||||
<span class="role-span">盘点明细</span>
|
<span class="role-span">盘点明细</span>
|
||||||
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
|
<span class="crud-opts-right2">
|
||||||
|
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
<slot name="left" />
|
<slot name="left" />
|
||||||
@@ -99,10 +100,47 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
v-if="crud.status.cu > 0"
|
||||||
@click="queryDtl()"
|
@click="queryDtl()"
|
||||||
>
|
>
|
||||||
添加盘点物料
|
添加盘点物料
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
:loading="showDtlLoading"
|
||||||
|
v-if="crud.status.view > 0"
|
||||||
|
@click="queryDtlCheck('1')"
|
||||||
|
>
|
||||||
|
已盘点
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
:loading="showDtlLoading"
|
||||||
|
v-if="crud.status.view > 0"
|
||||||
|
@click="queryDtlCheck('2')"
|
||||||
|
>
|
||||||
|
未盘点
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-thumb"
|
||||||
|
size="mini"
|
||||||
|
:loading="showDtlLoading"
|
||||||
|
v-if="crud.status.view > 0"
|
||||||
|
@click="downdtl"
|
||||||
|
>
|
||||||
|
导出
|
||||||
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -123,8 +161,10 @@
|
|||||||
<span v-if="crud.status.cu > 0">{{ scope.row.storagevehicle_code }}</span>
|
<span v-if="crud.status.cu > 0">{{ scope.row.storagevehicle_code }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column show-overflow-tooltip v-if="crud.status.view > 0" prop="base_qty" label="净重" width="150" align="center" :formatter="crud.formatNum3"/>
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150" align="center" />
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150" align="center" />
|
||||||
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150" show-overflow-tooltip />
|
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="remark" v-if="crud.status.view > 0" label="备注" align="center" min-width="150" show-overflow-tooltip />
|
||||||
<!-- <el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" width="200px" >
|
<!-- <el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" width="200px" >
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-input v-model="scope.row.remark" size="mini" />
|
<el-input v-model="scope.row.remark" size="mini" />
|
||||||
@@ -148,6 +188,8 @@ import AddDtl from '@/views/wms/st/inStor/check/AddDtl'
|
|||||||
import check from '@/views/wms/st/inStor/check/check'
|
import check from '@/views/wms/st/inStor/check/check'
|
||||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
import DtlViewDialog from '@/views/wms/st/inStor/check/DtlViewDialog'
|
import DtlViewDialog from '@/views/wms/st/inStor/check/DtlViewDialog'
|
||||||
|
import { download } from '@/api/data'
|
||||||
|
import { downloadFile } from '@/utils'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
check_code: '',
|
check_code: '',
|
||||||
@@ -177,8 +219,11 @@ export default {
|
|||||||
paramDtlView: '',
|
paramDtlView: '',
|
||||||
dtlViewShow: false,
|
dtlViewShow: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
showLoading: false,
|
||||||
|
showDtlLoading: false,
|
||||||
dtlShow: false,
|
dtlShow: false,
|
||||||
flagnow: false,
|
flagnow: false,
|
||||||
|
paramType: '',
|
||||||
storId: null,
|
storId: null,
|
||||||
nowrow: {},
|
nowrow: {},
|
||||||
nowindex: '',
|
nowindex: '',
|
||||||
@@ -231,6 +276,15 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
queryDtlCheck(type) {
|
||||||
|
// 1-已盘点,2-未盘点
|
||||||
|
this.paramType = type
|
||||||
|
this.showDtlLoading = true
|
||||||
|
check.getOutBillDtl({ 'check_id': this.form.check_id, 'type': type }).then(res => {
|
||||||
|
this.form.tableData = res
|
||||||
|
this.showDtlLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
bill_statusFormat(row) {
|
bill_statusFormat(row) {
|
||||||
return this.dict.label.check_dtl_status[row.status]
|
return this.dict.label.check_dtl_status[row.status]
|
||||||
},
|
},
|
||||||
@@ -296,6 +350,34 @@ export default {
|
|||||||
openDtlView(row) {
|
openDtlView(row) {
|
||||||
this.paramDtlView = row.storagevehicle_code
|
this.paramDtlView = row.storagevehicle_code
|
||||||
this.dtlViewShow = true
|
this.dtlViewShow = true
|
||||||
|
},
|
||||||
|
allInsert() {
|
||||||
|
if (this.form.check_type === '') {
|
||||||
|
this.crud.notify('请选择盘点单类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.form.stor_id === '') {
|
||||||
|
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.showLoading = true
|
||||||
|
check.allInsert(this.form).then(res => {
|
||||||
|
this.crud.cancelCU()
|
||||||
|
this.showLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.showLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
downdtl() {
|
||||||
|
if (this.currentRow !== null) {
|
||||||
|
crud.downloadLoading = true
|
||||||
|
download('/api/check/download', { 'type': this.paramType, 'check_id': this.form.check_id }).then(result => {
|
||||||
|
downloadFile(result, '盘点数据', 'xlsx')
|
||||||
|
crud.downloadLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
crud.downloadLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,4 +108,11 @@ export function disposeConfirm(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1, disposeConfirm }
|
export function allInsert(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/check/allInsert',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1, disposeConfirm, allInsert }
|
||||||
|
|||||||
Reference in New Issue
Block a user