Commit 76ffaf9f by wangchunyang

配置相关功能开发

parent 583caf73
......@@ -4,6 +4,7 @@ import com.scpyun.base.bean.Page;
import com.scpyun.base.core.annotation.Api;
import com.scpyun.base.core.annotation.ApiOperation;
import com.scpyun.base.core.exception.CustomException;
import com.scpyun.base.core.utils.UUIDUtil;
import com.scpyun.base.db.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -21,9 +22,9 @@ public class KeyDmLeaveTypeServiceImpl {
private final String namespace = "com.scpyun.platform.standard.jilinsscgsdp.keyDmLeaveType.";
@ApiOperation(value = "查询请假类型列表", desc = "分页查询请假类型")
public Page<Map<String, Object>> selectList(Map<String, Object> map) {
public Page<Map<String, Object>> selectList(Page<Map<String,Object>> map) {
if (map == null) {
map = new HashMap<>();
map = new Page<>();
}
return commonService.findPage(namespace + "selectList", map);
}
......@@ -36,6 +37,7 @@ public class KeyDmLeaveTypeServiceImpl {
Object id = map.get("id");
if (id == null || String.valueOf(id).trim().isEmpty()) {
// 新增
map.put("id", UUIDUtil.getUUID());
if (commonService.insert(namespace + "insert", map) != 1) {
throw new CustomException("保存失败");
}
......
......@@ -4,6 +4,7 @@ import com.scpyun.base.bean.Page;
import com.scpyun.base.core.annotation.Api;
import com.scpyun.base.core.annotation.ApiOperation;
import com.scpyun.base.core.exception.CustomException;
import com.scpyun.base.core.utils.UUIDUtil;
import com.scpyun.base.db.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -21,9 +22,9 @@ public class KeyDmMaterialCategoryServiceImpl {
private final String namespace = "com.scpyun.platform.standard.jilinsscgsdp.keyDmMaterialCategory.";
@ApiOperation(value = "查询办公用品分类列表", desc = "分页查询办公用品分类")
public Page<Map<String, Object>> selectList(Map<String, Object> map) {
public Page<Map<String, Object>> selectList(Page<Map<String, Object>> map) {
if (map == null) {
map = new HashMap<>();
map = new Page<>();
}
return commonService.findPage(namespace + "selectList", map);
}
......@@ -36,6 +37,7 @@ public class KeyDmMaterialCategoryServiceImpl {
Object id = map.get("id");
if (id == null || String.valueOf(id).trim().isEmpty()) {
// 新增
map.put("id", UUIDUtil.getUUID());
if (commonService.insert(namespace + "insert", map) != 1) {
throw new CustomException("保存失败");
}
......
......@@ -4,6 +4,7 @@ import com.scpyun.base.bean.Page;
import com.scpyun.base.core.annotation.Api;
import com.scpyun.base.core.annotation.ApiOperation;
import com.scpyun.base.core.exception.CustomException;
import com.scpyun.base.core.utils.UUIDUtil;
import com.scpyun.base.db.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -21,9 +22,9 @@ public class KeyDmMaterialServiceImpl {
private final String namespace = "com.scpyun.platform.standard.jilinsscgsdp.keyDmMaterial.";
@ApiOperation(value = "查询办公用品列表", desc = "分页查询办公用品")
public Page<Map<String, Object>> selectList(Map<String, Object> map) {
public Page<Map<String, Object>> selectList(Page<Map<String, Object>> map) {
if (map == null) {
map = new HashMap<>();
map = new Page<>();
}
return commonService.findPage(namespace + "selectList", map);
}
......@@ -36,6 +37,7 @@ public class KeyDmMaterialServiceImpl {
Object id = map.get("id");
if (id == null || String.valueOf(id).trim().isEmpty()) {
// 新增
map.put("id", UUIDUtil.getUUID());
if (commonService.insert(namespace + "insert", map) != 1) {
throw new CustomException("保存失败");
}
......
......@@ -4,6 +4,7 @@ import com.scpyun.base.bean.Page;
import com.scpyun.base.core.annotation.Api;
import com.scpyun.base.core.annotation.ApiOperation;
import com.scpyun.base.core.exception.CustomException;
import com.scpyun.base.core.utils.UUIDUtil;
import com.scpyun.base.db.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -22,10 +23,11 @@ public class KeyDmUserCategoryServiceImpl {
private final String namespace = "com.scpyun.platform.standard.jilinsscgsdp.keyDmUserCategory.";
@ApiOperation(value = "查询人员分类列表", desc = "分页查询人员分类")
public Page<Map<String, Object>> selectList(Map<String, Object> map) {
public Page<Map<String, Object>> selectList(Page<Map<String,Object>> map) {
if (map == null) {
map = new HashMap<>();
map = new Page<>();
}
return commonService.findPage(namespace + "selectList", map);
}
......@@ -37,6 +39,7 @@ public class KeyDmUserCategoryServiceImpl {
Object id = map.get("id");
if (id == null || String.valueOf(id).trim().isEmpty()) {
// 新增
map.put("id", UUIDUtil.getUUID());
if (commonService.insert(namespace + "insert", map) != 1) {
throw new CustomException("保存失败");
}
......
......@@ -60,7 +60,7 @@
create_time,
order_no
) VALUES (
UUID(),
#{id},
#{type_code},
#{type_name},
#{remark},
......
......@@ -35,6 +35,7 @@
<!-- 新增 -->
<insert id="insert" parameterType="map">
INSERT INTO jl_key_dm_material_category(
id,
category_Code,
category_Name,
parent_Id,
......@@ -47,6 +48,7 @@
create_time,
order_no
) VALUES (
#{id},
#{category_Code},
#{category_Name},
COALESCE(#{parent_Id}, 0),
......
......@@ -63,7 +63,7 @@
create_time,
order_no
) VALUES (
UUID(),
#{id},
#{category_id},
#{material_code},
#{material_name},
......
......@@ -35,7 +35,7 @@
create_time,
order_no
) VALUES (
UUID(),
#{#id},
#{catgory_name},
#{remark},
1,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论