lige
2023-12-01 219fd53dfa354caf13e4617479cd82422a228343
团队预约、沟通记录。。
9个文件已修改
13个文件已添加
1690 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/mall/WxTeamRecordController.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/StjSchedulingTimeController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamAppLogController.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictComp.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjOrder.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjReportGetAddress.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamAppLog.java 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamContactLog.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamSelectRecord.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamAppLogMapper.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamContactLogMapper.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamAppLogService.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamContactLogService.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamAppLogServiceImpl.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamContactLogServiceImpl.java 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/resources/mapper/hosp/TjTeamAppLogMapper.xml 222 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/resources/mapper/hosp/TjTeamContactLogMapper.xml 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java
@@ -2,18 +2,15 @@
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ltkj.common.core.controller.BaseController;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.core.domain.entity.SysDictData;
import com.ltkj.common.utils.StringUtils;
import com.ltkj.common.utils.bean.BeanUtils;
import com.ltkj.framework.config.MatchUtils;
import com.ltkj.hosp.domain.TjCustomer;
import com.ltkj.hosp.domain.TjOrder;
import com.ltkj.hosp.service.ITjCustomerService;
import com.ltkj.hosp.service.ITjOrderService;
import com.ltkj.system.service.ISysDictDataService;
import com.ltkj.system.service.ISysDictTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
ltkj-admin/src/main/java/com/ltkj/web/controller/mall/WxTeamRecordController.java
New file
@@ -0,0 +1,84 @@
package com.ltkj.web.controller.mall;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest;
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult;
import com.github.binarywang.wxpay.bean.result.WxPayRefundResult;
import com.github.binarywang.wxpay.constant.WxPayConstants;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.utils.IpUtil;
import com.ltkj.common.utils.JacksonUtil;
import com.ltkj.framework.config.UserHoder;
import com.ltkj.hosp.domain.*;
import com.ltkj.hosp.service.*;
import com.ltkj.mall.domain.*;
import com.ltkj.mall.mallOrderUtils.OrderConstants;
import com.ltkj.mall.mallOrderUtils.OrderHandleOption;
import com.ltkj.mall.mallOrderUtils.OrderUtil;
import com.ltkj.mall.service.*;
import com.ltkj.system.service.ISysConfigService;
import com.ltkj.web.config.redis.OrderDelayService;
import com.ltkj.web.wxUtils.WxUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: lige
 * @Date: 2023/7/13 15:16
 */
