xiangpei
2024-03-13 9ccd0bc5786cbb1bca2c9fda28f0cd730126656d
合并
7个文件已添加
1060 ■■■■■ 已修改文件
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TContract.java 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/vo/TMonitorVO.java 522 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/TContractController.java 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/mapper/TContractMapper.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/ITContractService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/service/impl/TContractServiceImpl.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/TContractMapper.xml 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TContract.java
New file
@@ -0,0 +1,135 @@
package com.ycl.platform.domain.entity;
import annotation.Excel;
import com.ycl.system.entity.BaseEntity;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import java.util.Date;
/**
 * 【请填写功能名称】对象 t_contract
 *
 * @author ruoyi
 * @date 2024-03-12
 */
public class TContract extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** 主键 */
    private Long id;
    /** 公司id */
    @Excel(name = "公司id")
    private Long companyId;
    /** 公司名 */
    @Excel(name = "公司名")
    private String companyName;
    /** 对接公安部门id */
    @Excel(name = "对接公安部门id")
    private Long deptId;
    /** 部门名称 */
    @Excel(name = "部门名称")
    private String deptName;
    /** 合同明细json */
    @Excel(name = "合同明细json")
    private String detail;
    /** 开始时间 */
    @Excel(name = "开始时间")
    private Date startTime;
    /** 截止时间 */
    @Excel(name = "截止时间")
    private Date endTime;
    public Date getStartTime() {
        return startTime;
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    public Date getEndTime() {
        return endTime;
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setCompanyId(Long companyId)
    {
        this.companyId = companyId;
    }
    public Long getCompanyId()
    {
        return companyId;
    }
    public void setCompanyName(String companyName)
    {
        this.companyName = companyName;
    }
    public String getCompanyName()
    {
        return companyName;
    }
    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }
    public Long getDeptId()
    {
        return deptId;
    }
    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }
    public String getDeptName()
    {
        return deptName;
    }
    public void setDetail(String detail)
    {
        this.detail = detail;
    }
    public String getDetail()
    {
        return detail;
    }
    @Override
    public String toString() {
        return "TContract{" +
                "id=" + id +
                ", companyId=" + companyId +
                ", companyName='" + companyName + '\'' +
                ", deptId=" + deptId +
                ", deptName='" + deptName + '\'' +
                ", detail='" + detail + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                '}';
    }
}
ycl-pojo/src/main/java/com/ycl/platform/domain/vo/TMonitorVO.java
New file
@@ -0,0 +1,522 @@
package com.ycl.platform.domain.vo;
import annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ycl.system.entity.BaseEntity;
import java.util.Date;
/**
 * 设备资产对象 t_monitor
 *
 * @author ruoyi
 * @date 2024-03-04
 */
