Compare commits

..

No commits in common. "edd34c62a75bb82acaf7bb8d87354f487f80d5b4" and "d935e9c6baeabd741bb6a2cabf39eba43d0db120" have entirely different histories.

9 changed files with 62 additions and 28 deletions

View File

@ -2,5 +2,4 @@ package com.czlis.interfaceCommon.mapper;
public interface ComLocalconfigMapper { public interface ComLocalconfigMapper {
String getLocalconfig(String smac); String getLocalconfig(String smac);
String getLocalconfigByIP(String ip);
} }

View File

@ -666,9 +666,7 @@ public class CommonUtil {
public String getLocalconfig(String smac) { public String getLocalconfig(String smac) {
return comLocalconfigMapper.getLocalconfig(smac); return comLocalconfigMapper.getLocalconfig(smac);
} }
public String getLocalconfigByIP(String ip) {
return comLocalconfigMapper.getLocalconfigByIP(ip);
}
public SysUser getSysUserOne(String user_name){ public SysUser getSysUserOne(String user_name){
return sysUserCommMapper.getSysUserOne(user_name); return sysUserCommMapper.getSysUserOne(user_name);
} }

View File

@ -5,7 +5,4 @@
<select id="getLocalconfig" resultType="String"> <select id="getLocalconfig" resultType="String">
select configvalue from com_localconfig where smac = #{smac} select configvalue from com_localconfig where smac = #{smac}
</select> </select>
<select id="getLocalconfigByIP" resultType="String">
select configvalue from com_localconfig where sip = #{ip}
</select>
</mapper> </mapper>

View File

@ -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.LoginBody;
import com.czlis.common.core.domain.model.LoginUser; import com.czlis.common.core.domain.model.LoginUser;
import com.czlis.common.utils.SecurityUtils; import com.czlis.common.utils.SecurityUtils;
import com.czlis.common.utils.ip.IpUtils; import com.czlis.interfaceCommon.mapper.ComDictMapper;
import com.czlis.system.service.ISysMenuService; import com.czlis.system.service.ISysMenuService;
import com.czlis.system.web.service.SysLoginService; import com.czlis.system.web.service.SysLoginService;
import com.czlis.system.web.service.SysPermissionService; import com.czlis.system.web.service.SysPermissionService;
@ -20,7 +20,9 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
@ -98,8 +100,8 @@ public class SysLoginController {
/** /**
* 单点登录 * 单点登录
* @param loginBody 入参集合 * @param loginBody
* @return 返回令牌和用户信息 * @return
*/ */
@PostMapping("/loginAnonymous") @PostMapping("/loginAnonymous")
public AjaxResult loginAnonymous(@RequestBody LoginBody loginBody) { public AjaxResult loginAnonymous(@RequestBody LoginBody loginBody) {
@ -113,13 +115,13 @@ public class SysLoginController {
/** /**
* 获取客户端本地配置 * 获取客户端本地配置
* @param localid 浏览器指纹 * @param localid
* @return 返回初始化信息 * @return
*/ */
@GetMapping("/getLocalconfig") @GetMapping("/getLocalconfig")
public AjaxResult getLocalconfig(String localid) { public AjaxResult getLocalconfig(String localid) {
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("localconfig", loginService.getLocalconfig(localid,IpUtils.getIpAddr())); ajax.put("localconfig", loginService.getLocalconfig(localid));
ajax.put("oem", loginService.getOEM()); ajax.put("oem", loginService.getOEM());
ajax.put("hosplist", loginService.gethospList()); ajax.put("hosplist", loginService.gethospList());
return ajax; return ajax;

View File

@ -66,11 +66,8 @@ public class SysLoginService {
@Autowired @Autowired
private SysUserMapper userMapper; private SysUserMapper userMapper;
public Map<String, Object> getLocalconfig(String smac,String ip){ public Map<String, Object> getLocalconfig(String smac){
String configvalue=commonUtil.getLocalconfig(smac); 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<>(); Map<String, Object> map = new HashMap<>();
if(configvalue!=null) { if(configvalue!=null) {
map = JSON.parseObject(configvalue, Map.class); map = JSON.parseObject(configvalue, Map.class);

View File

@ -35,8 +35,8 @@ public class ComOptController extends BaseController {
@ApiOperation("查询参数列表") @ApiOperation("查询参数列表")
@GetMapping("/query") @GetMapping("/query")
public Result getComOptList(String yq,String optiontype) { public Result getComOptList(String yq) {
return comOptService.getComOptList(yq,optiontype); return comOptService.getComOptList(yq);
} }
@ApiOperation("整体保存本地参数") @ApiOperation("整体保存本地参数")
@Log(title = "整体保存本地参数", businessType = BusinessType.UPDATE) @Log(title = "整体保存本地参数", businessType = BusinessType.UPDATE)
@ -52,8 +52,8 @@ public class ComOptController extends BaseController {
} }
@ApiOperation("查询参数默认值") @ApiOperation("查询参数默认值")
@GetMapping("/getdef") @GetMapping("/getdef")
public Result getdef(String optiontype){ public Result getdef(){
return comOptService.getdef(optiontype); return comOptService.getdef();
} }
} }

View File

@ -8,8 +8,8 @@ import com.czlis.common.core.domain.entity.lis.ComOptTemplate;
import java.util.List; import java.util.List;
public interface ComOptService { public interface ComOptService {
Result getComOptList(String yq,String optiontype); Result getComOptList(String yq);
Result saveopt(List<ComConfigDict> posts); Result saveopt(List<ComConfigDict> posts);
Result queryTree(); Result queryTree();
Result getdef(String optiontype); Result getdef();
} }

View File

@ -27,16 +27,16 @@ public class ComOptServiceImpl implements ComOptService {
@Autowired @Autowired
private CommonUtil commonUtil; private CommonUtil commonUtil;
@Override @Override
public Result getdef(String optiontype){ public Result getdef(){
List<ComConfigDict> list=getconfigdef(optiontype); List<ComConfigDict> list=getconfigdef(ConfigTypeConstants.SYSTEM);
return new Result("0","成功",list); return new Result("0","成功",list);
} }
@Override @Override
public Result getComOptList(String yq,String optiontype) { public Result getComOptList(String yq) {
ComOpt comOpt=new ComOpt(); ComOpt comOpt=new ComOpt();
comOpt.setYq(yq); comOpt.setYq(yq);
List<ComOpt> comOptList = comOptMapper.getComOptList(comOpt); List<ComOpt> comOptList = comOptMapper.getComOptList(comOpt);
List<ComConfigDict> list=getconfigdef(optiontype); List<ComConfigDict> list=getconfigdef(ConfigTypeConstants.SYSTEM);
if(list.isEmpty()||list==null)return new Result("","",list); if(list.isEmpty()||list==null)return new Result("","",list);
for(ComConfigDict comConfigDict:list){ for(ComConfigDict comConfigDict:list){
comConfigDict.setYq(yq); comConfigDict.setYq(yq);

View File

@ -55,12 +55,53 @@ begin
alter table sys_user add snid1 varchar(50) alter table sys_user add snid1 varchar(50)
end 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') if not exists(select 1 from com_opt where yq = '' and xxdh = 'A5MERGEA4')
begin begin
insert into com_opt(yq,xxdh,xxlb,xxqz,bz) values('','A5MERGEA4','SYS','0','A5报告单是否合并成A4打印') insert into com_opt(yq,xxdh,xxlb,xxqz,bz,lx) values('','A5MERGEA4','SYS','0','A5报告单是否合并成A4打印','1')
end end
--报告单仪器对应表 --报告单仪器对应表