Commit 799336e8 by wuchengwu

字典添加抽查单位

parent 4d7efc80
......@@ -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);
......
......@@ -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) {
......
......@@ -21,6 +21,12 @@ public interface IDicItemService {
boolean updateDict(SysDictitem entity);
/**
* 根据字典pid与code查询
* @return
*/
List<SysDictitem> queryDictByPid(String code,String pid);
/**
* 查询字典类别
* @return
*/
......
......@@ -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) {
......
......@@ -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
......
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