Commit 877579f6 by jiang'yun

修改问题

parent 383f5927
......@@ -197,7 +197,7 @@ public class SjFybpController extends BaseController
*/
@GetMapping("/tjtbByfylx")
public AjaxResult tjtbByfylx(SjFybp sjFybp){
return sjFybpService.tjtbByfylx(sjFybp);
return AjaxResult.success(sjFybpService.tjtbByfylx(sjFybp));
}
/**
......@@ -209,7 +209,7 @@ public class SjFybpController extends BaseController
public TableDataInfo tjtbct(SjFybp sjFybp)
{
startPage();
List<SjFybp> list = sjFybpService.selectSjFybpList(sjFybp);
List<SjFybp> list = sjFybpService.selectSjFybpCtList(sjFybp);
return getDataTable(list);
}
......@@ -221,14 +221,14 @@ public class SjFybpController extends BaseController
@PostMapping("/exportTj")
public void exportTj(HttpServletResponse response, SjFybp sjFybp)
{
List<SjFybp> sjFybps = sjFybpService.tjtbByDept(sjFybp);
List<SjfybpVo> voList=new ArrayList<>();
sjFybps.forEach(item->{
SjfybpVo vo=new SjfybpVo();
BeanUtils.copyProperties(item,vo);
voList.add(vo);
});
ExcelUtil<SjfybpVo> util = new ExcelUtil<SjfybpVo>(SjfybpVo.class);
util.exportExcel(response, voList, "统计");
// List<SjFybp> sjFybps = sjFybpService.tjtbByDept(sjFybp);
// List<SjfybpVo> voList=new ArrayList<>();
// sjFybps.forEach(item->{
// SjfybpVo vo=new SjfybpVo();
// BeanUtils.copyProperties(item,vo);
// voList.add(vo);
// });
// ExcelUtil<SjfybpVo> util = new ExcelUtil<SjfybpVo>(SjfybpVo.class);
// util.exportExcel(response, voList, "统计");
}
}
......@@ -289,4 +289,27 @@ public class SjLhscController extends BaseController
List<SjLhscVo> list = sjLhscService.tjByEjJjwtSl(vo);
return getDataTable(list);
}
/**
* 例会共享
*/
@GetMapping("/listYtjLhgx")
public TableDataInfo listYtjLhgx(SjLhsc sjLhsc)
{
startPage();
sjLhsc.setZt("已提交");
List<SjLhsc> list = sjLhscService.selectSjLhscLhgxList(sjLhsc);
return getDataTable(list);
}
/**
* 例会共享
*/
@GetMapping("/getInfoLhgx/{id}")
public AjaxResult getInfoLhgx(@PathVariable("id") Long id)
{
return success(sjLhscService.selectSjLhscById(id));
}
}
......@@ -11,15 +11,21 @@ public class SjfybpVo {
@Excel(name = "单位")
private String deptName;
private String deptId;
private String fylx;
private String fylxmc;
//数量
@Excel(name = "数量")
private Integer sl;
private Integer zsl;
//批复金额总和
@Excel(name = "批复费用")
private BigDecimal pfjezh;
@Excel(name = "项目金额")
private BigDecimal xmje;
//已使用金额总和
@Excel(name = "使用费用")
private BigDecimal ysyjezh;
@Excel(name = "用费用")
private BigDecimal ysyje;
}
......@@ -3,6 +3,7 @@ package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjFybp;
import com.qianhe.domain.SjFybpWh;
import com.qianhe.domain.Vo.SjfybpVo;
/**
* 三基-费用报批Mapper接口
......@@ -85,9 +86,9 @@ public interface SjFybpMapper
*/
public int deleteSjFybpWhByFybpId(Long id);
List<SjFybp> tjtbByDept(SjFybp sjFybp);
List<SjfybpVo> tjtbByDept(SjFybp sjFybp);
List<SjFybp> tjtbByfylx(SjFybp sjFybp);
List<SjfybpVo> tjtbByfylx(SjFybp sjFybp);
List<SjFybp> selectSjFybpByZbId(Long zbid);
......@@ -97,4 +98,6 @@ public interface SjFybpMapper
SjFybp getFygzById(Long id);
List<SjFybp> selectSjFybpCtList(SjFybp sjFybp);
}
......@@ -95,4 +95,6 @@ public interface SjLhscMapper
List<SjLhscVo> tjByEjJjwtSl(SjLhscVo vo);
List<SjLhsc> selectSjLhscLhgxList(SjLhsc sjLhsc);
}
......@@ -4,6 +4,7 @@ import java.util.List;
import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.domain.SjFybp;
import com.qianhe.domain.Vo.SjfybpVo;
/**
* 三基-费用报批Service接口
......@@ -65,12 +66,15 @@ public interface ISjFybpService
int fywh(SjFybp sjFybp);
List<SjFybp> tjtbByDept(SjFybp sjFybp);
List<SjfybpVo> tjtbByDept(SjFybp sjFybp);
AjaxResult tjtbByfylx(SjFybp sjFybp);
List<SjfybpVo> tjtbByfylx(SjFybp sjFybp);
List<SjFybp> getFygz(SjFybp sjFybp);
SjFybp getFygzById(Long id);
List<SjFybp> selectSjFybpCtList(SjFybp sjFybp);
}
......@@ -65,4 +65,8 @@ public interface ISjLhscService
List<SjLhscVo> tjBysfsc(SjLhscVo vo);
List<SjLhscVo> tjByEjJjwtSl(SjLhscVo vo);
List<SjLhsc> selectSjLhscLhgxList(SjLhsc sjLhsc);
}
......@@ -8,10 +8,12 @@ import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.Vo.SjfybpVo;
import com.qianhe.domain.WdLxwh;
import com.qianhe.domain.WdWdxx;
import com.qianhe.mapper.SjFybpWhMapper;
import com.qianhe.mapper.WdWdxxMapper;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
......@@ -192,14 +194,27 @@ public class SjFybpServiceImpl implements ISjFybpService
}
@Override
@DataScope(deptAlias = "b")
public List<SjFybp> tjtbByDept(SjFybp sjFybp) {
@DataScope(deptAlias = "d")
public List<SjfybpVo> tjtbByDept(SjFybp sjFybp) {
return sjFybpMapper.tjtbByDept(sjFybp);
}
@Override
public AjaxResult tjtbByfylx(SjFybp sjFybp) {
return AjaxResult.success(sjFybpMapper.tjtbByfylx(sjFybp));
@DataScope(deptAlias = "d")
public List<SjfybpVo> tjtbByfylx(SjFybp sjFybp) {
List<SjfybpVo> voList = sjFybpMapper.tjtbByfylx(sjFybp);
//计算总数
SjfybpVo vo =new SjfybpVo();
vo.setFylxmc("总");
vo.setFylx("总");
int sum = voList.stream().mapToInt(SjfybpVo::getZsl).sum();
vo.setZsl(sum);
BigDecimal xmje = voList.stream().map(SjfybpVo::getXmje).reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setXmje(xmje);
BigDecimal yjyje = voList.stream().map(SjfybpVo::getYsyje).reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setYsyje(yjyje);
voList.add(0, vo);
return voList;
}
@Override
......@@ -219,6 +234,12 @@ public class SjFybpServiceImpl implements ISjFybpService
return sjFybp;
}
@Override
@DataScope(deptAlias = "d")
public List<SjFybp> selectSjFybpCtList(SjFybp sjFybp) {
return sjFybpMapper.selectSjFybpCtList(sjFybp);
}
/**
* 新增三基-费用维护信息
*
......
......@@ -190,6 +190,11 @@ public class SjLhscServiceImpl implements ISjLhscService
return sjLhscMapper.tjByEjJjwtSl(vo);
}
@Override
public List<SjLhsc> selectSjLhscLhgxList(SjLhsc sjLhsc) {
return sjLhscMapper.selectSjLhscLhgxList(sjLhsc);
}
/**
* 新增三基-例会上传-存在问题信息
*
......
......@@ -139,32 +139,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_dept d on a.dept_id=d.dept_id
where a.id = #{id}
</select>
<select id="tjtbByDept" resultMap="SjFybpResult">
select a.id,a.dept_id,b.dept_name,a.fylx,count(a.id) sl ,IFNULL(sum(a.pfje),0) pfjezh,IFNULL(SUM(a.ysyje),0) ysyjezh
from sj_fybp a
left join sys_dept b on a.dept_id=b.dept_id
where 1=1 and a.zt='已批复'
<if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},b.ancestors))</if>
<if test="startTime != null and startTime != ''"> and a.fyrq >=#{startTime}</if>
<if test="endTime != null and endTime != ''"> and a.fyrq &lt;= #{endTime}</if>
<if test="fylx != null and fylx != ''"> and a.fylx = #{fylx}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
group by a.dept_id
</select>
<select id="tjtbByfylx" resultMap="SjFybpResult">
select a.id,a.fylx,count(a.id) sl ,IFNULL(sum(a.pfje),0) pfjezh,IFNULL(SUM(a.ysyje),0) ysyjezh
from sj_fybp a
left join sys_dept b on a.dept_id=b.dept_id
where 1=1 and a.zt='已批复'
<if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},b.ancestors))</if>
<if test="startTime != null and startTime != ''"> and a.fyrq >=#{startTime}</if>
<if test="endTime != null and endTime != ''"> and a.fyrq &lt;= #{endTime}</if>
<if test="fylx != null and fylx != ''"> and a.fylx = #{fylx}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
group by a.fylx
</select>
<select id="selectSjFybpByZbId" resultMap="SjFybpResult">
select a.id, a.fymc, a.fyrq, a.dept_id,
a.fylx, a.fyms, a.fyje, a.fjid, a.zt,
......@@ -187,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fymc != null and fymc != ''"> and b.fymc like concat('%', #{fymc}, '%')</if>
<if test="fyrq != null and fyrq != ''"> and a.fyrq = #{fyrq}</if>
group by b.id
group by b.id order by a.sprq desc
</select>
<select id="getFygzById" resultMap="SjFybpResult">
select a.id zb_id,a.dept_id,d.dept_name,a.fyrq,a.fyje fyzje,b.id,b.fymc,b.fylx,b.fyje,b.fyms,IFNULL(sum(c.syje),0) ysyje from sj_fybp_zb a
......@@ -198,6 +174,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and b.id=#{id}
group by b.id
</select>
<select id="tjtbByfylx" resultType="com.qianhe.domain.Vo.SjfybpVo">
select
b.fylx,IFNULL(count(b.id),0) zsl,IFNULL(sum(b.fyje),0) xmje,IFNULL(sum(c.syje),0) ysyje,e.dict_label fylxmc
from sj_fybp_zb a
left join sj_fybp b on a.id = b.zb_id
left join sj_fybp_wh c on b.id = c.fybp_id
left join sys_dept d on a.dept_id=d.dept_id
left join sys_dict_data e on b.fylx=e.dict_value and e.dict_type='fy_lx'
where 1=1
<if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="fyrq != null and fyrq != ''"> and a.fyrq =#{fyrq}</if>
<if test="fylx != null and fylx != ''"> and b.fylx = #{fylx}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
group by b.fylx
</select>
<select id="tjtbByDept" resultType="com.qianhe.domain.Vo.SjfybpVo">
select
a.dept_id,d.dept_name,IFNULL(count(b.id),0) zsl,IFNULL(sum(b.fyje),0) xmje,IFNULL(sum(c.syje),0) ysyje
from sj_fybp_zb a
left join sj_fybp b on a.id = b.zb_id
left join sj_fybp_wh c on b.id = c.fybp_id
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
<if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="fyrq != null and fyrq != ''"> and a.fyrq =#{fyrq}</if>
<if test="fylx != null and fylx != ''"> and b.fylx = #{fylx}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
group by a.dept_id
</select>
<select id="selectSjFybpCtList" resultMap="SjFybpResult">
select
a.dept_id,b.id,b.zb_id,b.fymc,b.fylx,b.fyrq,b.fyje,b.fyms,d.dept_name,b.ysyje
from sj_fybp_zb a left join
sj_fybp b on a.id=b.zb_id
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
<if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="fyrq != null and fyrq != ''"> and a.fyrq =#{fyrq}</if>
<if test="fylx != null and fylx != ''"> and b.fylx = #{fylx}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<insert id="insertSjFybp" parameterType="SjFybp" useGeneratedKeys="true" keyProperty="id">
insert into sj_fybp
......
......@@ -117,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by a.create_time desc
</select>
<select id="selectSjFybpZbById" parameterType="Long" resultMap="SjFybpZbResult">
......
......@@ -86,6 +86,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope}
</where>
</select>
<select id="selectSjLhscLhgxList" parameterType="SjLhsc" resultMap="SjLhscResult">
<include refid="selectSjLhscVo"/>
<where>
<if test="hymc != null and hymc != ''"> and hymc like concat('%', #{hymc}, '%')</if>
<if test="hyrq != null and hyrq != ''"> and hyrq = #{hyrq}</if>
<if test="deptId != null and deptId != ''"> and a.dept_id = #{deptId}</if>
<if test="hydd != null and hydd != ''"> and hydd = #{hydd}</if>
<if test="chry != null and chry != ''"> and chry = #{chry}</if>
<if test="yxqk != null and yxqk != ''"> and yxqk = #{yxqk}</if>
<if test="jjwt != null and jjwt != ''"> and jjwt = #{jjwt}</if>
<if test="czwt != null and czwt != ''"> and czwt = #{czwt}</if>
<if test="tgjy != null and tgjy != ''"> and tgjy = #{tgjy}</if>
<if test="ldyq != null and ldyq != ''"> and ldyq = #{ldyq}</if>
<if test="zt != null and zt != ''"> and zt = #{zt}</if>
<if test="dwjb != null and dwjb != ''"> and a.dwjb = #{dwjb}</if>
<if test="tjr != null and tjr != ''"> and tjr = #{tjr}</if>
<if test="tjrq != null and tjrq != ''"> and tjrq = #{tjrq}</if>
<if test="yl1 != null and yl1 != ''"> and yl1 = #{yl1}</if>
<if test="yl2 != null and yl2 != ''"> and yl2 = #{yl2}</if>
<if test="yl3 != null and yl3 != ''"> and yl3 = #{yl3}</if>
<if test="yl4 != null and yl4 != ''"> and yl4 = #{yl4}</if>
<if test="yl5 != null and yl5 != ''"> and yl5 = #{yl5}</if>
<if test="nd != null and nd != ''"> and DATE_FORMAT(hyrq,'%Y')=#{nd}</if>
</where>
</select>
<select id="selectSjLhscById" parameterType="Long" resultMap="SjLhscResult">
select a.id, a.hymc, a.hyrq, a.dept_id, a.hydd, a.chry, a.yxqk, a.jjwt, a.czwt, a.tgjy, a.ldyq, a.zt, a.dwjb, a.tjr, a.tjrq, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5
......@@ -124,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<insert id="insertSjLhsc" parameterType="SjLhsc" useGeneratedKeys="true" keyProperty="id">
insert into sj_lhsc
<trim prefix="(" suffix=")" suffixOverrides=",">
......
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