zjh
2025-06-05 2eb40036e885988fbf93ebcb98a339b197fb6340
ltkj-admin/src/main/java/com/ltkj/web/controller/barcode/PrintBarCodeController.java
@@ -5,6 +5,7 @@
import com.ltkj.common.core.page.TableDataInfo;
import com.ltkj.hosp.domain.*;
import com.ltkj.hosp.service.*;
import com.ltkj.system.service.ISysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@@ -47,8 +48,10 @@
    private TjProConsumablesService proConsumablesService;
    @Resource
    private ITjConsumablesService consumablesService;
    @Value("${path.filePath}")
    private String value;
//    @Value("${path.filePath}")
//    private String value;
@Autowired
private ISysConfigService configService;
    /**
     * 打印条码
     */
@@ -58,7 +61,7 @@
        LambdaQueryWrapper<TjOrder> wq = new LambdaQueryWrapper<>();
        wq.eq(TjOrder::getTjNumber, tjNumber);
        TjOrder tjOrder = tjOrderService.getOne(wq);
        String value = configService.selectConfigByKey("path_filePath");
        if (tjOrder!=null){
            LambdaQueryWrapper<TjCustomer> wq1 = new LambdaQueryWrapper<>();
            wq1.eq(TjCustomer::getCusId, tjOrder.getUserId());
@@ -110,7 +113,7 @@
    @GetMapping("/GetByCode")
    @ApiOperation(value = "根据图片识别条码")
    public AjaxResult GetByCode(String path) {
        path=value+"10001230306223716蓝色头盖管.jpg";
//        path=value+"10001230306223716蓝色头盖管.jpg";
        //识别条码
        String s = QRCodeUtils.deEncodeByPath(path);
        return AjaxResult.success(s);