This commit is contained in:
linfso 2025-06-17 18:06:55 +08:00
parent 963af279fe
commit 490adc639b
2 changed files with 10 additions and 14 deletions

View File

@ -129,7 +129,7 @@ public class EmisSupplierController extends BaseController
public AjaxResult getSupplierByName(EmisSupplier emisSupplier) public AjaxResult getSupplierByName(EmisSupplier emisSupplier)
{ {
if(StringUtils.isEmpty(emisSupplier.getName())){ if(StringUtils.isEmpty(emisSupplier.getName())){
return AjaxResult.error("供应商不存在"); return AjaxResult.error("供应商不名称不能为空");
} }
return AjaxResult.success(emisSupplierService.selectEmisSupplierByName(emisSupplier.getName())); return AjaxResult.success(emisSupplierService.selectEmisSupplierByName(emisSupplier.getName()));
} }

View File

@ -15,6 +15,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
import com.xdadan.erp.emis.utils.WaybillHelper; import com.xdadan.erp.emis.utils.WaybillHelper;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -75,26 +76,21 @@ public class EmisTmsSiteBatchController extends EmisBaseController
emisTmsSiteBatch.getParams().put("billCode",billCodeStr); emisTmsSiteBatch.getParams().put("billCode",billCodeStr);
} }
List<EmisTmsSiteBatch> list = emisTmsSiteBatchService.selectEmisTmsSiteBatchList(emisTmsSiteBatch); List<EmisTmsSiteBatch> list = emisTmsSiteBatchService.selectEmisTmsSiteBatchList(emisTmsSiteBatch);
return getDataTable(list); return getDataTable(list);
} }
@GetMapping("/getInfoBySupplerAndCarNo") /**
public AjaxResult getInfoBySupplerAndCarNo(EmisTmsSiteBatch emisTmsSiteBatch) * 用于批次批量上传使用
* @param emisTmsSiteBatch
* @return
*/
@GetMapping("/listBySupplerAndCarNo")
public TableDataInfo listBySupplerAndCarNo(EmisTmsSiteBatch emisTmsSiteBatch)
{ {
List<EmisTmsSiteBatch> list = emisTmsSiteBatchService.selectTmsSiteBatchBySupplerAndCarNo(emisTmsSiteBatch.getSupplierCode(),emisTmsSiteBatch.getCarNo()); List<EmisTmsSiteBatch> list = emisTmsSiteBatchService.selectTmsSiteBatchBySupplerAndCarNo(emisTmsSiteBatch.getSupplierCode(),emisTmsSiteBatch.getCarNo());
if(!CollectionUtils.isEmpty(list)){ return getDataTable(list);
return AjaxResult.error("未找到批次信息");
}
if(list.size()>1){
return AjaxResult.error("存在多条批次信息");
}
return AjaxResult.success("成功",list.get(0));
} }