zjh
4 天以前 cc25bc0eec2d50da39d62f9896ed4d5e66805366
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjFlowingWaterController.java
@@ -30,6 +30,7 @@
import com.ltkj.system.service.ISysConfigService;
import com.ltkj.system.service.ISysDeptService;
import com.ltkj.system.service.ISysUserService;
import com.ltkj.web.controller.his.HisApiMethod;
import com.ltkj.web.wxUtils.HttpClientUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -37,6 +38,7 @@
import jodd.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.NoTransactionException;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.bind.annotation.*;
@@ -99,7 +101,8 @@
    private TjOrderController tjOrderController;
    @Autowired
    private ITbTransitionService tbTransitionService;
    @Autowired
    private HisApiMethod hisApiMethod;
    /**
     * 查询该体检号对应的订单流水列表
     */
@@ -235,8 +238,8 @@
//        tjFlowingWater.setPayStasus(1L);
        TjOrder order = orderService.getById(tjFlowingWater.getOrderId());
        if (order.getFinishTime() != null) {
            return AjaxResult.error("该人员已签离,不可补录项目!");
        if (order.getPrintLastTime() != null) {
            return AjaxResult.error("该人员报告已打印,不可补录项目!");
        }
        TjCustomer customer = customerService.getById(order.getUserId());
@@ -245,17 +248,21 @@
            tjFlowingWater.setIsAddition("Y");
            if (tjFlowingWater.getPayStasus().toString().equals("0")) {
                tjFlowingWater.setPayStasus(0L);
                tjFlowingWater.setZfgf(tjFlowingWater.getPayStasus().toString());
            } else {
                tjFlowingWater.setPayStasus(1L);
            }
            tjFlowingWater.setZfgf(tjFlowingWater.getPayStasus().toString());
            if (tjFlowingWaterService.save(tjFlowingWater)) {
                Date dates = new Date();
                String jxbz = DateUtil.format(dates, "yyyyMMddHHmmss") + order.getOrderId();
                //异步单项收费明细
                Boolean b = asyncService.iundividualCharges(tjFlowingWater, order, customer, sysUser, jxbz);
                if (!b) {
                try {
                    Boolean b = asyncService.iundividualCharges(tjFlowingWater, order, customer, sysUser, jxbz);
                } catch (NoTransactionException e) {
                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                    hisApiMethod.ZfBlHisApiMethod(order.getTjNumber(), jxbz);
                    return AjaxResult.error();
                }
@@ -1338,7 +1345,7 @@
                            list2.add(tjConsumables);
                        }
                    }
                    if (null != list && list.size() > 0) {
                    if (null != list && !list.isEmpty()) {
                        ArrayList<TjConsumables> collectw = list2.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TjConsumables::getId))), ArrayList::new));
                        for (TjConsumables tjConsumables : collectw) {
                            LambdaQueryWrapper<TjChargingStandard> wqq = new LambdaQueryWrapper<>();
@@ -1363,4 +1370,38 @@
        }
        return AjaxResult.error();
    }
    @GetMapping("/gettuantijiesuanrenyuan")
    @ApiOperation(value = "获取团体结算人员")
    public AjaxResult gettuantijiesuanrenyuan(@RequestParam(required = false) @ApiParam("单位ID") String dwId,
                                              @RequestParam(required = false) @ApiParam("登记开始时间") String djkssj,
                                              @RequestParam(required = false) @ApiParam("登记结束时间") String djjssj,
                                              @RequestParam(required = false) @ApiParam("结算开始时间") String jskssj,
                                              @RequestParam(required = false) @ApiParam("结算结束时间") String jsjssj,
                                              @RequestParam(required = false) @ApiParam("体检号") String tjh,
                                              @RequestParam(required = false) @ApiParam("结算人id") String jsrid,
                                              @ApiParam(value = "显示条数(默认10)") @RequestParam(defaultValue = "10") Integer pageSize,
                                              @ApiParam(value = "页码数(默认1)") @RequestParam(defaultValue = "1") Integer page) {
        if (StringUtil.isNotBlank(dwId)) dwId = "";
        if (StringUtil.isNotBlank(djkssj)) djkssj = "";
        if (StringUtil.isNotBlank(djjssj)) djjssj = "";
        if (StringUtil.isNotBlank(jskssj)) jskssj = "";
        if (StringUtil.isNotBlank(jsjssj)) jsjssj = "";
        if (StringUtil.isNotBlank(tjh)) tjh = "";
        if (StringUtil.isNotBlank(jsrid)) jsrid = "";
        return AjaxResult.success(tjFlowingWaterService.gettuantijiesuanrenyuan(page, pageSize,dwId,djkssj, djjssj, jskssj, jsjssj, tjh, jsrid));
    }
    @PostMapping("/tuantijiesuan")
    @ApiOperation(value = "团体结算")
    public AjaxResult tuantijiesuan(@RequestParam(required = false) @ApiParam("单位ID") List<String> dwId) {
        return AjaxResult.success();
    }
}