Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hnxtbaboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨亮
hnxtbaboot
Commits
799336e8
Commit
799336e8
authored
Jul 30, 2021
by
wuchengwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字典添加抽查单位
parent
4d7efc80
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
3 deletions
+53
-3
src/main/java/com/founder/dao/IDictitemDao.java
+3
-0
src/main/java/com/founder/module/redis/controller/DictController.java
+12
-0
src/main/java/com/founder/module/redis/service/IDicItemService.java
+6
-0
src/main/java/com/founder/module/redis/service/impl/IDicItemServiceImpl.java
+8
-0
src/main/resources/mapper/DictitemSqlMap.xml
+24
-3
No files found.
src/main/java/com/founder/dao/IDictitemDao.java
View file @
799336e8
...
...
@@ -17,6 +17,9 @@ import java.util.Map;
public
interface
IDictitemDao
{
List
<
SysDictitem
>
queryDictList
(
Map
map
);
List
<
SysDictitem
>
getDictByRybh
(
Map
<
String
,
Object
>
map
);
List
<
SysDictitem
>
queryDictByPid
(
Map
<
String
,
Object
>
map
);
int
queryDictPageCount
(
Map
map
);
boolean
deleteDict
(
String
dictId
);
boolean
insertDict
(
Map
map
);
...
...
src/main/java/com/founder/module/redis/controller/DictController.java
View file @
799336e8
...
...
@@ -98,6 +98,18 @@ public class DictController {
return
ZTreeNodeList
;
}
@RequestMapping
(
value
=
"/queryDictByPid"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
List
<
SysDictitem
>
queryDictByPid
(
String
code
,
HttpServletRequest
request
)
{
User
user
=
(
User
)
request
.
getSession
().
getAttribute
(
"User"
);
String
pid
=
user
.
getUnitcode
();
List
<
SysDictitem
>
dictitemList
=
new
ArrayList
<
SysDictitem
>();
dictitemList
=
dicItemService
.
queryDictByPid
(
code
,
pid
);
return
dictitemList
;
}
@RequestMapping
(
value
=
"/queryAjxzJsonActon"
,
method
=
RequestMethod
.
GET
,
produces
=
"text/html;charset=UTF-8"
)
@ResponseBody
public
String
queryAjxzJson
(
String
yycj
,
String
code_val
,
String
flag
)
{
...
...
src/main/java/com/founder/module/redis/service/IDicItemService.java
View file @
799336e8
...
...
@@ -21,6 +21,12 @@ public interface IDicItemService {
boolean
updateDict
(
SysDictitem
entity
);
/**
* 根据字典pid与code查询
* @return
*/
List
<
SysDictitem
>
queryDictByPid
(
String
code
,
String
pid
);
/**
* 查询字典类别
* @return
*/
...
...
src/main/java/com/founder/module/redis/service/impl/IDicItemServiceImpl.java
View file @
799336e8
...
...
@@ -201,6 +201,14 @@ public class IDicItemServiceImpl implements IDicItemService {
return
dicItemDao
.
updateDict
(
map
);
}
@Override
public
List
<
SysDictitem
>
queryDictByPid
(
String
code
,
String
pid
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"code"
,
code
);
map
.
put
(
"pid"
,
pid
);
List
<
SysDictitem
>
sysDictitems
=
dicItemDao
.
queryDictByPid
(
map
);
return
sysDictitems
;
}
public
List
<
ZTreeNode
>
getZtreeNode
(
String
code_type
,
String
id
,
String
yycj
,
String
unitcode
)
{
...
...
src/main/resources/mapper/DictitemSqlMap.xml
View file @
799336e8
...
...
@@ -44,10 +44,13 @@
<sql
id=
"queryWhere"
>
<if
test=
"entity.code != null and entity.code != ''"
>
AND CODE = #{entity.code , jdbcType=VARCHAR }
</if>
<if
test=
"entity.groupid != null and entity.groupid != ''"
>
AND GROUPID = #{entity.groupid , jdbcType=VARCHAR }
</if>
<if
test=
"entity.groupid != null and entity.groupid != ''"
>
AND GROUPID = #{entity.groupid , jdbcType=VARCHAR }
</if>
<if
test=
"entity.name != null and entity.name != ''"
>
AND NAME like #{entity.name , jdbcType=VARCHAR }||'%'
</if>
<if
test=
"entity.lrdwdm != null and entity.lrdwdm != ''"
>
AND LRDWDM = #{entity.lrdwdm , jdbcType=VARCHAR }
</if>
<if
test=
"entity.groupname != null and entity.groupname != ''"
>
AND GROUPNAME like #{entity.groupname , jdbcType=VARCHAR } ||'%'
</if>
<if
test=
"entity.groupname != null and entity.groupname != ''"
>
AND GROUPNAME like
#{entity.groupname , jdbcType=VARCHAR } ||'%'
</if>
<if
test=
"entity.lrsj != null"
>
AND LRSJ = #{entity.lrsj , jdbcType=TIMESTAMP }
</if>
</sql>
...
...
@@ -81,6 +84,22 @@
from SYS_DICTITEM where (SCBZ='0' or SCBZ is null) and ID = #{dictId , jdbcType=VARCHAR }
</select>
<select
id=
"queryDictByPid"
resultMap=
"BaseResultMap"
parameterType=
"map"
>
SELECT
code,
name,
groupid,
pid
FROM
SYS_DICTITEM
WHERE
groupid = #{code , jdbcType=VARCHAR }
AND scbz = '0'
<if
test=
"pid != null and pid != ''"
>
and pid = #{pid , jdbcType=VARCHAR }
</if>
</select>
<select
id=
"queryDictGroupId"
resultType=
"com.founder.model.ZTreeNode"
>
select GROUPID as ids,GROUPID as id, GROUPID as codeType,null as pid, GROUPNAME as name, GROUPNAME as text, count(1)
from SYS_DICTITEM
...
...
@@ -308,7 +327,9 @@
<if
test=
"entity.yycj5 != null and entity.yycj5 != ''"
>
YYCJ5 = #{entity.yycj5 , jdbcType=VARCHAR },
</if>
<if
test=
"entity.yycj6 != null and entity.yycj6 != ''"
>
YYCJ6 = #{entity.yycj6 , jdbcType=VARCHAR },
</if>
<if
test=
"entity.description != null and entity.description != ''"
>
DESCRIPTION = #{entity.description , jdbcType=VARCHAR },
</if>
<if
test=
"entity.description != null and entity.description != ''"
>
DESCRIPTION =
#{entity.description , jdbcType=VARCHAR },
</if>
<if
test=
"entity.description == null or entity.description == ''"
>
DESCRIPTION = null,
</if>
<if
test=
"entity.endcode != null and entity.endcode != ''"
>
ENDCODE = #{entity.endcode , jdbcType=VARCHAR },
</if>
<if
test=
"entity.startcode != null and entity.startcode != ''"
>
STARTCODE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment