Compare commits
2 Commits
0b746d9209
...
bfa637c393
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfa637c393 | ||
|
|
1822c6b9e5 |
@ -0,0 +1,19 @@
|
||||
package com.czlis.common.core.domain.entity.lis;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LabInputmdl {
|
||||
private String yq;
|
||||
private String mbmc;
|
||||
private Integer srbh;
|
||||
private String zdsr;
|
||||
private Integer qsybh;
|
||||
private Integer jsybh;
|
||||
private String yblx;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.czlis.common.core.domain.entity.lis;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LabInputmdlDetail {
|
||||
private String yq;
|
||||
private String mbmc;
|
||||
private Integer xh;
|
||||
private String xmdh;
|
||||
private String mrz;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.czlis.common.core.domain.entity.lis;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class LabTatctrl {
|
||||
private Integer ruleid;
|
||||
private String ruletype;
|
||||
private String refcode;
|
||||
private String jzbz;
|
||||
private String yblx;
|
||||
private Integer min1;
|
||||
private Integer min2;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.czlis.common.core.domain.entity.lis;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class XmHisreq {
|
||||
private String sqxmdh;
|
||||
private String sqxmmc;
|
||||
private String xmlb;
|
||||
private BigDecimal dj;
|
||||
private String zjf;
|
||||
private Integer bgts;
|
||||
private String capstd;
|
||||
private String yblx;
|
||||
private BigDecimal cysl;
|
||||
private String djlb;
|
||||
private String jyyq;
|
||||
private String rqyq;
|
||||
private String zysx;
|
||||
private String bz;
|
||||
private String refclinic;
|
||||
private Date lastrefresh;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.czlis.common.core.domain.entity.lis.view;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class VwReqitemclass {
|
||||
private String classno;
|
||||
private String classname;
|
||||
private String classna;
|
||||
private Integer bkcolor;
|
||||
private String yblx;
|
||||
}
|
||||
@ -108,7 +108,7 @@ public class SecurityConfig {
|
||||
.authorizeHttpRequests((requests) -> {
|
||||
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
|
||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||
requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
|
||||
requests.antMatchers("/login", "/register", "/captchaImage","/loginAnonymous").permitAll()
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/*.pdf","/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
|
||||
@ -13,7 +13,9 @@ import com.czlis.common.utils.MessageUtils;
|
||||
import com.czlis.common.utils.StringUtils;
|
||||
import com.czlis.common.utils.ip.IpUtils;
|
||||
import com.czlis.common.asyncmanager.AsyncManager;
|
||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||
import com.czlis.system.manager.factory.AsyncFactory;
|
||||
import com.czlis.system.mapper.SysUserMapper;
|
||||
import com.czlis.system.security.context.AuthenticationContextHolder;
|
||||
import com.czlis.system.service.ISysConfigService;
|
||||
import com.czlis.system.service.ISysUserService;
|
||||
@ -25,6 +27,7 @@ import org.springframework.security.core.Authentication;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 登录校验方法
|
||||
@ -47,6 +50,10 @@ public class SysLoginService {
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
@Autowired
|
||||
private CommonUtil commonUtil;
|
||||
@Autowired
|
||||
private SysUserMapper userMapper;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
@ -167,32 +174,24 @@ public class SysLoginService {
|
||||
* @return 结果
|
||||
*/
|
||||
public String loginAnonymous(String username, String password, String code, String uuid) {
|
||||
// 验证码校验
|
||||
validateCaptcha(username, code, uuid);
|
||||
// 登录前置校验
|
||||
//loginPreCheck(username, password);
|
||||
// 用户验证
|
||||
Authentication authentication = null;
|
||||
try {
|
||||
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
|
||||
AuthenticationContextHolder.setContext(authenticationToken);
|
||||
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
|
||||
authentication = authenticationManager.authenticate(authenticationToken);
|
||||
} catch (Exception e) {
|
||||
if (e instanceof BadCredentialsException) {
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match")));
|
||||
throw new UserPasswordNotMatchException();
|
||||
} else {
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage()));
|
||||
throw new ServiceException(e.getMessage());
|
||||
LoginUser loginUser = new LoginUser();
|
||||
int random = new Random().nextInt(1000);
|
||||
loginUser.setUserId((long) (random+8000)); //先用随机数代替
|
||||
SysUser sysUser = userMapper.selectUserByUserName(username);
|
||||
if (sysUser == null) {
|
||||
sysUser = new SysUser();
|
||||
sysUser.setUserId(Long.parseLong(username));
|
||||
sysUser.setUserName(username);
|
||||
String loginUserName = commonUtil.getComDictNameById("SRD", username);
|
||||
sysUser.setNickName(loginUserName);
|
||||
}
|
||||
} finally {
|
||||
AuthenticationContextHolder.clearContext();
|
||||
}
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
|
||||
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
||||
loginUser.setUser(sysUser);
|
||||
recordLoginInfo(loginUser.getUserId());
|
||||
|
||||
// 生成token
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
|
||||
return tokenService.createToken(loginUser);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
package com.czlis.liswork.controller.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.liswork.service.LabInputmdlService;
|
||||
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.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
@Api(tags = "项目模板")
|
||||
@RestController
|
||||
@RequestMapping("/labTatctrl")
|
||||
@Slf4j
|
||||
public class LabInputmdlController {
|
||||
|
||||
@Autowired
|
||||
private LabInputmdlService labInputmdlService;
|
||||
|
||||
@ApiOperation("查询模板列表")
|
||||
@GetMapping("/query")
|
||||
public Result query(LabInputmdl labInputmdl) {
|
||||
return labInputmdlService.query(labInputmdl);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.czlis.liswork.controller.xtwh;
|
||||
|
||||
import com.czlis.common.annotation.Log;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInstrvsreqclass;
|
||||
import com.czlis.common.enums.BusinessType;
|
||||
import com.czlis.liswork.service.LabInstrvsreqclassService;
|
||||
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.web.bind.annotation.*;
|
||||
|
||||
@Api(tags = "仪器条码类别对照")
|
||||
@RestController
|
||||
@RequestMapping("/instrvsreqclass")
|
||||
@Slf4j
|
||||
public class LabInstrvsreqclassController {
|
||||
|
||||
@Autowired
|
||||
LabInstrvsreqclassService labInstrvsreqclassService;
|
||||
|
||||
@ApiOperation("查询仪器条码类别对照")
|
||||
@GetMapping("/query")
|
||||
public Result queryData(LabInstrvsreqclass labInstrvsreqclass){
|
||||
return labInstrvsreqclassService.queryData(labInstrvsreqclass);
|
||||
}
|
||||
|
||||
@ApiOperation("查询仪器类别代码")
|
||||
@GetMapping("/queryReqClass")
|
||||
public Result queryReqClass(String yq){
|
||||
return labInstrvsreqclassService.queryReqClass(yq);
|
||||
}
|
||||
|
||||
@Log(title = "仪器条码类别对照",businessType = BusinessType.INSERT)
|
||||
@ApiOperation("新增仪器条码类别对照")
|
||||
@PostMapping("/add")
|
||||
public Result add(@RequestBody LabInstrvsreqclass labInstrvsreqclass){
|
||||
//有个seq前端要生成
|
||||
return labInstrvsreqclassService.add(labInstrvsreqclass);
|
||||
}
|
||||
|
||||
@Log(title = "仪器条码类别对照",businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("修改仪器条码类别对照")
|
||||
@PostMapping("/update")
|
||||
public Result update(@RequestBody LabInstrvsreqclass labInstrvsreqclass){
|
||||
return labInstrvsreqclassService.update(labInstrvsreqclass);
|
||||
}
|
||||
|
||||
@Log(title = "仪器条码类别对照",businessType = BusinessType.DELETE)
|
||||
@ApiOperation("删除仪器条码类别对照")
|
||||
@GetMapping("/delete")
|
||||
public Result delete(LabInstrvsreqclass labInstrvsreqclass){
|
||||
return labInstrvsreqclassService.delete(labInstrvsreqclass);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.czlis.liswork.controller.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabTatctrl;
|
||||
import com.czlis.common.core.domain.entity.lis.XmHisreq;
|
||||
import com.czlis.common.core.domain.entity.lis.view.VwReqitemclass;
|
||||
import com.czlis.liswork.service.LabTatctrlService;
|
||||
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.web.bind.annotation.*;
|
||||
|
||||
@Api(tags = "标本TAT设定")
|
||||
@RestController
|
||||
@RequestMapping("/labTatctrl")
|
||||
@Slf4j
|
||||
public class LabTatctrlController {
|
||||
|
||||
@Autowired
|
||||
private LabTatctrlService labTatctrlService;
|
||||
|
||||
|
||||
@ApiOperation("查询列表")
|
||||
@GetMapping("/queryDict")
|
||||
public Result queryDict(LabTatctrl labTatctrl){
|
||||
return labTatctrlService.queryDict(labTatctrl);
|
||||
}
|
||||
|
||||
@ApiOperation("查询条码类别")
|
||||
@GetMapping("/queryReqitemclass")
|
||||
public Result queryReqitemclass(VwReqitemclass vwReqitemclass){
|
||||
return labTatctrlService.queryReqitemclass(vwReqitemclass);
|
||||
}
|
||||
|
||||
@ApiOperation("查询诊疗项目")
|
||||
@GetMapping("/queryXmHisreq")
|
||||
public Result queryXmHisreq(XmHisreq xmHisreq){
|
||||
return labTatctrlService.queryXmHisreq(xmHisreq);
|
||||
}
|
||||
|
||||
@ApiOperation("新增TAT设定")
|
||||
@PostMapping("/add")
|
||||
public Result add(@RequestBody LabTatctrl labTatctrl){
|
||||
return labTatctrlService.add(labTatctrl);
|
||||
}
|
||||
|
||||
@ApiOperation("修改TAT设定")
|
||||
@PostMapping("/update")
|
||||
public Result update(@RequestBody LabTatctrl labTatctrl){
|
||||
return labTatctrlService.update(labTatctrl);
|
||||
}
|
||||
|
||||
@ApiOperation("删除TAT设定")
|
||||
@GetMapping("/del")
|
||||
public Result delete(LabTatctrl labTatctrl){
|
||||
return labTatctrlService.delete(labTatctrl);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,9 +1,18 @@
|
||||
package com.czlis.liswork.mapper.dict;
|
||||
|
||||
import com.czlis.common.core.domain.entity.lis.LabInstrvsreqclass;
|
||||
import com.czlis.common.core.domain.entity.lis.view.VwReqitemclass;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LabInstrvsreqclassMapper {
|
||||
List<LabInstrvsreqclass> getLabInstrvsreqclassList(LabInstrvsreqclass labInstrvsreqclass);
|
||||
|
||||
void add(LabInstrvsreqclass labInstrvsreqclass);
|
||||
|
||||
void update(LabInstrvsreqclass labInstrvsreqclass);
|
||||
|
||||
void delete(LabInstrvsreqclass labInstrvsreqclass);
|
||||
|
||||
List<VwReqitemclass> queryReqClass(String yq);
|
||||
}
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.czlis.liswork.mapper.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.entity.lis.LabTatctrl;
|
||||
import com.czlis.common.core.domain.entity.lis.XmHisreq;
|
||||
import com.czlis.common.core.domain.entity.lis.view.VwReqitemclass;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LabTatctrlMapper {
|
||||
List<LabTatctrl> queryDict(LabTatctrl labTatctrl);
|
||||
|
||||
List<VwReqitemclass> queryReqitemclass(VwReqitemclass vwReqitemclass);
|
||||
|
||||
List<XmHisreq> queryXmHisreq(XmHisreq xmHisreq);
|
||||
|
||||
void add(LabTatctrl labTatctrl);
|
||||
|
||||
void update(LabTatctrl labTatctrl);
|
||||
|
||||
void delete(LabTatctrl labTatctrl);
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.czlis.liswork.service;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface LabInputmdlService {
|
||||
Result query(LabInputmdl labInputmdl);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.czlis.liswork.service;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInstrvsreqclass;
|
||||
|
||||
public interface LabInstrvsreqclassService {
|
||||
Result queryData(LabInstrvsreqclass labInstrvsreqclass);
|
||||
|
||||
Result add(LabInstrvsreqclass labInstrvsreqclass);
|
||||
|
||||
Result update(LabInstrvsreqclass labInstrvsreqclass);
|
||||
|
||||
Result delete(LabInstrvsreqclass labInstrvsreqclass);
|
||||
|
||||
Result queryReqClass(String yq);
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.czlis.liswork.service;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabTatctrl;
|
||||
import com.czlis.common.core.domain.entity.lis.XmHisreq;
|
||||
import com.czlis.common.core.domain.entity.lis.view.VwReqitemclass;
|
||||
|
||||
public interface LabTatctrlService {
|
||||
Result queryDict(LabTatctrl labTatctrl);
|
||||
|
||||
Result queryReqitemclass(VwReqitemclass vwReqitemclass);
|
||||
|
||||
Result queryXmHisreq(XmHisreq xmHisreq);
|
||||
|
||||
Result add(LabTatctrl labTatctrl);
|
||||
|
||||
Result update(LabTatctrl labTatctrl);
|
||||
|
||||
Result delete(LabTatctrl labTatctrl);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.czlis.liswork.service.impl.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInputmdl;
|
||||
import com.czlis.liswork.service.LabInputmdlService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LabInputmdlServiceImpl implements LabInputmdlService {
|
||||
|
||||
|
||||
@Override
|
||||
public Result query(LabInputmdl labInputmdl) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.czlis.liswork.service.impl.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabInstrvsreqclass;
|
||||
import com.czlis.common.core.domain.entity.lis.view.VwReqitemclass;
|
||||
import com.czlis.liswork.mapper.dict.LabInstrvsreqclassMapper;
|
||||
import com.czlis.liswork.service.LabInstrvsreqclassService;
|
||||
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 LabInstrvsreqclassServiceImpl implements LabInstrvsreqclassService {
|
||||
|
||||
@Autowired
|
||||
LabInstrvsreqclassMapper labInstrvsreqclassMapper;
|
||||
|
||||
@Override
|
||||
public Result queryData(LabInstrvsreqclass labInstrvsreqclass) {
|
||||
List<LabInstrvsreqclass> labInstrvsreqclassList = labInstrvsreqclassMapper.getLabInstrvsreqclassList(labInstrvsreqclass);
|
||||
return new Result("0","查询成功1",labInstrvsreqclassList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result add(LabInstrvsreqclass labInstrvsreqclass) {
|
||||
labInstrvsreqclassMapper.add(labInstrvsreqclass);
|
||||
return new Result("0","添加成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result update(LabInstrvsreqclass labInstrvsreqclass) {
|
||||
labInstrvsreqclassMapper.update(labInstrvsreqclass);
|
||||
return new Result("0","修改成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result delete(LabInstrvsreqclass labInstrvsreqclass) {
|
||||
labInstrvsreqclassMapper.delete(labInstrvsreqclass);
|
||||
return new Result("0","删除成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result queryReqClass(String yq) {
|
||||
List<VwReqitemclass> vwReqitemclassList = labInstrvsreqclassMapper.queryReqClass(yq);
|
||||
return new Result("0","查询成功!",vwReqitemclassList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.czlis.liswork.service.impl.xtwh;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabTatctrl;
|
||||
import com.czlis.common.core.domain.entity.lis.XmHisreq;
|
||||
import com.czlis.common.core.domain.entity.lis.view.VwReqitemclass;
|
||||
import com.czlis.liswork.mapper.xtwh.LabTatctrlMapper;
|
||||
import com.czlis.liswork.service.LabTatctrlService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class LabTatctrlServiceImpl implements LabTatctrlService {
|
||||
|
||||
@Autowired
|
||||
LabTatctrlMapper labTatctrlMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public Result queryDict(LabTatctrl labTatctrl) {
|
||||
List<LabTatctrl> labTatctrlList = labTatctrlMapper.queryDict(labTatctrl);
|
||||
return new Result("0","查询成功!",labTatctrlList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result queryReqitemclass(VwReqitemclass vwReqitemclass) {
|
||||
List<VwReqitemclass> vwReqitemclassList = labTatctrlMapper.queryReqitemclass(vwReqitemclass);
|
||||
return new Result("0","查询成功!",vwReqitemclassList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result queryXmHisreq(XmHisreq xmHisreq) {
|
||||
List<XmHisreq> xmHisreqList = labTatctrlMapper.queryXmHisreq(xmHisreq);
|
||||
return new Result("0","查询成功!",xmHisreqList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result add(LabTatctrl labTatctrl) {
|
||||
labTatctrlMapper.add(labTatctrl);
|
||||
return new Result("0","新增成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result update(LabTatctrl labTatctrl) {
|
||||
labTatctrlMapper.update(labTatctrl);
|
||||
return new Result("0","修改成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result delete(LabTatctrl labTatctrl) {
|
||||
labTatctrlMapper.delete(labTatctrl);
|
||||
return new Result("0","删除成功!");
|
||||
}
|
||||
}
|
||||
@ -12,5 +12,42 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="add">
|
||||
insert into lab_instrvsreqclass(
|
||||
yq,bgddh,seq,brly,bk
|
||||
)values(
|
||||
#{yq},#{bgddh},#{seq},#{brly},#{bk}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update lab_instrvsreqclass
|
||||
<set>
|
||||
<if test="seq != null">seq = #{seq},</if>
|
||||
<if test="brly != null and brly != ''">brly = #{brly},</if>
|
||||
<if test="bk != null and bk != ''">bk = #{bk},</if>
|
||||
yq = #{yq},bgddh = #{bgddh}
|
||||
</set>
|
||||
where yq = #{yq} and bgddh = #{bgddh}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete from lab_instrvsreqclass where yq = #{yq} and bgddh = #{bgddh}
|
||||
</delete>
|
||||
|
||||
<select id="queryReqClass">
|
||||
SELECT vw_reqitemclass.classno,
|
||||
vw_reqitemclass.classname,
|
||||
vw_reqitemclass.bkcolor,
|
||||
vw_reqitemclass.yblx,
|
||||
'' as cp_zjf
|
||||
FROM vw_reqitemclass
|
||||
WHERE not exists
|
||||
( select * from lab_instrvsreqclass
|
||||
where lab_instrvsreqclass.yq = #{yq}
|
||||
and vw_reqitemclass.classno = lab_instrvsreqclass.bgddh)
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
56
liswork/src/main/resources/mapper/labTatctrlMapper.xml
Normal file
56
liswork/src/main/resources/mapper/labTatctrlMapper.xml
Normal file
@ -0,0 +1,56 @@
|
||||
<?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.LabTatctrlMapper">
|
||||
|
||||
<select id="queryDict">
|
||||
select * from lab_tatctrl
|
||||
<where>
|
||||
<if test="ruleid != null"> and ruleid = #{ruleid}</if>
|
||||
<if test="ruletype != null and ruletype !=''">and ruletype = #{ruletype}</if>
|
||||
<if test="refcode != null and refcode !=''">and refcode = #{refcode}</if>
|
||||
<if test="jzbz != null and jzbz !=''">and jzbz = #{jzbz}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryReqitemclass">
|
||||
select * from vw_reqitemclass
|
||||
<where>
|
||||
<if test="classno != null and classno !=''"> and classno = #{classno}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryXmHisreq">
|
||||
select * from xm_hisreq
|
||||
<where>
|
||||
<if test="sqxmdh != null and sqxmdh != ''">and sqxmdh = #{sqxmdh}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="add">
|
||||
insert into lab_tatctrl(
|
||||
ruleid,ruletype,refcode,jzbz,yblx,min1,min2
|
||||
)values(
|
||||
#{ruleid},#{ruletype},#{refcode},#{jzbz},#{yblx},#{min1},#{min2}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update lab_tatctrl
|
||||
<set>
|
||||
<if test="ruletype != null and ruletype != ''">ruletype = #{ruletype},</if>
|
||||
<if test="refcode != null and refcode != ''">refcode = #{refcode},</if>
|
||||
<if test="jzbz != null and jzbz != ''">jzbz = #{jzbz},</if>
|
||||
<if test="yblx != null and yblx != ''">yblx = #{yblx},</if>
|
||||
<if test="min1 != null">min1 = #{min1},</if>
|
||||
<if test="min2 != null">min2 = #{min2},</if>
|
||||
ruleid = #{ruleid}
|
||||
</set>
|
||||
where ruleid = #{ruleid}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete from lab_tatctrl where ruleid = #{ruleid}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -93,3 +93,8 @@ if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_
|
||||
begin
|
||||
alter table com_opt add status 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')
|
||||
end
|
||||
|
||||
@ -37,7 +37,6 @@ public class ZybgcxController extends BaseController {
|
||||
*/
|
||||
@ApiOperation("获取报告信息列表")
|
||||
@PostMapping("/ReportList")
|
||||
@Anonymous
|
||||
public Result getPatReportList(@RequestBody Web_getReportsList webGetReportsList){
|
||||
log.info("获取报告信息列表:{}",webGetReportsList);
|
||||
return zybgcxService.getPatList(webGetReportsList);
|
||||
@ -50,21 +49,18 @@ public class ZybgcxController extends BaseController {
|
||||
*/
|
||||
@ApiOperation("获取微生物报告单信息")
|
||||
@PostMapping("/MedList")
|
||||
@Anonymous
|
||||
public TableDataInfo getResultMed(@RequestBody Web_getResultMed webGetResultMed){
|
||||
startPage();
|
||||
List<Web_getResultMed> resultMedList = zybgcxService.getResultMed(webGetResultMed);
|
||||
return getDataTable(resultMedList);
|
||||
}
|
||||
|
||||
@Anonymous
|
||||
@ApiOperation("获取pdf报告")
|
||||
@GetMapping("/pdf")
|
||||
public Result getPDFReportOne(Date jyrq,String yq,String ybh){
|
||||
return zybgcxService.getPDFReportOne(jyrq,yq,ybh);
|
||||
}
|
||||
|
||||
@Anonymous
|
||||
@ApiOperation("获取普通报告结果")
|
||||
@PostMapping("/result")
|
||||
public Result getLisResult(@RequestBody Web_result webResult){
|
||||
@ -72,7 +68,6 @@ public class ZybgcxController extends BaseController {
|
||||
}
|
||||
|
||||
@ApiOperation("获取历史检验结果")
|
||||
@Anonymous
|
||||
@PostMapping("/fsresult")
|
||||
public Result getFSResult(@RequestBody Web_fs_printReport webFsPrintReport){
|
||||
return zybgcxService.getFSResult(webFsPrintReport);
|
||||
@ -84,7 +79,6 @@ public class ZybgcxController extends BaseController {
|
||||
* @param bgdh 格式为:jyrq_yq_ybh
|
||||
* @return
|
||||
*/
|
||||
@Anonymous
|
||||
@ApiOperation("打印报告单")
|
||||
@PostMapping("/print")
|
||||
public Result printReport(@RequestBody String[] bgdh){
|
||||
|
||||
@ -8,6 +8,7 @@ import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czlis.common.config.RuoYiConfig;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabPat;
|
||||
import com.czlis.common.core.domain.entity.lis.LabReqreportPdffile;
|
||||
import com.czlis.common.utils.file.FileUtils;
|
||||
import com.czlis.common.utils.ip.IpUtils;
|
||||
@ -83,6 +84,8 @@ public class ZybgcxServcieImpl implements ZybgcxService {
|
||||
String ybh = stringParam[2];
|
||||
LabReqreportPdffile labReqreportPdffileOne = commonUtil.getLabReqreportPdffileOne(DateUtil.parse(jyrqStr, "yyyyMMdd"), yq, ybh);
|
||||
if(labReqreportPdffileOne == null) continue;
|
||||
LabPat labPatOne = commonUtil.getLabPatOne(DateUtil.parse(jyrqStr, "yyyyMMdd"), yq, ybh);
|
||||
if(labPatOne == null) return new Result("-1","未找到该报告单的信息!"+ Arrays.toString(stringParam));
|
||||
String base64PDF = labReqreportPdffileOne.getBASE64PDF();
|
||||
if(base64PDF == null || base64PDF.equals("")) continue;
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
@ -90,6 +93,8 @@ public class ZybgcxServcieImpl implements ZybgcxService {
|
||||
//判断使用的纸张类型
|
||||
String pageType = reportUtil.getReportPaperSize(DateUtil.parse(jyrqStr, "yyyyMMdd"), yq, ybh);
|
||||
map.put("pageType", pageType);
|
||||
map.put("brdh",labPatOne.getBrdh());
|
||||
map.put("confirmdt",labPatOne.getConfirmdt());
|
||||
bgdhBase64List.add(map);
|
||||
}
|
||||
//过滤A4的报告单
|
||||
@ -101,6 +106,24 @@ public class ZybgcxServcieImpl implements ZybgcxService {
|
||||
//过滤A5格式报告单
|
||||
List<Map<String, Object>> collectA5 = bgdhBase64List.stream().filter(bgdhBase64 -> bgdhBase64.get("pageType").equals("A5")).collect(Collectors.toList());
|
||||
|
||||
//对A5格式的报告单进行排序
|
||||
collectA5.sort(new Comparator<Map<String, Object>>() {
|
||||
@Override
|
||||
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
||||
Integer brdh1 = Integer.valueOf(o1.get("brdh").toString().trim()) ;
|
||||
Integer brdh2 = Integer.valueOf(o2.get("brdh").toString().trim()) ;
|
||||
int i = brdh1.compareTo(brdh2);
|
||||
if(i == 0){
|
||||
DateTime confirmdt1 = DateUtil.parse(o1.get("confirmdt").toString(), "yyyy-MM-dd");
|
||||
DateTime confirmdt2 = DateUtil.parse(o2.get("confirmdt").toString(), "yyyy-MM-dd");
|
||||
return confirmdt1.compareTo(confirmdt2);
|
||||
}else{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//合并A5格式的pdf为A4格式
|
||||
for (int i = 0; i < collectA5.size(); i++) {
|
||||
if(i+1 >= collectA5.size()){
|
||||
|
||||
@ -30,7 +30,6 @@ public class ZycxController extends BaseController {
|
||||
|
||||
@ApiOperation("获取申请单")
|
||||
@GetMapping("/query")
|
||||
@Anonymous
|
||||
//@PreAuthorize("@ss.hasPermi('zycx:interface:query')")
|
||||
public Result getSQDInfo(String dept,String userid,String st,String et,String yljg){
|
||||
log.info("查询申请单,zyreq/query:{},{},{},{},{}",dept,userid,st,et,yljg);
|
||||
@ -40,7 +39,6 @@ public class ZycxController extends BaseController {
|
||||
|
||||
@ApiOperation("生成条码")
|
||||
@GetMapping("/add")
|
||||
@Anonymous
|
||||
public Result createSQD(String dept,String userid,String st,String et,String yljg){
|
||||
log.info("调用生成条码接口,zyreq/add:{},{},{},{},{}",dept,userid,st,et,yljg);
|
||||
return zycxService.createSQD(dept,userid,st,et,yljg);
|
||||
@ -49,7 +47,6 @@ public class ZycxController extends BaseController {
|
||||
|
||||
@ApiOperation("执行条码")
|
||||
@GetMapping("/exec")
|
||||
@Anonymous
|
||||
public Result execSQD(String[] sqh,String userid,String status,String yljg){
|
||||
log.info("执行条码接口,zyreq/print:{},{},{},{}",sqh,userid,status,yljg);
|
||||
return zycxService.execSQD(sqh,userid,status,yljg);
|
||||
@ -57,13 +54,11 @@ public class ZycxController extends BaseController {
|
||||
|
||||
@ApiOperation("获取申请单明细数据")
|
||||
@GetMapping("/detail")
|
||||
@Anonymous
|
||||
public Result getSQDDetail(String sqh){
|
||||
log.info("获取申请单明细数据,zyreq/detail:{}",sqh);
|
||||
return zycxService.getSQDDetail(sqh);
|
||||
}
|
||||
|
||||
@Anonymous
|
||||
@ApiOperation("获取申请单主表数据")
|
||||
@GetMapping("/reqmain")
|
||||
public Result getSQDMain(LabReqmain labReqmain){
|
||||
@ -72,7 +67,6 @@ public class ZycxController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@Anonymous
|
||||
@GetMapping("/test1")
|
||||
public Result test1(String sqh){
|
||||
return zycxService.test1(sqh);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user