rev:无袋入库操作
This commit is contained in:
@@ -138,9 +138,10 @@ public class PdaBucketNoBagServiceImpl implements PdaBucketNoBagService {
|
|||||||
String bucketunique = mst.getString("bucketunique");
|
String bucketunique = mst.getString("bucketunique");
|
||||||
String is_active = mst.getString("is_active");
|
String is_active = mst.getString("is_active");
|
||||||
String material_code = mst.getString("material_code");
|
String material_code = mst.getString("material_code");
|
||||||
MaterialbaseDto materDto = materialbaseService.findByCode(material_code);
|
//从ERP查物料
|
||||||
|
MaterialbaseDto materDto = materialbaseService.findByErpId(material_code);
|
||||||
if (materDto==null){
|
if (materDto==null){
|
||||||
throw new BadRequestException(material_code+"物料信息不存在");
|
throw new BadRequestException(material_code+"ERP_ID对应MES物料信息不存在");
|
||||||
}
|
}
|
||||||
String input_optid = mst.getString("accountId");
|
String input_optid = mst.getString("accountId");
|
||||||
String input_optname = mst.getString("user");
|
String input_optname = mst.getString("user");
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ public interface MaterialbaseService {
|
|||||||
* @return Materialbase
|
* @return Materialbase
|
||||||
*/
|
*/
|
||||||
MaterialbaseDto findByCode(String code);
|
MaterialbaseDto findByCode(String code);
|
||||||
|
MaterialbaseDto findByErpId(String erpId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -135,6 +135,19 @@ public class MaterialbaseServiceImpl implements MaterialbaseService {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MaterialbaseDto findByErpId(String erpId) {
|
||||||
|
if (StringUtils.isEmpty(erpId)){
|
||||||
|
throw new BadRequestException("ERPID编码不能为空");
|
||||||
|
}
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("md_me_materialbase");
|
||||||
|
JSONObject json = wo.query("ext_id =" + erpId + "").uniqueResult(0);
|
||||||
|
String unit_name = WQLObject.getWQLObject("md_pb_measureunit").query("measure_unit_id= '" + json.getString("base_unit_id") + "'").uniqueResult(0).getString("unit_name");
|
||||||
|
json.put("base_unit_name", unit_name);
|
||||||
|
final MaterialbaseDto obj = json.toJavaObject(MaterialbaseDto.class);
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MaterialbaseDto findByCode(String code) {
|
public MaterialbaseDto findByCode(String code) {
|
||||||
if (StringUtils.isEmpty(code)){
|
if (StringUtils.isEmpty(code)){
|
||||||
|
|||||||
Reference in New Issue
Block a user