Compare commits
2 Commits
546d364772
...
afc5235992
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afc5235992 | ||
|
|
6d9e087834 |
@ -0,0 +1,31 @@
|
|||||||
|
package com.czlis.common.core.domain.entity.lis;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ComConfigDict {
|
||||||
|
|
||||||
|
private Long configId;
|
||||||
|
private String configType;
|
||||||
|
private String configCode;
|
||||||
|
private String configName;
|
||||||
|
private String configOptiontype;
|
||||||
|
private String configDefvalue;
|
||||||
|
private Long configSort;
|
||||||
|
private String status;
|
||||||
|
private String createBy;
|
||||||
|
private Date createTime;
|
||||||
|
private String updateBy;
|
||||||
|
private Date updateTime;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class XmTextResult {
|
public class XmTextResult {
|
||||||
private Integer xmid;
|
private String yq;
|
||||||
private String xmdh;
|
private String xmdh;
|
||||||
private Integer xh;
|
private Integer xh;
|
||||||
private String textresult;
|
private String textresult;
|
||||||
|
|||||||
@ -180,4 +180,10 @@ public class LisWorkGermController extends BaseController {
|
|||||||
public Result changepatjyrq(Date jyrq, String yq, String ybh) {
|
public Result changepatjyrq(Date jyrq, String yq, String ybh) {
|
||||||
return lisWorkGermService.changepatjyrq(jyrq, yq, ybh);
|
return lisWorkGermService.changepatjyrq(jyrq, yq, ybh);
|
||||||
}
|
}
|
||||||
|
@ApiOperation("获取专家评语字典")
|
||||||
|
@GetMapping("/getgermtextdict")
|
||||||
|
public Result getGermTextDict(){
|
||||||
|
return new Result("0", "成功!",lisWorkGermMapper.getGermTextDict());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,108 @@
|
|||||||
|
package com.czlis.liswork.controller.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.annotation.Log;
|
||||||
|
import com.czlis.common.core.controller.BaseController;
|
||||||
|
import com.czlis.common.core.domain.AjaxResult;
|
||||||
|
import com.czlis.common.core.page.TableDataInfo;
|
||||||
|
import com.czlis.common.enums.BusinessType;
|
||||||
|
import com.czlis.common.utils.poi.ExcelUtil;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComConfigDict;
|
||||||
|
import com.czlis.liswork.service.ComConfigDictService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Api(tags = "参数模板设置")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/configdict")
|
||||||
|
@Slf4j
|
||||||
|
public class ComConfigDictController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private ComConfigDictService ComConfigDictService;
|
||||||
|
/**
|
||||||
|
* 获取字典列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取字典列表")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(ComConfigDict post) {
|
||||||
|
startPage();
|
||||||
|
List<ComConfigDict> list = ComConfigDictService.selectComConfigDictList(post);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
@ApiOperation("字典导出")
|
||||||
|
@Log(title = "字典导出", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, ComConfigDict post) {
|
||||||
|
List<ComConfigDict> list = ComConfigDictService.selectComConfigDictList(post);
|
||||||
|
ExcelUtil<ComConfigDict> util = new ExcelUtil<>(ComConfigDict.class);
|
||||||
|
util.exportExcel(response, list, "字典数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典编号获取详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取详细信息")
|
||||||
|
@GetMapping(value = "/{dictId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long dictId) {
|
||||||
|
return success(ComConfigDictService.selectComConfigDictById(dictId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增字典
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增字典")
|
||||||
|
@Log(title = "字典管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@Validated @RequestBody ComConfigDict post) {
|
||||||
|
log.info("post:{}",post);
|
||||||
|
|
||||||
|
if (!ComConfigDictService.checkDictNameUnique(post)) {
|
||||||
|
return error("新增字典'" + post.getConfigName() + "'失败,字典名称已存在");
|
||||||
|
} else if (!ComConfigDictService.checkDictCodeUnique(post)) {
|
||||||
|
return error("新增字典'" + post.getConfigName() + "'失败,字典编码已存在");
|
||||||
|
}
|
||||||
|
post.setCreateBy(getUsername());
|
||||||
|
return toAjax(ComConfigDictService.insertDict(post));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改字典
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改字典")
|
||||||
|
@Log(title = "字典管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@Validated @RequestBody ComConfigDict post) {
|
||||||
|
if (!ComConfigDictService.checkDictNameUnique(post)) {
|
||||||
|
return error("修改字典'" + post.getConfigName() + "'失败,字典名称已存在");
|
||||||
|
} else if (!ComConfigDictService.checkDictCodeUnique(post)) {
|
||||||
|
return error("修改字典'" + post.getConfigName() + "'失败,字典编码已存在");
|
||||||
|
}
|
||||||
|
post.setUpdateBy(getUsername());
|
||||||
|
return toAjax(ComConfigDictService.updateDict(post));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除字典
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除字典")
|
||||||
|
@Log(title = "字典管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{dictIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] dictIds) {
|
||||||
|
return toAjax(ComConfigDictService.deleteDictByIds(dictIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典选择框列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取字典选择框列表")
|
||||||
|
@GetMapping("/optionselect")
|
||||||
|
public AjaxResult optionselect() {
|
||||||
|
List<ComConfigDict> posts = ComConfigDictService.selectComConfigDictAll();
|
||||||
|
return success(posts);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -30,4 +30,5 @@ public interface LisWorkGermMapper {
|
|||||||
int updatemediumjyrq(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh, @Param("jyrq1")Date jyrq1);
|
int updatemediumjyrq(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh, @Param("jyrq1")Date jyrq1);
|
||||||
int changeresultjyrq(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh, @Param("jyrq1")Date jyrq1);
|
int changeresultjyrq(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh, @Param("jyrq1")Date jyrq1);
|
||||||
int changepatjyrq(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh, @Param("jyrq1")Date jyrq1);
|
int changepatjyrq(@Param("jyrq") Date jyrq, @Param("yq") String yq, @Param("ybh")String ybh, @Param("jyrq1")Date jyrq1);
|
||||||
|
List<XmTextResult> getGermTextDict();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,86 @@
|
|||||||
|
package com.czlis.liswork.mapper.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComConfigDict;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ComConfigDictMapper {
|
||||||
|
Long getCountById(Long configId);
|
||||||
|
List<ComConfigDict> selectComConfigDictByType(String configType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询字典数据集合
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 字典数据集合
|
||||||
|
*/
|
||||||
|
List<ComConfigDict> selectComConfigDictList(ComConfigDict Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有字典
|
||||||
|
*
|
||||||
|
* @return 字典列表
|
||||||
|
*/
|
||||||
|
List<ComConfigDict> selectComConfigDictAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过字典ID查询字典信息
|
||||||
|
*
|
||||||
|
* @param configId 字典ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
ComConfigDict selectComConfigDictById(Long configId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除字典信息
|
||||||
|
*
|
||||||
|
* @param configId 字典ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int delComConfigDictById(Long configId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除字典信息
|
||||||
|
*
|
||||||
|
* @param DictIds 需要删除的字典ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int delComConfigDictByIds(Long[] DictIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改字典信息
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateComConfigDict(ComConfigDict Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增字典信息
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertComConfigDict(ComConfigDict Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验字典名称
|
||||||
|
*
|
||||||
|
* @param configName 字典名称
|
||||||
|
* @param configType 类别
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
ComConfigDict checkDictNameUnique(@Param("configName") String configName,@Param("configType") String configType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验字典编码
|
||||||
|
*
|
||||||
|
* @param configCode 字典编码
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
ComConfigDict checkDictCodeUnique(@Param("configCode") String configCode,@Param("configType") String configType);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package com.czlis.liswork.service;
|
||||||
|
|
||||||
|
import com.czlis.common.constant.UserConstants;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComConfigDict;
|
||||||
|
import com.czlis.common.exception.ServiceException;
|
||||||
|
import com.czlis.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ComConfigDictService {
|
||||||
|
/**
|
||||||
|
* 查询字典信息集合
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 字典信息集合
|
||||||
|
*/
|
||||||
|
List<ComConfigDict> selectComConfigDictList(ComConfigDict Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有字典
|
||||||
|
*
|
||||||
|
* @return 字典列表
|
||||||
|
*/
|
||||||
|
List<ComConfigDict> selectComConfigDictAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过字典ID查询字典信息
|
||||||
|
*
|
||||||
|
* @param DictId 字典ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
ComConfigDict selectComConfigDictById(Long DictId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验字典名称是否唯一
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
boolean checkDictNameUnique(ComConfigDict Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验字典编码是否唯一
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
boolean checkDictCodeUnique(ComConfigDict Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过字典ID查询字典使用数量
|
||||||
|
*
|
||||||
|
* @param DictId 字典ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int countUserDictById(Long DictId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除字典信息
|
||||||
|
*
|
||||||
|
* @param DictId 字典ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteDictById(Long DictId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除字典信息
|
||||||
|
*
|
||||||
|
* @param DictIds 需要删除的字典ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteDictByIds(Long[] DictIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存字典信息
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertDict(ComConfigDict Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存字典信息
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateDict(ComConfigDict Dict);
|
||||||
|
}
|
||||||
@ -0,0 +1,149 @@
|
|||||||
|
package com.czlis.liswork.service.impl.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.constant.UserConstants;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComConfigDict;
|
||||||
|
import com.czlis.common.exception.ServiceException;
|
||||||
|
import com.czlis.common.utils.StringUtils;
|
||||||
|
import com.czlis.liswork.mapper.xtwh.ComConfigDictMapper;
|
||||||
|
import com.czlis.liswork.service.ComConfigDictService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 配置参数字典,系统配置菜单依据本字典自动创建配置档
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class ComConfigDictServiceImpl implements ComConfigDictService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ComConfigDictMapper comConfigDictMapper;
|
||||||
|
/**
|
||||||
|
* 查询字典信息集合
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 字典信息集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ComConfigDict> selectComConfigDictList(ComConfigDict Dict) {
|
||||||
|
return comConfigDictMapper.selectComConfigDictList(Dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有字典
|
||||||
|
*
|
||||||
|
* @return 字典列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ComConfigDict> selectComConfigDictAll() {
|
||||||
|
return comConfigDictMapper.selectComConfigDictAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过字典ID查询字典信息
|
||||||
|
*
|
||||||
|
* @param DictId 字典ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ComConfigDict selectComConfigDictById(Long DictId) {
|
||||||
|
return comConfigDictMapper.selectComConfigDictById(DictId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验字典名称是否唯一
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkDictNameUnique(ComConfigDict Dict) {
|
||||||
|
Long DictId = StringUtils.isNull(Dict.getConfigId()) ? -1L : Dict.getConfigId();
|
||||||
|
ComConfigDict info = comConfigDictMapper.checkDictNameUnique(Dict.getConfigName(),Dict.getConfigType());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != DictId.longValue()) {
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验字典编码是否唯一
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkDictCodeUnique(ComConfigDict Dict) {
|
||||||
|
Long DictId = StringUtils.isNull(Dict.getConfigId()) ? -1L : Dict.getConfigId();
|
||||||
|
ComConfigDict info = comConfigDictMapper.checkDictCodeUnique(Dict.getConfigCode(),Dict.getConfigType());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != DictId.longValue()) {
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过字典ID查询字典使用数量
|
||||||
|
*
|
||||||
|
* @param DictId 字典ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int countUserDictById(Long DictId) {
|
||||||
|
return 0;//comConfigDictMapper.countUserDictById(DictId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除字典信息
|
||||||
|
*
|
||||||
|
* @param DictId 字典ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteDictById(Long DictId) {
|
||||||
|
return comConfigDictMapper.delComConfigDictById(DictId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除字典信息
|
||||||
|
*
|
||||||
|
* @param DictIds 需要删除的字典ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteDictByIds(Long[] DictIds) {
|
||||||
|
for (Long DictId : DictIds) {
|
||||||
|
ComConfigDict Dict = selectComConfigDictById(DictId);
|
||||||
|
if (countUserDictById(DictId) > 0) {
|
||||||
|
throw new ServiceException(String.format("%1$s已分配,不能删除", Dict.getConfigName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return comConfigDictMapper.delComConfigDictByIds(DictIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存字典信息
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertDict(ComConfigDict Dict) {
|
||||||
|
return comConfigDictMapper.insertComConfigDict(Dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存字典信息
|
||||||
|
*
|
||||||
|
* @param Dict 字典信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateDict(ComConfigDict Dict) {
|
||||||
|
return comConfigDictMapper.updateComConfigDict(Dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
137
liswork/src/main/resources/mapper/ComConfigDictMapper.xml
Normal file
137
liswork/src/main/resources/mapper/ComConfigDictMapper.xml
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
<?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.czlis.liswork.mapper.xtwh.ComConfigDictMapper">
|
||||||
|
<resultMap type="com.czlis.common.core.domain.entity.lis.ComConfigDict" id="ComConfigDictResult">
|
||||||
|
<id property="configId" column="config_id" />
|
||||||
|
<result property="configType" column="config_type" />
|
||||||
|
<result property="configCode" column="config_code" />
|
||||||
|
<result property="configName" column="config_name" />
|
||||||
|
<result property="configOptiontype" column="config_optiontype" />
|
||||||
|
<result property="configDefvalue" column="config_defvalue" />
|
||||||
|
<result property="configSort" column="config_sort" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<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" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="selectComConfigDictVo">
|
||||||
|
select config_id,config_type,config_code,config_name,config_optiontype,config_defvalue,config_sort,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark from com_config_dict
|
||||||
|
</sql>
|
||||||
|
<select id="selectComConfigDictList" resultMap="ComConfigDictResult" parameterType="com.czlis.common.core.domain.entity.lis.ComConfigDict" >
|
||||||
|
<include refid="selectComConfigDictVo"></include>
|
||||||
|
<where>
|
||||||
|
<if test="configId != null and configId != 0">
|
||||||
|
and config_id = #{configId}
|
||||||
|
</if>
|
||||||
|
<if test="configType != null and configType != ''">
|
||||||
|
and config_type = #{configType}
|
||||||
|
</if>
|
||||||
|
<if test="configCode != null and configCode != ''">
|
||||||
|
and config_code = #{configCode}
|
||||||
|
</if>
|
||||||
|
<if test="configName != null and configName != ''">
|
||||||
|
and config_name = #{configName}
|
||||||
|
</if>
|
||||||
|
<if test="configOptiontype != null and configOptiontype != ''">
|
||||||
|
and config_optiontype = #{configOptiontype}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
and status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by config_sort ASC
|
||||||
|
</select>
|
||||||
|
<select id="getCountById" resultType="Long">
|
||||||
|
select count(1) from com_config_dict where config_id = #{configId}
|
||||||
|
</select>
|
||||||
|
<select id="selectComConfigDictAll" resultMap="ComConfigDictResult">
|
||||||
|
<include refid="selectComConfigDictVo"/>
|
||||||
|
order by config_sort
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectComConfigDictById" parameterType="Long" resultMap="ComConfigDictResult">
|
||||||
|
<include refid="selectComConfigDictVo"/>
|
||||||
|
where config_id = #{configId}
|
||||||
|
</select>
|
||||||
|
<select id="selectComConfigDictByType" parameterType="String" resultMap="ComConfigDictResult">
|
||||||
|
<include refid="selectComConfigDictVo"/>
|
||||||
|
where config_type = #{configType}
|
||||||
|
order by config_sort
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="checkDictNameUnique" parameterType="String" resultMap="ComConfigDictResult">
|
||||||
|
select top 1 config_id,config_type,config_code,config_name,config_optiontype,config_defvalue,config_sort,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark
|
||||||
|
from com_config_dict
|
||||||
|
where config_name=#{configName} and config_type = #{configType}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkDictCodeUnique" parameterType="String" resultMap="ComConfigDictResult">
|
||||||
|
select top 1 config_id,config_type,config_code,config_name,config_optiontype,config_defvalue,config_sort,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark
|
||||||
|
from com_config_dict
|
||||||
|
where config_code=#{configCode} and config_type = #{configType}
|
||||||
|
</select>
|
||||||
|
<insert id="insertComConfigDict" parameterType="com.czlis.common.core.domain.entity.lis.ComConfigDict" useGeneratedKeys="true" keyProperty="configId">
|
||||||
|
insert into com_config_dict(
|
||||||
|
<if test="configId != null and configId != 0">config_id,</if>
|
||||||
|
<if test="configType != null and configType != ''">config_type,</if>
|
||||||
|
<if test="configCode != null and configCode != ''">config_code,</if>
|
||||||
|
<if test="configName != null and configName != ''">config_name,</if>
|
||||||
|
<if test="configOptiontype != null and configOptiontype != ''">config_optiontype,</if>
|
||||||
|
<if test="configDefvalue != null and configDefvalue != ''">config_defvalue,</if>
|
||||||
|
<if test="configSort != null">config_sort,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="configId != null and configId != 0">#{configId},</if>
|
||||||
|
<if test="configType != null and configType != ''">#{configType},</if>
|
||||||
|
<if test="configCode != null and configCode != ''">#{configCode},</if>
|
||||||
|
<if test="configName != null and configName != ''">#{configName},</if>
|
||||||
|
<if test="configOptiontype != null and configOptiontype != ''">#{configOptiontype},</if>
|
||||||
|
<if test="configDefvalue != null and configDefvalue != ''">#{configDefvalue},</if>
|
||||||
|
<if test="configSort != null">#{configSort},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
getdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="delComConfigDictById" parameterType="Long">
|
||||||
|
delete from com_config_dict where config_id = #{configId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="delComConfigDictByIds" parameterType="Long">
|
||||||
|
delete from com_config_dict where config_id in
|
||||||
|
<foreach collection="array" item="configId" open="(" separator="," close=")">
|
||||||
|
#{configId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="updateComConfigDict" parameterType="com.czlis.common.core.domain.entity.lis.ComConfigDict">
|
||||||
|
update com_config_dict
|
||||||
|
<set>
|
||||||
|
<if test="configType != null and configType != ''">config_type = #{configType},</if>
|
||||||
|
<if test="configCode != null and configCode != ''">config_code = #{configCode},</if>
|
||||||
|
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||||
|
<if test="configOptiontype != null and configOptiontype != ''">config_optiontype = #{configOptiontype},</if>
|
||||||
|
<if test="configDefvalue != null and configDefvalue != ''">config_defvalue = #{configDefvalue},</if>
|
||||||
|
<if test="configSort != null">config_sort = #{configSort},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = getdate()
|
||||||
|
</set>
|
||||||
|
where config_id = #{configId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -158,4 +158,8 @@
|
|||||||
</where>
|
</where>
|
||||||
order by xm_medgroup.xh
|
order by xm_medgroup.xh
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getGermTextDict" resultType="com.czlis.common.core.domain.entity.lis.XmTextResult">
|
||||||
|
select * from xm_textresult where yq = '_text_' AND xmdh = 'text'
|
||||||
|
order by xh
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -377,3 +377,31 @@ CREATE TABLE [dbo].[com_localconfig](
|
|||||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
) ON [PRIMARY]
|
) ON [PRIMARY]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_config_dict')
|
||||||
|
begin
|
||||||
|
CREATE TABLE [dbo].[com_config_dict](
|
||||||
|
[config_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||||
|
[config_type] [varchar](20) NOT NULL,
|
||||||
|
[config_code] [varchar](64) NOT NULL,
|
||||||
|
[config_name] [varchar](250) NOT NULL,
|
||||||
|
[config_optiontype] [char](1) NOT NULL,
|
||||||
|
[config_defvalue] [varchar](250) NOT NULL,
|
||||||
|
[config_sort] [int] NOT NULL,
|
||||||
|
[status] [char](1) NOT NULL,
|
||||||
|
[create_by] [varchar](64) NULL,
|
||||||
|
[create_time] [datetime] NULL,
|
||||||
|
[update_by] [varchar](64) NULL,
|
||||||
|
[update_time] [datetime] NULL,
|
||||||
|
[remark] [varchar](500) NULL,
|
||||||
|
PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[config_id] ASC
|
||||||
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
) ON [PRIMARY]
|
||||||
|
ALTER TABLE [dbo].[com_config_dict] ADD DEFAULT ('') FOR [create_by]
|
||||||
|
ALTER TABLE [dbo].[com_config_dict] ADD DEFAULT ('') FOR [update_by]
|
||||||
|
ALTER TABLE [dbo].[com_config_dict] ADD DEFAULT (NULL) FOR [remark]
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user