| | |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.hosp.sqlDomain.*; |
| | | import com.ltkj.hosp.mapper.TestMapper; |
| | | import com.ltkj.system.service.ISysDeptService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.checkerframework.checker.units.qual.A; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | private ITjOrderRemarkService remarkService; |
| | | @Resource |
| | | private ITjOrderService orderService; |
| | | @Resource |
| | | private ISysDeptService deptService; |
| | | @GetMapping("/getRedisValue") |
| | | @ApiOperation(value = "测试redis模糊查询") |
| | | public AjaxResult getRedisValue() { |
| | | public AjaxResult getRedisValue(@RequestParam int aa, |
| | | @RequestParam(defaultValue = "1") Integer page, |
| | | @RequestParam(defaultValue = "10") Integer pageSize, |
| | | @RequestParam(required = false) String deptId, |
| | | @RequestParam(required = false) String tjName, |
| | | @RequestParam(required = false) String tjNum) throws SQLException { |
| | | // long start = System.currentTimeMillis(); |
| | | // //需要匹配的key |
| | | // ScanOptions options = ScanOptions.scanOptions() |
| | |
| | | // Map<String,Object>map=new HashMap<>(); |
| | | // map.put("result",result); |
| | | // map.put("scan扫描共耗时:{} ms key数量:{}",System.currentTimeMillis()-start+result.size()); |
| | | List<TjOrderRemark> list = remarkService.list(new LambdaQueryWrapper<TjOrderRemark>().ne(TjOrderRemark::getType,2).groupBy(TjOrderRemark::getTjNumber)); |
| | | for (TjOrderRemark remark : list) { |
| | | TjOrder orderByTjNum = orderService.getOrderByTjNum(remark.getTjNumber()); |
| | | if(null !=orderByTjNum){ |
| | | asyncService.dockerSetWjCustomerByRedis(orderByTjNum.getOrderId(),remark.getDeptId()); |
| | | asyncService.dockerSetYjCustomerByRedis(orderByTjNum.getOrderId(),remark.getDeptId()); |
| | | } |
| | | // List<TjOrderRemark> list = remarkService.list(new LambdaQueryWrapper<TjOrderRemark>().ne(TjOrderRemark::getType,2).groupBy(TjOrderRemark::getTjNumber)); |
| | | // for (TjOrderRemark remark : list) { |
| | | // TjOrder orderByTjNum = orderService.getOrderByTjNum(remark.getTjNumber()); |
| | | // if(null !=orderByTjNum){ |
| | | // asyncService.dockerSetWjCustomerByRedis(orderByTjNum.getOrderId(),remark.getDeptId()); |
| | | // asyncService.dockerSetYjCustomerByRedis(orderByTjNum.getOrderId(),remark.getDeptId()); |
| | | // } |
| | | // } |
| | | if(null==deptId) deptId=""; |
| | | if(null==tjName) tjName=""; |
| | | if(null==tjNum) tjNum=""; |
| | | |
| | | // List<Map<String, Object>> map = deptService.getSysDeptYjWjCustomerList(deptId, tjName, tjNum, aa, page, pageSize); |
| | | // List<ResultSet> map = deptService.getSysDeptYjWjCustomerList1(deptId, tjName, tjNum, aa, page, pageSize); |
| | | ResultSet resultSet = deptService.getSysDeptYjWjCustomerList12(deptId, tjName, tjNum, aa, page, pageSize); |
| | | while (resultSet.next()){ |
| | | String anInt = resultSet.getString(1); |
| | | System.out.println(anInt); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |