Ver código fonte

fix 新增疫苗导出日志

Administrator 3 anos atrás
pai
commit
b0f9495ba0

+ 34 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/YmjzImportErrorController.java

@@ -0,0 +1,34 @@
+package com.boman.web.core.controller;
+
+import com.boman.common.core.web.controller.BaseController;
+import com.boman.common.core.web.page.TableDataInfo;
+import com.boman.domain.VaccineInfoOperation;
+import com.boman.domain.YmjzImportErrorLog;
+import com.boman.web.core.service.ymjz.YmjzImportErrorLogService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @author tjf
+ * @Date: 2021/09/29/16:41
+ */
+@RestController
+@RequestMapping("/ymjzImportError")
+public class YmjzImportErrorController extends BaseController {
+    @Resource
+    private YmjzImportErrorLogService ymjzImportErrorLogService;
+
+
+    /**
+     * 查询疫苗信息导出失败列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(YmjzImportErrorLog ymjzImportErrorLog) {
+        List<YmjzImportErrorLog> list = ymjzImportErrorLogService.selectYmjzImportErrorLogList(ymjzImportErrorLog);
+        return getDataTable(list);
+    }
+}

+ 9 - 0
boman-web-core/src/main/java/com/boman/web/core/mapper/YmjzImportErrorLogMapper.java

@@ -2,6 +2,8 @@ package com.boman.web.core.mapper;
 
 import com.boman.domain.YmjzImportErrorLog;
 
+import java.util.List;
+
 public interface YmjzImportErrorLogMapper {
 
     /**
@@ -12,4 +14,11 @@ public interface YmjzImportErrorLogMapper {
      */
     int insertErrorLog(YmjzImportErrorLog errorLog);
 
+    /**
+     * 查询
+     * @param errorLog
+     * @return
+     */
+    List<YmjzImportErrorLog> selectYmjzImportErrorLogList(YmjzImportErrorLog errorLog);
+
 }

+ 11 - 0
boman-web-core/src/main/java/com/boman/web/core/service/ymjz/YmjzImportErrorLogService.java

@@ -1,7 +1,10 @@
 package com.boman.web.core.service.ymjz;
 
+import com.boman.domain.VaccineInfoOperation;
 import com.boman.domain.YmjzImportErrorLog;
 
+import java.util.List;
+
 /**
  * @author shiqian
  * @date 2021年09月29日 15:52
@@ -15,4 +18,12 @@ public interface YmjzImportErrorLogService {
      * @return int
      */
     int insertErrorLog(YmjzImportErrorLog errorLog);
+
+    /**
+     * 查询
+     * @param errorLog
+     * @return
+     */
+    List<YmjzImportErrorLog> selectYmjzImportErrorLogList(YmjzImportErrorLog errorLog);
+
 }

+ 13 - 1
boman-web-core/src/main/java/com/boman/web/core/service/ymjz/YmjzImportErrorLogServiceImpl.java

@@ -5,13 +5,14 @@ import com.boman.web.core.mapper.YmjzImportErrorLogMapper;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * @author shiqian
  * @date 2021年09月29日 15:53
  **/
 @Service
-public class YmjzImportErrorLogServiceImpl implements YmjzImportErrorLogService{
+public class YmjzImportErrorLogServiceImpl implements YmjzImportErrorLogService {
 
     @Resource
     private YmjzImportErrorLogMapper mapper;
@@ -20,4 +21,15 @@ public class YmjzImportErrorLogServiceImpl implements YmjzImportErrorLogService{
     public int insertErrorLog(YmjzImportErrorLog errorLog) {
         return mapper.insertErrorLog(errorLog);
     }
+
+    /**
+     * 查询
+     *
+     * @param errorLog
+     * @return
+     */
+    @Override
+    public List<YmjzImportErrorLog> selectYmjzImportErrorLogList(YmjzImportErrorLog errorLog) {
+        return mapper.selectYmjzImportErrorLogList(errorLog);
+    }
 }

+ 16 - 0
boman-web-core/src/main/resources/mapper/YmjzImportErrorLogMapper.xml

@@ -19,6 +19,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isDel"    column="is_del"    />
     </resultMap>
 
+    <sql id="selectYmjzImportErrorLogVo">
+        select id,username,town,vaccine_name,jici,vaccination_time,vaccination_place,create_by,create_time,update_by,update_time,is_del
+        from ymjz_import_error_log
+
+    </sql>
+    <select id="selectYmjzImportErrorLogList" resultMap="YmjzImportErrorLogResult">
+        <include refid="selectYmjzImportErrorLogVo"/>
+        <where>
+            is_del = 'N'
+            <if test="username != null  and username != ''"> and username = #{username}</if>
+            <if test="jici != null  and jici != ''"> and jici &lt;= #{jici}</if>
+            <if test="vaccineName != null  and vaccineName != ''"> and vaccine_name like concat('%', #{vaccineName}, '%')</if>
+            <if test="vaccinationTime != null "> and DATE_FORMAT(vaccination_time,'%Y-%m-%d') = DATE_FORMAT(#{vaccinationTime},'%Y-%m-%d')</if>
+        </where>
+        order by create_time DESC
+    </select>
     <insert id="insertErrorLog" parameterType="com.boman.domain.YmjzImportErrorLog">
         insert into ymjz_import_error_log (
             <if test="username != null and username != ''">username,</if>