@RestController
@RequestMapping("/cus/teamRecord")
@Validated
@Api(tags = "小程序团队预约接口")
@Slf4j
public class WxTeamRecordController {
    @Resource
    private ISysConfigService configService;
    @Autowired
    private ITjTeamAppLogService tjTeamAppLogService;
    @Value("${wx.pay.pay-score-notify-url}")
    private String notifyUrl;
    @PostMapping("/addTeam")
    @ApiOperation(value = "小程序团队预约接口")
    public AjaxResult addTeam(@RequestBody  TjTeamAppLog tjTeamAppLog) {
        final boolean save = tjTeamAppLogService.save(tjTeamAppLog);
        if (save){
            return AjaxResult.success("预约成功");
        }
        return AjaxResult.error("预约失败");
    }
}
ltkj-admin/src/main/java/com/ltkj/web/controller/system/StjSchedulingTimeController.java
@@ -48,10 +48,6 @@
    private ISysDeptService deptService;
    @Autowired
    private ISysDictDataService dictDataService;
    @Autowired
    private ISysRoleService roleService;
    @Autowired
    private SysUserRoleService userRoleService;
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
@@ -283,6 +283,201 @@
        }
    }
    /**
     * 化验检查页面列表
     */
    @GetMapping("/huaYangetProList")
    @ApiOperation("影像/化验检查页面列表")
    public AjaxResult huaYangetProList(@ApiParam(value = "体检单号") @RequestParam(required = false) String tjNumber,
                                 @ApiParam(value = "0未检,1已检") @RequestParam(defaultValue = "0") Integer type,
                                 @ApiParam(value = "姓名)") @RequestParam(required = false) String name,
                                 @ApiParam(value = "页码数(默认1)") @RequestParam(defaultValue = "1") Integer page,
                                 @ApiParam(value = "显示条数(默认10)") @RequestParam(defaultValue = "10") Integer pageSize) {
        String userId = SecurityUtils.getLoginUser().getUserId();
        Integer ksId = null;
        SysUser sysUser = null;
        if (null != userId) {
            sysUser = userService.getById(Long.valueOf(userId));
            if (null != sysUser) {
                ksId = Math.toIntExact(sysUser.getDeptId());
            }
        }
        if (ksId == null) {
            return AjaxResult.error("请输入科室id");
        }
        //根据当前登陆的人的科室id,获取该科室下的所有项目
        // TODO: 2023/3/24  给超级管理员赋医生检查权限
        List<Long> postIds = sysUser.getPostIds();
        List<Long> ksproList = null;
        if (postIds != null) {
            for (Long postId : postIds) {
                LambdaQueryWrapper<SysUserPost> wq111 = new LambdaQueryWrapper<>();
                wq111.eq(SysUserPost::getPostId, postId);
                SysUserPost one = userPostService.getOne(wq111);
                if (one != null) {
                    SysPost byId = postService.getById(one.getPostId());
                    if (byId.getPostName().equals("录入员")) {
                        ksproList = projectService.getKsTjProjectIdListBydeptId(String.valueOf(ksId));
                    }
                }
            }
        } else {
            ksproList = projectService.getKsTjProjectIdList();
        }
        if (ksproList == null || ksproList.size() == 0) {
            return AjaxResult.error("请完善科室项目信息");
        }
        List<TjCustomer> customerLis = new ArrayList<>();
        //根据体检号查
        if (null != tjNumber) {
            List<TjOrder> orderList = orderService.getOrderListByLikeTjNum(tjNumber);
            if (null == orderList) {
                return AjaxResult.success("暂时没有数据");
            }
            for (TjOrder order : orderList) {
                List<TjOrderDetail> list = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
                if (list.size() == 0) {
                    continue;
                }
                LambdaQueryWrapper<TjOrderRemark> wqs = new LambdaQueryWrapper<>();
                wqs.eq(TjOrderRemark::getTjNumber, order.getTjNumber());
                wqs.in(TjOrderRemark::getType, 0,3);
                List<TjOrderRemark> lists = remarkService.list(wqs);
                TjCustomer customer = customerService.getById(order.getUserId());
                customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
                customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
                customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                if (null != lists && lists.size() > 0) {
                    StringBuilder stringBuilder = new StringBuilder();
                    for (TjOrderRemark remark : lists) {
                        TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
                        TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
                        if (one.getFlowingWaterId() != null) {
                            stringBuilder.append(byId.getProName()).append(";");
                        }
                    }
                    customer.setNotCheckeds(String.valueOf(stringBuilder));
                    customer.setTjStatus(0L);
                } else {
                    customer.setTjStatus(1L);
                    customer.setNotCheckeds("无");
                }
                if (order.getTjType().equals("1")) {
                    customer.setTjType("团体");
                }
                if (order.getTjType().equals("2")) {
                    customer.setTjType("个人");
                }
                customer.setTjTime(order.getCreateTime());
                customer.setTjNumber(order.getTjNumber());
                customer.setOrderId(order.getOrderId());
                customer.setIsHz(order.getIsHz());
                customerLis.add(customer);
            }
            if (customerLis.size() > 0) {
                List<TjCustomer> customerList = customerLis.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                Collections.reverse(customerList);
                Map<String, Object> map = new HashMap<>();
                map.put("date", customerList);
                map.put("total", customerLis.size());
                return AjaxResult.success(map);
            } else {
                return AjaxResult.success("暂无数据");
            }
        }
        //根据姓名查询
        if (null != name && !"".equals(name)) {
            LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();
            wq.like(TjCustomer::getCusName, name);
            List<TjCustomer> list = customerService.list(wq);
            List<TjCustomer> list11111 = new ArrayList<>();
            if (null != list && list.size() > 0) {
                for (TjCustomer customer : list) {
                    customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
                    customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
                    customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                    List<TjOrder> orderList = orderService.getOrderListByCusId(String.valueOf(customer.getCusId()));
                    if (null != orderList && orderList.size() > 0) {
                        for (TjOrder order : orderList) {
                            List<TjOrderDetail> list111 = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
                            if (list111.size() == 0) {
                                continue;
                            }
                            List<TjOrderRemark> lists = remarkService.getTjOrderRemarkListByYjNum(order.getTjNumber());
                            if (null != lists && lists.size() > 0) {
                                StringBuilder stringBuilder = new StringBuilder();
                                for (TjOrderRemark remark : lists) {
                                    TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
                                    TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
                                    if (one.getFlowingWaterId() != null) {
                                        stringBuilder.append(byId.getProName()).append(";");
                                    }
                                }
                                customer.setNotCheckeds(String.valueOf(stringBuilder));
                                if (null == customer.getNotCheckeds()) customer.setNotCheckeds("全部已检");
                                customer.setTjStatus(0L);
                            } else {
                                customer.setNotCheckeds("无");
                                customer.setTjStatus(1L);
                            }
                            if (order.getTjType().equals("1")) {
                                customer.setTjType("团体");
                            }
                            if (order.getTjType().equals("2")) {
                                customer.setTjType("个人");
                            }
                            customer.setTjTime(order.getCreateTime());
                            customer.setTjNumber(order.getTjNumber());
                            customer.setOrderId(order.getOrderId());
                            customer.setIsHz(order.getIsHz());
                            list11111.add(customer);
                        }
                    }
                }
                if (list11111.size() == 0) {
                    return AjaxResult.success("暂无数据");
                }
                Map<String, Object> map = new HashMap<>();
                List<TjCustomer> customers = list11111.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                Collections.reverse(customers);
                map.put("customers", customers);
                map.put("total", list11111.size());
                return AjaxResult.success(map);
            } else {
                return AjaxResult.success("暂无数据");
            }
        }
        List<TjCustomer> customerLists = new ArrayList<>();
        if (type == 0) {
            customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj");
        }
        if (type == 1) {
            customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj");
        }
        asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId));
        if (customerLists != null && customerLists.size() > 0) {
            Collections.reverse(customerLists);
            List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
            Map<String, Object> map = new HashMap<>();
            map.put("date", customerList);
            map.put("total", customerLists.size());
            return AjaxResult.success(map);
        } else {
            AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis);
            if (map != null) return map;
            return AjaxResult.success("暂时没有数据");
        }
    }
    private AjaxResult getAjaxResult(Integer type, Integer page, Integer pageSize, List<Long> ksproList, List<TjCustomer> customerLis) {
        LambdaQueryWrapper<TjOrderDetail> wq1 = new LambdaQueryWrapper<>();
        wq1.eq(TjOrderDetail::getTjStatus, type);
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -94,8 +94,6 @@
    @Resource
    private ITjOrderRemarkService remarkService;
    @Resource
    private ITjTeamSelectRecordService selectRecordService;
    @Resource
    private TjAsyncService asyncService;
    @Resource
    private ISysUserService userService;
@@ -132,6 +130,9 @@
    @Autowired
    private ITjAskMedicalHistoryService tjAskMedicalHistoryService;
    @Autowired
    private ITjReportGetAddressService tjReportGetAddressService;
    /**
@@ -844,11 +845,18 @@
        if (null == tjOrder.getPacId() && null != transitionService.getTbTransitionPacIdByCusIdAndPac(String.valueOf(tjOrder.getUserId()))) {
            tjOrder.setPacId(transitionService.getTbTransitionPacIdByCusIdAndPac(String.valueOf(tjOrder.getUserId())));
        }
        //判断小程序上预约是否付钱
        if (null != mallOrder) tjOrder.setMallOrderId(String.valueOf(mallOrder.getId()));
        tjOrder.setStatus(TjConstants.TJ_BEGIN);
        if (tjOrderService.save(tjOrder)) {
            //保存收货地址
            if ("2".equals(tjOrder.getGetType())){
                final TjReportGetAddress address = tjOrder.getAddAddress();
                if (address!=null){
                    address.setTjNumber(tjNumber);
                    tjReportGetAddressService.save(address);
                }
            }
            Long cusNumber = tjCustomer.getCusNumber();
            cusNumber += 1;
            tjCustomer.setCusNumber(cusNumber);
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java
@@ -10,6 +10,7 @@
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -18,6 +19,7 @@
import com.itextpdf.text.*;
import com.itextpdf.text.pdf.*;
import com.itextpdf.text.pdf.draw.LineSeparator;
import com.ltkj.common.core.domain.entity.SysDictData;
import com.ltkj.common.utils.DateUtils;
import com.ltkj.common.utils.SecurityUtils;
import com.ltkj.common.utils.StringUtils;
@@ -26,6 +28,7 @@
import com.ltkj.hosp.service.*;
import com.ltkj.mall.mallOrderUtils.TjConstants;
import com.ltkj.system.service.ISysConfigService;
import com.ltkj.system.service.ISysDictDataService;
import com.ltkj.system.service.ISysUserService;
import com.ltkj.web.config.pdfutils.MergePdf;
import com.ltkj.web.config.pdfutils.MyHeaderFooter;
@@ -85,6 +88,8 @@
    @Autowired
    private ISysConfigService configService;
    @Autowired
    private ISysDictDataService dictDataService;
     //    /* *//**
@@ -258,8 +263,36 @@
        int num = tjOrderRemarkService.getTjYqOrderRemarkByTjNum(tjNumber);
        if(num >0) return AjaxResult.error("有延期项目暂不能生成报告!!!");
        LambdaQueryWrapper<TjOrder> wq = new LambdaQueryWrapper<>();
        wq.eq(TjOrder::getTjNumber, tjNumber);
        TjOrder tjOrder = tjOrderService.getOne(wq);
        if (null != tjOrder) {
        LambdaQueryWrapper<TjReportTemplate> tjReportTemplateLambdaQueryWrapper = new LambdaQueryWrapper<>();
            if (tjOrder.getTjCategory()!=null){
                //查询字典
                LambdaQueryWrapper<SysDictData> wqq = new LambdaQueryWrapper<>();
                wqq.eq(SysDictData::getDictType, "dict_tjtype");
                wqq.eq(SysDictData::getDictValue, tjOrder.getTjCategory());
                SysDictData one = dictDataService.getOne(wqq);
                if (one!=null){
                    //查询字典
                    LambdaQueryWrapper<SysDictData> wqq1 = new LambdaQueryWrapper<>();
                    wqq1.eq(SysDictData::getDictType, "report_template_type");
                    wqq1.eq(SysDictData::getDictLabel, one.getDictLabel());
                    SysDictData one1 = dictDataService.getOne(wqq1);
                    if (one1!=null){
                        tjReportTemplateLambdaQueryWrapper.eq(TjReportTemplate::getFlag, one1.getDictValue());
                    }else {
        tjReportTemplateLambdaQueryWrapper.eq(TjReportTemplate::getFlag, 1);
                    }
                }else {
                    tjReportTemplateLambdaQueryWrapper.eq(TjReportTemplate::getFlag, 1);
                }
            }
        tjReportTemplateLambdaQueryWrapper.eq(TjReportTemplate::getOpen, 0);
        TjReportTemplate one1 = reportTemplateService.getOne(tjReportTemplateLambdaQueryWrapper);
        String template = one1.getTemplate();
@@ -278,10 +311,6 @@
        }
        LambdaQueryWrapper<TjOrder> wq = new LambdaQueryWrapper<>();
        wq.eq(TjOrder::getTjNumber, tjNumber);
        TjOrder tjOrder = tjOrderService.getOne(wq);
        if (null != tjOrder) {
            Integer checkStatus = tjOrder.getCheckStatus();
            if (checkStatus == 1) {
                LambdaQueryWrapper<TjCustomer> wq1 = new LambdaQueryWrapper<>();
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamAppLogController.java
New file
@@ -0,0 +1,103 @@
package com.ltkj.web.controller.system;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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 com.ltkj.common.annotation.Log;
import com.ltkj.common.core.controller.BaseController;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.enums.BusinessType;
import com.ltkj.hosp.domain.TjTeamAppLog;
import com.ltkj.hosp.service.ITjTeamAppLogService;
import com.ltkj.common.utils.poi.ExcelUtil;
import com.ltkj.common.core.page.TableDataInfo;
/**
 * 小程序团队预约记录Controller
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
@RestController
@RequestMapping("/hosp/teamAppLog")
public class TjTeamAppLogController extends BaseController {
    @Autowired
    private ITjTeamAppLogService tjTeamAppLogService;
    /**
     * 查询小程序团队预约记录列表
     */
    @GetMapping("/list")
    public TableDataInfo list(TjTeamAppLog tjTeamAppLog) {
        startPage();
        LambdaQueryWrapper<TjTeamAppLog> wq=new LambdaQueryWrapper<>();
        if (tjTeamAppLog.getCnName()!=null){
            wq.like(TjTeamAppLog::getCnName,tjTeamAppLog.getCnName());
        }
        if (tjTeamAppLog.getContactPerson()!=null){
            wq.like(TjTeamAppLog::getContactPerson,tjTeamAppLog.getContactPerson());
        }
        if (tjTeamAppLog.getContactPhone()!=null){
            wq.like(TjTeamAppLog::getContactPhone,tjTeamAppLog.getContactPhone());
        }
        if (tjTeamAppLog.getTjPacType()!=null){
            wq.eq(TjTeamAppLog::getTjPacType,tjTeamAppLog.getTjPacType());
        }
        if (tjTeamAppLog.getTjTime()!=null){
            wq.between(TjTeamAppLog::getTjTime,tjTeamAppLog.getBeginTjTime(),tjTeamAppLog.getEndTjTime());
        }
        List<TjTeamAppLog> list = tjTeamAppLogService.list(wq);
        return getDataTable(list);
    }
    /**
     * 导出小程序团队预约记录列表
     */
    @Log(title = "小程序团队预约记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, TjTeamAppLog tjTeamAppLog) {
//        List<TjTeamAppLog> list = tjTeamAppLogService.selectTjTeamAppLogList(tjTeamAppLog);
        LambdaQueryWrapper<TjTeamAppLog> wq=new LambdaQueryWrapper<>();
        if (tjTeamAppLog.getCnName()!=null){
            wq.like(TjTeamAppLog::getCnName,tjTeamAppLog.getCnName());
        }
        if (tjTeamAppLog.getContactPerson()!=null){
            wq.like(TjTeamAppLog::getContactPerson,tjTeamAppLog.getContactPerson());
        }
        if (tjTeamAppLog.getContactPhone()!=null){
            wq.like(TjTeamAppLog::getContactPhone,tjTeamAppLog.getContactPhone());
        }
        if (tjTeamAppLog.getTjPacType()!=null){
            wq.eq(TjTeamAppLog::getTjPacType,tjTeamAppLog.getTjPacType());
        }
        if (tjTeamAppLog.getTjTime()!=null){
            wq.between(TjTeamAppLog::getTjTime,tjTeamAppLog.getBeginTjTime(),tjTeamAppLog.getEndTjTime());
        }
        List<TjTeamAppLog> list = tjTeamAppLogService.list(wq);
        ExcelUtil<TjTeamAppLog> util = new ExcelUtil<TjTeamAppLog>(TjTeamAppLog. class);
        util.exportExcel(response, list, "小程序团队预约记录数据");
    }
    /**
     * 获取小程序团队预约记录详细信息
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(tjTeamAppLogService.getById(id));
    }
}
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java
New file
@@ -0,0 +1,98 @@
package com.ltkj.web.controller.system;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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 com.ltkj.common.annotation.Log;
import com.ltkj.common.core.controller.BaseController;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.enums.BusinessType;
import com.ltkj.hosp.domain.TjTeamContactLog;
import com.ltkj.hosp.service.ITjTeamContactLogService;
import com.ltkj.common.utils.poi.ExcelUtil;
import com.ltkj.common.core.page.TableDataInfo;
/**
 * 团队预约沟通记录Controller
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
@RestController
@RequestMapping("/hosp/TjTeamContactLog")
public class TjTeamContactLogController extends BaseController {
    @Autowired
    private ITjTeamContactLogService tjTeamContactLogService;
    /**
     * 查询团队预约沟通记录列表
     */
    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:list')")
    @GetMapping("/list")
    public TableDataInfo list(TjTeamContactLog tjTeamContactLog) {
        startPage();
        List<TjTeamContactLog> list = tjTeamContactLogService.selectTjTeamContactLogList(tjTeamContactLog);
        return getDataTable(list);
    }
    /**
     * 导出团队预约沟通记录列表
     */
    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:export')")
    @Log(title = "团队预约沟通记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, TjTeamContactLog tjTeamContactLog) {
        List<TjTeamContactLog> list = tjTeamContactLogService.selectTjTeamContactLogList(tjTeamContactLog);
        ExcelUtil<TjTeamContactLog> util = new ExcelUtil<TjTeamContactLog>(TjTeamContactLog.class);
        util.exportExcel(response, list, "团队预约沟通记录数据");
    }
    /**
     * 获取团队预约沟通记录详细信息
     */
    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(tjTeamContactLogService.selectTjTeamContactLogById(id));
    }
    /**
     * 新增团队预约沟通记录
     */
    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:add')")
    @Log(title = "团队预约沟通记录", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TjTeamContactLog tjTeamContactLog) {
        return toAjax(tjTeamContactLogService.insertTjTeamContactLog(tjTeamContactLog));
    }
    /**
     * 修改团队预约沟通记录
     */
    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:edit')")
    @Log(title = "团队预约沟通记录", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody TjTeamContactLog tjTeamContactLog) {
        return toAjax(tjTeamContactLogService.updateTjTeamContactLog(tjTeamContactLog));
    }
    /**
     * 删除团队预约沟通记录
     */
    @PreAuthorize("@ss.hasPermi('hosp:TjTeamContactLog:remove')")
    @Log(title = "团队预约沟通记录", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(tjTeamContactLogService.deleteTjTeamContactLogByIds(ids));
    }
}
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictComp.java
@@ -3,11 +3,13 @@
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ltkj.common.annotation.Excel;
import com.ltkj.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -224,6 +226,26 @@
    @Excel(name = "五笔简码")
    private String wbm;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    @TableField(exist = false)
    private String pacId;
    @TableField(exist = false)
    private String tjPacType;
    @TableField(exist = false)
    private String pacName;
    @TableField(exist = false)
    private Integer userNum;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjOrder.java
@@ -419,6 +419,18 @@
    @ApiModelProperty(value = "报告领取方式")
    private String getType;
    /**
     * 报告领取地址
     */
    @TableField(exist = false)
    private TjReportGetAddress addAddress;
    /**
     * 体检类别
     */
    @ApiModelProperty("体检类别")
    private String tjCategory;
    @Override
    public String toString() {
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjReportGetAddress.java
@@ -2,7 +2,10 @@
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ltkj.common.annotation.Excel;
import com.ltkj.common.core.domain.BaseEntity;
import lombok.Data;
@@ -22,13 +25,15 @@
    /**
     * 主键
     */
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 体检号
     */
    @Excel(name = "体检号")
    private Long tjNumber;
    private String tjNumber;
    /**
     * 收货人
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamAppLog.java
New file
@@ -0,0 +1,144 @@
package com.ltkj.hosp.domain;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ltkj.common.annotation.Excel;
import com.ltkj.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
 * 小程序团队预约记录对象 tj_team_app_log
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "小程序团队预约记录对象")
public class TjTeamAppLog extends BaseEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "主键id")
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 单位名称
     */
    @Excel(name = "单位名称")
    private String cnName;
    /**
     * 税号
     */
    @Excel(name = "税号")
    private String taxNumber;
    /**
     * 联系人
     */
    @Excel(name = "联系人")
    private String contactPerson;
    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    private String contactPhone;
    /**
     * 通讯地址
     */
    @Excel(name = "通讯地址")
    private String mailingAddress;
    /**
     * 邮箱
     */
    @Excel(name = "邮箱")
    private String email;
    /**
     * 体检人数
     */
    @Excel(name = "体检人数")
    private Long count;
    /**
     * 体检类别(字典)
     */
    @Excel(name = "体检类别(字典)")
    private String tjPacType;
    /**
     * 预约时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date tjTime;
    /**
     * 所选套餐
     */
    @Excel(name = "所选套餐")
    private String pacId;
    /**
     * 套餐名称
     */
    @Excel(name = "套餐名称")
    private String pacName;
    /**
     * 来源
     */
    @Excel(name = "来源")
    private String fromBy;
    @TableField(exist = false)
    private Date beginTjTime;
    @TableField(exist = false)
    private Date endTjTime;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("cnName", getCnName())
                .append("taxNumber", getTaxNumber())
                .append("contactPerson", getContactPerson())
                .append("contactPhone", getContactPhone())
                .append("mailingAddress", getMailingAddress())
                .append("email", getEmail())
                .append("count", getCount())
                .append("tjPacType", getTjPacType())
                .append("tjTime", getTjTime())
                .append("pacId", getPacId())
                .append("pacName", getPacName())
                .append("fromBy", getFromBy())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("deleted", getDeleted())
                .append("createId", getCreateId())
                .append("updateId", getUpdateId())
                .toString();
    }
}
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamContactLog.java
New file
@@ -0,0 +1,88 @@
package com.ltkj.hosp.domain;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ltkj.common.annotation.Excel;
import com.ltkj.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
 * 团队预约沟通记录对象 tj_team_contact_log
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "团队预约沟通记录对象")
public class TjTeamContactLog extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @ApiModelProperty(value = "主键id")
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 团队预约id
     */
    @Excel(name = "团队预约id")
    private Long logId;
    /**
     * 沟通人id
     */
    @Excel(name = "沟通人id")
    private String contactUserId;
    /**
     * 沟通人
     */
    @Excel(name = "沟通人")
    private String contactUserName;
    /**
     * 沟通时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "沟通时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date contactTime;
    /**
     * 沟通详情
     */
    @Excel(name = "沟通详情")
    private String contactDetail;
    /**
     * 沟通状态
     */
    @Excel(name = "沟通状态")
    private String status;
    /**
     * 联系人
     */
    @Excel(name = "联系人")
    private String contactPerson;
    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    private String contactPhone;
}
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamSelectRecord.java
@@ -83,6 +83,13 @@
    @Excel(name = "已付金额")
    @ApiModelProperty(value = "已付金额")
    private BigDecimal transactionAmount;
    /**
     * 体检类别
     */
    @ApiModelProperty(value = "体检类别")
    private String tjPacType;
    /**
     * 团队编号
     */
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamAppLogMapper.java
New file
@@ -0,0 +1,65 @@
package com.ltkj.hosp.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ltkj.hosp.domain.TjTeamAppLog;
import com.ltkj.hosp.domain.TjTeamSelectRecord;
import org.apache.ibatis.annotations.Mapper;
/**
 * 小程序团队预约记录Mapper接口
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
@Mapper
public interface TjTeamAppLogMapper extends BaseMapper<TjTeamAppLog> {
    /**
     * 查询小程序团队预约记录
     *
     * @param id 小程序团队预约记录主键
     * @return 小程序团队预约记录
     */
    public TjTeamAppLog selectTjTeamAppLogById(Long id);
    /**
     * 查询小程序团队预约记录列表
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 小程序团队预约记录集合
     */
    public List<TjTeamAppLog> selectTjTeamAppLogList(TjTeamAppLog tjTeamAppLog);
    /**
     * 新增小程序团队预约记录
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 结果
     */
    public int insertTjTeamAppLog(TjTeamAppLog tjTeamAppLog);
    /**
     * 修改小程序团队预约记录
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 结果
     */
    public int updateTjTeamAppLog(TjTeamAppLog tjTeamAppLog);
    /**
     * 删除小程序团队预约记录
     *
     * @param id 小程序团队预约记录主键
     * @return 结果
     */
    public int deleteTjTeamAppLogById(Long id);
    /**
     * 批量删除小程序团队预约记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTjTeamAppLogByIds(Long[] ids);
}
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamContactLogMapper.java
New file
@@ -0,0 +1,65 @@
package com.ltkj.hosp.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ltkj.hosp.domain.TjTeamAppLog;
import com.ltkj.hosp.domain.TjTeamContactLog;
import org.apache.ibatis.annotations.Mapper;
/**
 * 团队预约沟通记录Mapper接口
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
@Mapper
public interface TjTeamContactLogMapper extends BaseMapper<TjTeamContactLog> {
    /**
     * 查询团队预约沟通记录
     *
     * @param id 团队预约沟通记录主键
     * @return 团队预约沟通记录
     */
    public TjTeamContactLog selectTjTeamContactLogById(Long id);
    /**
     * 查询团队预约沟通记录列表
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 团队预约沟通记录集合
     */
    public List<TjTeamContactLog> selectTjTeamContactLogList(TjTeamContactLog tjTeamContactLog);
    /**
     * 新增团队预约沟通记录
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 结果
     */
    public int insertTjTeamContactLog(TjTeamContactLog tjTeamContactLog);
    /**
     * 修改团队预约沟通记录
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 结果
     */
    public int updateTjTeamContactLog(TjTeamContactLog tjTeamContactLog);
    /**
     * 删除团队预约沟通记录
     *
     * @param id 团队预约沟通记录主键
     * @return 结果
     */
    public int deleteTjTeamContactLogById(Long id);
    /**
     * 批量删除团队预约沟通记录
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTjTeamContactLogByIds(Long[] ids);
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamAppLogService.java
New file
@@ -0,0 +1,63 @@
package com.ltkj.hosp.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ltkj.hosp.domain.TjSurveyTemplate;
import com.ltkj.hosp.domain.TjTeamAppLog;
/**
 * 小程序团队预约记录Service接口
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
public interface ITjTeamAppLogService  extends IService<TjTeamAppLog> {
    /**
     * 查询小程序团队预约记录
     *
     * @param id 小程序团队预约记录主键
     * @return 小程序团队预约记录
     */
    public TjTeamAppLog selectTjTeamAppLogById(Long id);
    /**
     * 查询小程序团队预约记录列表
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 小程序团队预约记录集合
     */
    public List<TjTeamAppLog> selectTjTeamAppLogList(TjTeamAppLog tjTeamAppLog);
    /**
     * 新增小程序团队预约记录
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 结果
     */
    public int insertTjTeamAppLog(TjTeamAppLog tjTeamAppLog);
    /**
     * 修改小程序团队预约记录
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 结果
     */
    public int updateTjTeamAppLog(TjTeamAppLog tjTeamAppLog);
    /**
     * 批量删除小程序团队预约记录
     *
     * @param ids 需要删除的小程序团队预约记录主键集合
     * @return 结果
     */
    public int deleteTjTeamAppLogByIds(Long[] ids);
    /**
     * 删除小程序团队预约记录信息
     *
     * @param id 小程序团队预约记录主键
     * @return 结果
     */
    public int deleteTjTeamAppLogById(Long id);
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamContactLogService.java
New file
@@ -0,0 +1,63 @@
package com.ltkj.hosp.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ltkj.hosp.domain.TjTeamAppLog;
import com.ltkj.hosp.domain.TjTeamContactLog;
/**
 * 团队预约沟通记录Service接口
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
public interface ITjTeamContactLogService extends IService<TjTeamContactLog> {
    /**
     * 查询团队预约沟通记录
     *
     * @param id 团队预约沟通记录主键
     * @return 团队预约沟通记录
     */
    public TjTeamContactLog selectTjTeamContactLogById(Long id);
    /**
     * 查询团队预约沟通记录列表
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 团队预约沟通记录集合
     */
    public List<TjTeamContactLog> selectTjTeamContactLogList(TjTeamContactLog tjTeamContactLog);
    /**
     * 新增团队预约沟通记录
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 结果
     */
    public int insertTjTeamContactLog(TjTeamContactLog tjTeamContactLog);
    /**
     * 修改团队预约沟通记录
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 结果
     */
    public int updateTjTeamContactLog(TjTeamContactLog tjTeamContactLog);
    /**
     * 批量删除团队预约沟通记录
     *
     * @param ids 需要删除的团队预约沟通记录主键集合
     * @return 结果
     */
    public int deleteTjTeamContactLogByIds(Long[] ids);
    /**
     * 删除团队预约沟通记录信息
     *
     * @param id 团队预约沟通记录主键
     * @return 结果
     */
    public int deleteTjTeamContactLogById(Long id);
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamAppLogServiceImpl.java
New file
@@ -0,0 +1,93 @@
package com.ltkj.hosp.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ltkj.common.utils.DateUtils;
import com.ltkj.hosp.domain.TjSurveyTemplate;
import com.ltkj.hosp.mapper.TjSurveyTemplateMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ltkj.hosp.mapper.TjTeamAppLogMapper;
import com.ltkj.hosp.domain.TjTeamAppLog;
import com.ltkj.hosp.service.ITjTeamAppLogService;
/**
 * 小程序团队预约记录Service业务层处理
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
@Service
public class TjTeamAppLogServiceImpl extends ServiceImpl<TjTeamAppLogMapper, TjTeamAppLog>  implements ITjTeamAppLogService {
    @Autowired
    private TjTeamAppLogMapper tjTeamAppLogMapper;
    /**
     * 查询小程序团队预约记录
     *
     * @param id 小程序团队预约记录主键
     * @return 小程序团队预约记录
     */
    @Override
    public TjTeamAppLog selectTjTeamAppLogById(Long id) {
        return tjTeamAppLogMapper.selectTjTeamAppLogById(id);
    }
    /**
     * 查询小程序团队预约记录列表
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 小程序团队预约记录
     */
    @Override
    public List<TjTeamAppLog> selectTjTeamAppLogList(TjTeamAppLog tjTeamAppLog) {
        return tjTeamAppLogMapper.selectTjTeamAppLogList(tjTeamAppLog);
    }
    /**
     * 新增小程序团队预约记录
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 结果
     */
    @Override
    public int insertTjTeamAppLog(TjTeamAppLog tjTeamAppLog) {
                tjTeamAppLog.setCreateTime(DateUtils.getNowDate());
            return tjTeamAppLogMapper.insertTjTeamAppLog(tjTeamAppLog);
    }
    /**
     * 修改小程序团队预约记录
     *
     * @param tjTeamAppLog 小程序团队预约记录
     * @return 结果
     */
    @Override
    public int updateTjTeamAppLog(TjTeamAppLog tjTeamAppLog) {
                tjTeamAppLog.setUpdateTime(DateUtils.getNowDate());
        return tjTeamAppLogMapper.updateTjTeamAppLog(tjTeamAppLog);
    }
    /**
     * 批量删除小程序团队预约记录
     *
     * @param ids 需要删除的小程序团队预约记录主键
     * @return 结果
     */
    @Override
    public int deleteTjTeamAppLogByIds(Long[] ids) {
        return tjTeamAppLogMapper.deleteTjTeamAppLogByIds(ids);
    }
    /**
     * 删除小程序团队预约记录信息
     *
     * @param id 小程序团队预约记录主键
     * @return 结果
     */
    @Override
    public int deleteTjTeamAppLogById(Long id) {
        return tjTeamAppLogMapper.deleteTjTeamAppLogById(id);
    }
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamContactLogServiceImpl.java
New file
@@ -0,0 +1,93 @@
package com.ltkj.hosp.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ltkj.common.utils.DateUtils;
import com.ltkj.hosp.domain.TjTeamAppLog;
import com.ltkj.hosp.mapper.TjTeamAppLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ltkj.hosp.mapper.TjTeamContactLogMapper;
import com.ltkj.hosp.domain.TjTeamContactLog;
import com.ltkj.hosp.service.ITjTeamContactLogService;
/**
 * 团队预约沟通记录Service业务层处理
 *
 * @author ltkj_赵佳豪&李格
 * @date 2023-12-01
 */
