Commit 57be9c45 authored by Quxl's avatar Quxl

x

parent 8b7c0f86
...@@ -14,6 +14,8 @@ public class DELETED_DOCUMENTS { ...@@ -14,6 +14,8 @@ public class DELETED_DOCUMENTS {
String DOCTYPE; String DOCTYPE;
String DOCNUMBER; String DOCNUMBER;
String SALES_ORG; String SALES_ORG;
String DELETED_BY;
String SOLD_TO;
public String getTARGET_SYSTEM() { public String getTARGET_SYSTEM() {
return TARGET_SYSTEM; return TARGET_SYSTEM;
...@@ -47,4 +49,20 @@ public class DELETED_DOCUMENTS { ...@@ -47,4 +49,20 @@ public class DELETED_DOCUMENTS {
SALES_ORG = sALES_ORG; SALES_ORG = sALES_ORG;
} }
public String getDELETED_BY() {
return DELETED_BY;
}
public void setDELETED_BY(String dELETED_BY) {
DELETED_BY = dELETED_BY;
}
public String getSOLD_TO() {
return SOLD_TO;
}
public void setSOLD_TO(String sOLD_TO) {
SOLD_TO = sOLD_TO;
}
} }
\ No newline at end of file
package com.egolm.sso.services.dn_deletion; package com.egolm.sso.services.dn_deletion;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.jws.WebService; import javax.jws.WebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.egolm.sso.services.CommonService;
import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.SqlUtil;
import com.egolm.sso.util.SqlUtil.Sql;
@Component @Component
@WebService(serviceName = "DNDeletionService", targetNamespace = "http://dn_deletion.sso.egolm.com", endpointInterface = "com.egolm.sso.services.dn_deletion.DNDeletionService") @WebService(serviceName = "DNDeletionService", targetNamespace = "http://dn_deletion.sso.egolm.com", endpointInterface = "com.egolm.sso.services.dn_deletion.DNDeletionService")
public class DNDeletionServiceImpl implements DNDeletionService { public class DNDeletionServiceImpl implements DNDeletionService {
@Autowired
JdbcTemplate jdbcTemplate;
@Autowired
CommonService common;
@Override @Override
@Transactional @Transactional
public void execute(DELETED_DOCUMENTS DELETED_DOCUMENTS) { public void execute(DELETED_DOCUMENTS DELETED_DOCUMENTS) {
Date now = new Date();
String dateString = DateUtil.formatDate(now, DateUtil.FMT_DATE);
Map<String, Object> map = new HashMap<String, Object>();
map.put("TARGET_SYSTEM", DELETED_DOCUMENTS.getTARGET_SYSTEM());
map.put("DOCTYPE", DELETED_DOCUMENTS.getDOCTYPE());
map.put("DOCNUMBER", DELETED_DOCUMENTS.getDOCNUMBER());
map.put("SALES_ORG", DELETED_DOCUMENTS.getSALES_ORG());
map.put("DELETED_BY", DELETED_DOCUMENTS.getDELETED_BY());
map.put("SOLD_TO", DELETED_DOCUMENTS.getSOLD_TO());
map.put("BATCH", dateString + "-" + common.getNextval("T_SO_DN_DELETION_BATCH" + dateString));
map.put("SEND_STATUS", "N");
map.put("SEND_TIME", now);
map.put("CREATED", now);
map.put("CREATEDBY", "system");
map.put("UPDATED", now);
map.put("UPDATEDBY", "system");
Sql headerSql = SqlUtil.insertSql("t_so_dn_deletion", map);
jdbcTemplate.update(headerSql.getSql(), headerSql.getArgs());
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment