|
|
@ -5,6 +5,7 @@ import com.api.browser.bean.SearchConditionItem;
|
|
|
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
|
|
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
import com.engine.core.impl.Service;
|
|
|
|
import com.engine.organization.component.OrganizationWeaTable;
|
|
|
|
import com.engine.organization.component.OrganizationWeaTable;
|
|
|
|
|
|
|
|
import com.engine.organization.entity.TopTab;
|
|
|
|
import com.engine.organization.entity.scheme.dto.LevelDTO;
|
|
|
|
import com.engine.organization.entity.scheme.dto.LevelDTO;
|
|
|
|
import com.engine.organization.entity.scheme.param.LevelSearchParam;
|
|
|
|
import com.engine.organization.entity.scheme.param.LevelSearchParam;
|
|
|
|
import com.engine.organization.entity.scheme.po.LevelPO;
|
|
|
|
import com.engine.organization.entity.scheme.po.LevelPO;
|
|
|
@ -83,10 +84,10 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|
|
|
Map<String, Object> apiDatas = new HashMap<>();
|
|
|
|
Map<String, Object> apiDatas = new HashMap<>();
|
|
|
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
|
|
|
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
|
|
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
|
|
|
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
|
|
|
|
|
|
|
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "等级方案", "161", "schemeId", true, "schemeBrowser");
|
|
|
|
SearchConditionItem levelNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "levelName");
|
|
|
|
SearchConditionItem levelNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "levelName");
|
|
|
|
SearchConditionItem levelNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "编号", "levelNo");
|
|
|
|
conditionItems.add(browserItem);
|
|
|
|
conditionItems.add(levelNameCondition);
|
|
|
|
conditionItems.add(levelNameCondition);
|
|
|
|
conditionItems.add(levelNoCondition);
|
|
|
|
|
|
|
|
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
|
|
|
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
|
|
|
apiDatas.put("conditions", addGroups);
|
|
|
|
apiDatas.put("conditions", addGroups);
|
|
|
|
return apiDatas;
|
|
|
|
return apiDatas;
|
|
|
@ -102,10 +103,8 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|
|
|
levelNameCondition.setRules("required|string");
|
|
|
|
levelNameCondition.setRules("required|string");
|
|
|
|
SearchConditionItem levelNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "levelNo");
|
|
|
|
SearchConditionItem levelNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "levelNo");
|
|
|
|
levelNoCondition.setRules("required|string");
|
|
|
|
levelNoCondition.setRules("required|string");
|
|
|
|
SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, "描述说明", "description");
|
|
|
|
SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "描述说明", "description");
|
|
|
|
|
|
|
|
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "等级方案", "161", "schemeId", true, "schemeBrowser");
|
|
|
|
// TODO 浏览按钮
|
|
|
|
|
|
|
|
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, true, "等级方案", "17", "levelScheme");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 编辑状态下赋值操作
|
|
|
|
// 编辑状态下赋值操作
|
|
|
|
String id = Util.null2String(params.get("id"));
|
|
|
|
String id = Util.null2String(params.get("id"));
|
|
|
@ -116,7 +115,7 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|
|
|
levelNameCondition.setValue(levelPO.getLevelName());
|
|
|
|
levelNameCondition.setValue(levelPO.getLevelName());
|
|
|
|
levelNoCondition.setValue(levelPO.getLevelNo());
|
|
|
|
levelNoCondition.setValue(levelPO.getLevelNo());
|
|
|
|
descriptionCondition.setValue(levelPO.getDescription());
|
|
|
|
descriptionCondition.setValue(levelPO.getDescription());
|
|
|
|
// TODO 浏览按钮赋值
|
|
|
|
browserItem.setValue(levelPO.getSchemeId());
|
|
|
|
// 编辑状态下,编号只读
|
|
|
|
// 编辑状态下,编号只读
|
|
|
|
levelNoCondition.setViewAttr(1);
|
|
|
|
levelNoCondition.setViewAttr(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -135,6 +134,19 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|
|
|
return MenuBtn.getCommonBtnDatas();
|
|
|
|
return MenuBtn.getCommonBtnDatas();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Map<String, Object> getTableInfo() {
|
|
|
|
|
|
|
|
Map<String, Object> apiDatas = new HashMap<>();
|
|
|
|
|
|
|
|
List<TopTab> topTabs = new ArrayList<>();
|
|
|
|
|
|
|
|
topTabs.add(TopTab.builder().color("#000000").groupId("flowAll").showCount(true).title("全部").viewCondition("-1").build());
|
|
|
|
|
|
|
|
topTabs.add(TopTab.builder().color("#ff3232").groupId("flowNew").showCount(true).title("启用").viewCondition("0").build());
|
|
|
|
|
|
|
|
topTabs.add(TopTab.builder().color("#fea468").groupId("flowRes").showCount(true).title("禁用").viewCondition("1").build());
|
|
|
|
|
|
|
|
apiDatas.put("topTabs",topTabs);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
apiDatas.put("topTabCount",topTabs);
|
|
|
|
|
|
|
|
return apiDatas;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询条件
|
|
|
|
* 查询条件
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -144,13 +156,18 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|
|
|
private String buildSqlWhere(Map<String, Object> params) {
|
|
|
|
private String buildSqlWhere(Map<String, Object> params) {
|
|
|
|
DBType dbType = DBType.get(new RecordSet().getDBType());
|
|
|
|
DBType dbType = DBType.get(new RecordSet().getDBType());
|
|
|
|
String sqlWhere = " where t.delete_type ='0' ";
|
|
|
|
String sqlWhere = " where t.delete_type ='0' ";
|
|
|
|
String name = (String) params.get("levelName");
|
|
|
|
String levelName = (String) params.get("levelName");
|
|
|
|
if (StringUtils.isNotBlank(name)) {
|
|
|
|
if (StringUtils.isNotBlank(levelName)) {
|
|
|
|
sqlWhere += " AND t.level_name " + dbType.like(name);
|
|
|
|
sqlWhere += " AND t.level_name " + dbType.like(levelName);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String schemeId = (String) params.get("schemeId");
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(schemeId)) {
|
|
|
|
|
|
|
|
sqlWhere += " AND t.scheme_id " + dbType.like(schemeId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String no = (String) params.get("levelNo");
|
|
|
|
String viewCondition = (String) params.get("viewcondition");
|
|
|
|
if (StringUtils.isNotBlank(no)) {
|
|
|
|
// -1:全部、0:启用、1:禁用
|
|
|
|
sqlWhere += " AND t.level_no " + dbType.like(no);
|
|
|
|
if (StringUtils.isNotBlank(viewCondition) && !"-1".equalsIgnoreCase(viewCondition)) {
|
|
|
|
|
|
|
|
sqlWhere += " AND t.forbidden_tag = '" + schemeId + "'";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return sqlWhere;
|
|
|
|
return sqlWhere;
|
|
|
|
}
|
|
|
|
}
|
|
|
|