From c54cc05b490c57837a4fc74feec2c36755d55e1f Mon Sep 17 00:00:00 2001
From: zjh <1084500556@qq.com>
Date: 星期五, 25 十月 2024 18:06:27 +0800
Subject: [PATCH] zjh20241025

---
 ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java       |    3 
 ltkj-system/src/main/java/com/ltkj/system/domain/TjDjdDyjl.java                  |  107 +++++++++
 ltkj-system/src/main/java/com/ltkj/system/service/ITjDjdDyjlService.java         |   62 +++++
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java   |    2 
 ltkj-system/src/main/java/com/ltkj/system/service/impl/TjDjdDyjlServiceImpl.java |   91 ++++++++
 ltkj-system/src/main/resources/mapper/system/TjDjdDyjlMapper.xml                 |  134 ++++++++++++
 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjDjdDyjlController.java |  194 +++++++++++++++++
 ltkj-system/src/main/java/com/ltkj/system/mapper/TjDjdDyjlMapper.java            |   64 +++++
 8 files changed, 655 insertions(+), 2 deletions(-)

diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
index 18b1499..ac31adf 100644
--- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java
@@ -590,7 +590,7 @@
             //鍖栭獙
             testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()), order.getTjNumber(), UserHoder.getLoginUser().getUserId());
             //妫�鏌�
-            jcsqdService.saveLtkjExamJcsqd(order.getCardId());
+//            jcsqdService.saveLtkjExamJcsqd(order.getCardId());
             return AjaxResult.success("鍚屾鎴愬姛");
         }
         return AjaxResult.error("鏈煡鍒拌浜哄憳浣撴璁板綍");
diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjDjdDyjlController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjDjdDyjlController.java
new file mode 100644
index 0000000..47f68c7
--- /dev/null
+++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjDjdDyjlController.java
@@ -0,0 +1,194 @@
+package com.ltkj.web.controller.system;
+
+import java.security.Security;
+import java.util.Date;
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ltkj.common.utils.SecurityUtils;
+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 io.swagger.annotations.Api;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import com.ltkj.common.annotation.Log;
+import com.ltkj.common.core.controller.BaseController;
+import com.ltkj.common.core.domain.AjaxResult;
+import com.ltkj.common.enums.BusinessType;
+import com.ltkj.system.domain.TjDjdDyjl;
+import com.ltkj.system.service.ITjDjdDyjlService;
+import com.ltkj.common.utils.poi.ExcelUtil;
+import com.ltkj.common.core.page.TableDataInfo;
+
+/**
+ * 浣撴瀵兼鍗曟墦鍗拌褰旵ontroller
+ *
+ * @author ltkj
+ * @date 2024-10-25
+ */
+@RestController
+@RequestMapping("/system/dyjl")
+@Api(tags = "B-浣撴瀵兼鍗曟墦鍗拌褰曟帴鍙�")
+@Slf4j
+public class TjDjdDyjlController extends BaseController {
+    @Autowired
+    private ITjDjdDyjlService tjDjdDyjlService;
+    @Resource
+    private ITjOrderService orderService;
+    @Resource
+    private ITjCustomerService customerService;
+
+/**
+ * 鏌ヨ浣撴瀵兼鍗曟墦鍗拌褰曞垪琛�
+ */
+@PreAuthorize("@ss.hasPermi('system:dyjl:list')")
+@GetMapping("/list")
+    public TableDataInfo list(TjDjdDyjl tjDjdDyjl) {
+        startPage();
+        List<TjDjdDyjl> list = tjDjdDyjlService.selectTjDjdDyjlList(tjDjdDyjl);
+        return getDataTable(list);
+    }
+
+    /**
+     * 瀵煎嚭浣撴瀵兼鍗曟墦鍗拌褰曞垪琛�
+     */
+    @PreAuthorize("@ss.hasPermi('system:dyjl:export')")
+    @Log(title = "浣撴瀵兼鍗曟墦鍗拌褰�", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TjDjdDyjl tjDjdDyjl) {
+        List<TjDjdDyjl> list = tjDjdDyjlService.selectTjDjdDyjlList(tjDjdDyjl);
+        ExcelUtil<TjDjdDyjl> util = new ExcelUtil<TjDjdDyjl>(TjDjdDyjl. class);
+        util.exportExcel(response, list, "浣撴瀵兼鍗曟墦鍗拌褰曟暟鎹�");
+    }
+
+    /**
+     * 鑾峰彇浣撴瀵兼鍗曟墦鍗拌褰曡缁嗕俊鎭�
+     */
+    @PreAuthorize("@ss.hasPermi('system:dyjl:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(tjDjdDyjlService.selectTjDjdDyjlById(id));
+    }
+
+    /**
+     * 鏂板浣撴瀵兼鍗曟墦鍗拌褰�
+     */
+    @PreAuthorize("@ss.hasPermi('system:dyjl:add')")
+    @Log(title = "浣撴瀵兼鍗曟墦鍗拌褰�", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TjDjdDyjl tjDjdDyjl) {
+        return toAjax(tjDjdDyjlService.insertTjDjdDyjl(tjDjdDyjl));
+    }
+
+    /**
+     * 淇敼浣撴瀵兼鍗曟墦鍗拌褰�
+     */
+    @PreAuthorize("@ss.hasPermi('system:dyjl:edit')")
+    @Log(title = "浣撴瀵兼鍗曟墦鍗拌褰�", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TjDjdDyjl tjDjdDyjl) {
+        return toAjax(tjDjdDyjlService.updateTjDjdDyjl(tjDjdDyjl));
+    }
+
+    /**
+     * 鍒犻櫎浣撴瀵兼鍗曟墦鍗拌褰�
+     */
+    @PreAuthorize("@ss.hasPermi('system:dyjl:remove')")
+    @Log(title = "浣撴瀵兼鍗曟墦鍗拌褰�", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(tjDjdDyjlService.deleteTjDjdDyjlByIds(ids));
+    }
+
+
+    @PostMapping("/saveGjddyjl")
+    public AjaxResult saveGjddyjl(@RequestBody JSONObject json) {
+
+        log.info("===================璁板綍鎵撳嵃====================");
+        log.info(json.toJSONString());
+
+        String tjNumber = json.getString("tjNumber");
+
+        TjOrder order = orderService.getOrderByTjNum(tjNumber);
+        if(null !=order){
+            TjCustomer customer = customerService.getById(order.getUserId());
+//            String nickName = SecurityUtils.getLoginUser().getUser().getNickName();
+            Date date=new Date();
+            LambdaQueryWrapper<TjDjdDyjl>wq=new LambdaQueryWrapper<>();
+            wq.eq(TjDjdDyjl::getTjNum,tjNumber);
+            wq.eq(TjDjdDyjl::getDylx,"0");
+            TjDjdDyjl dyjl = tjDjdDyjlService.getOne(wq);
+            if(null !=dyjl){
+                Long dycs = dyjl.getDycs();
+                dycs+=1;
+                dyjl.setDycs(dycs);
+                dyjl.setDysj(date);
+//                dyjl.setCreateBy(nickName);
+                dyjl.setUpdateTime(date);
+                tjDjdDyjlService.updateById(dyjl);
+                return AjaxResult.success();
+            }
+            TjDjdDyjl djdDyjl=new TjDjdDyjl();
+            djdDyjl.setTjNum(tjNumber);
+            djdDyjl.setDylx("0");
+            djdDyjl.setCardId(order.getCardId());
+            djdDyjl.setHzxm(customer.getCusName());
+//            djdDyjl.setCreateBy(nickName);
+            djdDyjl.setCreateTime(date);
+            djdDyjl.setDysj(date);
+            tjDjdDyjlService.save(djdDyjl);
+            return AjaxResult.success();
+
+        }
+        return AjaxResult.error();
+    }
+
+    @PostMapping("/saveBlGjddyjl")
+    public AjaxResult saveBlGjddyjl(@RequestBody JSONObject json) {
+
+        log.info("===================璁板綍鎵撳嵃====================");
+        log.info(json.toJSONString());
+
+        String tjNumber = json.getString("tjNumber");
+
+        TjOrder order = orderService.getOrderByTjNum(tjNumber);
+        if(null !=order){
+            TjCustomer customer = customerService.getById(order.getUserId());
+//            String nickName = SecurityUtils.getLoginUser().getUser().getNickName();
+            Date date=new Date();
+            LambdaQueryWrapper<TjDjdDyjl>wq=new LambdaQueryWrapper<>();
+            wq.eq(TjDjdDyjl::getTjNum,tjNumber);
+            wq.eq(TjDjdDyjl::getDylx,"1");
+            TjDjdDyjl dyjl = tjDjdDyjlService.getOne(wq);
+            if(null !=dyjl){
+                Long dycs = dyjl.getDycs();
+                dycs+=1;
+                dyjl.setDycs(dycs);
+                dyjl.setDysj(date);
+//                dyjl.setCreateBy(nickName);
+                dyjl.setUpdateTime(date);
+                tjDjdDyjlService.updateById(dyjl);
+                return AjaxResult.success();
+            }
+            TjDjdDyjl djdDyjl=new TjDjdDyjl();
+            djdDyjl.setTjNum(tjNumber);
+            djdDyjl.setDylx("1");
+            djdDyjl.setCardId(order.getCardId());
+            djdDyjl.setHzxm(customer.getCusName());
+//            djdDyjl.setCreateBy(nickName);
+            djdDyjl.setCreateTime(date);
+            djdDyjl.setDysj(date);
+            tjDjdDyjlService.save(djdDyjl);
+            return AjaxResult.success();
+
+        }
+        return AjaxResult.error();
+    }
+}
diff --git a/ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java b/ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java
index cbee6aa..1a427d4 100644
--- a/ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java
+++ b/ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java
@@ -109,7 +109,8 @@
                 .authorizeRequests()
                 // 瀵逛簬鐧诲綍login 娉ㄥ唽register 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶
                 .antMatchers("/login", "/register", "/captchaImage","/cus/**","/getCaptchaConfigKey","/report/jmreport/**",
-                        "/sqlserver/getdata/**","/api/His/**","/system/config/zx","/system/report/savePdf").permitAll()
+                        "/sqlserver/getdata/**","/api/His/**","/system/config/zx","/system/report/savePdf",
+                        "/system/dyjl/saveGjddyjl","/system/dyjl/saveBlGjddyjl").permitAll()
                 .antMatchers("/common/uploadImgExe","/common/listExeVal").permitAll()
                 .antMatchers("/check/dataSynchronizationApi").permitAll()
                 // 闈欐�佽祫婧愶紝鍙尶鍚嶈闂�
diff --git a/ltkj-system/src/main/java/com/ltkj/system/domain/TjDjdDyjl.java b/ltkj-system/src/main/java/com/ltkj/system/domain/TjDjdDyjl.java
new file mode 100644
index 0000000..04dbdab
--- /dev/null
+++ b/ltkj-system/src/main/java/com/ltkj/system/domain/TjDjdDyjl.java
@@ -0,0 +1,107 @@
+package com.ltkj.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+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 lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 浣撴瀵兼鍗曟墦鍗拌褰曞璞� tj_djd_dyjl
+ *
+ * @author ltkj
+ * @date 2024-10-25
+ */
+@Data
+public class TjDjdDyjl extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+
+    private String hzxm;
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String tjNum;
+
+
+    /**
+     * $column.columnComment
+     */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private String cardId;
+
+
+    private String dylx;
+
+    /**
+     * 鎵撳嵃娆℃暟
+     */
+    @Excel(name = "鎵撳嵃娆℃暟")
+    private Long dycs;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date dysj;
+
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setTjNum(String tjNum) {
+        this.tjNum = tjNum;
+    }
+
+    public String getTjNum() {
+        return tjNum;
+    }
+
+    public void setCardId(String cardId) {
+        this.cardId = cardId;
+    }
+
+    public String getCardId() {
+        return cardId;
+    }
+
+    public void setDycs(Long dycs) {
+        this.dycs = dycs;
+    }
+
+    public Long getDycs() {
+        return dycs;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("tjNum", getTjNum())
+                .append("cardId", getCardId())
+                .append("dycs", getDycs())
+                .append("createTime", getCreateTime())
+                .append("createBy", getCreateBy())
+                .append("updateTime", getUpdateTime())
+                .append("updateBy", getUpdateBy())
+                .append("deleted", getDeleted())
+                .toString();
+    }
+}
diff --git a/ltkj-system/src/main/java/com/ltkj/system/mapper/TjDjdDyjlMapper.java b/ltkj-system/src/main/java/com/ltkj/system/mapper/TjDjdDyjlMapper.java
new file mode 100644
index 0000000..2b17044
--- /dev/null
+++ b/ltkj-system/src/main/java/com/ltkj/system/mapper/TjDjdDyjlMapper.java
@@ -0,0 +1,64 @@
+package com.ltkj.system.mapper;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ltkj.system.domain.TjDjdDyjl;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 浣撴瀵兼鍗曟墦鍗拌褰昅apper鎺ュ彛
+ *
+ * @author ltkj
+ * @date 2024-10-25
+ */
+@Mapper
+public interface TjDjdDyjlMapper extends BaseMapper<TjDjdDyjl> {
+    /**
+     * 鏌ヨ浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param id 浣撴瀵兼鍗曟墦鍗拌褰曚富閿�
+     * @return 浣撴瀵兼鍗曟墦鍗拌褰�
+     */
+    public TjDjdDyjl selectTjDjdDyjlById(Long id);
+
+    /**
+     * 鏌ヨ浣撴瀵兼鍗曟墦鍗拌褰曞垪琛�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 浣撴瀵兼鍗曟墦鍗拌褰曢泦鍚�
+     */
+    public List<TjDjdDyjl> selectTjDjdDyjlList(TjDjdDyjl tjDjdDyjl);
+
+    /**
+     * 鏂板浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 缁撴灉
+     */
+    public int insertTjDjdDyjl(TjDjdDyjl tjDjdDyjl);
+
+    /**
+     * 淇敼浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 缁撴灉
+     */
+    public int updateTjDjdDyjl(TjDjdDyjl tjDjdDyjl);
+
+    /**
+     * 鍒犻櫎浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param id 浣撴瀵兼鍗曟墦鍗拌褰曚富閿�
+     * @return 缁撴灉
+     */
+    public int deleteTjDjdDyjlById(Long id);
+
+    /**
+     * 鎵归噺鍒犻櫎浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+     * @return 缁撴灉
+     */
+    public int deleteTjDjdDyjlByIds(Long[] ids);
+}
diff --git a/ltkj-system/src/main/java/com/ltkj/system/service/ITjDjdDyjlService.java b/ltkj-system/src/main/java/com/ltkj/system/service/ITjDjdDyjlService.java
new file mode 100644
index 0000000..c004fc4
--- /dev/null
+++ b/ltkj-system/src/main/java/com/ltkj/system/service/ITjDjdDyjlService.java
@@ -0,0 +1,62 @@
+package com.ltkj.system.service;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ltkj.system.domain.TjDjdDyjl;
+
+/**
+ * 浣撴瀵兼鍗曟墦鍗拌褰昐ervice鎺ュ彛
+ *
+ * @author ltkj
+ * @date 2024-10-25
+ */
+public interface ITjDjdDyjlService extends IService<TjDjdDyjl> {
+    /**
+     * 鏌ヨ浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param id 浣撴瀵兼鍗曟墦鍗拌褰曚富閿�
+     * @return 浣撴瀵兼鍗曟墦鍗拌褰�
+     */
+    public TjDjdDyjl selectTjDjdDyjlById(Long id);
+
+    /**
+     * 鏌ヨ浣撴瀵兼鍗曟墦鍗拌褰曞垪琛�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 浣撴瀵兼鍗曟墦鍗拌褰曢泦鍚�
+     */
+    public List<TjDjdDyjl> selectTjDjdDyjlList(TjDjdDyjl tjDjdDyjl);
+
+    /**
+     * 鏂板浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 缁撴灉
+     */
+    public int insertTjDjdDyjl(TjDjdDyjl tjDjdDyjl);
+
+    /**
+     * 淇敼浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 缁撴灉
+     */
+    public int updateTjDjdDyjl(TjDjdDyjl tjDjdDyjl);
+
+    /**
+     * 鎵归噺鍒犻櫎浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑浣撴瀵兼鍗曟墦鍗拌褰曚富閿泦鍚�
+     * @return 缁撴灉
+     */
+    public int deleteTjDjdDyjlByIds(Long[] ids);
+
+    /**
+     * 鍒犻櫎浣撴瀵兼鍗曟墦鍗拌褰曚俊鎭�
+     *
+     * @param id 浣撴瀵兼鍗曟墦鍗拌褰曚富閿�
+     * @return 缁撴灉
+     */
+    public int deleteTjDjdDyjlById(Long id);
+}
diff --git a/ltkj-system/src/main/java/com/ltkj/system/service/impl/TjDjdDyjlServiceImpl.java b/ltkj-system/src/main/java/com/ltkj/system/service/impl/TjDjdDyjlServiceImpl.java
new file mode 100644
index 0000000..f5262d8
--- /dev/null
+++ b/ltkj-system/src/main/java/com/ltkj/system/service/impl/TjDjdDyjlServiceImpl.java
@@ -0,0 +1,91 @@
+package com.ltkj.system.service.impl;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ltkj.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ltkj.system.mapper.TjDjdDyjlMapper;
+import com.ltkj.system.domain.TjDjdDyjl;
+import com.ltkj.system.service.ITjDjdDyjlService;
+
+/**
+ * 浣撴瀵兼鍗曟墦鍗拌褰昐ervice涓氬姟灞傚鐞�
+ *
+ * @author ltkj
+ * @date 2024-10-25
+ */
+@Service
+public class TjDjdDyjlServiceImpl extends ServiceImpl<TjDjdDyjlMapper,TjDjdDyjl> implements ITjDjdDyjlService {
+    @Autowired
+    private TjDjdDyjlMapper tjDjdDyjlMapper;
+
+    /**
+     * 鏌ヨ浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param id 浣撴瀵兼鍗曟墦鍗拌褰曚富閿�
+     * @return 浣撴瀵兼鍗曟墦鍗拌褰�
+     */
+    @Override
+    public TjDjdDyjl selectTjDjdDyjlById(Long id) {
+        return tjDjdDyjlMapper.selectTjDjdDyjlById(id);
+    }
+
+    /**
+     * 鏌ヨ浣撴瀵兼鍗曟墦鍗拌褰曞垪琛�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 浣撴瀵兼鍗曟墦鍗拌褰�
+     */
+    @Override
+    public List<TjDjdDyjl> selectTjDjdDyjlList(TjDjdDyjl tjDjdDyjl) {
+        return tjDjdDyjlMapper.selectTjDjdDyjlList(tjDjdDyjl);
+    }
+
+    /**
+     * 鏂板浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 缁撴灉
+     */
+    @Override
+    public int insertTjDjdDyjl(TjDjdDyjl tjDjdDyjl) {
+                tjDjdDyjl.setCreateTime(DateUtils.getNowDate());
+            return tjDjdDyjlMapper.insertTjDjdDyjl(tjDjdDyjl);
+    }
+
+    /**
+     * 淇敼浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param tjDjdDyjl 浣撴瀵兼鍗曟墦鍗拌褰�
+     * @return 缁撴灉
+     */
+    @Override
+    public int updateTjDjdDyjl(TjDjdDyjl tjDjdDyjl) {
+                tjDjdDyjl.setUpdateTime(DateUtils.getNowDate());
+        return tjDjdDyjlMapper.updateTjDjdDyjl(tjDjdDyjl);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎浣撴瀵兼鍗曟墦鍗拌褰�
+     *
+     * @param ids 闇�瑕佸垹闄ょ殑浣撴瀵兼鍗曟墦鍗拌褰曚富閿�
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteTjDjdDyjlByIds(Long[] ids) {
+        return tjDjdDyjlMapper.deleteTjDjdDyjlByIds(ids);
+    }
+
+    /**
+     * 鍒犻櫎浣撴瀵兼鍗曟墦鍗拌褰曚俊鎭�
+     *
+     * @param id 浣撴瀵兼鍗曟墦鍗拌褰曚富閿�
+     * @return 缁撴灉
+     */
+    @Override
+    public int deleteTjDjdDyjlById(Long id) {
+        return tjDjdDyjlMapper.deleteTjDjdDyjlById(id);
+    }
+}
diff --git a/ltkj-system/src/main/resources/mapper/system/TjDjdDyjlMapper.xml b/ltkj-system/src/main/resources/mapper/system/TjDjdDyjlMapper.xml
new file mode 100644
index 0000000..3230477
--- /dev/null
+++ b/ltkj-system/src/main/resources/mapper/system/TjDjdDyjlMapper.xml
@@ -0,0 +1,134 @@
+<?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.system.mapper.TjDjdDyjlMapper">
+
+    <resultMap type="TjDjdDyjl" id="TjDjdDyjlResult">
+            <result property="id" column="id"/>
+            <result property="tjNum" column="tj_num"/>
+            <result property="cardId" column="card_id"/>
+            <result property="dycs" column="dycs"/>
+            <result property="createTime" column="create_time"/>
+            <result property="createBy" column="create_by"/>
+            <result property="updateTime" column="update_time"/>
+            <result property="updateBy" column="update_by"/>
+            <result property="deleted" column="deleted"/>
+            <result property="dysj" column="dysj"/>
+            <result property="hzxm" column="hzxm"/>
+            <result property="dylx" column="dylx"/>
+    </resultMap>
+
+    <sql id="selectTjDjdDyjlVo">
+        select id, tj_num, card_id, dycs, create_time, create_by, update_time, update_by, deleted,dylx,dysj,hzxm
+        from tj_djd_dyjl
+    </sql>
+
+    <select id="selectTjDjdDyjlList" parameterType="TjDjdDyjl" resultMap="TjDjdDyjlResult">
+        <include refid="selectTjDjdDyjlVo"/>
+        <where>
+                        <if test="tjNum != null  and tjNum != ''">
+                            and tj_num = #{tjNum}
+                        </if>
+                        <if test="cardId != null  and cardId != ''">
+                            and card_id = #{cardId}
+                        </if>
+                        <if test="dycs != null ">
+                            and dycs = #{dycs}
+                        </if>
+                        <if test="deleted != null ">
+                            and deleted = #{deleted}
+                        </if>
+        </where>
+    </select>
+
+    <select id="selectTjDjdDyjlById" parameterType="Long"
+            resultMap="TjDjdDyjlResult">
+            <include refid="selectTjDjdDyjlVo"/>
+            where id = #{id}
+    </select>
+
+    <insert id="insertTjDjdDyjl" parameterType="TjDjdDyjl" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into tj_djd_dyjl
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                    <if test="tjNum != null">tj_num,
+                    </if>
+                    <if test="cardId != null">card_id,
+                    </if>
+                    <if test="dycs != null">dycs,
+                    </if>
+                    <if test="createTime != null">create_time,
+                    </if>
+                    <if test="createBy != null">create_by,
+                    </if>
+                    <if test="updateTime != null">update_time,
+                    </if>
+                    <if test="updateBy != null">update_by,
+                    </if>
+                    <if test="deleted != null">deleted,
+                    </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                    <if test="tjNum != null">#{tjNum},
+                    </if>
+                    <if test="cardId != null">#{cardId},
+                    </if>
+                    <if test="dycs != null">#{dycs},
+                    </if>
+                    <if test="createTime != null">#{createTime},
+                    </if>
+                    <if test="createBy != null">#{createBy},
+                    </if>
+                    <if test="updateTime != null">#{updateTime},
+                    </if>
+                    <if test="updateBy != null">#{updateBy},
+                    </if>
+                    <if test="deleted != null">#{deleted},
+                    </if>
+        </trim>
+    </insert>
+
+    <update id="updateTjDjdDyjl" parameterType="TjDjdDyjl">
+        update tj_djd_dyjl
+        <trim prefix="SET" suffixOverrides=",">
+                    <if test="tjNum != null">tj_num =
+                        #{tjNum},
+                    </if>
+                    <if test="cardId != null">card_id =
+                        #{cardId},
+                    </if>
+                    <if test="dycs != null">dycs =
+                        #{dycs},
+                    </if>
+                    <if test="createTime != null">create_time =
+                        #{createTime},
+                    </if>
+                    <if test="createBy != null">create_by =
+                        #{createBy},
+                    </if>
+                    <if test="updateTime != null">update_time =
+                        #{updateTime},
+                    </if>
+                    <if test="updateBy != null">update_by =
+                        #{updateBy},
+                    </if>
+                    <if test="deleted != null">deleted =
+                        #{deleted},
+                    </if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTjDjdDyjlById" parameterType="Long">
+        delete
+        from tj_djd_dyjl where id = #{id}
+    </delete>
+
+    <delete id="deleteTjDjdDyjlByIds" parameterType="String">
+        delete from tj_djd_dyjl 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