sap jar包

highway
zhaoxiaolin 1 year ago
parent ae8cd366bd
commit bb61ed1b95

@ -13,6 +13,15 @@ public class WCSDataDTO {
private String stationNo;
private int qty;
private String mode;
public String getMode() {
return mode;
}
public void setMode(String mode) {
this.mode = mode;
}
public int getQty() {
return qty;

@ -18,8 +18,15 @@ public class SapSupplier extends BaseEntity {
private String telf1;
private String stras;
private String erdat;
private String recordId;
public String getRecordId() {
return recordId;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}
public String getBukrs() {
return bukrs;

@ -68,4 +68,8 @@ public interface ProRfidProcessDetailMapper {
String getActuaEquips(ProRfidProcessDetail rfidInfo);
Integer getEquipNum(String machineCode);
String getEquipStatus(String machineCode);
String getEquipMode(String machineCode);
}

@ -118,12 +118,18 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
for (String machineCode : machineArray) {
wCSDataDTO = new WCSDataDTO();
if (StringUtils.isNotBlank(machineCode)) {
wCSDataDTO.setStationNo(machineCode);
if ("2".equals(stationType)) {
Integer qty = proRfidProcessDetailMapper.getEquipNum(machineCode);
wCSDataDTO.setQty(qty == null ? 0 : qty);
//设备是否正常
String status = proRfidProcessDetailMapper.getEquipStatus(machineCode);
if(StringUtils.isNotBlank(status) && "1".equals(status)){//正常设备且没被删除
wCSDataDTO.setStationNo(machineCode);
if ("2".equals(stationType)) {
Integer qty = proRfidProcessDetailMapper.getEquipNum(machineCode);
wCSDataDTO.setQty(qty == null ? 0 : qty);
String mode = proRfidProcessDetailMapper.getEquipMode(machineCode);
wCSDataDTO.setMode(mode);
}
stationNos.add(wCSDataDTO);
}
stationNos.add(wCSDataDTO);
}
}
dto.setStationNos(stationNos);

@ -97,6 +97,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where property = 'dollyNumber'
and device_code = #{machineCode}
</select>
<select id="getEquipStatus" resultType="java.lang.String">
select status from base_equipment where equipment_code = #{machineCode} and del_flag = '0'
</select>
<select id="getEquipMode" resultType="java.lang.String">
select isvalue from base_equipment_attached
where property = 'Mode'
and device_code = #{machineCode}
</select>
<insert id="insertProRfidProcessDetail" parameterType="ProRfidProcessDetail">
insert into pro_rfid_process_detail

@ -92,6 +92,7 @@
<dependency>
<groupId>com.sap</groupId>
<artifactId>sapjco3</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>

@ -28,6 +28,7 @@ if exist %df% (
echo --------------------------------´´½¨Dockerfile--------------------------------
echo FROM 192.168.202.36:30002/library/openjdk:8u131-jdk-alpine >> Dockerfile
echo ADD libsapjco3.so /home/sap/libsapjco3.so >> Dockerfile
echo ADD sapjco3.jar /home/sap/sapjco3.jar >> Dockerfile
echo ENV LD_LIBRARY_PATH /home/sap >> Dockerfile
echo COPY %jarName% /application.jar >> Dockerfile
echo RUN echo "Asia/Shanghai" ^> /etc/timezone >> Dockerfile

@ -3,6 +3,7 @@ package com.op.sap.service.impl;
import com.op.common.core.domain.R;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.sap.domain.vo.SapSupplierQuery;
import com.op.sap.domain.vo.SapWorkCenterQuery;
import com.op.sap.mapper.SapBomMapper;
@ -269,7 +270,8 @@ public class SapWorkCenterServiceImpl implements SapWorkCenterService {
List<SapWorkCenter> updates = new ArrayList<>();
for(String exsitCode:exsitCodes){
updates = dtos.stream().filter(dto -> dto.getArbpl().equals(exsitCode)).collect(Collectors.toList());
List<SapWorkCenter> updates0 = dtos.stream().filter(dto -> dto.getArbpl().equals(exsitCode)).collect(Collectors.toList());
updates.addAll(updates0);
}
if(!CollectionUtils.isEmpty(updates)){
int m = sapBomMapper.updateFactoryBatchs(updates);
@ -305,22 +307,23 @@ public class SapWorkCenterServiceImpl implements SapWorkCenterService {
List<SapSupplier> updates = new ArrayList<>();
for(String exsitCode:exsitCodes){
updates = dtos.stream().filter(dto -> dto.getLifnr().equals(exsitCode)).collect(Collectors.toList());
List<SapSupplier> updates0 = dtos.stream().filter(dto -> dto.getLifnr().equals(exsitCode)).collect(Collectors.toList());
updates.addAll(updates0);
}
if(CollectionUtils.isEmpty(updates)){
if(!CollectionUtils.isEmpty(updates)){
int m = sapBomMapper.updateSupplierBatchs(updates);
System.out.println("供应商更新成功条数:"+m);
}
List<SapSupplier> adds = new ArrayList<>();
for(String noExsitCode:noExsitCodes){
adds = dtos.stream().filter(dto -> dto.getLifnr().equals(noExsitCode)).collect(Collectors.toList());
List<SapSupplier> adds0 = dtos.stream().filter(dto -> dto.getLifnr().equals(noExsitCode)).collect(Collectors.toList());
adds.addAll(adds0);
}
if(CollectionUtils.isEmpty(adds)){
//工厂parentId
/*String parentId = sapBomMapper.getParentId(adds.get(0).getBukrs());
if(!CollectionUtils.isEmpty(adds)){
adds.stream().forEach(e->{
e.setParentId(parentId);
});*/
e.setRecordId(IdUtils.fastSimpleUUID());
});
int n = sapBomMapper.addSupplierBatchs(adds);
System.out.println("供应商新增成功条数:"+ n);
}

@ -276,7 +276,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time)
VALUES
<foreach collection="list" index="index" item="item" separator=",">
(#{item.bukrs},#{item.name1},#{item.telf1},#{item.stars}
(#{item.bukrs},#{item.name1},#{item.telf1},#{item.stras},
'job',
#{item.erdat},
#{item.erdat})
@ -297,13 +297,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(client_code,client_name,contact1_tel,address,
create_by,
create_time,
update_time)
update_time,factory_code)
VALUES
<foreach collection="list" index="index" item="item" separator=",">
(#{item.bukrs},#{item.name1},#{item.telf1},#{item.stars}
(#{item.lifnr},#{item.name1},#{item.telf1},#{item.stars}
'job',
#{item.erdat},
#{item.erdat})
#{item.erdat},#{item.bukrs})
</foreach>
</insert>
</mapper>

Loading…
Cancel
Save