40 lines
805 B
Java
40 lines
805 B
Java
package com.amarsoft.app.als.image;
|
|
|
|
import jbo.app.BUSINESS_APPLY;
|
|
|
|
import com.amarsoft.app.als.sys.tools.JBOHelper;
|
|
import com.amarsoft.are.jbo.BizObject;
|
|
import com.amarsoft.are.jbo.JBOTransaction;
|
|
|
|
/***
|
|
* 条形码相关服务
|
|
* 条形码可以唯一标示同一笔业务。
|
|
* @author ghShi
|
|
* @since 2014/04/26
|
|
*
|
|
*/
|
|
public class BarCodeSevice {
|
|
private String barCode;//条形码
|
|
/**
|
|
* 判断当前条形码是否已经存在
|
|
* @param tx
|
|
* @return
|
|
* @throws Exception
|
|
*/
|
|
public String isExistBarCode(JBOTransaction tx) throws Exception{
|
|
BizObject bo = JBOHelper.querySingle(BUSINESS_APPLY.CLASS_NAME, "BarCode=:BarCode", barCode);
|
|
if(bo == null)
|
|
return "false";
|
|
|
|
return "true";
|
|
}
|
|
|
|
public String getBarCode() {
|
|
return barCode;
|
|
}
|
|
|
|
public void setBarCode(String barCode) {
|
|
this.barCode = barCode;
|
|
}
|
|
}
|