Commit fb163b72 by wangjian

2025-08-05 规范建设 V5

parent 961a7b8f
package com.qianhe.web.controller.tool;
import java.io.IOException;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class FileModificationChecker {
public static void main(String[] args) {
// 示例:查询2025年7月1日之后修改的文件
LocalDateTime dateTime = LocalDateTime.of(2025, 7, 18, 0, 0);
// 直接指定路径,不需要通过系统属性
Path directory = Paths.get("D:\\SoftWork\\临时文件夹");
try {
List<Path> modifiedFiles = findFilesModifiedAfter(directory, dateTime);
System.out.println("找到 " + modifiedFiles.size() + " 个在 " + dateTime + " 之后修改的文件:");
for (Path file : modifiedFiles) {
System.out.println(file);
}
} catch (IOException e) {
System.err.println("扫描文件时出错:" + e.getMessage());
}
}
/**
* 查询指定目录下在某个日期之后修改的所有文件
* @param directory 要扫描的目录
* @param dateTime 指定日期时间
* @return 符合条件的文件路径列表
* @throws IOException 如果扫描过程中发生错误
*/
public static List<Path> findFilesModifiedAfter(Path directory, LocalDateTime dateTime) throws IOException {
List<Path> result = new ArrayList<>();
long timeMillis = dateTime.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
// 检查文件修改时间
if (attrs.lastModifiedTime().toMillis() > timeMillis) {
result.add(file);
}
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFileFailed(Path file, IOException exc) {
System.err.println("无法访问文件: " + file + " - " + exc.getMessage());
return FileVisitResult.CONTINUE;
}
});
return result;
}
// 重载方法,支持使用java.util.Date作为参数
public static List<Path> findFilesModifiedAfter(Path directory, Date date) throws IOException {
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
return findFilesModifiedAfter(directory, dateTime);
}
}
package com.qianhe.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.GgFjb;
import com.qianhe.service.IGgFjbService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
/**
* 公共附件Controller
*
* @author qianhe
* @date 2025-08-04
*/
@RestController
@RequestMapping("/system/ggFjb")
public class GgFjbController extends BaseController
{
@Autowired
private IGgFjbService ggFjbService;
/**
* 查询公共附件列表
*/
@GetMapping("/list")
public TableDataInfo list(GgFjb ggFjb)
{
startPage();
List<GgFjb> list = ggFjbService.selectGgFjbList(ggFjb);
return getDataTable(list);
}
/**
* 导出公共附件列表
*/
@Log(title = "公共附件", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, GgFjb ggFjb)
{
List<GgFjb> list = ggFjbService.selectGgFjbList(ggFjb);
ExcelUtil<GgFjb> util = new ExcelUtil<GgFjb>(GgFjb.class);
util.exportExcel(response, list, "公共附件数据");
}
/**
* 获取公共附件详细信息
*/
@GetMapping(value = "/{ID}")
public AjaxResult getInfo(@PathVariable("ID") Long ID)
{
return success(ggFjbService.selectGgFjbByID(ID));
}
/**
* 新增公共附件
*/
@Log(title = "公共附件", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody GgFjb ggFjb)
{
return toAjax(ggFjbService.insertGgFjb(ggFjb));
}
/**
* 修改公共附件
*/
@Log(title = "公共附件", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody GgFjb ggFjb)
{
return toAjax(ggFjbService.updateGgFjb(ggFjb));
}
/**
* 删除公共附件
*/
@Log(title = "公共附件", businessType = BusinessType.DELETE)
@DeleteMapping("/{IDs}")
public AjaxResult remove(@PathVariable Long[] IDs)
{
return toAjax(ggFjbService.deleteGgFjbByIDs(IDs));
}
}
package com.qianhe.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.SjBzxx;
import com.qianhe.service.ISjBzxxService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
/**
* 班组信息Controller
*
* @author qianhe
* @date 2025-08-04
*/
@RestController
@RequestMapping("/system/sjBzxx")
public class SjBzxxController extends BaseController
{
@Autowired
private ISjBzxxService sjBzxxService;
/**
* 查询班组信息列表
*/
@GetMapping("/list")
public TableDataInfo list(SjBzxx sjBzxx)
{
startPage();
List<SjBzxx> list = sjBzxxService.selectSjBzxxList(sjBzxx);
return getDataTable(list);
}
/**
* 导出班组信息列表
*/
@Log(title = "班组信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjBzxx sjBzxx)
{
List<SjBzxx> list = sjBzxxService.selectSjBzxxList(sjBzxx);
ExcelUtil<SjBzxx> util = new ExcelUtil<SjBzxx>(SjBzxx.class);
util.exportExcel(response, list, "班组信息数据");
}
/**
* 获取班组信息详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjBzxxService.selectSjBzxxById(id));
}
/**
* 新增班组信息
*/
@Log(title = "班组信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjBzxx sjBzxx)
{
return toAjax(sjBzxxService.insertSjBzxx(sjBzxx));
}
/**
* 修改班组信息
*/
@Log(title = "班组信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjBzxx sjBzxx)
{
return toAjax(sjBzxxService.updateSjBzxx(sjBzxx));
}
/**
* 删除班组信息
*/
@Log(title = "班组信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjBzxxService.deleteSjBzxxByIds(ids));
}
/**
* 获取班组 统计信息
*/
@PostMapping(value = "/getBzTj")
public AjaxResult getBzTj(@RequestBody SjBzxx sjBzxx)
{
return success(sjBzxxService.selectBzxxTj(sjBzxx));
}
/**
* 批量提交
*/
@PostMapping(value = "/pltj")
public AjaxResult pltj(@RequestBody SjBzxx sjBzxx)
{
sjBzxx.setZt("1");
return success(sjBzxxService.pltj(sjBzxx));
}
}
......@@ -138,6 +138,7 @@ public class SjGfjsZdgzController extends BaseController
public AjaxResult getKhxdList(SjGfjsZdgzCb cb){
String nd = cb.getNd();
cb.setNd(nd.substring(0,4));
cb.setLx("基础");
return success(sjGfjsZdgzService.getKhxdList(cb));
}
......@@ -150,6 +151,7 @@ public class SjGfjsZdgzController extends BaseController
public AjaxResult getPjbzList(SjGfjsZdgzCb cb){
String nd = cb.getNd();
cb.setNd(nd.substring(0,4));
cb.setLx("基础");
return success(sjGfjsZdgzService.getPjbzList(cb));
}
......
package com.qianhe.controller;
import java.io.*;
import java.net.URLEncoder;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.servlet.http.HttpServletResponse;
import com.qianhe.common.exception.BusinessException;
import com.qianhe.common.utils.ip.IpUtils;
import com.qianhe.domain.GgFjb;
import com.qianhe.service.IGgFjbService;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
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.SjZdsc;
import com.qianhe.service.ISjZdscService;
import com.qianhe.common.utils.poi.ExcelUtil;
import com.qianhe.common.core.page.TableDataInfo;
/**
* 基层三册Controller
*
* @author qianhe
* @date 2025-08-04
*/
@RestController
@RequestMapping("/system/sjZdsc")
public class SjZdscController extends BaseController
{
@Autowired
private ISjZdscService sjZdscService;
@Autowired
private IGgFjbService fjbService;
/**
* 查询基层三册列表
*/
@GetMapping("/list")
public TableDataInfo list(SjZdsc sjZdsc)
{
startPage();
List<SjZdsc> list = sjZdscService.selectSjZdscList(sjZdsc);
return getDataTable(list);
}
/**
* 导出基层三册列表
*/
@Log(title = "基层三册", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SjZdsc sjZdsc)
{
List<SjZdsc> list = sjZdscService.selectSjZdscList(sjZdsc);
ExcelUtil<SjZdsc> util = new ExcelUtil<SjZdsc>(SjZdsc.class);
util.exportExcel(response, list, "基层三册数据");
}
/**
* 获取基层三册详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sjZdscService.selectSjZdscById(id));
}
/**
* 新增基层三册
*/
@Log(title = "基层三册", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SjZdsc sjZdsc)
{
int i = sjZdscService.insertSjZdsc(sjZdsc);
String fileListStr1 = sjZdsc.getFileListStr1();
int i1 = fjbService.batchSaveFj(sjZdsc.getId()+"", "基层三册", "基层三册", fileListStr1);
return toAjax(i);
}
/**
* 修改基层三册
*/
@Log(title = "基层三册", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SjZdsc sjZdsc)
{
String fileListStr1 = sjZdsc.getFileListStr1();
int i1 = fjbService.batchSaveFj(sjZdsc.getId()+"", "基层三册", "基层三册", fileListStr1);
return toAjax(sjZdscService.updateSjZdsc(sjZdsc));
}
/**
* 删除基层三册
*/
@Log(title = "基层三册", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sjZdscService.deleteSjZdscByIds(ids));
}
/**
* 批量导出 中原-维修-单台设备审批列表
* 导出zip
*/
@RequestMapping(value = "/exportZip", method = {RequestMethod.GET, RequestMethod.POST})
public void exportZip(HttpServletResponse response, String ids) throws IOException
{
Long id = Long.parseLong(ids);
SjZdsc en = sjZdscService.selectSjZdscById(id);
String zdmc = en.getZdmc();
String bb = en.getBb();
List<GgFjb> fjs = en.getFileList1();
String ip = IpUtils.getIpAddr();
// 设置响应头
response.setContentType("application/zip");
response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(zdmc + " " + bb + ".zip", "UTF-8"));
// Workbook exl = null;
// OutputStream out = null;
// InputStream in = null;
// 创建ZIP输出流
try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) {
for(GgFjb fj:fjs) {
String fjlj = fj.getFJDZ();//附件路径
String fjmc = fj.getFJMC();//附件名称
String wzfwlj = ip + fjlj;//完整路径
// 从文件路径读取字节数组
byte[] fileBytes = null;
try (InputStream in = new FileInputStream(wzfwlj);
ByteArrayOutputStream out = new ByteArrayOutputStream()) {
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = in.read(buffer)) != -1) {
out.write(buffer, 0, bytesRead);
}
fileBytes = out.toByteArray();
} catch (FileNotFoundException e) {
throw new BusinessException("文件不存在: " + wzfwlj);
} catch (IOException e) {
throw new BusinessException("读取文件失败: " + wzfwlj);
}
// 创建ZIP条目
ZipEntry entry = new ZipEntry(fjmc);
zos.putNextEntry(entry);
// 写入PDF文件到ZIP条目
zos.write(fileBytes);
zos.closeEntry();
}
}catch (Exception e){
e.getMessage();
throw new BusinessException("导出Excel失败,请联系网站管理员!");
}finally {
}
}
}
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;
/**
* 公共附件对象 gg_fjb
*
* @author qianhe
* @date 2025-08-04
*/
@Data
public class GgFjb extends BaseEntity
{
private static final long serialVersionUID = 1L;
private Long ID;
/** 业务表ID */
@Excel(name = "业务表ID")
private String YWID;
/** 附件名称 */
@Excel(name = "附件名称")
private String FJMC;
/** 附件地址 */
@Excel(name = "附件地址")
private String FJDZ;
/** 模块名称 */
@Excel(name = "模块名称")
private String MKMC;
/** 附件类型 */
@Excel(name = "附件类型")
private String FJLX;
private String CJR;
private String CJSJ;
private String XGR;
private String XGSJ;
}
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_bzxx
*
* @author qianhe
* @date 2025-08-04
*/
@Data
public class SjBzxx extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 单位id */
@Excel(name = "单位id")
private Long deptId;
/** 班组类型 */
@Excel(name = "班组类型")
private String bzlx;
/** 班组名称 */
@Excel(name = "班组名称")
private String bzmc;
/** 人数 */
@Excel(name = "人数")
private String rs;
/** 状态 0 未提交 1 已提交 */
@Excel(name = "状态 0 未提交 1 已提交")
private String zt;
//查询出的结果
private String deptName;//单位名称
private String bzzs;//班组总数
private String zrs;//总人数
//传入参数
private String ids;//批量ids 例如6,7,8 只有一个传入6
}
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 java.util.List;
/**
* 基层三册对象 sj_zdsc
*
* @author qianhe
* @date 2025-08-04
*/
@Data
public class SjZdsc extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 单位id */
@Excel(name = "单位id")
private Long deptId;
/** 类型 */
@Excel(name = "类型")
private String lx;
/** 制度名称 */
@Excel(name = "制度名称")
private String zdmc;
/** 版本 */
@Excel(name = "版本")
private String bb;
/** 附件描述 */
@Excel(name = "附件描述")
private String fjms;
/** 状态 0 未提交 1 已提交 */
@Excel(name = "状态 0 未提交 1 已提交")
private String zt;
/** 下载次数 */
@Excel(name = "下载次数")
private String xzcs;
private String fileListStr1;//附件传递参数(名称路径)JSON格式
private List<GgFjb> fileList1;//附件列表
//查询出的结果
private String deptName;//单位名称
}
package com.qianhe.mapper;
import java.util.List;
import java.util.Map;
import com.qianhe.domain.GgFjb;
import org.apache.ibatis.annotations.Param;
/**
* 公共附件Mapper接口
*
* @author qianhe
* @date 2025-08-04
*/
public interface GgFjbMapper
{
/**
* 查询公共附件
*
* @param ID 公共附件主键
* @return 公共附件
*/
public GgFjb selectGgFjbByID(Long ID);
/**
* 查询公共附件列表
*
* @param ggFjb 公共附件
* @return 公共附件集合
*/
public List<GgFjb> selectGgFjbList(GgFjb ggFjb);
/**
* 新增公共附件
*
* @param ggFjb 公共附件
* @return 结果
*/
public int insertGgFjb(GgFjb ggFjb);
/**
* 修改公共附件
*
* @param ggFjb 公共附件
* @return 结果
*/
public int updateGgFjb(GgFjb ggFjb);
/**
* 删除公共附件
*
* @param ID 公共附件主键
* @return 结果
*/
public int deleteGgFjbByID(Long ID);
/**
* 批量删除公共附件
*
* @param IDs 需要删除的数据主键集合
* @return 结果
*/
public int deleteGgFjbByIDs(Long[] IDs);
public int deleteFjByYwid(GgFjb ggFjb);
public int insertFj(GgFjb zbZbjcxxfjb);
List<GgFjb> selectFj(@Param("id") Long id, @Param("mkmc") String mkmc);
}
package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjBzxx;
/**
* 班组信息Mapper接口
*
* @author qianhe
* @date 2025-08-04
*/
public interface SjBzxxMapper
{
/**
* 查询班组信息
*
* @param id 班组信息主键
* @return 班组信息
*/
public SjBzxx selectSjBzxxById(Long id);
/**
* 查询班组信息列表
*
* @param sjBzxx 班组信息
* @return 班组信息集合
*/
public List<SjBzxx> selectSjBzxxList(SjBzxx sjBzxx);
/**
* 新增班组信息
*
* @param sjBzxx 班组信息
* @return 结果
*/
public int insertSjBzxx(SjBzxx sjBzxx);
/**
* 修改班组信息
*
* @param sjBzxx 班组信息
* @return 结果
*/
public int updateSjBzxx(SjBzxx sjBzxx);
public int plxg(SjBzxx sjBzxx);
/**
* 删除班组信息
*
* @param id 班组信息主键
* @return 结果
*/
public int deleteSjBzxxById(Long id);
/**
* 批量删除班组信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjBzxxByIds(Long[] ids);
public SjBzxx selectBzxxTj(SjBzxx sjBzxx);
}
package com.qianhe.mapper;
import java.util.List;
import com.qianhe.domain.SjZdsc;
/**
* 基层三册Mapper接口
*
* @author qianhe
* @date 2025-08-04
*/
public interface SjZdscMapper
{
/**
* 查询基层三册
*
* @param id 基层三册主键
* @return 基层三册
*/
public SjZdsc selectSjZdscById(Long id);
/**
* 查询基层三册列表
*
* @param sjZdsc 基层三册
* @return 基层三册集合
*/
public List<SjZdsc> selectSjZdscList(SjZdsc sjZdsc);
/**
* 新增基层三册
*
* @param sjZdsc 基层三册
* @return 结果
*/
public int insertSjZdsc(SjZdsc sjZdsc);
/**
* 修改基层三册
*
* @param sjZdsc 基层三册
* @return 结果
*/
public int updateSjZdsc(SjZdsc sjZdsc);
/**
* 删除基层三册
*
* @param id 基层三册主键
* @return 结果
*/
public int deleteSjZdscById(Long id);
/**
* 批量删除基层三册
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSjZdscByIds(Long[] ids);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.GgFjb;
/**
* 公共附件Service接口
*
* @author qianhe
* @date 2025-08-04
*/
public interface IGgFjbService
{
/**
* 查询公共附件
*
* @param ID 公共附件主键
* @return 公共附件
*/
public GgFjb selectGgFjbByID(Long ID);
/**
* 查询公共附件列表
*
* @param ggFjb 公共附件
* @return 公共附件集合
*/
public List<GgFjb> selectGgFjbList(GgFjb ggFjb);
/**
* 新增公共附件
*
* @param ggFjb 公共附件
* @return 结果
*/
public int insertGgFjb(GgFjb ggFjb);
/**
* 修改公共附件
*
* @param ggFjb 公共附件
* @return 结果
*/
public int updateGgFjb(GgFjb ggFjb);
/**
* 批量删除公共附件
*
* @param IDs 需要删除的公共附件主键集合
* @return 结果
*/
public int deleteGgFjbByIDs(Long[] IDs);
/**
* 删除公共附件信息
*
* @param ID 公共附件主键
* @return 结果
*/
public int deleteGgFjbByID(Long ID);
public int batchSaveFj(String businessId, String fjlx, String mkmc, String fileListStr);
List<GgFjb> selectFj(Long id, String mkmc);
int deleteFjByYwid(GgFjb ggFjb);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjBzxx;
/**
* 班组信息Service接口
*
* @author qianhe
* @date 2025-08-04
*/
public interface ISjBzxxService
{
/**
* 查询班组信息
*
* @param id 班组信息主键
* @return 班组信息
*/
public SjBzxx selectSjBzxxById(Long id);
public SjBzxx selectBzxxTj(SjBzxx sjBzxx);
/**
* 查询班组信息列表
*
* @param sjBzxx 班组信息
* @return 班组信息集合
*/
public List<SjBzxx> selectSjBzxxList(SjBzxx sjBzxx);
/**
* 新增班组信息
*
* @param sjBzxx 班组信息
* @return 结果
*/
public int insertSjBzxx(SjBzxx sjBzxx);
/**
* 修改班组信息
*
* @param sjBzxx 班组信息
* @return 结果
*/
public int updateSjBzxx(SjBzxx sjBzxx);
/**
* 批量删除班组信息
*
* @param ids 需要删除的班组信息主键集合
* @return 结果
*/
public int deleteSjBzxxByIds(Long[] ids);
/**
* 删除班组信息信息
*
* @param id 班组信息主键
* @return 结果
*/
public int deleteSjBzxxById(Long id);
public int pltj(SjBzxx sjBzxx);
}
package com.qianhe.service;
import java.util.List;
import com.qianhe.domain.SjZdsc;
/**
* 基层三册Service接口
*
* @author qianhe
* @date 2025-08-04
*/
public interface ISjZdscService
{
/**
* 查询基层三册
*
* @param id 基层三册主键
* @return 基层三册
*/
public SjZdsc selectSjZdscById(Long id);
/**
* 查询基层三册列表
*
* @param sjZdsc 基层三册
* @return 基层三册集合
*/
public List<SjZdsc> selectSjZdscList(SjZdsc sjZdsc);
/**
* 新增基层三册
*
* @param sjZdsc 基层三册
* @return 结果
*/
public int insertSjZdsc(SjZdsc sjZdsc);
/**
* 修改基层三册
*
* @param sjZdsc 基层三册
* @return 结果
*/
public int updateSjZdsc(SjZdsc sjZdsc);
/**
* 批量删除基层三册
*
* @param ids 需要删除的基层三册主键集合
* @return 结果
*/
public int deleteSjZdscByIds(Long[] ids);
/**
* 删除基层三册信息
*
* @param id 基层三册主键
* @return 结果
*/
public int deleteSjZdscById(Long id);
}
package com.qianhe.service.impl;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson2.JSON;
import com.qianhe.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qianhe.mapper.GgFjbMapper;
import com.qianhe.domain.GgFjb;
import com.qianhe.service.IGgFjbService;
/**
* 公共附件Service业务层处理
*
* @author qianhe
* @date 2025-08-04
*/
@Service
public class GgFjbServiceImpl implements IGgFjbService
{
@Autowired
private GgFjbMapper ggFjbMapper;
/**
* 查询公共附件
*
* @param ID 公共附件主键
* @return 公共附件
*/
@Override
public GgFjb selectGgFjbByID(Long ID)
{
return ggFjbMapper.selectGgFjbByID(ID);
}
/**
* 查询公共附件列表
*
* @param ggFjb 公共附件
* @return 公共附件
*/
@Override
public List<GgFjb> selectGgFjbList(GgFjb ggFjb)
{
return ggFjbMapper.selectGgFjbList(ggFjb);
}
/**
* 新增公共附件
*
* @param ggFjb 公共附件
* @return 结果
*/
@Override
public int insertGgFjb(GgFjb ggFjb)
{
return ggFjbMapper.insertGgFjb(ggFjb);
}
/**
* 修改公共附件
*
* @param ggFjb 公共附件
* @return 结果
*/
@Override
public int updateGgFjb(GgFjb ggFjb)
{
return ggFjbMapper.updateGgFjb(ggFjb);
}
/**
* 批量删除公共附件
*
* @param IDs 需要删除的公共附件主键
* @return 结果
*/
@Override
public int deleteGgFjbByIDs(Long[] IDs)
{
return ggFjbMapper.deleteGgFjbByIDs(IDs);
}
/**
* 删除公共附件信息
*
* @param ID 公共附件主键
* @return 结果
*/
@Override
public int deleteGgFjbByID(Long ID)
{
return ggFjbMapper.deleteGgFjbByID(ID);
}
@Override
public int batchSaveFj(String businessId, String fjlx, String mkmc, String fileListStr)
{
int i2 = 0;
if(fileListStr != null && fileListStr.length()>0){
List<GgFjb> fileList = JSON.parseArray(fileListStr, GgFjb.class);
GgFjb map = new GgFjb();
map.setYWID(businessId);
map.setFJLX(fjlx);
map.setMKMC(mkmc);
ggFjbMapper.deleteFjByYwid(map);//修改保存前先删除附件表
for(int i=0;i<fileList.size();i++){
GgFjb file = fileList.get(i);
String name = file.getFJMC();
String fileName = file.getFJDZ();
GgFjb infj = new GgFjb();
infj.setFJMC(name);
infj.setFJDZ(fileName);
infj.setFJLX(fjlx);
infj.setMKMC(mkmc);
infj.setCJR(SecurityUtils.getLoginUser().getUsername());
infj.setYWID(businessId);
infj.setCJSJ(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
i2 = i2 + ggFjbMapper.insertFj(infj);
}
}
return i2;
}
@Override
public List<GgFjb> selectFj(Long id, String mkmc) {
return ggFjbMapper.selectFj(id,mkmc);
}
@Override
public int deleteFjByYwid(GgFjb fj) {
return ggFjbMapper.deleteFjByYwid(fj);
}
}
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.SjBzxxMapper;
import com.qianhe.domain.SjBzxx;
import com.qianhe.service.ISjBzxxService;
/**
* 班组信息Service业务层处理
*
* @author qianhe
* @date 2025-08-04
*/
@Service
public class SjBzxxServiceImpl implements ISjBzxxService
{
@Autowired
private SjBzxxMapper sjBzxxMapper;
/**
* 查询班组信息
*
* @param id 班组信息主键
* @return 班组信息
*/
@Override
public SjBzxx selectSjBzxxById(Long id)
{
return sjBzxxMapper.selectSjBzxxById(id);
}
/**
* 查询班组信息列表
*
* @param sjBzxx 班组信息
* @return 班组信息
*/
@Override
@DataScope(deptAlias = "d")
public List<SjBzxx> selectSjBzxxList(SjBzxx sjBzxx)
{
return sjBzxxMapper.selectSjBzxxList(sjBzxx);
}
/**
* 新增班组信息
*
* @param sjBzxx 班组信息
* @return 结果
*/
@Override
public int insertSjBzxx(SjBzxx sjBzxx)
{
sjBzxx.setCreateBy(SecurityUtils.getUsername());
sjBzxx.setCreateTime(DateUtils.getNowDate());
return sjBzxxMapper.insertSjBzxx(sjBzxx);
}
/**
* 修改班组信息
*
* @param sjBzxx 班组信息
* @return 结果
*/
@Override
public int updateSjBzxx(SjBzxx sjBzxx)
{
sjBzxx.setUpdateBy(SecurityUtils.getUsername());
sjBzxx.setUpdateTime(DateUtils.getNowDate());
return sjBzxxMapper.updateSjBzxx(sjBzxx);
}
/**
* 批量删除班组信息
*
* @param ids 需要删除的班组信息主键
* @return 结果
*/
@Override
public int deleteSjBzxxByIds(Long[] ids)
{
return sjBzxxMapper.deleteSjBzxxByIds(ids);
}
/**
* 删除班组信息信息
*
* @param id 班组信息主键
* @return 结果
*/
@Override
public int deleteSjBzxxById(Long id)
{
return sjBzxxMapper.deleteSjBzxxById(id);
}
@Override
public SjBzxx selectBzxxTj(SjBzxx sjBzxx)
{
return sjBzxxMapper.selectBzxxTj(sjBzxx);
}
@Override
public int pltj(SjBzxx sjBzxx)
{
sjBzxx.setUpdateBy(SecurityUtils.getUsername());
sjBzxx.setUpdateTime(DateUtils.getNowDate());
return sjBzxxMapper.plxg(sjBzxx);
}
}
package com.qianhe.service.impl;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.qianhe.common.annotation.DataScope;
import com.qianhe.common.utils.DateUtils;
import com.qianhe.domain.GgFjb;
import com.qianhe.service.IGgFjbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qianhe.mapper.SjZdscMapper;
import com.qianhe.domain.SjZdsc;
import com.qianhe.service.ISjZdscService;
/**
* 基层三册Service业务层处理
*
* @author qianhe
* @date 2025-08-04
*/
@Service
public class SjZdscServiceImpl implements ISjZdscService
{
@Autowired
private SjZdscMapper sjZdscMapper;
@Autowired
private IGgFjbService fjbService;
/**
* 查询基层三册
*
* @param id 基层三册主键
* @return 基层三册
*/
@Override
public SjZdsc selectSjZdscById(Long id)
{
SjZdsc rt = sjZdscMapper.selectSjZdscById(id);
//查询附件
List<GgFjb> fjlist = fjbService.selectFj(id,"基层三册");
Map<String, List<GgFjb>> map = fjlist.stream().collect(Collectors.groupingBy(GgFjb::getFJLX));
if(map.get("基层三册")!=null){
List<GgFjb> fileData = map.get("基层三册").stream().collect(Collectors.toList());
rt.setFileList1(fileData);
}
return rt;
}
/**
* 查询基层三册列表
*
* @param sjZdsc 基层三册
* @return 基层三册
*/
@Override
@DataScope(deptAlias = "d")
public List<SjZdsc> selectSjZdscList(SjZdsc sjZdsc)
{
return sjZdscMapper.selectSjZdscList(sjZdsc);
}
/**
* 新增基层三册
*
* @param sjZdsc 基层三册
* @return 结果
*/
@Override
public int insertSjZdsc(SjZdsc sjZdsc)
{
sjZdsc.setCreateTime(DateUtils.getNowDate());
return sjZdscMapper.insertSjZdsc(sjZdsc);
}
/**
* 修改基层三册
*
* @param sjZdsc 基层三册
* @return 结果
*/
@Override
public int updateSjZdsc(SjZdsc sjZdsc)
{
sjZdsc.setUpdateTime(DateUtils.getNowDate());
return sjZdscMapper.updateSjZdsc(sjZdsc);
}
/**
* 批量删除基层三册
*
* @param ids 需要删除的基层三册主键
* @return 结果
*/
@Override
public int deleteSjZdscByIds(Long[] ids)
{
return sjZdscMapper.deleteSjZdscByIds(ids);
}
/**
* 删除基层三册信息
*
* @param id 基层三册主键
* @return 结果
*/
@Override
public int deleteSjZdscById(Long id)
{
return sjZdscMapper.deleteSjZdscById(id);
}
}
<?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.GgFjbMapper">
<resultMap type="GgFjb" id="GgFjbResult">
<result property="ID" column="ID" />
<result property="YWID" column="YWID" />
<result property="FJMC" column="FJMC" />
<result property="FJDZ" column="FJDZ" />
<result property="MKMC" column="MKMC" />
<result property="FJLX" column="FJLX" />
<result property="CJR" column="CJR" />
<result property="CJSJ" column="CJSJ" />
<result property="XGR" column="XGR" />
<result property="XGSJ" column="XGSJ" />
</resultMap>
<sql id="selectGgFjbVo">
select ID, YWID, FJMC, FJDZ, MKMC, FJLX, CJR, CJSJ, XGR, XGSJ
from gg_fjb
</sql>
<select id="selectGgFjbList" parameterType="GgFjb" resultMap="GgFjbResult">
<include refid="selectGgFjbVo"/>
<where>
<if test="YWID != null and YWID != ''"> and YWID = #{YWID}</if>
<if test="FJMC != null and FJMC != ''"> and FJMC = #{FJMC}</if>
<if test="FJDZ != null and FJDZ != ''"> and FJDZ = #{FJDZ}</if>
<if test="MKMC != null and MKMC != ''"> and MKMC = #{MKMC}</if>
<if test="FJLX != null and FJLX != ''"> and FJLX = #{FJLX}</if>
<if test="CJR != null and CJR != ''"> and CJR = #{CJR}</if>
<if test="CJSJ != null and CJSJ != ''"> and CJSJ = #{CJSJ}</if>
<if test="XGR != null and XGR != ''"> and XGR = #{XGR}</if>
<if test="XGSJ != null and XGSJ != ''"> and XGSJ = #{XGSJ}</if>
</where>
</select>
<select id="selectGgFjbByID" parameterType="Long" resultMap="GgFjbResult">
<include refid="selectGgFjbVo"/>
where ID = #{ID}
</select>
<insert id="insertGgFjb" parameterType="GgFjb" useGeneratedKeys="true" keyProperty="ID">
insert into gg_fjb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="YWID != null">YWID,</if>
<if test="FJMC != null">FJMC,</if>
<if test="FJDZ != null">FJDZ,</if>
<if test="MKMC != null">MKMC,</if>
<if test="FJLX != null">FJLX,</if>
<if test="CJR != null">CJR,</if>
<if test="CJSJ != null">CJSJ,</if>
<if test="XGR != null">XGR,</if>
<if test="XGSJ != null">XGSJ,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="YWID != null">#{YWID},</if>
<if test="FJMC != null">#{FJMC},</if>
<if test="FJDZ != null">#{FJDZ},</if>
<if test="MKMC != null">#{MKMC},</if>
<if test="FJLX != null">#{FJLX},</if>
<if test="CJR != null">#{CJR},</if>
<if test="CJSJ != null">#{CJSJ},</if>
<if test="XGR != null">#{XGR},</if>
<if test="XGSJ != null">#{XGSJ},</if>
</trim>
</insert>
<update id="updateGgFjb" parameterType="GgFjb">
update gg_fjb
<trim prefix="SET" suffixOverrides=",">
<if test="YWID != null">YWID = #{YWID},</if>
<if test="FJMC != null">FJMC = #{FJMC},</if>
<if test="FJDZ != null">FJDZ = #{FJDZ},</if>
<if test="MKMC != null">MKMC = #{MKMC},</if>
<if test="FJLX != null">FJLX = #{FJLX},</if>
<if test="CJR != null">CJR = #{CJR},</if>
<if test="CJSJ != null">CJSJ = #{CJSJ},</if>
<if test="XGR != null">XGR = #{XGR},</if>
<if test="XGSJ != null">XGSJ = #{XGSJ},</if>
</trim>
where ID = #{ID}
</update>
<delete id="deleteGgFjbByID" parameterType="Long">
delete from gg_fjb where ID = #{ID}
</delete>
<delete id="deleteGgFjbByIDs" parameterType="String">
delete from gg_fjb where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>
</delete>
<insert id="insertFj" parameterType="GgFjb">
insert into gg_fjb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="YWID != null">YWID,</if>
<if test="FJMC != null">FJMC,</if>
<if test="FJDZ != null">FJDZ,</if>
<if test="MKMC != null">MKMC,</if>
<if test="FJLX != null">FJLX,</if>
<if test="CJR != null">CJR,</if>
<if test="CJSJ != null">CJSJ,</if>
<if test="XGR != null">XGR,</if>
<if test="XGSJ != null">XGSJ,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="YWID != null">#{YWID},</if>
<if test="FJMC != null">#{FJMC},</if>
<if test="FJDZ != null">#{FJDZ},</if>
<if test="MKMC != null">#{MKMC},</if>
<if test="FJLX != null">#{FJLX},</if>
<if test="CJR != null">#{CJR},</if>
<if test="CJSJ != null">#{CJSJ},</if>
<if test="XGR != null">#{XGR},</if>
<if test="XGSJ != null">#{XGSJ},</if>
</trim>
</insert>
<delete id="deleteFjByYwid" parameterType="GgFjb">
delete from gg_fjb where YWID = #{SFBM} AND FJLX =#{FJLX} AND MKMC =#{MKMC}
</delete>
<select id="selectFj" resultMap="GgFjbResult">
select * from gg_fjb where YWID = #{id} and MKMC = #{mkmc};
</select>
</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.SjBzxxMapper">
<resultMap type="SjBzxx" id="SjBzxxResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="bzlx" column="bzlx" />
<result property="bzmc" column="bzmc" />
<result property="rs" column="rs" />
<result property="zt" column="zt" />
<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="deptName" column="dept_name" />
<result property="bzzs" column="bzzs" />
<result property="zrs" column="zrs" />
</resultMap>
<sql id="selectSjBzxxVo">
select a.id, a.dept_id, a.bzlx, a.bzmc, a.rs, a.zt, a.create_by, a.create_time, a.update_by, a.update_time,
a.remark,
d.dept_name
from sj_bzxx a
left join sys_dept d on a.dept_id=d.dept_id
</sql>
<select id="selectSjBzxxList" parameterType="SjBzxx" resultMap="SjBzxxResult">
<include refid="selectSjBzxxVo"/>
<where>
<if test="deptId != null ">and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="bzlx != null and bzlx != ''"> and bzlx = #{bzlx}</if>
<if test="bzmc != null and bzmc != ''"> and bzmc = #{bzmc}</if>
<if test="rs != null and rs != ''"> and rs = #{rs}</if>
<if test="zt != null and zt != ''"> and zt = #{zt}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
</select>
<select id="selectSjBzxxById" parameterType="Long" resultMap="SjBzxxResult">
<include refid="selectSjBzxxVo"/>
where a.id = #{id}
</select>
<insert id="insertSjBzxx" parameterType="SjBzxx" useGeneratedKeys="true" keyProperty="id">
insert into sj_bzxx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="bzlx != null">bzlx,</if>
<if test="bzmc != null">bzmc,</if>
<if test="rs != null">rs,</if>
<if test="zt != null">zt,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="bzlx != null">#{bzlx},</if>
<if test="bzmc != null">#{bzmc},</if>
<if test="rs != null">#{rs},</if>
<if test="zt != null">#{zt},</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>
</trim>
</insert>
<update id="updateSjBzxx" parameterType="SjBzxx">
update sj_bzxx
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="bzlx != null">bzlx = #{bzlx},</if>
<if test="bzmc != null">bzmc = #{bzmc},</if>
<if test="rs != null">rs = #{rs},</if>
<if test="zt != null">zt = #{zt},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteSjBzxxById" parameterType="Long">
delete from sj_bzxx where id = #{id}
</delete>
<delete id="deleteSjBzxxByIds" parameterType="String">
delete from sj_bzxx where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<!--查询统计-->
<select id="selectBzxxTj" parameterType="SjBzxx" resultMap="SjBzxxResult">
select a.dept_id, a.bzlx, count(a.id) bzzs, sum(a.rs) zrs,
d.dept_name
from sj_bzxx a
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
group by a.dept_id, a.bzlx
</select>
<update id="plxg" parameterType="SjBzxx">
update sj_bzxx
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="bzlx != null">bzlx = #{bzlx},</if>
<if test="bzmc != null">bzmc = #{bzmc},</if>
<if test="rs != null">rs = #{rs},</if>
<if test="zt != null">zt = #{zt},</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>
</trim>
where find_in_set(id, #{ids}))
</update>
</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.SjZdscMapper">
<resultMap type="SjZdsc" id="SjZdscResult">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
<result property="lx" column="lx" />
<result property="zdmc" column="zdmc" />
<result property="bb" column="bb" />
<result property="fjms" column="fjms" />
<result property="zt" column="zt" />
<result property="xzcs" column="xzcs" />
<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="deptName" column="dept_name" />
</resultMap>
<sql id="selectSjZdscVo">
select a.id, a.dept_id, a.lx, a.zdmc, a.bb, a.fjms, a.zt, a.xzcs, a.create_by, a.create_time,
a.update_by, a.update_time, a.remark,
d.dept_name
from sj_zdsc a
left join sys_dept d on a.dept_id=d.dept_id
</sql>
<select id="selectSjZdscList" parameterType="SjZdsc" resultMap="SjZdscResult">
<include refid="selectSjZdscVo"/>
<where>
<if test="deptId != null ">and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))</if>
<if test="lx != null and lx != ''"> and lx = #{lx}</if>
<if test="zdmc != null and zdmc != ''"> and zdmc = #{zdmc}</if>
<if test="bb != null and bb != ''"> and bb = #{bb}</if>
<if test="fjms != null and fjms != ''"> and fjms = #{fjms}</if>
<if test="zt != null and zt != ''"> and zt = #{zt}</if>
<if test="xzcs != null and xzcs != ''"> and xzcs = #{xzcs}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
</select>
<select id="selectSjZdscById" parameterType="Long" resultMap="SjZdscResult">
<include refid="selectSjZdscVo"/>
where a.id = #{id}
</select>
<insert id="insertSjZdsc" parameterType="SjZdsc" useGeneratedKeys="true" keyProperty="id">
insert into sj_zdsc
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if>
<if test="lx != null">lx,</if>
<if test="zdmc != null">zdmc,</if>
<if test="bb != null">bb,</if>
<if test="fjms != null">fjms,</if>
<if test="zt != null">zt,</if>
<if test="xzcs != null">xzcs,</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>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if>
<if test="lx != null">#{lx},</if>
<if test="zdmc != null">#{zdmc},</if>
<if test="bb != null">#{bb},</if>
<if test="fjms != null">#{fjms},</if>
<if test="zt != null">#{zt},</if>
<if test="xzcs != null">#{xzcs},</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>
</trim>
</insert>
<update id="updateSjZdsc" parameterType="SjZdsc">
update sj_zdsc
<trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="lx != null">lx = #{lx},</if>
<if test="zdmc != null">zdmc = #{zdmc},</if>
<if test="bb != null">bb = #{bb},</if>
<if test="fjms != null">fjms = #{fjms},</if>
<if test="zt != null">zt = #{zt},</if>
<if test="xzcs != null">xzcs = #{xzcs},</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>
</trim>
where id = #{id}
</update>
<delete id="deleteSjZdscById" parameterType="Long">
delete from sj_zdsc where id = #{id}
</delete>
<delete id="deleteSjZdscByIds" parameterType="String">
delete from sj_zdsc 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