Commit 7a340506 authored by luben's avatar luben

Merge branch 'dev' into 'main'

Dev

See merge request !29
parents 33c95ee7 1fee7b49
Pipeline #142929 failed with stages
in 2 minutes and 41 seconds
......@@ -59,8 +59,15 @@ public class Labels implements Serializable {
private String ylzd5;
//适用范围
private String scope;
private static final long serialVersionUID = 1L;
public String getScope(){return scope;}
public void setScope(String scope){this.scope = scope;}
public String getId() {
return id;
}
......
......@@ -598,6 +598,11 @@ public class LabelsExample implements Serializable {
return (Criteria) this;
}
public Criteria andScopeLike(String value) {
addCriterion("scope like", value, "scope");
return (Criteria) this;
}
public Criteria andYlzd1IsNull() {
addCriterion("ylzd1 is null");
return (Criteria) this;
......
......@@ -11,6 +11,11 @@ public class LabelsVO {
private String code;
private Integer pageNum;
private Integer pageSize;
private String scope;
public String getScope(){return scope;}
public void setScope(String scope){this.scope = scope;}
public String getId() {
return Id;
......
......@@ -86,6 +86,7 @@ public class LabelsFacadeService {
bsCommon.setParentId(body.getParentId());
bsCommon.setIsValid(body.getIsValid());
bsCommon.setSort(body.getSort());
bsCommon.setScope(body.getScope());
bsCommon.setYlzd1(body.getYlzd1());
bsCommon.setYlzd2(body.getYlzd2());
bsCommon.setYlzd3(body.getYlzd3());
......@@ -200,12 +201,25 @@ public class LabelsFacadeService {
if(StringUtils.isNotBlank(bsCommonVO.getCode())){
criteria.andCodeLike("%"+bsCommonVO.getCode()+"%");
}
// if(StringUtils.isNotBlank(bsCommonVO.getScope())){
// criteria.andScopeLike("%"+bsCommonVO.getScope()+"%");
// }
}
bsCommonExample.setOrderByClause(" sort + 0 ");
List<Labels> bsCommons = bsCommonService.selectByExample(bsCommonExample);
List<Map<String, Object>> jsTreeModels = convertFrBomsCommon(bsCommons);
if(bsCommonVO == null || StringUtils.isBlank(bsCommonVO.getScope())){
return AjaxResult.success("success", jsTreeModels);
}
List<Map<String, Object>> res = new ArrayList<>();
for (Map<String, Object> map : jsTreeModels) {
String scope = (String) map.get("scope");
if(scope.contains(bsCommonVO.getScope())){
res.add(map);
}
}
return AjaxResult.success("success", res);
}
private List<Map<String, Object>> convertFrBomsCommon(List<Labels> bsCommons) {
List<Map<String, Object>> models = new ArrayList<>();
......@@ -221,6 +235,7 @@ public class LabelsFacadeService {
model.put("parentId", bsCommon.getParentId());
model.put("isValid", bsCommon.getIsValid());
model.put("sort", bsCommon.getSort());
model.put("scope", bsCommon.getScope());
List<Map<String, Object>> childrenDocTypes = convertFromWgCodeByParent(bsCommons, bsCommon.getId());
model.put("child", childrenDocTypes);
models.add(model);
......
......@@ -9,6 +9,7 @@
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
<result column="is_valid" jdbcType="VARCHAR" property="isValid" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="scope" jdbcType="VARCHAR" property="scope" />
<result column="ylzd1" jdbcType="VARCHAR" property="ylzd1" />
<result column="ylzd2" jdbcType="VARCHAR" property="ylzd2" />
<result column="ylzd3" jdbcType="VARCHAR" property="ylzd3" />
......@@ -75,7 +76,7 @@
</sql>
<sql id="Base_Column_List">
id, code, name, description, parent_id, is_valid, sort, ylzd1, ylzd2, ylzd3,
ylzd4, ylzd5
ylzd4, ylzd5, scope
</sql>
<select id="selectByExample" parameterType="com.ruoyi.system.domain.other.BsCommonExample" resultMap="BaseResultMap">
select
......
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