Compare commits
2 Commits
d935e9c6ba
...
edd34c62a7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edd34c62a7 | ||
|
|
f9393c970c |
@ -2,4 +2,5 @@ package com.czlis.interfaceCommon.mapper;
|
||||
|
||||
public interface ComLocalconfigMapper {
|
||||
String getLocalconfig(String smac);
|
||||
String getLocalconfigByIP(String ip);
|
||||
}
|
||||
|
||||
@ -666,7 +666,9 @@ public class CommonUtil {
|
||||
public String getLocalconfig(String smac) {
|
||||
return comLocalconfigMapper.getLocalconfig(smac);
|
||||
}
|
||||
|
||||
public String getLocalconfigByIP(String ip) {
|
||||
return comLocalconfigMapper.getLocalconfigByIP(ip);
|
||||
}
|
||||
public SysUser getSysUserOne(String user_name){
|
||||
return sysUserCommMapper.getSysUserOne(user_name);
|
||||
}
|
||||
|
||||
@ -5,4 +5,7 @@
|
||||
<select id="getLocalconfig" resultType="String">
|
||||
select configvalue from com_localconfig where smac = #{smac}
|
||||
</select>
|
||||
<select id="getLocalconfigByIP" resultType="String">
|
||||
select configvalue from com_localconfig where sip = #{ip}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -7,7 +7,7 @@ import com.czlis.common.core.domain.entity.SysUser;
|
||||
import com.czlis.common.core.domain.model.LoginBody;
|
||||
import com.czlis.common.core.domain.model.LoginUser;
|
||||
import com.czlis.common.utils.SecurityUtils;
|
||||
import com.czlis.interfaceCommon.mapper.ComDictMapper;
|
||||
import com.czlis.common.utils.ip.IpUtils;
|
||||
import com.czlis.system.service.ISysMenuService;
|
||||
import com.czlis.system.web.service.SysLoginService;
|
||||
import com.czlis.system.web.service.SysPermissionService;
|
||||
@ -20,9 +20,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@ -100,8 +98,8 @@ public class SysLoginController {
|
||||
|
||||
/**
|
||||
* 单点登录
|
||||
* @param loginBody
|
||||
* @return
|
||||
* @param loginBody 入参集合
|
||||
* @return 返回令牌和用户信息
|
||||
*/
|
||||
@PostMapping("/loginAnonymous")
|
||||
public AjaxResult loginAnonymous(@RequestBody LoginBody loginBody) {
|
||||
@ -115,13 +113,13 @@ public class SysLoginController {
|
||||
|
||||
/**
|
||||
* 获取客户端本地配置
|
||||
* @param localid
|
||||
* @return
|
||||
* @param localid 浏览器指纹
|
||||
* @return 返回初始化信息
|
||||
*/
|
||||
@GetMapping("/getLocalconfig")
|
||||
public AjaxResult getLocalconfig(String localid) {
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("localconfig", loginService.getLocalconfig(localid));
|
||||
ajax.put("localconfig", loginService.getLocalconfig(localid,IpUtils.getIpAddr()));
|
||||
ajax.put("oem", loginService.getOEM());
|
||||
ajax.put("hosplist", loginService.gethospList());
|
||||
return ajax;
|
||||
|
||||
@ -66,8 +66,11 @@ public class SysLoginService {
|
||||
@Autowired
|
||||
private SysUserMapper userMapper;
|
||||
|
||||
public Map<String, Object> getLocalconfig(String smac){
|
||||
public Map<String, Object> getLocalconfig(String smac,String ip){
|
||||
String configvalue=commonUtil.getLocalconfig(smac);
|
||||
if(configvalue==null&&!"127.0.0.1".equals(ip)&&ip!=null) {
|
||||
configvalue=commonUtil.getLocalconfigByIP(ip);
|
||||
}
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if(configvalue!=null) {
|
||||
map = JSON.parseObject(configvalue, Map.class);
|
||||
|
||||
@ -35,8 +35,8 @@ public class ComOptController extends BaseController {
|
||||
|
||||
@ApiOperation("查询参数列表")
|
||||
@GetMapping("/query")
|
||||
public Result getComOptList(String yq) {
|
||||
return comOptService.getComOptList(yq);
|
||||
public Result getComOptList(String yq,String optiontype) {
|
||||
return comOptService.getComOptList(yq,optiontype);
|
||||
}
|
||||
@ApiOperation("整体保存本地参数")
|
||||
@Log(title = "整体保存本地参数", businessType = BusinessType.UPDATE)
|
||||
@ -52,8 +52,8 @@ public class ComOptController extends BaseController {
|
||||
}
|
||||
@ApiOperation("查询参数默认值")
|
||||
@GetMapping("/getdef")
|
||||
public Result getdef(){
|
||||
return comOptService.getdef();
|
||||
public Result getdef(String optiontype){
|
||||
return comOptService.getdef(optiontype);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -8,8 +8,8 @@ import com.czlis.common.core.domain.entity.lis.ComOptTemplate;
|
||||
import java.util.List;
|
||||
|
||||
public interface ComOptService {
|
||||
Result getComOptList(String yq);
|
||||
Result getComOptList(String yq,String optiontype);
|
||||
Result saveopt(List<ComConfigDict> posts);
|
||||
Result queryTree();
|
||||
Result getdef();
|
||||
Result getdef(String optiontype);
|
||||
}
|
||||
|
||||
@ -27,16 +27,16 @@ public class ComOptServiceImpl implements ComOptService {
|
||||
@Autowired
|
||||
private CommonUtil commonUtil;
|
||||
@Override
|
||||
public Result getdef(){
|
||||
List<ComConfigDict> list=getconfigdef(ConfigTypeConstants.SYSTEM);
|
||||
public Result getdef(String optiontype){
|
||||
List<ComConfigDict> list=getconfigdef(optiontype);
|
||||
return new Result("0","成功",list);
|
||||
}
|
||||
@Override
|
||||
public Result getComOptList(String yq) {
|
||||
public Result getComOptList(String yq,String optiontype) {
|
||||
ComOpt comOpt=new ComOpt();
|
||||
comOpt.setYq(yq);
|
||||
List<ComOpt> comOptList = comOptMapper.getComOptList(comOpt);
|
||||
List<ComConfigDict> list=getconfigdef(ConfigTypeConstants.SYSTEM);
|
||||
List<ComConfigDict> list=getconfigdef(optiontype);
|
||||
if(list.isEmpty()||list==null)return new Result("","",list);
|
||||
for(ComConfigDict comConfigDict:list){
|
||||
comConfigDict.setYq(yq);
|
||||
|
||||
@ -55,53 +55,12 @@ begin
|
||||
alter table sys_user add snid1 varchar(50)
|
||||
end
|
||||
|
||||
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_opt_template')
|
||||
begin
|
||||
create table com_opt_template
|
||||
(
|
||||
id bigint identity(1,1),
|
||||
opttype varchar(10) not null, -- 1.单选框,2.文本框,3.下拉框
|
||||
comtype varchar(100) not null, --1._BAR_ ,_BLDCK,_BLDIN,
|
||||
optcode varchar(100) not null, --参数名称
|
||||
optdefault varchar(100), --默认值
|
||||
optSort int, --排序
|
||||
scope varchar(1000), --阈值
|
||||
bz varchar(500)
|
||||
);
|
||||
ALTER TABLE com_opt_template
|
||||
ADD CONSTRAINT PK_com_opt_template PRIMARY KEY CLUSTERED (comtype,optcode);
|
||||
|
||||
end
|
||||
|
||||
|
||||
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_opt' AND COLUMN_NAME = 'opttype')
|
||||
begin
|
||||
alter table com_opt add opttype varchar(10)
|
||||
end
|
||||
|
||||
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_opt' AND COLUMN_NAME = 'scope')
|
||||
begin
|
||||
alter table com_opt add scope varchar(100)
|
||||
end
|
||||
|
||||
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_opt' AND COLUMN_NAME = 'optSort')
|
||||
begin
|
||||
alter table com_opt add optSort int
|
||||
end
|
||||
|
||||
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_opt' AND COLUMN_NAME = 'status')
|
||||
begin
|
||||
alter table com_opt add status varchar(10)
|
||||
end
|
||||
|
||||
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_opt' AND COLUMN_NAME = 'lx')
|
||||
begin
|
||||
alter table com_opt add lx varchar(10)
|
||||
end
|
||||
|
||||
if not exists(select 1 from com_opt where yq = '' and xxdh = 'A5MERGEA4')
|
||||
begin
|
||||
insert into com_opt(yq,xxdh,xxlb,xxqz,bz,lx) values('','A5MERGEA4','SYS','0','A5报告单是否合并成A4打印','1')
|
||||
insert into com_opt(yq,xxdh,xxlb,xxqz,bz) values('','A5MERGEA4','SYS','0','A5报告单是否合并成A4打印')
|
||||
end
|
||||
|
||||
--报告单仪器对应表
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user