fix:出入库代码优化
This commit is contained in:
@@ -129,7 +129,12 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
||||
code = "VEHICLE_CODE_GXTP";
|
||||
break;
|
||||
case "0003":
|
||||
code = "VEHICLE_CODE_LK";
|
||||
if (class_jo.getString("class_code").equals("000301")){
|
||||
code = "VEHICLE_CODE_LK";
|
||||
}
|
||||
if (class_jo.getString("class_code").equals("000302")){
|
||||
code = "VEHICLE_CODE_LKB";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.nl.wms.ext.mes.rest;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@RequestMapping("/CamstarApi")
|
||||
@Slf4j
|
||||
public class BLmsToMesController {
|
||||
private final LmsToMesService lmsToMesService;
|
||||
|
||||
@PostMapping("/momAutoTransterMoveIn")
|
||||
@Log("表处、分切上料反馈接口")
|
||||
public ResponseEntity<Object> momAutoTransterMoveIn(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(lmsToMesService.momAutoTransterMoveIn(jo), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/momGetPackingInfo")
|
||||
@Log("LMS通过木箱号调用木箱信息")
|
||||
public ResponseEntity<Object> momGetPackingInfo(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(lmsToMesService.momGetPackingInfo(jo), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/momBoxPackageSubmit")
|
||||
@Log("LMS装箱完成传MES包装关系")
|
||||
public ResponseEntity<Object> momBoxPackageSubmit(@RequestBody JSONObject jo) {
|
||||
return new ResponseEntity<>(lmsToMesService.momBoxPackageSubmit(jo), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -135,4 +135,10 @@ public interface LmsToMesService {
|
||||
* }
|
||||
*/
|
||||
JSONObject ChildScrapUpdate(JSONObject jo);
|
||||
|
||||
JSONObject momAutoTransterMoveIn(JSONObject jo);
|
||||
|
||||
JSONObject momGetPackingInfo(JSONObject jo);
|
||||
|
||||
JSONObject momBoxPackageSubmit(JSONObject jo);
|
||||
}
|
||||
|
||||
@@ -700,4 +700,52 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject momAutoTransterMoveIn(JSONObject param){ return null;} /*{
|
||||
String from_area = param.getString("from_area");
|
||||
String to_area = param.getString("to_area");
|
||||
String container_name = param.getString("container_name");
|
||||
|
||||
|
||||
log.info("momAutoTransterMoveIn接口输入参数为:-------------------" + param.toString());
|
||||
|
||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||
String api = "CamstarApi/momAutoTransterMoveIn";
|
||||
url = url + api;
|
||||
|
||||
String UserName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||
String Password = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||
param.put("UserName", UserName);
|
||||
param.put("Password", Password);
|
||||
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.body(String.valueOf(param))
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("LMSPackakge接口输出参数为:-------------------" + result.toString());
|
||||
|
||||
|
||||
String RTYPE = result.getString("RTYPE");
|
||||
if ("E".equals(RTYPE)) {
|
||||
throw new BadRequestException(result.getString("RTMSG"));
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public JSONObject momGetPackingInfo(JSONObject jo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject momBoxPackageSubmit(JSONObject jo) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user