Commit 751612ab by jiang'yun

修改问题

parent 03d515cf
...@@ -6,12 +6,14 @@ import java.util.stream.Collectors; ...@@ -6,12 +6,14 @@ import java.util.stream.Collectors;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.core.domain.entity.SysMenu; import com.qianhe.common.core.domain.entity.SysMenu;
import lombok.Data;
/** /**
* Treeselect树结构实体类 * Treeselect树结构实体类
* *
* @author qinahe * @author qinahe
*/ */
@Data
public class TreeSelect implements Serializable public class TreeSelect implements Serializable
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -21,6 +23,7 @@ public class TreeSelect implements Serializable ...@@ -21,6 +23,7 @@ public class TreeSelect implements Serializable
/** 节点名称 */ /** 节点名称 */
private String label; private String label;
private String dwjb;
/** 子节点 */ /** 子节点 */
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonInclude(JsonInclude.Include.NON_EMPTY)
...@@ -35,6 +38,7 @@ public class TreeSelect implements Serializable ...@@ -35,6 +38,7 @@ public class TreeSelect implements Serializable
{ {
this.id = dept.getDeptId(); this.id = dept.getDeptId();
this.label = dept.getDeptName(); this.label = dept.getDeptName();
this.dwjb = dept.getDwjb();
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
} }
......
...@@ -46,6 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -46,6 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND status = #{status} AND status = #{status}
</if> </if>
<if test="dwjb != null and dwjb != ''">
AND d.dwjb &lt;= #{dwjb}
</if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
order by d.parent_id, d.order_num order by d.parent_id, d.order_num
......
package com.qianhe.controller; package com.qianhe.controller;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.BaseEntity;
import com.qianhe.common.utils.bean.BeanUtils;
import com.qianhe.domain.Vo.SjfybpVo;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -104,7 +109,7 @@ public class SjFybpController extends BaseController ...@@ -104,7 +109,7 @@ public class SjFybpController extends BaseController
/** /**
* 提交或审批 * 提交
*/ */
// @PreAuthorize("@ss.hasPermi('system:sjFybp:tj')") // @PreAuthorize("@ss.hasPermi('system:sjFybp:tj')")
@Log(title = "三基-费用报批", businessType = BusinessType.UPDATE) @Log(title = "三基-费用报批", businessType = BusinessType.UPDATE)
...@@ -115,6 +120,18 @@ public class SjFybpController extends BaseController ...@@ -115,6 +120,18 @@ public class SjFybpController extends BaseController
} }
// @Log(title = "三基-费用报批", businessType = BusinessType.UPDATE)
/**
* 审批
* @param sjFybp
* @return
*/
@PostMapping("/sp")
public AjaxResult sp(@RequestBody SjFybp sjFybp)
{
return toAjax(sjFybpService.tj(sjFybp));
}
/** /**
* 查询三基-费用报批列表 * 查询三基-费用报批列表
...@@ -127,6 +144,16 @@ public class SjFybpController extends BaseController ...@@ -127,6 +144,16 @@ public class SjFybpController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询三基-费用报批列表
*/
@GetMapping("/zglist")
public TableDataInfo zglist(SjFybp sjFybp)
{
startPage();
List<SjFybp> list = sjFybpService.selectSjFybpList(sjFybp);
return getDataTable(list);
}
/** /**
* 费用维护 * 费用维护
...@@ -139,4 +166,58 @@ public class SjFybpController extends BaseController ...@@ -139,4 +166,58 @@ public class SjFybpController extends BaseController
return toAjax(sjFybpService.fywh(sjFybp)); return toAjax(sjFybpService.fywh(sjFybp));
} }
//tjtbByDept
/**
* 统计(根据单位)
* @param sjFybp
* @return
*/
@GetMapping("/tjtbByDept")
public AjaxResult tjtbByDept(SjFybp sjFybp){
return AjaxResult.success(sjFybpService.tjtbByDept(sjFybp));
}
/**
* 统计(根据费用类型)
* @param sjFybp
* @return
*/
@GetMapping("/tjtbByfylx")
public AjaxResult tjtbByfylx(SjFybp sjFybp){
return sjFybpService.tjtbByfylx(sjFybp);
}
/**
* 穿透
* @param sjFybp
* @return
*/
@GetMapping("/tjtbct")
public TableDataInfo tjtbct(SjFybp sjFybp)
{
startPage();
List<SjFybp> list = sjFybpService.selectSjFybpList(sjFybp);
return getDataTable(list);
}
/**
* 导出三基-费用报批列表
*/
// @PreAuthorize("@ss.hasPermi('system:sjFybp:export')")
@Log(title = "三基-费用报批", businessType = BusinessType.EXPORT)
@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, "统计");
}
} }
package com.qianhe.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.Vo.SjLhscVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.qianhe.common.annotation.Log;
import com.qianhe.common.core.controller.BaseController;
import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.enums.BusinessType;
import com.qianhe.domain.SjLhsc;
import com.qianhe.service.ISjLhscService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
/**
* 三基-例会上传Controller
*
* @author qianhe
* @date 2024-07-08
*/
@RestController
@RequestMapping("/system/sjLhsc")
public class SjLhscController extends BaseController
{
@Autowired
private ISjLhscService sjLhscService;
/**
* 查询三基-例会上传列表(二级单位)
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:list')")
@GetMapping("/list")
public TableDataInfo list(SjLhsc sjLhsc)
{
startPage();
List<SjLhsc> list = sjLhscService.selectSjLhscList(sjLhsc);
return getDataTable(list);
}
/**
* 查询三基-例会上传列表(三级单位)
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:listBySj')")
@GetMapping("/listBySj")
public TableDataInfo listBySj(SjLhsc sjLhsc)
{
startPage();
List<SjLhsc> list = sjLhscService.selectSjLhscList(sjLhsc);
return getDataTable(list);
}
/**
* 导出三基-例会上传列表
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:export')")
@Log(title = "三基-例会上传", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjLhsc sjLhsc)
{
List<SjLhsc> list = sjLhscService.selectSjLhscList(sjLhsc);
ExcelUtil<SjLhsc> util = new ExcelUtil<SjLhsc>(SjLhsc.class);
util.exportExcel(response, list, "三基-例会上传数据");
}
/**
* 获取三基-例会上传详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjLhscService.selectSjLhscById(id));
}
/**
* 新增三基-例会上传
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:add')")
@Log(title = "三基-例会上传", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjLhsc sjLhsc)
{
return toAjax(sjLhscService.insertSjLhsc(sjLhsc));
}
/**
* 修改三基-例会上传
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:edit')")
@Log(title = "三基-例会上传", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjLhsc sjLhsc)
{
return toAjax(sjLhscService.updateSjLhsc(sjLhsc));
}
/**
* 删除三基-例会上传
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:remove')")
@Log(title = "三基-例会上传", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjLhscService.deleteSjLhscByIds(ids));
}
/**
* 提交
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:tj')")
@Log(title = "三基-例会上传", businessType = BusinessType.UPDATE)
@PostMapping("/tj")
public AjaxResult tj(@RequestBody SjLhsc sjLhsc)
{
return toAjax(sjLhscService.tj(sjLhsc));
}
/**
* 查询三基-例会上传已提交列表
*/
@PreAuthorize("@ss.hasPermi('system:sjLhsc:listYtj')")
@GetMapping("/listYtj")
public TableDataInfo listYtj(SjLhsc sjLhsc)
{
startPage();
sjLhsc.setZt("已提交");
List<SjLhsc> list = sjLhscService.selectSjLhscList(sjLhsc);
return getDataTable(list);
}
/**
* 统计是否上传(三级)
* @return
*/
@GetMapping("/tjBysfsc")
public TableDataInfo tjBysfsc(SjLhscVo vo)
{
vo.setDwjb("4");
String nd="";
if(StringUtils.isNotEmpty(vo.getNd())){
nd=vo.getNd();
}
String startJd="";
String endJd="";
if(StringUtils.isNotEmpty(vo.getJb())){
String jd=vo.getJb();
if("1".equals(jd)){
startJd=nd+"-01";
endJd=nd+"-03";
}else if("2".equals(jd)){
startJd=nd+"-04";
endJd=nd+"-06";
}if("3".equals(jd)){
startJd=nd+"-07";
endJd=nd+"-09";
}if("4".equals(jd)){
startJd=nd+"-10";
endJd=nd+"-12";
}
}
vo.setStartJd(startJd);
vo.setEndJd(endJd);
List<SjLhscVo> list = sjLhscService.tjBysfsc(vo);
return getDataTable(list);
}
/**
* 统计是否上传(二级)
* @return
*/
@GetMapping("/tjByEjSfsc")
public TableDataInfo tjByEjSfsc(SjLhscVo vo)
{
vo.setDwjb("3");
String nd="";
if(StringUtils.isNotEmpty(vo.getNd())){
nd=vo.getNd();
}
String startJd="";
String endJd="";
if(StringUtils.isNotEmpty(vo.getJb())){
String jd=vo.getJb();
if("1".equals(jd)){
startJd=nd+"-01";
endJd=nd+"-03";
}else if("2".equals(jd)){
startJd=nd+"-04";
endJd=nd+"-06";
}if("3".equals(jd)){
startJd=nd+"-07";
endJd=nd+"-09";
}if("4".equals(jd)){
startJd=nd+"-10";
endJd=nd+"-12";
}
}
vo.setStartJd(startJd);
vo.setEndJd(endJd);
List<SjLhscVo> list = sjLhscService.tjBysfsc(vo);
return getDataTable(list);
}
}
...@@ -55,10 +55,13 @@ public class SjFybp extends BaseEntity ...@@ -55,10 +55,13 @@ public class SjFybp extends BaseEntity
/** 状态(未提交、待审批、已审批、已驳回) */ /** 状态(未提交、待审批、已审批、已驳回) */
@Excel(name = "状态(未提交、待审批、已审批、已驳回)") @Excel(name = "状态(未提交、待审批、已审批、已驳回)")
private String zt; private String zt;
private String spzt;
/** 提交人 */ /** 提交人 */
@Excel(name = "提交人") @Excel(name = "提交人")
private String tjr; private String tjr;
@Excel(name = "提交日期")
private String tjrq;
/** 审批日期 */ /** 审批日期 */
@Excel(name = "审批日期") @Excel(name = "审批日期")
...@@ -68,6 +71,8 @@ public class SjFybp extends BaseEntity ...@@ -68,6 +71,8 @@ public class SjFybp extends BaseEntity
@Excel(name = "审批人") @Excel(name = "审批人")
private String spr; private String spr;
private String sprName;
/** 批复金额 */ /** 批复金额 */
@Excel(name = "批复金额") @Excel(name = "批复金额")
private BigDecimal pfje; private BigDecimal pfje;
...@@ -102,8 +107,24 @@ public class SjFybp extends BaseEntity ...@@ -102,8 +107,24 @@ public class SjFybp extends BaseEntity
//费用审批查询 (传1 查不等于未提交的数据,2查等于已批复的数据) //费用审批查询 (传1 查不等于未提交的数据,2查等于已批复的数据)
private String spcx; private String spcx;
private String deptName;
private String startTime;
private String endTime;
//数量
private Integer sl;
//批复金额总和
private BigDecimal pfjezh;
//已使用金额总和
private BigDecimal ysyjezh;
/** 三基-费用维护信息 */ /** 三基-费用维护信息 */
private List<SjFybpWh> sjFybpWhList; private List<SjFybpWh> sjFybpWhList;
private List<WdWdxx> fileList; private List<WdWdxx> fileList;
} }
package com.qianhe.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qianhe.common.annotation.Excel;
import com.qianhe.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
/**
* 三基-例会上传对象 sj_lhsc
*
* @author qianhe
* @date 2024-07-08
*/
@Data
public class SjLhsc extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 会议名称 */
@Excel(name = "会议名称")
private String hymc;
/** 会议日期 */
@Excel(name = "会议日期")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date hyrq;
/** 单位 */
@Excel(name = "单位")
private String deptId;
/** 会议地点 */
@Excel(name = "会议地点")
private String hydd;
/** 参会人员 */
@Excel(name = "参会人员")
private String chry;
/** 运行情况 */
@Excel(name = "运行情况")
private String yxqk;
/** 解决问题 */
@Excel(name = "解决问题")
private String jjwt;
/** 存在问题 */
@Excel(name = "存在问题")
private String czwt;
/** 推广经验 */
@Excel(name = "推广经验")
private String tgjy;
/** 领导要求 */
@Excel(name = "领导要求")
private String ldyq;
/** 状态(已提交、未提交) */
@Excel(name = "状态", readConverterExp = "已=提交、未提交")
private String zt;
/** 单位级别( 3、4级) */
@Excel(name = "单位级别", readConverterExp = "3=、4级")
private String dwjb;
/** 提交人 */
@Excel(name = "提交人")
private String tjr;
/** 提交日期 */
@Excel(name = "提交日期")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date tjrq;
/** 预留1 */
@Excel(name = "预留1")
private String yl1;
/** 预留2 */
@Excel(name = "预留2")
private String yl2;
/** 预留3 */
@Excel(name = "预留3")
private String yl3;
/** 预留4 */
@Excel(name = "预留4")
private String yl4;
/** 预留5 */
@Excel(name = "预留5")
private String yl5;
/** 三基-例会上传-存在问题信息 */
private List<SjLhscWt> sjLhscWtList;
private List<String> wtList;
private String nd;
private List<WdWdxx> fileList;
private String deptName;
}
package com.qianhe.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qianhe.common.annotation.Excel;
import com.qianhe.common.core.domain.BaseEntity;
/**
* 三基-例会上传-存在问题对象 sj_lhsc_wt
*
* @author qianhe
* @date 2024-07-08
*/
public class SjLhscWt extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 例会上传id */
@Excel(name = "例会上传id")
private Long lhscId;
/** 问题 */
@Excel(name = "问题")
private String wt;
/** 预留1 */
@Excel(name = "预留1")
private String yl1;
/** 预留2 */
@Excel(name = "预留2")
private String yl2;
/** 预留3 */
@Excel(name = "预留3")
private String yl3;
/** 预留4 */
@Excel(name = "预留4")
private String yl4;
/** 预留5 */
@Excel(name = "预留5")
private String yl5;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setLhscId(Long lhscId)
{
this.lhscId = lhscId;
}
public Long getLhscId()
{
return lhscId;
}
public void setWt(String wt)
{
this.wt = wt;
}
public String getWt()
{
return wt;
}
public void setYl1(String yl1)
{
this.yl1 = yl1;
}
public String getYl1()
{
return yl1;
}
public void setYl2(String yl2)
{
this.yl2 = yl2;
}
public String getYl2()
{
return yl2;
}
public void setYl3(String yl3)
{
this.yl3 = yl3;
}
public String getYl3()
{
return yl3;
}
public void setYl4(String yl4)
{
this.yl4 = yl4;
}
public String getYl4()
{
return yl4;
}
public void setYl5(String yl5)
{
this.yl5 = yl5;
}
public String getYl5()
{
return yl5;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("lhscId", getLhscId())
.append("wt", getWt())
.append("remark", getRemark())
.append("yl1", getYl1())
.append("yl2", getYl2())
.append("yl3", getYl3())
.append("yl4", getYl4())
.append("yl5", getYl5())
.toString();
}
}
package com.qianhe.domain.Vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qianhe.common.annotation.Excel;
import com.qianhe.common.core.domain.BaseEntity;
import com.qianhe.domain.SjLhscWt;
import com.qianhe.domain.WdWdxx;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
/**
* 三基-例会上传对象 sj_lhsc
*
* @author qianhe
* @date 2024-07-08
*/
@Data
public class SjLhscVo extends BaseEntity
{
/** 单位 */
private String deptId;
private String deptName;
private String dwjb;
private String nd;
private String startJd;
private String endJd;
/**
* 季度
*/
private String jb;
/** 状态(已提交、未提交) */
private String zt;
}
package com.qianhe.domain.Vo;
import com.qianhe.common.annotation.Excel;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class SjfybpVo {
@Excel(name = "单位")
private String deptName;
//数量
@Excel(name = "数量")
private Integer sl;
//批复金额总和
@Excel(name = "批复费用")
private BigDecimal pfjezh;
//已使用金额总和
@Excel(name = "使用费用")
private BigDecimal ysyjezh;
}
...@@ -84,4 +84,8 @@ public interface SjFybpMapper ...@@ -84,4 +84,8 @@ public interface SjFybpMapper
* @return 结果 * @return 结果
*/ */
public int deleteSjFybpWhByFybpId(Long id); public int deleteSjFybpWhByFybpId(Long id);
List<SjFybp> tjtbByDept(SjFybp sjFybp);
List<SjFybp> tjtbByfylx(SjFybp sjFybp);
} }
package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjLhsc;
import com.qianhe.domain.SjLhscWt;
import com.qianhe.domain.Vo.SjLhscVo;
import org.apache.ibatis.annotations.Param;
/**
* 三基-例会上传Mapper接口
*
* @author qianhe
* @date 2024-07-08
*/
public interface SjLhscMapper
{
/**
* 查询三基-例会上传
*
* @param id 三基-例会上传主键
* @return 三基-例会上传
*/
public SjLhsc selectSjLhscById(Long id);
/**
* 查询三基-例会上传列表
*
* @param sjLhsc 三基-例会上传
* @return 三基-例会上传集合
*/
public List<SjLhsc> selectSjLhscList(SjLhsc sjLhsc);
/**
* 新增三基-例会上传
*
* @param sjLhsc 三基-例会上传
* @return 结果
*/
public int insertSjLhsc(SjLhsc sjLhsc);
/**
* 修改三基-例会上传
*
* @param sjLhsc 三基-例会上传
* @return 结果
*/
public int updateSjLhsc(SjLhsc sjLhsc);
/**
* 删除三基-例会上传
*
* @param id 三基-例会上传主键
* @return 结果
*/
public int deleteSjLhscById(Long id);
/**
* 批量删除三基-例会上传
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjLhscByIds(Long[] ids);
/**
* 批量删除三基-例会上传-存在问题
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjLhscWtByLhscIds(Long[] ids);
/**
* 批量新增三基-例会上传-存在问题
*
* @param sjLhscWtList 三基-例会上传-存在问题列表
* @return 结果
*/
public int batchSjLhscWt(List<SjLhscWt> sjLhscWtList);
/**
* 通过三基-例会上传主键删除三基-例会上传-存在问题信息
*
* @param id 三基-例会上传ID
* @return 结果
*/
public int deleteSjLhscWtByLhscId(Long id);
List<SjLhscWt> selectSjLhscWtListById(Long id);
List<SjLhscVo> tjBysfsc(SjLhscVo vo);
}
package com.qianhe.service; package com.qianhe.service;
import java.util.List; import java.util.List;
import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.domain.SjFybp; import com.qianhe.domain.SjFybp;
/** /**
...@@ -63,4 +65,8 @@ public interface ISjFybpService ...@@ -63,4 +65,8 @@ public interface ISjFybpService
int fywh(SjFybp sjFybp); int fywh(SjFybp sjFybp);
List<SjFybp> tjtbByDept(SjFybp sjFybp);
AjaxResult tjtbByfylx(SjFybp sjFybp);
} }
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjLhsc;
import com.qianhe.domain.Vo.SjLhscVo;
/**
* 三基-例会上传Service接口
*
* @author qianhe
* @date 2024-07-08
*/
public interface ISjLhscService
{
/**
* 查询三基-例会上传
*
* @param id 三基-例会上传主键
* @return 三基-例会上传
*/
public SjLhsc selectSjLhscById(Long id);
/**
* 查询三基-例会上传列表
*
* @param sjLhsc 三基-例会上传
* @return 三基-例会上传集合
*/
public List<SjLhsc> selectSjLhscList(SjLhsc sjLhsc);
/**
* 新增三基-例会上传
*
* @param sjLhsc 三基-例会上传
* @return 结果
*/
public int insertSjLhsc(SjLhsc sjLhsc);
/**
* 修改三基-例会上传
*
* @param sjLhsc 三基-例会上传
* @return 结果
*/
public int updateSjLhsc(SjLhsc sjLhsc);
/**
* 批量删除三基-例会上传
*
* @param ids 需要删除的三基-例会上传主键集合
* @return 结果
*/
public int deleteSjLhscByIds(Long[] ids);
/**
* 删除三基-例会上传信息
*
* @param id 三基-例会上传主键
* @return 结果
*/
public int deleteSjLhscById(Long id);
int tj(SjLhsc sjLhsc);
List<SjLhscVo> tjBysfsc(SjLhscVo vo);
}
package com.qianhe.service.impl; package com.qianhe.service.impl;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import com.qianhe.common.annotation.DataScope; import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.common.core.domain.entity.SysDept; import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.utils.DateUtils; import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils; import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.WdLxwh; import com.qianhe.domain.WdLxwh;
import com.qianhe.domain.WdWdxx;
import com.qianhe.mapper.SjFybpWhMapper; import com.qianhe.mapper.SjFybpWhMapper;
import com.qianhe.mapper.WdWdxxMapper; import com.qianhe.mapper.WdWdxxMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.stream.Collectors;
import com.qianhe.common.utils.StringUtils; import com.qianhe.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.qianhe.domain.SjFybpWh; import com.qianhe.domain.SjFybpWh;
...@@ -50,6 +55,13 @@ public class SjFybpServiceImpl implements ISjFybpService ...@@ -50,6 +55,13 @@ public class SjFybpServiceImpl implements ISjFybpService
SjFybpWh sjFybpWh=new SjFybpWh(); SjFybpWh sjFybpWh=new SjFybpWh();
List<SjFybpWh> sjFybpWhs = sjFybpWhMapper.selectSjFybpWhList(sjFybpWh); List<SjFybpWh> sjFybpWhs = sjFybpWhMapper.selectSjFybpWhList(sjFybpWh);
sjFybp.setSjFybpWhList(sjFybpWhs); sjFybp.setSjFybpWhList(sjFybpWhs);
//查询文档
WdWdxx wdWdxx=new WdWdxx();
wdWdxx.setGlId(sjFybp.getId().toString());
wdWdxx.setMkmc("费用报批");
wdWdxx.setFjlx("费用上报");
List<WdWdxx> wdWdxxes = wdWdxxMapper.selectWdWdxxList(wdWdxx);
sjFybp.setFileList(wdWdxxes);
return sjFybp; return sjFybp;
} }
...@@ -80,16 +92,19 @@ public class SjFybpServiceImpl implements ISjFybpService ...@@ -80,16 +92,19 @@ public class SjFybpServiceImpl implements ISjFybpService
sjFybp.setCreateBy(SecurityUtils.getUsername()); sjFybp.setCreateBy(SecurityUtils.getUsername());
int rows = sjFybpMapper.insertSjFybp(sjFybp); int rows = sjFybpMapper.insertSjFybp(sjFybp);
//保存文件 //保存文件
if(sjFybp.getFileList().size()>0){ if(StringUtils.isNotEmpty(sjFybp.getFileList())){
sjFybp.getFileList().forEach(file->{ if(sjFybp.getFileList().size()>0){
file.setGlId(sjFybp.getId().toString()); sjFybp.getFileList().forEach(file->{
file.setMkmc("费用报批"); file.setGlId(sjFybp.getId().toString());
file.setFjlx("费用上报"); file.setMkmc("费用报批");
file.setLrr(SecurityUtils.getUsername()); file.setFjlx("费用上报");
wdWdxxMapper.insertWdWdxx(file); file.setLrr(SecurityUtils.getUsername());
}); wdWdxxMapper.insertWdWdxx(file);
});
}
} }
return rows; return rows;
} }
...@@ -106,14 +121,16 @@ public class SjFybpServiceImpl implements ISjFybpService ...@@ -106,14 +121,16 @@ public class SjFybpServiceImpl implements ISjFybpService
//先删除文件 //先删除文件
wdWdxxMapper.deleteWdWdxxByGlIdAndMkmc(sjFybp.getId()+"","费用报批"); wdWdxxMapper.deleteWdWdxxByGlIdAndMkmc(sjFybp.getId()+"","费用报批");
//保存文件 //保存文件
if(sjFybp.getFileList().size()>0){ if(StringUtils.isNotEmpty(sjFybp.getFileList())){
sjFybp.getFileList().forEach(file->{ if(sjFybp.getFileList().size()>0){
file.setGlId(sjFybp.getId().toString()); sjFybp.getFileList().forEach(file->{
file.setMkmc("费用报批"); file.setGlId(sjFybp.getId().toString());
file.setFjlx("费用上报"); file.setMkmc("费用报批");
file.setLrr(SecurityUtils.getUsername()); file.setFjlx("费用上报");
wdWdxxMapper.insertWdWdxx(file); file.setLrr(SecurityUtils.getUsername());
}); wdWdxxMapper.insertWdWdxx(file);
});
}
} }
sjFybp.setUpdateTime(DateUtils.getNowDate()); sjFybp.setUpdateTime(DateUtils.getNowDate());
sjFybp.setUpdateBy(SecurityUtils.getUsername()); sjFybp.setUpdateBy(SecurityUtils.getUsername());
...@@ -150,16 +167,40 @@ public class SjFybpServiceImpl implements ISjFybpService ...@@ -150,16 +167,40 @@ public class SjFybpServiceImpl implements ISjFybpService
@Override @Override
public int tj(SjFybp sjFybp) { public int tj(SjFybp sjFybp) {
if("待审批".equals(sjFybp.getZt())){
sjFybp.setTjr(SecurityUtils.getUsername());
sjFybp.setTjrq(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
}else if("已批复".equals(sjFybp.getZt()) || "已驳回" .equals(sjFybp.getZt())) {
sjFybp.setSpr(SecurityUtils.getUsername());
sjFybp.setSprq(DateUtils.dateTimeNow("yyyy-MM-dd HH:mm:ss"));
}
return sjFybpMapper.updateSjFybp(sjFybp); return sjFybpMapper.updateSjFybp(sjFybp);
} }
@Override @Override
public int fywh(SjFybp sjFybp) { public int fywh(SjFybp sjFybp) {
sjFybpMapper.deleteSjFybpWhByFybpId(sjFybp.getId()); sjFybpMapper.deleteSjFybpWhByFybpId(sjFybp.getId());
if(StringUtils.isNotEmpty(sjFybp.getSjFybpWhList())){
//统计已结算金额
BigDecimal reduce = sjFybp.getSjFybpWhList().stream().map(SjFybpWh::getSyje).reduce(BigDecimal.ZERO, BigDecimal::add);
sjFybp.setYsyje(reduce);
sjFybpMapper.updateSjFybp(sjFybp);
}
insertSjFybpWh(sjFybp); insertSjFybpWh(sjFybp);
return 1; return 1;
} }
@Override
@DataScope(deptAlias = "b")
public List<SjFybp> tjtbByDept(SjFybp sjFybp) {
return sjFybpMapper.tjtbByDept(sjFybp);
}
@Override
public AjaxResult tjtbByfylx(SjFybp sjFybp) {
return AjaxResult.success(sjFybpMapper.tjtbByfylx(sjFybp));
}
/** /**
* 新增三基-费用维护信息 * 新增三基-费用维护信息
* *
......
package com.qianhe.service.impl;
import java.util.Arrays;
import java.util.List;
import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.domain.Vo.SjLhscVo;
import com.qianhe.domain.WdWdxx;
import com.qianhe.mapper.WdWdxxMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import com.qianhe.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import com.qianhe.domain.SjLhscWt;
import com.qianhe.mapper.SjLhscMapper;
import com.qianhe.domain.SjLhsc;
import com.qianhe.service.ISjLhscService;
/**
* 三基-例会上传Service业务层处理
*
* @author qianhe
* @date 2024-07-08
*/
@Service
public class SjLhscServiceImpl implements ISjLhscService
{
@Autowired
private SjLhscMapper sjLhscMapper;
@Autowired
private WdWdxxMapper wdWdxxMapper;
/**
* 查询三基-例会上传
*
* @param id 三基-例会上传主键
* @return 三基-例会上传
*/
@Override
public SjLhsc selectSjLhscById(Long id)
{
SjLhsc sjLhsc = sjLhscMapper.selectSjLhscById(id);
List<SjLhscWt> sjLhscWts = sjLhscMapper.selectSjLhscWtListById(id);
sjLhsc.setSjLhscWtList(sjLhscWts);
//查询文档
WdWdxx wdWdxx=new WdWdxx();
wdWdxx.setGlId(sjLhsc.getId().toString());
wdWdxx.setMkmc("例会上传");
wdWdxx.setFjlx("例会上传");
List<WdWdxx> wdWdxxes = wdWdxxMapper.selectWdWdxxList(wdWdxx);
sjLhsc.setFileList(wdWdxxes);
return sjLhsc;
}
/**
* 查询三基-例会上传列表
*
* @param sjLhsc 三基-例会上传
* @return 三基-例会上传
*/
@Override
@DataScope(deptAlias = "d")
public List<SjLhsc> selectSjLhscList(SjLhsc sjLhsc)
{
return sjLhscMapper.selectSjLhscList(sjLhsc);
}
/**
* 新增三基-例会上传
*
* @param sjLhsc 三基-例会上传
* @return 结果
*/
@Transactional
@Override
public int insertSjLhsc(SjLhsc sjLhsc)
{
sjLhsc.setCreateTime(DateUtils.getNowDate());
sjLhsc.setCreateBy(SecurityUtils.getUsername());
int rows = sjLhscMapper.insertSjLhsc(sjLhsc);
if(StringUtils.isNotEmpty(sjLhsc.getCzwt())){
String[] split = sjLhsc.getCzwt().split("/(?<=\\d)(?=[.:,、\\s])/");
sjLhsc.setWtList(Arrays.asList(split));
}
insertSjLhscWtString(sjLhsc);
// insertSjLhscWt(sjLhsc);
//保存文件
if(StringUtils.isNotEmpty(sjLhsc.getFileList())){
if(sjLhsc.getFileList().size()>0){
sjLhsc.getFileList().forEach(file->{
file.setGlId(sjLhsc.getId().toString());
file.setMkmc("例会上传");
file.setFjlx("例会上传");
file.setLrr(SecurityUtils.getUsername());
wdWdxxMapper.insertWdWdxx(file);
});
}
}
return rows;
}
/**
* 修改三基-例会上传
*
* @param sjLhsc 三基-例会上传
* @return 结果
*/
@Transactional
@Override
public int updateSjLhsc(SjLhsc sjLhsc)
{
//先删除文件
wdWdxxMapper.deleteWdWdxxByGlIdAndMkmc(sjLhsc.getId()+"","费用报批");
//保存文件
if(StringUtils.isNotEmpty(sjLhsc.getFileList())){
if(sjLhsc.getFileList().size()>0){
sjLhsc.getFileList().forEach(file->{
file.setGlId(sjLhsc.getId().toString());
file.setMkmc("例会上传");
file.setFjlx("例会上传");
file.setLrr(SecurityUtils.getUsername());
wdWdxxMapper.insertWdWdxx(file);
});
}
}
sjLhsc.setUpdateTime(DateUtils.getNowDate());
sjLhsc.setUpdateBy(SecurityUtils.getUsername());
sjLhscMapper.deleteSjLhscWtByLhscId(sjLhsc.getId());
// insertSjLhscWt(sjLhsc);
if(StringUtils.isNotEmpty(sjLhsc.getCzwt())){
String[] split = sjLhsc.getCzwt().split("/(?<=\\d)(?=[.:,、\\s])/");
sjLhsc.setWtList(Arrays.asList(split));
}
insertSjLhscWtString(sjLhsc);
return sjLhscMapper.updateSjLhsc(sjLhsc);
}
/**
* 批量删除三基-例会上传
*
* @param ids 需要删除的三基-例会上传主键
* @return 结果
*/
@Transactional
@Override
public int deleteSjLhscByIds(Long[] ids)
{
sjLhscMapper.deleteSjLhscWtByLhscIds(ids);
return sjLhscMapper.deleteSjLhscByIds(ids);
}
/**
* 删除三基-例会上传信息
*
* @param id 三基-例会上传主键
* @return 结果
*/
@Transactional
@Override
public int deleteSjLhscById(Long id)
{
sjLhscMapper.deleteSjLhscWtByLhscId(id);
return sjLhscMapper.deleteSjLhscById(id);
}
@Override
public int tj(SjLhsc sjLhsc) {
return sjLhscMapper.updateSjLhsc(sjLhsc);
}
@Override
@DataScope(deptAlias = "d")
public List<SjLhscVo> tjBysfsc(SjLhscVo vo) {
return sjLhscMapper.tjBysfsc(vo);
}
/**
* 新增三基-例会上传-存在问题信息
*
* @param sjLhsc 三基-例会上传对象
*/
public void insertSjLhscWt(SjLhsc sjLhsc)
{
List<SjLhscWt> sjLhscWtList = sjLhsc.getSjLhscWtList();
Long id = sjLhsc.getId();
if (StringUtils.isNotNull(sjLhscWtList))
{
List<SjLhscWt> list = new ArrayList<SjLhscWt>();
for (SjLhscWt sjLhscWt : sjLhscWtList)
{
sjLhscWt.setLhscId(id);
list.add(sjLhscWt);
}
if (list.size() > 0)
{
sjLhscMapper.batchSjLhscWt(list);
}
}
}
public void insertSjLhscWtString(SjLhsc sjLhsc)
{
List<String> sjLhscWtList = sjLhsc.getWtList();
Long id = sjLhsc.getId();
if (StringUtils.isNotNull(sjLhscWtList))
{
List<SjLhscWt> list = new ArrayList<SjLhscWt>();
for (String wt : sjLhscWtList)
{
SjLhscWt sjLhscWt=new SjLhscWt();
sjLhscWt.setLhscId(id);
sjLhscWt.setWt(wt);
list.add(sjLhscWt);
}
if (list.size() > 0)
{
sjLhscMapper.batchSjLhscWt(list);
}
}
}
}
...@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fjid" column="fjid" /> <result property="fjid" column="fjid" />
<result property="zt" column="zt" /> <result property="zt" column="zt" />
<result property="tjr" column="tjr" /> <result property="tjr" column="tjr" />
<result property="tjrq" column="tjrq" />
<result property="sprq" column="sprq" /> <result property="sprq" column="sprq" />
<result property="spr" column="spr" /> <result property="spr" column="spr" />
<result property="pfje" column="pfje" /> <result property="pfje" column="pfje" />
...@@ -30,6 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -30,6 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="yl3" column="yl3" /> <result property="yl3" column="yl3" />
<result property="yl4" column="yl4" /> <result property="yl4" column="yl4" />
<result property="yl5" column="yl5" /> <result property="yl5" column="yl5" />
<result property="deptName" column="dept_name" />
<result property="sl" column="sl" />
<result property="pfjezh" column="pfjezh" />
<result property="ysyjezh" column="ysyjezh" />
<result property="sprName" column="spr_name" />
<result property="spzt" column="spzt" />
</resultMap> </resultMap>
<resultMap id="SjFybpSjFybpWhResult" type="SjFybp" extends="SjFybpResult"> <resultMap id="SjFybpSjFybpWhResult" type="SjFybp" extends="SjFybpResult">
...@@ -60,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -60,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
fjid, fjid,
zt, zt,
tjr, tjr,
tjrq,
sprq, sprq,
spr, spr,
pfje, pfje,
...@@ -69,27 +78,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -69,27 +78,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.create_time, a.create_time,
a.update_by, a.update_by,
a.update_time, a.update_time,
remark, a.remark,
yl1, yl1,
yl2, yl2,
yl3, yl3,
yl4, yl4,
yl5 yl5,
d.dept_name,
u.user_name spr_name
from sj_fybp a from sj_fybp a
left join sys_dept d on a.dept_id=d.dept_id </sql> left join sys_dept d on a.dept_id=d.dept_id
left join sys_user u on a.spr=u.user_name
</sql>
<select id="selectSjFybpList" parameterType="SjFybp" resultMap="SjFybpResult"> <select id="selectSjFybpList" parameterType="SjFybp" resultMap="SjFybpResult">
<include refid="selectSjFybpVo"/> <include refid="selectSjFybpVo"/>
<where> <where>
<if test="fymc != null and fymc != ''"> and fymc = #{fymc}</if> <if test="fymc != null and fymc != ''"> and fymc like concat('%', #{fymc}, '%')</if>
<if test="fyrq != null and fyrq != ''"> and fyrq = #{fyrq}</if> <if test="fyrq != null and fyrq != ''"> and fyrq = #{fyrq}</if>
<if test="deptId != null and deptId != ''"> and (dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if> <if test="deptId != null and deptId != ''"> and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="fylx != null and fylx != ''"> and fylx = #{fylx}</if> <if test="fylx != null and fylx != ''"> and fylx = #{fylx}</if>
<if test="fyms != null and fyms != ''"> and fyms = #{fyms}</if> <if test="fyms != null and fyms != ''"> and fyms = #{fyms}</if>
<if test="fyje != null "> and fyje = #{fyje}</if> <if test="fyje != null "> and fyje = #{fyje}</if>
<if test="fjid != null and fjid != ''"> and fjid = #{fjid}</if> <if test="fjid != null and fjid != ''"> and fjid = #{fjid}</if>
<if test="zt != null and zt != ''"> and zt = #{zt}</if> <if test="zt != null and zt != ''"> and zt = #{zt}</if>
<if test="tjr != null and tjr != ''"> and tjr = #{tjr}</if> <if test="tjr != null and tjr != ''"> and tjr = #{tjr}</if>
<if test="tjrq != null and tjrq != ''"> and tjrq = #{tjrq}</if>
<if test="sprq != null and sprq != ''"> and sprq = #{sprq}</if> <if test="sprq != null and sprq != ''"> and sprq = #{sprq}</if>
<if test="spr != null and spr != ''"> and spr = #{spr}</if> <if test="spr != null and spr != ''"> and spr = #{spr}</if>
<if test="pfje != null "> and pfje = #{pfje}</if> <if test="pfje != null "> and pfje = #{pfje}</if>
...@@ -102,6 +116,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -102,6 +116,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="yl5 != null and yl5 != ''"> and yl5 = #{yl5}</if> <if test="yl5 != null and yl5 != ''"> and yl5 = #{yl5}</if>
<if test="spcx != null and spcx != '' and spcx=='1'.toString()"> and zt !='未提交'</if> <if test="spcx != null and spcx != '' and spcx=='1'.toString()"> and zt !='未提交'</if>
<if test="spcx != null and spcx != '' and spcx=='2'.toString()"> and zt ='已批复'</if> <if test="spcx != null and spcx != '' and spcx=='2'.toString()"> and zt ='已批复'</if>
<if test="startTime != null and startTime != ''"> and a.fyrq >=#{startTime}</if>
<if test="endTime != null and endTime != ''"> and a.fyrq &lt;= #{endTime}</if>
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</where> </where>
...@@ -109,12 +125,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -109,12 +125,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectSjFybpById" parameterType="Long" resultMap="SjFybpResult"> <select id="selectSjFybpById" parameterType="Long" resultMap="SjFybpResult">
select a.id, a.fymc, a.fyrq, a.dept_id, a.fylx, a.fyms, a.fyje, a.fjid, a.zt, a.tjr, a.sprq, a.spr, a.pfje, a.ysyje, a.spyj, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5 select a.id, a.fymc, a.fyrq, a.dept_id,
a.fylx, a.fyms, a.fyje, a.fjid, a.zt,
a.tjr, a.tjrq, a.sprq, a.spr, a.pfje,
a.ysyje, a.spyj, a.create_by,
a.create_time, a.update_by, a.update_time,
a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5,d.dept_name
from sj_fybp a from sj_fybp a
left join sys_dept d on a.dept_id=d.dept_id
where a.id = #{id} where a.id = #{id}
</select> </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>
<insert id="insertSjFybp" parameterType="SjFybp" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSjFybp" parameterType="SjFybp" useGeneratedKeys="true" keyProperty="id">
insert into sj_fybp insert into sj_fybp
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -142,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -142,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="yl3 != null">yl3,</if> <if test="yl3 != null">yl3,</if>
<if test="yl4 != null">yl4,</if> <if test="yl4 != null">yl4,</if>
<if test="yl5 != null">yl5,</if> <if test="yl5 != null">yl5,</if>
<if test="tjrq != null">tjrq,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fymc != null">#{fymc},</if> <if test="fymc != null">#{fymc},</if>
...@@ -168,6 +216,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -168,6 +216,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="yl3 != null">#{yl3},</if> <if test="yl3 != null">#{yl3},</if>
<if test="yl4 != null">#{yl4},</if> <if test="yl4 != null">#{yl4},</if>
<if test="yl5 != null">#{yl5},</if> <if test="yl5 != null">#{yl5},</if>
<if test="tjrq != null">#{tjrq},</if>
</trim> </trim>
</insert> </insert>
...@@ -198,6 +247,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -198,6 +247,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="yl3 != null">yl3 = #{yl3},</if> <if test="yl3 != null">yl3 = #{yl3},</if>
<if test="yl4 != null">yl4 = #{yl4},</if> <if test="yl4 != null">yl4 = #{yl4},</if>
<if test="yl5 != null">yl5 = #{yl5},</if> <if test="yl5 != null">yl5 = #{yl5},</if>
<if test="tjrq != null">tjrq = #{tjrq},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
......
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