缓存线盘点
This commit is contained in:
@@ -254,27 +254,23 @@ public class CacheLineHandController{
|
||||
@PostMapping("/getCacheLine")
|
||||
@Log("缓存线下拉框")
|
||||
@ApiOperation("缓存线下拉框")
|
||||
@SaIgnore
|
||||
public CommonResult<JSONArray> getCacheLine(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [缓存线盘点-缓存线下拉框] 接口被请求, 请求参数-{}", param);
|
||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.getCacheLine(param));
|
||||
}
|
||||
|
||||
@PostMapping("/getProductArea")
|
||||
@Log("获取生产区域下拉框")
|
||||
@ApiOperation("获取生产区域下拉框")
|
||||
public CommonResult<JSONArray> getProductArea() {
|
||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.getProductArea());
|
||||
}
|
||||
|
||||
@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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,8 +269,8 @@ public interface CacheLineHandService{
|
||||
JSONArray getCacheLineMaterialInfo(JSONObject param);
|
||||
|
||||
/**
|
||||
* 盘点信息
|
||||
* @param param
|
||||
* 获取生产区域下拉框
|
||||
* @return
|
||||
*/
|
||||
void updateCacheLineMaterialInfo(JSONObject param);
|
||||
JSONArray getProductArea();
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package org.nl.wms.pda.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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;
|
||||
@@ -12,14 +10,12 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.nl.common.enums.StatusEnum;
|
||||
import org.nl.common.handler.LockProcess;
|
||||
import org.nl.common.utils.*;
|
||||
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||
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.wms.pda.dto.CachelineVehileMaterialDto;
|
||||
import org.nl.wms.pda.dto.MaterialDto;
|
||||
import org.nl.wms.pda.service.CacheLineHandService;
|
||||
import org.nl.wms.sch.service.impl.TaskServiceImpl;
|
||||
@@ -775,8 +771,11 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
// 生产区域
|
||||
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);
|
||||
JSONArray resultJSONArray = WQL.getWO("PDA_QUERY")
|
||||
.addParamMap(MapOf.of("flag", "7", "product_area", product_area))
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
return resultJSONArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -786,16 +785,18 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
// 生产区域
|
||||
String productArea = param.getString("product_area");
|
||||
JSONArray res = WQL.getWO("PDA_QUERY")
|
||||
.addParamMap(MapOf.of("flag", "7", "product_area", productArea, "cacheLine_code", pointCode))
|
||||
.addParamMap(MapOf.of("flag", "8", "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);
|
||||
public JSONArray getProductArea() {
|
||||
JSONArray res = WQL.getWO("PDA_QUERY")
|
||||
.addParamMap(MapOf.of("flag", "9"))
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,28 +152,62 @@
|
||||
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
|
||||
p.point_code as value,
|
||||
p.point_name as text,
|
||||
FROM
|
||||
sch_cacheline_vehilematerial cv
|
||||
LEFT JOIN sys_dict d1 ON d1.`code` = 'IF_WCS_VehicleStatus'
|
||||
AND d1.`value` = cv.vehicle_status
|
||||
sch_base_point p
|
||||
WHERE
|
||||
1 = 1
|
||||
p.region_code = 'A1_HCX'
|
||||
OPTION 输入.product_area <> ""
|
||||
cv.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
ORDER BY
|
||||
p.point_code
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
IF 输入.flag = "8"
|
||||
QUERY
|
||||
SELECT
|
||||
sch_cacheline_position.cacheLine_code,
|
||||
sch_cacheline_position.position_code,
|
||||
sch_cacheline_position.vehicle_code,
|
||||
sch_cacheline_position.layer_num,
|
||||
sch_cacheline_position.positionOrder_no,
|
||||
sch_cacheline_vehilematerial.workprocedure_code,
|
||||
sch_cacheline_vehilematerial.workprocedure_name,
|
||||
sch_cacheline_vehilematerial.material_uuid,
|
||||
sch_cacheline_vehilematerial.material_code,
|
||||
sch_cacheline_vehilematerial.material_name,
|
||||
sch_cacheline_vehilematerial.material_spec,
|
||||
sch_cacheline_vehilematerial.quantity,
|
||||
sch_cacheline_vehilematerial.weight,
|
||||
IF (length(sch_cacheline_position.vehicle_code) > 0, IFNULL( sch_cacheline_vehilematerial.vehicle_status, 4), 5) AS vehicle_status
|
||||
FROM
|
||||
sch_cacheline_position
|
||||
LEFT JOIN sch_cacheline_vehilematerial ON sch_cacheline_position.vehicle_code = sch_cacheline_vehilematerial.vehicle_code
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.product_area <> ""
|
||||
sch_cacheline_position.product_area = 输入.product_area
|
||||
ENDOPTION
|
||||
OPTION 输入.cacheLine_code <> ""
|
||||
cv.cacheLine_code = 输入.cacheLine_code
|
||||
sch_cacheline_position.cacheLine_code = 输入.cacheLine_code
|
||||
ENDOPTION
|
||||
ORDER BY
|
||||
cv.cacheLine_code
|
||||
sch_cacheline_position.cacheLine_code
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
IF 输入.flag = "9"
|
||||
QUERY
|
||||
SELECT
|
||||
d.value,
|
||||
d.label as text,
|
||||
FROM
|
||||
sys_dict d
|
||||
WHERE
|
||||
code = 'product_area'
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user