|
|
@@ -512,8 +512,8 @@ public class ERPServiceImpl implements ERPService {
|
|
|
int eiid = Integer.valueOf(m.get("ei_id").toString());
|
|
|
Map<String, Object> res = new HashMap<String, Object>();
|
|
|
StringBuffer errmsg = new StringBuffer();
|
|
|
- SqlRowList bluePiao = baseDao.queryForRowSet("select ei_id,ei_redapplyid,ei_billStatus,ei_billNo,ei_billUuid,ei_taxExcludedAmount,ei_taxAmount,ei_redReason " +
|
|
|
- "from elecinvoice " +
|
|
|
+ SqlRowList bluePiao = baseDao.queryForRowSet("select ei_id,ei_redapplyid,ei_billStatus,ei_billNo,ei_billUuid,ei_taxExcludedAmount,ei_taxAmount,ei_redReason,io_ordertype " +
|
|
|
+ "from elecinvoice left join invoiceOrder on ei_ioid = io_id " +
|
|
|
"where ei_ioid = '" + ioid + "' " + (eiid > 0 ? "and ei_id = " + eiid : "")
|
|
|
+ " and EI_INVOICETYPE = '1' and ei_redapplyid is not null and EI_RELATIVEREFNO is null and nvl(ei_billStatus,' ') in (' ','01','02','03','15') " +
|
|
|
"order by ei_Detno");
|
|
|
@@ -589,6 +589,7 @@ public class ERPServiceImpl implements ERPService {
|
|
|
elM.put("taxnum", m.get("taxnum"));
|
|
|
elM.put("io_id", ioid);
|
|
|
elM.put("io_code", m.get("io_code"));
|
|
|
+ elM.put("io_ordertype", bluePiao.getGeneralInt("io_ordertype"));
|
|
|
Map<String, Object> r = getElecInvoices(elM);
|
|
|
if (StringUtil.hasText(r.get("errMsg"))) {
|
|
|
baseDao.execute("update elecinvoice set EI_EXCEPTIONMESSAGE='" + r.get("errCode") + ": " + r.get("errMsg") + "' where EI_INVOICETYPE = '1' and ei_redapplyid is not null and EI_RELATIVEREFNO is null and ei_ioid = " + ioid);
|