|
|
|
|
@ -625,4 +625,46 @@ public class ErpDataProduceServiceImpl implements IErpDataProduceService { |
|
|
|
|
} |
|
|
|
|
return excflag; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String closeErpOrder(String yoCode, String cardNo, String batchNo, String ldapName, Double recQty, String woCode, String recseqno) { |
|
|
|
|
SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate) |
|
|
|
|
// 指定存储过程名(包含 DB Link)
|
|
|
|
|
.withProcedureName("dba_mgr.pro_rbtransferrec") |
|
|
|
|
// 建议关闭元数据访问(通过 DB Link 访问时可避免权限/性能问题)
|
|
|
|
|
.withoutProcedureColumnMetaDataAccess() |
|
|
|
|
// 显式声明参数
|
|
|
|
|
.declareParameters( |
|
|
|
|
new SqlParameter("v_sono", Types.VARCHAR), |
|
|
|
|
new SqlParameter("v_rouclp", Types.VARCHAR), |
|
|
|
|
new SqlParameter("v_splcode", Types.VARCHAR), |
|
|
|
|
new SqlParameter("v_recman", Types.VARCHAR), |
|
|
|
|
new SqlParameter("v_recqty", Types.DOUBLE), |
|
|
|
|
new SqlParameter("v_recdate", Types.DATE), |
|
|
|
|
new SqlParameter("v_recsono", Types.VARCHAR), |
|
|
|
|
new SqlParameter("v_seqno", Types.VARCHAR), |
|
|
|
|
new SqlOutParameter("v_excnote", Types.VARCHAR), |
|
|
|
|
new SqlOutParameter("v_excflag", Types.VARCHAR) |
|
|
|
|
); |
|
|
|
|
// 2. 封装输入参数
|
|
|
|
|
Map<String, Object> inParams = new HashMap<>(); |
|
|
|
|
inParams.put("v_sono", yoCode); |
|
|
|
|
inParams.put("v_rouclp", cardNo); |
|
|
|
|
inParams.put("v_splcode", batchNo); |
|
|
|
|
inParams.put("v_recman", ldapName); |
|
|
|
|
inParams.put("v_recqty", recQty); |
|
|
|
|
inParams.put("v_recdate", new Date()); |
|
|
|
|
inParams.put("v_recsono", woCode); |
|
|
|
|
inParams.put("v_seqno", recseqno == null ? "" : recseqno); |
|
|
|
|
// 3. 执行并获取结果 Map
|
|
|
|
|
Map<String, Object> resultMap = jdbcCall.execute(inParams); |
|
|
|
|
|
|
|
|
|
// 4. 提取输出参数
|
|
|
|
|
String excflag = (String) resultMap.get("v_excflag"); |
|
|
|
|
String excnote = (String) resultMap.get("v_excnote"); |
|
|
|
|
if ("0".equals(excflag)) { |
|
|
|
|
throw new ServiceException("大仓接收关闭erp订单接口失败:" + excnote); |
|
|
|
|
} |
|
|
|
|
return excflag; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|