feat: There is no way the convert
This commit is contained in:
@@ -5,6 +5,7 @@ import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -63,5 +64,6 @@ public class UtArea extends BaseEntity {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> sarTypeList;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -37,6 +38,18 @@ public class UtAreaServiceImpl extends ServiceImpl<UtAreaDao, UtArea> implements
|
||||
}
|
||||
|
||||
public List<SelectionResult> getAreaSelList(UtArea utAreaEO){
|
||||
List<String> list = new ArrayList<>();
|
||||
if(utAreaEO.getSarType().equals("INLAND_STAND")){
|
||||
utAreaEO.setSarType(null);
|
||||
list.add("INLAND_STAND");
|
||||
list.add("STAND");
|
||||
utAreaEO.setSarTypeList(list);
|
||||
}else if(utAreaEO.getSarType().equals("FOREIGN_STAND")){
|
||||
utAreaEO.setSarType(null);
|
||||
list.add("FOREIGN_STAND");
|
||||
list.add("STAND");
|
||||
utAreaEO.setSarTypeList(list);
|
||||
}
|
||||
return dao.getAreaSelList(utAreaEO);
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getAreaSelList" parameterType="com.adc.da.slrs.utArea.entity.UtArea" resultType="com.adc.da.sys.common.SelectionResult">
|
||||
select id as value,area_name as label
|
||||
select id as value,area_name as label,sar_type AS sarType
|
||||
from UT_AREA
|
||||
where 1=1
|
||||
<if test="id != null" >
|
||||
@@ -191,6 +191,12 @@
|
||||
<if test="sarType != null" >
|
||||
and sar_type like concat(concat('%',#{sarType}),'%')
|
||||
</if>
|
||||
<if test="sarTypeList != null" >
|
||||
and sar_type in
|
||||
<foreach collection="sarTypeList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by show_index,id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user