feat: 一些优化
This commit is contained in:
parent
fd7dea2786
commit
7309136378
|
|
@ -92,6 +92,7 @@ public class SAPConfig {
|
|||
}
|
||||
|
||||
@Bean(destroyMethod = "")
|
||||
@Lazy
|
||||
public JCoDestination jcoDestination() throws JCoException {
|
||||
return JCoDestinationManager.getDestination(ABAP_AS_POOLED);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import com.nflg.wms.common.util.VUtil;
|
|||
import com.sap.conn.jco.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -32,9 +33,11 @@ import java.util.stream.Collectors;
|
|||
public class SapService {
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private JCoDestination destination;
|
||||
|
||||
@Resource
|
||||
@Lazy
|
||||
private JCoRepository repository;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -38,4 +38,9 @@ public class InventoryVO {
|
|||
* 批次号
|
||||
*/
|
||||
private String batchNumber;
|
||||
|
||||
/**
|
||||
* 序列号
|
||||
*/
|
||||
private String serialNo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.nflg.wms.repository.mapper.WmsInventoryMapper">
|
||||
|
||||
<select id="search" resultType="com.nflg.wms.common.pojo.vo.InventoryVO">
|
||||
SELECT i."id",i.material_no,i.factory_no,i.warehouse_no,i.num,i.batch_no
|
||||
SELECT i."id",i.material_no,i.factory_no,i.warehouse_no,i.num,i.batch_no as batchNumber,i.serial_no as serialNo
|
||||
FROM wms_inventory i
|
||||
LEFT JOIN dictionary_item di ON di."value"=i.factory_no
|
||||
LEFT JOIN wms_warehouse wh ON wh.factory_id=di."id" and i.warehouse_no=wh.no
|
||||
|
|
|
|||
Loading…
Reference in New Issue