From 219fd53dfa354caf13e4617479cd82422a228343 Mon Sep 17 00:00:00 2001
From: lige <bestlige@outlook.com>
Date: 星期五, 01 十二月 2023 17:43:13 +0800
Subject: [PATCH] 团队预约、沟通记录。。

---
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java          |  757 +++++++++--------
 ltkj-hosp/src/main/resources/mapper/hosp/TjTeamAppLogMapper.xml                          |  222 +++++
 ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamContactLogMapper.java                 |   65 +
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamAppLogController.java      |  103 ++
 ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamContactLogService.java              |   63 +
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java           |   14 
 ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamAppLogServiceImpl.java          |   93 ++
 ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamAppLogService.java                  |   63 +
 ltkj-admin/src/main/java/com/ltkj/web/controller/mall/WxTeamRecordController.java        |   84 ++
 ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java             |    3 
 ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictComp.java                               |   22 
 ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamAppLogMapper.java                     |   65 +
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java           |  195 ++++
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/StjSchedulingTimeController.java |    4 
 ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamAppLog.java                           |  144 +++
 ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamContactLog.java                       |   88 ++
 ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjOrder.java                                |   12 
 ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamSelectRecord.java                     |    7 
 ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamContactLogServiceImpl.java      |   93 ++
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java  |   98 ++
 ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjReportGetAddress.java                     |    7 
 ltkj-hosp/src/main/resources/mapper/hosp/TjTeamContactLogMapper.xml                      |  208 +++++
 22 files changed, 2,035 insertions(+), 375 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java
index 92e1af4..512d870 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java
+++ b/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;
diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/mall/WxTeamRecordController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/mall/WxTeamRecordController.java
new file mode 100644
index 0000000..f54b208
--- /dev/null
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/mall/WxTeamRecordController.java
@@ -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("棰勭害澶辫触");
+    }
+
+
+}
diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/StjSchedulingTimeController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/StjSchedulingTimeController.java
index 68d918c..2498add 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/StjSchedulingTimeController.java
+++ b/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;
 
 
diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
index c0280d0..da53400 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
+++ b/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("璇疯緭鍏ョ瀹d");
+        }
+        //鏍规嵁褰撳墠鐧婚檰鐨勪汉鐨勭瀹d锛岃幏鍙栬绉戝涓嬬殑鎵�鏈夐」鐩�
+        // 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);
diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
index 3269eef..e485e43 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
+++ b/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);
diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java
index 78eed12..e393cfa 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java
+++ b/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,9 +88,11 @@
     @Autowired
     private ISysConfigService configService;
 
+    @Autowired
+    private ISysDictDataService dictDataService;
 
 
-     //    /* *//**
+    //    /* *//**
 //     * 鏌ヨ浣撴鎶ュ憡瀛樺偍鍒楄〃
 //     *//*
 //    @PreAuthorize("@ss.hasPermi('system:report:list')")
@@ -256,32 +261,56 @@
 
 
         int num = tjOrderRemarkService.getTjYqOrderRemarkByTjNum(tjNumber);
-        if(num >0) return AjaxResult.error("鏈夊欢鏈熼」鐩殏涓嶈兘鐢熸垚鎶ュ憡!!!");
-
-        LambdaQueryWrapper<TjReportTemplate> tjReportTemplateLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        tjReportTemplateLambdaQueryWrapper.eq(TjReportTemplate::getFlag, 1);
-        tjReportTemplateLambdaQueryWrapper.eq(TjReportTemplate::getOpen, 0);
-        TjReportTemplate one1 = reportTemplateService.getOne(tjReportTemplateLambdaQueryWrapper);
-        String template = one1.getTemplate();
-
-        String userId = SecurityUtils.getLoginUser().getUsername();
-        PDFBinaryUtil.base64StringToPDF(template, FileUtil.mkdir(value).getPath() + "\\" + userId + "浣撴鎶ュ憡灏侀潰妯℃澘.pdf");
-        // --------浠ヤ笂-------  鏍规嵁鏁版嵁搴撲腑鐨勬ā鏉夸簩杩涘埗鏂囦欢  杞琾df  鍒涘缓鏂囦欢澶�  灏唒df鏀捐繘鏈湴鏂囦欢澶�
-
-        //鍒ゆ柇琛ㄤ腑鏈夋病鏈夎浣撴鎶ュ憡  涓嶈兘閲嶅鐢熸垚
-        LambdaQueryWrapper<TjReport> wqa = new LambdaQueryWrapper<>();
-        wqa.eq(TjReport::getTjNumber, tjNumber);
-        wqa.eq(TjReport::getType,"浣撴鎶ュ憡");
-        List<TjReport> list2 = tjReportService.list(wqa);
-        if (list2.size() != 0) {
-            return AjaxResult.error("璇ュ鎴锋姤鍛婂凡鐢熸垚锛佷笉鑳介噸澶嶇敓鎴愶紒鍙洿鎺ラ瑙堟垨鎵撳嵃锛�");
-        }
+        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();
+
+            String userId = SecurityUtils.getLoginUser().getUsername();
+            PDFBinaryUtil.base64StringToPDF(template, FileUtil.mkdir(value).getPath() + "\\" + userId + "浣撴鎶ュ憡灏侀潰妯℃澘.pdf");
+            // --------浠ヤ笂-------  鏍规嵁鏁版嵁搴撲腑鐨勬ā鏉夸簩杩涘埗鏂囦欢  杞琾df  鍒涘缓鏂囦欢澶�  灏唒df鏀捐繘鏈湴鏂囦欢澶�
+
+            //鍒ゆ柇琛ㄤ腑鏈夋病鏈夎浣撴鎶ュ憡  涓嶈兘閲嶅鐢熸垚
+            LambdaQueryWrapper<TjReport> wqa = new LambdaQueryWrapper<>();
+            wqa.eq(TjReport::getTjNumber, tjNumber);
+            wqa.eq(TjReport::getType, "浣撴鎶ュ憡");
+            List<TjReport> list2 = tjReportService.list(wqa);
+            if (list2.size() != 0) {
+                return AjaxResult.error("璇ュ鎴锋姤鍛婂凡鐢熸垚锛佷笉鑳介噸澶嶇敓鎴愶紒鍙洿鎺ラ瑙堟垨鎵撳嵃锛�");
+            }
+
+
             Integer checkStatus = tjOrder.getCheckStatus();
             if (checkStatus == 1) {
                 LambdaQueryWrapper<TjCustomer> wq1 = new LambdaQueryWrapper<>();
@@ -331,31 +360,31 @@
                     String tjtype;
                     if (cusSex == 0) {
                         sex = "鐢�";
-                        name1=tjCustomer.getCusName()+"鍏堢敓";
+                        name1 = tjCustomer.getCusName() + "鍏堢敓";
                     } else {
                         sex = "濂�";
-                        name1=tjCustomer.getCusName()+"濂冲+";
+                        name1 = tjCustomer.getCusName() + "濂冲+";
                     }
-                    data.put("name",tjCustomer.getCusName());
-                    data.put("cusId",tjCustomer.getCusId());
-                    data.put("name1",name1);
+                    data.put("name", tjCustomer.getCusName());
+                    data.put("cusId", tjCustomer.getCusId());
+                    data.put("name1", name1);
                     if ("1".equals(tjOrder.getTjType())) {
                         tjtype = "鍥㈤槦";
-                        data.put("tjtype",tjtype);
+                        data.put("tjtype", tjtype);
                     } else {
                         tjtype = "涓汉";
-                        data.put("tjtype",tjtype);
+                        data.put("tjtype", tjtype);
                     }
-                    data.put("dstype","缁熶竴");
+                    data.put("dstype", "缁熶竴");
                     data.put("sex", sex);
                     data.put("age", DateUtil.ageOfNow(tjCustomer.getCusBrithday()));
                     data.put("tjnumber", tjNumber);
                     data.put("tjdate", DateUtils.parseDateToStr("yyyy/MM/dd", tjOrder.getCreateTime()));
                     data.put("phone", tjCustomer.getCusPhone());
                     data.put("idcard", MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard()));
-                    data.put("num1",list.size());
-                    data.put("num2",0);
-                    data.put("num3",4);
+                    data.put("num1", list.size());
+                    data.put("num2", 0);
+                    data.put("num3", 4);
                     if (dictComp == null) {
                         data.put("work", "鏃�");
                     } else {
@@ -406,7 +435,7 @@
 
                     document.open();
 
-                    document.add(new Header("鍋ュ悍浣撴缁撴灉","鍋ュ悍浣撴缁撴灉"));
+                    document.add(new Header("鍋ュ悍浣撴缁撴灉", "鍋ュ悍浣撴缁撴灉"));
 
 
                     Map<TjOrderRemark, List<TjPdfVO>> tjOrderRemarkObjectMap = addTable(tjNumber);
@@ -415,7 +444,7 @@
                         LambdaQueryWrapper<TjProject> wqqq = new LambdaQueryWrapper<>();
                         wqqq.eq(TjProject::getProId, entry.getKey().getProId());
                         TjProject one11 = projectService.getOne(wqqq);
-                        if("1".equals(one11.getProCheckMethod())){
+                        if ("1".equals(one11.getProCheckMethod())) {
                             String titleName = one11.getProName();
                             // 璁剧疆鏍囬瀛椾綋鏍峰紡
                             Font titleFonts = PdfUtils.setFont(9);
@@ -438,36 +467,36 @@
                             }
 
                             String remark = "澶囨敞锛�" + entry.getKey().getRemark();
-                            if (entry.getKey().getRemark().length()>50){
-                                int j=0;
-                                for (int i = 0; i < remark.length()/50; i++) {
-                                    String substring = remark.substring(j, j+50);
+                            if (entry.getKey().getRemark().length() > 50) {
+                                int j = 0;
+                                for (int i = 0; i < remark.length() / 50; i++) {
+                                    String substring = remark.substring(j, j + 50);
                                     Font remarkFonts = PdfUtils.setFont(9);
                                     Paragraph pp = PdfUtils.setParagraph(remarkFonts, substring);
                                     document.add(pp);
-                                    j=j+50;
+                                    j = j + 50;
                                 }
-                                if (remark.length()%50!=0){
-                                    String substring = remark.substring((remark.length()/50)*50, remark.length()-1);
+                                if (remark.length() % 50 != 0) {
+                                    String substring = remark.substring((remark.length() / 50) * 50, remark.length() - 1);
                                     Font remarkFonts = PdfUtils.setFont(9);
                                     Paragraph pp = PdfUtils.setParagraph(remarkFonts, substring);
                                     document.add(pp);
                                 }
-                            }else {
+                            } else {
                                 Font remarkFonts = PdfUtils.setFont(9);
                                 Paragraph pp = PdfUtils.setParagraph(remarkFonts, remark);
                                 document.add(pp);
                             }
 
                             //鍒ゆ柇涓绘鍖诲笀鏄惁涓虹┖  绌轰笉鑳芥樉绀簄ull
-                            if (null !=entry.getKey().getDoctorName() && null !=userService.getById(entry.getKey().getDoctorName())) {
+                            if (null != entry.getKey().getDoctorName() && null != userService.getById(entry.getKey().getDoctorName())) {
                                 //涓绘鍖诲笀
                                 String doctorName = "涓绘鍖诲笀锛�" + userService.getById(entry.getKey().getDoctorName()).getNickName();
                                 Font doctorFonts = PdfUtils.setFont(9);
                                 Paragraph df = PdfUtils.setParagraph(doctorFonts, doctorName);
                                 df.setAlignment(Element.ALIGN_RIGHT);
                                 document.add(df);
-                            }else {
+                            } else {
                                 String doctorName = "涓绘鍖诲笀锛�" + "鏃�";
                                 Font doctorFonts = PdfUtils.setFont(9);
                                 Paragraph df = PdfUtils.setParagraph(doctorFonts, doctorName);
@@ -479,7 +508,7 @@
                             //鍒嗗壊绾�
                             LineSeparator objectName = new LineSeparator();
                             document.add(objectName);
-                        }else {
+                        } else {
                             String titleName = one11.getProName();
                             // 璁剧疆鏍囬瀛椾綋鏍峰紡
                             Font titleFonts = PdfUtils.setFont(9);
@@ -502,36 +531,36 @@
                             }
 
                             String remark = "澶囨敞锛�" + entry.getKey().getRemark();
-                            if (entry.getKey().getRemark().length()>50){
-                                int j=0;
-                                for (int i = 0; i < remark.length()/50; i++) {
-                                    String substring = remark.substring(j, j+50);
+                            if (entry.getKey().getRemark().length() > 50) {
+                                int j = 0;
+                                for (int i = 0; i < remark.length() / 50; i++) {
+                                    String substring = remark.substring(j, j + 50);
                                     Font remarkFonts = PdfUtils.setFont(9);
                                     Paragraph pp = PdfUtils.setParagraph(remarkFonts, substring);
                                     document.add(pp);
-                                    j=j+50;
+                                    j = j + 50;
                                 }
-                                if (remark.length()%50!=0){
-                                    String substring = remark.substring((remark.length()/50)*50, remark.length()-1);
+                                if (remark.length() % 50 != 0) {
+                                    String substring = remark.substring((remark.length() / 50) * 50, remark.length() - 1);
                                     Font remarkFonts = PdfUtils.setFont(9);
                                     Paragraph pp = PdfUtils.setParagraph(remarkFonts, substring);
                                     document.add(pp);
                                 }
-                            }else {
+                            } else {
                                 Font remarkFonts = PdfUtils.setFont(9);
                                 Paragraph pp = PdfUtils.setParagraph(remarkFonts, remark);
                                 document.add(pp);
                             }
 
                             //鍒ゆ柇涓绘鍖诲笀鏄惁涓虹┖  绌轰笉鑳芥樉绀簄ull
-                            if (null !=entry.getKey().getDoctorName() && null !=userService.getById(entry.getKey().getDoctorName())) {
+                            if (null != entry.getKey().getDoctorName() && null != userService.getById(entry.getKey().getDoctorName())) {
                                 //涓绘鍖诲笀
                                 String doctorName = "涓绘鍖诲笀锛�" + userService.getById(entry.getKey().getDoctorName()).getNickName();
                                 Font doctorFonts = PdfUtils.setFont(9);
                                 Paragraph df = PdfUtils.setParagraph(doctorFonts, doctorName);
                                 df.setAlignment(Element.ALIGN_RIGHT);
                                 document.add(df);
-                            }else {
+                            } else {
                                 String doctorName = "涓绘鍖诲笀锛�" + "鏃�";
                                 Font doctorFonts = PdfUtils.setFont(9);
                                 Paragraph df = PdfUtils.setParagraph(doctorFonts, doctorName);
@@ -571,9 +600,9 @@
 
 
                     //鍚堝苟
-                    String[] files1 = {value + "\\" + userId + "浣撴鎶ュ憡灏侀潰椤�.pdf", value + "\\" + userId + "浣撴鎶ュ憡椤圭洰璇︽儏椤�.pdf",value + "\\" + userId + "鍖诲鍚嶈瘝.pdf",value + "\\" + userId + "闄勪欢.pdf",value + "\\" + userId + "蹇冪數鍥�.pdf"};
+                    String[] files1 = {value + "\\" + userId + "浣撴鎶ュ憡灏侀潰椤�.pdf", value + "\\" + userId + "浣撴鎶ュ憡椤圭洰璇︽儏椤�.pdf", value + "\\" + userId + "鍖诲鍚嶈瘝.pdf", value + "\\" + userId + "闄勪欢.pdf", value + "\\" + userId + "蹇冪數鍥�.pdf"};
                     String outputPath1 = value + "\\";
-                    String outputFileName1 = userId+tjNumber +tjCustomer.getCusName()+ "_浣撴鎶ュ憡.pdf";
+                    String outputFileName1 = userId + tjNumber + tjCustomer.getCusName() + "_浣撴鎶ュ憡.pdf";
 
                     File file1 = new File(outputPath1 + outputFileName1);
                     List<File> f = new ArrayList<>();
@@ -631,14 +660,14 @@
         LambdaQueryWrapper<TjOrderDetail> wq = new LambdaQueryWrapper<>();
         wq.eq(TjOrderDetail::getOrderId, one.getOrderId());
         //20230323鍒ゆ柇椤圭洰宸叉
-        wq.ne(TjOrderDetail::getTjStatus,0);
+        wq.ne(TjOrderDetail::getTjStatus, 0);
         List<TjOrderDetail> tjOrderDetails = tjOrderDetailService.list(wq);
 
         //閬嶅巻浣撴璁板綍 灏嗛」鐩殑鍏蜂綋淇℃伅
         //閬嶅巻瀹㈡埛鎵�閫夌殑椤圭洰(鍖呭惈瀛愰」鐖堕」)
         for (TjOrderDetail tjOrderDetail : tjOrderDetails) {
             TjProject tjProject = projectService.getById(tjOrderDetail.getProId());
-            if(null !=tjProject){
+            if (null != tjProject) {
                 tjOrderDetail.setProject(tjProject);
             }
         }
@@ -657,8 +686,8 @@
         for (Map.Entry<TjOrderRemark, List<TjPdfVO>> entry : printReport.entrySet()) {
             List<TjPdfVO> tjPdfVOS = new ArrayList<>();
             for (TjOrderDetail tjOrderDetail : tjOrderDetails) {
-                if(null==tjOrderDetail.getProject()){
-                    System.out.println("'''''''''''''''''''''''''''''''''''"+tjOrderDetail.getOrderDetailId());
+                if (null == tjOrderDetail.getProject()) {
+                    System.out.println("'''''''''''''''''''''''''''''''''''" + tjOrderDetail.getOrderDetailId());
                 }
 
                 if (tjOrderDetail.getProject().getProParentId().equals(entry.getKey().getProId())) {
@@ -667,7 +696,7 @@
                     wq6.eq(TjStandard::getProId, tjOrderDetail.getProId());
                     List<TjStandard> list2 = tjStandardService.list(wq6);
                     if (list2.size() == 0) {
-                        TjStandard s=new TjStandard();
+                        TjStandard s = new TjStandard();
                         s.setCompany(" ");
                         s.setTjStandardLtValue(" ");
                         s.setTjStandardGtValue(" ");
@@ -696,19 +725,19 @@
                     tjPdfVO.setExc(tjOrderDetail.getExceptionDesc());
                     if (tjOrderDetail.getStandard() != null) {
                         //鍗曚綅
-                        if (tjOrderDetail.getStandard().getCompany()==null){
+                        if (tjOrderDetail.getStandard().getCompany() == null) {
                             tjPdfVO.setCompany(" ");
-                        }else {
+                        } else {
                             tjPdfVO.setCompany(tjOrderDetail.getStandard().getCompany());
                         }
                         //鏈�澶у�煎拰鏈�灏忓��
                         String tjStandardGtValue = tjOrderDetail.getStandard().getTjStandardGtValue();
                         String tjStandardLtValue = tjOrderDetail.getStandard().getTjStandardLtValue();
-                        if (tjStandardGtValue==null){
-                            tjStandardGtValue=" ";
+                        if (tjStandardGtValue == null) {
+                            tjStandardGtValue = " ";
                         }
-                        if (tjStandardLtValue==null){
-                            tjStandardLtValue=" ";
+                        if (tjStandardLtValue == null) {
+                            tjStandardLtValue = " ";
                         }
                         tjPdfVO.setStandardValue(tjStandardLtValue + "-" + tjStandardGtValue);
                     }
@@ -734,7 +763,7 @@
 
 
         LambdaQueryWrapper<TjOrder> wq1 = new LambdaQueryWrapper<>();
-        wq1.eq(TjOrder::getTjNumber,tjNumber);
+        wq1.eq(TjOrder::getTjNumber, tjNumber);
         TjOrder tjOrder = tjOrderService.getOne(wq1);
 
 
@@ -745,17 +774,17 @@
 
         LambdaQueryWrapper<TjReport> we = new LambdaQueryWrapper<>();
         we.eq(TjReport::getTjNumber, tjNumber);
-        we.eq(TjReport::getType,"浣撴鎶ュ憡");
+        we.eq(TjReport::getType, "浣撴鎶ュ憡");
         TjReport one = tjReportService.getOne(we);
         if (one == null) {
             return;
         }
         String userId = SecurityUtils.getLoginUser().getUsername();
-        PDFBinaryUtil.base64StringToPDF(one.getReport(), FileUtil.mkdir(value).getPath() + "\\" + userId+tjNumber +tjCustomer.getCusName()+ "_浣撴鎶ュ憡.pdf");
+        PDFBinaryUtil.base64StringToPDF(one.getReport(), FileUtil.mkdir(value).getPath() + "\\" + userId + tjNumber + tjCustomer.getCusName() + "_浣撴鎶ュ憡.pdf");
         //String filePath = one.getPath();
-        String filePath = value+ "\\" + userId+tjNumber +tjCustomer.getCusName()+ "_浣撴鎶ュ憡.pdf";
+        String filePath = value + "\\" + userId + tjNumber + tjCustomer.getCusName() + "_浣撴鎶ュ憡.pdf";
         File f = new File(filePath);
-        if (filePath.isEmpty()){
+        if (filePath.isEmpty()) {
             System.out.println("鏂囦欢涓嶅瓨鍦紒");
             return;
         }
@@ -775,13 +804,13 @@
                 String contentType = u.openConnection().getContentType();
                 response.setContentType(contentType);
                 response.setHeader("Content-Disposition", "inline;filename="
-                        + userId+tjNumber + ".pdf");
+                        + userId + tjNumber + ".pdf");
             } else {
                 // 绾笅杞芥柟寮�
                 response.setContentType("application/x-msdownload");
                 response.setContentType("application/pdf;charset=utf-8");
                 response.setHeader("Content-Disposition", "attachment;filename="
-                        + userId+tjNumber + ".pdf");
+                        + userId + tjNumber + ".pdf");
             }
             out = response.getOutputStream();
             while ((len = br.read(bs)) > 0) {
@@ -816,7 +845,7 @@
         QueryWrapper<TjReport> wq1 = new QueryWrapper<>();
         wq1.eq("tj_number", tjNumber);
         wq1.eq("type", "浣撴鎶ュ憡");
-        if (null!=tjReportService.getOne(wq1)){
+        if (null != tjReportService.getOne(wq1)) {
             if (!tjReportService.remove(wq1)) {
                 return AjaxResult.error("鎾ゅ洖澶辫触锛�");
             }
@@ -828,7 +857,7 @@
         String config = configService.selectConfigByKey("tj_confirm");
         if ("Y".equals(config)) {
             one.setStatus(TjConstants.TJ_CHECK);
-        }else {
+        } else {
             one.setStatus(TjConstants.TJ_CONFIRM);
         }
         //灏嗙姸鎬佹敼涓烘湭瀹℃牳
@@ -847,330 +876,330 @@
 
     @GetMapping("/tuanDuiReport")
     @ApiOperation(value = "鐢熸垚鍥㈤槦浣撴鎶ュ憡鈥斺�斿勾榫勭粺璁�")
-    public Map<String,List<Map<String, Object>>> tuanDuiReport(@ApiParam(value = "鍗曚綅") @RequestParam String firmId,
-                                    @ApiParam(value = "閮ㄩ棬") @RequestParam String firmDeptId){
-        Map<String,List<Map<String, Object>>> all=new HashMap<>();
-        List<Map<String, Object>> res1=new ArrayList<>();
+    public Map<String, List<Map<String, Object>>> tuanDuiReport(@ApiParam(value = "鍗曚綅") @RequestParam String firmId,
+                                                                @ApiParam(value = "閮ㄩ棬") @RequestParam String firmDeptId) {
+        Map<String, List<Map<String, Object>>> all = new HashMap<>();
+        List<Map<String, Object>> res1 = new ArrayList<>();
 
-        int a=0;
-        Map<String, Object> resMap1=new HashMap<>();
-        resMap1.put("name","0-19宀�");
-        resMap1.put("value",a);
+        int a = 0;
+        Map<String, Object> resMap1 = new HashMap<>();
+        resMap1.put("name", "0-19宀�");
+        resMap1.put("value", a);
         res1.add(resMap1);
-        Map<String, Object> resMap2=new HashMap<>();
-        resMap2.put("name","20-29宀�");
-        resMap2.put("value",a);
+        Map<String, Object> resMap2 = new HashMap<>();
+        resMap2.put("name", "20-29宀�");
+        resMap2.put("value", a);
         res1.add(resMap2);
-        Map<String, Object> resMap3=new HashMap<>();
-        resMap3.put("name","30-39宀�");
-        resMap3.put("value",a);
+        Map<String, Object> resMap3 = new HashMap<>();
+        resMap3.put("name", "30-39宀�");
+        resMap3.put("value", a);
         res1.add(resMap3);
-        Map<String, Object> resMap4=new HashMap<>();
-        resMap4.put("name","40-49宀�");
-        resMap4.put("value",a);
+        Map<String, Object> resMap4 = new HashMap<>();
+        resMap4.put("name", "40-49宀�");
+        resMap4.put("value", a);
         res1.add(resMap4);
-        Map<String, Object> resMap5=new HashMap<>();
-        resMap5.put("name","50-59宀�");
-        resMap5.put("value",a);
+        Map<String, Object> resMap5 = new HashMap<>();
+        resMap5.put("name", "50-59宀�");
+        resMap5.put("value", a);
         res1.add(resMap5);
-        Map<String, Object> resMap6=new HashMap<>();
-        resMap6.put("name","60-69宀�");
-        resMap6.put("value",a);
+        Map<String, Object> resMap6 = new HashMap<>();
+        resMap6.put("name", "60-69宀�");
+        resMap6.put("value", a);
         res1.add(resMap6);
-        Map<String, Object> resMap7=new HashMap<>();
-        resMap7.put("name","70-79宀�");
-        resMap7.put("value",a);
+        Map<String, Object> resMap7 = new HashMap<>();
+        resMap7.put("name", "70-79宀�");
+        resMap7.put("value", a);
         res1.add(resMap7);
-        Map<String, Object> resMap8=new HashMap<>();
-        resMap8.put("name","80宀�+");
-        resMap8.put("value",a);
+        Map<String, Object> resMap8 = new HashMap<>();
+        resMap8.put("name", "80宀�+");
+        resMap8.put("value", a);
         res1.add(resMap8);
 
 
-        LambdaQueryWrapper<TjOrder> wq2=new LambdaQueryWrapper<>();
-        wq2.eq(TjOrder::getFirmId,firmId);
-        wq2.eq(TjOrder::getFirmDeptId,firmDeptId);
-        wq2.eq(TjOrder::getTjType,"1");
-        wq2.in(TjOrder::getStatus,401,402);
+        LambdaQueryWrapper<TjOrder> wq2 = new LambdaQueryWrapper<>();
+        wq2.eq(TjOrder::getFirmId, firmId);
+        wq2.eq(TjOrder::getFirmDeptId, firmDeptId);
+        wq2.eq(TjOrder::getTjType, "1");
+        wq2.in(TjOrder::getStatus, 401, 402);
         final List<TjOrder> list = tjOrderService.list(wq2);
 
         for (TjOrder tjOrder : list) {
-            a=0;
+            a = 0;
             final TjCustomer byId = tjCustomerService.getById(tjOrder.getUserId());
             final int ageByIdCard = MatchUtils.getAgeByIdCard(byId.getCusIdcard());
 
 
-            if (0<=ageByIdCard && ageByIdCard<=19){
+            if (0 <= ageByIdCard && ageByIdCard <= 19) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("0-19宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
+                    if ("0-19宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
                     }
                 }
-            }else if (20<=ageByIdCard && ageByIdCard<=29){
+            } else if (20 <= ageByIdCard && ageByIdCard <= 29) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("20-29宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
+                    if ("20-29宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
                     }
                 }
-            }else if (30<=ageByIdCard && ageByIdCard<=39){
+            } else if (30 <= ageByIdCard && ageByIdCard <= 39) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("30-39宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
+                    if ("30-39宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
                     }
                 }
-            }else if (40<=ageByIdCard && ageByIdCard<=49){
+            } else if (40 <= ageByIdCard && ageByIdCard <= 49) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("40-49宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
+                    if ("40-49宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
                     }
                 }
-            }else if (50<=ageByIdCard && ageByIdCard<=59){
+            } else if (50 <= ageByIdCard && ageByIdCard <= 59) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("50-59宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
+                    if ("50-59宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
                     }
                 }
-            }else if (60<=ageByIdCard && ageByIdCard<=69){
+            } else if (60 <= ageByIdCard && ageByIdCard <= 69) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("60-69宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
+                    if ("60-69宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
                     }
                 }
-            }else if (70<=ageByIdCard && ageByIdCard<=79){
+            } else if (70 <= ageByIdCard && ageByIdCard <= 79) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("70-79宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
+                    if ("70-79宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
                     }
                 }
-            }else {
+            } else {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("80宀�+".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
+                    if ("80宀�+".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
                     }
                 }
             }
         }
-        all.put("data",res1);
+        all.put("data", res1);
         return all;
 
     }
 
     @GetMapping("/tuanDuiReportBySex")
     @ApiOperation(value = "鐢熸垚鍥㈤槦浣撴鎶ュ憡鈥斺�斿勾榫勬�у埆缁熻")
-    public Map<String,List<Map<String, Object>>> tuanDuiReportBySex(@ApiParam(value = "鍗曚綅") @RequestParam String firmIds,
-                                                               @ApiParam(value = "閮ㄩ棬") @RequestParam String firmDeptIds){
-        Map<String,List<Map<String, Object>>> all=new HashMap<>();
-        List<Map<String, Object>> res1=new ArrayList<>();
+    public Map<String, List<Map<String, Object>>> tuanDuiReportBySex(@ApiParam(value = "鍗曚綅") @RequestParam String firmIds,
+                                                                     @ApiParam(value = "閮ㄩ棬") @RequestParam String firmDeptIds) {
+        Map<String, List<Map<String, Object>>> all = new HashMap<>();
+        List<Map<String, Object>> res1 = new ArrayList<>();
 
-        int a=0;
-        int b=0;
-        int c=0;
-        Map<String, Object> resMap1=new HashMap<>();
-        resMap1.put("name","0-19宀�");
-        resMap1.put("value",a);
-        resMap1.put("boy",b);
-        resMap1.put("girl",c);
-        resMap1.put("value1",0);
-        resMap1.put("boy1",0);
-        resMap1.put("girl1",0);
+        int a = 0;
+        int b = 0;
+        int c = 0;
+        Map<String, Object> resMap1 = new HashMap<>();
+        resMap1.put("name", "0-19宀�");
+        resMap1.put("value", a);
+        resMap1.put("boy", b);
+        resMap1.put("girl", c);
+        resMap1.put("value1", 0);
+        resMap1.put("boy1", 0);
+        resMap1.put("girl1", 0);
         res1.add(resMap1);
-        Map<String, Object> resMap2=new HashMap<>();
-        resMap2.put("name","20-29宀�");
-        resMap2.put("value",a);
-        resMap2.put("boy",b);
-        resMap2.put("girl",c);
-        resMap2.put("value1",0);
-        resMap2.put("boy1",0);
-        resMap2.put("girl1",0);
+        Map<String, Object> resMap2 = new HashMap<>();
+        resMap2.put("name", "20-29宀�");
+        resMap2.put("value", a);
+        resMap2.put("boy", b);
+        resMap2.put("girl", c);
+        resMap2.put("value1", 0);
+        resMap2.put("boy1", 0);
+        resMap2.put("girl1", 0);
         res1.add(resMap2);
-        Map<String, Object> resMap3=new HashMap<>();
-        resMap3.put("name","30-39宀�");
-        resMap3.put("value",a);
-        resMap3.put("boy",b);
-        resMap3.put("girl",c);
-        resMap3.put("value1",0);
-        resMap3.put("boy1",0);
-        resMap3.put("girl1",0);
+        Map<String, Object> resMap3 = new HashMap<>();
+        resMap3.put("name", "30-39宀�");
+        resMap3.put("value", a);
+        resMap3.put("boy", b);
+        resMap3.put("girl", c);
+        resMap3.put("value1", 0);
+        resMap3.put("boy1", 0);
+        resMap3.put("girl1", 0);
         res1.add(resMap3);
-        Map<String, Object> resMap4=new HashMap<>();
-        resMap4.put("name","40-49宀�");
-        resMap4.put("value",a);
-        resMap4.put("boy",b);
-        resMap4.put("girl",c);
-        resMap4.put("value1",0);
-        resMap4.put("boy1",0);
-        resMap4.put("girl1",0);
+        Map<String, Object> resMap4 = new HashMap<>();
+        resMap4.put("name", "40-49宀�");
+        resMap4.put("value", a);
+        resMap4.put("boy", b);
+        resMap4.put("girl", c);
+        resMap4.put("value1", 0);
+        resMap4.put("boy1", 0);
+        resMap4.put("girl1", 0);
         res1.add(resMap4);
-        Map<String, Object> resMap5=new HashMap<>();
-        resMap5.put("name","50-59宀�");
-        resMap5.put("value",a);
-        resMap5.put("boy",b);
-        resMap5.put("girl",c);
-        resMap5.put("value1",0);
-        resMap5.put("boy1",0);
-        resMap5.put("girl1",0);
+        Map<String, Object> resMap5 = new HashMap<>();
+        resMap5.put("name", "50-59宀�");
+        resMap5.put("value", a);
+        resMap5.put("boy", b);
+        resMap5.put("girl", c);
+        resMap5.put("value1", 0);
+        resMap5.put("boy1", 0);
+        resMap5.put("girl1", 0);
         res1.add(resMap5);
-        Map<String, Object> resMap6=new HashMap<>();
-        resMap6.put("name","60-69宀�");
-        resMap6.put("value",a);
-        resMap6.put("boy",b);
-        resMap6.put("girl",c);
-        resMap6.put("value1",0);
-        resMap6.put("boy1",0);
-        resMap6.put("girl1",0);
+        Map<String, Object> resMap6 = new HashMap<>();
+        resMap6.put("name", "60-69宀�");
+        resMap6.put("value", a);
+        resMap6.put("boy", b);
+        resMap6.put("girl", c);
+        resMap6.put("value1", 0);
+        resMap6.put("boy1", 0);
+        resMap6.put("girl1", 0);
         res1.add(resMap6);
-        Map<String, Object> resMap7=new HashMap<>();
-        resMap7.put("name","70-79宀�");
-        resMap7.put("value",a);
-        resMap7.put("boy",b);
-        resMap7.put("girl",c);
-        resMap7.put("value1",0);
-        resMap7.put("boy1",0);
-        resMap7.put("girl1",0);
+        Map<String, Object> resMap7 = new HashMap<>();
+        resMap7.put("name", "70-79宀�");
+        resMap7.put("value", a);
+        resMap7.put("boy", b);
+        resMap7.put("girl", c);
+        resMap7.put("value1", 0);
+        resMap7.put("boy1", 0);
+        resMap7.put("girl1", 0);
         res1.add(resMap7);
-        Map<String, Object> resMap8=new HashMap<>();
-        resMap8.put("name","80宀�+");
-        resMap8.put("value",a);
-        resMap8.put("boy",b);
-        resMap8.put("girl",c);
-        resMap8.put("value1",0);
-        resMap8.put("boy1",0);
-        resMap8.put("girl1",0);
+        Map<String, Object> resMap8 = new HashMap<>();
+        resMap8.put("name", "80宀�+");
+        resMap8.put("value", a);
+        resMap8.put("boy", b);
+        resMap8.put("girl", c);
+        resMap8.put("value1", 0);
+        resMap8.put("boy1", 0);
+        resMap8.put("girl1", 0);
         res1.add(resMap8);
 
 
-        LambdaQueryWrapper<TjOrder> wq2=new LambdaQueryWrapper<>();
-        wq2.eq(TjOrder::getFirmId,firmIds);
-        wq2.eq(TjOrder::getFirmDeptId,firmDeptIds);
-        wq2.eq(TjOrder::getTjType,"1");
-        wq2.in(TjOrder::getStatus,401,402);
+        LambdaQueryWrapper<TjOrder> wq2 = new LambdaQueryWrapper<>();
+        wq2.eq(TjOrder::getFirmId, firmIds);
+        wq2.eq(TjOrder::getFirmDeptId, firmDeptIds);
+        wq2.eq(TjOrder::getTjType, "1");
+        wq2.in(TjOrder::getStatus, 401, 402);
         final List<TjOrder> list = tjOrderService.list(wq2);
 
         for (TjOrder tjOrder : list) {
-            a=0;
-            b=0;
-            c=0;
+            a = 0;
+            b = 0;
+            c = 0;
             final TjCustomer byId = tjCustomerService.getById(tjOrder.getUserId());
             final int ageByIdCard = MatchUtils.getAgeByIdCard(byId.getCusIdcard());
 
-            if (0<=ageByIdCard && ageByIdCard<=19){
+            if (0 <= ageByIdCard && ageByIdCard <= 19) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("0-19宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
-                        if (byId.getCusSex()==0){
-                            b+=1;
-                        }else if (byId.getCusSex()==1){
-                            c+=1;
+                    if ("0-19宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
+                        if (byId.getCusSex() == 0) {
+                            b += 1;
+                        } else if (byId.getCusSex() == 1) {
+                            c += 1;
                         }
-                        res1.get(i).put("boy",b);
-                        res1.get(i).put("girl",c);
+                        res1.get(i).put("boy", b);
+                        res1.get(i).put("girl", c);
                     }
                 }
-            }else if (20<=ageByIdCard && ageByIdCard<=29){
+            } else if (20 <= ageByIdCard && ageByIdCard <= 29) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("20-29宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
-                        if (byId.getCusSex()==0){
-                            b+=1;
-                        }else if (byId.getCusSex()==1){
-                            c+=1;
+                    if ("20-29宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
+                        if (byId.getCusSex() == 0) {
+                            b += 1;
+                        } else if (byId.getCusSex() == 1) {
+                            c += 1;
                         }
-                        res1.get(i).put("boy",b);
-                        res1.get(i).put("girl",c);
+                        res1.get(i).put("boy", b);
+                        res1.get(i).put("girl", c);
                     }
                 }
-            }else if (30<=ageByIdCard && ageByIdCard<=39){
+            } else if (30 <= ageByIdCard && ageByIdCard <= 39) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("30-39宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
-                        if (byId.getCusSex()==0){
-                            b+=1;
-                        }else if (byId.getCusSex()==1){
-                            c+=1;
+                    if ("30-39宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
+                        if (byId.getCusSex() == 0) {
+                            b += 1;
+                        } else if (byId.getCusSex() == 1) {
+                            c += 1;
                         }
-                        res1.get(i).put("boy",b);
-                        res1.get(i).put("girl",c);
+                        res1.get(i).put("boy", b);
+                        res1.get(i).put("girl", c);
                     }
                 }
-            }else if (40<=ageByIdCard && ageByIdCard<=49){
+            } else if (40 <= ageByIdCard && ageByIdCard <= 49) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("40-49宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
-                        if (byId.getCusSex()==0){
-                            b+=1;
-                        }else if (byId.getCusSex()==1){
-                            c+=1;
+                    if ("40-49宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
+                        if (byId.getCusSex() == 0) {
+                            b += 1;
+                        } else if (byId.getCusSex() == 1) {
+                            c += 1;
                         }
-                        res1.get(i).put("boy",b);
-                        res1.get(i).put("girl",c);
+                        res1.get(i).put("boy", b);
+                        res1.get(i).put("girl", c);
                     }
                 }
-            }else if (50<=ageByIdCard && ageByIdCard<=59){
+            } else if (50 <= ageByIdCard && ageByIdCard <= 59) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("50-59宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
-                        if (byId.getCusSex()==0){
-                            b+=1;
-                        }else if (byId.getCusSex()==1){
-                            c+=1;
+                    if ("50-59宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
+                        if (byId.getCusSex() == 0) {
+                            b += 1;
+                        } else if (byId.getCusSex() == 1) {
+                            c += 1;
                         }
-                        res1.get(i).put("boy",b);
-                        res1.get(i).put("girl",c);
+                        res1.get(i).put("boy", b);
+                        res1.get(i).put("girl", c);
                     }
                 }
-            }else if (60<=ageByIdCard && ageByIdCard<=69){
+            } else if (60 <= ageByIdCard && ageByIdCard <= 69) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("60-69宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
-                        if (byId.getCusSex()==0){
-                            b+=1;
-                        }else if (byId.getCusSex()==1){
-                            c+=1;
+                    if ("60-69宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
+                        if (byId.getCusSex() == 0) {
+                            b += 1;
+                        } else if (byId.getCusSex() == 1) {
+                            c += 1;
                         }
-                        res1.get(i).put("boy",b);
-                        res1.get(i).put("girl",c);
+                        res1.get(i).put("boy", b);
+                        res1.get(i).put("girl", c);
                     }
                 }
-            }else if (70<=ageByIdCard && ageByIdCard<=79){
+            } else if (70 <= ageByIdCard && ageByIdCard <= 79) {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("70-79宀�".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
-                        if (byId.getCusSex()==0){
-                            b+=1;
-                        }else if (byId.getCusSex()==1){
-                            c+=1;
+                    if ("70-79宀�".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
+                        if (byId.getCusSex() == 0) {
+                            b += 1;
+                        } else if (byId.getCusSex() == 1) {
+                            c += 1;
                         }
-                        res1.get(i).put("boy",b);
-                        res1.get(i).put("girl",c);
+                        res1.get(i).put("boy", b);
+                        res1.get(i).put("girl", c);
                     }
                 }
-            }else {
+            } else {
                 for (int i = 0; i < res1.size(); i++) {
-                    if ("80宀�+".equals(res1.get(i).get("name"))){
-                        a+=1;
-                        res1.get(i).put("value",a);
-                        if (byId.getCusSex()==0){
-                            b+=1;
-                        }else if (byId.getCusSex()==1){
-                            c+=1;
+                    if ("80宀�+".equals(res1.get(i).get("name"))) {
+                        a += 1;
+                        res1.get(i).put("value", a);
+                        if (byId.getCusSex() == 0) {
+                            b += 1;
+                        } else if (byId.getCusSex() == 1) {
+                            c += 1;
                         }
-                        res1.get(i).put("boy",b);
-                        res1.get(i).put("girl",c);
+                        res1.get(i).put("boy", b);
+                        res1.get(i).put("girl", c);
                     }
                 }
             }
@@ -1180,7 +1209,7 @@
             final int value1 = (int) res1.get(i).get("boy");
             final int value2 = (int) res1.get(i).get("girl");
             final int value = (int) res1.get(i).get("value");
-            if (value!=0){
+            if (value != 0) {
                 double percentage = (value1 * 1.0 / value) * 100;
                 NumberFormat nf = NumberFormat.getPercentInstance();
                 nf.setMinimumFractionDigits(2);
@@ -1194,14 +1223,14 @@
                 NumberFormat numberFormat = NumberFormat.getInstance();
                 numberFormat.setMaximumFractionDigits(2);
                 String result = numberFormat.format((float) value1 / (float) value2 * 100);
-                res1.get(i).put("boy1",percent1);
-                res1.get(i).put("girl1",percent2);
-                res1.get(i).put("value1",result);
+                res1.get(i).put("boy1", percent1);
+                res1.get(i).put("girl1", percent2);
+                res1.get(i).put("value1", result);
 
             }
 
         }
-        all.put("data",res1);
+        all.put("data", res1);
         return all;
 
     }
@@ -1209,65 +1238,65 @@
 
     @GetMapping("/tuanDuiYiChang")
     @ApiOperation(value = "鐢熸垚鍥㈤槦浣撴鎶ュ憡鈥斺�斿紓甯哥粨鏋滅粺璁�")
-    public Map<String,List<Map<String, Object>>> tuanDuiYiChang(@ApiParam(value = "鍗曚綅") @RequestParam String firmId,
-                                                               @ApiParam(value = "閮ㄩ棬") @RequestParam String firmDeptId){
+    public Map<String, List<Map<String, Object>>> tuanDuiYiChang(@ApiParam(value = "鍗曚綅") @RequestParam String firmId,
+                                                                 @ApiParam(value = "閮ㄩ棬") @RequestParam String firmDeptId) {
 
-        Map<String,List<Map<String, Object>>> all=new HashMap<>();
+        Map<String, List<Map<String, Object>>> all = new HashMap<>();
 
-        LambdaQueryWrapper<TjOrder> wq2=new LambdaQueryWrapper<>();
-        wq2.eq(TjOrder::getFirmId,firmId);
-        wq2.eq(TjOrder::getFirmDeptId,firmDeptId);
-        wq2.eq(TjOrder::getTjType,"1");
-        wq2.in(TjOrder::getStatus,401,402);
+        LambdaQueryWrapper<TjOrder> wq2 = new LambdaQueryWrapper<>();
+        wq2.eq(TjOrder::getFirmId, firmId);
+        wq2.eq(TjOrder::getFirmDeptId, firmDeptId);
+        wq2.eq(TjOrder::getTjType, "1");
+        wq2.in(TjOrder::getStatus, 401, 402);
         final List<TjOrder> list = tjOrderService.list(wq2);
 
-        List<TjOrderDetailRules> res11=new ArrayList<>();
+        List<TjOrderDetailRules> res11 = new ArrayList<>();
         for (TjOrder tjOrder : list) {
-            LambdaQueryWrapper<TjOrderDetailRules> wq1=new LambdaQueryWrapper<>();
-            wq1.eq(TjOrderDetailRules::getTjNumber,tjOrder.getTjNumber());
+            LambdaQueryWrapper<TjOrderDetailRules> wq1 = new LambdaQueryWrapper<>();
+            wq1.eq(TjOrderDetailRules::getTjNumber, tjOrder.getTjNumber());
             final List<TjOrderDetailRules> list1 = detailRulesService.list(wq1);
             //鏀捐繘闆嗗悎
             res11.addAll(list1);
         }
         //鍘婚噸鏀堕泦
         Map<String, Long> columnCountMap = res11.stream().collect(Collectors.groupingBy(TjOrderDetailRules::getAid, Collectors.counting()));
-        List<Map<String, Object>> aaa=new ArrayList<>();
-        if (columnCountMap!=null){
-            for(Map.Entry<String, Long> entry:columnCountMap.entrySet()){
-                Map<String, Object> resMap=new HashMap<>();
+        List<Map<String, Object>> aaa = new ArrayList<>();
+        if (columnCountMap != null) {
+            for (Map.Entry<String, Long> entry : columnCountMap.entrySet()) {
+                Map<String, Object> resMap = new HashMap<>();
                 final TjRules byId = rulesService.getById(entry.getKey());
-                if (byId!=null){
+                if (byId != null) {
                     resMap.put("name", byId.getBingzhong());
                     resMap.put("value", String.valueOf(entry.getValue()));
                     aaa.add(resMap);
                 }
             }
         }
-        all.put("data",aaa);
+        all.put("data", aaa);
         return all;
 
     }
 
     @GetMapping("/tuanDuiYiChangBySex")
     @ApiOperation(value = "鐢熸垚鍥㈤槦浣撴鎶ュ憡鈥斺�旂敺濂冲紓甯哥粨鏋滅粺璁�")
-    public Map<String,List<Map<String, Object>>> tuanDuiYiChangBySex(@ApiParam(value = "鍗曚綅") @RequestParam String firmId,
-                                                                @ApiParam(value = "閮ㄩ棬") @RequestParam String firmDeptId){
+    public Map<String, List<Map<String, Object>>> tuanDuiYiChangBySex(@ApiParam(value = "鍗曚綅") @RequestParam String firmId,
+                                                                      @ApiParam(value = "閮ㄩ棬") @RequestParam String firmDeptId) {
 
-        Map<String,List<Map<String, Object>>> all=new HashMap<>();
+        Map<String, List<Map<String, Object>>> all = new HashMap<>();
 
-        LambdaQueryWrapper<TjOrder> wq2=new LambdaQueryWrapper<>();
-        wq2.eq(TjOrder::getFirmId,firmId);
-        wq2.eq(TjOrder::getFirmDeptId,firmDeptId);
-        wq2.eq(TjOrder::getTjType,"1");
-        wq2.in(TjOrder::getStatus,401,402);
+        LambdaQueryWrapper<TjOrder> wq2 = new LambdaQueryWrapper<>();
+        wq2.eq(TjOrder::getFirmId, firmId);
+        wq2.eq(TjOrder::getFirmDeptId, firmDeptId);
+        wq2.eq(TjOrder::getTjType, "1");
+        wq2.in(TjOrder::getStatus, 401, 402);
         final List<TjOrder> list = tjOrderService.list(wq2);
 
-        List<String> tjNumberList=list.stream().map(TjOrder::getTjNumber).collect(Collectors.toList());
+        List<String> tjNumberList = list.stream().map(TjOrder::getTjNumber).collect(Collectors.toList());
 
-        List<TjOrderDetailRules> res11=new ArrayList<>();
+        List<TjOrderDetailRules> res11 = new ArrayList<>();
         for (TjOrder tjOrder : list) {
-            LambdaQueryWrapper<TjOrderDetailRules> wq1=new LambdaQueryWrapper<>();
-            wq1.eq(TjOrderDetailRules::getTjNumber,tjOrder.getTjNumber());
+            LambdaQueryWrapper<TjOrderDetailRules> wq1 = new LambdaQueryWrapper<>();
+            wq1.eq(TjOrderDetailRules::getTjNumber, tjOrder.getTjNumber());
             final List<TjOrderDetailRules> list1 = detailRulesService.list(wq1);
             //鏀捐繘闆嗗悎
             res11.addAll(list1);
@@ -1275,36 +1304,36 @@
         //鍘婚噸鏀堕泦
         Map<String, Long> columnCountMap = res11.stream().collect(Collectors.groupingBy(TjOrderDetailRules::getAid, Collectors.counting()));
 
-        List<Map<String, Object>> aaa=new ArrayList<>();
-        if (columnCountMap!=null){
+        List<Map<String, Object>> aaa = new ArrayList<>();
+        if (columnCountMap != null) {
 
-            for(Map.Entry<String, Long> entry:columnCountMap.entrySet()){
-                int a=0;
-                int b=0;
-                Map<String, Object> resMap=new HashMap<>();
+            for (Map.Entry<String, Long> entry : columnCountMap.entrySet()) {
+                int a = 0;
+                int b = 0;
+                Map<String, Object> resMap = new HashMap<>();
                 final TjRules byId = rulesService.getById(entry.getKey());
-                if (byId!=null){
+                if (byId != null) {
                     resMap.put("name", byId.getBingzhong());
                     resMap.put("value", entry.getValue().intValue());
-                    resMap.put("boy",a);
-                    resMap.put("girl",b);
-                    resMap.put("value1",0);
-                    resMap.put("boy1",0);
-                    resMap.put("girl1",0);
+                    resMap.put("boy", a);
+                    resMap.put("girl", b);
+                    resMap.put("value1", 0);
+                    resMap.put("boy1", 0);
+                    resMap.put("girl1", 0);
 
                     //
-                    LambdaQueryWrapper<TjOrderDetailRules> wq11=new LambdaQueryWrapper<>();
-                    wq11.eq(TjOrderDetailRules::getAid,entry.getKey());
-                    wq11.in(TjOrderDetailRules::getTjNumber,tjNumberList);
+                    LambdaQueryWrapper<TjOrderDetailRules> wq11 = new LambdaQueryWrapper<>();
+                    wq11.eq(TjOrderDetailRules::getAid, entry.getKey());
+                    wq11.in(TjOrderDetailRules::getTjNumber, tjNumberList);
                     final List<TjOrderDetailRules> list1 = detailRulesService.list(wq11);
                     for (TjOrderDetailRules orderDetailRules : list1) {
                         resMap.put("name", orderDetailRules.getBingzhong());
-                        if ("0".equals(orderDetailRules.getCusSex())){
-                            a+=1;
-                            resMap.put("boy",a);
-                        }else if ("1".equals(orderDetailRules.getCusSex())){
-                            b+=1;
-                            resMap.put("girl",b);
+                        if ("0".equals(orderDetailRules.getCusSex())) {
+                            a += 1;
+                            resMap.put("boy", a);
+                        } else if ("1".equals(orderDetailRules.getCusSex())) {
+                            b += 1;
+                            resMap.put("girl", b);
                         }
                     }
                     aaa.add(resMap);
@@ -1317,7 +1346,7 @@
             final Integer value1 = (Integer) aaa.get(i).get("boy");
             final Integer value2 = (Integer) aaa.get(i).get("girl");
             final Integer value = (Integer) aaa.get(i).get("value");
-            if (value!=0){
+            if (value != 0) {
                 double percentage = (value1 * 1.0 / value) * 100;
                 NumberFormat nf = NumberFormat.getPercentInstance();
                 nf.setMinimumFractionDigits(2);
@@ -1331,13 +1360,13 @@
                 NumberFormat numberFormat = NumberFormat.getInstance();
                 numberFormat.setMaximumFractionDigits(2);
                 String result = numberFormat.format((float) value1 / (float) value2 * 100);
-                aaa.get(i).put("boy1",percent1);
-                aaa.get(i).put("girl1",percent2);
-                aaa.get(i).put("value1",result);
+                aaa.get(i).put("boy1", percent1);
+                aaa.get(i).put("girl1", percent2);
+                aaa.get(i).put("value1", result);
 
             }
         }
-        all.put("data",aaa);
+        all.put("data", aaa);
         return all;
 
     }
diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamAppLogController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamAppLogController.java
new file mode 100644
index 0000000..d4719f3
--- /dev/null
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamAppLogController.java
@@ -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;
+
+/**
+ * 灏忕▼搴忓洟闃熼绾﹁褰旵ontroller
+ *
+ * @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));
+    }
+
+
+
+
+}
diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java
new file mode 100644
index 0000000..31cd5b8
--- /dev/null
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjTeamContactLogController.java
@@ -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;
+
+/**
+ * 鍥㈤槦棰勭害娌熼�氳褰旵ontroller
+ *
+ * @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));
+    }
+}
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictComp.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictComp.java
index 73d912e..72161d2 100644
--- a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/DictComp.java
+++ b/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)
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjOrder.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjOrder.java
index 0b9696a..d103197 100644
--- a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjOrder.java
+++ b/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() {
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjReportGetAddress.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjReportGetAddress.java
index 6110809..a4d617f 100644
--- a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjReportGetAddress.java
+++ b/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;
 
     /**
      * 鏀惰揣浜�
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamAppLog.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamAppLog.java
new file mode 100644
index 0000000..d4ca3eb
--- /dev/null
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamAppLog.java
@@ -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();
+    }
+}
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamContactLog.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamContactLog.java
new file mode 100644
index 0000000..761c38e
--- /dev/null
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamContactLog.java
@@ -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;
+
+
+}
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamSelectRecord.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamSelectRecord.java
index f9a12c8..4c6f6d1 100644
--- a/ltkj-hosp/src/main/java/com/ltkj/hosp/domain/TjTeamSelectRecord.java
+++ b/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;
+
     /**
      * 鍥㈤槦缂栧彿
      */
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamAppLogMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamAppLogMapper.java
new file mode 100644
index 0000000..0e91015
--- /dev/null
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamAppLogMapper.java
@@ -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;
+
+/**
+ * 灏忕▼搴忓洟闃熼绾﹁褰昅apper鎺ュ彛
+ *
+ * @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);
+}
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamContactLogMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamContactLogMapper.java
new file mode 100644
index 0000000..1132a3d
--- /dev/null
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjTeamContactLogMapper.java
@@ -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;
+
+/**
+ * 鍥㈤槦棰勭害娌熼�氳褰昅apper鎺ュ彛
+ *
+ * @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);
+}
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamAppLogService.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamAppLogService.java
new file mode 100644
index 0000000..00d6d6d
--- /dev/null
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamAppLogService.java
@@ -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;
+
+/**
+ * 灏忕▼搴忓洟闃熼绾﹁褰昐ervice鎺ュ彛
+ *
+ * @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);
+}
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamContactLogService.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamContactLogService.java
new file mode 100644
index 0000000..cfb6a7b
--- /dev/null
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/ITjTeamContactLogService.java
@@ -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;
+
+/**
+ * 鍥㈤槦棰勭害娌熼�氳褰昐ervice鎺ュ彛
+ *
+ * @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);
+}
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamAppLogServiceImpl.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamAppLogServiceImpl.java
new file mode 100644
index 0000000..43c3e4d
--- /dev/null
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamAppLogServiceImpl.java
@@ -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;
+
+/**
+ * 灏忕▼搴忓洟闃熼绾﹁褰昐ervice涓氬姟灞傚鐞�
+ *
+ * @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);
+    }
+}
diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamContactLogServiceImpl.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamContactLogServiceImpl.java
new file mode 100644
index 0000000..e8fb21c
--- /dev/null
+++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/TjTeamContactLogServiceImpl.java
@@ -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;
+
+/**
+ * 鍥㈤槦棰勭害娌熼�氳褰昐ervice涓氬姟灞傚鐞�
+ *
+ * @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);
+    }
+}
diff --git a/ltkj-hosp/src/main/resources/mapper/hosp/TjTeamAppLogMapper.xml b/ltkj-hosp/src/main/resources/mapper/hosp/TjTeamAppLogMapper.xml
new file mode 100644
index 0000000..0b54e3c
--- /dev/null
+++ b/ltkj-hosp/src/main/resources/mapper/hosp/TjTeamAppLogMapper.xml
@@ -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>
\ No newline at end of file
diff --git a/ltkj-hosp/src/main/resources/mapper/hosp/TjTeamContactLogMapper.xml b/ltkj-hosp/src/main/resources/mapper/hosp/TjTeamContactLogMapper.xml
new file mode 100644
index 0000000..8af3ff9
--- /dev/null
+++ b/ltkj-hosp/src/main/resources/mapper/hosp/TjTeamContactLogMapper.xml
@@ -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>
\ No newline at end of file

--
Gitblit v1.8.0