lige
2023-11-30 3f28b46171934066aeeff9af80d3f0ce6afb3adf
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -25,6 +25,7 @@
import com.ltkj.common.core.redis.RedisCache;
import com.ltkj.common.utils.SecurityUtils;
import com.ltkj.framework.config.MatchUtils;
import com.ltkj.framework.config.UserHoder;
import com.ltkj.hosp.domain.*;
import com.ltkj.hosp.service.*;
import com.ltkj.hosp.vodomain.BingZhongVO;
@@ -432,6 +433,7 @@
                    LambdaQueryWrapper<TjOrder> wq = new LambdaQueryWrapper<>();
                    wq.isNotNull(TjOrder::getReportTime);
                    wq.eq(TjOrder::getUserId, customer.getCusId());
                    wq.eq(TjOrder::getHeshouStatus, 1); //核收状态为1才能打印
                    list.addAll(tjOrderService.list(wq));
                }
                List<TjOrder> collect = null;
@@ -483,6 +485,7 @@
        Page<TjOrder> page1 = new Page<>(pageNum, pageSize);
        LambdaQueryWrapper<TjOrder> wq = new LambdaQueryWrapper<>();
        wq.isNotNull(TjOrder::getReportTime);
        wq.eq(TjOrder::getHeshouStatus, 1);  //核收状态为1才能打印
        if (null != bgbeginTime && null != bgendTime) {
            wq.between(TjOrder::getCreateTime, DateUtil.beginOfDay(bgbeginTime), DateUtil.endOfDay(bgendTime));
        }
@@ -1615,4 +1618,21 @@
        System.out.println("这段代码时间" + (System.currentTimeMillis() - l));
    }
    @PostMapping("/heXiaoByIds/{orderIds}")
    @ApiOperation(value = "核收报告——————总检审核通过后可以核销,核收后才能打印")
    @Transactional
    public AjaxResult heXiaoByIds(@PathVariable String[] orderIds) {
        for (String orderId : orderIds) {
            final TjOrder byId = tjOrderService.getById(orderId);
            byId.setHeshouStatus(1);
            byId.setHeshouDoctor(UserHoder.getLoginUser().getUserId());
            byId.setHeshouTime(new DateTime());
            final boolean b = tjOrderService.updateById(byId);
            if (!b){
                return AjaxResult.error("核收失败");
            }
        }
        return AjaxResult.success("核收成功");
    }
}