Commit d23d020b by jiang'yun

修改

parent 4c5afa3a
......@@ -15,5 +15,10 @@ public enum DataSourceType
/**
* 从库
*/
SLAVE
SLAVE,
/**
* 从库2
*/
SLAVE2,
}
......@@ -49,6 +49,16 @@ public class DruidConfig
return druidProperties.dataSource(dataSource);
}
// 新增加新配置的数据源
@Bean
@ConfigurationProperties("spring.datasource.druid.slave2")
@ConditionalOnProperty(prefix = "spring.datasource.druid.slave2", name = "enabled", havingValue = "true")
public DataSource slave2DataSource(DruidProperties druidProperties)
{
DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
return druidProperties.dataSource(dataSource);
}
@Bean(name = "dynamicDataSource")
@Primary
public DynamicDataSource dataSource(DataSource masterDataSource)
......@@ -56,6 +66,8 @@ public class DruidConfig
Map<Object, Object> targetDataSources = new HashMap<>();
targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource");
//将新的数据源对象加载到DataSource去
setDataSource(targetDataSources, DataSourceType.SLAVE2.name(), "slave2DataSource");
return new DynamicDataSource(masterDataSource, targetDataSources);
}
......
package com.ruoyi.project.zjsgfa.controller;
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.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.Dzgzzb;
import com.ruoyi.project.zjsgfa.service.IDzgzzbService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 地质构造总Controller
*
* @author ruoyi
* @date 2025-07-08
*/
@RestController
@RequestMapping("/system/dzgzzb")
public class DzgzzbController extends BaseController
{
@Autowired
private IDzgzzbService dzgzzbService;
/**
* 查询地质构造总列表
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:list')")
@GetMapping("/list")
public TableDataInfo list(Dzgzzb dzgzzb)
{
startPage();
List<Dzgzzb> list = dzgzzbService.selectDzgzzbList(dzgzzb);
return getDataTable(list);
}
/**
* 导出地质构造总列表
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:export')")
@Log(title = "地质构造总", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Dzgzzb dzgzzb)
{
List<Dzgzzb> list = dzgzzbService.selectDzgzzbList(dzgzzb);
ExcelUtil<Dzgzzb> util = new ExcelUtil<Dzgzzb>(Dzgzzb.class);
util.exportExcel(response, list, "地质构造总数据");
}
/**
* 获取地质构造总详细信息
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dzgzzbService.selectDzgzzbById(id));
}
/**
* 新增地质构造总
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:add')")
@Log(title = "地质构造总", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Dzgzzb dzgzzb)
{
return toAjax(dzgzzbService.insertDzgzzb(dzgzzb));
}
/**
* 修改地质构造总
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:edit')")
@Log(title = "地质构造总", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Dzgzzb dzgzzb)
{
return toAjax(dzgzzbService.updateDzgzzb(dzgzzb));
}
/**
* 删除地质构造总
*/
@PreAuthorize("@ss.hasPermi('system:dzgzzb:remove')")
@Log(title = "地质构造总", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dzgzzbService.deleteDzgzzbByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
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.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.SjDzfc;
import com.ruoyi.project.zjsgfa.service.ISjDzfcService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 地质分层Controller
*
* @author ruoyi
* @date 2025-07-07
*/
@RestController
@RequestMapping("/system/sjDzfc")
public class SjDzfcController extends BaseController
{
@Autowired
private ISjDzfcService sjDzfcService;
/**
* 查询地质分层列表
*/
@PreAuthorize("@ss.hasPermi('system:sjDzfc:list')")
@GetMapping("/list")
public TableDataInfo list(SjDzfc sjDzfc)
{
startPage();
List<SjDzfc> list = sjDzfcService.selectSjDzfcList(sjDzfc);
return getDataTable(list);
}
/**
* 导出地质分层列表
*/
@PreAuthorize("@ss.hasPermi('system:sjDzfc:export')")
@Log(title = "地质分层", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjDzfc sjDzfc)
{
List<SjDzfc> list = sjDzfcService.selectSjDzfcList(sjDzfc);
ExcelUtil<SjDzfc> util = new ExcelUtil<SjDzfc>(SjDzfc.class);
util.exportExcel(response, list, "地质分层数据");
}
/**
* 获取地质分层详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjDzfc:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjDzfcService.selectSjDzfcById(id));
}
/**
* 新增地质分层
*/
@PreAuthorize("@ss.hasPermi('system:sjDzfc:add')")
@Log(title = "地质分层", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjDzfc sjDzfc)
{
return toAjax(sjDzfcService.insertSjDzfc(sjDzfc));
}
/**
* 修改地质分层
*/
@PreAuthorize("@ss.hasPermi('system:sjDzfc:edit')")
@Log(title = "地质分层", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjDzfc sjDzfc)
{
return toAjax(sjDzfcService.updateSjDzfc(sjDzfc));
}
/**
* 删除地质分层
*/
@PreAuthorize("@ss.hasPermi('system:sjDzfc:remove')")
@Log(title = "地质分层", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjDzfcService.deleteSjDzfcByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.controller;
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.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.zjsgfa.domain.Tsyxclxx;
import com.ruoyi.project.zjsgfa.service.ITsyxclxxService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 特殊岩性常量信息Controller
*
* @author ruoyi
* @date 2025-07-08
*/
@RestController
@RequestMapping("/system/tsyxclxx")
public class TsyxclxxController extends BaseController
{
@Autowired
private ITsyxclxxService tsyxclxxService;
/**
* 查询特殊岩性常量信息列表
*/
@PreAuthorize("@ss.hasPermi('system:tsyxclxx:list')")
@GetMapping("/list")
public TableDataInfo list(Tsyxclxx tsyxclxx)
{
startPage();
List<Tsyxclxx> list = tsyxclxxService.selectTsyxclxxList(tsyxclxx);
return getDataTable(list);
}
/**
* 导出特殊岩性常量信息列表
*/
@PreAuthorize("@ss.hasPermi('system:tsyxclxx:export')")
@Log(title = "特殊岩性常量信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Tsyxclxx tsyxclxx)
{
List<Tsyxclxx> list = tsyxclxxService.selectTsyxclxxList(tsyxclxx);
ExcelUtil<Tsyxclxx> util = new ExcelUtil<Tsyxclxx>(Tsyxclxx.class);
util.exportExcel(response, list, "特殊岩性常量信息数据");
}
/**
* 获取特殊岩性常量信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:tsyxclxx:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(tsyxclxxService.selectTsyxclxxById(id));
}
/**
* 新增特殊岩性常量信息
*/
@PreAuthorize("@ss.hasPermi('system:tsyxclxx:add')")
@Log(title = "特殊岩性常量信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Tsyxclxx tsyxclxx)
{
return toAjax(tsyxclxxService.insertTsyxclxx(tsyxclxx));
}
/**
* 修改特殊岩性常量信息
*/
@PreAuthorize("@ss.hasPermi('system:tsyxclxx:edit')")
@Log(title = "特殊岩性常量信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Tsyxclxx tsyxclxx)
{
return toAjax(tsyxclxxService.updateTsyxclxx(tsyxclxx));
}
/**
* 删除特殊岩性常量信息
*/
@PreAuthorize("@ss.hasPermi('system:tsyxclxx:remove')")
@Log(title = "特殊岩性常量信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tsyxclxxService.deleteTsyxclxxByIds(ids));
}
}
package com.ruoyi.project.zjsgfa.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* 地质构造总对象 dzgzzb
*
* @author ruoyi
* @date 2025-07-08
*/
public class Dzgzzb extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 地质分层 */
@Excel(name = "地质分层")
private String dzfc;
/** 地层代码 */
@Excel(name = "地层代码")
private String dcdm;
/** 接触面 */
@Excel(name = "接触面")
private String jcm;
/** 主要岩性 */
@Excel(name = "主要岩性")
private String zyyx;
/** 岩性描述 */
@Excel(name = "岩性描述")
private String yxms;
/** 特殊岩性 */
@Excel(name = "特殊岩性")
private String tsyx;
/** 最小厚度 */
@Excel(name = "最小厚度")
private Double zxhd;
/** 最大厚度 */
@Excel(name = "最大厚度")
private Double zdhd;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDzfc(String dzfc)
{
this.dzfc = dzfc;
}
public String getDzfc()
{
return dzfc;
}
public void setDcdm(String dcdm)
{
this.dcdm = dcdm;
}
public String getDcdm()
{
return dcdm;
}
public void setJcm(String jcm)
{
this.jcm = jcm;
}
public String getJcm()
{
return jcm;
}
public void setZyyx(String zyyx)
{
this.zyyx = zyyx;
}
public String getZyyx()
{
return zyyx;
}
public void setYxms(String yxms)
{
this.yxms = yxms;
}
public String getYxms()
{
return yxms;
}
public void setTsyx(String tsyx)
{
this.tsyx = tsyx;
}
public String getTsyx()
{
return tsyx;
}
public void setZxhd(Double zxhd)
{
this.zxhd = zxhd;
}
public Double getZxhd()
{
return zxhd;
}
public void setZdhd(Double zdhd)
{
this.zdhd = zdhd;
}
public Double getZdhd()
{
return zdhd;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("dzfc", getDzfc())
.append("dcdm", getDcdm())
.append("jcm", getJcm())
.append("zyyx", getZyyx())
.append("yxms", getYxms())
.append("tsyx", getTsyx())
.append("zxhd", getZxhd())
.append("zdhd", getZdhd())
.toString();
}
}
package com.ruoyi.project.zjsgfa.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* 地质分层对象 sj_dzfc
*
* @author ruoyi
* @date 2025-07-07
*/
@Data
public class SjDzfc extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 界 */
@Excel(name = "界")
private String dcJ;
/** 系 */
@Excel(name = "系")
private String dcX;
/** 统 */
@Excel(name = "统")
private String dcT;
/** 组 */
@Excel(name = "组")
private String dcZ;
/** 段 */
@Excel(name = "段")
private String dcD;
/** 设计井号 */
@Excel(name = "设计井号")
private String sjjh;
/** 底垂深 */
@Excel(name = "底垂深")
private Double sjdcs;
/** 接触关系 */
@Excel(name = "接触关系")
private String sjjcgx;
/** 厚度 */
@Excel(name = "厚度")
private Double sjhd;
/** 断点深度 */
@Excel(name = "断点深度")
private Double sjddsd;
/** 依据井号1 */
@Excel(name = "依据井号1")
private String yjjh1;
/** 依据底深1 */
@Excel(name = "依据底深1")
private Double yjdcs1;
/** 接触关系1 */
@Excel(name = "接触关系1")
private String yjjcgx1;
/** 含油井段1 */
@Excel(name = "含油井段1")
private String yjhyjd1;
/** 断点深度1 */
@Excel(name = "断点深度1")
private Double yjddsd1;
//设计井岩性提示
private String sjyxts;
/** 依据井号2 */
@Excel(name = "依据井号2")
private String yjjh2;
/** 依据底深2 */
@Excel(name = "依据底深2")
private Double yjdcs2;
/** 接触关系2 */
@Excel(name = "接触关系2")
private String yjjcgx2;
/** 含油井段2 */
@Excel(name = "含油井段2")
private String yjhyjd2;
/** 断点深度2 */
@Excel(name = "断点深度2")
private Double yjddsd2;
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
/**
* 依据井岩性提示1
*/
private String yjyxts1;
/**
* 依据井岩性提示2
*/
private String yjyxts2;
private String[] jhs;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDcJ(String dcJ)
{
this.dcJ = dcJ;
}
public String getDcJ()
{
return dcJ;
}
public void setDcX(String dcX)
{
this.dcX = dcX;
}
public String getDcX()
{
return dcX;
}
public void setDcT(String dcT)
{
this.dcT = dcT;
}
public String getDcT()
{
return dcT;
}
public void setDcZ(String dcZ)
{
this.dcZ = dcZ;
}
public String getDcZ()
{
return dcZ;
}
public void setDcD(String dcD)
{
this.dcD = dcD;
}
public String getDcD()
{
return dcD;
}
public void setSjjh(String sjjh)
{
this.sjjh = sjjh;
}
public String getSjjh()
{
return sjjh;
}
public void setSjdcs(Double sjdcs)
{
this.sjdcs = sjdcs;
}
public Double getSjdcs()
{
return sjdcs;
}
public void setSjjcgx(String sjjcgx)
{
this.sjjcgx = sjjcgx;
}
public String getSjjcgx()
{
return sjjcgx;
}
public void setSjhd(Double sjhd)
{
this.sjhd = sjhd;
}
public Double getSjhd()
{
return sjhd;
}
public void setSjddsd(Double sjddsd)
{
this.sjddsd = sjddsd;
}
public Double getSjddsd()
{
return sjddsd;
}
public void setYjjh1(String yjjh1)
{
this.yjjh1 = yjjh1;
}
public String getYjjh1()
{
return yjjh1;
}
public void setYjdcs1(Double yjdcs1)
{
this.yjdcs1 = yjdcs1;
}
public Double getYjdcs1()
{
return yjdcs1;
}
public void setYjjcgx1(String yjjcgx1)
{
this.yjjcgx1 = yjjcgx1;
}
public String getYjjcgx1()
{
return yjjcgx1;
}
public void setYjhyjd1(String yjhyjd1)
{
this.yjhyjd1 = yjhyjd1;
}
public String getYjhyjd1()
{
return yjhyjd1;
}
public void setYjddsd1(Double yjddsd1)
{
this.yjddsd1 = yjddsd1;
}
public Double getYjddsd1()
{
return yjddsd1;
}
public void setYjjh2(String yjjh2)
{
this.yjjh2 = yjjh2;
}
public String getYjjh2()
{
return yjjh2;
}
public void setYjdcs2(Double yjdcs2)
{
this.yjdcs2 = yjdcs2;
}
public Double getYjdcs2()
{
return yjdcs2;
}
public void setYjjcgx2(String yjjcgx2)
{
this.yjjcgx2 = yjjcgx2;
}
public String getYjjcgx2()
{
return yjjcgx2;
}
public void setYjhyjd2(String yjhyjd2)
{
this.yjhyjd2 = yjhyjd2;
}
public String getYjhyjd2()
{
return yjhyjd2;
}
public void setYjddsd2(Double yjddsd2)
{
this.yjddsd2 = yjddsd2;
}
public Double getYjddsd2()
{
return yjddsd2;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public Date getCreatedTime()
{
return createdTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("dcJ", getDcJ())
.append("dcX", getDcX())
.append("dcT", getDcT())
.append("dcZ", getDcZ())
.append("dcD", getDcD())
.append("sjjh", getSjjh())
.append("sjdcs", getSjdcs())
.append("sjjcgx", getSjjcgx())
.append("sjhd", getSjhd())
.append("sjddsd", getSjddsd())
.append("yjjh1", getYjjh1())
.append("yjdcs1", getYjdcs1())
.append("yjjcgx1", getYjjcgx1())
.append("yjhyjd1", getYjhyjd1())
.append("yjddsd1", getYjddsd1())
.append("yjjh2", getYjjh2())
.append("yjdcs2", getYjdcs2())
.append("yjjcgx2", getYjjcgx2())
.append("yjhyjd2", getYjhyjd2())
.append("yjddsd2", getYjddsd2())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
package com.ruoyi.project.zjsgfa.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* 特殊岩性常量信息对象 tsyxclxx
*
* @author ruoyi
* @date 2025-07-08
*/
@Data
public class Tsyxclxx extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 特殊岩性 */
@Excel(name = "特殊岩性")
private String tsyx;
private String[] tsyxs;
/** 补充描述 */
@Excel(name = "补充描述")
private String bcms;
/** 识别方式 */
@Excel(name = "识别方式")
private String sbfs;
/** 危害、可能造成的问题 */
@Excel(name = "危害、可能造成的问题")
private String wt;
/** 建议的预防类措施 */
@Excel(name = "建议的预防类措施")
private String yfcs;
/** 建议的应急处理类措施 */
@Excel(name = "建议的应急处理类措施")
private String yjcs;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTsyx(String tsyx)
{
this.tsyx = tsyx;
}
public String getTsyx()
{
return tsyx;
}
public void setBcms(String bcms)
{
this.bcms = bcms;
}
public String getBcms()
{
return bcms;
}
public void setSbfs(String sbfs)
{
this.sbfs = sbfs;
}
public String getSbfs()
{
return sbfs;
}
public void setWt(String wt)
{
this.wt = wt;
}
public String getWt()
{
return wt;
}
public void setYfcs(String yfcs)
{
this.yfcs = yfcs;
}
public String getYfcs()
{
return yfcs;
}
public void setYjcs(String yjcs)
{
this.yjcs = yjcs;
}
public String getYjcs()
{
return yjcs;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("tsyx", getTsyx())
.append("bcms", getBcms())
.append("sbfs", getSbfs())
.append("wt", getWt())
.append("yfcs", getYfcs())
.append("yjcs", getYjcs())
.toString();
}
}
package com.ruoyi.project.zjsgfa.mapper;
import java.util.List;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.zjsgfa.domain.Dzgzzb;
/**
* 地质构造总Mapper接口
*
* @author ruoyi
* @date 2025-07-08
*/
@DataSource(value = DataSourceType.MASTER)
public interface DzgzzbMapper
{
/**
* 查询地质构造总
*
* @param id 地质构造总主键
* @return 地质构造总
*/
public Dzgzzb selectDzgzzbById(Long id);
/**
* 查询地质构造总列表
*
* @param dzgzzb 地质构造总
* @return 地质构造总集合
*/
public List<Dzgzzb> selectDzgzzbList(Dzgzzb dzgzzb);
/**
* 新增地质构造总
*
* @param dzgzzb 地质构造总
* @return 结果
*/
public int insertDzgzzb(Dzgzzb dzgzzb);
/**
* 修改地质构造总
*
* @param dzgzzb 地质构造总
* @return 结果
*/
public int updateDzgzzb(Dzgzzb dzgzzb);
/**
* 删除地质构造总
*
* @param id 地质构造总主键
* @return 结果
*/
public int deleteDzgzzbById(Long id);
/**
* 批量删除地质构造总
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDzgzzbByIds(Long[] ids);
}
package com.ruoyi.project.zjsgfa.mapper;
import java.util.List;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.zjsgfa.domain.SjDzfc;
/**
* 地质分层Mapper接口
*
* @author ruoyi
* @date 2025-07-07
*/
@DataSource(value = DataSourceType.MASTER)
public interface SjDzfcMapper
{
/**
* 查询地质分层
*
* @param id 地质分层主键
* @return 地质分层
*/
public SjDzfc selectSjDzfcById(Long id);
/**
* 查询地质分层列表
*
* @param sjDzfc 地质分层
* @return 地质分层集合
*/
public List<SjDzfc> selectSjDzfcList(SjDzfc sjDzfc);
/**
* 新增地质分层
*
* @param sjDzfc 地质分层
* @return 结果
*/
public int insertSjDzfc(SjDzfc sjDzfc);
/**
* 修改地质分层
*
* @param sjDzfc 地质分层
* @return 结果
*/
public int updateSjDzfc(SjDzfc sjDzfc);
/**
* 删除地质分层
*
* @param id 地质分层主键
* @return 结果
*/
public int deleteSjDzfcById(Long id);
/**
* 批量删除地质分层
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjDzfcByIds(Long[] ids);
}
package com.ruoyi.project.zjsgfa.mapper;
import java.util.List;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.zjsgfa.domain.Tsyxclxx;
/**
* 特殊岩性常量信息Mapper接口
*
* @author ruoyi
* @date 2025-07-08
*/
@DataSource(value = DataSourceType.MASTER)
public interface TsyxclxxMapper
{
/**
* 查询特殊岩性常量信息
*
* @param id 特殊岩性常量信息主键
* @return 特殊岩性常量信息
*/
public Tsyxclxx selectTsyxclxxById(Long id);
/**
* 查询特殊岩性常量信息列表
*
* @param tsyxclxx 特殊岩性常量信息
* @return 特殊岩性常量信息集合
*/
public List<Tsyxclxx> selectTsyxclxxList(Tsyxclxx tsyxclxx);
/**
* 新增特殊岩性常量信息
*
* @param tsyxclxx 特殊岩性常量信息
* @return 结果
*/
public int insertTsyxclxx(Tsyxclxx tsyxclxx);
/**
* 修改特殊岩性常量信息
*
* @param tsyxclxx 特殊岩性常量信息
* @return 结果
*/
public int updateTsyxclxx(Tsyxclxx tsyxclxx);
/**
* 删除特殊岩性常量信息
*
* @param id 特殊岩性常量信息主键
* @return 结果
*/
public int deleteTsyxclxxById(Long id);
/**
* 批量删除特殊岩性常量信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteTsyxclxxByIds(Long[] ids);
}
package com.ruoyi.project.zjsgfa.service;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.Dzgzzb;
/**
* 地质构造总Service接口
*
* @author ruoyi
* @date 2025-07-08
*/
public interface IDzgzzbService
{
/**
* 查询地质构造总
*
* @param id 地质构造总主键
* @return 地质构造总
*/
public Dzgzzb selectDzgzzbById(Long id);
/**
* 查询地质构造总列表
*
* @param dzgzzb 地质构造总
* @return 地质构造总集合
*/
public List<Dzgzzb> selectDzgzzbList(Dzgzzb dzgzzb);
/**
* 新增地质构造总
*
* @param dzgzzb 地质构造总
* @return 结果
*/
public int insertDzgzzb(Dzgzzb dzgzzb);
/**
* 修改地质构造总
*
* @param dzgzzb 地质构造总
* @return 结果
*/
public int updateDzgzzb(Dzgzzb dzgzzb);
/**
* 批量删除地质构造总
*
* @param ids 需要删除的地质构造总主键集合
* @return 结果
*/
public int deleteDzgzzbByIds(Long[] ids);
/**
* 删除地质构造总信息
*
* @param id 地质构造总主键
* @return 结果
*/
public int deleteDzgzzbById(Long id);
}
package com.ruoyi.project.zjsgfa.service;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.SjDzfc;
/**
* 地质分层Service接口
*
* @author ruoyi
* @date 2025-07-07
*/
public interface ISjDzfcService
{
/**
* 查询地质分层
*
* @param id 地质分层主键
* @return 地质分层
*/
public SjDzfc selectSjDzfcById(Long id);
/**
* 查询地质分层列表
*
* @param sjDzfc 地质分层
* @return 地质分层集合
*/
public List<SjDzfc> selectSjDzfcList(SjDzfc sjDzfc);
/**
* 新增地质分层
*
* @param sjDzfc 地质分层
* @return 结果
*/
public int insertSjDzfc(SjDzfc sjDzfc);
/**
* 修改地质分层
*
* @param sjDzfc 地质分层
* @return 结果
*/
public int updateSjDzfc(SjDzfc sjDzfc);
/**
* 批量删除地质分层
*
* @param ids 需要删除的地质分层主键集合
* @return 结果
*/
public int deleteSjDzfcByIds(Long[] ids);
/**
* 删除地质分层信息
*
* @param id 地质分层主键
* @return 结果
*/
public int deleteSjDzfcById(Long id);
}
package com.ruoyi.project.zjsgfa.service;
import java.util.List;
import com.ruoyi.project.zjsgfa.domain.Tsyxclxx;
/**
* 特殊岩性常量信息Service接口
*
* @author ruoyi
* @date 2025-07-08
*/
public interface ITsyxclxxService
{
/**
* 查询特殊岩性常量信息
*
* @param id 特殊岩性常量信息主键
* @return 特殊岩性常量信息
*/
public Tsyxclxx selectTsyxclxxById(Long id);
/**
* 查询特殊岩性常量信息列表
*
* @param tsyxclxx 特殊岩性常量信息
* @return 特殊岩性常量信息集合
*/
public List<Tsyxclxx> selectTsyxclxxList(Tsyxclxx tsyxclxx);
/**
* 新增特殊岩性常量信息
*
* @param tsyxclxx 特殊岩性常量信息
* @return 结果
*/
public int insertTsyxclxx(Tsyxclxx tsyxclxx);
/**
* 修改特殊岩性常量信息
*
* @param tsyxclxx 特殊岩性常量信息
* @return 结果
*/
public int updateTsyxclxx(Tsyxclxx tsyxclxx);
/**
* 批量删除特殊岩性常量信息
*
* @param ids 需要删除的特殊岩性常量信息主键集合
* @return 结果
*/
public int deleteTsyxclxxByIds(Long[] ids);
/**
* 删除特殊岩性常量信息信息
*
* @param id 特殊岩性常量信息主键
* @return 结果
*/
public int deleteTsyxclxxById(Long id);
}
package com.ruoyi.project.zjsgfa.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.zjsgfa.mapper.DzgzzbMapper;
import com.ruoyi.project.zjsgfa.domain.Dzgzzb;
import com.ruoyi.project.zjsgfa.service.IDzgzzbService;
/**
* 地质构造总Service业务层处理
*
* @author ruoyi
* @date 2025-07-08
*/
@Service
public class DzgzzbServiceImpl implements IDzgzzbService
{
@Autowired
private DzgzzbMapper dzgzzbMapper;
/**
* 查询地质构造总
*
* @param id 地质构造总主键
* @return 地质构造总
*/
@Override
public Dzgzzb selectDzgzzbById(Long id)
{
return dzgzzbMapper.selectDzgzzbById(id);
}
/**
* 查询地质构造总列表
*
* @param dzgzzb 地质构造总
* @return 地质构造总
*/
@Override
public List<Dzgzzb> selectDzgzzbList(Dzgzzb dzgzzb)
{
return dzgzzbMapper.selectDzgzzbList(dzgzzb);
}
/**
* 新增地质构造总
*
* @param dzgzzb 地质构造总
* @return 结果
*/
@Override
public int insertDzgzzb(Dzgzzb dzgzzb)
{
return dzgzzbMapper.insertDzgzzb(dzgzzb);
}
/**
* 修改地质构造总
*
* @param dzgzzb 地质构造总
* @return 结果
*/
@Override
public int updateDzgzzb(Dzgzzb dzgzzb)
{
return dzgzzbMapper.updateDzgzzb(dzgzzb);
}
/**
* 批量删除地质构造总
*
* @param ids 需要删除的地质构造总主键
* @return 结果
*/
@Override
public int deleteDzgzzbByIds(Long[] ids)
{
return dzgzzbMapper.deleteDzgzzbByIds(ids);
}
/**
* 删除地质构造总信息
*
* @param id 地质构造总主键
* @return 结果
*/
@Override
public int deleteDzgzzbById(Long id)
{
return dzgzzbMapper.deleteDzgzzbById(id);
}
}
package com.ruoyi.project.zjsgfa.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.zjsgfa.mapper.SjDzfcMapper;
import com.ruoyi.project.zjsgfa.domain.SjDzfc;
import com.ruoyi.project.zjsgfa.service.ISjDzfcService;
/**
* 地质分层Service业务层处理
*
* @author ruoyi
* @date 2025-07-07
*/
@Service
public class SjDzfcServiceImpl implements ISjDzfcService
{
@Autowired
private SjDzfcMapper sjDzfcMapper;
/**
* 查询地质分层
*
* @param id 地质分层主键
* @return 地质分层
*/
@Override
public SjDzfc selectSjDzfcById(Long id)
{
return sjDzfcMapper.selectSjDzfcById(id);
}
/**
* 查询地质分层列表
*
* @param sjDzfc 地质分层
* @return 地质分层
*/
@Override
public List<SjDzfc> selectSjDzfcList(SjDzfc sjDzfc)
{
return sjDzfcMapper.selectSjDzfcList(sjDzfc);
}
/**
* 新增地质分层
*
* @param sjDzfc 地质分层
* @return 结果
*/
@Override
public int insertSjDzfc(SjDzfc sjDzfc)
{
return sjDzfcMapper.insertSjDzfc(sjDzfc);
}
/**
* 修改地质分层
*
* @param sjDzfc 地质分层
* @return 结果
*/
@Override
public int updateSjDzfc(SjDzfc sjDzfc)
{
sjDzfc.setUpdateTime(DateUtils.getNowDate());
return sjDzfcMapper.updateSjDzfc(sjDzfc);
}
/**
* 批量删除地质分层
*
* @param ids 需要删除的地质分层主键
* @return 结果
*/
@Override
public int deleteSjDzfcByIds(Long[] ids)
{
return sjDzfcMapper.deleteSjDzfcByIds(ids);
}
/**
* 删除地质分层信息
*
* @param id 地质分层主键
* @return 结果
*/
@Override
public int deleteSjDzfcById(Long id)
{
return sjDzfcMapper.deleteSjDzfcById(id);
}
}
package com.ruoyi.project.zjsgfa.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.zjsgfa.mapper.TsyxclxxMapper;
import com.ruoyi.project.zjsgfa.domain.Tsyxclxx;
import com.ruoyi.project.zjsgfa.service.ITsyxclxxService;
/**
* 特殊岩性常量信息Service业务层处理
*
* @author ruoyi
* @date 2025-07-08
*/
@Service
public class TsyxclxxServiceImpl implements ITsyxclxxService
{
@Autowired
private TsyxclxxMapper tsyxclxxMapper;
/**
* 查询特殊岩性常量信息
*
* @param id 特殊岩性常量信息主键
* @return 特殊岩性常量信息
*/
@Override
public Tsyxclxx selectTsyxclxxById(Long id)
{
return tsyxclxxMapper.selectTsyxclxxById(id);
}
/**
* 查询特殊岩性常量信息列表
*
* @param tsyxclxx 特殊岩性常量信息
* @return 特殊岩性常量信息
*/
@Override
public List<Tsyxclxx> selectTsyxclxxList(Tsyxclxx tsyxclxx)
{
return tsyxclxxMapper.selectTsyxclxxList(tsyxclxx);
}
/**
* 新增特殊岩性常量信息
*
* @param tsyxclxx 特殊岩性常量信息
* @return 结果
*/
@Override
public int insertTsyxclxx(Tsyxclxx tsyxclxx)
{
return tsyxclxxMapper.insertTsyxclxx(tsyxclxx);
}
/**
* 修改特殊岩性常量信息
*
* @param tsyxclxx 特殊岩性常量信息
* @return 结果
*/
@Override
public int updateTsyxclxx(Tsyxclxx tsyxclxx)
{
return tsyxclxxMapper.updateTsyxclxx(tsyxclxx);
}
/**
* 批量删除特殊岩性常量信息
*
* @param ids 需要删除的特殊岩性常量信息主键
* @return 结果
*/
@Override
public int deleteTsyxclxxByIds(Long[] ids)
{
return tsyxclxxMapper.deleteTsyxclxxByIds(ids);
}
/**
* 删除特殊岩性常量信息信息
*
* @param id 特殊岩性常量信息主键
* @return 结果
*/
@Override
public int deleteTsyxclxxById(Long id)
{
return tsyxclxxMapper.deleteTsyxclxxById(id);
}
}
......@@ -226,6 +226,17 @@ public class DjdcController {
// map.put("sldf","数量得分");
map.put("zhdf","综合得分");
return AjaxResult.success( djdcService.getZtzhzzdfList(param),map);
case "getDzfcList":
//获取钻头最终得分
// map.put("kc","开次");
// map.put("ztxh","钻头型号");
// map.put("cc","钻头尺寸");
// map.put("jcdf","进尺得分");
// map.put("jsdf","机速得分");
//// map.put("zbdf","指标得分");
//// map.put("sldf","数量得分");
// map.put("zhdf","综合得分");
return AjaxResult.success( djdcService.getDzfcList(param),map);
default:
return AjaxResult.success();
}
......
package com.ruoyi.project.zt.domain;
import lombok.Data;
/**
* 录井 地层岩性
*/
@Data
public class LjDcyx {
/**
* 井号
*/
private String jh;
/**
* 顶界深度
*/
private Double djsd1;
/**
* 底界深度
*/
private Double djsd2;
/**
* 地层名称
*/
private String dcmc;
/**
* 厚度
*/
private Double hd;
/**
* 接触关系
*/
private String jcgx;
/**
* 岩性名称
*/
private String yxmc;
/**
* 油气层
*/
private String yqcmc;
}
package com.ruoyi.project.zt.domain;
import lombok.Data;
/**
* 查询地质分层
*/
@Data
public class LjDzfc {
//井号
private String jh;
//地质分层
private String dzfc;
//垂深
private Double cs;
//斜深
private Double xs;
//岩性提示
private String yxts;
//油气水提示
private String yqsts;
//故障提示
private String gzts;
}
package com.ruoyi.project.zt.mapper;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.zt.domain.CommonParam;
import com.ruoyi.project.zt.domain.LjDcyx;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
@DataSource(value = DataSourceType.SLAVE2)
public interface LjQueryMapper {
/**
* 获取地层岩性
* @return
*/
List<LjDcyx> getDcyxList(CommonParam param);
}
......@@ -42,4 +42,7 @@ public interface DjdcService {
int dyAiModelJxZjzh(CommonParam param);
List<LjDzfc> getDzfcList(CommonParam param);
}
......@@ -9,6 +9,12 @@ import com.google.gson.stream.JsonReader;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.framework.aspectj.lang.annotation.DataSource;
import com.ruoyi.framework.aspectj.lang.enums.DataSourceType;
import com.ruoyi.project.zjsgfa.domain.Dzgzzb;
import com.ruoyi.project.zjsgfa.domain.SjDzfc;
import com.ruoyi.project.zjsgfa.domain.Tsyxclxx;
import com.ruoyi.project.zjsgfa.mapper.DzgzzbMapper;
import com.ruoyi.project.zjsgfa.mapper.SjDzfcMapper;
import com.ruoyi.project.zjsgfa.mapper.TsyxclxxMapper;
import com.ruoyi.project.zt.domain.*;
import com.ruoyi.project.zt.domain.vo.SjInfo;
import com.ruoyi.project.zt.mapper.*;
......@@ -56,6 +62,17 @@ public class DjdcServiceImpl implements DjdcService {
private LjZjzhfxMapper ljZjzhfxMapper;
@Autowired
private SjDzfcMapper sjDzfcMapper;
@Autowired
private LjQueryMapper ljQueryMapper;
@Autowired
private DzgzzbMapper dzgzzbMapper;
@Autowired
private TsyxclxxMapper tsyxclxxMapper;
@Override
public List<DjDcInfo> getList(DjDcInfo info) {
return djdcInfoMapper.getList(info);
......@@ -1895,6 +1912,94 @@ public class DjdcServiceImpl implements DjdcService {
}
@Override
public List<LjDzfc> getDzfcList(CommonParam param) {
List<LjDzfc> list =new ArrayList<>();
SjDzfc sjDzfc =new SjDzfc();
if(StringUtils.isNotEmpty(param.getJh())){
String[] jhs = param.getJh().split(",");
sjDzfc.setJhs(jhs);
}
//查询设计井信息
List<SjDzfc> sjDzfcs = sjDzfcMapper.selectSjDzfcList(sjDzfc);
for(SjDzfc item :sjDzfcs){
LjDzfc ljDzfc =new LjDzfc();
ljDzfc.setJh( item.getSjjh());
ljDzfc.setCs(item.getSjdcs());
ljDzfc.setDzfc(item.getDcZ());
if(StringUtils.isNotEmpty(item.getSjyxts())){
ljDzfc.setYxts(item.getSjyxts());
}else {
//查询邻井
CommonParam paramYj=new CommonParam();
String[] jhs={item.getYjjh1(),item.getYjjh2()};
paramYj.setJhs(jhs);
List<LjDcyx> dcyxList = ljQueryMapper.getDcyxList(paramYj);
List<LjDcyx> collect = dcyxList.stream().filter(lj -> lj.getJh().equals(item.getYjjh1()) && equals(lj.getDjsd2(), item.getYjdcs1())).collect(Collectors.toList());
List<LjDcyx> colect2 = dcyxList.stream().filter(lj -> lj.getJh().equals(item.getYjjh2()) && equals(lj.getDjsd2(), item.getYjdcs2())).collect(Collectors.toList());
List<String> yxmclist=new ArrayList<>();
List<String> yqsmclist=new ArrayList<>();
if(colect2.size()>0){
List<LjDcyx> ysisNotnull = colect2.stream().filter(it -> StringUtils.isNotEmpty(it.getYxmc())).collect(Collectors.toList());
if(ysisNotnull.size()>0){
yxmclist.addAll(ysisNotnull.stream().map(LjDcyx::getYxmc).distinct().collect(Collectors.toList()));
}
List<LjDcyx> yqsisNotnull = colect2.stream().filter(it -> StringUtils.isNotEmpty(it.getYqcmc())).collect(Collectors.toList());
if(yqsisNotnull.size()>0){
yqsmclist.addAll(yqsisNotnull.stream().map(LjDcyx::getYqcmc).distinct().collect(Collectors.toList()));
}
}
if(collect.size()>0){
List<LjDcyx> ysisNotnull = collect.stream().filter(it -> StringUtils.isNotEmpty(it.getYxmc())).collect(Collectors.toList());
if(ysisNotnull.size()>0){
yxmclist.addAll(ysisNotnull.stream().map(LjDcyx::getYxmc).distinct().collect(Collectors.toList()));
}
List<LjDcyx> yqsisNotnull = collect.stream().filter(it -> StringUtils.isNotEmpty(it.getYqcmc())).collect(Collectors.toList());
if(yqsisNotnull.size()>0){
yqsmclist.addAll(yqsisNotnull.stream().map(LjDcyx::getYqcmc).distinct().collect(Collectors.toList()));
}
}
if(yxmclist.size()>0){
ljDzfc.setYxts(String.join(",",yxmclist));
}else {
//查询构造表
Dzgzzb dzgzzb= new Dzgzzb();
dzgzzb.setDzfc(item.getDcZ());
List<Dzgzzb> dzgzzbs = dzgzzbMapper.selectDzgzzbList(dzgzzb);
if(dzgzzbs.size()>0){
Dzgzzb dzgzzb1 = dzgzzbs.get(0);
ljDzfc.setYxts(dzgzzb1.getZyyx());
}
}
if(yqsmclist.size()>0){
ljDzfc.setYqsts(String.join(",",yqsmclist));
}
if(StringUtils.isNotEmpty(ljDzfc.getYxts())){
String[] split = ljDzfc.getYxts().split("、");
Tsyxclxx tsyxclxx =new Tsyxclxx();
tsyxclxx.setTsyxs(split);
List<Tsyxclxx> tsyxclxxes = tsyxclxxMapper.selectTsyxclxxList(tsyxclxx);
if(tsyxclxxes.size()>0){
List<String> collect1 = tsyxclxxes.stream().map(Tsyxclxx::getWt).collect(Collectors.toList());
ljDzfc.setGzts(String.join(",",collect1));
}
}
}
list.add(ljDzfc);
}
return list;
}
public static void calculateScores(List<SjInfo> items) {
// 按进尺降序排序
......
<?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.ruoyi.project.zjsgfa.mapper.DzgzzbMapper">
<resultMap type="Dzgzzb" id="DzgzzbResult">
<result property="id" column="id" />
<result property="dzfc" column="dzfc" />
<result property="dcdm" column="dcdm" />
<result property="jcm" column="jcm" />
<result property="zyyx" column="zyyx" />
<result property="yxms" column="yxms" />
<result property="tsyx" column="tsyx" />
<result property="zxhd" column="zxhd" />
<result property="zdhd" column="zdhd" />
</resultMap>
<sql id="selectDzgzzbVo">
select id, dzfc, dcdm, jcm, zyyx, yxms, tsyx, zxhd, zdhd from dzgzzb
</sql>
<select id="selectDzgzzbList" parameterType="Dzgzzb" resultMap="DzgzzbResult">
<include refid="selectDzgzzbVo"/>
<where>
<if test="dzfc != null and dzfc != ''"> and dzfc = #{dzfc}</if>
<if test="dcdm != null and dcdm != ''"> and dcdm = #{dcdm}</if>
<if test="jcm != null and jcm != ''"> and jcm = #{jcm}</if>
<if test="zyyx != null and zyyx != ''"> and zyyx = #{zyyx}</if>
<if test="yxms != null and yxms != ''"> and yxms = #{yxms}</if>
<if test="tsyx != null and tsyx != ''"> and tsyx = #{tsyx}</if>
<if test="zxhd != null "> and zxhd = #{zxhd}</if>
<if test="zdhd != null "> and zdhd = #{zdhd}</if>
</where>
</select>
<select id="selectDzgzzbById" parameterType="Long" resultMap="DzgzzbResult">
<include refid="selectDzgzzbVo"/>
where id = #{id}
</select>
<insert id="insertDzgzzb" parameterType="Dzgzzb" useGeneratedKeys="true" keyProperty="id">
insert into dzgzzb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dzfc != null">dzfc,</if>
<if test="dcdm != null">dcdm,</if>
<if test="jcm != null">jcm,</if>
<if test="zyyx != null">zyyx,</if>
<if test="yxms != null">yxms,</if>
<if test="tsyx != null">tsyx,</if>
<if test="zxhd != null">zxhd,</if>
<if test="zdhd != null">zdhd,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dzfc != null">#{dzfc},</if>
<if test="dcdm != null">#{dcdm},</if>
<if test="jcm != null">#{jcm},</if>
<if test="zyyx != null">#{zyyx},</if>
<if test="yxms != null">#{yxms},</if>
<if test="tsyx != null">#{tsyx},</if>
<if test="zxhd != null">#{zxhd},</if>
<if test="zdhd != null">#{zdhd},</if>
</trim>
</insert>
<update id="updateDzgzzb" parameterType="Dzgzzb">
update dzgzzb
<trim prefix="SET" suffixOverrides=",">
<if test="dzfc != null">dzfc = #{dzfc},</if>
<if test="dcdm != null">dcdm = #{dcdm},</if>
<if test="jcm != null">jcm = #{jcm},</if>
<if test="zyyx != null">zyyx = #{zyyx},</if>
<if test="yxms != null">yxms = #{yxms},</if>
<if test="tsyx != null">tsyx = #{tsyx},</if>
<if test="zxhd != null">zxhd = #{zxhd},</if>
<if test="zdhd != null">zdhd = #{zdhd},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDzgzzbById" parameterType="Long">
delete from dzgzzb where id = #{id}
</delete>
<delete id="deleteDzgzzbByIds" parameterType="String">
delete from dzgzzb where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.ruoyi.project.zjsgfa.mapper.TsyxclxxMapper">
<resultMap type="Tsyxclxx" id="TsyxclxxResult">
<result property="id" column="id" />
<result property="tsyx" column="tsyx" />
<result property="bcms" column="bcms" />
<result property="sbfs" column="sbfs" />
<result property="wt" column="wt" />
<result property="yfcs" column="yfcs" />
<result property="yjcs" column="yjcs" />
</resultMap>
<sql id="selectTsyxclxxVo">
select id, tsyx, bcms, sbfs, wt, yfcs, yjcs from tsyxclxx
</sql>
<select id="selectTsyxclxxList" parameterType="Tsyxclxx" resultMap="TsyxclxxResult">
<include refid="selectTsyxclxxVo"/>
<where>
<if test="tsyx != null and tsyx != ''"> and tsyx = #{tsyx}</if>
<if test="bcms != null and bcms != ''"> and bcms = #{bcms}</if>
<if test="sbfs != null and sbfs != ''"> and sbfs = #{sbfs}</if>
<if test="wt != null and wt != ''"> and wt = #{wt}</if>
<if test="yfcs != null and yfcs != ''"> and yfcs = #{yfcs}</if>
<if test="yjcs != null and yjcs != ''"> and yjcs = #{yjcs}</if>
<if test="tsyxs!=null">
and
<foreach item="tsyx" collection="tsyxs"
open="(" separator=" or " close=")">
tsyx LIKE CONCAT(#{tsyx}, '%' )
</foreach>
</if>
</where>
</select>
<select id="selectTsyxclxxById" parameterType="Long" resultMap="TsyxclxxResult">
<include refid="selectTsyxclxxVo"/>
where id = #{id}
</select>
<insert id="insertTsyxclxx" parameterType="Tsyxclxx" useGeneratedKeys="true" keyProperty="id">
insert into tsyxclxx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tsyx != null">tsyx,</if>
<if test="bcms != null">bcms,</if>
<if test="sbfs != null">sbfs,</if>
<if test="wt != null">wt,</if>
<if test="yfcs != null">yfcs,</if>
<if test="yjcs != null">yjcs,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tsyx != null">#{tsyx},</if>
<if test="bcms != null">#{bcms},</if>
<if test="sbfs != null">#{sbfs},</if>
<if test="wt != null">#{wt},</if>
<if test="yfcs != null">#{yfcs},</if>
<if test="yjcs != null">#{yjcs},</if>
</trim>
</insert>
<update id="updateTsyxclxx" parameterType="Tsyxclxx">
update tsyxclxx
<trim prefix="SET" suffixOverrides=",">
<if test="tsyx != null">tsyx = #{tsyx},</if>
<if test="bcms != null">bcms = #{bcms},</if>
<if test="sbfs != null">sbfs = #{sbfs},</if>
<if test="wt != null">wt = #{wt},</if>
<if test="yfcs != null">yfcs = #{yfcs},</if>
<if test="yjcs != null">yjcs = #{yjcs},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTsyxclxxById" parameterType="Long">
delete from tsyxclxx where id = #{id}
</delete>
<delete id="deleteTsyxclxxByIds" parameterType="String">
delete from tsyxclxx where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.ruoyi.project.zt.mapper.LjQueryMapper">
<select id="getDcyxList" resultType="com.ruoyi.project.zt.domain.LjDcyx">
select A.jh,
A.djsd1,
A.djsd2,
A.dcmc,
A.hd,
A.jcgx,A.ysmc_list yxmc,b.zhmc_list yqcmc from (
SELECT
B.jh,
B.djsd1,
B.djsd2,
B.dcmc,
B.hd,
B.jcgx,
LISTAGG ( b.ysmc, ', ' ) WITHIN GROUP ( ORDER BY b.ysmc ) AS ysmc_list
FROM
(
SELECT
B.jh,
B.djsd1,
B.djsd2,
B.dcmc,
B.hd,
B.jcgx,
A.ysmc
FROM
AZF07 B
LEFT JOIN AZL02 A ON B.jh = A.jh
AND A.djsd1 > B.djsd1
AND A.djsd2 &lt; B.djsd2
WHERE 1=1
<if test="jhs!=null">
and
<foreach item="jh" collection="jhs"
open="(" separator=" or " close=")">
B.jh LIKE CONCAT(#{jh}, '%' )
</foreach>
</if>
AND B.fclx = '解释'
GROUP BY
B.jh,
B.djsd1,
B.djsd2,
B.dcmc,
B.hd,
B.jcgx,
a.ysmc
ORDER BY
B.djsd1
) B
GROUP BY
B.jh,
B.djsd1,
B.djsd2,
B.dcmc,
B.hd,
B.jcgx
ORDER BY
B.djsd1 )A
left join
(
SELECT
B.jh,
B.djsd1,
B.djsd2,
B.dcmc,
B.hd,
B.jcgx,
LISTAGG ( b.zhjs, ', ' ) WITHIN GROUP ( ORDER BY b.zhjs ) AS zhmc_list
FROM
(
SELECT
B.jh,
B.djsd1,
B.djsd2,
B.dcmc,
B.hd,
B.jcgx,
A.zhjs
FROM
AZF07 B
LEFT JOIN AZF09 A ON B.jh = A.jh
AND A.djsd1 > B.djsd1
AND A.djsd2 &lt; B.djsd2
WHERE 1=1
<if test="jhs!=null">
and
<foreach item="jh" collection="jhs"
open="(" separator=" or " close=")">
B.jh LIKE CONCAT(#{jh}, '%' )
</foreach>
</if>
AND B.fclx = '解释'
GROUP BY
B.jh,
B.djsd1,
B.djsd2,
B.dcmc,
B.hd,
B.jcgx,
a.zhjs
ORDER BY
B.djsd1
) B
GROUP BY
B.jh,
B.djsd1,
B.djsd2,
B.dcmc,
B.hd,
B.jcgx
ORDER BY
B.djsd1) B on a.jh =b.jh and a.djsd1=b.djsd1 and a.djsd2=b.djsd2 and a.dcmc=b.dcmc and a.hd=b.hd
order by jh,DJSD1
</select>
</mapper>
\ No newline at end of file
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