zjh
2023-10-17 4d1cc2fd7553f3c648da150971cd4a87c282f5ad
zjh 2023/10/17--1
16个文件已修改
5个文件已添加
461 ■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictHospController.java 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysLoginController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjNewFlowingWaterController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjSummaryController.java 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTollCollectorController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuReportTokenService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/resources/application-druid.yml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/resources/application.yml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/test/java/zjhTest.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-framework/src/main/java/com/ltkj/framework/web/service/SysLoginService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictHosp.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjSummary.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTollCollector.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjSummaryMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjSummaryService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/TjAsyncService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjSummaryServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -7,6 +7,7 @@
import com.ltkj.common.core.domain.entity.SysUser;
import com.ltkj.common.core.redis.RedisCache;
import com.ltkj.common.utils.StringUtils;
import com.ltkj.framework.config.MatchUtils;
import com.ltkj.hosp.domain.*;
import com.ltkj.hosp.service.*;
import com.ltkj.hosp.vodomain.AddNewReservationConfirm;
@@ -81,6 +82,12 @@
    private ITjAdviceService tjAdviceService;
    @Resource
    private ISysUserService userService;
    @Resource
    private IJimuOnlineReportService reportService;
    @Resource
    private ITjDwDeptService dwDeptService;
    @Resource
    private ITjPrintOrderService printOrderService;
    @Override
@@ -903,13 +910,54 @@
        redisCache.setCacheMapValue("updateCheckType"+tjNum,tjNum,getAjaxResult(tjNum));
    }
//    @Override
//    @Async("async")
//    public void addRedis(List<TjCustomer> customers) {
//        for (TjCustomer customer : customers) {
//            redisCache.setCacheMapValue("updateCheckType"+customer.getTjNumber(),customer.getTjNumber(),getAjaxResult(customer.getTjNumber()));
//        }
//    }
    @Override
    @Async("async")
    public void getPrintOrderList(List<TjOrder> list) {
        redisCache.setCacheMapValue("getPrintOrderList","0",extracted(0, list));
        redisCache.setCacheMapValue("getPrintOrderList","1",extracted(1, list));
    }
    private List<TjOrder> extracted(Integer type, List<TjOrder> list) {
        List<TjOrder> list1=new ArrayList<>();
        for (TjOrder order : list) {
            TjCustomer tjCustomer = tjCustomerService.selectTjCustomerByCusId(order.getUserId());
            if (null != tjCustomer) {
                order.setTjCustomerSex(tjCustomer.getCusSex());
                order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                order.setGrMoBanId(reportService.getGrMoBanIds());
                order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
            }
            String firmId = order.getFirmId();
            if (firmId != null && null != compService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId()))) {
                order.setDictCompName(compService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId())).getCnName());
            }
            if (null != order.getPacId()) {
                if (null != tjPackageService.getById(order.getPacId())) {
                    order.setPacName(tjPackageService.getById(order.getPacId()).getPacName());
                }
                if (null != dwDeptService.getById(order.getPacId())) {
                    order.setPacName(dwDeptService.getById(order.getPacId()).getDwDeptName());
                }
            }
            //从打印记录查出最新打印时间
            TjPrintOrder one = printOrderService.getTjPrintOrderByTjNum(order.getTjNumber());
            if (null != type && type == 1 && one != null) {
                order.setPrintTime(one.getCreateTime());
                order.setPrintName(one.getCreateBy());
                order.setType(1);
                list1.add(order);
            }
            if (null != type && type == 0 && one == null) {
                order.setType(0);
                list1.add(order);
            }
        }
        return list1;
    }
    private void getTjPackageListsByMan(List<TjPackage> tjPackageList) {
        if (null != tjPackageList && tjPackageList.size() > 0) {
ltkj-admin/src/main/java/com/ltkj/web/controller/system/DictHospController.java
@@ -4,19 +4,18 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.extra.pinyin.PinyinUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ltkj.common.core.domain.entity.SysDept;
import com.ltkj.framework.config.MatchUtils;
import com.ltkj.framework.web.domain.server.Sys;
import com.ltkj.hosp.service.IDictOrgService;
import com.ltkj.system.service.ISysDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.ltkj.common.annotation.Log;
import com.ltkj.common.core.controller.BaseController;
import com.ltkj.common.core.domain.AjaxResult;
@@ -34,12 +33,24 @@
 */
@RestController
@RequestMapping("/hosp/hosp")
@Api(tags = "分院管理模块接口")
@Api(tags = "PC端 所属医院管理模块接口")
public class DictHospController extends BaseController {
    @Resource
    private IDictHospService dictHospService;
    @Resource
    private IDictOrgService orgService;
    @Resource
    private ISysDeptService deptService;
    @GetMapping("/getDeptListByDictHospId")
    @ApiOperation(value = "跟医院查询对应的部门科室")
    public AjaxResult getDeptListByDictHospId(@RequestParam String id ) {
        List<SysDept> list = deptService.list(new LambdaQueryWrapper<SysDept>().eq(SysDept::getHospId,id));
        return AjaxResult.success(list);
    }
    /**
     * 查询院区信息列表
@@ -84,7 +95,11 @@
    @PostMapping
    @ApiOperation(value = "新增院区信息")
    public AjaxResult add(@RequestBody DictHosp dictHosp) {
        if(null !=dictHosp.getHospid() ){
        dictHosp.setHospName(orgService.getById(dictHosp.getHospid()).getOrgCnName());
        }
        dictHosp.setWbm(MatchUtils.toWubi(dictHosp.getHospAreaName()));
        dictHosp.setSpell(PinyinUtil.getFirstLetter(dictHosp.getHospAreaName(),""));
        return toAjax(dictHospService.save(dictHosp));
    }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysLoginController.java
@@ -121,7 +121,7 @@
                        if (null != sysDept) {
                            DictHosp dictHosp = hospService.getById(sysDept.getHospId());
                            if(null !=dictHosp && dictHosp.getSecretKey() !=null && dictHosp.getExpirationTime() !=null){
                                if (!SecurityUtils.matchesMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getAreaid(),
                                if (!SecurityUtils.matchesMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getHospAreaName(),
                                        dictHosp.getExpirationTime(),dictHosp.getSecretKey())) {
                                    String userIdKey = Constants.LOGIN_USERID_KEY + user.getUserId();
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjNewFlowingWaterController.java
@@ -71,6 +71,7 @@
        List<Long> collect =null;
        TjCustomer one =null;
        Date date=new Date();
        LambdaQueryWrapper<TjFlowingWater> wq1 = new LambdaQueryWrapper<>();
        if(null !=phone || null !=name){
            LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();
@@ -89,7 +90,7 @@
        if(null !=collect){
            wq1.in(TjFlowingWater::getOrderId, collect);
        }
        wq1.between(TjFlowingWater::getCreateTime,DateUtil.beginOfDay(new Date()),DateUtil.endOfDay(new Date()));
        wq1.between(TjFlowingWater::getCreateTime,DateUtil.beginOfDay(date),DateUtil.endOfDay(date));
        wq1.eq(TjFlowingWater::getPayStasus,type);
        waterList = flowingWaterService.list(wq1);
@@ -112,7 +113,7 @@
    @GetMapping("/getTjPrice")
    @ApiOperation(value = "获取体检费用")
    public AjaxResult getTjPrice() {
        TjProject project = projectService.getOne(new LambdaQueryWrapper<TjProject>().eq(TjProject::getProName, "体检费")
        TjProject project = projectService.getOne(new LambdaQueryWrapper<TjProject>().eq(TjProject::getProName, "体检项目")
                .eq(TjProject::getProId, 1712272744924446722L));
        if (null != project) {
            return AjaxResult.success(project.getProPrice());
@@ -148,14 +149,17 @@
//        } else {
//            cusId = one.getCusId();
//        }
        Date date=new Date();
        TjOrder tjOrder = new TjOrder();
        tjOrder.setUserId(customer.getCusId());
        tjOrder.setTjType("2");
        //生成体检号
        String tjNumber = (SecurityUtils.getUsername() + new SimpleDateFormat("yyMMddHHmmss").format(new Date()));
        String tjNumber = (SecurityUtils.getUsername() + new SimpleDateFormat("yyMMddHHmmss").format(date));
        tjOrder.setTjNumber(tjNumber);
        tjOrder.setFirmId("0");
        tjOrder.setStatus(TjConstants.TJ_BEGIN);
        tjOrder.setFinishTime(date);
        tjOrder.setReportTime(date);
        if (orderService.save(tjOrder)) {
            LambdaQueryWrapper<TjFlowingWater> wq = new LambdaQueryWrapper<>();
@@ -178,10 +182,10 @@
            tjFlowingWater.setPaidIn(vo.getSs());
            tjFlowingWater.setDiscount(vo.getZk());
            tjFlowingWater.setPayStasus(1L);
            Date date1 = new Date(System.currentTimeMillis());
            String s1 = SecurityUtils.getUsername() + new SimpleDateFormat("yyMMddHHmmssSSS").format(date1);
            String s1 = SecurityUtils.getUsername() + new SimpleDateFormat("yyMMddHHmmssSSS").format(date);
            tjFlowingWater.setWaterId(s1);
            tjFlowingWater.setRemarks("已收费");
            tjFlowingWater.setTollCollectorId(String.valueOf(SecurityUtils.getLoginUser().getUserId()));
            if (flowingWaterService.save(tjFlowingWater)) {
                tjOrder.setTjSerialNumber(String.valueOf(tjFlowingWater.getTjSerialNumber()));
                orderService.updateById(tjOrder);
@@ -195,7 +199,7 @@
                tjChargingStandard.setCount(Long.valueOf(vo.getNumber()));
                chargingStandardService.save(tjChargingStandard);
            }
            return AjaxResult.success();
            return AjaxResult.success(tjNumber);
        }
        return AjaxResult.error();
    }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -562,8 +562,8 @@
                            order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                            order.setGrMoBanId(reportService.getGrMoBanIds());
                            order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                            order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                            order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                            if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                            if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                        }
                        String firmId = order.getFirmId();
                        if (firmId != null && null != iDictCompService.getById(String.valueOf(order.getFirmId()))) {
@@ -613,8 +613,8 @@
                        order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                        order.setGrMoBanId(reportService.getGrMoBanIds());
                        order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                        order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                        order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                        if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                        if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                    }
                    String firmId = order.getFirmId();
                    if (firmId != null && null != iDictCompService.getById(String.valueOf(order.getFirmId()))) {
@@ -656,7 +656,32 @@
        List<TjOrder> list = Optional.ofNullable(tjOrderService.list(wq)).get();
        if (list.size() > 0) {
            asyncService.getPrintOrderList(list);
            if(redisCache.hasKey("getPrintOrderList")){
                if(null !=type && type==0){
                    List<TjOrder> list1 = redisCache.getCacheMapValue("getPrintOrderList", "0");
                    collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                }
                if(null !=type && type==1){
                    List<TjOrder> list1 = redisCache.getCacheMapValue("getPrintOrderList","1");
                    collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                }
            }else {
            List<TjOrder> list1 = new ArrayList<>();
                extracted(type, list, list1);
                collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
            }
        }
        if (null != collect) {
            map.put("total", collect.size());
        } else {
            map.put("total", 0);
        }
        map.put("list", collect);
        return AjaxResult.success(map);
    }
    private void extracted(Integer type, List<TjOrder> list, List<TjOrder> list1) {
            for (TjOrder order : list) {
                TjCustomer tjCustomer = tjCustomerService.selectTjCustomerByCusId(order.getUserId());
                if (null != tjCustomer) {
@@ -664,8 +689,8 @@
                    order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                    order.setGrMoBanId(reportService.getGrMoBanIds());
                    order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName()));
                    order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                    order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                if(null!=tjCustomer.getCusPhone())order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone()));
                if(null!=tjCustomer.getCusIdcard())order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
                }
                String firmId = order.getFirmId();
                if (firmId != null && null != iDictCompService.selectDictCompByDrugManufacturerId(String.valueOf(order.getFirmId()))) {
@@ -692,15 +717,6 @@
                    list1.add(order);
                }
            }
            collect = list1.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
        }
        if (null != collect) {
            map.put("total", collect.size());
        } else {
            map.put("total", 0);
        }
        map.put("list", collect);
        return AjaxResult.success(map);
    }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjSummaryController.java
New file
@@ -0,0 +1,159 @@
package com.ltkj.web.controller.system;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.google.common.base.Joiner;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.utils.SecurityUtils;
import com.ltkj.framework.config.UserHoder;
import com.ltkj.hosp.domain.TjSummary;
import com.ltkj.hosp.domain.TjTollCollector;
import com.ltkj.hosp.service.ITjSummaryService;
import com.ltkj.hosp.service.ITjTollCollectorService;
import com.ltkj.system.service.ISysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: zjh
 * @Date: 2023/10/16 09:02
 */
@RestController
@RequestMapping("/hosp/summary")
@Api(tags = "PC端  汇总结账接口")
public class TjSummaryController {
    @Resource
    private ITjTollCollectorService collectorService;
    @Resource
    private ITjSummaryService summaryService;
    @Resource
    private ISysConfigService configService;
    @GetMapping("/getTjSummaryList")
    @ApiOperation(value = "查询汇总单据信息接口")
    public AjaxResult getTjSummaryList(@RequestParam(required = false) @ApiParam(value = "收费员id") String tollCollectorId,
                           @RequestParam(required = false) @ApiParam(value = "起始时间") String accountBeginTime,
                           @RequestParam(required = false) @ApiParam(value = "起始时间") String accountEndTime) {
        LambdaQueryWrapper<TjSummary> wqq = new LambdaQueryWrapper<>();
        if (null != tollCollectorId) {
            wqq.eq(TjSummary::getHzUserId, tollCollectorId);
        }
        if (null != accountBeginTime && null != accountEndTime) {
            wqq.between(TjSummary::getCreateTime, accountBeginTime, accountEndTime);
        }
        wqq.orderByDesc(TjSummary::getCreateTime);
        List<TjSummary> list= summaryService.list(wqq);
        if(null !=list && list.size()>0){
            for (TjSummary summary : list) {
                String accountId = summary.getAccountId();
                String[] split = accountId.split(";");
                LambdaQueryWrapper<TjTollCollector> wq = new LambdaQueryWrapper<>();
                wq.in(TjTollCollector::getId, (Object[]) split);
                summary.setCollectorList(collectorService.list(wq));
            }
        }
        return AjaxResult.success(list);
    }
    @GetMapping("/list")
    @ApiOperation(value = "查询收费员日结未汇总单据信息")
    public AjaxResult list(@RequestParam(required = false) @ApiParam(value = "收费员id") String tollCollectorId,
                           @RequestParam(required = false) @ApiParam(value = "起始时间") String accountBeginTime,
                           @RequestParam(required = false) @ApiParam(value = "起始时间") String accountEndTime) {
        LambdaQueryWrapper<TjTollCollector> wqq = new LambdaQueryWrapper<>();
        if (null != tollCollectorId) {
            wqq.eq(TjTollCollector::getTollCollectorId, tollCollectorId);
        }
        if (null != accountBeginTime && null != accountEndTime) {
            wqq.between(TjTollCollector::getCreateTime, accountBeginTime, accountEndTime);
        }
        wqq.orderByDesc(TjTollCollector::getCreateTime);
        wqq.eq(TjTollCollector::getIsHz,"N");
        List<TjTollCollector> list= collectorService.list(wqq);
        return AjaxResult.success(list);
    }
    @PostMapping("/addTjSummary")
    @ApiOperation(value = "点击汇总 新增汇总信息接口")
    public AjaxResult addTjSummary(@RequestBody List<String> ids) {
        if(null !=ids && ids.size()>0){
            String accountId = "HZ" + SecurityUtils.getUsername() + (new SimpleDateFormat("yyMMddHHmmssSSS").format(new Date()));
            BigDecimal zshoukuan = new BigDecimal("0.00");
            BigDecimal ztuikuan = new BigDecimal("0.00");
            BigDecimal zyingjiao = new BigDecimal("0.00");
            for (String id : ids) {
                TjTollCollector collector = collectorService.getById(id);
                if(null !=collector){
                    zshoukuan=zshoukuan.add(collector.getAmountReceived());
                    ztuikuan=ztuikuan.add(collector.getRefundAmount());
                    zyingjiao=zyingjiao.add(collector.getPayable());
                    collector.setIsHz("Y");
                    collectorService.updateById(collector);
                }
            }
            String join = Joiner.on(";").join(ids);
            TjSummary summary=new TjSummary();
            summary.setHzName(UserHoder.getLoginUser().getUser().getNickName());
            summary.setHzUserId(Long.valueOf(UserHoder.getLoginUser().getUserId()));
            summary.setHzCard(accountId);
            summary.setHzSj("汇总结账");
            summary.setAmountReceived(zshoukuan);
            summary.setRefundAmount(ztuikuan);
            summary.setPayable(zyingjiao);
            summary.setAccountId(join);
            summaryService.save(summary);
            return AjaxResult.success(accountId);
        }
        return AjaxResult.error("请选择汇总单据");
    }
    @DeleteMapping("/removeTjSummaryById")
    @ApiOperation(value = "汇总员撤销 汇总账单 接口")
    public AjaxResult removeTjSummaryById(@RequestParam @ApiParam(value = "结账id") String id,
                                          @RequestParam @ApiParam(value = "结账员id") String tollCollectorId) {
        String userId = SecurityUtils.getLoginUser().getUserId();
        if (!userId.equals(tollCollectorId)) {
            return AjaxResult.error("非当前用户禁止操作");
        }
        TjSummary summary = summaryService.getById(id);
        if (summaryService.removeById(id)) {
            if (null != summary) {
                String accountId = summary.getAccountId();
                String[] split = accountId.split(";");
                for (String s : split) {
                    TjTollCollector tollCollector = collectorService.getTjTollCollectorById(s);
                    tollCollector.setIsHz("N");
                    collectorService.updateById(tollCollector);
                }
                return AjaxResult.success("该账单已成功撤销");
            }
            return AjaxResult.success("该账单已撤销");
        }
        return AjaxResult.error("撤销失败");
    }
    @GetMapping("/getPrintSetUp")
    @ApiOperation(value = "查询打印设置 0小票 1 发票")
    public AjaxResult getPrintSetUp() {
        String printSetUp = configService.selectConfigByKey("print_set_up");
        return AjaxResult.success(printSetUp);
    }
}
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTollCollectorController.java
@@ -14,7 +14,9 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ltkj.common.core.domain.entity.SysDictData;
import com.ltkj.common.utils.SecurityUtils;
import com.ltkj.common.utils.StringUtils;
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.ChargeStatisticsVo;
@@ -80,7 +82,6 @@
        if (null != accountBeginTime && null != accountEndTime) {
            wqq.between(TjTollCollector::getCreateTime, accountBeginTime, accountEndTime);
        } else {
            DateTime dateTime = DateUtil.lastWeek();
            wqq.between(TjTollCollector::getCreateTime, DateUtil.lastWeek(),DateUtil.date());
        }
        wqq.orderByDesc(TjTollCollector::getCreateTime);
@@ -175,6 +176,9 @@
//        TjTollCollector collector = tjTollCollectorService.getById(id);
        TjTollCollector collector = tjTollCollectorService.getTjTollCollectorById(id);
        if (null != collector) {
            if("Y".equals(collector.getIsHz())){
                return AjaxResult.error("该账单已汇总不可撤销");
            }
            LambdaQueryWrapper<TjTollCollectorDetail> wq = new LambdaQueryWrapper<>();
            wq.eq(TjTollCollectorDetail::getAccountId, collector.getAccountId());
            collectorDetailService.remove(wq);
@@ -207,7 +211,9 @@
        wq.orderByDesc(TjTollCollector::getAccountEndTime);
        List<TjTollCollector> list = tjTollCollectorService.list(wq);
        if (null != list && list.size() > 0) return success(list.get(0).getAccountEndTime());
        return AjaxResult.success("1970-01-01 00:00:00");
        String dateStr = "1970-01-01 00:00:00";
        Date date = DateUtil.parse(dateStr, "yyyy-MM-dd HH:mm:ss");
        return AjaxResult.success(date);
    }
@@ -243,7 +249,7 @@
        List<Map<String, Object>> cc = new ArrayList<>();
        //统计总集合
        //付款方式
        Map<Long, List<TjFlowingWater>> m = list.stream().collect(Collectors.groupingBy(TjFlowingWater::getPayType));
        Map<Long, List<TjFlowingWater>> m = list.stream().filter(item-> StringUtils.isNotNull(item.getPayType())).collect(Collectors.groupingBy(TjFlowingWater::getPayType));
        BigDecimal zshoukuan = new BigDecimal("0.00");
        BigDecimal ztuikuan = new BigDecimal("0.00");
        BigDecimal zyingjiao = new BigDecimal("0.00");
ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuController.java
@@ -20,7 +20,7 @@
    private String value;
    @GetMapping("/index")
    @PreAuthorize("@ss.hasPermi('report:jmreport:index')")
//    @PreAuthorize("@ss.hasPermi('report:jmreport:index')")
    public String index(){
        return value+"/jmreport/list";
    }
ltkj-admin/src/main/java/com/ltkj/web/jmreport/JimuReportTokenService.java
@@ -60,10 +60,11 @@
                return true;
            }else{
                //校验菜单权限
                Set<String> permissions = loginUser.getPermissions();
                if(permissions != null && permissions.contains("report:jmreport:list")){
//                Set<String> permissions = loginUser.getPermissions();
                    return true;
                }
//                if(permissions != null && permissions.contains("report:jmreport:list")){
//                    return true;
//                }
            }
        }
        return false;
ltkj-admin/src/main/resources/application-druid.yml
@@ -6,10 +6,8 @@
    druid:
      # 主库数据源
      master:
        #url: jdbc:mysql://192.168.0.101:3306/mydb?serverTimezone=UTC
        #url: jdbc:mysql://47.109.86.30:3306/ltkj_tj1.0?serverTimezone=GMT%2B8
        url: jdbc:mysql://101.42.27.146:3306/ltkj_tj1.0?serverTimezone=GMT%2B8
        #url: jdbc:mysql://192.168.0.101:3306/mydb?serverTimezone=GMT%2B8
#        url: jdbc:mysql://101.42.27.146:3306/ltkj_tj1.0?serverTimezone=GMT%2B8
        url: jdbc:mysql://localhost:3306/ltkj_tj1.0?serverTimezone=GMT%2B8
        username: root
        #password: Root_ltkj123
        password: Root_ltkj123
ltkj-admin/src/main/resources/application.yml
@@ -73,7 +73,7 @@
  redis:
    # 地址
    host: 101.42.27.146
#    host: 192.168.0.101
#    host: localhost
    # 端口,默认为6379
    port: 6379
    # 数据库索引
@@ -206,8 +206,9 @@
#积木报表访问地址
jimu:
  path: https://ltpeis.xaltjdkj.cn:5011/ltkj-admin
#  path: http://192.168.0.100:5011
#  path: https://ltpeis.xaltjdkj.cn:5011/ltkj-admin
#  path: http://192.168.0.99:8080/ltkj-admin/jmreport/view
  path: http://192.168.0.101:5011
jeecg :
  jmreport:
ltkj-admin/src/test/java/zjhTest.java
@@ -1,4 +1,5 @@
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.ltkj.LtkjApplication;
import com.ltkj.common.core.redis.RedisCache;
@@ -59,10 +60,14 @@
    public void test() {
//        List<DictHosp> list = dictHospService.list();
//        for (DictHosp dictHosp : list) {
//            String mallMerchantSecretKey = SecurityUtils.getMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getAreaid(), dictHosp.getExpirationTime());
//        DateTime dateTime1 = DateUtil.offsetMonth(new Date(),6);
//        String mallMerchantSecretKey = SecurityUtils.getMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getHospAreaName(),dictHosp.getExpirationTime());
//            dictHosp.setSecretKey(mallMerchantSecretKey);
//            dictHosp.setExpirationTime(DateUtil.offsetDay(new Date(),30));
//            dictHospService.updateById(dictHosp);
//        System.out.println(dateTime1);
//        System.out.println("=================================================");
//        System.out.println(mallMerchantSecretKey);
//        }
    }
ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java
@@ -108,7 +108,7 @@
                // 过滤请求
                .authorizeRequests()
                // 对于登录login 注册register 验证码captchaImage 允许匿名访问
                .antMatchers("/login", "/register", "/captchaImage","/cus/**","/getCaptchaConfigKey").permitAll()
                .antMatchers("/login", "/register", "/captchaImage","/cus/**","/getCaptchaConfigKey","/report/jmreport/**").permitAll()
                // 静态资源,可匿名访问
                .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
ltkj-framework/src/main/java/com/ltkj/framework/web/service/SysLoginService.java
@@ -147,7 +147,7 @@
                            loginUser.setHospName(dictHosp.getHospAreaName());
                            if(!SecurityUtils.isAdmin(user.getUserId())){
                                if(dictHosp.getSecretKey() != null && dictHosp.getExpirationTime() != null){
                                    if (!SecurityUtils.matchesMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getAreaid(),
                                    if (!SecurityUtils.matchesMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getHospAreaName(),
                                            dictHosp.getExpirationTime(),dictHosp.getSecretKey())) {
                                        throw new SecretKeyException("商家已过期请续费使用");
                                    }
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictHosp.java
@@ -29,7 +29,7 @@
    /**
     * 院区ID
     */
    @TableId(type = IdType.AUTO)
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "院区ID")
    private String hospAreaId;
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjSummary.java
New file
@@ -0,0 +1,47 @@
package com.ltkj.hosp.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ltkj.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: zjh
 * @Date: 2023/10/16 08:52
 */
@Data
public class TjSummary extends BaseEntity {
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @ApiModelProperty(value = "汇总账单号")
    private String hzCard;
    @ApiModelProperty(value = "汇总人姓名")
    private String hzName;
    @ApiModelProperty(value = "汇总人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long hzUserId;
    @ApiModelProperty(value = "汇总事件")
    private String hzSj;
    @ApiModelProperty(value = "收款")
    private BigDecimal amountReceived;
    @ApiModelProperty(value = "退款")
    private BigDecimal refundAmount;
    @ApiModelProperty(value = "应交款")
    private BigDecimal payable;
    @ApiModelProperty(value = "结账号")
    private String accountId;
    @TableField(exist = false)
    private List<TjTollCollector> collectorList;
}
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTollCollector.java
@@ -92,6 +92,9 @@
    @ApiModelProperty(value = "应交款")
    private BigDecimal payable;
    @ApiModelProperty(value = "是否汇总")
    private String isHz;
    /**
     * 结账详情信息
     */
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjSummaryMapper.java
New file
@@ -0,0 +1,14 @@
package com.ltkj.hosp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ltkj.hosp.domain.TjSummary;
import org.apache.ibatis.annotations.Mapper;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: zjh
 * @Date: 2023/10/16 08:59
 */
@Mapper
public interface TjSummaryMapper extends BaseMapper<TjSummary> {
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjSummaryService.java
New file
@@ -0,0 +1,12 @@
package com.ltkj.hosp.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ltkj.hosp.domain.TjSummary;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: zjh
 * @Date: 2023/10/16 09:00
 */
public interface ITjSummaryService extends IService<TjSummary> {
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/TjAsyncService.java
@@ -1,11 +1,13 @@
package com.ltkj.hosp.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ltkj.common.core.domain.entity.SysUser;
import com.ltkj.hosp.domain.*;
import com.ltkj.hosp.vodomain.QjDomainVo;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
@@ -76,4 +78,6 @@
    void updateCheckType(String tjNum);
//    void  addRedis(List<TjCustomer> customers);
    void getPrintOrderList(List<TjOrder> list);
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjSummaryServiceImpl.java
New file
@@ -0,0 +1,16 @@
package com.ltkj.hosp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ltkj.hosp.domain.TjSummary;
import com.ltkj.hosp.mapper.TjSummaryMapper;
import com.ltkj.hosp.service.ITjSummaryService;
import org.springframework.stereotype.Service;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: zjh
 * @Date: 2023/10/16 09:00
 */
@Service
public class TjSummaryServiceImpl extends ServiceImpl<TjSummaryMapper, TjSummary> implements ITjSummaryService {
}