rev:修改所有返回数据方式为ResponseEntity;
This commit is contained in:
@@ -20,11 +20,11 @@ public class LocalCache{
|
|||||||
private void init() {
|
private void init() {
|
||||||
localCache = CacheBuilder.newBuilder()
|
localCache = CacheBuilder.newBuilder()
|
||||||
//设置本地缓存容器的初始容量
|
//设置本地缓存容器的初始容量
|
||||||
.initialCapacity(10)
|
.initialCapacity(500)
|
||||||
//设置本地缓存的最大容量
|
//设置本地缓存的最大容量
|
||||||
.maximumSize(500)
|
.maximumSize(1000)
|
||||||
//设置写缓存后多少秒过期
|
//设置写缓存后多少秒过期
|
||||||
.expireAfterWrite(60, TimeUnit.SECONDS).build();
|
.expireAfterAccess (120, TimeUnit.SECONDS).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLocalCache(String key, List<MaterialDto> object) {
|
public void setLocalCache(String key, List<MaterialDto> object) {
|
||||||
|
|||||||
@@ -151,6 +151,9 @@ public class MaterialbaseServiceImpl implements MaterialbaseService{
|
|||||||
wo.insert(json);
|
wo.insert(json);
|
||||||
//子线程异步更新redis数据
|
//子线程异步更新redis数据
|
||||||
CompletableFuture<Void> updateMaterToRedis = CompletableFuture.runAsync(this::updateRedis, pool);
|
CompletableFuture<Void> updateMaterToRedis = CompletableFuture.runAsync(this::updateRedis, pool);
|
||||||
|
updateMaterToRedis.exceptionally((e) -> {
|
||||||
|
throw new BadRequestException("物料信息缓存redis失败");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -171,6 +174,9 @@ public class MaterialbaseServiceImpl implements MaterialbaseService{
|
|||||||
wo.update(json);
|
wo.update(json);
|
||||||
//子线程异步更新redis数据
|
//子线程异步更新redis数据
|
||||||
CompletableFuture<Void> updateMaterToRedis = CompletableFuture.runAsync(this::updateRedis, pool);
|
CompletableFuture<Void> updateMaterToRedis = CompletableFuture.runAsync(this::updateRedis, pool);
|
||||||
|
updateMaterToRedis.exceptionally((e) -> {
|
||||||
|
throw new BadRequestException("物料信息缓存redis失败");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -191,6 +197,9 @@ public class MaterialbaseServiceImpl implements MaterialbaseService{
|
|||||||
}
|
}
|
||||||
//子线程异步更新redis数据
|
//子线程异步更新redis数据
|
||||||
CompletableFuture<Void> updateMaterToRedis = CompletableFuture.runAsync(this::updateRedis, pool);
|
CompletableFuture<Void> updateMaterToRedis = CompletableFuture.runAsync(this::updateRedis, pool);
|
||||||
|
updateMaterToRedis.exceptionally((e) -> {
|
||||||
|
throw new BadRequestException("物料信息缓存redis失败");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -305,9 +314,12 @@ public class MaterialbaseServiceImpl implements MaterialbaseService{
|
|||||||
WQLObject.getWQLObject("md_me_materialbase").update(mater_jo);
|
WQLObject.getWQLObject("md_me_materialbase").update(mater_jo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
result.put("message", "导入成功!一共导入:" + rows.size() + "条数据!");
|
||||||
//子线程异步更新redis数据
|
//子线程异步更新redis数据
|
||||||
CompletableFuture<Void> updateMaterToRedis = CompletableFuture.runAsync(this::updateRedis, pool);
|
CompletableFuture<Void> updateMaterToRedis = CompletableFuture.runAsync(this::updateRedis, pool);
|
||||||
result.put("message", "导入成功!一共导入:" + rows.size() + "条数据!");
|
updateMaterToRedis.exceptionally((e) -> {
|
||||||
|
throw new BadRequestException("物料信息缓存redis失败");
|
||||||
|
});
|
||||||
return new JSONObject();
|
return new JSONObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,6 +343,6 @@ public class MaterialbaseServiceImpl implements MaterialbaseService{
|
|||||||
public void updateRedis() {
|
public void updateRedis() {
|
||||||
JSONArray materialJsonArray = WQL.getWO("PDA_QUERY").addParam("flag", "5").process().getResultJSONArray(0);
|
JSONArray materialJsonArray = WQL.getWO("PDA_QUERY").addParam("flag", "5").process().getResultJSONArray(0);
|
||||||
List<MaterialDto> finalMaterialList = materialJsonArray.toJavaList(MaterialDto.class);
|
List<MaterialDto> finalMaterialList = materialJsonArray.toJavaList(MaterialDto.class);
|
||||||
redisUtils.set("hl_one_wms:cacheLineHand:materialList", finalMaterialList);
|
redisUtils.set("hl:cacheLineHand:materialBase:mid", finalMaterialList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ public class HandLoginServiceImpl implements HandLoginService {
|
|||||||
String password = MapUtil.getStr(param, "password");
|
String password = MapUtil.getStr(param, "password");
|
||||||
if (StrUtil.isEmpty(userName)) {
|
if (StrUtil.isEmpty(userName)) {
|
||||||
throw new BadRequestException("用户不能为空");
|
throw new BadRequestException("用户不能为空");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (StrUtil.isEmpty("device_id")) {
|
if (StrUtil.isEmpty("device_id")) {
|
||||||
resultJson.put("code", "0");
|
resultJson.put("code", "0");
|
||||||
|
|||||||
@@ -16,10 +16,9 @@ import org.nl.modules.common.exception.BizCoreException;
|
|||||||
import org.nl.wms.pda.dto.MaterialDto;
|
import org.nl.wms.pda.dto.MaterialDto;
|
||||||
import org.nl.wms.pda.service.CacheLineHandService;
|
import org.nl.wms.pda.service.CacheLineHandService;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -40,12 +39,12 @@ import java.util.Map;
|
|||||||
public class CacheLineHandController{
|
public class CacheLineHandController{
|
||||||
private final CacheLineHandService cacheLineHandService;
|
private final CacheLineHandService cacheLineHandService;
|
||||||
|
|
||||||
@PostMapping("/materialQuery")
|
@PostMapping("/queryMaterial")
|
||||||
@Log("物料查询")
|
@Log("物料查询")
|
||||||
@ApiOperation("物料查询")
|
@ApiOperation("物料查询")
|
||||||
public CommonResult<List<MaterialDto>> materialQuery(@RequestBody JSONObject form) {
|
public ResponseEntity<List<MaterialDto>> queryMaterial(@RequestBody JSONObject form) {
|
||||||
|
log.info("海亮缓存线手持服务 [查询物料] 接口被请求, 请求参数-{}", form);
|
||||||
String params = form.getString("search_bar");
|
String params = form.getString("search_bar");
|
||||||
//任务类型和任务ID校验,instruct_uuid为前端参数命名,本来应为task_id
|
|
||||||
if(StringUtils.isNotEmpty(params)) {
|
if(StringUtils.isNotEmpty(params)) {
|
||||||
//限制查询参数过短,模糊力度大
|
//限制查询参数过短,模糊力度大
|
||||||
int length = params.getBytes().length;
|
int length = params.getBytes().length;
|
||||||
@@ -53,253 +52,255 @@ public class CacheLineHandController{
|
|||||||
throw new BizCoreException("您输入的条件匹配的范围太大,请重新输入稍长一点的内容。");
|
throw new BizCoreException("您输入的条件匹配的范围太大,请重新输入稍长一点的内容。");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info("海亮缓存线手持服务 [查询物料] 接口被请求, 请求参数-{}", form);
|
return new ResponseEntity<>(cacheLineHandService.queryMaterial(params), HttpStatus.OK);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.materialQuery(params));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/queryMaterial")
|
@PostMapping("/materialQuery")
|
||||||
@Log("物料模糊查询")
|
@Log("物料模糊查询")
|
||||||
@ApiOperation("物料模糊查询")
|
@ApiOperation("物料模糊查询")
|
||||||
public CommonResult<JSONArray> queryMaterial(@RequestBody JSONObject form) {
|
public ResponseEntity<JSONArray> materialQuery(@RequestBody JSONObject form) {
|
||||||
log.info("海亮缓存线手持服务 [查询物料] 接口被请求, 请求参数-{}", form);
|
log.info("海亮缓存线手持服务 [查询物料] 接口被请求, 请求参数-{}", form);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.queryMaterial(form.getString("search_bar")));
|
String params = form.getString("search_bar");
|
||||||
|
if(StringUtils.isNotEmpty(params)) {
|
||||||
|
//限制查询参数过短,模糊力度大
|
||||||
|
int length = params.getBytes().length;
|
||||||
|
if(length < 3) {
|
||||||
|
throw new BizCoreException("您输入的条件匹配的范围太大,请重新输入稍长一点的内容。");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(cacheLineHandService.materialQuery(form.getString("search_bar")), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/semiMaterialSpecQuery")
|
@PostMapping("/semiMaterialSpecQuery")
|
||||||
@Log("规格下拉框查询")
|
@Log("规格下拉框查询")
|
||||||
@ApiOperation("规格下拉框查询")
|
@ApiOperation("规格下拉框查询")
|
||||||
public CommonResult<JSONArray> semiMaterialSpecQuery(@RequestBody JSONObject form) {
|
public ResponseEntity<JSONArray> semiMaterialSpecQuery(@RequestBody JSONObject form) {
|
||||||
log.info("海亮缓存线手持服务 [规格下拉框查询] 接口被请求, 请求参数-{}", form);
|
log.info("海亮缓存线手持服务 [规格下拉框查询] 接口被请求, 请求参数-{}", form);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.semiMaterialSpecQuery(form.getString("search_bar")));
|
return new ResponseEntity<>(cacheLineHandService.semiMaterialSpecQuery(form.getString("search_bar")), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/workprocedureQuery")
|
@PostMapping("/workprocedureQuery")
|
||||||
@Log("工序下拉框查询")
|
@Log("工序下拉框查询")
|
||||||
@ApiOperation("工序下拉框查询")
|
@ApiOperation("工序下拉框查询")
|
||||||
public CommonResult<JSONArray> workProcedureQuery(@RequestBody JSONObject form) {
|
public ResponseEntity<JSONArray> workProcedureQuery(@RequestBody JSONObject form) {
|
||||||
log.info("海亮缓存线手持服务 [工序下拉框查询] 接口被请求, 请求参数-{}", form);
|
log.info("海亮缓存线手持服务 [工序下拉框查询] 接口被请求, 请求参数-{}", form);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.workProcedureQuery(form.getString("search_bar")));
|
return new ResponseEntity<>(cacheLineHandService.workProcedureQuery(form.getString("search_bar")), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/deviceQuery")
|
@PostMapping("/deviceQuery")
|
||||||
@Log("缓存线设备下拉框查询")
|
@Log("缓存线设备下拉框查询")
|
||||||
@ApiOperation("缓存线设备下拉框查询")
|
@ApiOperation("缓存线设备下拉框查询")
|
||||||
public CommonResult<JSONArray> deviceQuery(@RequestBody JSONObject form) {
|
public ResponseEntity<JSONArray> deviceQuery(@RequestBody JSONObject form) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线设备下拉框查询] 接口被请求, 请求参数-{}", form);
|
log.info("海亮缓存线手持服务 [缓存线设备下拉框查询] 接口被请求, 请求参数-{}", form);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.deviceQuery(form.getString("search_bar")));
|
return new ResponseEntity<>(cacheLineHandService.deviceQuery(form.getString("search_bar")), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/instStatusQuery")
|
@PostMapping("/instStatusQuery")
|
||||||
@Log("指令状态下拉框查询")
|
@Log("指令状态下拉框查询")
|
||||||
@ApiOperation("指令状态下拉框查询")
|
@ApiOperation("指令状态下拉框查询")
|
||||||
public CommonResult<JSONArray> instStatusQuery(@RequestBody JSONObject form) {
|
public ResponseEntity<JSONArray> instStatusQuery(@RequestBody JSONObject form) {
|
||||||
log.info("海亮缓存线手持服务 [指令状态下拉框查询] 接口被请求, 请求参数-{}", form);
|
log.info("海亮缓存线手持服务 [指令状态下拉框查询] 接口被请求, 请求参数-{}", form);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.instStatusQuery(form.getString("search_bar")));
|
return new ResponseEntity<>(cacheLineHandService.instStatusQuery(form.getString("search_bar")), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/instPageQuery")
|
@PostMapping("/instPageQuery")
|
||||||
@Log("任务分页查询")
|
@Log("任务分页查询")
|
||||||
@ApiOperation("任务分页数据")
|
@ApiOperation("任务分页数据")
|
||||||
public CommonResult<Map<String,Object>> instPageQuery(@RequestBody Map<String,String> param, Pageable page) {
|
public ResponseEntity<Map<String,Object>> instPageQuery(@RequestBody Map<String,String> param, Pageable page) {
|
||||||
log.info("海亮缓存线手持服务 [任务分页查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [任务分页查询] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> {
|
|
||||||
if(null == param) {
|
if(null == param) {
|
||||||
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
||||||
}
|
}
|
||||||
return cacheLineHandService.instPageQuery(param, page);
|
return new ResponseEntity<>(cacheLineHandService.instPageQuery(param, page), HttpStatus.OK);
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/cacheLineMaterCheck")
|
|
||||||
@Log("缓存线物料盘点")
|
|
||||||
@ApiOperation("缓存线物料盘点")
|
|
||||||
public CommonResult<JSONArray> cacheLineMaterCheck(@RequestBody JSONObject param) {
|
|
||||||
log.info("海亮缓存线手持服务 [缓存线物料盘点] 接口被请求, 请求参数-{}", param);
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/instOperation")
|
@PostMapping("/instOperation")
|
||||||
@Log("任务操作")
|
@Log("任务操作")
|
||||||
@ApiOperation("任务操作")
|
@ApiOperation("任务操作")
|
||||||
public CommonResult<String> instOperation(@RequestBody JSONObject param) {
|
public ResponseEntity<String> instOperation(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [任务操作] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [任务操作] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> {
|
|
||||||
//任务类型和任务ID校验,instruct_uuid为前端参数命名,本来应为task_id
|
//任务类型和任务ID校验,instruct_uuid为前端参数命名,本来应为task_id
|
||||||
if(StringUtils.isEmpty(param.getString("instruct_uuid")) || StringUtils.isEmpty(param.getString("opt_type"))) {
|
if(StringUtils.isEmpty(param.getString("instruct_uuid")) || StringUtils.isEmpty(param.getString("opt_type"))) {
|
||||||
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
||||||
}
|
}
|
||||||
return cacheLineHandService.instOperation(param);
|
return new ResponseEntity<>(cacheLineHandService.instOperation(param), HttpStatus.OK);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/cacheLineOutBoxExceptionQuery")
|
@PostMapping("/cacheLineOutBoxExceptionQuery")
|
||||||
@Log("缓存线出入箱异常-查询")
|
@Log("缓存线出入箱异常-查询")
|
||||||
@ApiOperation("缓存线出入箱异常-查询")
|
@ApiOperation("缓存线出入箱异常-查询")
|
||||||
public CommonResult<JSONArray> cacheLineOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
public ResponseEntity<JSONArray> cacheLineOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线出入箱异常-查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线出入箱异常-查询] 接口被请求, 请求参数-{}", param);
|
||||||
//参数校验
|
//参数校验
|
||||||
if(StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("position_code"))) {
|
if(StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("position_code"))) {
|
||||||
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
||||||
}
|
}
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.cacheLineOutBoxExceptionQuery(param));
|
return new ResponseEntity<>(cacheLineHandService.cacheLineOutBoxExceptionQuery(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/cacheLineOutBoxExceptionConfirm")
|
@PostMapping("/cacheLineOutBoxExceptionConfirm")
|
||||||
@Log("缓存线出入箱异常-确认")
|
@Log("缓存线出入箱异常-确认")
|
||||||
@ApiOperation("缓存线出入箱异常-确认")
|
@ApiOperation("缓存线出入箱异常-确认")
|
||||||
public CommonResult<String> cacheLineOutBoxExceptionConfirm(@RequestBody JSONObject param) {
|
public ResponseEntity<String> cacheLineOutBoxExceptionConfirm(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线出箱异常-确认] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线出箱异常-确认] 接口被请求, 请求参数-{}", param);
|
||||||
//参数校验
|
//参数校验
|
||||||
if(StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("position_code")) || StringUtils.isEmpty(param.getString("vehicle_code"))) {
|
if(StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("position_code")) || StringUtils.isEmpty(param.getString("vehicle_code"))) {
|
||||||
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
||||||
}
|
}
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.cacheLineOutBoxExceptionConfirm(param));
|
return new ResponseEntity<>(cacheLineHandService.cacheLineOutBoxExceptionConfirm(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/cacheLineMaterInfoQuery")
|
@PostMapping("/cacheLineMaterInfoQuery")
|
||||||
@Log("缓存线料箱条码查询料箱信息")
|
@Log("缓存线料箱条码查询料箱信息")
|
||||||
@ApiOperation("缓存线料箱条码查询料箱信息")
|
@ApiOperation("缓存线料箱条码查询料箱信息")
|
||||||
public CommonResult<JSONArray> cacheLineMaterInfoQuery(@RequestBody JSONObject param) {
|
public ResponseEntity<JSONArray> cacheLineMaterInfoQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线料箱条码查询料箱信息] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线料箱条码查询料箱信息] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.cacheLineMaterInfoQuery(param));
|
return new ResponseEntity<>(cacheLineHandService.cacheLineMaterInfoQuery(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/inOutEmptyBox")
|
@PostMapping("/inOutEmptyBox")
|
||||||
@Log("空箱初始化--出入空箱")
|
@Log("空箱初始化--出入空箱")
|
||||||
@ApiOperation("空箱初始化--出入空箱")
|
@ApiOperation("空箱初始化--出入空箱")
|
||||||
public CommonResult<String> inOutEmptyBox(@RequestBody JSONObject param) {
|
public ResponseEntity<String> inOutEmptyBox(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [空箱初始化--出入空箱] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [空箱初始化--出入空箱] 接口被请求, 请求参数-{}", param);
|
||||||
//参数校验
|
//参数校验
|
||||||
if(StringUtils.isEmpty(param.getString("inOut_type")) || StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("vehicle_code"))) {
|
if(StringUtils.isEmpty(param.getString("inOut_type")) || StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("vehicle_code"))) {
|
||||||
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
||||||
}
|
}
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.inOutEmptyBox(param));
|
return new ResponseEntity<>(cacheLineHandService.inOutEmptyBox(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/inOutExceptionInstQuery")
|
@PostMapping("/inOutExceptionInstQuery")
|
||||||
@Log("缓存线出入箱异常指令查询")
|
@Log("缓存线出入箱异常指令查询")
|
||||||
@ApiOperation("缓存线出入箱异常指令查询")
|
@ApiOperation("缓存线出入箱异常指令查询")
|
||||||
public CommonResult<JSONArray> inOutExceptionInstQuery(@RequestBody JSONObject param) {
|
public ResponseEntity<JSONArray> inOutExceptionInstQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线出入箱异常指令查询] 接口被·请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线出入箱异常指令查询] 接口被·请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.inOutExceptionInstQuery(param));
|
return new ResponseEntity<>(cacheLineHandService.inOutExceptionInstQuery(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/inOutExceptionInstConfirm")
|
@PostMapping("/inOutExceptionInstConfirm")
|
||||||
@Log("缓存线出入箱异常指令确认")
|
@Log("缓存线出入箱异常指令确认")
|
||||||
@ApiOperation("缓存线出入箱异常指令确认")
|
@ApiOperation("缓存线出入箱异常指令确认")
|
||||||
public CommonResult<String> inOutExceptionInstConfirm(@RequestBody JSONObject param) {
|
public ResponseEntity<String> inOutExceptionInstConfirm(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线出入箱异常指令确认] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线出入箱异常指令确认] 接口被请求, 请求参数-{}", param);
|
||||||
//参数校验
|
//参数校验
|
||||||
if(StringUtils.isEmpty(param.getString("instruct_uuid")) || StringUtils.isEmpty(param.getString("inOut_type")) || StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("vehicle_code"))) {
|
if(StringUtils.isEmpty(param.getString("instruct_uuid")) || StringUtils.isEmpty(param.getString("inOut_type")) || StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("vehicle_code"))) {
|
||||||
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
||||||
}
|
}
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.inOutExceptionInstConfirm(param));
|
return new ResponseEntity<>(cacheLineHandService.inOutExceptionInstConfirm(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/setfullBox")
|
@PostMapping("/setfullBox")
|
||||||
@Log("设置满框")
|
@Log("设置满框")
|
||||||
@ApiOperation("设置满框")
|
@ApiOperation("设置满框")
|
||||||
public CommonResult<Void> setfullBox(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> setfullBox(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [设置满框] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [设置满框] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.setfullBox(param));
|
cacheLineHandService.setfullBox(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/setEmptyBox")
|
@PostMapping("/setEmptyBox")
|
||||||
@Log("设置空框")
|
@Log("设置空框")
|
||||||
@ApiOperation("设置空框")
|
@ApiOperation("设置空框")
|
||||||
public CommonResult<Void> setEmptyBox(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> setEmptyBox(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [设置空框] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [设置空框] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.setEmptyBox(param));
|
cacheLineHandService.setEmptyBox(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/deleteBox")
|
@PostMapping("/deleteBox")
|
||||||
@Log("删除箱子")
|
@Log("删除箱子")
|
||||||
@ApiOperation("删除箱子")
|
@ApiOperation("删除箱子")
|
||||||
public CommonResult<Void> deleteBox(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> deleteBox(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [设置空框] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [设置空框] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.deleteBox(param));
|
cacheLineHandService.deleteBox(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/agvInBoxExceptionQuery")
|
@PostMapping("/agvInBoxExceptionQuery")
|
||||||
@Log("AGV入箱异常-查询")
|
@Log("AGV入箱异常-查询")
|
||||||
@ApiOperation("AGV入箱异常-查询")
|
@ApiOperation("AGV入箱异常-查询")
|
||||||
public CommonResult<JSONArray> agvInBoxExceptionQuery(@RequestBody JSONObject param) {
|
public ResponseEntity<JSONArray> agvInBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [AGV入箱异常-查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [AGV入箱异常-查询] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.agvInBoxExceptionQuery(param));
|
return new ResponseEntity<>(cacheLineHandService.agvInBoxExceptionQuery(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/agvInBoxExceptionConfirm")
|
@PostMapping("/agvInBoxExceptionConfirm")
|
||||||
@Log("AGV入箱异常-确认")
|
@Log("AGV入箱异常-确认")
|
||||||
@ApiOperation("AGV入箱异常-确认")
|
@ApiOperation("AGV入箱异常-确认")
|
||||||
public CommonResult<Void> agvInBoxExceptionConfirm(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> agvInBoxExceptionConfirm(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [AGV入箱异常-确认] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [AGV入箱异常-确认] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.agvInBoxExceptionConfirm(param));
|
cacheLineHandService.agvInBoxExceptionConfirm(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/agvOutBoxExceptionQuery")
|
@PostMapping("/agvOutBoxExceptionQuery")
|
||||||
@Log("AGV出箱异常-查询")
|
@Log("AGV出箱异常-查询")
|
||||||
@ApiOperation("AGV出箱异常-查询")
|
@ApiOperation("AGV出箱异常-查询")
|
||||||
public CommonResult<JSONArray> agvOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
public ResponseEntity<JSONArray> agvOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [AGV出箱异常-查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [AGV出箱异常-查询] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.agvOutBoxExceptionQuery(param));
|
return new ResponseEntity<>(cacheLineHandService.agvOutBoxExceptionQuery(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/agvOutBoxExceptionConfirm")
|
@PostMapping("/agvOutBoxExceptionConfirm")
|
||||||
@Log("AGV出箱异常-确认")
|
@Log("AGV出箱异常-确认")
|
||||||
@ApiOperation("AGV出箱异常-确认")
|
@ApiOperation("AGV出箱异常-确认")
|
||||||
public CommonResult<Void> agvOutBoxExceptionConfirm(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> agvOutBoxExceptionConfirm(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [AGV出箱异常-确认] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [AGV出箱异常-确认] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.agvOutBoxExceptionConfirm(param));
|
cacheLineHandService.agvOutBoxExceptionConfirm(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/setBlankPos")
|
@PostMapping("/setBlankPos")
|
||||||
@Log("设置缓存线货位为空位置")
|
@Log("设置缓存线货位为空位置")
|
||||||
@ApiOperation("设置缓存线货位为空位置")
|
@ApiOperation("设置缓存线货位为空位置")
|
||||||
public CommonResult<Void> setBlankPos(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> setBlankPos(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [设置缓存线货位为空位置] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [设置缓存线货位为空位置] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.setBlankPos(param));
|
cacheLineHandService.setBlankPos(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/cacheLineExcepOpt")
|
@PostMapping("/cacheLineExcepOpt")
|
||||||
@Log("缓存线异常处理")
|
@Log("缓存线异常处理")
|
||||||
@ApiOperation("缓存线异常处理")
|
@ApiOperation("缓存线异常处理")
|
||||||
public CommonResult<String> cacheLineExcepOpt(@RequestBody JSONObject param) {
|
public ResponseEntity<String> cacheLineExcepOpt(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线异常处理] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线异常处理] 接口被请求, 请求参数-{}", param);
|
||||||
//参数校验
|
//参数校验
|
||||||
if(StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("opt_type"))) {
|
if(StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("opt_type"))) {
|
||||||
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
throw new BizCoreException(ResultCode.MISS_PARAMETER);
|
||||||
}
|
}
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.cacheLineExcepOpt(param));
|
return new ResponseEntity<>(cacheLineHandService.cacheLineExcepOpt(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/pourMaterial")
|
@PostMapping("/pourMaterial")
|
||||||
@Log("倒料操作")
|
@Log("倒料操作")
|
||||||
@ApiOperation("倒料操作")
|
@ApiOperation("倒料操作")
|
||||||
public CommonResult<Void> pourMaterial(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> pourMaterial(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [倒料操作] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [倒料操作] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.pourMaterial(param));
|
cacheLineHandService.pourMaterial(param);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getCacheLine")
|
@PostMapping("/getCacheLine")
|
||||||
@Log("缓存线下拉框")
|
@Log("缓存线下拉框")
|
||||||
@ApiOperation("缓存线下拉框")
|
@ApiOperation("缓存线下拉框")
|
||||||
public CommonResult<JSONArray> getCacheLine(@RequestBody JSONObject param) {
|
public ResponseEntity<JSONArray> getCacheLine(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线盘点-缓存线下拉框] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线盘点-缓存线下拉框] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.getCacheLine(param));
|
return new ResponseEntity<>(cacheLineHandService.getCacheLine(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getProductArea")
|
@PostMapping("/getProductArea")
|
||||||
@Log("获取生产区域下拉框")
|
@Log("获取生产区域下拉框")
|
||||||
@ApiOperation("获取生产区域下拉框")
|
@ApiOperation("获取生产区域下拉框")
|
||||||
public CommonResult<JSONArray> getProductArea() {
|
public ResponseEntity<JSONArray> getProductArea() {
|
||||||
return RestBusinessTemplate.execute(cacheLineHandService::getProductArea);
|
return new ResponseEntity<>(cacheLineHandService.getProductArea(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getCacheLineMaterialInfo")
|
@PostMapping("/getCacheLineMaterialInfo")
|
||||||
@Log("缓存线物料信息盘点")
|
@Log("缓存线物料信息盘点")
|
||||||
@ApiOperation("缓存线物料信息盘点")
|
@ApiOperation("缓存线物料信息盘点")
|
||||||
public CommonResult<JSONArray> getCacheLineMaterialInfo(@RequestBody JSONObject param) {
|
public ResponseEntity<JSONArray> getCacheLineMaterialInfo(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [缓存线盘点-缓存线物料信息盘点] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [缓存线盘点-缓存线物料信息盘点] 接口被请求, 请求参数-{}", param);
|
||||||
return RestBusinessTemplate.execute(() -> cacheLineHandService.getCacheLineMaterialInfo(param));
|
return new ResponseEntity<>(cacheLineHandService.getCacheLineMaterialInfo(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public interface CacheLineHandService{
|
|||||||
* @author gbx
|
* @author gbx
|
||||||
* @date 2023/3/22
|
* @date 2023/3/22
|
||||||
*/
|
*/
|
||||||
List<MaterialDto> materialQuery(String param);
|
List<MaterialDto> queryMaterial(String param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料模糊查询
|
* 物料模糊查询
|
||||||
@@ -44,7 +44,7 @@ public interface CacheLineHandService{
|
|||||||
* @author gbx
|
* @author gbx
|
||||||
* @date 2023/3/25
|
* @date 2023/3/25
|
||||||
*/
|
*/
|
||||||
JSONArray queryMaterial(String param);
|
JSONArray materialQuery(String param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格下拉框查询
|
* 规格下拉框查询
|
||||||
|
|||||||
@@ -63,12 +63,12 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray queryMaterial(String param) {
|
public JSONArray materialQuery(String param) {
|
||||||
return WQL.getWO("PDA_QUERY").addParam("flag", "6").addParam("condition", param).process().getResultJSONArray(0);
|
return WQL.getWO("PDA_QUERY").addParam("flag", "6").addParam("condition", param).process().getResultJSONArray(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MaterialDto> materialQuery(String param) {
|
public List<MaterialDto> queryMaterial(String param) {
|
||||||
// StopWatch stopWatch = new StopWatch();
|
// StopWatch stopWatch = new StopWatch();
|
||||||
// stopWatch.start();
|
// stopWatch.start();
|
||||||
// stopWatch.stop();
|
// stopWatch.stop();
|
||||||
@@ -79,15 +79,15 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
List<MaterialDto> materialList;
|
List<MaterialDto> materialList;
|
||||||
ThreadPoolExecutor pool = ThreadPoolExecutorUtil.getPoll();
|
ThreadPoolExecutor pool = ThreadPoolExecutorUtil.getPoll();
|
||||||
//12W种物料信息,查本地缓存
|
//12W种物料信息,查本地缓存
|
||||||
materialList = cache.get("hl_one_wms:cacheLineHand:materialList");
|
materialList = cache.get("hl:cacheLineHand:materialBase:mid");
|
||||||
if(null != materialList) {
|
if(null != materialList) {
|
||||||
return getMaterialDto(materialList, param);
|
return getMaterialDto(materialList, param);
|
||||||
}
|
}
|
||||||
//2.查reids
|
//2.查reids
|
||||||
materialList = redisUtils.get("hl_one_wms:cacheLineHand:materialList", MaterialDto.class);
|
materialList = redisUtils.get("hl:cacheLineHand:materialBase:mid", MaterialDto.class);
|
||||||
if(null != materialList) {
|
if(null != materialList) {
|
||||||
// //设置本地缓存
|
//设置本地缓存
|
||||||
cache.setLocalCache("hl_one_wms:cacheLineHand:materialList", materialList);
|
cache.setLocalCache("hl:cacheLineHand:materialBase:mid", materialList);
|
||||||
return getMaterialDto(materialList, param);
|
return getMaterialDto(materialList, param);
|
||||||
}
|
}
|
||||||
//3.查db
|
//3.查db
|
||||||
@@ -95,10 +95,10 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
materialList = materialJsonArray.toJavaList(MaterialDto.class);
|
materialList = materialJsonArray.toJavaList(MaterialDto.class);
|
||||||
//缓存到redis
|
//缓存到redis
|
||||||
List<MaterialDto> finalMaterialList1 = materialList;
|
List<MaterialDto> finalMaterialList1 = materialList;
|
||||||
CompletableFuture<Void> f1 = CompletableFuture.runAsync(() -> redisUtils.set("hl_one_wms:cacheLineHand:materialList", finalMaterialList1), pool);
|
CompletableFuture<Void> f1 = CompletableFuture.runAsync(() -> redisUtils.set("hl:cacheLineHand:materialBase:mid", finalMaterialList1), pool);
|
||||||
//缓存到本地
|
//缓存到本地
|
||||||
List<MaterialDto> finalMaterialList = materialList;
|
List<MaterialDto> finalMaterialList = materialList;
|
||||||
CompletableFuture<Void> f2 = CompletableFuture.runAsync(() -> cache.setLocalCache("hl_one_wms:cacheLineHand:materialList", finalMaterialList), pool);
|
CompletableFuture<Void> f2 = CompletableFuture.runAsync(() -> cache.setLocalCache("hl:cacheLineHand:materialBase:mid", finalMaterialList), pool);
|
||||||
f1.exceptionally((e) -> {
|
f1.exceptionally((e) -> {
|
||||||
throw new BadRequestException("物料信息缓存redis失败");
|
throw new BadRequestException("物料信息缓存redis失败");
|
||||||
});
|
});
|
||||||
@@ -115,7 +115,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
private List<MaterialDto> getMaterialDto(List<MaterialDto> materialList, String param) {
|
private List<MaterialDto> getMaterialDto(List<MaterialDto> materialList, String param) {
|
||||||
if(StringUtils.isNotEmpty(param)) {
|
if(StringUtils.isNotEmpty(param)) {
|
||||||
//按条件搜索
|
//按条件搜索
|
||||||
materialList = materialList.stream().filter(m -> (m.getMaterial_name().indexOf(param) > -1) || (m.getMaterial_code().indexOf(param)) > -1 || (m.getMaterial_spec().indexOf(param)) > -1).collect(Collectors.toList());
|
materialList = materialList.stream().filter(m -> (m.getMaterial_name().indexOf(param) > -1) || (m.getMaterial_code().indexOf(param)) > -1 || (m.getMaterial_spec().indexOf(param)) > -1|| (m.getClass_name().indexOf(param)) > -1).collect(Collectors.toList());
|
||||||
return materialList;
|
return materialList;
|
||||||
}
|
}
|
||||||
return materialList;
|
return materialList;
|
||||||
@@ -307,7 +307,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置满箱物料 缓存线编码 wcsdevice_code 料箱码 vehicle_code 工序标识 workprocedure_uuid 物料标识 material_uuid
|
* 设置满箱物料 缓存线编码 wcsdevice_code 料箱码 vehicle_code 工序标识 workprocedure_id 物料标识 material_uuid
|
||||||
* 数量 quantity 重量 weight
|
* 数量 quantity 重量 weight
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -360,7 +360,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
json.put("vehmaterial_id", IdUtil.getStringId());
|
json.put("vehmaterial_id", IdUtil.getStringId());
|
||||||
json.put("vehicle_code", vehicle_code);
|
json.put("vehicle_code", vehicle_code);
|
||||||
json.put("cacheLine_code", cacheLine_code);
|
json.put("cacheLine_code", cacheLine_code);
|
||||||
json.put("material_uuid", meObj.getString("material_id"));
|
json.put("material_id", meObj.getString("material_id"));
|
||||||
json.put("material_code", meObj.getString("material_code"));
|
json.put("material_code", meObj.getString("material_code"));
|
||||||
json.put("material_spec", meObj.getString("material_spec"));
|
json.put("material_spec", meObj.getString("material_spec"));
|
||||||
json.put("material_name", meObj.getString("material_name"));
|
json.put("material_name", meObj.getString("material_name"));
|
||||||
@@ -397,7 +397,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
//2.清空
|
//2.清空
|
||||||
JSONObject json = ivtTab.query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
JSONObject json = ivtTab.query("vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||||
json.put("vehicle_status", StatusEnum.CACHE_VEL_EMT.getCode());
|
json.put("vehicle_status", StatusEnum.CACHE_VEL_EMT.getCode());
|
||||||
json.put("material_uuid", "");
|
json.put("material_id", "");
|
||||||
json.put("material_code", "");
|
json.put("material_code", "");
|
||||||
json.put("material_spec", "");
|
json.put("material_spec", "");
|
||||||
json.put("material_name", "");
|
json.put("material_name", "");
|
||||||
@@ -666,7 +666,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
throw new BadRequestException("未找到该物料信息!");
|
throw new BadRequestException("未找到该物料信息!");
|
||||||
}
|
}
|
||||||
//6.重新新建该缓存线位置上的料箱为满箱及所属工序,生产区域等信息
|
//6.重新新建该缓存线位置上的料箱为满箱及所属工序,生产区域等信息
|
||||||
json.put("material_uuid", meObj.getString("material_id"));
|
json.put("material_id", meObj.getString("material_id"));
|
||||||
json.put("material_code", meObj.getString("material_code"));
|
json.put("material_code", meObj.getString("material_code"));
|
||||||
json.put("material_spec", meObj.getString("material_spec"));
|
json.put("material_spec", meObj.getString("material_spec"));
|
||||||
json.put("material_name", meObj.getString("material_name"));
|
json.put("material_name", meObj.getString("material_name"));
|
||||||
|
|||||||
@@ -149,14 +149,13 @@
|
|||||||
LEFT JOIN MD_PB_ClassStandard class ON class.class_id = mb.material_type_id
|
LEFT JOIN MD_PB_ClassStandard class ON class.class_id = mb.material_type_id
|
||||||
WHERE
|
WHERE
|
||||||
mb.is_delete = '0'
|
mb.is_delete = '0'
|
||||||
ORDER BY
|
|
||||||
mb.material_id desc
|
|
||||||
LIMIT 1000
|
|
||||||
OPTION 输入.condition <> ""
|
OPTION 输入.condition <> ""
|
||||||
mb.material_name LIKE CONCAT ('%', 输入.condition, '%')
|
mb.material_name LIKE CONCAT ('%', 输入.condition, '%')
|
||||||
OR mb.material_code LIKE CONCAT ('%', 输入.condition, '%')
|
OR mb.material_code LIKE CONCAT ('%', 输入.condition, '%')
|
||||||
OR mb.material_spec LIKE CONCAT ('%', 输入.condition, '%')
|
OR mb.material_spec LIKE CONCAT ('%', 输入.condition, '%')
|
||||||
OR class.class_name LIKE CONCAT ('%', 输入.condition, '%')
|
OR class.class_name LIKE CONCAT ('%', 输入.condition, '%')
|
||||||
|
ORDER BY
|
||||||
|
mb.material_id desc
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
@@ -189,7 +188,7 @@
|
|||||||
sch_cacheline_position.positionorder_no as seat_order_num,
|
sch_cacheline_position.positionorder_no as seat_order_num,
|
||||||
sch_cacheline_vehilematerial.workprocedure_code,
|
sch_cacheline_vehilematerial.workprocedure_code,
|
||||||
sch_cacheline_vehilematerial.workprocedure_name,
|
sch_cacheline_vehilematerial.workprocedure_name,
|
||||||
sch_cacheline_vehilematerial.material_id as material_uuid,
|
sch_cacheline_vehilematerial.material_id,
|
||||||
sch_cacheline_vehilematerial.material_code,
|
sch_cacheline_vehilematerial.material_code,
|
||||||
sch_cacheline_vehilematerial.material_name,
|
sch_cacheline_vehilematerial.material_name,
|
||||||
sch_cacheline_vehilematerial.material_spec,
|
sch_cacheline_vehilematerial.material_spec,
|
||||||
|
|||||||
Reference in New Issue
Block a user