public class TMonitorVO extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** $column.columnComment */
    private Long id;
    /** 设备编码 */
    @Excel(name = "设备编码")
    private String serialNumber;
    /** 设备名称 */
    @Excel(name = "设备名称")
    private String name;
    /** 监控点位类型 [1.一类视频监控点;2.二类视频监控点;3.三类视频监控点;4.公安内部视频监控点;9.其他点位;] */
    @Excel(name = "监控点位类型 [1.一类视频监控点;2.二类视频监控点;3.三类视频监控点;4.公安内部视频监控点;9.其他点位;]")
    private Long siteType;
    /** 摄像机Mac地址 */
    @Excel(name = "摄像机Mac地址")
    private String macAddr;
    /** 摄像机IPV4或IPV6地址 */
    @Excel(name = "摄像机IPV4或IPV6地址")
    private String ip;
    /** 摄像机功能类型[1.视频监控;2.车辆识别;3.人员识别;] 数据格式[填入多个值并以/隔开。例如  1/2] */
    @Excel(name = "摄像机功能类型[1.视频监控;2.车辆识别;3.人员识别;] 数据格式[填入多个值并以/隔开。例如  1/2]")
    private String cameraFunType;
    /** 设备经度,至少保留六位小数 */
    @Excel(name = "设备经度,至少保留六位小数")
    private String longitude;
    /** 设备维度,至少保留六位小数 */
    @Excel(name = "设备维度,至少保留六位小数")
    private String latitude;
    /** 摄像机采集区域参考字典表,数据多选以/隔开 */
    @Excel(name = "摄像机采集区域参考字典表,数据多选以/隔开")
    private String cameraCaptureArea;
    /** 设备状态 1/2 可用/不可用 */
    @Excel(name = "设备状态 1/2 可用/不可用")
    private Long onState;
    /** 行政区域 */
    @Excel(name = "行政区域")
    private String civilCode;
    /** 是否集成设备,0/1 不是/是 */
    @Excel(name = "是否集成设备,0/1 不是/是")
    private Long integratedDevice;
    /** 摄像机品牌 [1.海康威视;2.大华;3.天地伟业;4.科达;5.安讯士;6.博世;7.亚安;8.英飞拓;9.宇视;10.海信;11.中星电子;12.明景;13.联想;14.中兴;15.索尼;16.三星;99.其它; */
    @Excel(name = "摄像机品牌 [1.海康威视;2.大华;3.天地伟业;4.科达;5.安讯士;6.博世;7.亚安;8.英飞拓;9.宇视;10.海信;11.中星电子;12.明景;13.联想;14.中兴;15.索尼;16.三星;99.其它;")
    private Long cameraBrand;
    /** 安装地址 */
    @Excel(name = "安装地址")
    private String address;
    /** 联网属性 0/1 已联网/未联网 */
    @Excel(name = "联网属性 0/1 已联网/未联网")
    private Long netWorking;
    /** 所属辖区公安机关 */
    @Excel(name = "所属辖区公安机关")
    private String publicSecurity;
    /** 安装时间 yyyy-MM-dd HH:mm:ss */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "安装时间 yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date installedTime;
    /** 管理单位 */
    @Excel(name = "管理单位")
    private String managementUnit;
    /** 管理单位联系方式 */
    @Excel(name = "管理单位联系方式")
    private String muContactInfo;
    /** 录象保存天数 0 - 2147483647 */
    @Excel(name = "录象保存天数 0 - 2147483647")
    private Long storageDays;
    /** 监视方位 [1.东;2.西;3.南;4.北;5.东南;6.东北;7.西南;8.西北;9.全向;] */
    @Excel(name = "监视方位 [1.东;2.西;3.南;4.北;5.东南;6.东北;7.西南;8.西北;9.全向;]")
    private Long monitorAzimuth;
    /** 摄像机场景预设照片URL */
    @Excel(name = "摄像机场景预设照片URL")
    private String scenePhotoAddr;
    /** 设备型号 */
    @Excel(name = "设备型号")
    private String model;
    /** 点位俗称 */
    @Excel(name = "点位俗称")
    private String siteVulgo;
    /** 摄像机类型 [1.球机;2.半球;3.固定枪机;4.遥控枪机;5.卡口枪机;99.未知; */
    @Excel(name = "摄像机类型 [1.球机;2.半球;3.固定枪机;4.遥控枪机;5.卡口枪机;99.未知;")
    private Long cameraType;
    /** 补光属性[1.无补光;2.红外补光;3.白光补光;9.其他补光;]  */
    @Excel(name = "补光属性[1.无补光;2.红外补光;3.白光补光;9.其他补光;] ")
    private Long cameraLightType;
    /** 摄像机编码格式 [1.MPEG-4;2.H.264;3.SVAC;4.H.265;] */
    @Excel(name = "摄像机编码格式 [1.MPEG-4;2.H.264;3.SVAC;4.H.265;]")
    private Long encodedFormat;
    /** 所属部门/行业 取值范围(多选) : [1.公安机关;2.环保部门;3.文博部门;4.医疗部门;5.旅游管理;6.新闻广电;7.食品医药监督管理部门;8.教育管理部门;9.检察院;10.法院;11.金融部门;12.交通部门;13.住房和城乡建设部门;14.水利部门;15.林业部门;16.安全生产监督部门;17.市政市容委;18.国土局;] 数据格式[填入多个值并以/隔开。例如  1/2] */
    @Excel(name = "所属部门/行业 取值范围(多选) : [1.公安机关;2.环保部门;3.文博部门;4.医疗部门;5.旅游管理;6.新闻广电;7.食品医药监督管理部门;8.教育管理部门;9.检察院;10.法院;11.金融部门;12.交通部门;13.住房和城乡建设部门;14.水利部门;15.林业部门;16.安全生产监督部门;17.市政市容委;18.国土局;] 数据格式[填入多个值并以/隔开。例如  1/2]")
    private String cameraDept;
    /** 行业编码 [00.社会治安路面接入;01.社会治安社区接入;02.社会治安内部接入;03.社会治安其他接入;04.交通路面接入;05.交通卡口接入;06.交通内部接入;07.交通其他接入;08.城市管理接入;09.卫生环保接入;10.商检海关接入;11.教育部门接入;] */
    @Excel(name = "行业编码 [00.社会治安路面接入;01.社会治安社区接入;02.社会治安内部接入;03.社会治安其他接入;04.交通路面接入;05.交通卡口接入;06.交通内部接入;07.交通其他接入;08.城市管理接入;09.卫生环保接入;10.商检海关接入;11.教育部门接入;]")
    private String hybm;
    /** 类型编码 : [131.摄像机编码;132.网络摄像机编码;] */
    @Excel(name = "类型编码 : [131.摄像机编码;132.网络摄像机编码;]")
    private Long lxbm;
    @Excel(name = "异常原因")
    private String reason;
    @Excel(name = "是否生成异常工单")
    private Long defaultOrder;
    @Excel(name ="异常恢复标识")
    private Long recovery;
    @Excel(name = "异常恢复时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date recoveryTime;
    private String deptName;
    public String getDeptName() {
        return deptName;
    }
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
    public Long getDefaultOrder() {
        return defaultOrder;
    }
    public void setDefaultOrder(Long defaultOrder) {
        this.defaultOrder = defaultOrder;
    }
    public void setInstalledTime(Date installedTime) {
        this.installedTime = installedTime;
    }
    public Date getInstalledTime() {
        return installedTime;
    }
    public Date getRecoveryTime() {
        return recoveryTime;
    }
    public void setRecoveryTime(Date recoveryTime) {
        this.recoveryTime = recoveryTime;
    }
    public Long getRecovery() {
        return recovery;
    }
    public void setRecovery(Long recovery) {
        this.recovery = recovery;
    }
    public String getReason() {
        return reason;
    }
    public void setReason(String reason) {
        this.reason = reason;
    }
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setSerialNumber(String serialNumber)
    {
        this.serialNumber = serialNumber;
    }
    public String getSerialNumber()
    {
        return serialNumber;
    }
    public void setName(String name)
    {
        this.name = name;
    }
    public String getName()
    {
        return name;
    }
    public void setSiteType(Long siteType)
    {
        this.siteType = siteType;
    }
    public Long getSiteType()
    {
        return siteType;
    }
    public void setMacAddr(String macAddr)
    {
        this.macAddr = macAddr;
    }
    public String getMacAddr()
    {
        return macAddr;
    }
    public void setIp(String ip)
    {
        this.ip = ip;
    }
    public String getIp()
    {
        return ip;
    }
    public void setCameraFunType(String cameraFunType)
    {
        this.cameraFunType = cameraFunType;
    }
    public String getCameraFunType()
    {
        return cameraFunType;
    }
    public void setLongitude(String longitude)
    {
        this.longitude = longitude;
    }
    public String getLongitude()
    {
        return longitude;
    }
    public void setLatitude(String latitude)
    {
        this.latitude = latitude;
    }
    public String getLatitude()
    {
        return latitude;
    }
    public void setCameraCaptureArea(String cameraCaptureArea)
    {
        this.cameraCaptureArea = cameraCaptureArea;
    }
    public String getCameraCaptureArea()
    {
        return cameraCaptureArea;
    }
    public void setOnState(Long onState)
    {
        this.onState = onState;
    }
    public Long getOnState()
    {
        return onState;
    }
    public void setCivilCode(String civilCode)
    {
        this.civilCode = civilCode;
    }
    public String getCivilCode()
    {
        return civilCode;
    }
    public void setIntegratedDevice(Long integratedDevice)
    {
        this.integratedDevice = integratedDevice;
    }
    public Long getIntegratedDevice()
    {
        return integratedDevice;
    }
    public void setCameraBrand(Long cameraBrand)
    {
        this.cameraBrand = cameraBrand;
    }
    public Long getCameraBrand()
    {
        return cameraBrand;
    }
    public void setAddress(String address)
    {
        this.address = address;
    }
    public String getAddress()
    {
        return address;
    }
    public void setNetWorking(Long netWorking)
    {
        this.netWorking = netWorking;
    }
    public Long getNetWorking()
    {
        return netWorking;
    }
    public void setPublicSecurity(String publicSecurity)
    {
        this.publicSecurity = publicSecurity;
    }
    public String getPublicSecurity()
    {
        return publicSecurity;
    }
    public void setManagementUnit(String managementUnit)
    {
        this.managementUnit = managementUnit;
    }
    public String getManagementUnit()
    {
        return managementUnit;
    }
    public void setMuContactInfo(String muContactInfo)
    {
        this.muContactInfo = muContactInfo;
    }
    public String getMuContactInfo()
    {
        return muContactInfo;
    }
    public void setStorageDays(Long storageDays)
    {
        this.storageDays = storageDays;
    }
    public Long getStorageDays()
    {
        return storageDays;
    }
    public void setMonitorAzimuth(Long monitorAzimuth)
    {
        this.monitorAzimuth = monitorAzimuth;
    }
    public Long getMonitorAzimuth()
    {
        return monitorAzimuth;
    }
    public void setScenePhotoAddr(String scenePhotoAddr)
    {
        this.scenePhotoAddr = scenePhotoAddr;
    }
    public String getScenePhotoAddr()
    {
        return scenePhotoAddr;
    }
    public void setModel(String model)
    {
        this.model = model;
    }
    public String getModel()
    {
        return model;
    }
    public void setSiteVulgo(String siteVulgo)
    {
        this.siteVulgo = siteVulgo;
    }
    public String getSiteVulgo()
    {
        return siteVulgo;
    }
    public void setCameraType(Long cameraType)
    {
        this.cameraType = cameraType;
    }
    public Long getCameraType()
    {
        return cameraType;
    }
    public void setCameraLightType(Long cameraLightType)
    {
        this.cameraLightType = cameraLightType;
    }
    public Long getCameraLightType()
    {
        return cameraLightType;
    }
    public void setEncodedFormat(Long encodedFormat)
    {
        this.encodedFormat = encodedFormat;
    }
    public Long getEncodedFormat()
    {
        return encodedFormat;
    }
    public void setCameraDept(String cameraDept)
    {
        this.cameraDept = cameraDept;
    }
    public String getCameraDept()
    {
        return cameraDept;
    }
    public void setHybm(String hybm)
    {
        this.hybm = hybm;
    }
    public String getHybm()
    {
        return hybm;
    }
    public void setLxbm(Long lxbm)
    {
        this.lxbm = lxbm;
    }
    public Long getLxbm()
    {
        return lxbm;
    }
    @Override
    public String toString() {
        return "TMonitorVO{" +
                "id=" + id +
                ", serialNumber='" + serialNumber + '\'' +
                ", name='" + name + '\'' +
                ", siteType=" + siteType +
                ", macAddr='" + macAddr + '\'' +
                ", ip='" + ip + '\'' +
                ", cameraFunType='" + cameraFunType + '\'' +
                ", longitude='" + longitude + '\'' +
                ", latitude='" + latitude + '\'' +
                ", cameraCaptureArea='" + cameraCaptureArea + '\'' +
                ", onState=" + onState +
                ", civilCode='" + civilCode + '\'' +
                ", integratedDevice=" + integratedDevice +
                ", cameraBrand=" + cameraBrand +
                ", address='" + address + '\'' +
                ", netWorking=" + netWorking +
                ", publicSecurity='" + publicSecurity + '\'' +
                ", installedTime=" + installedTime +
                ", managementUnit='" + managementUnit + '\'' +
                ", muContactInfo='" + muContactInfo + '\'' +
                ", storageDays=" + storageDays +
                ", monitorAzimuth=" + monitorAzimuth +
                ", scenePhotoAddr='" + scenePhotoAddr + '\'' +
                ", model='" + model + '\'' +
                ", siteVulgo='" + siteVulgo + '\'' +
                ", cameraType=" + cameraType +
                ", cameraLightType=" + cameraLightType +
                ", encodedFormat=" + encodedFormat +
                ", cameraDept='" + cameraDept + '\'' +
                ", hybm='" + hybm + '\'' +
                ", lxbm=" + lxbm +
                ", reason='" + reason + '\'' +
                ", defaultOrder=" + defaultOrder +
                ", recovery=" + recovery +
                ", recoveryTime=" + recoveryTime +
                ", deptName='" + deptName + '\'' +
                '}';
    }
}
ycl-server/src/main/java/com/ycl/platform/controller/TContractController.java
New file
@@ -0,0 +1,99 @@
package com.ycl.platform.controller;
import annotation.Log;
import com.ycl.platform.domain.entity.TContract;
import com.ycl.platform.service.ITContractService;
import com.ycl.system.AjaxResult;
import com.ycl.system.controller.BaseController;
import com.ycl.system.page.TableDataInfo;
import com.ycl.utils.poi.ExcelUtil;
import enumeration.BusinessType;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * 【请填写功能名称】Controller
 *
 * @author ruoyi
 * @date 2024-03-12
 */
@RestController
@RequestMapping("/system/contract")
public class TContractController extends BaseController
{
    @Autowired
    private ITContractService tContractService;
    /**
     * 查询【请填写功能名称】列表
     */
    @PreAuthorize("@ss.hasPermi('system:contract:list')")
    @GetMapping("/list")
    public TableDataInfo list(TContract tContract)
    {
        startPage();
        List<TContract> list = tContractService.selectTContractList(tContract);
        return getDataTable(list);
    }
    /**
     * 导出【请填写功能名称】列表
     */
    @PreAuthorize("@ss.hasPermi('system:contract:export')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, TContract tContract)
    {
        List<TContract> list = tContractService.selectTContractList(tContract);
        ExcelUtil<TContract> util = new ExcelUtil<TContract>(TContract.class);
        util.exportExcel(response, list, "【请填写功能名称】数据");
    }
    /**
     * 获取【请填写功能名称】详细信息
     */
    @PreAuthorize("@ss.hasPermi('system:contract:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(tContractService.selectTContractById(id));
    }
    /**
     * 新增【请填写功能名称】
     */
    @PreAuthorize("@ss.hasPermi('system:contract:add')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TContract tContract)
    {
        return toAjax(tContractService.insertTContract(tContract));
    }
    /**
     * 修改【请填写功能名称】
     */
    @PreAuthorize("@ss.hasPermi('system:contract:edit')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody TContract tContract)
    {
        return toAjax(tContractService.updateTContract(tContract));
    }
    /**
     * 删除【请填写功能名称】
     */
    @PreAuthorize("@ss.hasPermi('system:contract:remove')")
    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(tContractService.deleteTContractByIds(ids));
    }
}
ycl-server/src/main/java/com/ycl/platform/mapper/TContractMapper.java
New file
@@ -0,0 +1,62 @@
package com.ycl.platform.mapper;
import com.ycl.platform.domain.entity.TContract;
import java.util.List;
/**
 * 【请填写功能名称】Mapper接口
 *
 * @author ruoyi
 * @date 2024-03-12
 */
public interface TContractMapper
{
    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    public TContract selectTContractById(Long id);
    /**
     * 查询【请填写功能名称】列表
     *
     * @param tContract 【请填写功能名称】
     * @return 【请填写功能名称】集合
     */
    public List<TContract> selectTContractList(TContract tContract);
    /**
     * 新增【请填写功能名称】
     *
     * @param tContract 【请填写功能名称】
     * @return 结果
     */
    public int insertTContract(TContract tContract);
    /**
     * 修改【请填写功能名称】
     *
     * @param tContract 【请填写功能名称】
     * @return 结果
     */
    public int updateTContract(TContract tContract);
    /**
     * 删除【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    public int deleteTContractById(Long id);
    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTContractByIds(Long[] ids);
}
ycl-server/src/main/java/com/ycl/platform/service/ITContractService.java
New file
@@ -0,0 +1,62 @@
package com.ycl.platform.service;
import com.ycl.platform.domain.entity.TContract;
import java.util.List;
/**
 * 【请填写功能名称】Service接口
 *
 * @author ruoyi
 * @date 2024-03-12
 */
public interface ITContractService
{
    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    public TContract selectTContractById(Long id);
    /**
     * 查询【请填写功能名称】列表
     *
     * @param tContract 【请填写功能名称】
     * @return 【请填写功能名称】集合
     */
    public List<TContract> selectTContractList(TContract tContract);
    /**
     * 新增【请填写功能名称】
     *
     * @param tContract 【请填写功能名称】
     * @return 结果
     */
    public int insertTContract(TContract tContract);
    /**
     * 修改【请填写功能名称】
     *
     * @param tContract 【请填写功能名称】
     * @return 结果
     */
    public int updateTContract(TContract tContract);
    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】主键集合
     * @return 结果
     */
    public int deleteTContractByIds(Long[] ids);
    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    public int deleteTContractById(Long id);
}
ycl-server/src/main/java/com/ycl/platform/service/impl/TContractServiceImpl.java
New file
@@ -0,0 +1,94 @@
package com.ycl.platform.service.impl;
import com.ycl.platform.domain.entity.TContract;
import com.ycl.platform.mapper.TContractMapper;
import com.ycl.platform.service.ITContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-12
 */
@Service
public class TContractServiceImpl implements ITContractService
{
    @Autowired
    private TContractMapper tContractMapper;
    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public TContract selectTContractById(Long id)
    {
        return tContractMapper.selectTContractById(id);
    }
    /**
     * 查询【请填写功能名称】列表
     *
     * @param tContract 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<TContract> selectTContractList(TContract tContract)
    {
        return tContractMapper.selectTContractList(tContract);
    }
    /**
     * 新增【请填写功能名称】
     *
     * @param tContract 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertTContract(TContract tContract)
    {
        return tContractMapper.insertTContract(tContract);
    }
    /**
     * 修改【请填写功能名称】
     *
     * @param tContract 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateTContract(TContract tContract)
    {
        return tContractMapper.updateTContract(tContract);
    }
    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteTContractByIds(Long[] ids)
    {
        return tContractMapper.deleteTContractByIds(ids);
    }
    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteTContractById(Long id)
    {
        return tContractMapper.deleteTContractById(id);
    }
}
ycl-server/src/main/resources/mapper/zgyw/TContractMapper.xml
New file
@@ -0,0 +1,86 @@
<?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.ycl.platform.mapper.TContractMapper">
    <resultMap type="com.ycl.platform.domain.entity.TContract" id="TContractResult">
        <result property="id"    column="id"    />
        <result property="companyId"    column="company_id"    />
        <result property="companyName"    column="company_name"    />
        <result property="deptId"    column="dept_id"    />
        <result property="deptName"    column="dept_name"    />
        <result property="detail"    column="detail"    />
        <result property="startTime"    column="start_time"    />
        <result property="endTime"    column="end_time"    />
    </resultMap>
    <sql id="selectTContractVo">
        select id, company_id, company_name, dept_id, dept_name, detail ,start_time,end_time from t_contract
    </sql>
    <select id="selectTContractList" parameterType="com.ycl.platform.domain.entity.TContract" resultMap="TContractResult">
        <include refid="selectTContractVo"/>
        <where>
            <if test="companyId != null "> and company_id = #{companyId}</if>
            <if test="companyName != null  and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
            <if test="deptId != null "> and dept_id = #{deptId}</if>
            <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
            <if test="detail != null  and detail != ''"> and detail = #{detail}</if>
            <if test="startTime != null"> and start_time = #{startTime}</if>
            <if test="endTime != null"> and end_time = #{endTime}</if>
        </where>
    </select>
    <select id="selectTContractById" parameterType="Long" resultMap="TContractResult">
        <include refid="selectTContractVo"/>
        where id = #{id}
    </select>
    <insert id="insertTContract" parameterType="com.ycl.platform.domain.entity.TContract" useGeneratedKeys="true" keyProperty="id">
        insert into t_contract
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="companyId != null">company_id,</if>
            <if test="companyName != null">company_name,</if>
            <if test="deptId != null">dept_id,</if>
            <if test="deptName != null">dept_name,</if>
            <if test="detail != null">detail,</if>
            <if test="startTime != null">start_time,</if>
            <if test="endTime != null">end_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="companyId != null">#{companyId},</if>
            <if test="companyName != null">#{companyName},</if>
            <if test="deptId != null">#{deptId},</if>
            <if test="deptName != null">#{deptName},</if>
            <if test="detail != null">#{detail},</if>
            <if test="startTime != null">#{startTime},</if>
            <if test="endTime != null">#{endTime},</if>
         </trim>
    </insert>
    <update id="updateTContract" parameterType="com.ycl.platform.domain.entity.TContract">
        update t_contract
        <trim prefix="SET" suffixOverrides=",">
            <if test="companyId != null">company_id = #{companyId},</if>
            <if test="companyName != null">company_name = #{companyName},</if>
            <if test="deptId != null">dept_id = #{deptId},</if>
            <if test="deptName != null">dept_name = #{deptName},</if>
            <if test="detail != null">detail = #{detail},</if>
            <if test="startTime != null">start_time = #{startTime},</if>
            <if test="endTime != null">end_time = #{endTime},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteTContractById" parameterType="Long">
        delete from t_contract where id = #{id}
    </delete>
    <delete id="deleteTContractByIds" parameterType="String">
        delete from t_contract where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>