|
|
|
|
@ -43,21 +43,33 @@ public class ErpDataOemServiceImpl implements IErpDataOemService { |
|
|
|
|
@Override |
|
|
|
|
public void closeErpOrder(String woCode, String memo) { |
|
|
|
|
log.info("关闭erp外协订单 - 单号:{},备注:{}", woCode, memo); |
|
|
|
|
|
|
|
|
|
String sql = "{call pro_rbclswxdata(" + |
|
|
|
|
":v_wono, :v_rsn, :v_clsdat)}"; |
|
|
|
|
|
|
|
|
|
try (Connection conn = dataSource.getConnection(); |
|
|
|
|
CallableStatement cs = conn.prepareCall(sql)) { |
|
|
|
|
|
|
|
|
|
cs.setString("v_wono", woCode); |
|
|
|
|
cs.setString("v_rsn", memo); |
|
|
|
|
cs.setTimestamp("v_clsdat", new Timestamp(System.currentTimeMillis())); |
|
|
|
|
// 执行
|
|
|
|
|
cs.execute(); |
|
|
|
|
|
|
|
|
|
log.info("关闭erp外协订单成功 - 单号:{},备注:{}", woCode, memo); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate) |
|
|
|
|
// 指定存储过程名(包含 DB Link)
|
|
|
|
|
.withProcedureName("dba_mgr.pro_rbclswxdata") |
|
|
|
|
// 建议关闭元数据访问(通过 DB Link 访问时可避免权限/性能问题)
|
|
|
|
|
.withoutProcedureColumnMetaDataAccess() |
|
|
|
|
// 显式声明参数
|
|
|
|
|
.declareParameters( |
|
|
|
|
new SqlParameter("v_wono", Types.VARCHAR), // IN
|
|
|
|
|
new SqlParameter("v_rsn", Types.VARCHAR), // IN
|
|
|
|
|
new SqlParameter("v_clsdat", Types.DATE), // IN
|
|
|
|
|
new SqlOutParameter("v_excnote", Types.VARCHAR),// OUT
|
|
|
|
|
new SqlOutParameter("v_excflag", Types.VARCHAR) // OUT
|
|
|
|
|
); |
|
|
|
|
// 2. 封装输入参数
|
|
|
|
|
Map<String, Object> inParams = new HashMap<>(); |
|
|
|
|
inParams.put("v_wono", woCode); |
|
|
|
|
inParams.put("v_rsn", memo); |
|
|
|
|
inParams.put("v_clsdat", new Date()); |
|
|
|
|
|
|
|
|
|
// 3. 执行并获取结果 Map
|
|
|
|
|
Map<String, Object> resultMap = jdbcCall.execute(inParams); |
|
|
|
|
|
|
|
|
|
// 4. 提取输出参数
|
|
|
|
|
String excflag = (String) resultMap.get("v_excflag"); |
|
|
|
|
String excnote = (String) resultMap.get("v_excnote"); |
|
|
|
|
log.info("关闭erp外协订单返回结果:excflag-{},内容:excnote-{}", excflag, excnote); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("关闭erp外协订单失败 - 单号:{},备注:{}", woCode, memo, e); |
|
|
|
|
} |
|
|
|
|
@ -75,7 +87,7 @@ public class ErpDataOemServiceImpl implements IErpDataOemService { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String fullOrderOutsourcing(String v_prtno, String v_prtlotno, String v_splcode, String v_splycode, String v_seqcc, String v_sono, |
|
|
|
|
String v_planner, Date v_pedate, Double v_woporqty, String v_pricetype) { |
|
|
|
|
String v_planner, Date v_pedate, Double v_woporqty, String v_pricetype) { |
|
|
|
|
SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate) |
|
|
|
|
// 指定存储过程名(包含 DB Link)
|
|
|
|
|
.withProcedureName("dba_mgr.pro_rbwxgensc") |
|
|
|
|
@ -123,8 +135,8 @@ public class ErpDataOemServiceImpl implements IErpDataOemService { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public String collaborativeOutsourcing(String v_prtno, String v_prtlotno, Date v_woreqdat, Double v_woporqty, String v_usedeptcode, |
|
|
|
|
String v_usedept, String v_splcode, String v_splycode, String v_kdofplat, String v_wono, |
|
|
|
|
String v_sono, String v_mtnman, String v_planner, String v_yardman, String v_roam_no, String v_craft_no, Long v_craft_id) { |
|
|
|
|
String v_usedept, String v_splcode, String v_splycode, String v_kdofplat, String v_wono, |
|
|
|
|
String v_sono, String v_mtnman, String v_planner, String v_yardman, String v_roam_no, String v_craft_no, Long v_craft_id) { |
|
|
|
|
SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate) |
|
|
|
|
// 指定存储过程名(包含 DB Link)
|
|
|
|
|
.withProcedureName("dba_mgr.pro_rbwxgen") |
|
|
|
|
|