zjh
2024-06-20 7a4ef2968a0d5d28b2fedaaaec2227557fc9d420
ltkj-admin/src/main/java/com/ltkj/web/controller/sqlserver/TjSqlController.java
@@ -28,12 +28,12 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import static com.ltkj.framework.datasource.DynamicDataSourceContextHolder.log;
import static org.apache.poi.hemf.record.emfplus.HemfPlusRecordType.save;
@@ -98,13 +98,18 @@
    @GetMapping("/newGetTjPat")
    @ApiOperation(value = "新的查询体检信息接口")
    @ApiOperation(value = "A------新的查询体检信息接口")
    public AjaxResult newGetTjPat(@RequestParam(required = false)String pacCode,
                                  @RequestParam(required = false)String pacName,
                                  @RequestParam(required = false)String pacRemark) {
//        List<Map<String, Object>> maps = testMapper.newGetTjPat111111(pacName);
        List<Map<String, Object>> maps = testMapper.newGetTjPat(pacCode,pacName,pacRemark);
        DynamicDataSourceContextHolder.clearDataSourceType();
        List<String> strings = orderService.selectTjOrderByCardId1();
        if(null !=strings && strings.size()>0){
            List<Map<String, Object>> collect = maps.stream()
                    .filter(item ->  !strings.contains(item.get("pacCode").toString())).collect(Collectors.toList());
            return AjaxResult.success(collect);
        }
        return AjaxResult.success(maps);
    }