add 年度数据锁定表
This commit is contained in:
+15
-1
@@ -190,7 +190,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
||||
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1811666066341814274', '1469221945005338626', '导入到标协会员', NULL, NULL, NULL, NULL, 2, 'council:exportToMember', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-07-12 15:37:04', NULL, NULL, 0, 0, '1', 0, 1);
|
||||
|
||||
-- 20240715 会议汇总-会议酒店推荐按钮
|
||||
INSERT INTO `income_payments_prod`.`sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1812785413516914690', '1626061755230580738', '会议酒店推荐', NULL, NULL, NULL, NULL, 2, 'allmeeting:recommendHotel', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-07-15 17:44:57', NULL, NULL, 0, 0, '1', 0, 1);
|
||||
INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `external_terminal_show`) VALUES ('1812785413516914690', '1626061755230580738', '会议酒店推荐', NULL, NULL, NULL, NULL, 2, 'allmeeting:recommendHotel', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'LKGLZ', '2024-07-15 17:44:57', NULL, NULL, 0, 0, '1', 0, 1);
|
||||
|
||||
-- 20240716 处理工作组成员历史数据中的是否确认凭证字段
|
||||
UPDATE pay_working_group_subitem SET confirm_voucher = 0 WHERE confirm_voucher IS NULL;
|
||||
@@ -198,3 +198,17 @@ UPDATE pay_working_group_subitem SET confirm_voucher = 0 WHERE confirm_voucher I
|
||||
-- 20240716 处理工作组成员历史数据中的是否审核字段
|
||||
UPDATE pay_working_group_subitem SET check_payment_status = 0;
|
||||
UPDATE pay_working_group_subitem SET check_payment_status = 1 WHERE payment_status = 'completed' OR payment_status = 'rejected';
|
||||
|
||||
-- auto-generated definition
|
||||
create table pay_annual_data_locking
|
||||
(
|
||||
id varchar(32) not null comment '主键'
|
||||
primary key,
|
||||
year varchar(32) null comment '年份',
|
||||
create_by varchar(32) null comment '创建人',
|
||||
create_time datetime null comment '创建时间',
|
||||
update_by varchar(32) null comment '更新人',
|
||||
update_time datetime null comment '更新时间'
|
||||
)
|
||||
comment '年度数据锁定表';
|
||||
|
||||
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
package com.jero.project.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.api.vo.IdsMapBody;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.project.entity.AnnualDataLocking;
|
||||
import com.jero.project.service.AnnualDataLockingService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 年度数据锁定表(pay_annual_data_locking)表控制层
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "年度数据锁定表")
|
||||
@RestController
|
||||
@RequestMapping("annualDataLocking")
|
||||
public class AnnualDataLockingController extends JeroController<AnnualDataLocking, AnnualDataLockingService> {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private AnnualDataLockingService annualDataLockingService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@ApiOperation(value = "年度数据锁定表-分页列表查询", notes = "年度数据锁定表-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<AnnualDataLocking>> queryPageList(AnnualDataLocking annualDataLocking,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<AnnualDataLocking> queryWrapper = QueryGenerator.initQueryWrapper(annualDataLocking, req.getParameterMap());
|
||||
Page<AnnualDataLocking> page = new Page<>(pageNo, pageSize);
|
||||
IPage<AnnualDataLocking> pageList = annualDataLockingService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "年度数据锁定表-列表查询", notes = "年度数据锁定表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<AnnualDataLocking>> queryList(AnnualDataLocking annualDataLocking,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<AnnualDataLocking> queryWrapper = QueryGenerator.initQueryWrapper(annualDataLocking, req.getParameterMap());
|
||||
List<AnnualDataLocking> list = annualDataLockingService.list(queryWrapper);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@AutoLog(value = "年度数据锁定表-添加")
|
||||
@ApiOperation(value = "年度数据锁定表-添加", notes = "年度数据锁定表-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@Validated @RequestBody AnnualDataLocking annualDataLocking) {
|
||||
annualDataLockingService.add(annualDataLocking);
|
||||
return Result.OK(Result.ADD_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "年度数据锁定表-编辑")
|
||||
@ApiOperation(value = "年度数据锁定表-编辑", notes = "年度数据锁定表-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<String> edit(@Validated @RequestBody AnnualDataLocking annualDataLocking) {
|
||||
annualDataLockingService.editById(annualDataLocking);
|
||||
return Result.OK(Result.EDIT_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@AutoLog(value = "年度数据锁定表-通过id删除")
|
||||
@ApiOperation(value = "年度数据锁定表-通过id删除", notes = "年度数据锁定表-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<Object> delete(@RequestBody IdsMapBody map) {
|
||||
String id = map.getId();
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error(Result.NULL_ID);
|
||||
}
|
||||
annualDataLockingService.deleteById(id);
|
||||
return Result.OK(Result.DELETE_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@AutoLog(value = "年度数据锁定表-批量删除")
|
||||
@ApiOperation(value = "年度数据锁定表-批量删除", notes = "年度数据锁定表-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<Object> deleteBatch(@RequestBody IdsMapBody map) {
|
||||
String ids = map.getIds();
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error(Result.NULL_ID);
|
||||
}
|
||||
List<String> idList = Arrays.asList(map.getIds().split(","));
|
||||
this.annualDataLockingService.deleteByIds(idList);
|
||||
return Result.OK(Result.DELETE_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
@AutoLog(value = "年度数据锁定表-通过id查询")
|
||||
@ApiOperation(value = "年度数据锁定表-通过id查询", notes = "年度数据锁定表-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<AnnualDataLocking> queryById(@RequestParam(name = "id") String id) {
|
||||
AnnualDataLocking annualDataLocking = annualDataLockingService.queryById(id);
|
||||
if (annualDataLocking == null) {
|
||||
throw new JeroBootException(Result.NULL_DATA);
|
||||
}
|
||||
return Result.OK(annualDataLocking);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@ApiOperation(value = "年度数据锁定表-导出excel")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, AnnualDataLocking annualDataLocking) {
|
||||
return super.exportXls(request, annualDataLocking, AnnualDataLocking.class, "年度数据锁定表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*/
|
||||
@ApiOperation(value = "年度数据锁定表-通过excel导入数据")
|
||||
@PostMapping(value = "/importExcel")
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, AnnualDataLocking.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.jero.project.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*年度数据锁定表
|
||||
*@author liJiaRao
|
||||
*@date 2024-07-24 13:51
|
||||
*/
|
||||
@ApiModel(description="年度数据锁定表")
|
||||
@Data
|
||||
@TableName(value = "pay_annual_data_locking")
|
||||
public class AnnualDataLocking {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value="主键")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 年份
|
||||
*/
|
||||
@TableField(value = "`year`")
|
||||
@ApiModelProperty(value="年份")
|
||||
private String year;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "create_by")
|
||||
@ApiModelProperty(value="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "update_by")
|
||||
@ApiModelProperty(value="更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.jero.project.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.project.entity.AnnualDataLocking;
|
||||
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-07-24 13:51
|
||||
*/
|
||||
public interface AnnualDataLockingMapper extends BaseMapper<AnnualDataLocking> {
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<?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.jero.project.mapper.AnnualDataLockingMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.project.entity.AnnualDataLocking">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table pay_annual_data_locking-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="year" jdbcType="VARCHAR" property="year" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, `year`, create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.jero.project.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.project.mapper.AnnualDataLockingMapper;
|
||||
import com.jero.project.entity.AnnualDataLocking;
|
||||
/**
|
||||
*
|
||||
*@author liJiaRao
|
||||
*@date 2024-07-24 13:51
|
||||
*/
|
||||
@Service
|
||||
public class AnnualDataLockingService extends ServiceImpl<AnnualDataLockingMapper, AnnualDataLocking> {
|
||||
public void add(AnnualDataLocking annualDataLocking) {
|
||||
this.save(annualDataLocking);
|
||||
}
|
||||
|
||||
public void editById(AnnualDataLocking annualDataLocking) {
|
||||
this.updateById(annualDataLocking);
|
||||
}
|
||||
|
||||
public void deleteById(String id) {
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
public void deleteByIds(List<String> idList) {
|
||||
for (String id : idList) {
|
||||
deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
public AnnualDataLocking queryById(String id) {
|
||||
AnnualDataLocking annualDataLocking = this.getById(id);
|
||||
return annualDataLocking;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user