代码修改 项目定价修改
This commit is contained in:
@@ -10,11 +10,15 @@ import java.util.Map;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.apache.ibatis.builder.MapperBuilderAssistant;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.MybatisConfiguration;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.enums.AssignSeqEnum;
|
import com.core.common.enums.AssignSeqEnum;
|
||||||
@@ -22,6 +26,7 @@ import com.core.common.enums.ChargeItemEnum;
|
|||||||
import com.core.common.enums.DefinitionTypeEnum;
|
import com.core.common.enums.DefinitionTypeEnum;
|
||||||
import com.core.common.utils.AssignSeqUtil;
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.ChargeItemDefApp;
|
import com.openhis.administration.domain.ChargeItemDefApp;
|
||||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||||
@@ -124,51 +129,44 @@ public class ItemDefinitionController {
|
|||||||
/**
|
/**
|
||||||
* 项目定价列表
|
* 项目定价列表
|
||||||
*
|
*
|
||||||
* @param itemDefSearchParam 查询条件
|
* @param chargeItemDefPageDto 查询条件
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当前页码
|
||||||
* @param pageSize 查询条数
|
* @param pageSize 查询条数
|
||||||
* @param request 请求数据
|
* @param request 请求数据
|
||||||
* @return 项目定价列表
|
* @return 项目定价列表
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/item-definition-page")
|
@GetMapping(value = "/item-definition-page")
|
||||||
public R<?> getDefinitionPage(ItemDefSearchParam itemDefSearchParam,
|
public R<?> getDefinitionPage(ChargeItemDefPageDto chargeItemDefPageDto,
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
@RequestParam(value = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
@RequestParam(value = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
||||||
|
|
||||||
IPage<ChargeItemDefPageDto> chargeItemDefinitionPage = new Page<>();
|
IPage<ChargeItemDefPageDto> chargeItemDefinitionPage = new Page<>();
|
||||||
List<ChargeItemDefPageDto> chargeItemDefinitionList;
|
// 初始化表格配置并构建查询条件
|
||||||
|
TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""),
|
||||||
// 跳过的数量
|
ChargeItemDefPageDto.class);
|
||||||
int skipCount = 0;
|
LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
if (pageNo > 0) {
|
// 构造查询条件
|
||||||
skipCount = (pageNo - 1) * pageSize;
|
if (StringUtils.isNotEmpty(searchKey)) {
|
||||||
|
queryWrapper.and(q -> q.like(ChargeItemDefPageDto::getChargeName, searchKey).or()
|
||||||
|
.like(ChargeItemDefPageDto::getItemNo, searchKey).or().like(ChargeItemDefPageDto::getPyStr, searchKey));
|
||||||
}
|
}
|
||||||
// 通过 DefinitionType 区分药品定价/器具定价/手术定价
|
if (chargeItemDefPageDto.getChargeItem() != null) {
|
||||||
if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
queryWrapper.eq(ChargeItemDefPageDto::getCategoryCode, chargeItemDefPageDto.getChargeItem());
|
||||||
// 获取定价列表
|
|
||||||
chargeItemDefinitionList =
|
|
||||||
chargeItemDefSearchMapper.getMedList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount);
|
|
||||||
} else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
|
||||||
// 获取定价列表
|
|
||||||
chargeItemDefinitionList =
|
|
||||||
chargeItemDefSearchMapper.getDevList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount);
|
|
||||||
} else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
|
||||||
// 获取定价列表
|
|
||||||
chargeItemDefinitionList =
|
|
||||||
chargeItemDefSearchMapper.getActList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount);
|
|
||||||
} else {
|
|
||||||
chargeItemDefinitionList = new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
// 设置分页条件
|
// 通过 DefinitionType 区分药品定价/器具定价/活动定价
|
||||||
chargeItemDefinitionPage.setSize(pageSize);
|
if (DefinitionTypeEnum.MEDICATION.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||||
chargeItemDefinitionPage.setCurrent(pageNo);
|
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, "med_medication_definition");
|
||||||
if (chargeItemDefinitionList.size() > 0) {
|
chargeItemDefinitionPage =
|
||||||
chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount());
|
chargeItemDefSearchMapper.getMedList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
chargeItemDefinitionPage.setRecords(chargeItemDefinitionList);
|
} else if (DefinitionTypeEnum.DEVICE.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||||
} else {
|
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, "adm_device_definition");
|
||||||
chargeItemDefinitionPage.setTotal(0);
|
chargeItemDefinitionPage =
|
||||||
chargeItemDefinitionPage.setRecords(new ArrayList<>());
|
chargeItemDefSearchMapper.getDevList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
|
} else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||||
|
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, "wor_activity_definition");
|
||||||
|
chargeItemDefinitionPage =
|
||||||
|
chargeItemDefSearchMapper.getActList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
}
|
}
|
||||||
return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,4 +87,19 @@ public class ChargeItemDefPageDto {
|
|||||||
|
|
||||||
/** 总条数 */
|
/** 总条数 */
|
||||||
private Integer totalCount;
|
private Integer totalCount;
|
||||||
|
|
||||||
|
/** 拼音助记码 */
|
||||||
|
private String pyStr;
|
||||||
|
|
||||||
|
/** 收费项目 */
|
||||||
|
private Integer categoryCode;
|
||||||
|
|
||||||
|
/** 编码 */
|
||||||
|
private String instanceTable;
|
||||||
|
|
||||||
|
/** 定价类型 */
|
||||||
|
private String definitionType;
|
||||||
|
|
||||||
|
/** 定价项目 */
|
||||||
|
private Integer chargeItem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,11 @@ import java.util.List;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||||
import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto;
|
import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto;
|
||||||
import com.openhis.web.datadictionary.dto.ItemDefSearchParam;
|
import com.openhis.web.datadictionary.dto.ItemDefSearchParam;
|
||||||
@@ -21,43 +25,31 @@ public interface ChargeItemDefSearchMapper extends BaseMapper<ChargeItemDefiniti
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品费用定价分页查询
|
* 药品费用定价分页查询
|
||||||
*
|
*
|
||||||
* @param itemDefSearchParam 查询条件
|
* @param page 分页条件
|
||||||
* @param pageNo 页码
|
* @param queryWrapper 查询条件
|
||||||
* @param pageSize 页面大小
|
|
||||||
* @param searchKey 模糊搜索条件
|
|
||||||
* @param skipCount 跳过条数
|
|
||||||
* @return 分页查询
|
* @return 分页查询
|
||||||
*/
|
*/
|
||||||
List<ChargeItemDefPageDto> getMedList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
IPage<ChargeItemDefPageDto> getMedList(@Param("page") Page<ChargeItemDefPageDto> page,
|
||||||
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey,
|
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||||
@Param("skipCount") Integer skipCount);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 器具费用定价分页查询
|
* 器具费用定价分页查询
|
||||||
*
|
*
|
||||||
* @param itemDefSearchParam 查询条件
|
* @param page 分页条件
|
||||||
* @param pageNo 页码
|
* @param queryWrapper 查询条件
|
||||||
* @param pageSize 页面大小
|
|
||||||
* @param searchKey 模糊搜索条件
|
|
||||||
* @param skipCount 跳过条数
|
|
||||||
* @return 分页查询
|
* @return 分页查询
|
||||||
*/
|
*/
|
||||||
List<ChargeItemDefPageDto> getDevList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
IPage<ChargeItemDefPageDto> getDevList(@Param("page") Page<ChargeItemDefPageDto> page,
|
||||||
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey,
|
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||||
@Param("skipCount") int skipCount);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 活动费用定价分页查询
|
* 活动费用定价分页查询
|
||||||
*
|
*
|
||||||
* @param itemDefSearchParam 查询条件
|
* @param page 分页条件
|
||||||
* @param pageNo 页码
|
* @param queryWrapper 查询条件
|
||||||
* @param pageSize 页面大小
|
|
||||||
* @param searchKey 模糊搜索条件
|
|
||||||
* @param skipCount 跳过条数
|
|
||||||
* @return 分页查询
|
* @return 分页查询
|
||||||
*/
|
*/
|
||||||
List<ChargeItemDefPageDto> getActList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
IPage<ChargeItemDefPageDto> getActList(@Param("page") Page<ChargeItemDefPageDto> page,
|
||||||
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey,
|
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||||
@Param("skipCount") int skipCount);
|
|
||||||
}
|
}
|
||||||
@@ -1,84 +1,69 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.openhis.web.datadictionary.mapper.ChargeItemDefSearchMapper">
|
<mapper namespace="com.openhis.web.datadictionary.mapper.ChargeItemDefSearchMapper">
|
||||||
|
|
||||||
<select id="getMedList" resultType="com.openhis.web.datadictionary.dto.ChargeItemDefPageDto">
|
<select id="getMedList" resultType="com.openhis.web.datadictionary.dto.ChargeItemDefPageDto">
|
||||||
SELECT
|
SELECT
|
||||||
T5.id,
|
T5.id,
|
||||||
T5.charge_name,
|
T5.charge_name,
|
||||||
T5.status_enum,
|
T5.status_enum,
|
||||||
T5.description,
|
T5.description,
|
||||||
T5.effective_start,
|
T5.effective_start,
|
||||||
T5.effective_end,
|
T5.effective_end,
|
||||||
T5.instance_table,
|
T5.instance_table,
|
||||||
T5.price,
|
T5.price,
|
||||||
T5.create_time,
|
T5.create_time,
|
||||||
T5.update_time,
|
T5.update_time,
|
||||||
T5.item_id,
|
T5.item_id,
|
||||||
T5.condition_rule_id,
|
T5.condition_rule_id,
|
||||||
T5.condition_lotnumber,
|
T5.condition_lotnumber,
|
||||||
T5.condition_yb_code,
|
T5.condition_yb_code,
|
||||||
T5.priority,
|
T5.priority,
|
||||||
T5.amount,
|
T5.amount,
|
||||||
T5.item_no,
|
T5.item_no,
|
||||||
T5.py_str,
|
T5.py_str,
|
||||||
T5.wb_str,
|
T5.wb_str,
|
||||||
T5.unit_code,
|
T5.unit_code,
|
||||||
T5.category_code,
|
T5.category_code,
|
||||||
T5.total_volume,
|
T5.part_percent,
|
||||||
T5.lot_number,
|
T5.total_volume,
|
||||||
COUNT(1) OVER() AS TOTAL_COUNT
|
T5.lot_number
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
T1.id,
|
T1.id,
|
||||||
T1.charge_name,
|
T1.charge_name,
|
||||||
T1.status_enum,
|
T1.status_enum,
|
||||||
T1.description,
|
T1.description,
|
||||||
T1.effective_start,
|
T1.effective_start,
|
||||||
T1.effective_end,
|
T1.effective_end,
|
||||||
T1.instance_table,
|
T1.instance_table,
|
||||||
T1.price,
|
T1.price,
|
||||||
T1.create_time,
|
T1.create_time,
|
||||||
T1.update_time,
|
T1.update_time,
|
||||||
T2.id AS item_id,
|
T2.id AS item_id,
|
||||||
T2.condition_rule_id,
|
T2.condition_rule_id,
|
||||||
T2.condition_lotnumber,
|
T2.condition_lotnumber,
|
||||||
T2.condition_yb_code,
|
T2.condition_yb_code,
|
||||||
T2.priority,
|
T2.priority,
|
||||||
T2.amount,
|
T2.amount,
|
||||||
T3.bus_no AS item_no,
|
T3.bus_no AS item_no,
|
||||||
T3.py_str,
|
T3.py_str,
|
||||||
T3.wb_str,
|
T3.wb_str,
|
||||||
T3.unit_code,
|
T3.unit_code,
|
||||||
T3.category_code,
|
T1.yb_type AS category_code,
|
||||||
T4.total_volume,
|
T3.part_percent,
|
||||||
T4.lot_number
|
T4.total_volume,
|
||||||
FROM
|
T4.lot_number
|
||||||
adm_charge_item_definition T1
|
FROM
|
||||||
LEFT JOIN adm_charge_item_def_app T2
|
adm_charge_item_definition T1
|
||||||
ON T1.id = T2.definition_id
|
LEFT JOIN adm_charge_item_def_app T2
|
||||||
LEFT JOIN med_medication_definition T3
|
ON T1.id = T2.definition_id
|
||||||
ON T1.instance_id = T3.id
|
LEFT JOIN med_medication_definition T3
|
||||||
LEFT JOIN med_medication T4
|
ON T1.instance_id = T3.id
|
||||||
ON T3.id = T4.medication_def_id) T5
|
LEFT JOIN med_medication T4
|
||||||
<where>
|
ON T3.id = T4.medication_def_id
|
||||||
T5.instance_table = 'med_medication_definition'
|
ORDER BY T1.create_time DESC) T5
|
||||||
<if test="searchKey != null">
|
${ew.customSqlSegment}
|
||||||
AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="itemDefSearchParam.getChargeItem() != null">
|
|
||||||
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY T5.create_time DESC
|
|
||||||
<!-- 拼接页码 -->
|
|
||||||
<if test="skipCount != null and pageSize != null and pageSize > 0">
|
|
||||||
LIMIT #{pageSize} OFFSET #{skipCount}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDevList" resultType="com.openhis.web.datadictionary.dto.ChargeItemDefPageDto">
|
<select id="getDevList" resultType="com.openhis.web.datadictionary.dto.ChargeItemDefPageDto">
|
||||||
SELECT
|
SELECT
|
||||||
T5.id,
|
T5.id,
|
||||||
@@ -102,8 +87,8 @@
|
|||||||
T5.wb_str,
|
T5.wb_str,
|
||||||
T5.unit_code,
|
T5.unit_code,
|
||||||
T5.category_code,
|
T5.category_code,
|
||||||
T5.lot_number,
|
T5.part_percent,
|
||||||
COUNT(1) OVER() AS TOTAL_COUNT
|
T5.lot_number
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
T1.id,
|
T1.id,
|
||||||
@@ -126,7 +111,8 @@
|
|||||||
T3.py_str,
|
T3.py_str,
|
||||||
T3.wb_str,
|
T3.wb_str,
|
||||||
T3.unit_code AS unit_code,
|
T3.unit_code AS unit_code,
|
||||||
T3.category_enum AS category_code,
|
T1.yb_type AS category_code,
|
||||||
|
T3.part_percent,
|
||||||
T4.lot_number
|
T4.lot_number
|
||||||
FROM
|
FROM
|
||||||
adm_charge_item_definition T1
|
adm_charge_item_definition T1
|
||||||
@@ -135,25 +121,10 @@
|
|||||||
LEFT JOIN adm_device_definition T3
|
LEFT JOIN adm_device_definition T3
|
||||||
ON T1.instance_id = T3.id
|
ON T1.instance_id = T3.id
|
||||||
LEFT JOIN adm_device T4
|
LEFT JOIN adm_device T4
|
||||||
ON T3.id = T4.device_def_id) T5
|
ON T3.id = T4.device_def_id
|
||||||
<where>
|
ORDER BY T1.create_time DESC) T5
|
||||||
T5.instance_table = 'adm_device_definition'
|
${ew.customSqlSegment}
|
||||||
<if test="searchKey != null">
|
|
||||||
AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="itemDefSearchParam.getChargeItem() != null">
|
|
||||||
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY T5.create_time DESC
|
|
||||||
<!-- 拼接页码 -->
|
|
||||||
<if test="skipCount != null and pageSize != null and pageSize > 0">
|
|
||||||
LIMIT #{pageSize} OFFSET #{skipCount}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getActList" resultType="com.openhis.web.datadictionary.dto.ChargeItemDefPageDto">
|
<select id="getActList" resultType="com.openhis.web.datadictionary.dto.ChargeItemDefPageDto">
|
||||||
SELECT
|
SELECT
|
||||||
T5.id,
|
T5.id,
|
||||||
@@ -176,8 +147,7 @@
|
|||||||
T5.py_str,
|
T5.py_str,
|
||||||
T5.wb_str,
|
T5.wb_str,
|
||||||
T5.unit_code,
|
T5.unit_code,
|
||||||
T5.category_code,
|
T5.category_code
|
||||||
COUNT(1) OVER() AS TOTAL_COUNT
|
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
T1.id,
|
T1.id,
|
||||||
@@ -200,28 +170,14 @@
|
|||||||
T3.py_str,
|
T3.py_str,
|
||||||
T3.wb_str,
|
T3.wb_str,
|
||||||
T3.permitted_unit_code AS unit_code,
|
T3.permitted_unit_code AS unit_code,
|
||||||
T3.type_enum AS category_code
|
T1.yb_type AS category_code
|
||||||
FROM
|
FROM
|
||||||
adm_charge_item_definition T1
|
adm_charge_item_definition T1
|
||||||
LEFT JOIN adm_charge_item_def_app T2
|
LEFT JOIN adm_charge_item_def_app T2
|
||||||
ON T1.id = T2.definition_id
|
ON T1.id = T2.definition_id
|
||||||
LEFT JOIN wor_activity_definition T3
|
LEFT JOIN wor_activity_definition T3
|
||||||
ON T1.instance_id = T3.id) T5
|
ON T1.instance_id = T3.id
|
||||||
<where>
|
ORDER BY T1.create_time DESC) T5
|
||||||
T5.instance_table = 'wor_activity_definition'
|
${ew.customSqlSegment}
|
||||||
<if test="searchKey != null">
|
|
||||||
AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="itemDefSearchParam.getChargeItem() != null">
|
|
||||||
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
ORDER BY T5.create_time DESC
|
|
||||||
<!-- 拼接页码 -->
|
|
||||||
<if test="skipCount != null and pageSize != null and pageSize > 0">
|
|
||||||
LIMIT #{pageSize} OFFSET #{skipCount}
|
|
||||||
</if>
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user