This commit is contained in:
yangjun 2024-05-27 15:04:04 +08:00
commit 1f767c3479
3 changed files with 14 additions and 2 deletions

View File

@ -82,7 +82,9 @@ public class KcDetectionMainController extends JeecgController<KcDetectionMain,
QueryWrapper<KcDetectionMain> queryWrapper = QueryGenerator.initQueryWrapper(kcDetectionMain, req.getParameterMap());
//补充搜索
if(StringUtils.isNotBlank(kcDetectionMain.getSearchSkrq())){
queryWrapper.eq("JSON_VALUE(ketangbiao_info,'$.skrq')", kcDetectionMain.getSearchSkrq());
//线上数据库不支持
//queryWrapper.eq("JSON_VALUE(ketangbiao_info,'$.skrq')", kcDetectionMain.getSearchSkrq());
queryWrapper.eq("ketangbiao_info ->'$.skrq'", kcDetectionMain.getSearchSkrq());
}
if(StringUtils.isNotBlank(kcDetectionMain.getSearchHh())){
queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh());

View File

@ -188,7 +188,7 @@
</select>
<select id="getKcbhByRwbh" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">
select distinct rwbh,xqxn,kkdw,kcmc,skjs
select distinct kcbh,rwbh,xqxn,kkdw,kcmc,skjs
from kc_kechengbiao
where rwbh = #{rwbh}
<if test="xqxn!=null and xqxn!=''">

View File

@ -378,6 +378,16 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
}
if(isAdd){
KcKechengbiao kcKechengbiao = new KcKechengbiao();
kcKechengbiao.setRwbh(zyJxdg.getRwbh());
kcKechengbiao.setXqxn(zyJxdg.getXqxn());
kcKechengbiao = kcKechengbiaoService.getKcbhByRwbh(kcKechengbiao);
if(kcKechengbiao != null){
zyJxdg.setKcbh(kcKechengbiao.getKcbh());
zyJxdg.setSkjs(kcKechengbiao.getSkjs());
}else{
zyJxdg.setKcbh("-1");
}
zyJxdgService.save(zyJxdg);
}else{
UpdateWrapper<ZyJxdg> updateWrapper = new UpdateWrapper<>();