This commit is contained in:
2023-03-30 14:34:05 +08:00
5 changed files with 24 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ public class MaterialDto implements Serializable{
/**
* 物料标识
*/
private String material_id;
private String material_uuid;
/**
* 编码
*/

View File

@@ -35,6 +35,7 @@ import java.util.Map;
@Api(tags = "海亮缓存线手持服务")
@RequestMapping("/api/cacheLineHand")
@Slf4j
@SaIgnore
public class CacheLineHandController{
private final CacheLineHandService cacheLineHandService;
@@ -64,7 +65,7 @@ public class CacheLineHandController{
//限制查询参数过短,模糊力度大
int length = params.getBytes().length;
if(length < 3) {
throw new BizCoreException("您输入的条件匹配的范围太大,请重新输入稍长一点的内容。");
throw new BizCoreException("您输入的条件匹配的范围太大,请输入大于2个字的内容。");
}
}
return new ResponseEntity<>(cacheLineHandService.materialQuery(form.getString("search_bar")), HttpStatus.OK);

View File

@@ -27,6 +27,7 @@ import org.nl.wms.sch.tasks.SpeMachineryTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -52,9 +53,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
private final RedisUtils redisUtils;
@Autowired
private LocalCache cache;
@Value("${acs.url}")
private String acsUrl;
@Override
public JSONArray dropdownListQuery(String param, String type) {
//初始化下拉框列表1.物料规格2.工序3.指令状态4.设备
@@ -570,7 +568,12 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
jsonArray.add(jsonObject);
try {
//TOFIX 等确定api后换成下发的url
return AcsUtil.notifyAcs(acsUrl, jsonArray);
//return AcsUtil.notifyAcs("/api/cacheLineHand", jsonArray);
JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value());
result.put("message", "操作成功!");
result.put("data", new JSONObject());
return result;
}
catch(NullPointerException e) {
throw new BadRequestException(e.toString());
@@ -596,7 +599,12 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
jsonArray.add(jsonObject);
try {
//TOFIX 等确定api后换成下发的url
return AcsUtil.notifyAcs(acsUrl, jsonArray);
//return AcsUtil.notifyAcs("/api/cacheLineHand", jsonArray);
JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value());
result.put("message", "操作成功!");
result.put("data", new JSONObject());
return result;
}
catch(NullPointerException e) {
throw new BadRequestException(e.toString());
@@ -832,7 +840,12 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
jsonArray.add(jsonObject);
try {
//TOFIX 等确定api后换成下发的url
return AcsUtil.notifyAcs(acsUrl, jsonArray);
//return AcsUtil.notifyAcs("/api/cacheLineHand", jsonArray);
JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value());
result.put("message", "操作成功!");
result.put("data", new JSONObject());
return result;
}
catch(NullPointerException e) {
throw new BadRequestException(e.toString());

View File

@@ -122,7 +122,7 @@
IF 输入.flag = "5"
QUERY
SELECT
MB.MATERIAL_ID,
MB.MATERIAL_ID MATERIAL_UUID,
MB.MATERIAL_CODE,
MB.MATERIAL_SPEC,
MB.MATERIAL_NAME,
@@ -139,7 +139,7 @@
IF 输入.flag = "6"
QUERY
SELECT
mb.material_id,
mb.material_id material_uuid,
mb.material_code,
mb.material_spec,
mb.material_name,

View File

@@ -49,8 +49,6 @@ demo:
server-url: https://www.demo-monitor.com
username: MessiLoveRidingBike
password: 123456
acs:
url: "http://localhost:8012"
security:
# 排除路径
excludes: