Commit c925955d authored by Quxl's avatar Quxl

x

parent 4ae7ba41
......@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.egolm.sso.clients.SI_004_INVENTORY_SyncOutService.SI004INVENTORYSyncOutServiceTask;
import com.egolm.sso.clients.SI_011_ACTUAL_SALES_SyncOutService.SI011ACTUALSALESSyncOutServiceTask;
import com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION.ZMISD009SOCREATIONServiceTask;
import com.egolm.sso.services.CommonService;
import com.egolm.sso.util.DateUtil;
......@@ -31,6 +33,12 @@ public class TestController {
@Autowired
ZMISD009SOCREATIONServiceTask task;
@Autowired
SI011ACTUALSALESSyncOutServiceTask si011Task;
@Autowired
SI004INVENTORYSyncOutServiceTask si004Task;
private void verify() {
if(!profiles.contains("dev")) {
throw new RuntimeException("spring.profiles.active=" + profiles + ", The test interface has been closed.");
......@@ -43,6 +51,8 @@ public class TestController {
Map<String, String> map = new LinkedHashMap<String, String>();
map.put("/", "/");
map.put("/009_SO_CREATION", "009_SO_CREATION");
map.put("/004_INVENTORY", "004_INVENTORY");
map.put("/011_ACTUAL_SALES", "011_ACTUAL_SALES");
map.put("/getToken", "getToken");
map.put("/saveOrderTracking", "saveOrderTracking");
StringBuffer sb = new StringBuffer();
......@@ -60,6 +70,20 @@ public class TestController {
return "OK";
}
@RequestMapping(value= {"/004_INVENTORY"}, method = {RequestMethod.GET, RequestMethod.POST})
public String si004Task() throws MalformedURLException {
this.verify();
si004Task.runTask();
return "OK";
}
@RequestMapping(value= {"/011_ACTUAL_SALES"}, method = {RequestMethod.GET, RequestMethod.POST})
public String si011Task() throws MalformedURLException {
this.verify();
si011Task.runTask();
return "OK";
}
@GetMapping("getToken")
public Object getToken() {
String token = common.getToken();
......@@ -71,5 +95,4 @@ public class TestController {
return common.saveOrderTracking("sapmaterialmaster" + DateUtil.formatDate(new Date(), DateUtil.FMT_DATETIME), "MaterialMaster", "123456", "123456", "G", null, "操作失败", "操作失败");
}
}
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