package com.ann.demo; import com.ann.demo.entity.filing.ArchiveDetail; import com.ann.demo.interfaces.impl.HomepageDictionaryImpl; import com.ann.demo.repository.ArchiveDetailRepository; import com.ann.demo.repository.ArchiveMasterRepository; import com.ann.demo.service.ArchiveDetailService; import com.ann.demo.service.ArchiveMasterService; import com.ann.demo.service.impl.ArchiveDetailServiceImpl; import org.apache.cxf.endpoint.Client; import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import sun.net.ftp.FtpClient; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * @Author: LeiJiaXin * @Date: 2019/7/18 10:47 */ @RestController @RequestMapping("/") public class TestController { @Autowired private ArchiveDetailServiceImpl archiveDetailService; // @Autowired // private ArchiveDetailService archiveDetailService; // // @Autowired // private ArchiveMasterService archiveMasterService; // // // pdf地址 // public static String mustCheckData; // // @Value("${mustCheckData}") // public void setMustCheckData(String mustCheckData) { // TestController.mustCheckData = mustCheckData; // } // // public static String getMustCheckData() { // return mustCheckData; // } @RequestMapping("/haha1") public String createJob1() { JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); Client client = dcf.createClient("http://localhost:8080/services/HomepageDictionary?wsdl"); Object[] objects = new Object[0]; // invoke("方法名",参数1,参数2,参数3....); try { objects = client.invoke("CheckData", "010affd1-cba8-4ece-97a2-ef49931151ed"); } catch (Exception e) { e.printStackTrace(); } return objects[0].toString(); } @RequestMapping("/haha") public String createJob() { List list = new ArrayList(); list.add("10"); // archiveDetailService.getInspectionReportNotExits(list,"02e4bec6-633f-49cf-9acd-a3d332376800"); return "123"; } // Integer result = archiveMasterService.countByIdAndIsValid(masterId); // // if (result == 0){ // return "没有该患者信息!"; // } // // // 必须检查类型 // StringBuffer sb = new StringBuffer(); // if (mustCheckData != "") { // String[] mustCheckDataArray = mustCheckData.split(","); // List types = Arrays.asList(mustCheckDataArray); // String typeIsExits = archiveDetailService.getTypeNotExits(types, masterId); // if (typeIsExits != null) { // sb.append(typeIsExits + "缺失"); // } // } // // // 检查申请单 // String checkReportNotExits = archiveDetailService.getCheckReportNotExits(masterId); // if(checkReportNotExits != null){ // if(sb.length() != 0){ // sb.append(","); // } // sb.append(checkReportNotExits); // } // // // 检验申请单 // // //最后 // if (sb.length() == 0) { // sb.append("完整"); // } // return sb + ""; // } }