11 changed files with 652 additions and 1 deletions
@ -0,0 +1,115 @@ |
|||
package com.kms.yg.sz.controller; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
import com.shuili.common.core.controller.BaseController; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.utils.poi.ExcelUtil; |
|||
import com.kms.common.utils.BaseEntityUtils; |
|||
|
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
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.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.shuili.common.mybaitsplus.BeanToWrapper; |
|||
|
|||
import com.shuili.common.annotation.Log; |
|||
import com.shuili.common.core.domain.AjaxResult; |
|||
import com.shuili.common.enums.BusinessType; |
|||
import com.kms.yg.sz.domain.BsSgcSzDagl; |
|||
import com.kms.yg.sz.service.BsSgcSzDaglService; |
|||
|
|||
|
|||
/** |
|||
* 水闸档案管理Controller |
|||
* |
|||
* @author kms |
|||
* @date 2024-03-04 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/sz/dagl") |
|||
@Api(tags = "水闸档案管理") |
|||
public class BsSgcSzDaglController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private BsSgcSzDaglService bsSgcSzDaglService; |
|||
|
|||
|
|||
/** |
|||
* 查询水闸档案管理列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("水闸档案管理列表") |
|||
public IPage list(@RequestBody SearchParam<BsSgcSzDagl> sp) |
|||
{ |
|||
return bsSgcSzDaglService.selectPage(sp); |
|||
} |
|||
|
|||
/** |
|||
* 导出水闸档案管理列表 |
|||
*/ |
|||
@Log(title = "水闸档案管理导出", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ApiOperation("水闸档案管理导出") |
|||
public AjaxResult export(@RequestBody BsSgcSzDagl bsSgcSzDagl) |
|||
{ |
|||
List<BsSgcSzDagl> list = bsSgcSzDaglService.listByIds(bsSgcSzDagl.getIds()); |
|||
ExcelUtil<BsSgcSzDagl> util = new ExcelUtil<>(BsSgcSzDagl.class); |
|||
return util.exportExcel(list, "dagl"); |
|||
} |
|||
|
|||
/** |
|||
* 获取水闸档案管理详细信息 |
|||
*/ |
|||
@ApiOperation(" 水闸档案管理详情") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") String id) |
|||
{ |
|||
return AjaxResult.success(bsSgcSzDaglService.getById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增水闸档案管理 |
|||
*/ |
|||
@Log(title = "水闸档案管理新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("水闸档案管理新增") |
|||
public AjaxResult add(@RequestBody BsSgcSzDagl bsSgcSzDagl) |
|||
{ |
|||
BaseEntityUtils.preInsert(bsSgcSzDagl); |
|||
return toAjax(bsSgcSzDaglService.save(bsSgcSzDagl)); |
|||
} |
|||
|
|||
/** |
|||
* 修改水闸档案管理 |
|||
*/ |
|||
@ApiOperation("水闸档案管理修改") |
|||
@Log(title = "水闸档案管理修改", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody BsSgcSzDagl bsSgcSzDagl) |
|||
{ |
|||
return toAjax(bsSgcSzDaglService.updateById(bsSgcSzDagl)); |
|||
} |
|||
|
|||
/** |
|||
* 删除水闸档案管理 |
|||
*/ |
|||
@ApiOperation("水闸档案管理删除") |
|||
@Log(title = "水闸档案管理删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable String[] ids) |
|||
{ |
|||
return toAjax(bsSgcSzDaglService.removeByIds(Arrays.asList(ids))); |
|||
} |
|||
} |
@ -0,0 +1,122 @@ |
|||
package com.kms.yg.sz.controller; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
import com.shuili.common.core.controller.BaseController; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.utils.poi.ExcelUtil; |
|||
import com.kms.common.utils.BaseEntityUtils; |
|||
|
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
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.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.shuili.common.mybaitsplus.BeanToWrapper; |
|||
|
|||
import com.shuili.common.annotation.Log; |
|||
import com.shuili.common.core.domain.AjaxResult; |
|||
import com.shuili.common.enums.BusinessType; |
|||
import com.kms.yg.sz.domain.BsSgcSzJfgl; |
|||
import com.kms.yg.sz.service.BsSgcSzJfglService; |
|||
|
|||
|
|||
/** |
|||
* 经费管理Controller |
|||
* |
|||
* @author kms |
|||
* @date 2024-03-04 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/sz/jfgl") |
|||
@Api(tags = "经费管理") |
|||
public class BsSgcSzJfglController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private BsSgcSzJfglService bsSgcSzJfglService; |
|||
|
|||
|
|||
/** |
|||
* 查询经费管理列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("经费管理列表") |
|||
public IPage list(@RequestBody SearchParam<BsSgcSzJfgl> sp) |
|||
{ |
|||
return bsSgcSzJfglService.selectPage(sp); |
|||
} |
|||
|
|||
@GetMapping("/listByCode/{code}") |
|||
public AjaxResult listById(@PathVariable("code") String code) |
|||
{ |
|||
return AjaxResult.success(bsSgcSzJfglService.getByCode(code)); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 导出经费管理列表 |
|||
*/ |
|||
@Log(title = "经费管理导出", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ApiOperation("经费管理导出") |
|||
public AjaxResult export(@RequestBody BsSgcSzJfgl bsSgcSzJfgl) |
|||
{ |
|||
List<BsSgcSzJfgl> list = bsSgcSzJfglService.listByIds(bsSgcSzJfgl.getIds()); |
|||
ExcelUtil<BsSgcSzJfgl> util = new ExcelUtil<>(BsSgcSzJfgl.class); |
|||
return util.exportExcel(list, "jfgl"); |
|||
} |
|||
|
|||
/** |
|||
* 获取经费管理详细信息 |
|||
*/ |
|||
@ApiOperation(" 经费管理详情") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") String id) |
|||
{ |
|||
return AjaxResult.success(bsSgcSzJfglService.getById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增经费管理 |
|||
*/ |
|||
@Log(title = "经费管理新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("经费管理新增") |
|||
public AjaxResult add(@RequestBody BsSgcSzJfgl bsSgcSzJfgl) |
|||
{ |
|||
BaseEntityUtils.preInsert(bsSgcSzJfgl); |
|||
return toAjax(bsSgcSzJfglService.save(bsSgcSzJfgl)); |
|||
} |
|||
|
|||
/** |
|||
* 修改经费管理 |
|||
*/ |
|||
@ApiOperation("经费管理修改") |
|||
@Log(title = "经费管理修改", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody BsSgcSzJfgl bsSgcSzJfgl) |
|||
{ |
|||
return toAjax(bsSgcSzJfglService.updateById(bsSgcSzJfgl)); |
|||
} |
|||
|
|||
/** |
|||
* 删除经费管理 |
|||
*/ |
|||
@ApiOperation("经费管理删除") |
|||
@Log(title = "经费管理删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable String[] ids) |
|||
{ |
|||
return toAjax(bsSgcSzJfglService.removeByIds(Arrays.asList(ids))); |
|||
} |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.kms.yg.sz.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import com.shuili.common.annotation.Excel; |
|||
import com.shuili.common.core.domain.BaseEntity; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 水闸档案管理对象 bs_sgc_sz_dagl |
|||
* |
|||
* @author kms |
|||
* @date 2024-03-04 |
|||
*/ |
|||
@TableName("bs_sgc_sz_dagl") |
|||
@Data |
|||
@ApiModel("水闸档案管理") |
|||
public class BsSgcSzDagl extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 水闸编码 */ |
|||
@Excel(name = "水闸编码") |
|||
@ApiModelProperty("水闸编码") |
|||
private String wagaCode; |
|||
|
|||
/** 水闸调度规程 */ |
|||
@Excel(name = "水闸调度规程") |
|||
@ApiModelProperty("水闸调度规程") |
|||
private String regulationsAttachment; |
|||
|
|||
/** 年度调度运用计划 */ |
|||
@Excel(name = "年度调度运用计划") |
|||
@ApiModelProperty("年度调度运用计划") |
|||
private String planAttachment; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "年度调度运用计划") |
|||
@ApiModelProperty("年度调度运用计划") |
|||
private String createUid; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "年度调度运用计划") |
|||
@ApiModelProperty("年度调度运用计划") |
|||
private String updateUid; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "年度调度运用计划") |
|||
@ApiModelProperty("年度调度运用计划") |
|||
private String owerDept; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "年度调度运用计划") |
|||
@ApiModelProperty("年度调度运用计划") |
|||
private String relation; |
|||
|
|||
|
|||
@TableField(exist = false) |
|||
private String wagaName; |
|||
@TableField(exist = false) |
|||
private String wagaType; |
|||
@TableField(exist = false) |
|||
private String engScal; |
|||
@TableField(exist = false) |
|||
private String unit; |
|||
@TableField(exist = false) |
|||
private String adcd; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,91 @@ |
|||
package com.kms.yg.sz.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import com.shuili.common.annotation.Excel; |
|||
import com.shuili.common.core.domain.BaseEntity; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
|
|||
|
|||
/** |
|||
* 经费管理对象 bs_sgc_sz_jfgl |
|||
* |
|||
* @author kms |
|||
* @date 2024-03-04 |
|||
*/ |
|||
@TableName("bs_sgc_sz_jfgl") |
|||
@Data |
|||
@ApiModel("经费管理") |
|||
public class BsSgcSzJfgl extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 水闸编码 */ |
|||
@Excel(name = "水闸编码") |
|||
@ApiModelProperty("水闸编码") |
|||
private String wagaCode; |
|||
|
|||
/** 单位名称 */ |
|||
@Excel(name = "单位名称") |
|||
@ApiModelProperty("单位名称") |
|||
private String unitName; |
|||
|
|||
/** 人员数量 */ |
|||
@Excel(name = "人员数量") |
|||
@ApiModelProperty("人员数量") |
|||
private Long peopleNum; |
|||
|
|||
/** 经费 */ |
|||
@Excel(name = "经费") |
|||
@ApiModelProperty("经费") |
|||
private String funds; |
|||
|
|||
/** 经费用途 */ |
|||
@Excel(name = "经费用途") |
|||
@ApiModelProperty("经费用途") |
|||
private String fundsPurpose; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "经费用途") |
|||
@ApiModelProperty("经费用途") |
|||
private String createUid; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "经费用途") |
|||
@ApiModelProperty("经费用途") |
|||
private String updateUid; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "经费用途") |
|||
@ApiModelProperty("经费用途") |
|||
private String owerDept; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "经费用途") |
|||
@ApiModelProperty("经费用途") |
|||
private String relation; |
|||
|
|||
/** $column.columnComment */ |
|||
@Excel(name = "经费用途") |
|||
@ApiModelProperty("经费用途") |
|||
private String type; |
|||
|
|||
|
|||
|
|||
@TableField(exist = false) |
|||
private String wagaName; |
|||
@TableField(exist = false) |
|||
private String wagaType; |
|||
@TableField(exist = false) |
|||
private String engScal; |
|||
@TableField(exist = false) |
|||
private String unit; |
|||
@TableField(exist = false) |
|||
private String adcd; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.kms.yg.sz.mapper; |
|||
|
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.sz.domain.BsSgcSzDagl; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 水闸档案管理Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-03-04 |
|||
*/ |
|||
@Repository |
|||
public interface BsSgcSzDaglMapper extends BaseMapper<BsSgcSzDagl> { |
|||
|
|||
|
|||
|
|||
List<BsSgcSzDagl> getList(@Param("id") String id, |
|||
@Param("wagaType") String wagaType, |
|||
@Param("wagaName") String wagaName, |
|||
@Param("adcd") String adcd, |
|||
@Param("orderBy") String orderBy, |
|||
@Param("pageNum") int pageNum, |
|||
@Param("pageSize") int pageSize); |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.kms.yg.sz.mapper; |
|||
|
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Repository; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.sz.domain.BsSgcSzJfgl; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 经费管理Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-03-04 |
|||
*/ |
|||
@Repository |
|||
public interface BsSgcSzJfglMapper extends BaseMapper<BsSgcSzJfgl> { |
|||
|
|||
List<BsSgcSzJfgl> getList(@Param("id") String id, |
|||
@Param("wagaType") String wagaType, |
|||
@Param("wagaName") String wagaName, |
|||
@Param("adcd") String adcd, |
|||
@Param("orderBy") String orderBy, |
|||
@Param("pageNum") int pageNum, |
|||
@Param("pageSize") int pageSize); |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.kms.yg.sz.service; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.kms.system.service.SysXzqhService; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.core.service.BaseService; |
|||
import com.kms.yg.sz.mapper.BsSgcSzDaglMapper; |
|||
import com.kms.yg.sz.domain.BsSgcSzDagl; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 水闸档案管理Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-03-04 |
|||
*/ |
|||
@Service |
|||
public class BsSgcSzDaglService extends BaseService<BsSgcSzDaglMapper, BsSgcSzDagl> { |
|||
|
|||
|
|||
@Autowired |
|||
private BsSgcSzDaglMapper bsSgcSzDaglMapper; |
|||
|
|||
@Autowired |
|||
private SysXzqhService sysXzqhService; |
|||
|
|||
public IPage selectPage(SearchParam<BsSgcSzDagl> sp) { |
|||
|
|||
BsSgcSzDagl data = sp.getData(); |
|||
|
|||
|
|||
List<BsSgcSzDagl> list = bsSgcSzDaglMapper.getList(data.getId(), data.getWagaType(), data.getWagaName(), |
|||
sysXzqhService.getSubString(data.getAdcd()), "create_time", sp.getPageNum(), sp.getPageSize()); |
|||
|
|||
Page<BsSgcSzDagl> page = new Page<>(); |
|||
page.setTotal(list.size()); |
|||
page.setRecords(list); |
|||
return page; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.kms.yg.sz.service; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.kms.system.service.SysXzqhService; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.core.service.BaseService; |
|||
import com.kms.yg.sz.mapper.BsSgcSzJfglMapper; |
|||
import com.kms.yg.sz.domain.BsSgcSzJfgl; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 经费管理Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-03-04 |
|||
*/ |
|||
@Service |
|||
public class BsSgcSzJfglService extends BaseService<BsSgcSzJfglMapper, BsSgcSzJfgl>{ |
|||
|
|||
|
|||
@Autowired |
|||
private BsSgcSzJfglMapper bsSgcSzJfglMapper; |
|||
|
|||
|
|||
@Autowired |
|||
private SysXzqhService sysXzqhService; |
|||
|
|||
public IPage selectPage(SearchParam<BsSgcSzJfgl> sp) { |
|||
|
|||
BsSgcSzJfgl data = sp.getData(); |
|||
|
|||
List<BsSgcSzJfgl> list= bsSgcSzJfglMapper.getList(data.getId(), data.getWagaType(), data.getWagaName(), |
|||
sysXzqhService.getSubString(data.getAdcd()), "create_time", sp.getPageNum(), sp.getPageSize()); |
|||
|
|||
Page<BsSgcSzJfgl> page = new Page<>(); |
|||
page.setRecords(list); |
|||
|
|||
page.setTotal(list.size()); |
|||
|
|||
return page; |
|||
|
|||
} |
|||
|
|||
public List<BsSgcSzJfgl> getByCode(String code) { |
|||
List<BsSgcSzJfgl> bsSgcSzJfgls = bsSgcSzJfglMapper.selectList(Wrappers.lambdaQuery(BsSgcSzJfgl.class) |
|||
.eq(BsSgcSzJfgl::getWagaCode, code)); |
|||
|
|||
return bsSgcSzJfgls; |
|||
|
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
<?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.kms.yg.sz.mapper.BsSgcSzDaglMapper"> |
|||
|
|||
<sql id="info"> |
|||
select * |
|||
from bs_sgc_sz_dagl sd |
|||
left join bs_sgc_df_safe_jbxx sj on sd.waga_code = sj.waga_code |
|||
|
|||
</sql> |
|||
|
|||
<resultMap id="col" type="BsSgcSzDagl"> |
|||
<id property="id" column="id"/> |
|||
<result property="wagaCode" column="waga_code"/> |
|||
<result property="wagaName" column="waga_name"/> |
|||
<result property="wagaType" column="waga_type"/> |
|||
<result property="unit" column="ADM_DEP"/> |
|||
<result property="engScal" column="eng_scal"/> |
|||
<result property="adcd" column="adcd"/> |
|||
<result property="regulationsAttachment" column="regulations_attachment"/> |
|||
<result property="planAttachment" column="plan_attachment"/> |
|||
</resultMap> |
|||
|
|||
|
|||
|
|||
<select id="getList" resultMap="col"> |
|||
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind> |
|||
<include refid="info"></include> |
|||
<where> |
|||
<if test="wagaType!=null and wagaType!=''"> |
|||
and sj.waga_type = #{wagaType} |
|||
</if> |
|||
<if test="wagaName!=null and wagaName!=''"> |
|||
and sj.waga_name LIKE concat('%',#{wagaName},'%') |
|||
</if> |
|||
|
|||
<if test="adcd!=null and adcd !=''"> |
|||
and sj.adcd like concat(#{adcd},'%') |
|||
</if> |
|||
<if test="id!=null and id!=''"> |
|||
and sd.id=#{id} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,45 @@ |
|||
<?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.kms.yg.sz.mapper.BsSgcSzJfglMapper"> |
|||
|
|||
<sql id="info"> |
|||
select * |
|||
from bs_sgc_sz_jfgl sf |
|||
left join bs_sgc_df_safe_jbxx sj on sf.waga_code = sj.waga_code |
|||
|
|||
</sql> |
|||
|
|||
<resultMap id="col" type="BsSgcSzJfgl"> |
|||
<id property="id" column="id"/> |
|||
<result property="wagaCode" column="waga_code"/> |
|||
<result property="wagaName" column="waga_name"/> |
|||
<result property="wagaType" column="waga_type"/> |
|||
<result property="unit" column="ADM_DEP"/> |
|||
<result property="engScal" column="eng_scal"/> |
|||
<result property="adcd" column="adcd"/> |
|||
</resultMap> |
|||
|
|||
|
|||
|
|||
<select id="getList" resultMap="col"> |
|||
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind> |
|||
<include refid="info"></include> |
|||
<where> |
|||
<if test="wagaType!=null and wagaType!=''"> |
|||
and sj.waga_type = #{wagaType} |
|||
</if> |
|||
<if test="wagaName!=null and wagaName!=''"> |
|||
and sj.waga_name LIKE concat('%',#{wagaName},'%') |
|||
</if> |
|||
|
|||
<if test="adcd!=null and adcd !=''"> |
|||
and sj.adcd like concat(#{adcd},'%') |
|||
</if> |
|||
<if test="id!=null and id!=''"> |
|||
and sf.id=#{id} |
|||
</if> |
|||
</where> |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue