Commit 31576700 by wangqi

语音转文字

parent dc1bc2d1
...@@ -22,7 +22,7 @@ public class MimeTypeUtils ...@@ -22,7 +22,7 @@ public class MimeTypeUtils
public static final String[] FLASH_EXTENSION = { "swf", "flv" }; public static final String[] FLASH_EXTENSION = { "swf", "flv" };
public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
"asf", "rm", "rmvb" }; "asf", "rm", "rmvb", "aac" , "3gp", "m4a" };
public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" }; public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" };
...@@ -37,7 +37,7 @@ public class MimeTypeUtils ...@@ -37,7 +37,7 @@ public class MimeTypeUtils
"mp4", "avi", "rmvb", "mp4", "avi", "rmvb",
// pdf // pdf
"pdf", "pdf",
"sgy","segy" }; "sgy","segy" , "mp3" , "wav", "wma","aac" , "3gp", "m4a"};
public static String getExtension(String prefix) public static String getExtension(String prefix)
{ {
......
...@@ -27,6 +27,38 @@ public class RuoYiConfig ...@@ -27,6 +27,38 @@ public class RuoYiConfig
/** 获取地址开关 */ /** 获取地址开关 */
private static boolean addressEnabled; private static boolean addressEnabled;
private static String dzysip;
private static String ypzlip;
private static String hyjyip;
public static String getDzysip() {
return dzysip;
}
public void setDzysip(String dzysip) {
RuoYiConfig.dzysip = dzysip;
}
public static String getYpzlip() {
return ypzlip;
}
public void setYpzlip(String ypzlip) {
RuoYiConfig.ypzlip = ypzlip;
}
public static String getHyjyip() {
return hyjyip;
}
public void setHyjyip(String hyjyip) {
RuoYiConfig.hyjyip = hyjyip;
}
public String getName() public String getName()
{ {
return name; return name;
......
...@@ -21,6 +21,9 @@ import com.ruoyi.framework.web.domain.AjaxResult; ...@@ -21,6 +21,9 @@ import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import javax.annotation.Resource;
/** /**
* 会议信息Controller * 会议信息Controller
* *
...@@ -37,7 +40,6 @@ public class HyjyxxController extends BaseController ...@@ -37,7 +40,6 @@ public class HyjyxxController extends BaseController
/** /**
* 查询会议信息列表 * 查询会议信息列表
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxx:hyjyxx:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(Hyjyxx hyjyxx) public TableDataInfo list(Hyjyxx hyjyxx)
{ {
...@@ -49,7 +51,6 @@ public class HyjyxxController extends BaseController ...@@ -49,7 +51,6 @@ public class HyjyxxController extends BaseController
/** /**
* 导出会议信息列表 * 导出会议信息列表
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxx:hyjyxx:export')")
@Log(title = "会议信息", businessType = BusinessType.EXPORT) @Log(title = "会议信息", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, Hyjyxx hyjyxx) public void export(HttpServletResponse response, Hyjyxx hyjyxx)
...@@ -62,7 +63,6 @@ public class HyjyxxController extends BaseController ...@@ -62,7 +63,6 @@ public class HyjyxxController extends BaseController
/** /**
* 获取会议信息详细信息 * 获取会议信息详细信息
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxx:hyjyxx:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
...@@ -72,7 +72,6 @@ public class HyjyxxController extends BaseController ...@@ -72,7 +72,6 @@ public class HyjyxxController extends BaseController
/** /**
* 新增会议信息 * 新增会议信息
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxx:hyjyxx:add')")
@Log(title = "会议信息", businessType = BusinessType.INSERT) @Log(title = "会议信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody Hyjyxx hyjyxx) public AjaxResult add(@RequestBody Hyjyxx hyjyxx)
...@@ -83,7 +82,6 @@ public class HyjyxxController extends BaseController ...@@ -83,7 +82,6 @@ public class HyjyxxController extends BaseController
/** /**
* 修改会议信息 * 修改会议信息
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxx:hyjyxx:edit')")
@Log(title = "会议信息", businessType = BusinessType.UPDATE) @Log(title = "会议信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody Hyjyxx hyjyxx) public AjaxResult edit(@RequestBody Hyjyxx hyjyxx)
...@@ -94,11 +92,33 @@ public class HyjyxxController extends BaseController ...@@ -94,11 +92,33 @@ public class HyjyxxController extends BaseController
/** /**
* 删除会议信息 * 删除会议信息
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxx:hyjyxx:remove')")
@Log(title = "会议信息", businessType = BusinessType.DELETE) @Log(title = "会议信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(hyjyxxService.deleteHyjyxxByIds(ids)); return toAjax(hyjyxxService.deleteHyjyxxByIds(ids));
} }
// 注入线程池
@Resource
private ThreadPoolTaskExecutor taskExecutor;
/**
* 会议转录
*/
@Log(title = "会议转录", businessType = BusinessType.UPDATE)
@PostMapping("/hyzl/{id}")
public AjaxResult hyzl(@PathVariable("id") Long id)
{
/* return toAjax(hyjyxxService.hyzl(id));*/
// 提交任务到线程池异步执行
taskExecutor.execute(() -> {
hyjyxxService.hyzl(id);
});
// 立即返回,告知前端任务已启动
return AjaxResult.success("会议转录任务已启动,请稍后查看结果");
}
} }
...@@ -37,7 +37,6 @@ public class HyjyxxMbController extends BaseController ...@@ -37,7 +37,6 @@ public class HyjyxxMbController extends BaseController
/** /**
* 查询会议模板列表 * 查询会议模板列表
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxxMb:hymb:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(HyjyxxMb hyjyxxMb) public TableDataInfo list(HyjyxxMb hyjyxxMb)
{ {
...@@ -49,7 +48,6 @@ public class HyjyxxMbController extends BaseController ...@@ -49,7 +48,6 @@ public class HyjyxxMbController extends BaseController
/** /**
* 导出会议模板列表 * 导出会议模板列表
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxxMb:hymb:export')")
@Log(title = "会议模板", businessType = BusinessType.EXPORT) @Log(title = "会议模板", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, HyjyxxMb hyjyxxMb) public void export(HttpServletResponse response, HyjyxxMb hyjyxxMb)
...@@ -62,7 +60,6 @@ public class HyjyxxMbController extends BaseController ...@@ -62,7 +60,6 @@ public class HyjyxxMbController extends BaseController
/** /**
* 获取会议模板详细信息 * 获取会议模板详细信息
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxxMb:hymb:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
...@@ -72,7 +69,6 @@ public class HyjyxxMbController extends BaseController ...@@ -72,7 +69,6 @@ public class HyjyxxMbController extends BaseController
/** /**
* 新增会议模板 * 新增会议模板
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxxMb:hymb:add')")
@Log(title = "会议模板", businessType = BusinessType.INSERT) @Log(title = "会议模板", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody HyjyxxMb hyjyxxMb) public AjaxResult add(@RequestBody HyjyxxMb hyjyxxMb)
...@@ -83,7 +79,6 @@ public class HyjyxxMbController extends BaseController ...@@ -83,7 +79,6 @@ public class HyjyxxMbController extends BaseController
/** /**
* 修改会议模板 * 修改会议模板
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxxMb:hymb:edit')")
@Log(title = "会议模板", businessType = BusinessType.UPDATE) @Log(title = "会议模板", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody HyjyxxMb hyjyxxMb) public AjaxResult edit(@RequestBody HyjyxxMb hyjyxxMb)
...@@ -94,11 +89,17 @@ public class HyjyxxMbController extends BaseController ...@@ -94,11 +89,17 @@ public class HyjyxxMbController extends BaseController
/** /**
* 删除会议模板 * 删除会议模板
*/ */
@PreAuthorize("@ss.hasPermi('hyjyxxMb:hymb:remove')")
@Log(title = "会议模板", businessType = BusinessType.DELETE) @Log(title = "会议模板", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids)
{ {
return toAjax(hyjyxxMbService.deleteHyjyxxMbByIds(ids)); return toAjax(hyjyxxMbService.deleteHyjyxxMbByIds(ids));
} }
@GetMapping("/selectHybm")
public TableDataInfo selectHybm(HyjyxxMb hyjyxxMb)
{
List<HyjyxxMb> list = hyjyxxMbService.selectHyjyxxMbList(hyjyxxMb);
return getDataTable(list);
}
} }
...@@ -44,9 +44,9 @@ public class Hyjyxx extends BaseEntity ...@@ -44,9 +44,9 @@ public class Hyjyxx extends BaseEntity
@Excel(name = "会议纪要") @Excel(name = "会议纪要")
private String hyjy; private String hyjy;
/** 解析完成时间 */ /** 会议开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "解析完成时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "会议开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date jxwcsj; private Date jxwcsj;
/** 创建人 */ /** 创建人 */
...@@ -70,6 +70,26 @@ public class Hyjyxx extends BaseEntity ...@@ -70,6 +70,26 @@ public class Hyjyxx extends BaseEntity
@Excel(name = "备用3") @Excel(name = "备用3")
private String ext3; private String ext3;
/** 原文标准化 */
@Excel(name = "原文标准化")
private String ywBzh;
/** 会议纪要标准化 */
@Excel(name = "会议纪要标准化")
private String hyjyBzh;
/** 音频文件名称 */
@Excel(name = "音频文件名称")
private String ypwjName;
/** 模板名称 */
@Excel(name = "模板名称")
private String mbmc;
private String jysczt;
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
...@@ -200,6 +220,46 @@ public class Hyjyxx extends BaseEntity ...@@ -200,6 +220,46 @@ public class Hyjyxx extends BaseEntity
return ext3; return ext3;
} }
public void setYwBzh(String ywBzh)
{
this.ywBzh = ywBzh;
}
public String getYwBzh()
{
return ywBzh;
}
public void setHyjyBzh(String hyjyBzh)
{
this.hyjyBzh = hyjyBzh;
}
public String getHyjyBzh()
{
return hyjyBzh;
}
public void setYpwjName(String ypwjName)
{
this.ypwjName = ypwjName;
}
public String getYpwjName()
{
return ypwjName;
}
public void setMbmc(String mbmc)
{
this.mbmc = mbmc;
}
public String getMbmc()
{
return mbmc;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
...@@ -218,6 +278,18 @@ public class Hyjyxx extends BaseEntity ...@@ -218,6 +278,18 @@ public class Hyjyxx extends BaseEntity
.append("ext1", getExt1()) .append("ext1", getExt1())
.append("ext2", getExt2()) .append("ext2", getExt2())
.append("ext3", getExt3()) .append("ext3", getExt3())
.append("ywBzh", getYwBzh())
.append("hyjyBzh", getHyjyBzh())
.append("ypwjName", getYpwjName())
.append("mbmc", getMbmc())
.toString(); .toString();
} }
public String getJysczt() {
return jysczt;
}
public void setJysczt(String jysczt) {
this.jysczt = jysczt;
}
} }
...@@ -58,4 +58,6 @@ public interface IHyjyxxService ...@@ -58,4 +58,6 @@ public interface IHyjyxxService
* @return 结果 * @return 结果
*/ */
public int deleteHyjyxxById(Long id); public int deleteHyjyxxById(Long id);
public int hyzl(Long id);
} }
...@@ -8,6 +8,8 @@ import com.ruoyi.project.ys.mapper.HyjyxxMbMapper; ...@@ -8,6 +8,8 @@ import com.ruoyi.project.ys.mapper.HyjyxxMbMapper;
import com.ruoyi.project.ys.domain.HyjyxxMb; import com.ruoyi.project.ys.domain.HyjyxxMb;
import com.ruoyi.project.ys.service.IHyjyxxMbService; import com.ruoyi.project.ys.service.IHyjyxxMbService;
import static com.ruoyi.common.utils.SecurityUtils.getUserId;
/** /**
* 会议模板Service业务层处理 * 会议模板Service业务层处理
* *
...@@ -53,6 +55,8 @@ public class HyjyxxMbServiceImpl implements IHyjyxxMbService ...@@ -53,6 +55,8 @@ public class HyjyxxMbServiceImpl implements IHyjyxxMbService
@Override @Override
public int insertHyjyxxMb(HyjyxxMb hyjyxxMb) public int insertHyjyxxMb(HyjyxxMb hyjyxxMb)
{ {
hyjyxxMb.setCreateBy(getUserId()+"");
hyjyxxMb.setCreatedTime(DateUtils.getNowDate());
return hyjyxxMbMapper.insertHyjyxxMb(hyjyxxMb); return hyjyxxMbMapper.insertHyjyxxMb(hyjyxxMb);
} }
...@@ -65,6 +69,7 @@ public class HyjyxxMbServiceImpl implements IHyjyxxMbService ...@@ -65,6 +69,7 @@ public class HyjyxxMbServiceImpl implements IHyjyxxMbService
@Override @Override
public int updateHyjyxxMb(HyjyxxMb hyjyxxMb) public int updateHyjyxxMb(HyjyxxMb hyjyxxMb)
{ {
hyjyxxMb.setUpdateBy(getUserId()+"");
hyjyxxMb.setUpdateTime(DateUtils.getNowDate()); hyjyxxMb.setUpdateTime(DateUtils.getNowDate());
return hyjyxxMbMapper.updateHyjyxxMb(hyjyxxMb); return hyjyxxMbMapper.updateHyjyxxMb(hyjyxxMb);
} }
......
...@@ -2,12 +2,25 @@ package com.ruoyi.project.ys.service.impl; ...@@ -2,12 +2,25 @@ package com.ruoyi.project.ys.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.framework.config.RuoYiConfig;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.project.ys.mapper.HyjyxxMapper; import com.ruoyi.project.ys.mapper.HyjyxxMapper;
import com.ruoyi.project.ys.domain.Hyjyxx; import com.ruoyi.project.ys.domain.Hyjyxx;
import com.ruoyi.project.ys.service.IHyjyxxService; import com.ruoyi.project.ys.service.IHyjyxxService;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
/** /**
* 会议信息Service业务层处理 * 会议信息Service业务层处理
* *
...@@ -92,4 +105,105 @@ public class HyjyxxServiceImpl implements IHyjyxxService ...@@ -92,4 +105,105 @@ public class HyjyxxServiceImpl implements IHyjyxxService
{ {
return hyjyxxMapper.deleteHyjyxxById(id); return hyjyxxMapper.deleteHyjyxxById(id);
} }
// 1. 转录接口地址(固定)
private static final String ASR_API_URL = "/asr";
/**
* 修改会议信息
*
* @param id 会议信息
* @return 结果
*/
@Override
public int hyzl(Long id)
{
Hyjyxx hyjyxx =hyjyxxMapper.selectHyjyxxById(id);
String targetMp3Url = RuoYiConfig.getDzysip() + hyjyxx.getYpwj();
try {
// 1. 发送 POST 请求,获取原始 JSON 响应
String responseJson = sendAsrPostRequest(targetMp3Url);
System.out.println("接口返回原始 JSON:" + responseJson);
// 创建ObjectMapper实例
ObjectMapper objectMapper = new ObjectMapper();
// 将String转换为JsonNode(JSON对象)
JsonNode jsonNode = objectMapper.readTree(responseJson);
// 2. 直接提取 asr_text 和 timestamp_text 的值
String asrText = jsonNode.get("asr_text").asText();
String timestampText = jsonNode.get("json_result").toString();
hyjyxx.setYw(asrText);
hyjyxx.setYwBzh(timestampText);
hyjyxx.setJxzt("转录成功");
return hyjyxxMapper.updateHyjyxx(hyjyxx);
} catch (IOException e) {
System.err.println("请求异常:" + e.getMessage());
e.printStackTrace();
hyjyxx.setJxzt("转录失败");
hyjyxxMapper.updateHyjyxx(hyjyxx);
return 0;
}
}
/**
* 发送 POST 请求到 ASR 接口
* @param mp3Url 音频文件 URL(对应请求参数 mp3_url)
* @return 接口返回结果(Map 格式:key=asr_text/timestamp_text,value=对应文本)
* @throws IOException 网络异常/请求失败
*/
public static String sendAsrPostRequest(String mp3Url) throws IOException {
// 1. 构建请求 JSON 字符串(无实体类,直接拼接)
String requestJson = String.format("{\"mp3_url\":\"%s\"}", mp3Url);
// 2. 创建 URL 对象并打开连接
URL url = new URL(RuoYiConfig.getYpzlip()+ASR_API_URL);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
try {
// 3. 配置请求参数(POST 方法、请求头、超时时间)
connection.setRequestMethod("POST"); // 必须设为 POST
connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8"); // 声明 JSON 格式
connection.setDoOutput(true); // 允许向服务器写数据(POST 必须开启)
connection.setConnectTimeout(5000); // 连接超时:5秒
connection.setReadTimeout(500000); // 读取响应超时:10秒
// 4. 向服务器写入请求体(JSON 字符串)
try (DataOutputStream outputStream = new DataOutputStream(connection.getOutputStream())) {
byte[] requestBytes = requestJson.getBytes(StandardCharsets.UTF_8);
outputStream.write(requestBytes); // 写入请求数据
outputStream.flush(); // 刷新缓冲区,确保数据全部发送
}
// 5. 检查请求是否成功(HTTP 状态码 200-299 为成功)
int responseCode = connection.getResponseCode();
if (responseCode < 200 || responseCode >= 300) {
throw new IOException("请求失败!HTTP 状态码:" + responseCode
+ ",响应信息:" + connection.getResponseMessage());
}
// 6. 读取接口返回的 JSON 响应
StringBuilder responseSb = new StringBuilder();
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
String line;
while ((line = reader.readLine()) != null) {
responseSb.append(line); // 逐行读取响应内容
}
}
String responseJson = responseSb.toString();
// 7. 将 JSON 转为 Map(无实体类,直接通过 key 取值)
return responseJson;
} finally {
// 8. 关闭连接(避免资源泄漏)
connection.disconnect();
}
}
} }
...@@ -12,6 +12,12 @@ ruoyi: ...@@ -12,6 +12,12 @@ ruoyi:
addressEnabled: false addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证 # 验证码类型 math 数字计算 char 字符验证
captchaType: math captchaType: math
# 本机ip+端口
dzysip: http://192.168.31.12:8999
# 转录ip+端口
ypzlip: http://192.168.31.200:17751
# 纪要ip
hyjyip: http://192.168.31.200:17751
# 开发环境配置 # 开发环境配置
server: server:
...@@ -57,9 +63,9 @@ spring: ...@@ -57,9 +63,9 @@ spring:
servlet: servlet:
multipart: multipart:
# 单个文件大小 # 单个文件大小
max-file-size: 10MB max-file-size: 100MB
# 设置总上传的文件大小 # 设置总上传的文件大小
max-request-size: 20MB max-request-size: 20000MB
# 服务模块 # 服务模块
devtools: devtools:
restart: restart:
......
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.project.ys.mapper.HyjyxxMapper"> <mapper namespace="com.ruoyi.project.ys.mapper.HyjyxxMapper">
<resultMap type="Hyjyxx" id="HyjyxxResult"> <resultMap type="Hyjyxx" id="HyjyxxResult">
...@@ -20,10 +20,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -20,10 +20,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="ext1" column="ext1" /> <result property="ext1" column="ext1" />
<result property="ext2" column="ext2" /> <result property="ext2" column="ext2" />
<result property="ext3" column="ext3" /> <result property="ext3" column="ext3" />
<result property="ywBzh" column="yw_bzh" />
<result property="hyjyBzh" column="hyjy_bzh" />
<result property="ypwjName" column="ypwj_name" />
<result property="mbmc" column="mbmc" />
<result property="jysczt" column="jysczt" />
</resultMap> </resultMap>
<sql id="selectHyjyxxVo"> <sql id="selectHyjyxxVo">
select id, xmid, hymc, jxzt, ypwj, yw, hyjy, jxwcsj, created_by, created_time, update_by, update_time, ext1, ext2, ext3 from hyjyxx select id, xmid, hymc, jxzt, ypwj, yw, hyjy, jxwcsj, created_by, created_time, update_by, update_time, ext1, ext2, ext3, yw_bzh, hyjy_bzh, ypwj_name, mbmc, jysczt from hyjyxx
</sql> </sql>
<select id="selectHyjyxxList" parameterType="Hyjyxx" resultMap="HyjyxxResult"> <select id="selectHyjyxxList" parameterType="Hyjyxx" resultMap="HyjyxxResult">
...@@ -42,6 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -42,6 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ext1 != null and ext1 != ''"> and ext1 = #{ext1}</if> <if test="ext1 != null and ext1 != ''"> and ext1 = #{ext1}</if>
<if test="ext2 != null and ext2 != ''"> and ext2 = #{ext2}</if> <if test="ext2 != null and ext2 != ''"> and ext2 = #{ext2}</if>
<if test="ext3 != null and ext3 != ''"> and ext3 = #{ext3}</if> <if test="ext3 != null and ext3 != ''"> and ext3 = #{ext3}</if>
<if test="ywBzh != null and ywBzh != ''"> and yw_bzh = #{ywBzh}</if>
<if test="hyjyBzh != null and hyjyBzh != ''"> and hyjy_bzh = #{hyjyBzh}</if>
<if test="ypwjName != null and ypwjName != ''"> and ypwj_name like concat('%', #{ypwjName}, '%')</if>
<if test="mbmc != null and mbmc != ''"> and mbmc = #{mbmc}</if>
<if test="jysczt != null and jysczt != ''"> and jysczt = #{jysczt}</if>
</where> </where>
</select> </select>
...@@ -67,6 +77,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -67,6 +77,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ext1 != null">ext1,</if> <if test="ext1 != null">ext1,</if>
<if test="ext2 != null">ext2,</if> <if test="ext2 != null">ext2,</if>
<if test="ext3 != null">ext3,</if> <if test="ext3 != null">ext3,</if>
<if test="ywBzh != null">yw_bzh,</if>
<if test="hyjyBzh != null">hyjy_bzh,</if>
<if test="ypwjName != null">ypwj_name,</if>
<if test="mbmc != null">mbmc,</if>
<if test="jysczt != null">jysczt,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="xmid != null">#{xmid},</if> <if test="xmid != null">#{xmid},</if>
...@@ -83,6 +98,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -83,6 +98,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ext1 != null">#{ext1},</if> <if test="ext1 != null">#{ext1},</if>
<if test="ext2 != null">#{ext2},</if> <if test="ext2 != null">#{ext2},</if>
<if test="ext3 != null">#{ext3},</if> <if test="ext3 != null">#{ext3},</if>
<if test="ywBzh != null">#{ywBzh},</if>
<if test="hyjyBzh != null">#{hyjyBzh},</if>
<if test="ypwjName != null">#{ypwjName},</if>
<if test="mbmc != null">#{mbmc},</if>
<if test="jysczt != null">#{jysczt},</if>
</trim> </trim>
</insert> </insert>
...@@ -103,6 +123,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -103,6 +123,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ext1 != null">ext1 = #{ext1},</if> <if test="ext1 != null">ext1 = #{ext1},</if>
<if test="ext2 != null">ext2 = #{ext2},</if> <if test="ext2 != null">ext2 = #{ext2},</if>
<if test="ext3 != null">ext3 = #{ext3},</if> <if test="ext3 != null">ext3 = #{ext3},</if>
<if test="ywBzh != null">yw_bzh = #{ywBzh},</if>
<if test="hyjyBzh != null">hyjy_bzh = #{hyjyBzh},</if>
<if test="ypwjName != null">ypwj_name = #{ypwjName},</if>
<if test="mbmc != null">mbmc = #{mbmc},</if>
<if test="jysczt != null">jysczt = #{jysczt},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
...@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ext2 != null and ext2 != ''"> and ext2 = #{ext2}</if> <if test="ext2 != null and ext2 != ''"> and ext2 = #{ext2}</if>
<if test="ext3 != null and ext3 != ''"> and ext3 = #{ext3}</if> <if test="ext3 != null and ext3 != ''"> and ext3 = #{ext3}</if>
</where> </where>
order by px
</select> </select>
<select id="selectHyjyxxMbById" parameterType="Long" resultMap="HyjyxxMbResult"> <select id="selectHyjyxxMbById" parameterType="Long" resultMap="HyjyxxMbResult">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment