|
|
|
@ -3,6 +3,7 @@ package org.springblade.erpdata.service.impl; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import jakarta.annotation.Resource; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.desk.produce.pojo.dto.MesRbRedoRoutDTO; |
|
|
|
import org.springblade.desk.produce.pojo.dto.MesRbRedoRoutDTO; |
|
|
|
import org.springblade.erpdata.mapper.ErpDataProduceMapper; |
|
|
|
import org.springblade.erpdata.mapper.ErpDataProduceMapper; |
|
|
|
@ -465,4 +466,57 @@ public class ErpDataProduceServiceImpl implements IErpDataProduceService { |
|
|
|
erpReturnDataVO.setExcnote((String) resultMap.get("v_excnote")); |
|
|
|
erpReturnDataVO.setExcnote((String) resultMap.get("v_excnote")); |
|
|
|
return erpReturnDataVO; |
|
|
|
return erpReturnDataVO; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public String createMoldPlan(String partCode, String moCode, String plantype, Integer quantity, Date needDate, String level, |
|
|
|
|
|
|
|
String keeper, String createMan, String memo) { |
|
|
|
|
|
|
|
SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate) |
|
|
|
|
|
|
|
// 指定存储过程名(包含 DB Link)
|
|
|
|
|
|
|
|
.withProcedureName("dba_mgr.pro_rbtoolreqm") |
|
|
|
|
|
|
|
// 建议关闭元数据访问(通过 DB Link 访问时可避免权限/性能问题)
|
|
|
|
|
|
|
|
.withoutProcedureColumnMetaDataAccess() |
|
|
|
|
|
|
|
// 显式声明参数
|
|
|
|
|
|
|
|
.declareParameters( |
|
|
|
|
|
|
|
new SqlParameter("v_prtno", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_toolcode", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_plntype", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_tlreqqty", Types.INTEGER), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_tlreqdat", Types.DATE), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_prtmdept", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_prtlotno", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_WARCTLR", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_operator", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_remark", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_stat", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlParameter("v_toolid1", Types.VARCHAR), // IN
|
|
|
|
|
|
|
|
new SqlOutParameter("v_excnote", Types.VARCHAR),// OUT
|
|
|
|
|
|
|
|
new SqlOutParameter("v_excflag", Types.VARCHAR), // OUT
|
|
|
|
|
|
|
|
new SqlOutParameter("v_toolid", Types.VARCHAR) // OUT
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
// 2. 封装输入参数
|
|
|
|
|
|
|
|
Map<String, Object> inParams = new HashMap<>(); |
|
|
|
|
|
|
|
inParams.put("v_prtno", partCode); |
|
|
|
|
|
|
|
inParams.put("v_toolcode", moCode); |
|
|
|
|
|
|
|
inParams.put("v_plntype", plantype); |
|
|
|
|
|
|
|
inParams.put("v_tlreqqty", quantity); |
|
|
|
|
|
|
|
inParams.put("v_tlreqdat", needDate); |
|
|
|
|
|
|
|
inParams.put("v_prtmdept", "3600"); |
|
|
|
|
|
|
|
inParams.put("v_prtlotno", level); |
|
|
|
|
|
|
|
inParams.put("v_WARCTLR", keeper); |
|
|
|
|
|
|
|
inParams.put("v_operator", createMan); |
|
|
|
|
|
|
|
inParams.put("v_remark", StringUtils.isBlank(memo) ? "" : memo); |
|
|
|
|
|
|
|
inParams.put("v_stat", "0"); |
|
|
|
|
|
|
|
inParams.put("v_toolid1", ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 3. 执行并获取结果 Map
|
|
|
|
|
|
|
|
Map<String, Object> resultMap = jdbcCall.execute(inParams); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 4. 提取输出参数
|
|
|
|
|
|
|
|
String excflag = (String) resultMap.get("v_excflag"); |
|
|
|
|
|
|
|
String excnote = (String) resultMap.get("v_excnote"); |
|
|
|
|
|
|
|
String wxno = (String) resultMap.get("v_toolid"); |
|
|
|
|
|
|
|
return wxno; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|