提交 927c5927 作者: luyincheng

辅材审批、发货模板修改

父级 6d02b986
......@@ -47,9 +47,9 @@ public class AuxiliaryMaterialDeliveryImport implements Import {
List<String> rowdata = (List<String>)list.get(i);
DeliveryAddVo deliveryAddVo=new DeliveryAddVo();
deliveryAddVo.setInstallOrder(rowdata.get(0));
//deliveryAddVo.setLogisticOrder(rowdata.get(1));
deliveryAddVo.setLogisticOrder(rowdata.get(1));
try {
deliveryAddVo.setQuantity(Integer.parseInt(rowdata.get(1)));
deliveryAddVo.setQuantity(Integer.parseInt(rowdata.get(2)));
}catch (Exception e){
rowdata.add("error:发货数量必填且为整数");
}
......
......@@ -26,26 +26,34 @@ public class AuxiliarymaterialsCheckImport implements Import {
public List<?> handle(List<Object> list) {
for(int i=1;i<list.size();i++){
List<String> rowdata = (List<String>)list.get(i);
if(rowdata.size()<=5||StringUtils.isEmpty(rowdata.get(5))){
if(rowdata.size()<2||StringUtils.isEmpty(rowdata.get(1))){
rowdata.add("error:批准数量不能为空");
continue;
}
try{
Float.parseFloat(rowdata.get(5));
Float.parseFloat(rowdata.get(1));
}catch (Exception e){
rowdata.add("error:批准数量必须是数字");
continue;
}
if(StringUtils.isEmpty(rowdata.get(1))){
if(StringUtils.isEmpty(rowdata.get(0))){
rowdata.add("error:申请单号不能为空");
continue;
}
Tauxiliarymaterials exist=this.tauxiliarymaterialsMapper.selectByApplyOrder(rowdata.get(1));
Tauxiliarymaterials exist=this.tauxiliarymaterialsMapper.selectByApplyOrder(rowdata.get(0));
if(exist==null){
rowdata.add("error:找不到辅材申请单");
continue;
}else if(TauxiliarymaterialStatusEnum.getEnumByName(0,exist.getApplyStatus()).getValue()!=1){
rowdata.add("error:辅材申请单:"+exist.getApplyOrder()+" 状态必须是已申请");
continue;
}
rowdata.add(exist.getMaterialCode());
rowdata.add(exist.getMaterialName());
rowdata.add(exist.getApprovedQuantity());
}
return list;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论