Merge remote-tracking branch 'lis8.0/master'
This commit is contained in:
commit
e15d2909af
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -4,16 +4,21 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ComLocalconfig {
|
public class ComLocalconfig {
|
||||||
|
|
||||||
private long sid;
|
private Long sid;
|
||||||
private String smac;
|
private String smac;
|
||||||
private String sip;
|
private String sip;
|
||||||
private String sname;
|
private String sname;
|
||||||
private String configvalue;
|
private String configvalue;
|
||||||
|
private String create_by;
|
||||||
|
private Date create_time;
|
||||||
|
private String update_by;
|
||||||
|
private Date update_time;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -44,10 +44,16 @@ public class LisWorkController extends BaseController {
|
|||||||
return lisWorkService.getInstrdList();
|
return lisWorkService.getInstrdList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("仪器组可操作仪器查询")
|
@ApiOperation(value = "仪器组可操作仪器查询",
|
||||||
|
notes="powerbit为操作场景\n1:报告查询\n"+"2:报告录入\n"+
|
||||||
|
"3:统计\n"+"6:检验项目维护\n"+"7:系统,报告单设定优化\n"+
|
||||||
|
"8:质控录入,查询\n"+"9:系统日志,修改记录查询\n"+"20:抽查报告")
|
||||||
@GetMapping("/getGroupInstrdList")
|
@GetMapping("/getGroupInstrdList")
|
||||||
public Result getGroupInstrdList(String lisgroup) {
|
public Result getGroupInstrdList(
|
||||||
return lisWorkService.getGroupInstrdList(lisgroup);
|
@RequestParam(value = "lisgroup", required = false,defaultValue = "ALL") String lisgroup,
|
||||||
|
@RequestParam(value = "powerbit", required = false,defaultValue = "2") String powerbit
|
||||||
|
) {
|
||||||
|
return lisWorkService.getGroupInstrdList(lisgroup,powerbit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("切换仪器,查询仪器参数")
|
@ApiOperation("切换仪器,查询仪器参数")
|
||||||
|
|||||||
@ -32,6 +32,11 @@ public class LisWorkGermController extends BaseController {
|
|||||||
LisWorkGermMapper lisWorkGermMapper;
|
LisWorkGermMapper lisWorkGermMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
LisWorkGermService lisWorkGermService;
|
LisWorkGermService lisWorkGermService;
|
||||||
|
@ApiOperation("获取微生物样本信息")
|
||||||
|
@GetMapping("/germsampleinfo")
|
||||||
|
public Result germsampleinfo(Date jyrq, String yq, String ybh) {
|
||||||
|
return lisWorkGermService.germsampleinfo(jyrq, yq, ybh);
|
||||||
|
}
|
||||||
@ApiOperation("获取药敏字典")
|
@ApiOperation("获取药敏字典")
|
||||||
@GetMapping("/getmeddict")
|
@GetMapping("/getmeddict")
|
||||||
public Result getmeddict() {
|
public Result getmeddict() {
|
||||||
@ -180,4 +185,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 AjaxResult list(ComConfigDict post) {
|
||||||
|
// startPage();
|
||||||
|
List<ComConfigDict> list = ComConfigDictService.selectComConfigDictList(post);
|
||||||
|
return success(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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
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.domain.entity.lis.ComConfigDict;
|
||||||
|
import com.czlis.common.enums.BusinessType;
|
||||||
|
import com.czlis.common.utils.SecurityUtils;
|
||||||
|
import com.czlis.common.utils.poi.ExcelUtil;
|
||||||
|
import com.czlis.liswork.service.ComConfigDictService;
|
||||||
|
import com.czlis.liswork.service.ComLocalconfigService;
|
||||||
|
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("/localconfig")
|
||||||
|
@Slf4j
|
||||||
|
public class ComLocalconfigController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
ComConfigDictService ComConfigDictService;
|
||||||
|
ComLocalconfigService ComLocalconfigService;
|
||||||
|
/**
|
||||||
|
* 获取字典列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取参数列表")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list() {
|
||||||
|
String localid= SecurityUtils.getLoginUser().getSysLoginParam().getLocalid();
|
||||||
|
ComLocalconfigService.getComLocalconfigList(localid);
|
||||||
|
return success(ComLocalconfigService.getComLocalconfigList(localid));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据字典编号获取详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取详细信息")
|
||||||
|
@GetMapping(value = "/{dictId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long dictId) {
|
||||||
|
return success(ComConfigDictService.selectComConfigDictById(dictId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改字典
|
||||||
|
*/
|
||||||
|
@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("获取字典选择框列表")
|
||||||
|
@GetMapping("/optionselect/{dictId}")
|
||||||
|
public AjaxResult optionselect() {
|
||||||
|
List<ComConfigDict> posts = ComConfigDictService.selectComConfigDictAll();
|
||||||
|
return success(posts);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -30,4 +30,6 @@ 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();
|
||||||
|
LabPat getLabPat(@Param("yq")String yq,@Param("ybh") String ybh);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,19 @@
|
|||||||
|
package com.czlis.liswork.mapper.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComLocalconfig;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface LocalconfigMapper {
|
||||||
|
|
||||||
|
List<ComLocalconfig> selectComLocalconfigList(ComLocalconfig comLocalconfig);
|
||||||
|
Long getCountById(Long sid);
|
||||||
|
Long getCountBymic(String smac);
|
||||||
|
Long getsid(String smac);
|
||||||
|
List<ComLocalconfig> selectComLocalconfigAll();
|
||||||
|
int insertComLocalconfig(ComLocalconfig comLocalconfig);
|
||||||
|
int delComLocalconfigById(Long sid);
|
||||||
|
int delComLocalconfigBymac(String smac);
|
||||||
|
int delComLocalconfigByIds(Long[] sids);
|
||||||
|
int updateComLocalconfig(ComLocalconfig comLocalconfig);
|
||||||
|
}
|
||||||
@ -26,6 +26,7 @@ public class HistoryResult {
|
|||||||
private String cksx;
|
private String cksx;
|
||||||
private String ckxx;
|
private String ckxx;
|
||||||
private String yqmc;
|
private String yqmc;
|
||||||
|
private String yblx;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,19 @@
|
|||||||
|
package com.czlis.liswork.service;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComConfigDict;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComLocalconfig;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ComLocalconfigService {
|
||||||
|
List<ComConfigDict> getComLocalconfigList(String smac);
|
||||||
|
Long getCountById(Long sid);
|
||||||
|
Long getCountBymic(String smac);
|
||||||
|
Long getsid(String smac);
|
||||||
|
List<ComLocalconfig> selectComLocalconfigAll();
|
||||||
|
int insertComLocalconfig(ComLocalconfig comLocalconfig);
|
||||||
|
int delComLocalconfigById(Long sid);
|
||||||
|
int delComLocalconfigBymac(String smac);
|
||||||
|
int delComLocalconfigByIds(Long[] sids);
|
||||||
|
int updateComLocalconfig(ComLocalconfig comLocalconfig);
|
||||||
|
}
|
||||||
@ -29,4 +29,5 @@ public interface LisWorkGermService {
|
|||||||
Result newresult(LabResult labResult);
|
Result newresult(LabResult labResult);
|
||||||
Result saveallresult(List<LabResult> labResult);
|
Result saveallresult(List<LabResult> labResult);
|
||||||
Result check(Date jyrq, String yq, String ybh, String hdys,String type);
|
Result check(Date jyrq, String yq, String ybh, String hdys,String type);
|
||||||
|
Result germsampleinfo(Date jyrq, String yq, String ybh);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface LisWorkService {
|
public interface LisWorkService {
|
||||||
Result getInstrdList();
|
Result getInstrdList();
|
||||||
Result getGroupInstrdList(String groupId);
|
Result getGroupInstrdList(String groupId,String powerbit);
|
||||||
Result getInstrdConfig(String yq);
|
Result getInstrdConfig(String yq);
|
||||||
List<LabPat> getSampleList(Date jyrq, String yq, Long days);
|
List<LabPat> getSampleList(Date jyrq, String yq, Long days);
|
||||||
Result getresultinfo(Date jyrq, String yq, String ybh);
|
Result getresultinfo(Date jyrq, String yq, String ybh);
|
||||||
|
|||||||
@ -39,6 +39,10 @@ public class LisWorkGermServiceImpl implements LisWorkGermService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
LisWorkGermMapper lisWorkGermMapper;
|
LisWorkGermMapper lisWorkGermMapper;
|
||||||
@Override
|
@Override
|
||||||
|
public Result germsampleinfo(Date jyrq, String yq, String ybh){
|
||||||
|
return new Result("0", "成功!", lisWorkGermMapper.getLabPat(yq,ybh));
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public Result getresultinfo(Date jyrq, String yq, String ybh){
|
public Result getresultinfo(Date jyrq, String yq, String ybh){
|
||||||
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
List<LabResult> labResultList = commonUtil.getLabResultList(jyrq, yq, ybh);
|
||||||
return new Result("0", "成功!", labResultList);
|
return new Result("0", "成功!", labResultList);
|
||||||
|
|||||||
@ -126,10 +126,15 @@ public class LisWorkPageInfoServiceImpl implements LisWorkPageInfoService {
|
|||||||
if(map == null || map.size() <= 0){
|
if(map == null || map.size() <= 0){
|
||||||
return new Result("-1","查询条件转换错误!");
|
return new Result("-1","查询条件转换错误!");
|
||||||
}
|
}
|
||||||
Result historyResult = getHistoryResult(jyrq, yq, ybh, map);
|
if("细菌仪".equals( commonUtil.getYqdl(yq))){
|
||||||
if ("0".equals(historyResult.getCode())) {
|
return getHistoryResultGerm(jyrq, yq, ybh, map);
|
||||||
return new Result("0", "获取成功!", historyResult.getData());
|
}else{
|
||||||
}
|
Result historyResult = getHistoryResult(jyrq, yq, ybh, map);
|
||||||
|
if ("0".equals(historyResult.getCode())) {
|
||||||
|
return new Result("0", "获取成功!", historyResult.getData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new Result("-1", "无历史数据!");
|
return new Result("-1", "无历史数据!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,8 +183,12 @@ public class LisWorkPageInfoServiceImpl implements LisWorkPageInfoService {
|
|||||||
return new Result("-1", "缺少查询条件!");
|
return new Result("-1", "缺少查询条件!");
|
||||||
}
|
}
|
||||||
Map<String, Object> map = BeanUtil.beanToMap(lastLabPatParam);
|
Map<String, Object> map = BeanUtil.beanToMap(lastLabPatParam);
|
||||||
Result historyResult = getHistoryResult(jyrq, yq, ybh, map);
|
if("细菌仪".equals( commonUtil.getYqdl(yq))){
|
||||||
return new Result("0", "获取成功!", historyResult.getData());
|
return getHistoryResultGerm(jyrq, yq, ybh, map);
|
||||||
|
}else {
|
||||||
|
Result historyResult = getHistoryResult(jyrq, yq, ybh, map);
|
||||||
|
return new Result("0", "获取成功!", historyResult.getData());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -201,7 +210,6 @@ public class LisWorkPageInfoServiceImpl implements LisWorkPageInfoService {
|
|||||||
return new Result("0", "获取数据成功!", labInputmdlList);
|
return new Result("0", "获取数据成功!", labInputmdlList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Result getHistoryResult(Date jyrq, String yq, String ybh, Map<String, Object> map) {
|
public Result getHistoryResult(Date jyrq, String yq, String ybh, Map<String, Object> map) {
|
||||||
List<HistoryResult> hisResultList0 = lisWorkPageInfoMapper.getHisResult(map);
|
List<HistoryResult> hisResultList0 = lisWorkPageInfoMapper.getHisResult(map);
|
||||||
if (hisResultList0.isEmpty()) {
|
if (hisResultList0.isEmpty()) {
|
||||||
@ -286,6 +294,21 @@ public class LisWorkPageInfoServiceImpl implements LisWorkPageInfoService {
|
|||||||
}
|
}
|
||||||
return new Result("0", "获取成功!", historyResultDTO);
|
return new Result("0", "获取成功!", historyResultDTO);
|
||||||
}
|
}
|
||||||
|
public Result getHistoryResultGerm(Date jyrq, String yq, String ybh, Map<String, Object> map) {
|
||||||
|
List<HistoryResult> hisResultList0 = lisWorkPageInfoMapper.getHisResult(map);
|
||||||
|
if (hisResultList0.isEmpty()) {
|
||||||
|
return new Result("-1", "无历史数据!");
|
||||||
|
}
|
||||||
|
List<HistoryResult> hisResultList1 = hisResultList0.stream().filter(st -> !"细菌仪".equals(st.getYbh())).collect(Collectors.toList());
|
||||||
|
if (hisResultList1.isEmpty()) {
|
||||||
|
return new Result("-1", "无历史数据!", hisResultList1);
|
||||||
|
}
|
||||||
|
List<HistoryResult> hisResultList = hisResultList1.stream().filter(st -> !(jyrq.equals(st.getJyrq()) && yq.trim().equals(st.getYq().trim()) && ybh.equals(st.getYbh()))).collect(Collectors.toList());
|
||||||
|
if (hisResultList.isEmpty()) {
|
||||||
|
return new Result("-1", "无历史数据!", hisResultList);
|
||||||
|
}
|
||||||
|
return new Result("0", "获取成功!", hisResultList);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result getclinicref(String yq, String xmdh) {
|
public Result getclinicref(String yq, String xmdh) {
|
||||||
|
|||||||
@ -86,7 +86,7 @@ public class LisWorkServiceImpl implements LisWorkService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result getGroupInstrdList(String groupId) {
|
public Result getGroupInstrdList(String groupId,String powerbit) {
|
||||||
if ("ALL".equals(groupId)) groupId = "";
|
if ("ALL".equals(groupId)) groupId = "";
|
||||||
String yhdh = SecurityUtils.getLoginUser().getUsername();
|
String yhdh = SecurityUtils.getLoginUser().getUsername();
|
||||||
SysLoginParam loginConfigParam = loginConfigParamUtil.getLoginConfigParam();
|
SysLoginParam loginConfigParam = loginConfigParamUtil.getLoginConfigParam();
|
||||||
@ -96,7 +96,7 @@ public class LisWorkServiceImpl implements LisWorkService {
|
|||||||
if ("admin".equals(yhdh) || "lis".equals(yhdh)) {
|
if ("admin".equals(yhdh) || "lis".equals(yhdh)) {
|
||||||
labInstr = commonUtil.querybylisgroup(groupId, yljg, "0");
|
labInstr = commonUtil.querybylisgroup(groupId, yljg, "0");
|
||||||
} else {
|
} else {
|
||||||
labInstr = commonUtil.getInstrdList(groupId, yljg, "0", yhdh, "2");
|
labInstr = commonUtil.getInstrdList(groupId, yljg, "0", yhdh, powerbit);
|
||||||
}
|
}
|
||||||
return new Result("0", "获取分组仪器列表成功!", labInstr);
|
return new Result("0", "获取分组仪器列表成功!", labInstr);
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package com.czlis.liswork.service.impl.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComConfigDict;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComLocalconfig;
|
||||||
|
import com.czlis.liswork.mapper.xtwh.LocalconfigMapper;
|
||||||
|
import com.czlis.liswork.service.ComConfigDictService;
|
||||||
|
import com.czlis.liswork.service.ComLocalconfigService;
|
||||||
|
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 ComLocalconfigServiceImpl implements ComLocalconfigService {
|
||||||
|
@Autowired
|
||||||
|
ComConfigDictService ComConfigDictService;
|
||||||
|
@Autowired
|
||||||
|
LocalconfigMapper localconfigMapper;
|
||||||
|
@Override
|
||||||
|
public List<ComConfigDict> getComLocalconfigList(String smac){
|
||||||
|
ComConfigDict post=new ComConfigDict();
|
||||||
|
post.setConfigType("LOCAL");
|
||||||
|
post.setStatus("0");
|
||||||
|
List<ComConfigDict> list = ComConfigDictService.selectComConfigDictList(post);
|
||||||
|
if(list.isEmpty())return null;
|
||||||
|
ComLocalconfig comLocalconfig=new ComLocalconfig();
|
||||||
|
comLocalconfig.setSmac(smac);
|
||||||
|
List<ComLocalconfig> comLocalconfiglist=localconfigMapper.selectComLocalconfigList(comLocalconfig);
|
||||||
|
if(comLocalconfiglist.size()>0){
|
||||||
|
comLocalconfig= comLocalconfiglist.get(0);
|
||||||
|
String configvalue=comLocalconfig.getConfigvalue();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Long getCountById(Long sid){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Long getCountBymic(String smac){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Long getsid(String smac){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public List<ComLocalconfig> selectComLocalconfigAll(){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int insertComLocalconfig(ComLocalconfig comLocalconfig){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int delComLocalconfigById(Long sid){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int delComLocalconfigBymac(String smac){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int delComLocalconfigByIds(Long[] sids){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int updateComLocalconfig(ComLocalconfig comLocalconfig){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
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>
|
||||||
84
liswork/src/main/resources/mapper/ComLocalconfigMapper.xml
Normal file
84
liswork/src/main/resources/mapper/ComLocalconfigMapper.xml
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?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.LocalconfigMapper">
|
||||||
|
<select id="selectComLocalconfigList" parameterType="com.czlis.common.core.domain.entity.lis.ComLocalconfig" >
|
||||||
|
select * from com_localconfig
|
||||||
|
<where>
|
||||||
|
<if test="sid != null and sid != 0">
|
||||||
|
and sid = #{sid}
|
||||||
|
</if>
|
||||||
|
<if test="smac != null and smac != ''">
|
||||||
|
and smac = #{smac}
|
||||||
|
</if>
|
||||||
|
<if test="sip != null and sip != ''">
|
||||||
|
and sip = #{sip}
|
||||||
|
</if>
|
||||||
|
<if test="sname != null and sname != ''">
|
||||||
|
and sname = #{sname}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by sid ASC
|
||||||
|
</select>
|
||||||
|
<select id="getCountById" resultType="Long">
|
||||||
|
select count(1) from com_localconfig where sid = #{sid}
|
||||||
|
</select>
|
||||||
|
<select id="getCountBymic" resultType="Long">
|
||||||
|
select count(1) from com_localconfig where smac = #{smac}
|
||||||
|
</select>
|
||||||
|
<select id="getsid" resultType="Long">
|
||||||
|
select sid from com_localconfig where smac = #{smac}
|
||||||
|
</select>
|
||||||
|
<select id="selectComLocalconfigAll" resultType="ComLocalconfig">
|
||||||
|
select * from com_localconfig
|
||||||
|
order by sid
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertComLocalconfig" parameterType="com.czlis.common.core.domain.entity.lis.ComLocalconfig" useGeneratedKeys="true" keyProperty="sid">
|
||||||
|
insert into com_localconfig(
|
||||||
|
<if test="sid != null and sid != 0">sid,</if>
|
||||||
|
<if test="smac != null and smac != ''">smac,</if>
|
||||||
|
<if test="sip != null and sip != ''">sip,</if>
|
||||||
|
<if test="sname != null and sname != ''">sname,</if>
|
||||||
|
<if test="configvalue != null and configvalue != ''">configvalue,</if>
|
||||||
|
<if test="create_by != null and create_by != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="sid != null and sid != 0">#{sid},</if>
|
||||||
|
<if test="smac != null and smac != ''">#{smac},</if>
|
||||||
|
<if test="sip != null and sip != ''">#{sip},</if>
|
||||||
|
<if test="sname != null and sname != ''">#{sname},</if>
|
||||||
|
<if test="configvalue != null and configvalue != ''">#{configvalue},</if>
|
||||||
|
<if test="create_by != null and create_by != ''">#{create_by},</if>
|
||||||
|
getdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="delComLocalconfigById" parameterType="Long">
|
||||||
|
delete from com_localconfig where sid = #{sid}
|
||||||
|
</delete>
|
||||||
|
<delete id="delComLocalconfigBymac" parameterType="String">
|
||||||
|
delete from com_localconfig where smac = #{smac}
|
||||||
|
</delete>
|
||||||
|
<delete id="delComLocalconfigByIds" parameterType="Long">
|
||||||
|
delete from com_localconfig where sid in
|
||||||
|
<foreach collection="array" item="sid" open="(" separator="," close=")">
|
||||||
|
#{sid}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="updateComLocalconfig" parameterType="com.czlis.common.core.domain.entity.lis.ComLocalconfig">
|
||||||
|
update com_localconfig
|
||||||
|
<set>
|
||||||
|
<if test="smac != null and smac != ''">config_type = #{smac},</if>
|
||||||
|
<if test="sip != null and sip != ''">sip = #{sip},</if>
|
||||||
|
<if test="sname != null and sname != ''">sname = #{sname},</if>
|
||||||
|
<if test="configvalue != null and configvalue != ''">configvalue = #{configvalue},</if>
|
||||||
|
<if test="update_by != null and update_by != ''">update_by = #{update_by},</if>
|
||||||
|
update_time = getdate()
|
||||||
|
</set>
|
||||||
|
where sid = #{sid}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -158,4 +158,11 @@
|
|||||||
</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>
|
||||||
|
<select id="getLabPat" resultType="com.czlis.common.core.domain.entity.lis.LabPat">
|
||||||
|
select top 1 * from lab_pat where yq = #{yq} and ybh = #{ybh}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -153,7 +153,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getHisResult" resultType="com.czlis.liswork.pojo.HistoryResult">
|
<select id="getHisResult" resultType="com.czlis.liswork.pojo.HistoryResult">
|
||||||
select b.jyrq,c.xmdh, c.xmmc,b.csjg,b.ybh,b.yq,d.yqdl,d.yqmc,a.brdh,
|
select b.jyrq,c.xmdh, c.xmmc,b.csjg,b.ybh,b.yq,d.yqdl,d.yqmc,a.brdh,a.yblx,
|
||||||
(case a.brxb when '1' then '男' when '2' then '女' end) as brxb ,
|
(case a.brxb when '1' then '男' when '2' then '女' end) as brxb ,
|
||||||
c.cksx,c.ckxx,
|
c.cksx,c.ckxx,
|
||||||
convert(varchar(100),a.nl)+(case a.nldw when '1' then '岁' when '2' then '月' when '3' then '天' end) as nl,
|
convert(varchar(100),a.nl)+(case a.nldw when '1' then '岁' when '2' then '月' when '3' then '天' end) as nl,
|
||||||
|
|||||||
@ -369,11 +369,43 @@ CREATE TABLE [dbo].[com_localconfig](
|
|||||||
[sid] [int] IDENTITY(1,1) NOT NULL,
|
[sid] [int] IDENTITY(1,1) NOT NULL,
|
||||||
[smac] [varchar](50) NULL,
|
[smac] [varchar](50) NULL,
|
||||||
[sip] [varchar](50) NULL,
|
[sip] [varchar](50) NULL,
|
||||||
[sname] [varchar](50) NULL,
|
[sname] [varchar](250) NULL,
|
||||||
[configvalue] [varchar](8000) NULL,
|
[configvalue] [varchar](8000) NULL,
|
||||||
|
[create_by] [varchar](64) NULL,
|
||||||
|
[create_time] [datetime] NULL,
|
||||||
|
[update_by] [varchar](64) NULL,
|
||||||
|
[update_time] [datetime] NULL,
|
||||||
CONSTRAINT [PK_com_localconfig] PRIMARY KEY CLUSTERED
|
CONSTRAINT [PK_com_localconfig] PRIMARY KEY CLUSTERED
|
||||||
(
|
(
|
||||||
[sid] ASC
|
[sid] ASC
|
||||||
)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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user