zjh
2025-04-15 3acbfbf90dbaa7f87aa2d37405700a9abc08073a
ltkj-admin/src/main/java/com/ltkj/web/controller/sqlserver/TjSqlController.java
@@ -18,7 +18,6 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ConvertingCursor;
import org.springframework.data.redis.core.Cursor;
@@ -45,13 +44,10 @@
public class TjSqlController extends BaseController {
    @Resource
    private TestMapper testMapper;
    @Resource
    private TjvLtkjvtjpatService tjvLtkjvtjpatService;
    @Resource
    private LtkjMiddleDetailService middleDetailService;
    @Resource
    private LtkjMiddleHeadService headService;
    @Resource
@@ -62,16 +58,8 @@
    private LtkjHybgdService ltkjHybgdService;
    @Resource
    private LtkjHysqdService ltkjHysqdService;
    @Autowired
    public RedisTemplate<Object,Object> redisTemplate;
    @Resource
    private ITjCustomerService tjCustomerService;
    @Resource
    private RedisCache redisCache;
    @Resource
    private TjAsyncService asyncService;
    @Resource
    private ITjOrderRemarkService remarkService;
    @Resource
    private ITjOrderService orderService;
    @Resource
@@ -84,16 +72,22 @@
    private ITjOrderDetailService tjOrderDetailService;
    @Resource
    private ITjOrderRemarkService tjOrderRemarkService;
    @Resource
    private ITjProjectService projectService;
    @GetMapping("/getTjHyBgList")
    @ApiOperation(value = "查询lis数据库项目信息接口")
    public AjaxResult getTjHyBgList(@RequestParam(required = false)String pacCode,
                                    @RequestParam(required = false)String pacName,
                                    @RequestParam(required = false)String pacRemark) {
        List<Map<String, Object>> maps = testMapper.getTjHyBgList(pacCode,pacName,pacRemark);
        DynamicDataSourceContextHolder.clearDataSourceType();
        return AjaxResult.success(maps);
    public AjaxResult getTjHyBgList(@RequestParam(defaultValue = "1")Integer page,
                                    @RequestParam(defaultValue = "10")Integer pageSize,
                                    @RequestParam(required = false)String pname,
                                    @RequestParam(required = false)String pid,
                                    @RequestParam(required = false)String pym,
                                    @RequestParam(required = false)String checktype) {
//        List<Map<String, Object>> maps = testMapper.getTjHyBgList(pacCode,pacName,pacRemark);
//        DynamicDataSourceContextHolder.clearDataSourceType();
        Map<String,Object> map=  projectService.getTjHyBgList(page,pageSize,pname,pid,pym,checktype);
        return AjaxResult.success(map);
    }
@@ -101,28 +95,9 @@
    @ApiOperation(value = "A------新的查询体检信息接口")
    public AjaxResult newGetTjPat(@RequestParam(required = false)String pacCode,
                                  @RequestParam(required = false)String pacName,
                                  @RequestParam(required = false)String pacRemark, HttpServletRequest request,
                                  HttpSession session) {
//        List<Map<String, Object>> maps = testMapper.newGetTjPat111111(pacName);
                                  @RequestParam(required = false)String pacRemark) {
        List<Map<String, Object>> maps = testMapper.newGetTjPat(pacCode,pacName,pacRemark);
        DynamicDataSourceContextHolder.clearDataSourceType();
//        List<Map<String, Object>> list=new ArrayList<>();
//        if(null !=maps && maps.size()>0){
//            for (Map<String, Object> map : maps) {
//                String pacCode1 = map.get("pacCode").toString();
//                List<String> s = orderService.selectTjOrderByCardId1();
//                if(null !=s && s.size()>0){
//                    if(s.contains(pacCode1)){
////                        maps.remove(map);
//                        continue;
//                    }
//                    list.add(map);
//                }
//            }
//        }
//        return AjaxResult.success(list);
        List<String> strings = orderService.selectTjOrderByCardId1();
        if(null !=strings && strings.size()>0){
            List<Map<String, Object>> collect = maps.stream()
@@ -130,7 +105,6 @@
            return AjaxResult.success(collect);
        }
        return AjaxResult.success(maps);
//        return AjaxResult.success(collect);
    }
@@ -432,7 +406,7 @@
                //同步化验项目
                testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()),order.getTjNumber(), "1");
                //同步检查项目
                testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()),order.getTjNumber(),"1");
//                testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()),order.getTjNumber(),"1");
            }
//        }
        return AjaxResult.success("同步成功");
@@ -480,4 +454,13 @@
    }
    @GetMapping("/getWsxmLtkjHysqdByLisViBySLAVEWS")
    @ApiOperation(value = "查询外送项目SqlServer接口")
    public AjaxResult getWsxmLtkjHysqdByLisViBySLAVEWS(@RequestParam String s) {
//        List<LtkjHybgd> wsbg = testMapper.getWsxmLtkjHybgdByLisViBySLAVEWS(s);
//        log.info(wsbg.toString());
        return AjaxResult.success(testMapper.getWsxmLtkjHysqdByLisViBySLAVEWS(s));
    }
}