Commit bb7612af by jiang'yun

修改问题

parent ed0f2b59
......@@ -135,29 +135,29 @@ public class CommonController
/**
* 本地资源通用下载
*/
@GetMapping("/download/resource")
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
try
{
if (!FileUtils.checkAllowDownload(resource))
{
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
}
// 本地资源路径
String localPath = RuoYiConfig.getProfile();
// 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// 下载名称
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, downloadName);
FileUtils.writeBytes(downloadPath, response.getOutputStream());
}
catch (Exception e)
{
log.error("下载文件失败", e);
}
}
// @GetMapping("/download/resource")
// public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
// throws Exception
// {
// try
// {
// if (!FileUtils.checkAllowDownload(resource))
// {
// throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
// }
// // 本地资源路径
// String localPath = RuoYiConfig.getProfile();
// // 数据库资源地址
// String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// // 下载名称
// String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
// response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
// FileUtils.setAttachmentResponseHeader(response, downloadName);
// FileUtils.writeBytes(downloadPath, response.getOutputStream());
// }
// catch (Exception e)
// {
// log.error("下载文件失败", e);
// }
// }
}
......@@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://1.116.38.25:3986/qianhe_ydsj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useOldAliasMetadataBehavior=true
url: jdbc:mysql://1.116.38.25:3986/qianhe_ydsj?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
username: root
password: qianhe2022
# 从库数据源
......
......@@ -132,7 +132,7 @@ public class Constants
/**
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
*/
public static final String[] JOB_WHITELIST_STR = { "com.qianhe" };
public static final String[] JOB_WHITELIST_STR = { "" };
/**
* 定时任务违规的字符
......
......@@ -25,6 +25,8 @@ public class TreeSelect implements Serializable
private String label;
private String dwjb;
private String deptLx;
/** 子节点 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<TreeSelect> children;
......@@ -39,6 +41,7 @@ public class TreeSelect implements Serializable
this.id = dept.getDeptId();
this.label = dept.getDeptName();
this.dwjb = dept.getDwjb();
this.deptLx = dept.getDeptLx();
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
......
package com.qianhe.common.exception;
/**
* 业务异常
*
* @author zhimin 2021
*/
public class BusinessException extends RuntimeException
{
private static final long serialVersionUID = 1L;
protected final String message;
public BusinessException(String message)
{
this.message = message;
}
public BusinessException(String message, Throwable e)
{
super(message, e);
this.message = message;
}
@Override
public String getMessage()
{
return message;
}
}
......@@ -483,6 +483,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
return result.toString();
}
/**
* 驼峰式命名法
* 例如:user_name->userName
......@@ -614,4 +615,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
}
return sb.toString();
}
}
......@@ -123,6 +123,8 @@ public class SysJobController extends BaseController
@PutMapping
public AjaxResult edit(@RequestBody SysJob job) throws SchedulerException, TaskException
{
if (!CronUtils.isValid(job.getCronExpression()))
{
return error("修改任务'" + job.getJobName() + "'失败,Cron表达式不正确");
......@@ -167,14 +169,14 @@ public class SysJobController extends BaseController
/**
* 定时任务立即执行一次
*/
@PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')")
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
@PutMapping("/run")
public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
{
boolean result = jobService.run(job);
return result ? success() : error("任务不存在或已过期!");
}
// @PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')")
// @Log(title = "定时任务", businessType = BusinessType.UPDATE)
// @PutMapping("/run")
// public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
// {
// boolean result = jobService.run(job);
// return result ? success() : error("任务不存在或已过期!");
// }
/**
* 删除定时任务
......
......@@ -127,15 +127,28 @@ public class ScheduleUtils
*/
public static boolean whiteList(String invokeTarget)
{
String packageName = StringUtils.substringBefore(invokeTarget, "(");
int count = StringUtils.countMatches(packageName, ".");
if (count > 1)
// String packageName = StringUtils.substringBefore(invokeTarget, "(");
// int count = StringUtils.countMatches(packageName, ".");
// if (count > 1)
// {
// return StringUtils.containsAnyIgnoreCase(invokeTarget, Constants.JOB_WHITELIST_STR);
// }
// Object obj = SpringUtils.getBean(StringUtils.split(invokeTarget, ".")[0]);
// String beanPackageName = obj.getClass().getPackage().getName();
// return StringUtils.containsAnyIgnoreCase(beanPackageName, Constants.JOB_WHITELIST_STR)
// && !StringUtils.containsAnyIgnoreCase(beanPackageName, Constants.JOB_ERROR_STR);
if (StringUtils.isEmpty(invokeTarget) )
{
return StringUtils.containsAnyIgnoreCase(invokeTarget, Constants.JOB_WHITELIST_STR);
return false;
}
Object obj = SpringUtils.getBean(StringUtils.split(invokeTarget, ".")[0]);
String beanPackageName = obj.getClass().getPackage().getName();
return StringUtils.containsAnyIgnoreCase(beanPackageName, Constants.JOB_WHITELIST_STR)
&& !StringUtils.containsAnyIgnoreCase(beanPackageName, Constants.JOB_ERROR_STR);
for (CharSequence testStr : Constants.JOB_WHITELIST_STR)
{
if (invokeTarget.equals(testStr))
{
return true;
}
}
return false;
}
}
......@@ -2,6 +2,9 @@ package com.qianhe.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.domain.SjZdbfFjxbzCb;
import com.qianhe.domain.SjZdbfKhpjbzCb;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -52,7 +55,7 @@ public class SjZdbfFjxbzController extends BaseController
@GetMapping("/cxlist")
public TableDataInfo cxlist(SjZdbfFjxbz sjZdbfFjxbz)
{
startPage();
// startPage();
List<SjZdbfFjxbz> list = sjZdbfFjxbzService.selectSjZdbfFjxbzCxList(sjZdbfFjxbz);
return getDataTable(list);
}
......@@ -112,4 +115,33 @@ public class SjZdbfFjxbzController extends BaseController
{
return toAjax(sjZdbfFjxbzService.deleteSjZdbfFjxbzByIds(ids));
}
/**
* 查询分类名称集合
* @param cb
* @return
*/
@GetMapping("/getFlmcList")
public AjaxResult getFlmcList(SjZdbfFjxbzCb cb){
String nd = cb.getNd();
cb.setNd(nd.substring(0,4));
List<String> flmcList = sjZdbfFjxbzService.getFlmcList(cb);
return success(flmcList);
}
/**
* 查询分类名称集合
* @param cb
* @return
*/
@GetMapping("/getPjbzList")
public AjaxResult getPjbzList(SjZdbfFjxbzCb cb){
String nd = cb.getNd();
cb.setNd(nd.substring(0,4));
List<SjZdbfFjxbzCb> pjbzList = sjZdbfFjxbzService.getPjbzList(cb);
return success(pjbzList);
}
}
......@@ -2,6 +2,8 @@ package com.qianhe.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.domain.SjZdbfKhpjbzCb;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -54,7 +56,7 @@ public class SjZdbfKhpjbzController extends BaseController
@GetMapping("/cxlist")
public TableDataInfo cxlist(SjZdbfKhpjbz sjZdbfKhpjbz)
{
startPage();
// startPage();
List<SjZdbfKhpjbz> list = sjZdbfKhpjbzService.selectSjZdbfKhpjbzCxList(sjZdbfKhpjbz);
return getDataTable(list);
}
......@@ -114,4 +116,44 @@ public class SjZdbfKhpjbzController extends BaseController
{
return toAjax(sjZdbfKhpjbzService.deleteSjZdbfKhpjbzByIds(ids));
}
/**
* 查询考核内容集合
* @param cb
* @return
*/
@GetMapping("/getKhnrList")
public AjaxResult getKhnrList(SjZdbfKhpjbzCb cb){
String nd = cb.getNd();
cb.setNd(nd.substring(0,4));
List<String> khnrList = sjZdbfKhpjbzService.getKhnrList(cb);
return success(khnrList);
}
/**
* 查询考核项点集合
* @param cb
* @return
*/
@GetMapping("/getKhxdList")
public AjaxResult getKhxdList(SjZdbfKhpjbzCb cb){
String nd = cb.getNd();
cb.setNd(nd.substring(0,4));
return success(sjZdbfKhpjbzService.getKhxdList(cb));
}
/**
* 查询考核项点集合
* @param cb
* @return
*/
@GetMapping("/getPjbzList")
public AjaxResult getPjbzList(SjZdbfKhpjbzCb cb){
String nd = cb.getNd();
cb.setNd(nd.substring(0,4));
return success(sjZdbfKhpjbzService.getPjbzList(cb));
}
}
package com.qianhe.controller;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjZdbfFjxbzCb;
import com.qianhe.domain.SjZdbfKhpjbzCb;
import com.qianhe.domain.SjZdbfZsdwwtcj;
import com.qianhe.mapper.SjZdbfFjxbzMapper;
import com.qianhe.mapper.SjZdbfZsdwfjxcjMapper;
import com.qianhe.system.mapper.SysDeptMapper;
import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.http.MediaType;
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.SjZdbfZsdwfjxcj;
import com.qianhe.service.ISjZdbfZsdwfjxcjService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 指导帮扶-直属单位否决项采集Controller
*
* @author qianhe
* @date 2024-07-24
*/
@RestController
@RequestMapping("/system/sjZdbfZsdwfjxcj")
public class SjZdbfZsdwfjxcjController extends BaseController
{
@Autowired
private ISjZdbfZsdwfjxcjService sjZdbfZsdwfjxcjService;
@Autowired
private SysDeptMapper sysDeptMapper;
@Autowired
private SjZdbfFjxbzMapper sjZdbfFjxbzMapper;
/**
* 查询指导帮扶-直属单位否决项采集列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:list')")
@GetMapping("/list")
public TableDataInfo list(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj)
{
startPage();
List<SjZdbfZsdwfjxcj> list = sjZdbfZsdwfjxcjService.selectSjZdbfZsdwfjxcjList(sjZdbfZsdwfjxcj);
return getDataTable(list);
}
/**
* 导出指导帮扶-直属单位否决项采集列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:export')")
@Log(title = "指导帮扶-直属单位否决项采集", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj)
{
Workbook exl = null;
OutputStream out = null;
InputStream in = null;
try {
in =this.getClass().getResourceAsStream("/static/zsdwfjxcj.xlsx");
exl = WorkbookFactory.create(in);
out = response.getOutputStream();
response.reset();
String filename = URLEncoder.encode("直属单位否决项采集模板.xlsx", "UTF-8");
response.setCharacterEncoding("UTF-8");
response.setHeader("Content-Disposition", "attachment;filename=" + filename);
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
exl.write(out);
exl.close();
}catch(Exception e){
e.getMessage();
throw new BusinessException("导出Excel失败,请联系网站管理员!");
}finally{
if (exl != null) {
try {
exl.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
if (out != null) {
try {
out.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
}
/**
* 获取指导帮扶-直属单位否决项采集详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjZdbfZsdwfjxcjService.selectSjZdbfZsdwfjxcjById(id));
}
/**
* 新增指导帮扶-直属单位否决项采集
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:add')")
@Log(title = "指导帮扶-直属单位否决项采集", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj)
{
return toAjax(sjZdbfZsdwfjxcjService.insertSjZdbfZsdwfjxcj(sjZdbfZsdwfjxcj));
}
/**
* 修改指导帮扶-直属单位否决项采集
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:edit')")
@Log(title = "指导帮扶-直属单位否决项采集", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj)
{
return toAjax(sjZdbfZsdwfjxcjService.updateSjZdbfZsdwfjxcj(sjZdbfZsdwfjxcj));
}
/**
* 删除指导帮扶-直属单位否决项采集
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:remove')")
@Log(title = "指导帮扶-直属单位否决项采集", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjZdbfZsdwfjxcjService.deleteSjZdbfZsdwfjxcjByIds(ids));
}
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
XSSFWorkbook workbook = null;
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
try {
//装载流
workbook = new XSSFWorkbook(file.getInputStream());
// 获取一个工作表,下标从0开始
XSSFSheet sheet = workbook.getSheetAt(0);
int lastRowNum = sheet.getLastRowNum();
List<SjZdbfZsdwfjxcj> list=new ArrayList<>();
// 通过循环,逐行取出表中每行数据
for(int i=0;i<=lastRowNum;i++) {//跳过第一行和第二行
if(i==0 || i==1){
continue;
}
// 获取行
XSSFRow row = sheet.getRow(i);
SjZdbfZsdwfjxcj zsdwwtcj=new SjZdbfZsdwfjxcj();
System.out.println(row);
//日期
String rq=new DataFormatter().formatCellValue(row.getCell(1));
if(StringUtils.isEmpty(rq)){
return AjaxResult.error("导入失败,日期不能为空");
}
zsdwwtcj.setRq(rq);
//单位
String dw=new DataFormatter().formatCellValue(row.getCell(2)) ;
if(StringUtils.isEmpty(dw)){
return AjaxResult.error("导入失败,单位不能为空");
}
//查询单位id
String[] split = dw.split("/");
if(split.length<2){
return AjaxResult.error("导入失败,输入的单位格式有误!");
}
String ejdw=split[0];
SysDept ejdept = deptList.stream().filter(dept -> dept.getDeptName().equals(ejdw)).findFirst().orElse(null);
if(ejdept==null){
return AjaxResult.error("导入失败,未匹配到二级单位");
}
String sjdw=split[1];
SysDept sjdept = deptList.stream().filter(dept -> dept.getDeptName().equals(sjdw) && dept.getParentId().equals(ejdept.getDeptId())).findFirst().orElse(null);
if(sjdept==null){
return AjaxResult.error("导入失败,未匹配到三级单位");
}
zsdwwtcj.setDeptId(sjdept.getDeptId());
//分类名称
String flmc=new DataFormatter().formatCellValue(row.getCell(3)) ;
if(StringUtils.isEmpty(flmc)){
return AjaxResult.error("导入失败,分类名称不能为空");
}
zsdwwtcj.setFlmc(flmc);
//评价标准
String pjbz=new DataFormatter().formatCellValue(row.getCell(4)) ;
if(StringUtils.isEmpty(pjbz)){
return AjaxResult.error("导入失败,评价标准不能为空");
}
//匹配评价标准
String substring = pjbz.substring(4);
long l = Long.parseLong(substring);
SjZdbfFjxbzCb sjZdbfFjxbzCb=new SjZdbfFjxbzCb();
sjZdbfFjxbzCb.setFlmc(flmc);
sjZdbfFjxbzCb.setPx(l);
sjZdbfFjxbzCb.setNd(rq.substring(0,4));
SjZdbfFjxbzCb cb=sjZdbfFjxbzMapper.selectSjZdbfFjxbzCb(sjZdbfFjxbzCb);
if(cb==null){
return AjaxResult.error("导入失败,未匹配到评价标准");
}
zsdwwtcj.setPjbzid(cb.getId()+"");
zsdwwtcj.setPjbzmc(cb.getPjbz());
String wtms=new DataFormatter().formatCellValue(row.getCell(5)) ;
zsdwwtcj.setWtmc(wtms);
list.add(zsdwwtcj);
}
if(list.size()>0){
sjZdbfZsdwfjxcjService.batchSave(list);
}
} catch (IOException e) {
e.getMessage();
e.printStackTrace();
throw new BusinessException("导入Excel失败,请联系网站管理员!");
} finally {
workbook.close();
}
return AjaxResult.success("导入成功");
}
}
package com.qianhe.controller;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.github.pagehelper.PageInfo;
import com.qianhe.common.constant.HttpStatus;
import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.core.page.PageDomain;
import com.qianhe.common.core.page.TableSupport;
import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.*;
import com.qianhe.mapper.SjZdbfFjxbzMapper;
import com.qianhe.mapper.SjZdbfKhpjbzMapper;
import com.qianhe.mapper.SjZdbfZsdwfjxcjMapper;
import com.qianhe.mapper.SjZdbfZsdwwtcjMapper;
import com.qianhe.service.ISjZdbfFjxbzService;
import com.qianhe.service.ISjZdbfZsdwkhpjZbService;
import com.qianhe.service.ISjZdbfZsdwkhpjfjxService;
import com.qianhe.system.mapper.SysDeptMapper;
import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
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.service.ISjZdbfZsdwkhpjService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 指导帮扶-直属单位考核评价Controller
*
* @author qianhe
* @date 2024-07-24
*/
@RestController
@RequestMapping("/system/sjZdbfZsdwkhpj")
public class SjZdbfZsdwkhpjController extends BaseController
{
@Autowired
private ISjZdbfZsdwkhpjService sjZdbfZsdwkhpjService;
@Autowired
private ISjZdbfZsdwkhpjZbService sjZdbfZsdwkhpjZbService;
@Autowired
private SjZdbfKhpjbzMapper sjZdbfKhpjbzMapper;
@Autowired
private SysDeptMapper sysDeptMapper;
@Autowired
private SjZdbfFjxbzMapper sjZdbfFjxbzMapper;
@Autowired
private ISjZdbfZsdwkhpjfjxService sjZdbfZsdwkhpjfjxService;
@Autowired
private SjZdbfZsdwwtcjMapper sjZdbfZsdwwtcjMapper;
@Autowired
private SjZdbfZsdwfjxcjMapper sjZdbfZsdwfjxcjMapper;
/**
* 查询指导帮扶-直属单位考核评价列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:list')")
@GetMapping("/list")
public TableDataInfo list(SjZdbfZsdwkhpj sjZdbfZsdwkhpj)
{
startPage();
List<SjZdbfZsdwkhpj> list = sjZdbfZsdwkhpjService.selectSjZdbfZsdwkhpjList(sjZdbfZsdwkhpj);
return getDataTable(list);
}
/**
* 查询考核评价
* @return
*/
@GetMapping("/listAll")
public Map<String,Object> listAll(SjZdbfZsdwkhpj sjZdbfZsdwkhpj)
{
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
Long deptId = sjZdbfZsdwkhpj.getDeptId();
String nd = sjZdbfZsdwkhpj.getNd();
SysDept dept = sysDeptMapper.selectDeptById(deptId);
String deptLx = dept.getDeptLx();
String zqfw = sjZdbfZsdwkhpj.getZqfw();
String startRq=null;
String endRq=null;
if("上半年".equals(zqfw)){
startRq=nd+"-01";
endRq=nd+"-06";
}else {
startRq=nd+"-07";
endRq=nd+"-12";
}
//查询考核评价是否保存到从表
List<SjZdbfZsdwkhpj> sjZdbfZsdwkhpjs = sjZdbfZsdwkhpjService.selectSjZdbfZsdwkhpjList(sjZdbfZsdwkhpj);
// List<SjZdbfZsdwkhpj>
if(sjZdbfZsdwkhpjs.size()<=0){
//查询主表信息
SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb=new SjZdbfZsdwkhpjZb();
sjZdbfZsdwkhpjZb.setNd(nd);
sjZdbfZsdwkhpjZb.setDeptId(deptId);
sjZdbfZsdwkhpjZb.setZqfw(sjZdbfZsdwkhpj.getZqfw());
SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZbnew =sjZdbfZsdwkhpjZbService.selectSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZb);
if(sjZdbfZsdwkhpjZbnew==null){
sjZdbfZsdwkhpjZbnew=new SjZdbfZsdwkhpjZb();
sjZdbfZsdwkhpjZbnew.setNd(nd);
sjZdbfZsdwkhpjZbnew.setDeptId(deptId);
sjZdbfZsdwkhpjZbnew.setParentDeptId(dept.getParentId());
sjZdbfZsdwkhpjZbnew.setZqfw(sjZdbfZsdwkhpj.getZqfw());
sjZdbfZsdwkhpjZbnew.setZqlx("半年度");
sjZdbfZsdwkhpjZbnew.setJb("直属单位");
sjZdbfZsdwkhpjZbnew.setDeptDfl(dept.getDeptDfl());
sjZdbfZsdwkhpjZbnew.setDeptLx(dept.getDeptLx());
sjZdbfZsdwkhpjZbnew.setDeptYwfl(dept.getDeptYwfl());
sjZdbfZsdwkhpjZbService.insertSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZbnew);
}
//先保存再查询
SjZdbfKhpjbz sjZdbfKhpjbz=new SjZdbfKhpjbz();
sjZdbfKhpjbz.setLx(deptLx);
sjZdbfKhpjbz.setNd(nd);
List<SjZdbfKhpjbzCb> sjZdbfKhpjbzList=sjZdbfKhpjbzMapper.selectSjZdbfKhpjbzCxBzList(sjZdbfKhpjbz);
List<SjZdbfZsdwkhpj> addList=new ArrayList<>();
//查询问题
SjZdbfZsdwwtcj sjZdbfZsdwwtcj =new SjZdbfZsdwwtcj();
sjZdbfZsdwwtcj.setDeptId(deptId);
sjZdbfZsdwwtcj.setStartRq(startRq);
sjZdbfZsdwwtcj.setEndRq(endRq);
List<SjZdbfZsdwwtcj> sjZdbfZsdwwtcjs = sjZdbfZsdwwtcjMapper.selectSjZdbfZsdwwtcjList(sjZdbfZsdwwtcj);
for(int i=0;i<sjZdbfKhpjbzList.size();i++){
SjZdbfKhpjbzCb sjZdbfKhpjbzCb = sjZdbfKhpjbzList.get(i);
SjZdbfZsdwkhpj zsdwkhpj=new SjZdbfZsdwkhpj();
zsdwkhpj.setKhnr(sjZdbfKhpjbzCb.getKhnr());
zsdwkhpj.setKhxd(sjZdbfKhpjbzCb.getKhxd());
zsdwkhpj.setPjbzid(sjZdbfKhpjbzCb.getId()+"");
zsdwkhpj.setPjbzmc(sjZdbfKhpjbzCb.getPjbz());
zsdwkhpj.setDeptId(deptId);
zsdwkhpj.setNd(nd);
zsdwkhpj.setZqfw(sjZdbfZsdwkhpj.getZqfw());
zsdwkhpj.setZqlx("半年度");
zsdwkhpj.setJb("直属单位");
zsdwkhpj.setZbId(sjZdbfZsdwkhpjZbnew.getId());
zsdwkhpj.setYl1(i+1L);
//计算问题
List<String> collect = sjZdbfZsdwwtcjs.stream().filter(item -> item.getPjbzid().equals(zsdwkhpj.getPjbzid()))
.map(SjZdbfZsdwwtcj::getWtmc).collect(Collectors.toList());
zsdwkhpj.setSj(collect.size()+"");
zsdwkhpj.setWtms(String.join(";",collect));
addList.add(zsdwkhpj);
}
//保存考核评价
if(addList.size()>0){
sjZdbfZsdwkhpjService.batchSave(addList);
}
//保存否决项
SjZdbfFjxbzCb sjZdbfFjxbzCb =new SjZdbfFjxbzCb();
sjZdbfFjxbzCb.setNd(nd);
List<SjZdbfFjxbzCb> cbList=sjZdbfFjxbzMapper.selectSjZdbfFjxbzCxBzList(sjZdbfFjxbzCb);
List<SjZdbfZsdwkhpjfjx> fjxList=new ArrayList<>();
//查询否决
SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj=new SjZdbfZsdwfjxcj();
sjZdbfZsdwfjxcj.setDeptId(deptId);
sjZdbfZsdwfjxcj.setStartRq(startRq);
sjZdbfZsdwfjxcj.setEndRq(endRq);
List<SjZdbfZsdwfjxcj> sjZdbfZsdwfjxcjs = sjZdbfZsdwfjxcjMapper.selectSjZdbfZsdwfjxcjList(sjZdbfZsdwfjxcj);
for(int i=0;i<cbList.size();i++){
SjZdbfFjxbzCb cb = cbList.get(i);
SjZdbfZsdwkhpjfjx fjx=new SjZdbfZsdwkhpjfjx();
fjx.setFlmc(cb.getFlmc());
fjx.setPjbzid(cb.getId()+"");
fjx.setPjbzmc(cb.getPjbz()+"");
fjx.setDeptId(deptId);
fjx.setNd(nd);
fjx.setZqfw(sjZdbfZsdwkhpj.getZqfw());
fjx.setZqlx("半年度");
fjx.setJb("直属单位");
fjx.setZbId(sjZdbfZsdwkhpjZbnew.getId());
fjx.setYl1(i+1L);
List<String> collect = sjZdbfZsdwfjxcjs.stream().filter(item -> item.getPjbzid().equals(cb.getId())).map(SjZdbfZsdwfjxcj::getWtmc).collect(Collectors.toList());
if(collect.size()>0){
fjx.setSffs("是");
fjx.setWtms(String.join(";",collect));
}
fjxList.add(fjx);
}
if(fjxList.size()>0){
sjZdbfZsdwkhpjfjxService.batchSave(fjxList);
}
}
//查询考核评价
List<SjZdbfZsdwkhpj> resjZdbfZsdwkhpjs = sjZdbfZsdwkhpjService.selectSjZdbfZsdwkhpjList(sjZdbfZsdwkhpj);
//查询否决项
SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx =new SjZdbfZsdwkhpjfjx();
sjZdbfZsdwkhpjfjx.setNd(nd);
sjZdbfZsdwkhpjfjx.setDeptId(deptId);
sjZdbfZsdwkhpjfjx.setZqfw(sjZdbfZsdwkhpj.getZqfw());
List<SjZdbfZsdwkhpjfjx> resjZdbfZsdwkhpjfjxList = sjZdbfZsdwkhpjfjxService.selectSjZdbfZsdwkhpjfjxList(sjZdbfZsdwkhpjfjx);
Map<String,Object> map=new HashMap<>();
TableDataInfo rspDatakhpj = new TableDataInfo();
rspDatakhpj.setCode(HttpStatus.SUCCESS);
rspDatakhpj.setMsg("查询成功");
rspDatakhpj.setRows(resjZdbfZsdwkhpjs.stream().skip((pageNum-1)*pageSize).limit(pageSize).
collect(Collectors.toList()));
rspDatakhpj.setTotal(resjZdbfZsdwkhpjs.size());
map.put("khpjData",rspDatakhpj);
TableDataInfo rspDatafjx = new TableDataInfo();
rspDatafjx.setCode(HttpStatus.SUCCESS);
rspDatafjx.setMsg("查询成功");
rspDatafjx.setRows(resjZdbfZsdwkhpjfjxList.stream().skip((pageNum-1)*pageSize).limit(pageSize).
collect(Collectors.toList()));
rspDatafjx.setTotal(resjZdbfZsdwkhpjfjxList.size());
map.put("fjxData",rspDatafjx);
return map;
}
/**
* 导出指导帮扶-直属单位考核评价列表
*/
// @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:export')")
@Log(title = "指导帮扶-直属单位考核评价", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjZdbfZsdwkhpj sjZdbfZsdwkhpj)
{
List<SjZdbfZsdwkhpj> list = sjZdbfZsdwkhpjService.selectSjZdbfZsdwkhpjList(sjZdbfZsdwkhpj);
ExcelUtil<SjZdbfZsdwkhpj> util = new ExcelUtil<SjZdbfZsdwkhpj>(SjZdbfZsdwkhpj.class);
util.exportExcel(response, list, "指导帮扶-直属单位考核评价数据");
}
/**
* 获取指导帮扶-直属单位考核评价详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjZdbfZsdwkhpjService.selectSjZdbfZsdwkhpjById(id));
}
/**
* 新增指导帮扶-直属单位考核评价
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:add')")
@Log(title = "指导帮扶-直属单位考核评价", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjZdbfZsdwkhpj sjZdbfZsdwkhpj)
{
return toAjax(sjZdbfZsdwkhpjService.insertSjZdbfZsdwkhpj(sjZdbfZsdwkhpj));
}
/**
* 修改指导帮扶-直属单位考核评价
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:edit')")
@Log(title = "指导帮扶-直属单位考核评价", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjZdbfZsdwkhpj sjZdbfZsdwkhpj)
{
return toAjax(sjZdbfZsdwkhpjService.updateSjZdbfZsdwkhpj(sjZdbfZsdwkhpj));
}
/**
* 删除指导帮扶-直属单位考核评价
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:remove')")
@Log(title = "指导帮扶-直属单位考核评价", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjZdbfZsdwkhpjService.deleteSjZdbfZsdwkhpjByIds(ids));
}
/**
* 修改指导帮扶-直属单位考核评价
*/
// @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:edit')")
@Log(title = "指导帮扶-直属单位考核评价", businessType = BusinessType.UPDATE)
@PutMapping("/pledit")
public AjaxResult pledit(@RequestBody List<SjZdbfZsdwkhpj> list)
{
return toAjax(sjZdbfZsdwkhpjService.pledit(list));
}
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
XSSFWorkbook workbook = null;
// List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
try {
//装载流
workbook = new XSSFWorkbook(file.getInputStream());
// 获取一个工作表,下标从0开始
XSSFSheet sheet = workbook.getSheetAt(0);
int lastRowNum = sheet.getLastRowNum();
List<SjZdbfZsdwkhpj> list=new ArrayList<>();
// 通过循环,逐行取出表中每行数据
for(int i=0;i<=lastRowNum;i++) {//跳过第一行和第二行
if(i==0 || i==1){
continue;
}
// 获取行
XSSFRow row = sheet.getRow(i);
SjZdbfZsdwkhpj zsdwkhpj=new SjZdbfZsdwkhpj();
System.out.println(row);
//id
String id=new DataFormatter().formatCellValue(row.getCell(9));
if(StringUtils.isEmpty(id)){
return AjaxResult.error("id不能为空");
}
zsdwkhpj.setId(Long.parseLong(id));
//主表id
String zbid=new DataFormatter().formatCellValue(row.getCell(10));
if(StringUtils.isEmpty(zbid)){
return AjaxResult.error("主表id不能为空");
}
zsdwkhpj.setZbId(Long.parseLong(zbid));
//数量
String sl=new DataFormatter().formatCellValue(row.getCell(6));
zsdwkhpj.setSj(sl);
//问题描述
String wtms=new DataFormatter().formatCellValue(row.getCell(7));
zsdwkhpj.setWtms(wtms);
//考核分值
String khfz=new DataFormatter().formatCellValue(row.getCell(8));
zsdwkhpj.setKhfz(khfz);
list.add(zsdwkhpj);
}
if(list.size()>0){
sjZdbfZsdwkhpjService.pledit(list);
}
} catch (IOException e) {
e.getMessage();
e.printStackTrace();
throw new BusinessException("导入Excel失败,请联系网站管理员!");
} finally {
workbook.close();
}
return AjaxResult.success("导入成功");
}
}
package com.qianhe.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.domain.SjZdbfZsdwkhpj;
import com.qianhe.service.ISjZdbfZsdwkhpjService;
import com.qianhe.service.ISjZdbfZsdwkhpjfjxService;
import com.qianhe.system.mapper.SysDeptMapper;
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.SjZdbfZsdwkhpjZb;
import com.qianhe.service.ISjZdbfZsdwkhpjZbService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
/**
* 指导帮扶-直属单位考核评价主Controller
*
* @author qianhe
* @date 2024-07-24
*/
@RestController
@RequestMapping("/system/sjZdbfZsdwkhpjZb")
public class SjZdbfZsdwkhpjZbController extends BaseController
{
@Autowired
private ISjZdbfZsdwkhpjZbService sjZdbfZsdwkhpjZbService;
/**
* 查询指导帮扶-直属单位考核评价主列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjZb:list')")
@GetMapping("/list")
public TableDataInfo list(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb)
{
startPage();
List<SjZdbfZsdwkhpjZb> list = sjZdbfZsdwkhpjZbService.selectSjZdbfZsdwkhpjZbList(sjZdbfZsdwkhpjZb);
return getDataTable(list);
}
/**
* 导出指导帮扶-直属单位考核评价主列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjZb:export')")
@Log(title = "指导帮扶-直属单位考核评价主", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb)
{
List<SjZdbfZsdwkhpjZb> list = sjZdbfZsdwkhpjZbService.selectSjZdbfZsdwkhpjZbList(sjZdbfZsdwkhpjZb);
ExcelUtil<SjZdbfZsdwkhpjZb> util = new ExcelUtil<SjZdbfZsdwkhpjZb>(SjZdbfZsdwkhpjZb.class);
util.exportExcel(response, list, "指导帮扶-直属单位考核评价主数据");
}
/**
* 获取指导帮扶-直属单位考核评价主详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjZb:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjZdbfZsdwkhpjZbService.selectSjZdbfZsdwkhpjZbById(id));
}
/**
* 新增指导帮扶-直属单位考核评价主
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjZb:add')")
@Log(title = "指导帮扶-直属单位考核评价主", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb)
{
return toAjax(sjZdbfZsdwkhpjZbService.insertSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZb));
}
/**
* 修改指导帮扶-直属单位考核评价主
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjZb:edit')")
@Log(title = "指导帮扶-直属单位考核评价主", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb)
{
return toAjax(sjZdbfZsdwkhpjZbService.updateSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZb));
}
/**
* 删除指导帮扶-直属单位考核评价主
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjZb:remove')")
@Log(title = "指导帮扶-直属单位考核评价主", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjZdbfZsdwkhpjZbService.deleteSjZdbfZsdwkhpjZbByIds(ids));
}
}
package com.qianhe.controller;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjZdbfZsdwkhpj;
import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
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.SjZdbfZsdwkhpjfjx;
import com.qianhe.service.ISjZdbfZsdwkhpjfjxService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 指导帮扶-直属单位考核评价否决项Controller
*
* @author qianhe
* @date 2024-07-24
*/
@RestController
@RequestMapping("/system/sjZdbfZsdwkhpjfjx")
public class SjZdbfZsdwkhpjfjxController extends BaseController
{
@Autowired
private ISjZdbfZsdwkhpjfjxService sjZdbfZsdwkhpjfjxService;
/**
* 查询指导帮扶-直属单位考核评价否决项列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:list')")
@GetMapping("/list")
public TableDataInfo list(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx)
{
startPage();
List<SjZdbfZsdwkhpjfjx> list = sjZdbfZsdwkhpjfjxService.selectSjZdbfZsdwkhpjfjxList(sjZdbfZsdwkhpjfjx);
return getDataTable(list);
}
/**
* 导出指导帮扶-直属单位考核评价否决项列表
*/
// @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:export')")
@Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx)
{
List<SjZdbfZsdwkhpjfjx> list = sjZdbfZsdwkhpjfjxService.selectSjZdbfZsdwkhpjfjxList(sjZdbfZsdwkhpjfjx);
ExcelUtil<SjZdbfZsdwkhpjfjx> util = new ExcelUtil<SjZdbfZsdwkhpjfjx>(SjZdbfZsdwkhpjfjx.class);
util.exportExcel(response, list, "指导帮扶-直属单位考核评价否决项数据");
}
/**
* 获取指导帮扶-直属单位考核评价否决项详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjZdbfZsdwkhpjfjxService.selectSjZdbfZsdwkhpjfjxById(id));
}
/**
* 新增指导帮扶-直属单位考核评价否决项
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:add')")
@Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx)
{
return toAjax(sjZdbfZsdwkhpjfjxService.insertSjZdbfZsdwkhpjfjx(sjZdbfZsdwkhpjfjx));
}
/**
* 修改指导帮扶-直属单位考核评价否决项
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:edit')")
@Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx)
{
return toAjax(sjZdbfZsdwkhpjfjxService.updateSjZdbfZsdwkhpjfjx(sjZdbfZsdwkhpjfjx));
}
/**
* 删除指导帮扶-直属单位考核评价否决项
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:remove')")
@Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjZdbfZsdwkhpjfjxService.deleteSjZdbfZsdwkhpjfjxByIds(ids));
}
/**
* 修改指导帮扶-直属单位考核评价否决项
*/
// @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:edit')")
@Log(title = "指导帮扶-直属单位考核评价否决项", businessType = BusinessType.UPDATE)
@PutMapping("/pledit")
public AjaxResult pledit(@RequestBody List<SjZdbfZsdwkhpjfjx> list)
{
return toAjax(sjZdbfZsdwkhpjfjxService.pledit(list));
}
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
XSSFWorkbook workbook = null;
// List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
try {
//装载流
workbook = new XSSFWorkbook(file.getInputStream());
// 获取一个工作表,下标从0开始
XSSFSheet sheet = workbook.getSheetAt(0);
int lastRowNum = sheet.getLastRowNum();
List<SjZdbfZsdwkhpjfjx> list=new ArrayList<>();
// 通过循环,逐行取出表中每行数据
for(int i=0;i<=lastRowNum;i++) {//跳过第一行和第二行
if(i==0 || i==1){
continue;
}
// 获取行
XSSFRow row = sheet.getRow(i);
SjZdbfZsdwkhpjfjx zsdwkhpj=new SjZdbfZsdwkhpjfjx();
System.out.println(row);
//id
String id=new DataFormatter().formatCellValue(row.getCell(7));
if(StringUtils.isEmpty(id)){
return AjaxResult.error("id不能为空");
}
zsdwkhpj.setId(Long.parseLong(id));
//主表id
String zbid=new DataFormatter().formatCellValue(row.getCell(8));
if(StringUtils.isEmpty(zbid)){
return AjaxResult.error("主表id不能为空");
}
zsdwkhpj.setZbId(Long.parseLong(zbid));
//是否发生
String sffs=new DataFormatter().formatCellValue(row.getCell(5));
zsdwkhpj.setSffs(sffs);
//问题描述
String wtms=new DataFormatter().formatCellValue(row.getCell(6));
zsdwkhpj.setWtms(wtms);
list.add(zsdwkhpj);
}
if(list.size()>0){
sjZdbfZsdwkhpjfjxService.pledit(list);
}
} catch (IOException e) {
e.getMessage();
e.printStackTrace();
throw new BusinessException("导入Excel失败,请联系网站管理员!");
} finally {
workbook.close();
}
return AjaxResult.success("导入成功");
}
}
package com.qianhe.controller;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjZdbfKhpjbz;
import com.qianhe.domain.SjZdbfKhpjbzCb;
import com.qianhe.mapper.SjZdbfKhpjbzMapper;
import com.qianhe.system.mapper.SysDeptMapper;
import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.http.MediaType;
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.SjZdbfZsdwwtcj;
import com.qianhe.service.ISjZdbfZsdwwtcjService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 指导帮扶-直属单位问题采集Controller
*
* @author qianhe
* @date 2024-07-23
*/
@RestController
@RequestMapping("/system/sjZdbfZsdwwtcj")
public class SjZdbfZsdwwtcjController extends BaseController
{
@Autowired
private ISjZdbfZsdwwtcjService sjZdbfZsdwwtcjService;
@Autowired
private SysDeptMapper sysDeptMapper;
@Autowired
private SjZdbfKhpjbzMapper sjZdbfKhpjbzMapper;
/**
* 查询指导帮扶-直属单位问题采集列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:list')")
@GetMapping("/list")
public TableDataInfo list(SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
startPage();
List<SjZdbfZsdwwtcj> list = sjZdbfZsdwwtcjService.selectSjZdbfZsdwwtcjList(sjZdbfZsdwwtcj);
return getDataTable(list);
}
/**
* 导出指导帮扶-直属单位问题采集列表
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:export')")
@Log(title = "指导帮扶-直属单位问题采集", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
Workbook exl = null;
OutputStream out = null;
InputStream in = null;
try {
in =this.getClass().getResourceAsStream("/static/zsdwwtcj.xlsx");
exl = WorkbookFactory.create(in);
out = response.getOutputStream();
response.reset();
String filename = URLEncoder.encode("直属单位问题采集模板.xlsx", "UTF-8");
response.setCharacterEncoding("UTF-8");
response.setHeader("Content-Disposition", "attachment;filename=" + filename);
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
exl.write(out);
exl.close();
}catch(Exception e){
e.getMessage();
throw new BusinessException("导出Excel失败,请联系网站管理员!");
}finally{
if (exl != null) {
try {
exl.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
if (out != null) {
try {
out.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
}
/**
* 获取指导帮扶-直属单位问题采集详细信息
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjZdbfZsdwwtcjService.selectSjZdbfZsdwwtcjById(id));
}
/**
* 新增指导帮扶-直属单位问题采集
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:add')")
@Log(title = "指导帮扶-直属单位问题采集", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
return toAjax(sjZdbfZsdwwtcjService.insertSjZdbfZsdwwtcj(sjZdbfZsdwwtcj));
}
/**
* 修改指导帮扶-直属单位问题采集
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:edit')")
@Log(title = "指导帮扶-直属单位问题采集", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
return toAjax(sjZdbfZsdwwtcjService.updateSjZdbfZsdwwtcj(sjZdbfZsdwwtcj));
}
/**
* 删除指导帮扶-直属单位问题采集
*/
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:remove')")
@Log(title = "指导帮扶-直属单位问题采集", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjZdbfZsdwwtcjService.deleteSjZdbfZsdwwtcjByIds(ids));
}
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception{
XSSFWorkbook workbook = null;
List<SysDept> deptList = sysDeptMapper.selectDeptList(new SysDept());
try {
//装载流
workbook = new XSSFWorkbook(file.getInputStream());
// 获取一个工作表,下标从0开始
XSSFSheet sheet = workbook.getSheetAt(0);
int lastRowNum = sheet.getLastRowNum();
List<SjZdbfZsdwwtcj> list=new ArrayList<>();
// 通过循环,逐行取出表中每行数据
for(int i=0;i<=lastRowNum;i++) {//跳过第一行和第二行
if(i==0 || i==1){
continue;
}
// 获取行
XSSFRow row = sheet.getRow(i);
SjZdbfZsdwwtcj zsdwwtcj=new SjZdbfZsdwwtcj();
System.out.println(row);
//日期
String rq=new DataFormatter().formatCellValue(row.getCell(1));
if(StringUtils.isEmpty(rq)){
return AjaxResult.error("导入失败,日期不能为空");
}
zsdwwtcj.setRq(rq);
//单位
String dw=new DataFormatter().formatCellValue(row.getCell(2)) ;
if(StringUtils.isEmpty(dw)){
return AjaxResult.error("导入失败,单位不能为空");
}
//查询单位id
String[] split = dw.split("/");
if(split.length<2){
return AjaxResult.error("导入失败,输入的单位格式有误!");
}
String ejdw=split[0];
SysDept ejdept = deptList.stream().filter(dept -> dept.getDeptName().equals(ejdw)).findFirst().orElse(null);
if(ejdept==null){
return AjaxResult.error("导入失败,未匹配到二级单位");
}
String sjdw=split[1];
SysDept sjdept = deptList.stream().filter(dept -> dept.getDeptName().equals(sjdw) && dept.getParentId().equals(ejdept.getDeptId())).findFirst().orElse(null);
if(sjdept==null){
return AjaxResult.error("导入失败,未匹配到三级单位");
}
zsdwwtcj.setDeptId(sjdept.getDeptId());
//问题描述
String wtms=new DataFormatter().formatCellValue(row.getCell(3)) ;
if(StringUtils.isEmpty(wtms)){
return AjaxResult.error("导入失败,问题描述不能为空");
}
zsdwwtcj.setWtmc(wtms);
//考核内容
String khnr=new DataFormatter().formatCellValue(row.getCell(4)) ;
if(StringUtils.isEmpty(khnr)){
return AjaxResult.error("导入失败,考核内容不能为空");
}
zsdwwtcj.setKhnr(khnr);
//考核项点
String khxd=new DataFormatter().formatCellValue(row.getCell(5)) ;
if(StringUtils.isEmpty(khxd)){
return AjaxResult.error("导入失败,考核项点不能为空");
}
zsdwwtcj.setKhxd(khxd);
String pjbz=new DataFormatter().formatCellValue(row.getCell(6)) ;
if(StringUtils.isEmpty(pjbz)){
return AjaxResult.error("导入失败,评价标准不能为空");
}
//匹配评价标准
String substring = pjbz.substring(4);
long l = Long.parseLong(substring);
SjZdbfKhpjbzCb sjZdbfKhpjbzCb=new SjZdbfKhpjbzCb();
sjZdbfKhpjbzCb.setKhxd(khxd);
sjZdbfKhpjbzCb.setKhnr(khnr);
sjZdbfKhpjbzCb.setLx(sjdept.getDeptLx());
sjZdbfKhpjbzCb.setPx(l);
sjZdbfKhpjbzCb.setNd(rq.substring(0,4));
SjZdbfKhpjbzCb cb=sjZdbfKhpjbzMapper.selectSjZdbfKhpjbzCb(sjZdbfKhpjbzCb);
if(cb==null){
return AjaxResult.error("导入失败,未匹配到评价标准");
}
zsdwwtcj.setPjbzid(cb.getId()+"");
zsdwwtcj.setPjbzmc(cb.getPjbz());
String zgzrr=new DataFormatter().formatCellValue(row.getCell(7)) ;
zsdwwtcj.setZgzrr(zgzrr);
String zgcs=new DataFormatter().formatCellValue(row.getCell(8)) ;
zsdwwtcj.setZgcs(zgcs);
String zgqx=new DataFormatter().formatCellValue(row.getCell(9)) ;
zsdwwtcj.setZgqx(zgqx);
String zgzt=new DataFormatter().formatCellValue(row.getCell(10)) ;
zsdwwtcj.setZgzt(zgzt);
zsdwwtcj.setJcjb("直属单位自查");
list.add(zsdwwtcj);
}
if(list.size()>0){
sjZdbfZsdwwtcjService.batchSave(list);
}
} catch (IOException e) {
e.getMessage();
e.printStackTrace();
throw new BusinessException("导入Excel失败,请联系网站管理员!");
} finally {
workbook.close();
}
return AjaxResult.success("导入成功");
}
}
package com.qianhe.domain;
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;
/**
* 指导帮扶-直属单位否决项采集对象 sj_zdbf_zsdwfjxcj
*
* @author qianhe
* @date 2024-07-24
*/
@Data
public class SjZdbfZsdwfjxcj extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 单位id */
@Excel(name = "单位id")
private Long deptId;
/** 日期 */
@Excel(name = "日期")
private String rq;
/** 分类名称 */
@Excel(name = "分类名称")
private String flmc;
/** 评价标准id */
@Excel(name = "评价标准id")
private String pjbzid;
/** 评价标准名称 */
@Excel(name = "评价标准名称")
private String pjbzmc;
/** 问题描述 */
@Excel(name = "问题描述")
private String wtmc;
/** 预留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 String deptName;
private String startRq;
private String endRq;
private String deptLx;
}
package com.qianhe.domain;
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.apache.poi.ss.usermodel.IndexedColors;
/**
* 指导帮扶-直属单位考核评价对象 sj_zdbf_zsdwkhpj
*
* @author qianhe
* @date 2024-07-24
*/
@Data
public class SjZdbfZsdwkhpj extends BaseEntity
{
private static final long serialVersionUID = 1L;
@Excel(name = "单位名称")
private String deptName;
/** 年度 */
@Excel(name = "年度")
private String nd;
/** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel(name = "周期范围")
private String zqfw;
/** 周期类型(季度、半年度、年度) */
// @Excel(name = "周期类型", readConverterExp = "季=度、半年度、年度")
private String zqlx;
/** 级别(直属单位(半年度)、基层单位(季度)、三基帮扶组(年度)) */
// @Excel(name = "级别", readConverterExp = "直=属单位(半年度")
private String jb;
/** 考核内容 */
@Excel(name = "考核内容")
private String khnr;
/** 考核项点 */
@Excel(name = "考核项点")
private String khxd;
/** 评价标准名称 */
@Excel(name = "评价标准名称")
private String pjbzmc;
/** 数量 */
@Excel(name = "数量")
private String sj;
/** 问题描述 */
@Excel(name = "问题描述")
private String wtms;
/** 考核分值 */
@Excel(name = "考核分值")
private String khfz;
/** 预留1 */
// @Excel(name = "预留1")
private Long 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;
/** 主键 */
@Excel(name = "id(勿动)",headerColor= IndexedColors.RED1)
private Long id;
/** 主表id */
@Excel(name = "主表id(勿动)",headerColor= IndexedColors.RED1)
private Long zbId;
/** 单位id */
@Excel(name = "单位id(勿动)",headerColor= IndexedColors.RED1)
private Long deptId;
/** 评价标准id */
@Excel(name = "评价标准id")
private String pjbzid;
}
package com.qianhe.domain;
import java.math.BigDecimal;
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;
/**
* 指导帮扶-直属单位考核评价主对象 sj_zdbf_zsdwkhpj_zb
*
* @author qianhe
* @date 2024-07-24
*/
@Data
public class SjZdbfZsdwkhpjZb extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 单位id */
// @Excel(name = "单位id")
private Long deptId;
@Excel(name = "直属单位名称")
private String parentName;
@Excel(name = "基层单位名称")
private String deptName;
/** 上级单位id */
// @Excel(name = "上级单位id")
private Long parentDeptId;
/** 年度 */
@Excel(name = "年度")
private String nd;
/** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel(name = "周期范围")
private String zqfw;
/** 周期类型(季度、半年度、年度) */
@Excel(name = "周期类型")
private String zqlx;
/** 级别(直属单位(半年度)、基层单位(季度)、三基帮扶组(年度)) */
// @Excel(name = "级别", readConverterExp = "直=属单位(半年度")
private String jb;
/** 单位大分类(A类基层单位、B类基层单位、C类基层单位) */
@Excel(name = "单位分类")
private String deptDfl;
/** 单位类型(采油管理区、专业化基础单位、科研基层单位、服务协调基础单位) */
@Excel(name = "单位类型")
private String deptLx;
/** 单位业务分类 */
@Excel(name = "单位业务分类")
private String deptYwfl;
/** 党建引领总分数 */
@Excel(name = "党建引领总分数")
private BigDecimal djyjzfs;
/** 党建引领扣分数 */
@Excel(name = "党建引领扣分数")
private BigDecimal djyjkfs;
/** 党建引领扣分比例 */
@Excel(name = "党建引领扣分比例")
private BigDecimal djyjkfbl;
/** 党建引领得分 */
@Excel(name = "党建引领得分")
private BigDecimal djyjdf;
/** 素质提升总分数 */
@Excel(name = "素质提升总分数")
private BigDecimal sztszfs;
/** 素质提升扣分数 */
@Excel(name = "素质提升扣分数")
private BigDecimal sztskfs;
/** 素质提升扣分比例 */
@Excel(name = "素质提升扣分比例")
private BigDecimal sztsfbl;
/** 素质提升得分 */
@Excel(name = "素质提升得分")
private BigDecimal sztsdf;
/** 管理规范总分数 */
@Excel(name = "管理规范总分数")
private BigDecimal glgfzfs;
/** 管理规范扣分数 */
@Excel(name = "管理规范扣分数")
private BigDecimal glgfkfs;
/** 管理规范扣分比例 */
@Excel(name = "管理规范扣分比例")
private BigDecimal glgfbl;
/** 管理规范得分 */
@Excel(name = "管理规范得分")
private BigDecimal glgfdf;
/** 管理规范总分数 */
@Excel(name = "管理规范总分数")
private BigDecimal ywcxzfs;
/** 管理规范扣分数 */
@Excel(name = "管理规范扣分数")
private BigDecimal ywcxkfs;
/** 管理规范扣分比例 */
@Excel(name = "管理规范扣分比例")
private BigDecimal ywcxbl;
/** 管理规范得分 */
@Excel(name = "管理规范得分")
private BigDecimal ywcxdf;
/** 发生否决项数量 */
@Excel(name = "发生否决项数量")
private BigDecimal sffjxs;
/** 总扣分 */
@Excel(name = "总扣分")
private BigDecimal zkf;
/** 总扣分比例 */
@Excel(name = "总扣分比例")
private BigDecimal zkfbl;
/** 总得分 */
@Excel(name = "总得分")
private BigDecimal zdf;
/** 综合得分 */
@Excel(name = "综合得分")
private BigDecimal zhdf;
/** 预留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;
}
package com.qianhe.domain;
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.apache.poi.ss.usermodel.IndexedColors;
/**
* 指导帮扶-直属单位考核评价否决项对象 sj_zdbf_zsdwkhpjfjx
*
* @author qianhe
* @date 2024-07-24
*/
@Data
public class SjZdbfZsdwkhpjfjx extends BaseEntity
{
private static final long serialVersionUID = 1L;
@Excel(name = "单位名称)")
private String deptName;
/** 年度 */
@Excel(name = "年度")
private String nd;
/** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel(name = "周期范围")
private String zqfw;
/** 周期类型(季度、半年度、年度) */
// @Excel(name = "周期类型", readConverterExp = "季=度、半年度、年度")
private String zqlx;
/** 级别(直属单位(半年度)、基层单位(季度)、三基帮扶组(年度)) */
// @Excel(name = "级别", readConverterExp = "直=属单位(半年度")
private String jb;
/** 分类名称 */
@Excel(name = "分类名称")
private String flmc;
/** 评价标准名称 */
@Excel(name = "评价标准")
private String pjbzmc;
/** 是否发生 */
@Excel(name = "是否发生")
private String sffs;
/** 问题描述 */
@Excel(name = "问题描述")
private String wtms;
/** 预留1 */
// @Excel(name = "预留1")
private Long 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;
/** 主键 */
@Excel(name = "id(勿动)",headerColor = IndexedColors.RED1)
private Long id;
/** 主表id */
@Excel(name = "主表id(勿动)",headerColor = IndexedColors.RED1)
private Long zbId;
/** 单位id */
@Excel(name = "单位id(勿动)",headerColor = IndexedColors.RED1)
private Long deptId;
/** 评价标准id */
@Excel(name = "评价标准id")
private String pjbzid;
}
package com.qianhe.domain;
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;
/**
* 指导帮扶-直属单位问题采集对象 sj_zdbf_zsdwwtcj
*
* @author qianhe
* @date 2024-07-23
*/
@Data
public class SjZdbfZsdwwtcj extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 单位id */
@Excel(name = "单位id")
private Long deptId;
/** 日期 */
@Excel(name = "日期")
private String rq;
/** 检查级别(直属单位自查、三级帮扶组、机关部门专项检查) */
@Excel(name = "检查级别", readConverterExp = "直=属单位自查、三级帮扶组、机关部门专项检查")
private String jcjb;
/** 问题描述 */
@Excel(name = "问题描述")
private String wtmc;
/** 考核内容 */
@Excel(name = "考核内容")
private String khnr;
/** 考核项点 */
@Excel(name = "考核项点")
private String khxd;
/** 评价标准id */
@Excel(name = "评价标准id")
private String pjbzid;
/** 评价标准名称 */
@Excel(name = "评价标准名称")
private String pjbzmc;
/** 整改责任人 */
@Excel(name = "整改责任人")
private String zgzrr;
/** 整改措施 */
@Excel(name = "整改措施")
private String zgcs;
/** 整改期限 */
@Excel(name = "整改期限")
private String zgqx;
/** 整改状态 */
@Excel(name = "整改状态")
private String zgzt;
/** 预留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 String deptName;
private String startRq;
private String endRq;
private String deptLx;
}
......@@ -90,4 +90,16 @@ public interface SjZdbfFjxbzMapper
List<SjZdbfFjxbzCb> selectSjZdbfFjxbzCbById(Long id);
List<String> getFlmcList(SjZdbfFjxbzCb cb);
List<SjZdbfFjxbzCb> getPjbzList(SjZdbfFjxbzCb cb);
SjZdbfFjxbzCb selectSjZdbfFjxbzCb(SjZdbfFjxbzCb sjZdbfFjxbzCb);
List<SjZdbfFjxbzCb> selectSjZdbfFjxbzCxBzList(SjZdbfFjxbzCb sjZdbfFjxbzCb);
}
......@@ -91,4 +91,16 @@ public interface SjZdbfKhpjbzMapper
List<SjZdbfKhpjbz> selectSjZdbfKhpjbzCxList(SjZdbfKhpjbz sjZdbfKhpjbz);
List<String> getKhnrList(SjZdbfKhpjbzCb cb);
List<String> getKhxdList(SjZdbfKhpjbzCb cb);
List<SjZdbfKhpjbzCb> getPjbzList(SjZdbfKhpjbzCb cb);
SjZdbfKhpjbzCb selectSjZdbfKhpjbzCb(SjZdbfKhpjbzCb sjZdbfKhpjbzCb);
List<SjZdbfKhpjbzCb> selectSjZdbfKhpjbzCxBzList(SjZdbfKhpjbz sjZdbfKhpjbz);
}
package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjZdbfFjxbzCb;
import com.qianhe.domain.SjZdbfZsdwfjxcj;
/**
* 指导帮扶-直属单位否决项采集Mapper接口
*
* @author qianhe
* @date 2024-07-24
*/
public interface SjZdbfZsdwfjxcjMapper
{
/**
* 查询指导帮扶-直属单位否决项采集
*
* @param id 指导帮扶-直属单位否决项采集主键
* @return 指导帮扶-直属单位否决项采集
*/
public SjZdbfZsdwfjxcj selectSjZdbfZsdwfjxcjById(Long id);
/**
* 查询指导帮扶-直属单位否决项采集列表
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 指导帮扶-直属单位否决项采集集合
*/
public List<SjZdbfZsdwfjxcj> selectSjZdbfZsdwfjxcjList(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj);
/**
* 新增指导帮扶-直属单位否决项采集
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 结果
*/
public int insertSjZdbfZsdwfjxcj(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj);
/**
* 修改指导帮扶-直属单位否决项采集
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 结果
*/
public int updateSjZdbfZsdwfjxcj(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj);
/**
* 删除指导帮扶-直属单位否决项采集
*
* @param id 指导帮扶-直属单位否决项采集主键
* @return 结果
*/
public int deleteSjZdbfZsdwfjxcjById(Long id);
/**
* 批量删除指导帮扶-直属单位否决项采集
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwfjxcjByIds(Long[] ids);
int batchSave(List<SjZdbfZsdwfjxcj> list);
}
package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwkhpj;
/**
* 指导帮扶-直属单位考核评价Mapper接口
*
* @author qianhe
* @date 2024-07-24
*/
public interface SjZdbfZsdwkhpjMapper
{
/**
* 查询指导帮扶-直属单位考核评价
*
* @param id 指导帮扶-直属单位考核评价主键
* @return 指导帮扶-直属单位考核评价
*/
public SjZdbfZsdwkhpj selectSjZdbfZsdwkhpjById(Long id);
/**
* 查询指导帮扶-直属单位考核评价列表
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 指导帮扶-直属单位考核评价集合
*/
public List<SjZdbfZsdwkhpj> selectSjZdbfZsdwkhpjList(SjZdbfZsdwkhpj sjZdbfZsdwkhpj);
/**
* 新增指导帮扶-直属单位考核评价
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 结果
*/
public int insertSjZdbfZsdwkhpj(SjZdbfZsdwkhpj sjZdbfZsdwkhpj);
/**
* 修改指导帮扶-直属单位考核评价
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 结果
*/
public int updateSjZdbfZsdwkhpj(SjZdbfZsdwkhpj sjZdbfZsdwkhpj);
/**
* 删除指导帮扶-直属单位考核评价
*
* @param id 指导帮扶-直属单位考核评价主键
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjById(Long id);
/**
* 批量删除指导帮扶-直属单位考核评价
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjByIds(Long[] ids);
int batchSave(List<SjZdbfZsdwkhpj> addList);
int pledit(List<SjZdbfZsdwkhpj> list);
}
package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwkhpjZb;
/**
* 指导帮扶-直属单位考核评价主Mapper接口
*
* @author qianhe
* @date 2024-07-24
*/
public interface SjZdbfZsdwkhpjZbMapper
{
/**
* 查询指导帮扶-直属单位考核评价主
*
* @param id 指导帮扶-直属单位考核评价主主键
* @return 指导帮扶-直属单位考核评价主
*/
public SjZdbfZsdwkhpjZb selectSjZdbfZsdwkhpjZbById(Long id);
/**
* 查询指导帮扶-直属单位考核评价主列表
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 指导帮扶-直属单位考核评价主集合
*/
public List<SjZdbfZsdwkhpjZb> selectSjZdbfZsdwkhpjZbList(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb);
/**
* 新增指导帮扶-直属单位考核评价主
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 结果
*/
public int insertSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb);
/**
* 修改指导帮扶-直属单位考核评价主
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 结果
*/
public int updateSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb);
/**
* 删除指导帮扶-直属单位考核评价主
*
* @param id 指导帮扶-直属单位考核评价主主键
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjZbById(Long id);
/**
* 批量删除指导帮扶-直属单位考核评价主
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjZbByIds(Long[] ids);
SjZdbfZsdwkhpjZb selectSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb);
}
package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwkhpjfjx;
/**
* 指导帮扶-直属单位考核评价否决项Mapper接口
*
* @author qianhe
* @date 2024-07-24
*/
public interface SjZdbfZsdwkhpjfjxMapper
{
/**
* 查询指导帮扶-直属单位考核评价否决项
*
* @param id 指导帮扶-直属单位考核评价否决项主键
* @return 指导帮扶-直属单位考核评价否决项
*/
public SjZdbfZsdwkhpjfjx selectSjZdbfZsdwkhpjfjxById(Long id);
/**
* 查询指导帮扶-直属单位考核评价否决项列表
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 指导帮扶-直属单位考核评价否决项集合
*/
public List<SjZdbfZsdwkhpjfjx> selectSjZdbfZsdwkhpjfjxList(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx);
/**
* 新增指导帮扶-直属单位考核评价否决项
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 结果
*/
public int insertSjZdbfZsdwkhpjfjx(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx);
/**
* 修改指导帮扶-直属单位考核评价否决项
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 结果
*/
public int updateSjZdbfZsdwkhpjfjx(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx);
/**
* 删除指导帮扶-直属单位考核评价否决项
*
* @param id 指导帮扶-直属单位考核评价否决项主键
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjfjxById(Long id);
/**
* 批量删除指导帮扶-直属单位考核评价否决项
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjfjxByIds(Long[] ids);
int batchSave(List<SjZdbfZsdwkhpjfjx> fjxList);
int pledit(List<SjZdbfZsdwkhpjfjx> list);
}
package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwwtcj;
/**
* 指导帮扶-直属单位问题采集Mapper接口
*
* @author qianhe
* @date 2024-07-23
*/
public interface SjZdbfZsdwwtcjMapper
{
/**
* 查询指导帮扶-直属单位问题采集
*
* @param id 指导帮扶-直属单位问题采集主键
* @return 指导帮扶-直属单位问题采集
*/
public SjZdbfZsdwwtcj selectSjZdbfZsdwwtcjById(Long id);
/**
* 查询指导帮扶-直属单位问题采集列表
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 指导帮扶-直属单位问题采集集合
*/
public List<SjZdbfZsdwwtcj> selectSjZdbfZsdwwtcjList(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
/**
* 新增指导帮扶-直属单位问题采集
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 结果
*/
public int insertSjZdbfZsdwwtcj(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
/**
* 修改指导帮扶-直属单位问题采集
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 结果
*/
public int updateSjZdbfZsdwwtcj(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
/**
* 删除指导帮扶-直属单位问题采集
*
* @param id 指导帮扶-直属单位问题采集主键
* @return 结果
*/
public int deleteSjZdbfZsdwwtcjById(Long id);
/**
* 批量删除指导帮扶-直属单位问题采集
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwwtcjByIds(Long[] ids);
int batchSave(List<SjZdbfZsdwwtcj> list);
}
......@@ -2,6 +2,7 @@ package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjZdbfFjxbz;
import com.qianhe.domain.SjZdbfFjxbzCb;
/**
* 指导帮扶-否决项标准Service接口
......@@ -61,4 +62,10 @@ public interface ISjZdbfFjxbzService
List<SjZdbfFjxbz> selectSjZdbfFjxbzCxList(SjZdbfFjxbz sjZdbfFjxbz);
List<String> getFlmcList(SjZdbfFjxbzCb cb);
List<SjZdbfFjxbzCb> getPjbzList(SjZdbfFjxbzCb cb);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.domain.SjZdbfKhpjbz;
import com.qianhe.domain.SjZdbfKhpjbzCb;
/**
* 指导帮扶-考核评价标准Service接口
......@@ -62,4 +65,11 @@ public interface ISjZdbfKhpjbzService
List<SjZdbfKhpjbz> selectSjZdbfKhpjbzCxList(SjZdbfKhpjbz sjZdbfKhpjbz);
List<String> getKhnrList(SjZdbfKhpjbzCb cb);
List<String> getKhxdList(SjZdbfKhpjbzCb cb);
List<SjZdbfKhpjbzCb> getPjbzList(SjZdbfKhpjbzCb cb);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwfjxcj;
/**
* 指导帮扶-直属单位否决项采集Service接口
*
* @author qianhe
* @date 2024-07-24
*/
public interface ISjZdbfZsdwfjxcjService
{
/**
* 查询指导帮扶-直属单位否决项采集
*
* @param id 指导帮扶-直属单位否决项采集主键
* @return 指导帮扶-直属单位否决项采集
*/
public SjZdbfZsdwfjxcj selectSjZdbfZsdwfjxcjById(Long id);
/**
* 查询指导帮扶-直属单位否决项采集列表
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 指导帮扶-直属单位否决项采集集合
*/
public List<SjZdbfZsdwfjxcj> selectSjZdbfZsdwfjxcjList(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj);
/**
* 新增指导帮扶-直属单位否决项采集
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 结果
*/
public int insertSjZdbfZsdwfjxcj(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj);
/**
* 修改指导帮扶-直属单位否决项采集
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 结果
*/
public int updateSjZdbfZsdwfjxcj(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj);
/**
* 批量删除指导帮扶-直属单位否决项采集
*
* @param ids 需要删除的指导帮扶-直属单位否决项采集主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwfjxcjByIds(Long[] ids);
/**
* 删除指导帮扶-直属单位否决项采集信息
*
* @param id 指导帮扶-直属单位否决项采集主键
* @return 结果
*/
public int deleteSjZdbfZsdwfjxcjById(Long id);
int batchSave(List<SjZdbfZsdwfjxcj> list);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwkhpj;
/**
* 指导帮扶-直属单位考核评价Service接口
*
* @author qianhe
* @date 2024-07-24
*/
public interface ISjZdbfZsdwkhpjService
{
/**
* 查询指导帮扶-直属单位考核评价
*
* @param id 指导帮扶-直属单位考核评价主键
* @return 指导帮扶-直属单位考核评价
*/
public SjZdbfZsdwkhpj selectSjZdbfZsdwkhpjById(Long id);
/**
* 查询指导帮扶-直属单位考核评价列表
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 指导帮扶-直属单位考核评价集合
*/
public List<SjZdbfZsdwkhpj> selectSjZdbfZsdwkhpjList(SjZdbfZsdwkhpj sjZdbfZsdwkhpj);
/**
* 新增指导帮扶-直属单位考核评价
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 结果
*/
public int insertSjZdbfZsdwkhpj(SjZdbfZsdwkhpj sjZdbfZsdwkhpj);
/**
* 修改指导帮扶-直属单位考核评价
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 结果
*/
public int updateSjZdbfZsdwkhpj(SjZdbfZsdwkhpj sjZdbfZsdwkhpj);
/**
* 批量删除指导帮扶-直属单位考核评价
*
* @param ids 需要删除的指导帮扶-直属单位考核评价主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjByIds(Long[] ids);
/**
* 删除指导帮扶-直属单位考核评价信息
*
* @param id 指导帮扶-直属单位考核评价主键
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjById(Long id);
int batchSave(List<SjZdbfZsdwkhpj> addList);
int pledit(List<SjZdbfZsdwkhpj> list);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwkhpjZb;
/**
* 指导帮扶-直属单位考核评价主Service接口
*
* @author qianhe
* @date 2024-07-24
*/
public interface ISjZdbfZsdwkhpjZbService
{
/**
* 查询指导帮扶-直属单位考核评价主
*
* @param id 指导帮扶-直属单位考核评价主主键
* @return 指导帮扶-直属单位考核评价主
*/
public SjZdbfZsdwkhpjZb selectSjZdbfZsdwkhpjZbById(Long id);
/**
* 查询指导帮扶-直属单位考核评价主列表
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 指导帮扶-直属单位考核评价主集合
*/
public List<SjZdbfZsdwkhpjZb> selectSjZdbfZsdwkhpjZbList(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb);
/**
* 新增指导帮扶-直属单位考核评价主
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 结果
*/
public int insertSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb);
/**
* 修改指导帮扶-直属单位考核评价主
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 结果
*/
public int updateSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb);
/**
* 批量删除指导帮扶-直属单位考核评价主
*
* @param ids 需要删除的指导帮扶-直属单位考核评价主主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjZbByIds(Long[] ids);
/**
* 删除指导帮扶-直属单位考核评价主信息
*
* @param id 指导帮扶-直属单位考核评价主主键
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjZbById(Long id);
SjZdbfZsdwkhpjZb selectSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwkhpjfjx;
/**
* 指导帮扶-直属单位考核评价否决项Service接口
*
* @author qianhe
* @date 2024-07-24
*/
public interface ISjZdbfZsdwkhpjfjxService
{
/**
* 查询指导帮扶-直属单位考核评价否决项
*
* @param id 指导帮扶-直属单位考核评价否决项主键
* @return 指导帮扶-直属单位考核评价否决项
*/
public SjZdbfZsdwkhpjfjx selectSjZdbfZsdwkhpjfjxById(Long id);
/**
* 查询指导帮扶-直属单位考核评价否决项列表
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 指导帮扶-直属单位考核评价否决项集合
*/
public List<SjZdbfZsdwkhpjfjx> selectSjZdbfZsdwkhpjfjxList(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx);
/**
* 新增指导帮扶-直属单位考核评价否决项
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 结果
*/
public int insertSjZdbfZsdwkhpjfjx(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx);
/**
* 修改指导帮扶-直属单位考核评价否决项
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 结果
*/
public int updateSjZdbfZsdwkhpjfjx(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx);
/**
* 批量删除指导帮扶-直属单位考核评价否决项
*
* @param ids 需要删除的指导帮扶-直属单位考核评价否决项主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjfjxByIds(Long[] ids);
/**
* 删除指导帮扶-直属单位考核评价否决项信息
*
* @param id 指导帮扶-直属单位考核评价否决项主键
* @return 结果
*/
public int deleteSjZdbfZsdwkhpjfjxById(Long id);
int batchSave(List<SjZdbfZsdwkhpjfjx> fjxList);
int pledit(List<SjZdbfZsdwkhpjfjx> list);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjZdbfZsdwwtcj;
/**
* 指导帮扶-直属单位问题采集Service接口
*
* @author qianhe
* @date 2024-07-23
*/
public interface ISjZdbfZsdwwtcjService
{
/**
* 查询指导帮扶-直属单位问题采集
*
* @param id 指导帮扶-直属单位问题采集主键
* @return 指导帮扶-直属单位问题采集
*/
public SjZdbfZsdwwtcj selectSjZdbfZsdwwtcjById(Long id);
/**
* 查询指导帮扶-直属单位问题采集列表
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 指导帮扶-直属单位问题采集集合
*/
public List<SjZdbfZsdwwtcj> selectSjZdbfZsdwwtcjList(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
/**
* 新增指导帮扶-直属单位问题采集
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 结果
*/
public int insertSjZdbfZsdwwtcj(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
/**
* 修改指导帮扶-直属单位问题采集
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 结果
*/
public int updateSjZdbfZsdwwtcj(SjZdbfZsdwwtcj sjZdbfZsdwwtcj);
/**
* 批量删除指导帮扶-直属单位问题采集
*
* @param ids 需要删除的指导帮扶-直属单位问题采集主键集合
* @return 结果
*/
public int deleteSjZdbfZsdwwtcjByIds(Long[] ids);
/**
* 删除指导帮扶-直属单位问题采集信息
*
* @param id 指导帮扶-直属单位问题采集主键
* @return 结果
*/
public int deleteSjZdbfZsdwwtcjById(Long id);
int batchSave(List<SjZdbfZsdwwtcj> list);
}
......@@ -116,6 +116,16 @@ public class SjZdbfFjxbzServiceImpl implements ISjZdbfFjxbzService
return sjZdbfFjxbzMapper.selectSjZdbfFjxbzCxList(sjZdbfFjxbz);
}
@Override
public List<String> getFlmcList(SjZdbfFjxbzCb cb) {
return sjZdbfFjxbzMapper.getFlmcList(cb);
}
@Override
public List<SjZdbfFjxbzCb> getPjbzList(SjZdbfFjxbzCb cb) {
return sjZdbfFjxbzMapper.getPjbzList(cb);
}
/**
* 新增指导帮扶-否决项标准从信息
*
......@@ -128,10 +138,12 @@ public class SjZdbfFjxbzServiceImpl implements ISjZdbfFjxbzService
if (StringUtils.isNotNull(sjZdbfFjxbzCbList))
{
List<SjZdbfFjxbzCb> list = new ArrayList<SjZdbfFjxbzCb>();
for (SjZdbfFjxbzCb sjZdbfFjxbzCb : sjZdbfFjxbzCbList)
for (int i=0;i<sjZdbfFjxbzCbList.size();i++)
{
SjZdbfFjxbzCb sjZdbfFjxbzCb = sjZdbfFjxbzCbList.get(i);
sjZdbfFjxbzCb.setFlmc(sjZdbfFjxbz.getFlmc());
sjZdbfFjxbzCb.setNd(sjZdbfFjxbz.getNd());
sjZdbfFjxbzCb.setPx(i+1L);
sjZdbfFjxbzCb.setZbId(id);
list.add(sjZdbfFjxbzCb);
}
......
......@@ -119,6 +119,21 @@ public class SjZdbfKhpjbzServiceImpl implements ISjZdbfKhpjbzService
return sjZdbfKhpjbzMapper.selectSjZdbfKhpjbzCxList(sjZdbfKhpjbz);
}
@Override
public List<String> getKhnrList(SjZdbfKhpjbzCb cb) {
return sjZdbfKhpjbzMapper.getKhnrList(cb);
}
@Override
public List<String> getKhxdList(SjZdbfKhpjbzCb cb) {
return sjZdbfKhpjbzMapper.getKhxdList(cb);
}
@Override
public List<SjZdbfKhpjbzCb> getPjbzList(SjZdbfKhpjbzCb cb) {
return sjZdbfKhpjbzMapper.getPjbzList(cb);
}
/**
* 新增指导帮扶-考核评价标准从信息
*
......@@ -131,8 +146,9 @@ public class SjZdbfKhpjbzServiceImpl implements ISjZdbfKhpjbzService
if (StringUtils.isNotNull(sjZdbfKhpjbzCbList))
{
List<SjZdbfKhpjbzCb> list = new ArrayList<SjZdbfKhpjbzCb>();
for (SjZdbfKhpjbzCb sjZdbfKhpjbzCb : sjZdbfKhpjbzCbList)
for (int i=0;i<sjZdbfKhpjbzCbList.size();i++)
{
SjZdbfKhpjbzCb sjZdbfKhpjbzCb = sjZdbfKhpjbzCbList.get(i);
sjZdbfKhpjbzCb.setCreateBy(SecurityUtils.getUsername());
sjZdbfKhpjbzCb.setCreateTime(DateUtils.getNowDate());
sjZdbfKhpjbzCb.setKhnr(sjZdbfKhpjbz.getKhnr());
......@@ -140,6 +156,7 @@ public class SjZdbfKhpjbzServiceImpl implements ISjZdbfKhpjbzService
sjZdbfKhpjbzCb.setLx(sjZdbfKhpjbz.getLx());
sjZdbfKhpjbzCb.setNd(sjZdbfKhpjbz.getNd());
sjZdbfKhpjbzCb.setZbId(id);
sjZdbfKhpjbzCb.setPx(i+1L);
list.add(sjZdbfKhpjbzCb);
}
if (list.size() > 0)
......
package com.qianhe.service.impl;
import java.util.List;
import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qianhe.mapper.SjZdbfZsdwfjxcjMapper;
import com.qianhe.domain.SjZdbfZsdwfjxcj;
import com.qianhe.service.ISjZdbfZsdwfjxcjService;
/**
* 指导帮扶-直属单位否决项采集Service业务层处理
*
* @author qianhe
* @date 2024-07-24
*/
@Service
public class SjZdbfZsdwfjxcjServiceImpl implements ISjZdbfZsdwfjxcjService
{
@Autowired
private SjZdbfZsdwfjxcjMapper sjZdbfZsdwfjxcjMapper;
/**
* 查询指导帮扶-直属单位否决项采集
*
* @param id 指导帮扶-直属单位否决项采集主键
* @return 指导帮扶-直属单位否决项采集
*/
@Override
public SjZdbfZsdwfjxcj selectSjZdbfZsdwfjxcjById(Long id)
{
return sjZdbfZsdwfjxcjMapper.selectSjZdbfZsdwfjxcjById(id);
}
/**
* 查询指导帮扶-直属单位否决项采集列表
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 指导帮扶-直属单位否决项采集
*/
@Override
@DataScope(deptAlias = "d")
public List<SjZdbfZsdwfjxcj> selectSjZdbfZsdwfjxcjList(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj)
{
return sjZdbfZsdwfjxcjMapper.selectSjZdbfZsdwfjxcjList(sjZdbfZsdwfjxcj);
}
/**
* 新增指导帮扶-直属单位否决项采集
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 结果
*/
@Override
public int insertSjZdbfZsdwfjxcj(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj)
{
sjZdbfZsdwfjxcj.setCreateTime(DateUtils.getNowDate());
sjZdbfZsdwfjxcj.setCreateBy(SecurityUtils.getUsername());
return sjZdbfZsdwfjxcjMapper.insertSjZdbfZsdwfjxcj(sjZdbfZsdwfjxcj);
}
/**
* 修改指导帮扶-直属单位否决项采集
*
* @param sjZdbfZsdwfjxcj 指导帮扶-直属单位否决项采集
* @return 结果
*/
@Override
public int updateSjZdbfZsdwfjxcj(SjZdbfZsdwfjxcj sjZdbfZsdwfjxcj)
{
sjZdbfZsdwfjxcj.setUpdateTime(DateUtils.getNowDate());
sjZdbfZsdwfjxcj.setUpdateBy(SecurityUtils.getUsername());
return sjZdbfZsdwfjxcjMapper.updateSjZdbfZsdwfjxcj(sjZdbfZsdwfjxcj);
}
/**
* 批量删除指导帮扶-直属单位否决项采集
*
* @param ids 需要删除的指导帮扶-直属单位否决项采集主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwfjxcjByIds(Long[] ids)
{
return sjZdbfZsdwfjxcjMapper.deleteSjZdbfZsdwfjxcjByIds(ids);
}
/**
* 删除指导帮扶-直属单位否决项采集信息
*
* @param id 指导帮扶-直属单位否决项采集主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwfjxcjById(Long id)
{
return sjZdbfZsdwfjxcjMapper.deleteSjZdbfZsdwfjxcjById(id);
}
@Override
public int batchSave(List<SjZdbfZsdwfjxcj> list) {
return sjZdbfZsdwfjxcjMapper.batchSave(list);
}
}
package com.qianhe.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.core.domain.entity.SysDept;
import com.qianhe.common.core.domain.entity.SysDictData;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils;
import com.qianhe.common.utils.StringUtils;
import com.qianhe.domain.SjZdbfZsdwkhpjZb;
import com.qianhe.mapper.SjZdbfZsdwkhpjZbMapper;
import com.qianhe.system.mapper.SysDeptMapper;
import com.qianhe.system.mapper.SysDictDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qianhe.mapper.SjZdbfZsdwkhpjMapper;
import com.qianhe.domain.SjZdbfZsdwkhpj;
import com.qianhe.service.ISjZdbfZsdwkhpjService;
/**
* 指导帮扶-直属单位考核评价Service业务层处理
*
* @author qianhe
* @date 2024-07-24
*/
@Service
public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService
{
@Autowired
private SjZdbfZsdwkhpjMapper sjZdbfZsdwkhpjMapper;
@Autowired
private SjZdbfZsdwkhpjZbMapper sjZdbfZsdwkhpjZbMapper;
@Autowired
private SysDictDataMapper sysDictDataMapper;
@Autowired
private SysDeptMapper sysDeptMapper;
/**
* 查询指导帮扶-直属单位考核评价
*
* @param id 指导帮扶-直属单位考核评价主键
* @return 指导帮扶-直属单位考核评价
*/
@Override
public SjZdbfZsdwkhpj selectSjZdbfZsdwkhpjById(Long id)
{
return sjZdbfZsdwkhpjMapper.selectSjZdbfZsdwkhpjById(id);
}
/**
* 查询指导帮扶-直属单位考核评价列表
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 指导帮扶-直属单位考核评价
*/
@Override
@DataScope(deptAlias = "d")
public List<SjZdbfZsdwkhpj> selectSjZdbfZsdwkhpjList(SjZdbfZsdwkhpj sjZdbfZsdwkhpj)
{
return sjZdbfZsdwkhpjMapper.selectSjZdbfZsdwkhpjList(sjZdbfZsdwkhpj);
}
/**
* 新增指导帮扶-直属单位考核评价
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 结果
*/
@Override
public int insertSjZdbfZsdwkhpj(SjZdbfZsdwkhpj sjZdbfZsdwkhpj)
{
sjZdbfZsdwkhpj.setCreateTime(DateUtils.getNowDate());
return sjZdbfZsdwkhpjMapper.insertSjZdbfZsdwkhpj(sjZdbfZsdwkhpj);
}
/**
* 修改指导帮扶-直属单位考核评价
*
* @param sjZdbfZsdwkhpj 指导帮扶-直属单位考核评价
* @return 结果
*/
@Override
public int updateSjZdbfZsdwkhpj(SjZdbfZsdwkhpj sjZdbfZsdwkhpj)
{
sjZdbfZsdwkhpj.setUpdateTime(DateUtils.getNowDate());
sjZdbfZsdwkhpj.setUpdateBy(SecurityUtils.getUsername());
//计算分数
return sjZdbfZsdwkhpjMapper.updateSjZdbfZsdwkhpj(sjZdbfZsdwkhpj);
}
/**
* 批量删除指导帮扶-直属单位考核评价
*
* @param ids 需要删除的指导帮扶-直属单位考核评价主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwkhpjByIds(Long[] ids)
{
return sjZdbfZsdwkhpjMapper.deleteSjZdbfZsdwkhpjByIds(ids);
}
/**
* 删除指导帮扶-直属单位考核评价信息
*
* @param id 指导帮扶-直属单位考核评价主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwkhpjById(Long id)
{
return sjZdbfZsdwkhpjMapper.deleteSjZdbfZsdwkhpjById(id);
}
@Override
public int batchSave(List<SjZdbfZsdwkhpj> addList) {
return sjZdbfZsdwkhpjMapper.batchSave(addList);
}
@Override
public int pledit(List<SjZdbfZsdwkhpj> list) {
//计算分数
SjZdbfZsdwkhpj sjZdbfZsdwkhpj = list.get(0);
SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb = sjZdbfZsdwkhpjZbMapper.selectSjZdbfZsdwkhpjZbById(sjZdbfZsdwkhpj.getZbId());
SysDept dept = sysDeptMapper.selectDeptById(sjZdbfZsdwkhpjZb.getDeptId());
Map<String,List<SjZdbfZsdwkhpj>> stringListMap = list.stream().collect(Collectors.groupingBy(SjZdbfZsdwkhpj::getKhnr));
List<SysDictData> zdbfKhnr = sysDictDataMapper.selectDictDataByType("zdbf_khnr");
for(SysDictData data:zdbfKhnr){
String dictValue = data.getDictValue();
List<SjZdbfZsdwkhpj> sjZdbfZsdwkhpjs = stringListMap.get(data.getDictValue());
//计算分数
List<Double> doubleList=new ArrayList<>();
if(sjZdbfZsdwkhpjs==null){
continue;
}
sjZdbfZsdwkhpjs.forEach(item->{
if(StringUtils.isEmpty(item.getKhfz())){
item.setKhfz("0");
}
doubleList.add(Double.parseDouble(item.getKhfz()));
});
double kf = doubleList.stream().mapToDouble(Double::doubleValue).sum();
if("党建引领".equals(dictValue)){
//扣分
sjZdbfZsdwkhpjZb.setDjyjkfs(new BigDecimal(kf));
//扣分比列
BigDecimal df = sjZdbfZsdwkhpjZb.getDjyjzfs().add(new BigDecimal(kf));
BigDecimal kfbl =df.divide(sjZdbfZsdwkhpjZb.getDjyjzfs(),BigDecimal.ROUND_CEILING).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP);
sjZdbfZsdwkhpjZb.setDjyjkfbl(new BigDecimal(100).subtract(kfbl));
//得分
sjZdbfZsdwkhpjZb.setDjyjdf(df);
} else if ("素质提升".equals(dictValue)) {
//扣分
sjZdbfZsdwkhpjZb.setSztskfs(new BigDecimal(kf));
//扣分比列
BigDecimal df = sjZdbfZsdwkhpjZb.getSztszfs().add(new BigDecimal(kf));
BigDecimal kfbl =df.divide(sjZdbfZsdwkhpjZb.getSztszfs(),BigDecimal.ROUND_CEILING).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP);
sjZdbfZsdwkhpjZb.setSztsfbl(new BigDecimal(100).subtract(kfbl));
//得分
sjZdbfZsdwkhpjZb.setSztsdf(df);
} else if ("管理精益".equals(dictValue)) {
sjZdbfZsdwkhpjZb.setGlgfkfs(new BigDecimal(kf));
//扣分比列
BigDecimal df = sjZdbfZsdwkhpjZb.getGlgfzfs().add(new BigDecimal(kf));
BigDecimal kfbl =df.divide(sjZdbfZsdwkhpjZb.getGlgfzfs(),BigDecimal.ROUND_CEILING).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP);
sjZdbfZsdwkhpjZb.setGlgfbl(new BigDecimal(100).subtract(kfbl));
//得分
sjZdbfZsdwkhpjZb.setGlgfdf(df);
} else if ("业务创效".equals(dictValue)) {
sjZdbfZsdwkhpjZb.setYwcxkfs(new BigDecimal(kf));
//扣分比列
BigDecimal df = sjZdbfZsdwkhpjZb.getYwcxzfs().add(new BigDecimal(kf));
BigDecimal kfbl =df.divide(sjZdbfZsdwkhpjZb.getYwcxzfs(),BigDecimal.ROUND_CEILING).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP);
sjZdbfZsdwkhpjZb.setYwcxbl(new BigDecimal(100).subtract(kfbl));
//得分
sjZdbfZsdwkhpjZb.setYwcxdf(df);
}
}
BigDecimal sum = sjZdbfZsdwkhpjZb.getDjyjzfs().add(sjZdbfZsdwkhpjZb.getSztszfs()).add(sjZdbfZsdwkhpjZb.getGlgfzfs()).add(sjZdbfZsdwkhpjZb.getYwcxzfs());
//总得分
BigDecimal sunfs = sjZdbfZsdwkhpjZb.getDjyjdf().add(sjZdbfZsdwkhpjZb.getSztsdf()).add(sjZdbfZsdwkhpjZb.getGlgfdf()).add(sjZdbfZsdwkhpjZb.getYwcxdf());
sjZdbfZsdwkhpjZb.setZdf(sunfs);
//总扣分
sjZdbfZsdwkhpjZb.setZkf(sum.subtract(sunfs));
//总扣分比例
BigDecimal bigDecimal = sunfs.divide(sum,BigDecimal.ROUND_CEILING).multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP);
sjZdbfZsdwkhpjZb.setZkfbl(new BigDecimal(100).subtract(bigDecimal));
//综合得分
String deptDfl = dept.getDeptDfl();
if(StringUtils.isNotEmpty(deptDfl)){
if ("B类".equals(deptDfl)) {
sjZdbfZsdwkhpjZb.setZhdf( sunfs.multiply(new BigDecimal(0.9)).setScale(2, BigDecimal.ROUND_HALF_UP));
}else if ("C类".equals(deptDfl)) {
sjZdbfZsdwkhpjZb.setZhdf( sunfs.multiply(new BigDecimal(0.85)).setScale(2, BigDecimal.ROUND_HALF_UP));
}
}
//更新主表
sjZdbfZsdwkhpjZbMapper.updateSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZb);
return sjZdbfZsdwkhpjMapper.pledit(list);
}
}
package com.qianhe.service.impl;
import java.util.List;
import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qianhe.mapper.SjZdbfZsdwkhpjZbMapper;
import com.qianhe.domain.SjZdbfZsdwkhpjZb;
import com.qianhe.service.ISjZdbfZsdwkhpjZbService;
/**
* 指导帮扶-直属单位考核评价主Service业务层处理
*
* @author qianhe
* @date 2024-07-24
*/
@Service
public class SjZdbfZsdwkhpjZbServiceImpl implements ISjZdbfZsdwkhpjZbService
{
@Autowired
private SjZdbfZsdwkhpjZbMapper sjZdbfZsdwkhpjZbMapper;
/**
* 查询指导帮扶-直属单位考核评价主
*
* @param id 指导帮扶-直属单位考核评价主主键
* @return 指导帮扶-直属单位考核评价主
*/
@Override
public SjZdbfZsdwkhpjZb selectSjZdbfZsdwkhpjZbById(Long id)
{
return sjZdbfZsdwkhpjZbMapper.selectSjZdbfZsdwkhpjZbById(id);
}
/**
* 查询指导帮扶-直属单位考核评价主列表
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 指导帮扶-直属单位考核评价主
*/
@Override
@DataScope(deptAlias = "d")
public List<SjZdbfZsdwkhpjZb> selectSjZdbfZsdwkhpjZbList(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb)
{
return sjZdbfZsdwkhpjZbMapper.selectSjZdbfZsdwkhpjZbList(sjZdbfZsdwkhpjZb);
}
/**
* 新增指导帮扶-直属单位考核评价主
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 结果
*/
@Override
public int insertSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb)
{
sjZdbfZsdwkhpjZb.setCreateTime(DateUtils.getNowDate());
return sjZdbfZsdwkhpjZbMapper.insertSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZb);
}
/**
* 修改指导帮扶-直属单位考核评价主
*
* @param sjZdbfZsdwkhpjZb 指导帮扶-直属单位考核评价主
* @return 结果
*/
@Override
public int updateSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb)
{
sjZdbfZsdwkhpjZb.setUpdateTime(DateUtils.getNowDate());
return sjZdbfZsdwkhpjZbMapper.updateSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZb);
}
/**
* 批量删除指导帮扶-直属单位考核评价主
*
* @param ids 需要删除的指导帮扶-直属单位考核评价主主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwkhpjZbByIds(Long[] ids)
{
return sjZdbfZsdwkhpjZbMapper.deleteSjZdbfZsdwkhpjZbByIds(ids);
}
/**
* 删除指导帮扶-直属单位考核评价主信息
*
* @param id 指导帮扶-直属单位考核评价主主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwkhpjZbById(Long id)
{
return sjZdbfZsdwkhpjZbMapper.deleteSjZdbfZsdwkhpjZbById(id);
}
@Override
public SjZdbfZsdwkhpjZb selectSjZdbfZsdwkhpjZb(SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb) {
return sjZdbfZsdwkhpjZbMapper.selectSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZb);
}
}
package com.qianhe.service.impl;
import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;
import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.domain.SjZdbfZsdwkhpj;
import com.qianhe.domain.SjZdbfZsdwkhpjZb;
import com.qianhe.mapper.SjZdbfZsdwkhpjZbMapper;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qianhe.mapper.SjZdbfZsdwkhpjfjxMapper;
import com.qianhe.domain.SjZdbfZsdwkhpjfjx;
import com.qianhe.service.ISjZdbfZsdwkhpjfjxService;
/**
* 指导帮扶-直属单位考核评价否决项Service业务层处理
*
* @author qianhe
* @date 2024-07-24
*/
@Service
public class SjZdbfZsdwkhpjfjxServiceImpl implements ISjZdbfZsdwkhpjfjxService
{
@Autowired
private SjZdbfZsdwkhpjfjxMapper sjZdbfZsdwkhpjfjxMapper;
@Autowired
private SjZdbfZsdwkhpjZbMapper sjZdbfZsdwkhpjZbMapper;
/**
* 查询指导帮扶-直属单位考核评价否决项
*
* @param id 指导帮扶-直属单位考核评价否决项主键
* @return 指导帮扶-直属单位考核评价否决项
*/
@Override
public SjZdbfZsdwkhpjfjx selectSjZdbfZsdwkhpjfjxById(Long id)
{
return sjZdbfZsdwkhpjfjxMapper.selectSjZdbfZsdwkhpjfjxById(id);
}
/**
* 查询指导帮扶-直属单位考核评价否决项列表
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 指导帮扶-直属单位考核评价否决项
*/
@Override
@DataScope(deptAlias = "d")
public List<SjZdbfZsdwkhpjfjx> selectSjZdbfZsdwkhpjfjxList(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx)
{
return sjZdbfZsdwkhpjfjxMapper.selectSjZdbfZsdwkhpjfjxList(sjZdbfZsdwkhpjfjx);
}
/**
* 新增指导帮扶-直属单位考核评价否决项
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 结果
*/
@Override
public int insertSjZdbfZsdwkhpjfjx(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx)
{
sjZdbfZsdwkhpjfjx.setCreateTime(DateUtils.getNowDate());
return sjZdbfZsdwkhpjfjxMapper.insertSjZdbfZsdwkhpjfjx(sjZdbfZsdwkhpjfjx);
}
/**
* 修改指导帮扶-直属单位考核评价否决项
*
* @param sjZdbfZsdwkhpjfjx 指导帮扶-直属单位考核评价否决项
* @return 结果
*/
@Override
public int updateSjZdbfZsdwkhpjfjx(SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx)
{
sjZdbfZsdwkhpjfjx.setUpdateTime(DateUtils.getNowDate());
return sjZdbfZsdwkhpjfjxMapper.updateSjZdbfZsdwkhpjfjx(sjZdbfZsdwkhpjfjx);
}
/**
* 批量删除指导帮扶-直属单位考核评价否决项
*
* @param ids 需要删除的指导帮扶-直属单位考核评价否决项主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwkhpjfjxByIds(Long[] ids)
{
return sjZdbfZsdwkhpjfjxMapper.deleteSjZdbfZsdwkhpjfjxByIds(ids);
}
/**
* 删除指导帮扶-直属单位考核评价否决项信息
*
* @param id 指导帮扶-直属单位考核评价否决项主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwkhpjfjxById(Long id)
{
return sjZdbfZsdwkhpjfjxMapper.deleteSjZdbfZsdwkhpjfjxById(id);
}
@Override
public int batchSave(List<SjZdbfZsdwkhpjfjx> fjxList) {
return sjZdbfZsdwkhpjfjxMapper.batchSave(fjxList);
}
@Override
public int pledit(List<SjZdbfZsdwkhpjfjx> list) {
SjZdbfZsdwkhpjfjx sjZdbfZsdwkhpjfjx = list.get(0);
SjZdbfZsdwkhpjZb sjZdbfZsdwkhpjZb = sjZdbfZsdwkhpjZbMapper.selectSjZdbfZsdwkhpjZbById(sjZdbfZsdwkhpjfjx.getZbId());
List<SjZdbfZsdwkhpjfjx> collect = list.stream().filter(item -> "是".equals(item.getSffs())).collect(Collectors.toList());
sjZdbfZsdwkhpjZb.setSffjxs(new BigDecimal(collect.size()));
sjZdbfZsdwkhpjZbMapper.updateSjZdbfZsdwkhpjZb(sjZdbfZsdwkhpjZb);
return sjZdbfZsdwkhpjfjxMapper.pledit(list);
}
}
package com.qianhe.service.impl;
import java.util.List;
import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qianhe.mapper.SjZdbfZsdwwtcjMapper;
import com.qianhe.domain.SjZdbfZsdwwtcj;
import com.qianhe.service.ISjZdbfZsdwwtcjService;
/**
* 指导帮扶-直属单位问题采集Service业务层处理
*
* @author qianhe
* @date 2024-07-23
*/
@Service
public class SjZdbfZsdwwtcjServiceImpl implements ISjZdbfZsdwwtcjService
{
@Autowired
private SjZdbfZsdwwtcjMapper sjZdbfZsdwwtcjMapper;
/**
* 查询指导帮扶-直属单位问题采集
*
* @param id 指导帮扶-直属单位问题采集主键
* @return 指导帮扶-直属单位问题采集
*/
@Override
public SjZdbfZsdwwtcj selectSjZdbfZsdwwtcjById(Long id)
{
SjZdbfZsdwwtcj zsdwwtcj = sjZdbfZsdwwtcjMapper.selectSjZdbfZsdwwtcjById(id);
return zsdwwtcj;
}
/**
* 查询指导帮扶-直属单位问题采集列表
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 指导帮扶-直属单位问题采集
*/
@Override
@DataScope(deptAlias = "d")
public List<SjZdbfZsdwwtcj> selectSjZdbfZsdwwtcjList(SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
return sjZdbfZsdwwtcjMapper.selectSjZdbfZsdwwtcjList(sjZdbfZsdwwtcj);
}
/**
* 新增指导帮扶-直属单位问题采集
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 结果
*/
@Override
public int insertSjZdbfZsdwwtcj(SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
sjZdbfZsdwwtcj.setCreateTime(DateUtils.getNowDate());
sjZdbfZsdwwtcj.setCreateBy(SecurityUtils.getUsername());
return sjZdbfZsdwwtcjMapper.insertSjZdbfZsdwwtcj(sjZdbfZsdwwtcj);
}
/**
* 修改指导帮扶-直属单位问题采集
*
* @param sjZdbfZsdwwtcj 指导帮扶-直属单位问题采集
* @return 结果
*/
@Override
public int updateSjZdbfZsdwwtcj(SjZdbfZsdwwtcj sjZdbfZsdwwtcj)
{
sjZdbfZsdwwtcj.setUpdateTime(DateUtils.getNowDate());
sjZdbfZsdwwtcj.setUpdateBy(SecurityUtils.getUsername());
return sjZdbfZsdwwtcjMapper.updateSjZdbfZsdwwtcj(sjZdbfZsdwwtcj);
}
/**
* 批量删除指导帮扶-直属单位问题采集
*
* @param ids 需要删除的指导帮扶-直属单位问题采集主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwwtcjByIds(Long[] ids)
{
return sjZdbfZsdwwtcjMapper.deleteSjZdbfZsdwwtcjByIds(ids);
}
/**
* 删除指导帮扶-直属单位问题采集信息
*
* @param id 指导帮扶-直属单位问题采集主键
* @return 结果
*/
@Override
public int deleteSjZdbfZsdwwtcjById(Long id)
{
return sjZdbfZsdwwtcjMapper.deleteSjZdbfZsdwwtcjById(id);
}
@Override
public int batchSave(List<SjZdbfZsdwwtcj> list) {
return sjZdbfZsdwwtcjMapper.batchSave(list);
}
}
......@@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where a.id = #{id}
</select>
<select id="selectSjZdbfFjxbzCxList" resultType="com.qianhe.domain.SjZdbfFjxbz">
select a.nd,a.flmc,a.px,b.pjbz,b.px
select a.id, a.nd,a.flmc,a.px,b.pjbz,b.px
from sj_zdbf_fjxbz a
left join sj_zdbf_fjxbz_cb b on a.id = b.zb_id
where 1=1
......@@ -81,6 +81,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSjZdbfFjxbzCbById" resultType="com.qianhe.domain.SjZdbfFjxbzCb">
select *from sj_zdbf_fjxbz_cb where zb_id=#{id}
</select>
<select id="getFlmcList" resultType="java.lang.String">
select distinct flmc from sj_zdbf_fjxbz_cb where nd=#{nd}
</select>
<select id="getPjbzList" resultType="com.qianhe.domain.SjZdbfFjxbzCb">
select id,pjbz from sj_zdbf_fjxbz_cb where nd=#{nd} and flmc=#{flmc}
</select>
<select id="selectSjZdbfFjxbzCb" resultType="com.qianhe.domain.SjZdbfFjxbzCb">
select * from sj_zdbf_fjxbz_cb where nd=#{nd} and flmc=#{flmc} and px=#{px}
</select>
<select id="selectSjZdbfFjxbzCxBzList" resultType="com.qianhe.domain.SjZdbfFjxbzCb">
select b.id,a.flmc,b.pjbz
from sj_zdbf_fjxbz a
left join sj_zdbf_fjxbz_cb b on a.id = b.zb_id
where 1=1
and a.nd = #{nd}
order by a.px,b.px
</select>
<insert id="insertSjZdbfFjxbz" parameterType="SjZdbfFjxbz" useGeneratedKeys="true" keyProperty="id">
insert into sj_zdbf_fjxbz
......
......@@ -85,7 +85,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
<if test="nd != null and nd != ''"> and a.nd = #{nd}</if>
<if test="lx != null and lx != ''"> and a.lx = #{lx}</if>
order by (case when a.khnr='党建引领' then 1 when a.khnr='素质提升' then 2 when a.khnr='管理精益' then 3 else 4 end) ,a.xppx,b.px
</select>
<select id="getKhnrList" resultType="java.lang.String">
select distinct khnr from sj_zdbf_khpjbz_cb
where 1=1
<if test="lx != null and lx != ''"> and lx = #{lx}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if>
</select>
<select id="getKhxdList" resultType="java.lang.String">
select distinct khxd from sj_zdbf_khpjbz_cb
where 1=1
<if test="khnr != null and khnr != ''"> and khnr = #{khnr}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if>
</select>
<select id="getPjbzList" resultType="com.qianhe.domain.SjZdbfKhpjbzCb">
select id,pjbz from sj_zdbf_khpjbz_cb
where 1=1
<if test="khxd != null and khxd != ''"> and khxd = #{khxd}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if>
</select>
<select id="selectSjZdbfKhpjbzCb" resultType="com.qianhe.domain.SjZdbfKhpjbzCb">
select * from sj_zdbf_khpjbz_cb where lx=#{lx} and khnr=#{khnr} and khxd=#{khxd} and px=#{px} and nd=#{nd}
</select>
<select id="selectSjZdbfKhpjbzCxBzList" resultType="com.qianhe.domain.SjZdbfKhpjbzCb">
select b.id, a.khnr,a.khxd,b.pjbz
from sj_zdbf_khpjbz a
left join sj_zdbf_khpjbz_cb b on a.id = b.zb_id
where 1=1
and a.lx=#{lx} and a.nd =#{nd}
order by (case when a.khnr='党建引领' then 1 when a.khnr='素质提升' then 2 when a.khnr='管理精益' then 3 else 4 end) ,a.xppx,b.px
</select>
<insert id="insertSjZdbfKhpjbz" parameterType="SjZdbfKhpjbz" useGeneratedKeys="true" keyProperty="id">
insert into sj_zdbf_khpjbz
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qianhe.mapper.SjZdbfZsdwfjxcjMapper">
<resultMap type="SjZdbfZsdwfjxcj" id="SjZdbfZsdwfjxcjResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="rq" column="rq" />
<result property="flmc" column="flmc" />
<result property="pjbzid" column="pjbzid" />
<result property="pjbzmc" column="pjbzmc" />
<result property="wtmc" column="wtmc" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="yl1" column="yl1" />
<result property="yl2" column="yl2" />
<result property="yl3" column="yl3" />
<result property="yl4" column="yl4" />
<result property="yl5" column="yl5" />
<result property="deptName" column="dept_name" />
</resultMap>
<sql id="selectSjZdbfZsdwfjxcjVo">
select id,
a.dept_id,
rq,
flmc,
pjbzid,
pjbzmc,
wtmc,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark,
yl1,
yl2,
yl3,
yl4,
yl5,d.dept_name
from sj_zdbf_zsdwfjxcj a
left join sys_dept d on a.dept_id=d.dept_id
</sql>
<select id="selectSjZdbfZsdwfjxcjList" parameterType="SjZdbfZsdwfjxcj" resultMap="SjZdbfZsdwfjxcjResult">
<include refid="selectSjZdbfZsdwfjxcjVo"/>
<where>
<if test="deptId != null ">and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="rq != null and rq != ''"> and rq = #{rq}</if>
<if test="flmc != null and flmc != ''"> and flmc = #{flmc}</if>
<if test="pjbzid != null and pjbzid != ''"> and pjbzid = #{pjbzid}</if>
<if test="pjbzmc != null and pjbzmc != ''"> and pjbzmc = #{pjbzmc}</if>
<if test="wtmc != null and wtmc != ''"> and wtmc = #{wtmc}</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="startRq != null and startRq != ''"> and rq >= #{startRq}</if>
<if test="endRq != null and endRq != ''"> and rq &lt;= #{endRq}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by a.rq desc
</select>
<select id="selectSjZdbfZsdwfjxcjById" parameterType="Long" resultMap="SjZdbfZsdwfjxcjResult">
<include refid="selectSjZdbfZsdwfjxcjVo"/>
where id = #{id}
</select>
<insert id="insertSjZdbfZsdwfjxcj" parameterType="SjZdbfZsdwfjxcj" useGeneratedKeys="true" keyProperty="id">
insert into sj_zdbf_zsdwfjxcj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="rq != null">rq,</if>
<if test="flmc != null">flmc,</if>
<if test="pjbzid != null">pjbzid,</if>
<if test="pjbzmc != null">pjbzmc,</if>
<if test="wtmc != null">wtmc,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="yl1 != null">yl1,</if>
<if test="yl2 != null">yl2,</if>
<if test="yl3 != null">yl3,</if>
<if test="yl4 != null">yl4,</if>
<if test="yl5 != null">yl5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="rq != null">#{rq},</if>
<if test="flmc != null">#{flmc},</if>
<if test="pjbzid != null">#{pjbzid},</if>
<if test="pjbzmc != null">#{pjbzmc},</if>
<if test="wtmc != null">#{wtmc},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="yl1 != null">#{yl1},</if>
<if test="yl2 != null">#{yl2},</if>
<if test="yl3 != null">#{yl3},</if>
<if test="yl4 != null">#{yl4},</if>
<if test="yl5 != null">#{yl5},</if>
</trim>
</insert>
<insert id="batchSave">
insert into sj_zdbf_zsdwfjxcj( id, dept_id, rq, flmc, pjbzid, pjbzmc, wtmc) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.deptId}, #{item.rq}, #{item.flmc}, #{item.pjbzid}, #{item.pjbzmc}, #{item.wtmc})
</foreach>
</insert>
<update id="updateSjZdbfZsdwfjxcj" parameterType="SjZdbfZsdwfjxcj">
update sj_zdbf_zsdwfjxcj
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="rq != null">rq = #{rq},</if>
<if test="flmc != null">flmc = #{flmc},</if>
<if test="pjbzid != null">pjbzid = #{pjbzid},</if>
<if test="pjbzmc != null">pjbzmc = #{pjbzmc},</if>
<if test="wtmc != null">wtmc = #{wtmc},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="yl1 != null">yl1 = #{yl1},</if>
<if test="yl2 != null">yl2 = #{yl2},</if>
<if test="yl3 != null">yl3 = #{yl3},</if>
<if test="yl4 != null">yl4 = #{yl4},</if>
<if test="yl5 != null">yl5 = #{yl5},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSjZdbfZsdwfjxcjById" parameterType="Long">
delete from sj_zdbf_zsdwfjxcj where id = #{id}
</delete>
<delete id="deleteSjZdbfZsdwfjxcjByIds" parameterType="String">
delete from sj_zdbf_zsdwfjxcj where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qianhe.mapper.SjZdbfZsdwkhpjMapper">
<resultMap type="SjZdbfZsdwkhpj" id="SjZdbfZsdwkhpjResult">
<result property="id" column="id" />
<result property="zbId" column="zb_id" />
<result property="deptId" column="dept_id" />
<result property="nd" column="nd" />
<result property="zqfw" column="zqfw" />
<result property="zqlx" column="zqlx" />
<result property="jb" column="jb" />
<result property="khnr" column="khnr" />
<result property="khxd" column="khxd" />
<result property="pjbzid" column="pjbzid" />
<result property="pjbzmc" column="pjbzmc" />
<result property="sj" column="sj" />
<result property="wtms" column="wtms" />
<result property="khfz" column="khfz" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="yl1" column="yl1" />
<result property="yl2" column="yl2" />
<result property="yl3" column="yl3" />
<result property="yl4" column="yl4" />
<result property="yl5" column="yl5" />
<result property="deptName" column="dept_name" />
</resultMap>
<sql id="selectSjZdbfZsdwkhpjVo">
select id,
zb_id,
a.dept_id,
nd,
zqfw,
zqlx,
jb,
khnr,
khxd,
pjbzid,
pjbzmc,
sj,
wtms,
khfz,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
remark,
yl1,
yl2,
yl3,
yl4,
yl5,d.dept_name
from sj_zdbf_zsdwkhpj a
left join sys_dept d on a.dept_id=d.dept_id
</sql>
<select id="selectSjZdbfZsdwkhpjList" parameterType="SjZdbfZsdwkhpj" resultMap="SjZdbfZsdwkhpjResult">
<include refid="selectSjZdbfZsdwkhpjVo"/>
<where>
<if test="zbId != null "> and zb_id = #{zbId}</if>
<if test="deptId != null "> and a.dept_id = #{deptId}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if>
<if test="zqfw != null and zqfw != ''"> and zqfw = #{zqfw}</if>
<if test="zqlx != null and zqlx != ''"> and zqlx = #{zqlx}</if>
<if test="jb != null and jb != ''"> and jb = #{jb}</if>
<if test="khnr != null and khnr != ''"> and khnr = #{khnr}</if>
<if test="khxd != null and khxd != ''"> and khxd = #{khxd}</if>
<if test="pjbzid != null and pjbzid != ''"> and pjbzid = #{pjbzid}</if>
<if test="pjbzmc != null and pjbzmc != ''"> and pjbzmc = #{pjbzmc}</if>
<if test="sj != null and sj != ''"> and sj = #{sj}</if>
<if test="wtms != null and wtms != ''"> and wtms = #{wtms}</if>
<if test="khfz != null and khfz != ''"> and khfz = #{khfz}</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>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by yl1
</select>
<select id="selectSjZdbfZsdwkhpjById" parameterType="Long" resultMap="SjZdbfZsdwkhpjResult">
<include refid="selectSjZdbfZsdwkhpjVo"/>
where id = #{id}
</select>
<insert id="insertSjZdbfZsdwkhpj" parameterType="SjZdbfZsdwkhpj" useGeneratedKeys="true" keyProperty="id">
insert into sj_zdbf_zsdwkhpj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="zbId != null">zb_id,</if>
<if test="deptId != null">dept_id,</if>
<if test="nd != null">nd,</if>
<if test="zqfw != null">zqfw,</if>
<if test="zqlx != null">zqlx,</if>
<if test="jb != null">jb,</if>
<if test="khnr != null">khnr,</if>
<if test="khxd != null">khxd,</if>
<if test="pjbzid != null">pjbzid,</if>
<if test="pjbzmc != null">pjbzmc,</if>
<if test="sj != null">sj,</if>
<if test="wtms != null">wtms,</if>
<if test="khfz != null">khfz,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="yl1 != null">yl1,</if>
<if test="yl2 != null">yl2,</if>
<if test="yl3 != null">yl3,</if>
<if test="yl4 != null">yl4,</if>
<if test="yl5 != null">yl5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="zbId != null">#{zbId},</if>
<if test="deptId != null">#{deptId},</if>
<if test="nd != null">#{nd},</if>
<if test="zqfw != null">#{zqfw},</if>
<if test="zqlx != null">#{zqlx},</if>
<if test="jb != null">#{jb},</if>
<if test="khnr != null">#{khnr},</if>
<if test="khxd != null">#{khxd},</if>
<if test="pjbzid != null">#{pjbzid},</if>
<if test="pjbzmc != null">#{pjbzmc},</if>
<if test="sj != null">#{sj},</if>
<if test="wtms != null">#{wtms},</if>
<if test="khfz != null">#{khfz},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="yl1 != null">#{yl1},</if>
<if test="yl2 != null">#{yl2},</if>
<if test="yl3 != null">#{yl3},</if>
<if test="yl4 != null">#{yl4},</if>
<if test="yl5 != null">#{yl5},</if>
</trim>
</insert>
<insert id="batchSave">
insert into sj_zdbf_zsdwkhpj( id, zb_id, dept_id, nd, zqfw, zqlx, jb, khnr, khxd, pjbzid, pjbzmc, sj, wtms, khfz, remark, yl1, yl2, yl3, yl4, yl5) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.zbId}, #{item.deptId}, #{item.nd}, #{item.zqfw}, #{item.zqlx}, #{item.jb}, #{item.khnr}, #{item.khxd}, #{item.pjbzid}, #{item.pjbzmc}, #{item.sj}, #{item.wtms}, #{item.khfz}, #{item.remark}, #{item.yl1}, #{item.yl2}, #{item.yl3}, #{item.yl4}, #{item.yl5})
</foreach>
</insert>
<update id="updateSjZdbfZsdwkhpj" parameterType="SjZdbfZsdwkhpj">
update sj_zdbf_zsdwkhpj
<trim prefix="SET" suffixOverrides=",">
<if test="zbId != null">zb_id = #{zbId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="nd != null">nd = #{nd},</if>
<if test="zqfw != null">zqfw = #{zqfw},</if>
<if test="zqlx != null">zqlx = #{zqlx},</if>
<if test="jb != null">jb = #{jb},</if>
<if test="khnr != null">khnr = #{khnr},</if>
<if test="khxd != null">khxd = #{khxd},</if>
<if test="pjbzid != null">pjbzid = #{pjbzid},</if>
<if test="pjbzmc != null">pjbzmc = #{pjbzmc},</if>
<if test="sj != null">sj = #{sj},</if>
<if test="wtms != null">wtms = #{wtms},</if>
<if test="khfz != null">khfz = #{khfz},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="yl1 != null">yl1 = #{yl1},</if>
<if test="yl2 != null">yl2 = #{yl2},</if>
<if test="yl3 != null">yl3 = #{yl3},</if>
<if test="yl4 != null">yl4 = #{yl4},</if>
<if test="yl5 != null">yl5 = #{yl5},</if>
</trim>
where id = #{id}
</update>
<update id="pledit">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update sj_zdbf_zsdwkhpj
<trim prefix="SET" suffixOverrides=",">
<if test="item.sj != null">sj = #{item.sj},</if>
<if test="item.wtms != null">wtms = #{item.wtms},</if>
<if test="item.khfz != null">khfz = #{item.khfz},</if>
</trim>
where id = #{item.id}
</foreach>
</update>
<delete id="deleteSjZdbfZsdwkhpjById" parameterType="Long">
delete from sj_zdbf_zsdwkhpj where id = #{id}
</delete>
<delete id="deleteSjZdbfZsdwkhpjByIds" parameterType="String">
delete from sj_zdbf_zsdwkhpj where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qianhe.mapper.SjZdbfZsdwkhpjZbMapper">
<resultMap type="SjZdbfZsdwkhpjZb" id="SjZdbfZsdwkhpjZbResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="parentDeptId" column="parent_dept_id" />
<result property="nd" column="nd" />
<result property="zqfw" column="zqfw" />
<result property="zqlx" column="zqlx" />
<result property="jb" column="jb" />
<result property="deptDfl" column="dept_dfl" />
<result property="deptLx" column="dept_lx" />
<result property="deptYwfl" column="dept_ywfl" />
<result property="djyjzfs" column="djyjzfs" />
<result property="djyjkfs" column="djyjkfs" />
<result property="djyjkfbl" column="djyjkfbl" />
<result property="djyjdf" column="djyjdf" />
<result property="sztszfs" column="sztszfs" />
<result property="sztskfs" column="sztskfs" />
<result property="sztsfbl" column="sztsfbl" />
<result property="sztsdf" column="sztsdf" />
<result property="glgfzfs" column="glgfzfs" />
<result property="glgfkfs" column="glgfkfs" />
<result property="glgfbl" column="glgfbl" />
<result property="glgfdf" column="glgfdf" />
<result property="ywcxzfs" column="ywcxzfs" />
<result property="ywcxkfs" column="ywcxkfs" />
<result property="ywcxbl" column="ywcxbl" />
<result property="ywcxdf" column="ywcxdf" />
<result property="sffjxs" column="sffjxs" />
<result property="zkf" column="zkf" />
<result property="zkfbl" column="zkfbl" />
<result property="zdf" column="zdf" />
<result property="zhdf" column="zhdf" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="yl1" column="yl1" />
<result property="yl2" column="yl2" />
<result property="yl3" column="yl3" />
<result property="yl4" column="yl4" />
<result property="yl5" column="yl5" />
<result property="deptName" column="dept_name" />
<result property="parentName" column="parent_name" />
</resultMap>
<sql id="selectSjZdbfZsdwkhpjZbVo">
select id,
a.dept_id,
parent_dept_id,
nd,
zqfw,
zqlx,
jb,
d.dept_dfl,
d.dept_lx,
d.dept_ywfl,
djyjzfs,
djyjkfs,
djyjkfbl,
djyjdf,
sztszfs,
sztskfs,
sztsfbl,
sztsdf,
glgfzfs,
glgfkfs,
glgfbl,
glgfdf,
ywcxzfs,
ywcxkfs,
ywcxbl,
ywcxdf,
sffjxs,
zkf,
zkfbl,
zdf,
zhdf,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
remark,
yl1,
yl2,
yl3,
yl4,
yl5,d.dept_name,p.dept_name parent_name
from sj_zdbf_zsdwkhpj_zb a
left join sys_dept d on a.dept_id=d.dept_id
left join sys_dept p on a.parent_dept_id=p.dept_id </sql>
<select id="selectSjZdbfZsdwkhpjZbList" parameterType="SjZdbfZsdwkhpjZb" resultMap="SjZdbfZsdwkhpjZbResult">
<include refid="selectSjZdbfZsdwkhpjZbVo"/>
<where>
<if test="deptId != null ">and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="parentDeptId != null "> and parent_dept_id = #{parentDeptId}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if>
<if test="zqfw != null and zqfw != ''"> and zqfw = #{zqfw}</if>
<if test="zqlx != null and zqlx != ''"> and zqlx = #{zqlx}</if>
<if test="jb != null and jb != ''"> and jb = #{jb}</if>
<if test="deptDfl != null and deptDfl != ''"> and dept_dfl = #{deptDfl}</if>
<if test="deptLx != null and deptLx != ''"> and dept_lx = #{deptLx}</if>
<if test="deptYwfl != null and deptYwfl != ''"> and dept_ywfl = #{deptYwfl}</if>
<if test="djyjzfs != null "> and djyjzfs = #{djyjzfs}</if>
<if test="djyjkfs != null "> and djyjkfs = #{djyjkfs}</if>
<if test="djyjkfbl != null "> and djyjkfbl = #{djyjkfbl}</if>
<if test="djyjdf != null "> and djyjdf = #{djyjdf}</if>
<if test="sztszfs != null "> and sztszfs = #{sztszfs}</if>
<if test="sztskfs != null "> and sztskfs = #{sztskfs}</if>
<if test="sztsfbl != null "> and sztsfbl = #{sztsfbl}</if>
<if test="sztsdf != null "> and sztsdf = #{sztsdf}</if>
<if test="glgfzfs != null "> and glgfzfs = #{glgfzfs}</if>
<if test="glgfkfs != null "> and glgfkfs = #{glgfkfs}</if>
<if test="glgfbl != null "> and glgfbl = #{glgfbl}</if>
<if test="glgfdf != null "> and glgfdf = #{glgfdf}</if>
<if test="ywcxzfs != null "> and ywcxzfs = #{ywcxzfs}</if>
<if test="ywcxkfs != null "> and ywcxkfs = #{ywcxkfs}</if>
<if test="ywcxbl != null "> and ywcxbl = #{ywcxbl}</if>
<if test="ywcxdf != null "> and ywcxdf = #{ywcxdf}</if>
<if test="sffjxs != null "> and sffjxs = #{sffjxs}</if>
<if test="zkf != null "> and zkf = #{zkf}</if>
<if test="zkfbl != null "> and zkfbl = #{zkfbl}</if>
<if test="zdf != null "> and zdf = #{zdf}</if>
<if test="zhdf != null "> and zhdf = #{zhdf}</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>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
</select>
<select id="selectSjZdbfZsdwkhpjZbById" parameterType="Long" resultMap="SjZdbfZsdwkhpjZbResult">
<include refid="selectSjZdbfZsdwkhpjZbVo"/>
where id = #{id}
</select>
<select id="selectSjZdbfZsdwkhpjZb" resultType="com.qianhe.domain.SjZdbfZsdwkhpjZb">
select *from sj_zdbf_zsdwkhpj_zb where nd=#{nd} and dept_id=#{deptId} and zqfw=#{zqfw}
</select>
<insert id="insertSjZdbfZsdwkhpjZb" parameterType="SjZdbfZsdwkhpjZb" useGeneratedKeys="true" keyProperty="id">
insert into sj_zdbf_zsdwkhpj_zb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="parentDeptId != null">parent_dept_id,</if>
<if test="nd != null">nd,</if>
<if test="zqfw != null">zqfw,</if>
<if test="zqlx != null">zqlx,</if>
<if test="jb != null">jb,</if>
<if test="deptDfl != null">dept_dfl,</if>
<if test="deptLx != null">dept_lx,</if>
<if test="deptYwfl != null">dept_ywfl,</if>
<if test="djyjzfs != null">djyjzfs,</if>
<if test="djyjkfs != null">djyjkfs,</if>
<if test="djyjkfbl != null">djyjkfbl,</if>
<if test="djyjdf != null">djyjdf,</if>
<if test="sztszfs != null">sztszfs,</if>
<if test="sztskfs != null">sztskfs,</if>
<if test="sztsfbl != null">sztsfbl,</if>
<if test="sztsdf != null">sztsdf,</if>
<if test="glgfzfs != null">glgfzfs,</if>
<if test="glgfkfs != null">glgfkfs,</if>
<if test="glgfbl != null">glgfbl,</if>
<if test="glgfdf != null">glgfdf,</if>
<if test="ywcxzfs != null">ywcxzfs,</if>
<if test="ywcxkfs != null">ywcxkfs,</if>
<if test="ywcxbl != null">ywcxbl,</if>
<if test="ywcxdf != null">ywcxdf,</if>
<if test="sffjxs != null">sffjxs,</if>
<if test="zkf != null">zkf,</if>
<if test="zkfbl != null">zkfbl,</if>
<if test="zdf != null">zdf,</if>
<if test="zhdf != null">zhdf,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="yl1 != null">yl1,</if>
<if test="yl2 != null">yl2,</if>
<if test="yl3 != null">yl3,</if>
<if test="yl4 != null">yl4,</if>
<if test="yl5 != null">yl5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="parentDeptId != null">#{parentDeptId},</if>
<if test="nd != null">#{nd},</if>
<if test="zqfw != null">#{zqfw},</if>
<if test="zqlx != null">#{zqlx},</if>
<if test="jb != null">#{jb},</if>
<if test="deptDfl != null">#{deptDfl},</if>
<if test="deptLx != null">#{deptLx},</if>
<if test="deptYwfl != null">#{deptYwfl},</if>
<if test="djyjzfs != null">#{djyjzfs},</if>
<if test="djyjkfs != null">#{djyjkfs},</if>
<if test="djyjkfbl != null">#{djyjkfbl},</if>
<if test="djyjdf != null">#{djyjdf},</if>
<if test="sztszfs != null">#{sztszfs},</if>
<if test="sztskfs != null">#{sztskfs},</if>
<if test="sztsfbl != null">#{sztsfbl},</if>
<if test="sztsdf != null">#{sztsdf},</if>
<if test="glgfzfs != null">#{glgfzfs},</if>
<if test="glgfkfs != null">#{glgfkfs},</if>
<if test="glgfbl != null">#{glgfbl},</if>
<if test="glgfdf != null">#{glgfdf},</if>
<if test="ywcxzfs != null">#{ywcxzfs},</if>
<if test="ywcxkfs != null">#{ywcxkfs},</if>
<if test="ywcxbl != null">#{ywcxbl},</if>
<if test="ywcxdf != null">#{ywcxdf},</if>
<if test="sffjxs != null">#{sffjxs},</if>
<if test="zkf != null">#{zkf},</if>
<if test="zkfbl != null">#{zkfbl},</if>
<if test="zdf != null">#{zdf},</if>
<if test="zhdf != null">#{zhdf},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="yl1 != null">#{yl1},</if>
<if test="yl2 != null">#{yl2},</if>
<if test="yl3 != null">#{yl3},</if>
<if test="yl4 != null">#{yl4},</if>
<if test="yl5 != null">#{yl5},</if>
</trim>
</insert>
<update id="updateSjZdbfZsdwkhpjZb" parameterType="SjZdbfZsdwkhpjZb">
update sj_zdbf_zsdwkhpj_zb
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="parentDeptId != null">parent_dept_id = #{parentDeptId},</if>
<if test="nd != null">nd = #{nd},</if>
<if test="zqfw != null">zqfw = #{zqfw},</if>
<if test="zqlx != null">zqlx = #{zqlx},</if>
<if test="jb != null">jb = #{jb},</if>
<if test="deptDfl != null">dept_dfl = #{deptDfl},</if>
<if test="deptLx != null">dept_lx = #{deptLx},</if>
<if test="deptYwfl != null">dept_ywfl = #{deptYwfl},</if>
<if test="djyjzfs != null">djyjzfs = #{djyjzfs},</if>
<if test="djyjkfs != null">djyjkfs = #{djyjkfs},</if>
<if test="djyjkfbl != null">djyjkfbl = #{djyjkfbl},</if>
<if test="djyjdf != null">djyjdf = #{djyjdf},</if>
<if test="sztszfs != null">sztszfs = #{sztszfs},</if>
<if test="sztskfs != null">sztskfs = #{sztskfs},</if>
<if test="sztsfbl != null">sztsfbl = #{sztsfbl},</if>
<if test="sztsdf != null">sztsdf = #{sztsdf},</if>
<if test="glgfzfs != null">glgfzfs = #{glgfzfs},</if>
<if test="glgfkfs != null">glgfkfs = #{glgfkfs},</if>
<if test="glgfbl != null">glgfbl = #{glgfbl},</if>
<if test="glgfdf != null">glgfdf = #{glgfdf},</if>
<if test="ywcxzfs != null">ywcxzfs = #{ywcxzfs},</if>
<if test="ywcxkfs != null">ywcxkfs = #{ywcxkfs},</if>
<if test="ywcxbl != null">ywcxbl = #{ywcxbl},</if>
<if test="ywcxdf != null">ywcxdf = #{ywcxdf},</if>
<if test="sffjxs != null">sffjxs = #{sffjxs},</if>
<if test="zkf != null">zkf = #{zkf},</if>
<if test="zkfbl != null">zkfbl = #{zkfbl},</if>
<if test="zdf != null">zdf = #{zdf},</if>
<if test="zhdf != null">zhdf = #{zhdf},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="yl1 != null">yl1 = #{yl1},</if>
<if test="yl2 != null">yl2 = #{yl2},</if>
<if test="yl3 != null">yl3 = #{yl3},</if>
<if test="yl4 != null">yl4 = #{yl4},</if>
<if test="yl5 != null">yl5 = #{yl5},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSjZdbfZsdwkhpjZbById" parameterType="Long">
delete from sj_zdbf_zsdwkhpj_zb where id = #{id}
</delete>
<delete id="deleteSjZdbfZsdwkhpjZbByIds" parameterType="String">
delete from sj_zdbf_zsdwkhpj_zb where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qianhe.mapper.SjZdbfZsdwkhpjfjxMapper">
<resultMap type="SjZdbfZsdwkhpjfjx" id="SjZdbfZsdwkhpjfjxResult">
<result property="id" column="id" />
<result property="zbId" column="zb_id" />
<result property="deptId" column="dept_id" />
<result property="nd" column="nd" />
<result property="zqfw" column="zqfw" />
<result property="zqlx" column="zqlx" />
<result property="jb" column="jb" />
<result property="flmc" column="flmc" />
<result property="pjbzid" column="pjbzid" />
<result property="pjbzmc" column="pjbzmc" />
<result property="sffs" column="sffs" />
<result property="wtms" column="wtms" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="yl1" column="yl1" />
<result property="yl2" column="yl2" />
<result property="yl3" column="yl3" />
<result property="yl4" column="yl4" />
<result property="yl5" column="yl5" />
<result property="deptName" column="dept_name" />
</resultMap>
<sql id="selectSjZdbfZsdwkhpjfjxVo">
select id,
zb_id,
a.dept_id,
nd,
zqfw,
zqlx,
jb,
flmc,
pjbzid,
pjbzmc,
sffs,
wtms,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
remark,
yl1,
yl2,
yl3,
yl4,
yl5,d.dept_name
from sj_zdbf_zsdwkhpjfjx a
left join sys_dept d on a.dept_id=d.dept_id
</sql>
<select id="selectSjZdbfZsdwkhpjfjxList" parameterType="SjZdbfZsdwkhpjfjx" resultMap="SjZdbfZsdwkhpjfjxResult">
<include refid="selectSjZdbfZsdwkhpjfjxVo"/>
<where>
<if test="zbId != null "> and zb_id = #{zbId}</if>
<if test="deptId != null "> and a.dept_id = #{deptId}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if>
<if test="zqfw != null and zqfw != ''"> and zqfw = #{zqfw}</if>
<if test="zqlx != null and zqlx != ''"> and zqlx = #{zqlx}</if>
<if test="jb != null and jb != ''"> and jb = #{jb}</if>
<if test="flmc != null and flmc != ''"> and flmc = #{flmc}</if>
<if test="pjbzid != null and pjbzid != ''"> and pjbzid = #{pjbzid}</if>
<if test="pjbzmc != null and pjbzmc != ''"> and pjbzmc = #{pjbzmc}</if>
<if test="sffs != null and sffs != ''"> and sffs = #{sffs}</if>
<if test="wtms != null and wtms != ''"> and wtms = #{wtms}</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>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by yl1
</select>
<select id="selectSjZdbfZsdwkhpjfjxById" parameterType="Long" resultMap="SjZdbfZsdwkhpjfjxResult">
<include refid="selectSjZdbfZsdwkhpjfjxVo"/>
where id = #{id}
</select>
<insert id="insertSjZdbfZsdwkhpjfjx" parameterType="SjZdbfZsdwkhpjfjx" useGeneratedKeys="true" keyProperty="id">
insert into sj_zdbf_zsdwkhpjfjx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="zbId != null">zb_id,</if>
<if test="deptId != null">dept_id,</if>
<if test="nd != null">nd,</if>
<if test="zqfw != null">zqfw,</if>
<if test="zqlx != null">zqlx,</if>
<if test="jb != null">jb,</if>
<if test="flmc != null">flmc,</if>
<if test="pjbzid != null">pjbzid,</if>
<if test="pjbzmc != null">pjbzmc,</if>
<if test="sffs != null">sffs,</if>
<if test="wtms != null">wtms,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="yl1 != null">yl1,</if>
<if test="yl2 != null">yl2,</if>
<if test="yl3 != null">yl3,</if>
<if test="yl4 != null">yl4,</if>
<if test="yl5 != null">yl5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="zbId != null">#{zbId},</if>
<if test="deptId != null">#{deptId},</if>
<if test="nd != null">#{nd},</if>
<if test="zqfw != null">#{zqfw},</if>
<if test="zqlx != null">#{zqlx},</if>
<if test="jb != null">#{jb},</if>
<if test="flmc != null">#{flmc},</if>
<if test="pjbzid != null">#{pjbzid},</if>
<if test="pjbzmc != null">#{pjbzmc},</if>
<if test="sffs != null">#{sffs},</if>
<if test="wtms != null">#{wtms},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="yl1 != null">#{yl1},</if>
<if test="yl2 != null">#{yl2},</if>
<if test="yl3 != null">#{yl3},</if>
<if test="yl4 != null">#{yl4},</if>
<if test="yl5 != null">#{yl5},</if>
</trim>
</insert>
<insert id="batchSave">
insert into sj_zdbf_zsdwkhpjfjx( id, zb_id, dept_id, nd, zqfw, zqlx, jb, flmc, pjbzid, pjbzmc, sffs, wtms, remark, yl1, yl2, yl3, yl4, yl5) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.zbId}, #{item.deptId}, #{item.nd}, #{item.zqfw}, #{item.zqlx}, #{item.jb}, #{item.flmc}, #{item.pjbzid}, #{item.pjbzmc}, #{item.sffs}, #{item.wtms}, #{item.remark}, #{item.yl1}, #{item.yl2}, #{item.yl3}, #{item.yl4}, #{item.yl5})
</foreach>
</insert>
<update id="updateSjZdbfZsdwkhpjfjx" parameterType="SjZdbfZsdwkhpjfjx">
update sj_zdbf_zsdwkhpjfjx
<trim prefix="SET" suffixOverrides=",">
<if test="zbId != null">zb_id = #{zbId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="nd != null">nd = #{nd},</if>
<if test="zqfw != null">zqfw = #{zqfw},</if>
<if test="zqlx != null">zqlx = #{zqlx},</if>
<if test="jb != null">jb = #{jb},</if>
<if test="flmc != null">flmc = #{flmc},</if>
<if test="pjbzid != null">pjbzid = #{pjbzid},</if>
<if test="pjbzmc != null">pjbzmc = #{pjbzmc},</if>
<if test="sffs != null">sffs = #{sffs},</if>
<if test="wtms != null">wtms = #{wtms},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="yl1 != null">yl1 = #{yl1},</if>
<if test="yl2 != null">yl2 = #{yl2},</if>
<if test="yl3 != null">yl3 = #{yl3},</if>
<if test="yl4 != null">yl4 = #{yl4},</if>
<if test="yl5 != null">yl5 = #{yl5},</if>
</trim>
where id = #{id}
</update>
<update id="pledit">
<foreach collection="list" item="item" index="index" separator=";">
update sj_zdbf_zsdwkhpjfjx set sffs=#{item.sffs},wtms=#{item.wtms} where id =#{item.id}
</foreach>
</update>
<delete id="deleteSjZdbfZsdwkhpjfjxById" parameterType="Long">
delete from sj_zdbf_zsdwkhpjfjx where id = #{id}
</delete>
<delete id="deleteSjZdbfZsdwkhpjfjxByIds" parameterType="String">
delete from sj_zdbf_zsdwkhpjfjx where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qianhe.mapper.SjZdbfZsdwwtcjMapper">
<resultMap type="SjZdbfZsdwwtcj" id="SjZdbfZsdwwtcjResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="rq" column="rq" />
<result property="jcjb" column="jcjb" />
<result property="wtmc" column="wtmc" />
<result property="khnr" column="khnr" />
<result property="khxd" column="khxd" />
<result property="pjbzid" column="pjbzid" />
<result property="pjbzmc" column="pjbzmc" />
<result property="zgzrr" column="zgzrr" />
<result property="zgcs" column="zgcs" />
<result property="zgqx" column="zgqx" />
<result property="zgzt" column="zgzt" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="yl1" column="yl1" />
<result property="yl2" column="yl2" />
<result property="yl3" column="yl3" />
<result property="yl4" column="yl4" />
<result property="yl5" column="yl5" />
<result property="deptName" column="dept_name" />
<result property="deptLx" column="dept_lx" />
</resultMap>
<sql id="selectSjZdbfZsdwwtcjVo">
select id,
a.dept_id,
rq,
jcjb,
wtmc,
khnr,
khxd,
pjbzid,
pjbzmc,
zgzrr,
zgcs,
zgqx,
zgzt,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
remark,
yl1,
yl2,
yl3,
yl4,
yl5, d.dept_name,d.dept_lx
from sj_zdbf_zsdwwtcj a
left join sys_dept d on a.dept_id=d.dept_id
</sql>
<select id="selectSjZdbfZsdwwtcjList" parameterType="SjZdbfZsdwwtcj" resultMap="SjZdbfZsdwwtcjResult">
<include refid="selectSjZdbfZsdwwtcjVo"/>
<where>
<if test="deptId != null ">and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="rq != null and rq != ''"> and rq = #{rq}</if>
<if test="jcjb != null and jcjb != ''"> and jcjb = #{jcjb}</if>
<if test="wtmc != null and wtmc != ''"> and wtmc = #{wtmc}</if>
<if test="khnr != null and khnr != ''"> and khnr = #{khnr}</if>
<if test="khxd != null and khxd != ''"> and khxd = #{khxd}</if>
<if test="pjbzid != null and pjbzid != ''"> and pjbzid = #{pjbzid}</if>
<if test="pjbzmc != null and pjbzmc != ''"> and pjbzmc = #{pjbzmc}</if>
<if test="zgzrr != null and zgzrr != ''"> and zgzrr = #{zgzrr}</if>
<if test="zgcs != null and zgcs != ''"> and zgcs = #{zgcs}</if>
<if test="zgqx != null and zgqx != ''"> and zgqx = #{zgqx}</if>
<if test="zgzt != null and zgzt != ''"> and zgzt = #{zgzt}</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="startRq != null and startRq != ''"> and rq >= #{startRq}</if>
<if test="endRq != null and endRq != ''"> and rq &lt;= #{endRq}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by a.rq desc
</select>
<select id="selectSjZdbfZsdwwtcjById" parameterType="Long" resultMap="SjZdbfZsdwwtcjResult">
<include refid="selectSjZdbfZsdwwtcjVo"/>
where a.id = #{id}
</select>
<insert id="insertSjZdbfZsdwwtcj" parameterType="SjZdbfZsdwwtcj" useGeneratedKeys="true" keyProperty="id">
insert into sj_zdbf_zsdwwtcj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="rq != null">rq,</if>
<if test="jcjb != null">jcjb,</if>
<if test="wtmc != null">wtmc,</if>
<if test="khnr != null">khnr,</if>
<if test="khxd != null">khxd,</if>
<if test="pjbzid != null">pjbzid,</if>
<if test="pjbzmc != null">pjbzmc,</if>
<if test="zgzrr != null">zgzrr,</if>
<if test="zgcs != null">zgcs,</if>
<if test="zgqx != null">zgqx,</if>
<if test="zgzt != null">zgzt,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="yl1 != null">yl1,</if>
<if test="yl2 != null">yl2,</if>
<if test="yl3 != null">yl3,</if>
<if test="yl4 != null">yl4,</if>
<if test="yl5 != null">yl5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="rq != null">#{rq},</if>
<if test="jcjb != null">#{jcjb},</if>
<if test="wtmc != null">#{wtmc},</if>
<if test="khnr != null">#{khnr},</if>
<if test="khxd != null">#{khxd},</if>
<if test="pjbzid != null">#{pjbzid},</if>
<if test="pjbzmc != null">#{pjbzmc},</if>
<if test="zgzrr != null">#{zgzrr},</if>
<if test="zgcs != null">#{zgcs},</if>
<if test="zgqx != null">#{zgqx},</if>
<if test="zgzt != null">#{zgzt},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="yl1 != null">#{yl1},</if>
<if test="yl2 != null">#{yl2},</if>
<if test="yl3 != null">#{yl3},</if>
<if test="yl4 != null">#{yl4},</if>
<if test="yl5 != null">#{yl5},</if>
</trim>
</insert>
<insert id="batchSave">
insert into sj_zdbf_zsdwwtcj( dept_id, rq, jcjb, wtmc, khnr, khxd, pjbzid, pjbzmc, zgzrr, zgcs, zgqx, zgzt) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.deptId}, #{item.rq}, #{item.jcjb}, #{item.wtmc}, #{item.khnr}, #{item.khxd}, #{item.pjbzid}, #{item.pjbzmc}, #{item.zgzrr}, #{item.zgcs}, #{item.zgqx}, #{item.zgzt})
</foreach>
</insert>
<update id="updateSjZdbfZsdwwtcj" parameterType="SjZdbfZsdwwtcj">
update sj_zdbf_zsdwwtcj
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="rq != null">rq = #{rq},</if>
<if test="jcjb != null">jcjb = #{jcjb},</if>
<if test="wtmc != null">wtmc = #{wtmc},</if>
<if test="khnr != null">khnr = #{khnr},</if>
<if test="khxd != null">khxd = #{khxd},</if>
<if test="pjbzid != null">pjbzid = #{pjbzid},</if>
<if test="pjbzmc != null">pjbzmc = #{pjbzmc},</if>
<if test="zgzrr != null">zgzrr = #{zgzrr},</if>
<if test="zgcs != null">zgcs = #{zgcs},</if>
<if test="zgqx != null">zgqx = #{zgqx},</if>
<if test="zgzt != null">zgzt = #{zgzt},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="yl1 != null">yl1 = #{yl1},</if>
<if test="yl2 != null">yl2 = #{yl2},</if>
<if test="yl3 != null">yl3 = #{yl3},</if>
<if test="yl4 != null">yl4 = #{yl4},</if>
<if test="yl5 != null">yl5 = #{yl5},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSjZdbfZsdwwtcjById" parameterType="Long">
delete from sj_zdbf_zsdwwtcj where id = #{id}
</delete>
<delete id="deleteSjZdbfZsdwwtcjByIds" parameterType="String">
delete from sj_zdbf_zsdwwtcj where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
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