Commit 0d1c0616 by jiang'yun

首次提交

parent f0a48613
......@@ -46,6 +46,14 @@ public class TpDeptController extends BaseController
return getDataTable(list);
}
@GetMapping("/listjg")
public TableDataInfo listjg(TpDept tpDept)
{
startPage();
List<TpDept> list = tpDeptService.selectTpDeptListjg(tpDept);
return getDataTable(list);
}
/**
* 导出投票单位列表
*/
......
......@@ -53,6 +53,17 @@ public class TpInfoController extends BaseController
}
/**
* 查询投票信息列表
*/
// @PreAuthorize("@ss.hasPermi('system:tpInfo:listjg')")
@GetMapping("/listjg")
public TableDataInfo listjg(TpInfo tpInfo)
{
startPage();
List<TpInfo> list = tpInfoService.selectTpInfoListjg(tpInfo);
return getDataTable(list);
}
/**
* 导出投票信息列表
*/
@PreAuthorize("@ss.hasPermi('system:tpInfo:export')")
......
......@@ -6,14 +6,11 @@ import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class TzController {
private static final String VUEHOST = "http://192.168.31.190:1024";
private static final String VUEHOST = "http://10.61.1.241:8887";
@GetMapping("/getInfo")
public String login(String tk) {
tk="ebd1f17742e2db016d78cce88a6a78ac";
return "redirect:"+VUEHOST+"/tk?tk="+tk;
@GetMapping("/info")
public String getInfo(String tk) {
return "redirect:"+VUEHOST+"/info?tk="+tk;
}
}
package com.ruoyi.system.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
......@@ -11,6 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi
* @date 2024-10-11
*/
@Data
public class TpDept extends BaseEntity
{
private static final long serialVersionUID = 1L;
......@@ -46,6 +48,8 @@ public class TpDept extends BaseEntity
@Excel(name = "预留5")
private String yl5;
private int sl;
public void setId(Long id)
{
this.id = id;
......
......@@ -56,6 +56,8 @@ public class TpInfo extends BaseEntity
@Excel(name = "预留5")
private String yl5;
private String dwmc;
/** 投票信息从信息 */
private List<TpInfoCb> tpInfoCbList=new ArrayList<>();
private List<TpInfoCb> tpInfoCbListA;
......
......@@ -58,4 +58,7 @@ public interface TpDeptMapper
* @return 结果
*/
public int deleteTpDeptByIds(Long[] ids);
List<TpDept> selectTpDeptListjg(TpDept tpDept);
}
......@@ -88,4 +88,7 @@ public interface TpInfoMapper
TpInfo selectTpInfoByIp(String ip);
List<TpInfo> selectTpInfoListjg(TpInfo tpInfo);
}
......@@ -58,4 +58,8 @@ public interface ITpDeptService
* @return 结果
*/
public int deleteTpDeptById(Long id);
List<TpDept> selectTpDeptListjg(TpDept tpDept);
}
......@@ -61,4 +61,8 @@ public interface ITpInfoService
* @return 结果
*/
public int deleteTpInfoById(Long id);
List<TpInfo> selectTpInfoListjg(TpInfo tpInfo);
}
......@@ -90,4 +90,9 @@ public class TpDeptServiceImpl implements ITpDeptService
{
return tpDeptMapper.deleteTpDeptById(id);
}
@Override
public List<TpDept> selectTpDeptListjg(TpDept tpDept) {
return tpDeptMapper.selectTpDeptListjg(tpDept);
}
}
......@@ -169,6 +169,11 @@ public class TpInfoServiceImpl implements ITpInfoService
return tpInfoMapper.deleteTpInfoById(id);
}
@Override
public List<TpInfo> selectTpInfoListjg(TpInfo tpInfo) {
return tpInfoMapper.selectTpInfoListjg(tpInfo);
}
/**
* 新增投票信息从信息
*
......
......@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="yl3" column="yl3" />
<result property="yl4" column="yl4" />
<result property="yl5" column="yl5" />
<result property="sl" column="sl" />
</resultMap>
<sql id="selectTpDeptVo">
......@@ -37,6 +38,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTpDeptVo"/>
where id = #{id}
</select>
<select id="selectTpDeptListjg" resultMap="TpDeptResult">
select a.id, a.ssbk,a.dwmc,count(b.id) sl
from tp_dept a
left join tp_info_cb b on a.id = b.dwid
where 1=1
<if test="ssbk != null and ssbk != ''"> and a.ssbk = #{ssbk}</if>
<if test="dwmc != null and dwmc != ''"> and a.dwmc like concat('%', #{dwmc}, '%') </if>
group by a.id
</select>
<insert id="insertTpDept" parameterType="TpDept" useGeneratedKeys="true" keyProperty="id">
insert into tp_dept
......
......@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="yl3" column="yl3" />
<result property="yl4" column="yl4" />
<result property="yl5" column="yl5" />
<result property="dwmc" column="dwmc" />
</resultMap>
<resultMap id="TpInfoTpInfoCbResult" type="TpInfo" extends="TpInfoResult">
......@@ -67,6 +68,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from tp_info
where ipdz = #{ip}
</select>
<select id="selectTpInfoListjg" resultMap="TpInfoResult">
select a.name,a.ipdz,GROUP_CONCAT(b.dwmc) dwmc from tp_info a left join tp_info_cb b on a.id=b.zbid
where 1=1
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="ipdz != null and ipdz != ''"> and ipdz like concat('%', #{ipdz}, '%')</if>
group by a.id
</select>
<insert id="insertTpInfo" parameterType="TpInfo" useGeneratedKeys="true" keyProperty="id">
insert into tp_info
......
......@@ -115,7 +115,7 @@ public class SecurityConfig
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
.antMatchers("/system/tpInfo/*").permitAll()
.antMatchers("/system/tpInfo/*","/info").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated();
})
......
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