|
@@ -8,6 +8,7 @@ import com.uas.erp.core.support.SystemSession;
|
|
|
import com.uas.erp.dao.BaseDao;
|
|
|
import com.uas.erp.dao.SqlRowList;
|
|
|
import com.uas.erp.dao.common.VerifyApplyDao;
|
|
|
+import com.uas.erp.model.UserSession;
|
|
|
import com.uas.pda.dao.PdaCommonDao;
|
|
|
import com.uas.pda.service.PdaBatchService;
|
|
|
import com.uas.pda.service.PdaMsdService;
|
|
@@ -2066,4 +2067,34 @@ public class PdaOutMaterialServiceImpl implements PdaOutMaterialService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void khbarcode(String barcode, String ids, boolean ifcancel) {
|
|
|
+ SqlRowList rs = null;
|
|
|
+ if(ifcancel)
|
|
|
+ {
|
|
|
+ if (!baseDao.checkIf("barcodeio"," bi_barcode = '"+barcode+"' and bi_type = '客户码' and bi_piid = '"+ids+"' "))
|
|
|
+ {
|
|
|
+ throw new APIErrorException(APIErrorCode.DATA_NOT_FOUND,"客户码:"+barcode+"未在此单采集,无法取消");
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ baseDao.execute("delete barcodeio where bi_barcode = '"+barcode+"' and bi_type = '客户码' and bi_piid = '"+ids+"' ");
|
|
|
+ }
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ if (baseDao.checkIf("barcodeio"," bi_barcode = '"+barcode+"' and bi_type = '客户码' "))
|
|
|
+ {
|
|
|
+ rs = baseDao.queryForRowSet(" select * from barcodeio where bi_barcode = '"+barcode+"' and bi_type = '客户码' ");
|
|
|
+ rs.next();
|
|
|
+ throw new APIErrorException(APIErrorCode.DATA_NOT_FOUND,"客户码:"+barcode+"已在"+rs.getString("bi_inoutno")+"采集,无法重复采集");
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ baseDao.execute(" insert into barcodeio (bi_id,bi_barcode,bi_piid,bi_piclass,bi_inoutno,bi_inman,bi_indate,bi_type)" +
|
|
|
+ " select barcodeio_seq.nextval,'"+barcode+"',pi_id,pi_class,pi_inoutno,'"+ SystemSession.getUser().getEm_name() +"',sysdate,'客户码' from prodinout where pi_id = '"+ids+"' ");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|