|
|
@ -901,12 +901,14 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
|
|
|
|
int sum = 0;
|
|
|
|
int sum = 0;
|
|
|
|
//记录第几条失败
|
|
|
|
//记录第几条失败
|
|
|
|
int num = 0;
|
|
|
|
int num = 0;
|
|
|
|
|
|
|
|
String voucherCode = generaterSwapUtil.getBillNumber("fhpz", false);
|
|
|
|
for(int i=0; i<dataList.size(); i++){
|
|
|
|
for(int i=0; i<dataList.size(); i++){
|
|
|
|
|
|
|
|
int aa = i+1;
|
|
|
|
VoucherExcelVO222 model = dataList.get(i);
|
|
|
|
VoucherExcelVO222 model = dataList.get(i);
|
|
|
|
VoucherEntity voucherEntity = new VoucherEntity();
|
|
|
|
VoucherEntity voucherEntity = new VoucherEntity();
|
|
|
|
voucherEntity.setBusinessType(StringUtil.equals(model.getBusinessType(), "采购") ? "1" : "2");//业务类型
|
|
|
|
voucherEntity.setBusinessType(StringUtil.equals(model.getBusinessType(), "采购") ? "1" : "2");//业务类型
|
|
|
|
voucherEntity.setDocumentType(StringUtil.equals(model.getDocumentType(), "收货凭证") ? "1" : "2");//单据类型
|
|
|
|
voucherEntity.setDocumentType(StringUtil.equals(model.getDocumentType(), "收货凭证") ? "1" : "2");//单据类型
|
|
|
|
voucherEntity.setVoucherCode(generaterSwapUtil.getBillNumber("fhpz", false));//'凭证编号
|
|
|
|
voucherEntity.setVoucherCode(voucherCode + "(" + aa + ")");//'凭证编号
|
|
|
|
//凭证类型
|
|
|
|
//凭证类型
|
|
|
|
if(StringUtil.equals(model.getVoucherType(), "磅单")){
|
|
|
|
if(StringUtil.equals(model.getVoucherType(), "磅单")){
|
|
|
|
voucherEntity.setVoucherType("1");
|
|
|
|
voucherEntity.setVoucherType("1");
|
|
|
|