Merge branch 'b_lms' into master_merge
# Conflicts: # lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/LmsToMesService.java # lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/LmsToMesServiceImpl.java
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);
|
||||
}
|
||||
}
|
||||
@@ -136,44 +136,9 @@ public interface LmsToMesService {
|
||||
*/
|
||||
JSONObject ChildScrapUpdate(JSONObject jo);
|
||||
|
||||
JSONObject momAutoTransterMoveIn(JSONObject jo);
|
||||
|
||||
/**
|
||||
* 向飞书推送图片
|
||||
* @param file_name : 图片名称
|
||||
* @return {
|
||||
* "RTYPE": "S",
|
||||
* "RTMSG": "图片上传成功",
|
||||
* "RTOAL": 0,
|
||||
* "RSYS": null,
|
||||
* "RTDAT": "img_v3_028m_594c5c05-e1d6-4b2c-8298-445f3df23d4g",
|
||||
* "RTDAT2": null
|
||||
* }
|
||||
*/
|
||||
JSONObject sendSalesIvtMsg(String file_name);
|
||||
|
||||
/**
|
||||
* 向飞书推送业务员对应的图片参数
|
||||
* @param param {
|
||||
* "UserList": [
|
||||
* {
|
||||
* "User": "********" //用户工号列表
|
||||
* }
|
||||
* ],
|
||||
* "Code": "*********", //卡片ID
|
||||
* "card": { //卡片参数
|
||||
* "**": {},
|
||||
* "**": {}
|
||||
* }
|
||||
* }
|
||||
* @return {
|
||||
* "RTYPE": "S",
|
||||
* "RTMSG": "消息发送成功",
|
||||
* "RTOAL": 0,
|
||||
* "RSYS": null,
|
||||
* "RTDAT": null,
|
||||
* "RTDAT2": null
|
||||
* }
|
||||
*/
|
||||
JSONObject sendSalesIvtMsgParam(JSONObject param);
|
||||
JSONObject momGetPackingInfo(JSONObject jo);
|
||||
|
||||
JSONObject momBoxPackageSubmit(JSONObject jo);
|
||||
}
|
||||
|
||||
@@ -702,62 +702,29 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject sendSalesIvtMsg(String file_name) {
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
if (StrUtil.equals("0", is_connect_mes)) {
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "下发成功,但未连接飞书!");
|
||||
result.put("data", new JSONObject());
|
||||
return result;
|
||||
}
|
||||
|
||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||
String api = "/FeiShuNoticesWebApi/UploadImage";
|
||||
url = url + api +"?fileName="+file_name;
|
||||
|
||||
log.info("sendSalesIvtMsg接口输入参数为:-------------------" + url.toString());
|
||||
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("sendSalesIvtMsg接口输出参数为:-------------------" + result.toString());
|
||||
|
||||
String RTYPE = result.getString("RTYPE");
|
||||
if ("E".equals(RTYPE)) {
|
||||
throw new BadRequestException(result.getString("RTMSG"));
|
||||
}
|
||||
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");
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("飞书提示错误:" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
log.info("momAutoTransterMoveIn接口输入参数为:-------------------" + param.toString());
|
||||
|
||||
@Override
|
||||
public JSONObject sendSalesIvtMsgParam(JSONObject param) {
|
||||
log.info("sendSalesIvtMsgParam接口输入参数为:-------------------" + param.toString());
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
if (StrUtil.equals("0", is_connect_mes)) {
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "下发成功,但未连接飞书!");
|
||||
result.put("data", new JSONObject());
|
||||
return result;
|
||||
}
|
||||
|
||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||
String api = "/FeiShuNoticesWebApi/SendCard";
|
||||
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("sendSalesIvtMsgParam接口输出参数为:-------------------" + result.toString());
|
||||
log.info("LMSPackakge接口输出参数为:-------------------" + result.toString());
|
||||
|
||||
|
||||
String RTYPE = result.getString("RTYPE");
|
||||
@@ -767,8 +734,18 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("飞书提示错误:" + e.getMessage());
|
||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public JSONObject momGetPackingInfo(JSONObject jo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject momBoxPackageSubmit(JSONObject jo) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,13 @@ public class AcsTaskDto {
|
||||
* Agv系统类型
|
||||
*/
|
||||
private String agv_system_type;
|
||||
|
||||
/**
|
||||
* agv二次分配类型(1、普通任务 2、取货二次分配 3、放货二次分配 4、取放货二次分配)
|
||||
*/
|
||||
private String agv_action_type;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@@ -133,4 +140,10 @@ public class AcsTaskDto {
|
||||
|
||||
private String barcode;
|
||||
|
||||
/**
|
||||
* 发货任务下发货叉宽度
|
||||
*/
|
||||
private String expandWidthLength;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user