@Service
public class TjTeamContactLogServiceImpl extends ServiceImpl<TjTeamContactLogMapper, TjTeamContactLog>  implements ITjTeamContactLogService {
    @Autowired
    private TjTeamContactLogMapper tjTeamContactLogMapper;
    /**
     * 查询团队预约沟通记录
     *
     * @param id 团队预约沟通记录主键
     * @return 团队预约沟通记录
     */
    @Override
    public TjTeamContactLog selectTjTeamContactLogById(Long id) {
        return tjTeamContactLogMapper.selectTjTeamContactLogById(id);
    }
    /**
     * 查询团队预约沟通记录列表
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 团队预约沟通记录
     */
    @Override
    public List<TjTeamContactLog> selectTjTeamContactLogList(TjTeamContactLog tjTeamContactLog) {
        return tjTeamContactLogMapper.selectTjTeamContactLogList(tjTeamContactLog);
    }
    /**
     * 新增团队预约沟通记录
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 结果
     */
    @Override
    public int insertTjTeamContactLog(TjTeamContactLog tjTeamContactLog) {
                tjTeamContactLog.setCreateTime(DateUtils.getNowDate());
            return tjTeamContactLogMapper.insertTjTeamContactLog(tjTeamContactLog);
    }
    /**
     * 修改团队预约沟通记录
     *
     * @param tjTeamContactLog 团队预约沟通记录
     * @return 结果
     */
    @Override
    public int updateTjTeamContactLog(TjTeamContactLog tjTeamContactLog) {
                tjTeamContactLog.setUpdateTime(DateUtils.getNowDate());
        return tjTeamContactLogMapper.updateTjTeamContactLog(tjTeamContactLog);
    }
    /**
     * 批量删除团队预约沟通记录
     *
     * @param ids 需要删除的团队预约沟通记录主键
     * @return 结果
     */
    @Override
    public int deleteTjTeamContactLogByIds(Long[] ids) {
        return tjTeamContactLogMapper.deleteTjTeamContactLogByIds(ids);
    }
    /**
     * 删除团队预约沟通记录信息
     *
     * @param id 团队预约沟通记录主键
     * @return 结果
     */
    @Override
    public int deleteTjTeamContactLogById(Long id) {
        return tjTeamContactLogMapper.deleteTjTeamContactLogById(id);
    }
}
ltkj-hosp/src/main/resources/mapper/hosp/TjTeamAppLogMapper.xml
New file
@@ -0,0 +1,222 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ltkj.hosp.mapper.TjTeamAppLogMapper">
    <resultMap type="TjTeamAppLog" id="TjTeamAppLogResult">
            <result property="id" column="id"/>
            <result property="cnName" column="cn_name"/>
            <result property="taxNumber" column="tax_number"/>
            <result property="contactPerson" column="contact_person"/>
            <result property="contactPhone" column="contact_phone"/>
            <result property="mailingAddress" column="mailing_address"/>
            <result property="email" column="email"/>
            <result property="count" column="count"/>
            <result property="tjPacType" column="tj_pac_type"/>
            <result property="tjTime" column="tj_time"/>
            <result property="pacId" column="pac_id"/>
            <result property="pacName" column="pac_name"/>
            <result property="fromBy" column="from_by"/>
            <result property="createBy" column="create_by"/>
            <result property="createTime" column="create_time"/>
            <result property="updateBy" column="update_by"/>
            <result property="updateTime" column="update_time"/>
            <result property="deleted" column="deleted"/>
            <result property="createId" column="create_id"/>
            <result property="updateId" column="update_id"/>
    </resultMap>
    <sql id="selectTjTeamAppLogVo">
        select id, cn_name, tax_number, contact_person, contact_phone, mailing_address, email, count, tj_pac_type, tj_time, pac_id, pac_name, from_by, create_by, create_time, update_by, update_time, deleted, create_id, update_id
        from tj_team_app_log
    </sql>
    <select id="selectTjTeamAppLogList" parameterType="TjTeamAppLog" resultMap="TjTeamAppLogResult">
        <include refid="selectTjTeamAppLogVo"/>
        <where>
                        <if test="cnName != null  and cnName != ''">
                            and cn_name like concat('%', #{cnName}, '%')
                        </if>
                        <if test="contactPerson != null  and contactPerson != ''">
                            and contact_person = #{contactPerson}
                        </if>
                        <if test="contactPhone != null  and contactPhone != ''">
                            and contact_phone = #{contactPhone}
                        </if>
                        <if test="tjPacType != null  and tjPacType != ''">
                            and tj_pac_type = #{tjPacType}
                        </if>
                        <if test="params.beginTjTime != null and params.beginTjTime != '' and params.endTjTime != null and params.endTjTime != ''">
                            and tj_time between #{params.beginTjTime} and #{params.endTjTime}
                        </if>
        </where>
    </select>
    <select id="selectTjTeamAppLogById" parameterType="Long"
            resultMap="TjTeamAppLogResult">
            <include refid="selectTjTeamAppLogVo"/>
            where id = #{id}
    </select>
    <insert id="insertTjTeamAppLog" parameterType="TjTeamAppLog" useGeneratedKeys="true"
            keyProperty="id">
        insert into tj_team_app_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
                    <if test="cnName != null and cnName != ''">cn_name,
                    </if>
                    <if test="taxNumber != null">tax_number,
                    </if>
                    <if test="contactPerson != null">contact_person,
                    </if>
                    <if test="contactPhone != null and contactPhone != ''">contact_phone,
                    </if>
                    <if test="mailingAddress != null">mailing_address,
                    </if>
                    <if test="email != null">email,
                    </if>
                    <if test="count != null">count,
                    </if>
                    <if test="tjPacType != null">tj_pac_type,
                    </if>
                    <if test="tjTime != null">tj_time,
                    </if>
                    <if test="pacId != null">pac_id,
                    </if>
                    <if test="pacName != null">pac_name,
                    </if>
                    <if test="fromBy != null">from_by,
                    </if>
                    <if test="createBy != null">create_by,
                    </if>
                    <if test="createTime != null">create_time,
                    </if>
                    <if test="updateBy != null">update_by,
                    </if>
                    <if test="updateTime != null">update_time,
                    </if>
                    <if test="deleted != null">deleted,
                    </if>
                    <if test="createId != null">create_id,
                    </if>
                    <if test="updateId != null">update_id,
                    </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                    <if test="cnName != null and cnName != ''">#{cnName},
                    </if>
                    <if test="taxNumber != null">#{taxNumber},
                    </if>
                    <if test="contactPerson != null">#{contactPerson},
                    </if>
                    <if test="contactPhone != null and contactPhone != ''">#{contactPhone},
                    </if>
                    <if test="mailingAddress != null">#{mailingAddress},
                    </if>
                    <if test="email != null">#{email},
                    </if>
                    <if test="count != null">#{count},
                    </if>
                    <if test="tjPacType != null">#{tjPacType},
                    </if>
                    <if test="tjTime != null">#{tjTime},
                    </if>
                    <if test="pacId != null">#{pacId},
                    </if>
                    <if test="pacName != null">#{pacName},
                    </if>
                    <if test="fromBy != null">#{fromBy},
                    </if>
                    <if test="createBy != null">#{createBy},
                    </if>
                    <if test="createTime != null">#{createTime},
                    </if>
                    <if test="updateBy != null">#{updateBy},
                    </if>
                    <if test="updateTime != null">#{updateTime},
                    </if>
                    <if test="deleted != null">#{deleted},
                    </if>
                    <if test="createId != null">#{createId},
                    </if>
                    <if test="updateId != null">#{updateId},
                    </if>
        </trim>
    </insert>
    <update id="updateTjTeamAppLog" parameterType="TjTeamAppLog">
        update tj_team_app_log
        <trim prefix="SET" suffixOverrides=",">
                    <if test="cnName != null and cnName != ''">cn_name =
                        #{cnName},
                    </if>
                    <if test="taxNumber != null">tax_number =
                        #{taxNumber},
                    </if>
                    <if test="contactPerson != null">contact_person =
                        #{contactPerson},
                    </if>
                    <if test="contactPhone != null and contactPhone != ''">contact_phone =
                        #{contactPhone},
                    </if>
                    <if test="mailingAddress != null">mailing_address =
                        #{mailingAddress},
                    </if>
                    <if test="email != null">email =
                        #{email},
                    </if>
                    <if test="count != null">count =
                        #{count},
                    </if>
                    <if test="tjPacType != null">tj_pac_type =
                        #{tjPacType},
                    </if>
                    <if test="tjTime != null">tj_time =
                        #{tjTime},
                    </if>
                    <if test="pacId != null">pac_id =
                        #{pacId},
                    </if>
                    <if test="pacName != null">pac_name =
                        #{pacName},
                    </if>
                    <if test="fromBy != null">from_by =
                        #{fromBy},
                    </if>
                    <if test="createBy != null">create_by =
                        #{createBy},
                    </if>
                    <if test="createTime != null">create_time =
                        #{createTime},
                    </if>
                    <if test="updateBy != null">update_by =
                        #{updateBy},
                    </if>
                    <if test="updateTime != null">update_time =
                        #{updateTime},
                    </if>
                    <if test="deleted != null">deleted =
                        #{deleted},
                    </if>
                    <if test="createId != null">create_id =
                        #{createId},
                    </if>
                    <if test="updateId != null">update_id =
                        #{updateId},
                    </if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteTjTeamAppLogById" parameterType="Long">
        delete
        from tj_team_app_log where id = #{id}
    </delete>
    <delete id="deleteTjTeamAppLogByIds" parameterType="String">
        delete from tj_team_app_log where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
ltkj-hosp/src/main/resources/mapper/hosp/TjTeamContactLogMapper.xml
New file
@@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ltkj.hosp.mapper.TjTeamContactLogMapper">
    <resultMap type="TjTeamContactLog" id="TjTeamContactLogResult">
            <result property="id" column="id"/>
            <result property="logId" column="log_id"/>
            <result property="contactUserId" column="contact_user_id"/>
            <result property="contactUserName" column="contact_user_name"/>
            <result property="contactTime" column="contact_time"/>
            <result property="contactDetail" column="contact_detail"/>
            <result property="status" column="status"/>
            <result property="contactPerson" column="contact_person"/>
            <result property="contactPhone" column="contact_phone"/>
            <result property="createBy" column="create_by"/>
            <result property="createTime" column="create_time"/>
            <result property="updateBy" column="update_by"/>
            <result property="updateTime" column="update_time"/>
            <result property="deleted" column="deleted"/>
            <result property="createId" column="create_id"/>
            <result property="updateId" column="update_id"/>
    </resultMap>
    <sql id="selectTjTeamContactLogVo">
        select id, log_id, contact_user_id, contact_user_name, contact_time, contact_detail, status, contact_person, contact_phone, create_by, create_time, update_by, update_time, deleted, create_id, update_id
        from tj_team_contact_log
    </sql>
    <select id="selectTjTeamContactLogList" parameterType="TjTeamContactLog" resultMap="TjTeamContactLogResult">
        <include refid="selectTjTeamContactLogVo"/>
        <where>
                        <if test="logId != null ">
                            and log_id = #{logId}
                        </if>
                        <if test="contactUserId != null  and contactUserId != ''">
                            and contact_user_id = #{contactUserId}
                        </if>
                        <if test="contactUserName != null  and contactUserName != ''">
                            and contact_user_name like concat('%', #{contactUserName}, '%')
                        </if>
                        <if test="contactTime != null ">
                            and contact_time = #{contactTime}
                        </if>
                        <if test="contactDetail != null  and contactDetail != ''">
                            and contact_detail = #{contactDetail}
                        </if>
                        <if test="status != null  and status != ''">
                            and status = #{status}
                        </if>
                        <if test="contactPerson != null  and contactPerson != ''">
                            and contact_person = #{contactPerson}
                        </if>
                        <if test="contactPhone != null  and contactPhone != ''">
                            and contact_phone = #{contactPhone}
                        </if>
                        <if test="deleted != null ">
                            and deleted = #{deleted}
                        </if>
                        <if test="createId != null  and createId != ''">
                            and create_id = #{createId}
                        </if>
                        <if test="updateId != null  and updateId != ''">
                            and update_id = #{updateId}
                        </if>
        </where>
    </select>
    <select id="selectTjTeamContactLogById" parameterType="Long"
            resultMap="TjTeamContactLogResult">
            <include refid="selectTjTeamContactLogVo"/>
            where id = #{id}
    </select>
    <insert id="insertTjTeamContactLog" parameterType="TjTeamContactLog" useGeneratedKeys="true"
            keyProperty="id">
        insert into tj_team_contact_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
                    <if test="logId != null">log_id,
                    </if>
                    <if test="contactUserId != null">contact_user_id,
                    </if>
                    <if test="contactUserName != null">contact_user_name,
                    </if>
                    <if test="contactTime != null">contact_time,
                    </if>
                    <if test="contactDetail != null">contact_detail,
                    </if>
                    <if test="status != null">status,
                    </if>
                    <if test="contactPerson != null">contact_person,
                    </if>
                    <if test="contactPhone != null and contactPhone != ''">contact_phone,
                    </if>
                    <if test="createBy != null">create_by,
                    </if>
                    <if test="createTime != null">create_time,
                    </if>
                    <if test="updateBy != null">update_by,
                    </if>
                    <if test="updateTime != null">update_time,
                    </if>
                    <if test="deleted != null">deleted,
                    </if>
                    <if test="createId != null">create_id,
                    </if>
                    <if test="updateId != null">update_id,
                    </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                    <if test="logId != null">#{logId},
                    </if>
                    <if test="contactUserId != null">#{contactUserId},
                    </if>
                    <if test="contactUserName != null">#{contactUserName},
                    </if>
                    <if test="contactTime != null">#{contactTime},
                    </if>
                    <if test="contactDetail != null">#{contactDetail},
                    </if>
                    <if test="status != null">#{status},
                    </if>
                    <if test="contactPerson != null">#{contactPerson},
                    </if>
                    <if test="contactPhone != null and contactPhone != ''">#{contactPhone},
                    </if>
                    <if test="createBy != null">#{createBy},
                    </if>
                    <if test="createTime != null">#{createTime},
                    </if>
                    <if test="updateBy != null">#{updateBy},
                    </if>
                    <if test="updateTime != null">#{updateTime},
                    </if>
                    <if test="deleted != null">#{deleted},
                    </if>
                    <if test="createId != null">#{createId},
                    </if>
                    <if test="updateId != null">#{updateId},
                    </if>
        </trim>
    </insert>
    <update id="updateTjTeamContactLog" parameterType="TjTeamContactLog">
        update tj_team_contact_log
        <trim prefix="SET" suffixOverrides=",">
                    <if test="logId != null">log_id =
                        #{logId},
                    </if>
                    <if test="contactUserId != null">contact_user_id =
                        #{contactUserId},
                    </if>
                    <if test="contactUserName != null">contact_user_name =
                        #{contactUserName},
                    </if>
                    <if test="contactTime != null">contact_time =
                        #{contactTime},
                    </if>
                    <if test="contactDetail != null">contact_detail =
                        #{contactDetail},
                    </if>
                    <if test="status != null">status =
                        #{status},
                    </if>
                    <if test="contactPerson != null">contact_person =
                        #{contactPerson},
                    </if>
                    <if test="contactPhone != null and contactPhone != ''">contact_phone =
                        #{contactPhone},
                    </if>
                    <if test="createBy != null">create_by =
                        #{createBy},
                    </if>
                    <if test="createTime != null">create_time =
                        #{createTime},
                    </if>
                    <if test="updateBy != null">update_by =
                        #{updateBy},
                    </if>
                    <if test="updateTime != null">update_time =
                        #{updateTime},
                    </if>
                    <if test="deleted != null">deleted =
                        #{deleted},
                    </if>
                    <if test="createId != null">create_id =
                        #{createId},
                    </if>
                    <if test="updateId != null">update_id =
                        #{updateId},
                    </if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteTjTeamContactLogById" parameterType="Long">
        delete
        from tj_team_contact_log where id = #{id}
    </delete>
    <delete id="deleteTjTeamContactLogByIds" parameterType="String">
        delete from tj_team_contact_log where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>