缓存线盘点
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.nl.system.controller.dict;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -117,5 +118,13 @@ public class SysDictController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("查询字典详情")
|
||||
@ApiOperation("查询字典详情")
|
||||
@PostMapping("/dictDetailByCode")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> createDetail(@RequestBody String code){
|
||||
return new ResponseEntity<>(dictService.getDictByName(code),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -250,4 +250,31 @@ public class CacheLineHandController{
|
||||
log.info("海亮缓存线手持服务 [倒料操作] 接口被请求, 请求参数-{}", param);
|
||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.pourMaterial(param));
|
||||
}
|
||||
|
||||
@PostMapping("/getCacheLine")
|
||||
@Log("缓存线下拉框")
|
||||
@ApiOperation("缓存线下拉框")
|
||||
@SaIgnore
|
||||
public CommonResult<JSONArray> getCacheLine(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [缓存线盘点-缓存线下拉框] 接口被请求, 请求参数-{}", param);
|
||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.getCacheLine(param));
|
||||
}
|
||||
|
||||
@PostMapping("/getCacheLineMaterialInfo")
|
||||
@Log("缓存线物料信息盘点")
|
||||
@ApiOperation("缓存线物料信息盘点")
|
||||
@SaIgnore
|
||||
public CommonResult<JSONArray> getCacheLineMaterialInfo(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [缓存线盘点-缓存线物料信息盘点] 接口被请求, 请求参数-{}", param);
|
||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.getCacheLineMaterialInfo(param));
|
||||
}
|
||||
|
||||
@PostMapping("/updateCacheLineMaterialInfo")
|
||||
@Log("缓存线物料信息盘点")
|
||||
@ApiOperation("缓存线物料信息盘点")
|
||||
@SaIgnore
|
||||
public CommonResult<Void> updateCacheLineMaterialInfo(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [缓存线盘点] 接口被请求, 请求参数-{}", param);
|
||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.updateCacheLineMaterialInfo(param));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,4 +253,24 @@ public interface CacheLineHandService{
|
||||
* @date 2023/3/24
|
||||
*/
|
||||
void pourMaterial(JSONObject param);
|
||||
|
||||
/**
|
||||
* 缓存线下拉框
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
JSONArray getCacheLine(JSONObject param);
|
||||
|
||||
/**
|
||||
* 缓存线物料信息盘点
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
JSONArray getCacheLineMaterialInfo(JSONObject param);
|
||||
|
||||
/**
|
||||
* 盘点信息
|
||||
* @param param
|
||||
*/
|
||||
void updateCacheLineMaterialInfo(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -4,14 +4,17 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
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.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.utils.AcsUtil;
|
||||
import org.nl.common.utils.LocalCache;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
@@ -756,4 +759,33 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
//TOFIX 等确定api后,换成下发的url
|
||||
AcsUtil.notifyAcs("api", jsonArray);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getCacheLine(JSONObject param) {
|
||||
// 生产区域
|
||||
String product_area = param.getString("product_area");
|
||||
String where = "region_code = 'A1_HCX'";
|
||||
if (ObjectUtil.isNotEmpty(product_area)) where = where + " AND product_area = '" + product_area + "'";
|
||||
return WQLObject.getWQLObject("sch_base_point").query(where).getResultJSONArray(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getCacheLineMaterialInfo(JSONObject param) {
|
||||
// 缓存线编码 point_code
|
||||
String pointCode = param.getString("point_code");
|
||||
// 生产区域
|
||||
String productArea = param.getString("product_area");
|
||||
JSONArray res = WQL.getWO("PDA_QUERY")
|
||||
.addParamMap(MapOf.of("flag", "7", "product_area", productArea, "cacheLine_code", pointCode))
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCacheLineMaterialInfo(JSONObject param) {
|
||||
WQLObject vehicleTab = WQLObject.getWQLObject("SCH_CacheLine_VehileMaterial");
|
||||
param.put("err_type", StatusEnum.STATUS_FLASE.getCode());
|
||||
vehicleTab.update(param);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.condition TYPEAS s_string
|
||||
输入.cacheLine_code TYPEAS s_string
|
||||
输入.product_area TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -147,7 +149,34 @@
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "7"
|
||||
QUERY
|
||||
SELECT
|
||||
cv.*,
|
||||
d1.label AS vehicle_status_name,
|
||||
CASE cv.err_type
|
||||
WHEN '0' THEN
|
||||
'无异常'
|
||||
ELSE
|
||||
'异常'
|
||||
END AS err_type_name
|
||||
FROM
|
||||
sch_cacheline_vehilematerial cv
|
||||
LEFT JOIN sys_dict d1 ON d1.`code` = 'IF_WCS_VehicleStatus'
|
||||
AND d1.`value` = cv.vehicle_status
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.product_area <> ""
|
||||
cv.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
OPTION 输入.cacheLine_code <> ""
|
||||
cv.cacheLine_code = 输入.cacheLine_code
|
||||
ENDOPTION
|
||||
ORDER BY
|
||||
cv.cacheLine_code
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user