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