Merge branch 'refs/heads/feature/DM/nflg-bom-dq' into dev
This commit is contained in:
commit
f8e104a094
|
|
@ -13,10 +13,11 @@ import com.nflg.product.bomnew.pojo.dto.sap.SapResult;
|
||||||
import com.nflg.product.bomnew.pojo.dto.sap.impart2.ImportSapParam2DTO;
|
import com.nflg.product.bomnew.pojo.dto.sap.impart2.ImportSapParam2DTO;
|
||||||
import com.nflg.product.bomnew.pojo.dto.sap.impart2.ImportSapParamDTO;
|
import com.nflg.product.bomnew.pojo.dto.sap.impart2.ImportSapParamDTO;
|
||||||
import com.nflg.product.bomnew.pojo.dto.sap.impart2.T1DTO;
|
import com.nflg.product.bomnew.pojo.dto.sap.impart2.T1DTO;
|
||||||
import com.nflg.product.bomnew.pojo.vo.OperationErrorMsgBaseVO;
|
import com.nflg.product.bomnew.pojo.vo.OperationErrorMsgVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import nflg.product.common.constant.STATE;
|
import nflg.product.common.constant.STATE;
|
||||||
import nflg.product.common.vo.ResultVO;
|
import nflg.product.common.vo.ResultVO;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
|
@ -180,7 +181,7 @@ public class SapOpUtilService {
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(list)) {
|
if (CollUtil.isNotEmpty(list)) {
|
||||||
//StringBuffer errBuf=new StringBuffer();
|
//StringBuffer errBuf=new StringBuffer();
|
||||||
List<OperationErrorMsgBaseVO> liError = new ArrayList<>();
|
List<OperationErrorMsgVO> liError = new ArrayList<>();
|
||||||
AtomicInteger errCount= new AtomicInteger();
|
AtomicInteger errCount= new AtomicInteger();
|
||||||
AtomicInteger succCount= new AtomicInteger();
|
AtomicInteger succCount= new AtomicInteger();
|
||||||
for (T1DTO item : list) {
|
for (T1DTO item : list) {
|
||||||
|
|
@ -191,7 +192,7 @@ public class SapOpUtilService {
|
||||||
if (item.getFLAG().equals("0")) {
|
if (item.getFLAG().equals("0")) {
|
||||||
errCount.getAndIncrement();
|
errCount.getAndIncrement();
|
||||||
//errBuf.append(item.getSTATUS() + ",");
|
//errBuf.append(item.getSTATUS() + ",");
|
||||||
liError.add(OperationErrorMsgBaseVO.create(item.getSTATUS()));
|
liError.add(OperationErrorMsgVO.create(StringUtils.stripStart(item.getIDNRK(), "0"), item.getSTATUS()));
|
||||||
} else if (item.getFLAG().equals("1")) {
|
} else if (item.getFLAG().equals("1")) {
|
||||||
succCount.getAndIncrement();
|
succCount.getAndIncrement();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.nflg.product.bomnew.pojo.entity.BomNewLogEntity;
|
||||||
import com.nflg.product.bomnew.util.BomUtil;
|
import com.nflg.product.bomnew.util.BomUtil;
|
||||||
import com.nflg.product.bomnew.util.StringUtil;
|
import com.nflg.product.bomnew.util.StringUtil;
|
||||||
import com.nflg.product.bomnew.util.VersionUtil;
|
import com.nflg.product.bomnew.util.VersionUtil;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
@ -148,4 +149,11 @@ public class OtherTest {
|
||||||
public void test17() {
|
public void test17() {
|
||||||
System.out.println("T" + RandomUtil.randomNumbers(9));
|
System.out.println("T" + RandomUtil.randomNumbers(9));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test18() {
|
||||||
|
String d1 = "2100724595";
|
||||||
|
String d2 = StringUtils.stripStart("000000002100724595", "0");
|
||||||
|
Assert.assertEquals(d1, d2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue