add 新增更新记录
This commit is contained in:
@@ -116,4 +116,9 @@ public class LoginUser {
|
||||
/**设备id uniapp推送用*/
|
||||
private String clientId;
|
||||
|
||||
/**
|
||||
* 姓名+工号,唯一键,例:小明(10001)
|
||||
*/
|
||||
private String nameWorkNo;
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,15 @@ public class FieldCommon {
|
||||
// "str_to_date('" + sdf.format(new Date()) + "','%Y-%m-%d %H:%i:%s')"
|
||||
public static final String STR_TO_DATE_PREFIX = "str_to_date('"; // 格式化时间格式的前缀
|
||||
public static final String STR_TO_DATE_SUFFIX = "','%Y-%m-%d %H:%i:%s')"; // 格式化时间格式的后缀
|
||||
|
||||
public static final String COLLECTION_FLAG = "collectionFlag"; // 收藏标识
|
||||
// 收藏标识
|
||||
public static final String COLLECTION_FLAG = "collectionFlag";
|
||||
// 主键
|
||||
public static final String ID = "id";
|
||||
// 标准编号
|
||||
public static final String STANDARD_NUMBER = "standard_number";
|
||||
// 标准名称
|
||||
public static final String STANDARD_NAME = "standard_name";
|
||||
// 中文双引号
|
||||
public static final String QUOTE = "“";
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,9 @@ public class ResultCommon {
|
||||
public static final String OK = "message.ok"; // 操作成功
|
||||
|
||||
public static final String ERROR = "message.error"; // 操作失败
|
||||
public static final String EMPTY_SOURCE = "message.empty.source"; // 操作失败
|
||||
public static final String EMPTY_SOURCE = "message.empty.source"; // 来源不能为空
|
||||
public static final String EMPTY_STANDARD_NUMBER = "message.empty.standard.number"; // 标准编号不能为空
|
||||
public static final String EMPTY_STANDARD_NAME = "message.empty.standard.name"; // 标准名称不能为空
|
||||
|
||||
public static final String RMR_SET_QUALITY_OVER_TEN = "es.rmr.setQuality.overTen"; // 请最多选择10条
|
||||
|
||||
|
||||
+72
-11
@@ -15,6 +15,7 @@ import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||
import com.jero.modules.laws.common.vo.ManyStandardSelectionBox;
|
||||
import com.jero.modules.laws.common.vo.ManyStandardSelectionBoxVO;
|
||||
import com.jero.modules.laws.standard.entity.LawsNodeRelation;
|
||||
import com.jero.modules.laws.standard.service.ILawsUpdateRecordService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.personal.entity.LawsStandardCollection;
|
||||
@@ -60,6 +61,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
private IOSSFileService ossFileService;
|
||||
@Autowired
|
||||
private ILawsStandardCollectionService lawsStandardCollectionService;
|
||||
@Autowired
|
||||
private ILawsUpdateRecordService lawsUpdateRecordService;
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
@@ -210,6 +213,16 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
**/
|
||||
@Override
|
||||
public String commonAdd(Map<String, Object> parameterMap) {
|
||||
// 法规编号不能为空
|
||||
String standardNumber = (String) parameterMap.get(FieldCommon.STANDARD_NUMBER);
|
||||
if (StringUtils.isBlank(standardNumber)) {
|
||||
throw new JeroBootException(ResultCommon.EMPTY_STANDARD_NUMBER, "");
|
||||
}
|
||||
// 标准名称不能为空
|
||||
String standardName = (String) parameterMap.get(FieldCommon.STANDARD_NAME);
|
||||
if (StringUtils.isBlank(standardName)) {
|
||||
throw new JeroBootException(ResultCommon.EMPTY_STANDARD_NAME, "");
|
||||
}
|
||||
// 获取操作模块
|
||||
String module = parameterMap.get(FieldCommon.MODULE).toString();
|
||||
// 获取要操作的表名
|
||||
@@ -238,11 +251,16 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
}
|
||||
}
|
||||
// 操作数据库进行新增数据
|
||||
int rowsInserted = lawsCommonMapper.commonAdd(tableName, fieldsBuilder.toString(), valuesBuilder.toString());
|
||||
if (rowsInserted > 0) {
|
||||
return MessageUtils.getMessage(ResultCommon.OK);
|
||||
}
|
||||
return MessageUtils.getMessage(ResultCommon.ERROR);
|
||||
lawsCommonMapper.commonAdd(tableName, fieldsBuilder.toString(), valuesBuilder.toString());
|
||||
// 增加入库记录
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
|
||||
String now = dateFormat.format(new Date());
|
||||
String content = loginUser.getNameWorkNo() + " " + now + " 入库" +
|
||||
standardNumber + "《" + standardName + "》";
|
||||
lawsUpdateRecordService.addRecord(standardNumber, content);
|
||||
|
||||
return MessageUtils.getMessage(ResultCommon.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,12 +270,32 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
**/
|
||||
@Override
|
||||
public String commonEdit(Map<String, Object> parameterMap) {
|
||||
// 法规编号不能为空
|
||||
String standardNumber = (String) parameterMap.get(FieldCommon.STANDARD_NUMBER);
|
||||
if (StringUtils.isBlank(standardNumber)) {
|
||||
throw new JeroBootException(ResultCommon.EMPTY_STANDARD_NUMBER, "");
|
||||
}
|
||||
// 标准名称不能为空
|
||||
String standardName = (String) parameterMap.get(FieldCommon.STANDARD_NAME);
|
||||
if (StringUtils.isBlank(standardName)) {
|
||||
throw new JeroBootException(ResultCommon.EMPTY_STANDARD_NAME, "");
|
||||
}
|
||||
// 获取操作模块
|
||||
String module = parameterMap.get(FieldCommon.MODULE).toString();
|
||||
parameterMap.remove(FieldCommon.MODULE);
|
||||
// 获取id
|
||||
String id = parameterMap.get("id").toString();
|
||||
parameterMap.remove("id");
|
||||
String id = parameterMap.get(FieldCommon.ID).toString();
|
||||
parameterMap.remove(FieldCommon.ID);
|
||||
// 获取数据库里没修改的数据
|
||||
Map<String, Object> oldDataMap = getByIdAndModule(id, module);
|
||||
// 组装更新内容
|
||||
StringBuilder recordBuffer = new StringBuilder();
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
|
||||
String now = dateFormat.format(new Date());
|
||||
recordBuffer.append(loginUser.getNameWorkNo() + " " + now + " 修改" +
|
||||
standardNumber + "《" + standardName + "》,");
|
||||
String oldStr = recordBuffer.toString();
|
||||
// 获取要操作的表名
|
||||
String tableName = TableNameEnum.getTableName(module);
|
||||
// 获取全部字段
|
||||
@@ -279,17 +317,40 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
if (!Objects.isNull(entryMap.getValue())) {
|
||||
value = entryMap.getValue().toString();
|
||||
}
|
||||
// 添加更新记录
|
||||
addUpdateRecord(fieldList, oldDataMap, recordBuffer, key, value);
|
||||
// 如果value不为null和"",则拼接sql语句
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
jointUpdateFieldAndValue(fieldList, updateBuilder, key, value);
|
||||
}
|
||||
}
|
||||
// 操作数据库进行更新数据
|
||||
int rowsUpdated = lawsCommonMapper.commonEdit(tableName, updateBuilder.toString(), id);
|
||||
if (rowsUpdated > 0) {
|
||||
return MessageUtils.getMessage(ResultCommon.OK);
|
||||
lawsCommonMapper.commonEdit(tableName, updateBuilder.toString(), id);
|
||||
// 如果修改了内容
|
||||
String content = recordBuffer.toString();
|
||||
if (!oldStr.equals(content)) {
|
||||
lawsUpdateRecordService.addRecord(standardNumber, content);
|
||||
}
|
||||
return MessageUtils.getMessage(ResultCommon.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author: liao
|
||||
* @Date: 2023/9/12 15:40
|
||||
* @Description: 添加更新记录
|
||||
**/
|
||||
private void addUpdateRecord(List<LawsTag> fieldList, Map<String, Object> oldDataMap,
|
||||
StringBuilder recordBuffer, String key, String value) {
|
||||
String oldValue = "";
|
||||
if (!Objects.isNull(oldDataMap.get(key))) oldValue = oldDataMap.get(key).toString();
|
||||
// 如果新旧值不一样
|
||||
if (!oldValue.equals(value)) {
|
||||
String name = fieldList.stream().filter(lawsTag -> key.equals(lawsTag.getDbFieldName()))
|
||||
.map(LawsTag::getDbFieldTxt).collect(Collectors.toList()).get(0);
|
||||
recordBuffer.append(FieldCommon.QUOTE + name + FieldCommon.QUOTE + "由");
|
||||
recordBuffer.append(FieldCommon.QUOTE + oldValue + FieldCommon.QUOTE + "改为");
|
||||
recordBuffer.append(FieldCommon.QUOTE + value + FieldCommon.QUOTE + ";");
|
||||
}
|
||||
return MessageUtils.getMessage(ResultCommon.ERROR);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
-176
@@ -1,176 +0,0 @@
|
||||
package com.jero.modules.laws.standard.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.laws.standard.entity.LawsUpdateRecord;
|
||||
import com.jero.modules.laws.standard.service.ILawsUpdateRecordService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 更新记录
|
||||
* @Author: jero-boot
|
||||
* @Date: 2023-09-11
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="更新记录")
|
||||
@RestController
|
||||
@RequestMapping("/laws/standard/lawsUpdateRecord")
|
||||
@Slf4j
|
||||
public class LawsUpdateRecordController extends JeroController<LawsUpdateRecord, ILawsUpdateRecordService> {
|
||||
@Autowired
|
||||
private ILawsUpdateRecordService lawsUpdateRecordService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "更新记录-分页列表查询")
|
||||
@ApiOperation(value="更新记录-分页列表查询", notes="更新记录-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<LawsUpdateRecord>> queryPageList(LawsUpdateRecord lawsUpdateRecord,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<LawsUpdateRecord> pageList = lawsUpdateRecordService.queryPage(lawsUpdateRecord, pageNo, pageSize, req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "更新记录-列表查询")
|
||||
@ApiOperation(value="更新记录-列表查询", notes="更新记录-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LawsUpdateRecord>> queryList(LawsUpdateRecord lawsUpdateRecord, HttpServletRequest req) {
|
||||
List<LawsUpdateRecord> list = lawsUpdateRecordService.queryList(lawsUpdateRecord, req);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "更新记录-添加")
|
||||
@ApiOperation(value="更新记录-添加", notes="更新记录-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<T> add(@Validated @RequestBody LawsUpdateRecord lawsUpdateRecord) {
|
||||
lawsUpdateRecordService.add(lawsUpdateRecord);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "更新记录-编辑")
|
||||
@ApiOperation(value="更新记录-编辑", notes="更新记录-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<T> edit(@Validated @RequestBody LawsUpdateRecord lawsUpdateRecord) {
|
||||
lawsUpdateRecordService.editById(lawsUpdateRecord);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "更新记录-通过id删除")
|
||||
@ApiOperation(value="更新记录-通过id删除", notes="更新记录-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
lawsUpdateRecordService.deleteById(map.get("id"));
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "更新记录-批量删除")
|
||||
@ApiOperation(value="更新记录-批量删除", notes="更新记录-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Result.error("请选择数据!");
|
||||
}
|
||||
this.lawsUpdateRecordService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "更新记录-通过id查询")
|
||||
@ApiOperation(value="更新记录-通过id查询", notes="更新记录-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<LawsUpdateRecord> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LawsUpdateRecord lawsUpdateRecord = lawsUpdateRecordService.queryById(id);
|
||||
if(lawsUpdateRecord==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(lawsUpdateRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param lawsUpdateRecord
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LawsUpdateRecord lawsUpdateRecord) {
|
||||
return super.exportXls(request, lawsUpdateRecord, LawsUpdateRecord.class, "更新记录");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<LawsUpdateRecord> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LawsUpdateRecord.class);
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -63,14 +63,14 @@ public class LawsUpdateRecord implements Serializable {
|
||||
private java.lang.Integer delFlag;
|
||||
/**唯一关联标识(id或者编号)*/
|
||||
@Excel(name = "唯一关联标识(id或者编号)", width = 15)
|
||||
@ApiModelProperty(value = "唯一关联标识(id或者编号)")
|
||||
@ApiModelProperty(value = "唯一关联标识(法规编号)")
|
||||
private java.lang.String uniqueRelationFlag;
|
||||
/**排序*/
|
||||
@Excel(name = "排序", width = 15)
|
||||
@ApiModelProperty(value = "排序")
|
||||
private java.lang.Integer sort;
|
||||
/**文件说明*/
|
||||
@Excel(name = "文件说明", width = 15)
|
||||
@ApiModelProperty(value = "文件说明")
|
||||
@Excel(name = "内容", width = 15)
|
||||
@ApiModelProperty(value = "内容")
|
||||
private java.lang.String content;
|
||||
}
|
||||
|
||||
+5
-60
@@ -2,9 +2,6 @@ package com.jero.modules.laws.standard.service;
|
||||
|
||||
import com.jero.modules.laws.standard.entity.LawsUpdateRecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 更新记录
|
||||
@@ -14,63 +11,11 @@ import java.util.List;
|
||||
*/
|
||||
public interface ILawsUpdateRecordService extends IService<LawsUpdateRecord> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
IPage<LawsUpdateRecord> queryPage(LawsUpdateRecord lawsUpdateRecord, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<LawsUpdateRecord> queryList(LawsUpdateRecord lawsUpdateRecord, HttpServletRequest req);
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @return
|
||||
*/
|
||||
void add(LawsUpdateRecord lawsUpdateRecord);
|
||||
* @Author: liao
|
||||
* @Date: 2023/9/12 16:56
|
||||
* @Description: 添加
|
||||
**/
|
||||
void addRecord(String standardNumber, String content);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @return
|
||||
*/
|
||||
void editById(LawsUpdateRecord lawsUpdateRecord);
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
LawsUpdateRecord queryById(String id);
|
||||
}
|
||||
|
||||
+8
-92
@@ -1,19 +1,12 @@
|
||||
package com.jero.modules.laws.standard.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.modules.laws.standard.entity.LawsUpdateRecord;
|
||||
import com.jero.modules.laws.standard.mapper.LawsUpdateRecordMapper;
|
||||
import com.jero.modules.laws.standard.service.ILawsUpdateRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
|
||||
/**
|
||||
@@ -26,93 +19,16 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@Transactional(rollbackFor = JeroBootException.class)
|
||||
public class LawsUpdateRecordServiceImpl extends ServiceImpl<LawsUpdateRecordMapper, LawsUpdateRecord> implements ILawsUpdateRecordService {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
* @Author: liao
|
||||
* @Date: 2023/9/12 16:58
|
||||
* @Description: 添加
|
||||
**/
|
||||
@Override
|
||||
public IPage<LawsUpdateRecord> queryPage(LawsUpdateRecord lawsUpdateRecord, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<LawsUpdateRecord> queryWrapper = QueryGenerator.initQueryWrapper(lawsUpdateRecord, req.getParameterMap());
|
||||
Page<LawsUpdateRecord> page = new Page<>(pageNo, pageSize);
|
||||
return page(page, queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LawsUpdateRecord> queryList(LawsUpdateRecord lawsUpdateRecord, HttpServletRequest req) {
|
||||
return list(QueryGenerator.initQueryWrapper(lawsUpdateRecord, req.getParameterMap()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void add(LawsUpdateRecord lawsUpdateRecord) {
|
||||
Date now = new Date();
|
||||
lawsUpdateRecord.setCreateTime(now);
|
||||
lawsUpdateRecord.setUpdateTime(now);
|
||||
public void addRecord(String standardNumber, String content) {
|
||||
LawsUpdateRecord lawsUpdateRecord = new LawsUpdateRecord();
|
||||
lawsUpdateRecord.setUniqueRelationFlag(standardNumber);
|
||||
lawsUpdateRecord.setContent(content);
|
||||
save(lawsUpdateRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param lawsUpdateRecord
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void editById(LawsUpdateRecord lawsUpdateRecord) {
|
||||
Date now = new Date();
|
||||
lawsUpdateRecord.setUpdateTime(now);
|
||||
saveOrUpdate(lawsUpdateRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LawsUpdateRecord queryById(String id) {
|
||||
return getById(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,6 @@ tag.edit.\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5=\u5C5E\u6027\u5DF2\u5
|
||||
message.ok=\u64CD\u4F5C\u6210\u529F
|
||||
message.error=\u64CD\u4F5C\u5931\u8D25
|
||||
message.empty.source=The source cannot be empty
|
||||
message.empty.standard.number=The standard number cannot be empty
|
||||
message.empty.standard.name=The standard name cannot be empty
|
||||
es.rmr.setQuality.overTen=\u8BF7\u6700\u591A\u9009\u62E910\u6761
|
||||
@@ -8,4 +8,6 @@ tag.edit.\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5=Attribute already exi
|
||||
message.ok=Successful operation
|
||||
message.error=Operation failure
|
||||
message.empty.source=The source cannot be empty
|
||||
message.empty.standard.number=The standard number cannot be empty
|
||||
message.empty.standard.name=The standard name cannot be empty
|
||||
es.rmr.setQuality.overTen=Please select up to 10
|
||||
@@ -8,4 +8,6 @@ tag.edit.\u5C5E\u6027\u5DF2\u5B58\u5728,\u8BF7\u68C0\u67E5=\u5C5E\u6027\u5DF2\u5
|
||||
es.rmr.setQuality.overTen=\u8BF7\u6700\u591A\u9009\u62E910\u6761
|
||||
message.ok=\u64cd\u4f5c\u6210\u529f
|
||||
message.error=\u64cd\u4f5c\u5931\u8d25
|
||||
message.empty.source=来源不能为空
|
||||
message.empty.source=来源不能为空
|
||||
message.empty.standard.number=标准编号不能为空
|
||||
message.empty.standard.name=标准名称不能为空
|
||||
Reference in New Issue
Block a user