|
|
@@ -39,14 +39,14 @@ public class GDServiceImpl implements GDService {
|
|
|
PosEdiRequest posEdiRequest=new PosEdiRequest();
|
|
|
SimpleDateFormat formatYMD = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
ArrayList<PosItem> posItems=new ArrayList<>();
|
|
|
- SqlRowList rs = baseDao.queryForRowSet("select * from POSREPORT_GD_DET where id_error is not null and PD_PSID ="+id+" order by Pd_itemid");
|
|
|
+ SqlRowList rs = baseDao.queryForRowSet("select * from POSREPORT_GD_DET where nvl(pd_success,0)=0 and PD_PSID ="+id+" order by Pd_itemid");
|
|
|
while (rs.next()) {
|
|
|
PosItem posItem=new PosItem();
|
|
|
posItem.setItemId(rs.getInt("Pd_itemid"));
|
|
|
posItem.setDistiId(gdConfig.getDistiCode());
|
|
|
posItem.setCustomerId(rs.getGeneralString("PD_CUSTOMERID"));
|
|
|
posItem.setCpn(rs.getGeneralString("PD_CPN"));
|
|
|
- posItem.setResaleCustomerID(rs.getGeneralString("PD_RESALE_CUSTOMERID"));
|
|
|
+ posItem.setResaleCustomerID(rs.getGeneralString("PD_RESALE_CUSTOMER_ID"));
|
|
|
posItem.setResaleCustomerName(rs.getGeneralString("PD_RESALE_CUSTOMERNAME"));
|
|
|
posItem.setQuantity(rs.getDouble("PD_QUANTITY"));
|
|
|
posItem.setResalePrice(rs.getDouble("PD_RESALEPRICE"));
|
|
|
@@ -54,7 +54,7 @@ public class GDServiceImpl implements GDService {
|
|
|
posItem.setShippingDate(formatYMD.format(rs.getDate("PD_SHIPPINGDATE")));
|
|
|
posItem.setDelivery(rs.getGeneralString("PD_DELIVERY"));
|
|
|
posItem.setDeliveryItem(rs.getGeneralString("PD_DELIVERYITEM"));
|
|
|
- posItem.setDistiResaleCustomerName(rs.getString("PD_DISTRICSRESCALECUSTOMERNAME"));
|
|
|
+ posItem.setDistiResaleCustomerName(rs.getString("PD_DISTIRESALECUSTOMERNAME"));
|
|
|
posItem.setInvoiceDate(null);
|
|
|
posItems.add(posItem);
|
|
|
}
|
|
|
@@ -72,7 +72,7 @@ public class GDServiceImpl implements GDService {
|
|
|
errCount++;
|
|
|
restSqls.add("update POSREPORT_GD_DET set id_error='"+item.getErrorMessage()+"' where PD_PSID ="+id+" and pd_itemid="+item.getItemId());
|
|
|
}else{
|
|
|
- restSqls.add("update POSREPORT_GD_DET set id_error='' where PD_PSID ="+id+" and pd_itemid="+item.getItemId());
|
|
|
+ restSqls.add("update POSREPORT_GD_DET set pd_success=-1,id_error='' where PD_PSID ="+id+" and pd_itemid="+item.getItemId());
|
|
|
}
|
|
|
}
|
|
|
if(errCount==0){
|