住院采血模块
This commit is contained in:
parent
a32a2f439d
commit
2834ef95bb
@ -143,6 +143,11 @@
|
|||||||
<version>1.6.2</version>
|
<version>1.6.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.belerweb</groupId>
|
||||||
|
<artifactId>pinyin4j</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@ -55,6 +55,7 @@
|
|||||||
<artifactId>zybgcx</artifactId>
|
<artifactId>zybgcx</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--定时任务-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.czlis</groupId>
|
<groupId>com.czlis</groupId>
|
||||||
<artifactId>lis-quartz</artifactId>
|
<artifactId>lis-quartz</artifactId>
|
||||||
@ -178,6 +179,7 @@
|
|||||||
<!-- 该插件的作用是用于复制指定的文件 -->
|
<!-- 该插件的作用是用于复制指定的文件 -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>3.3.1</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution> <!-- 复制配置文件 -->
|
<execution> <!-- 复制配置文件 -->
|
||||||
<id>copy-resources</id>
|
<id>copy-resources</id>
|
||||||
|
|||||||
@ -111,7 +111,7 @@ public class SecurityConfig {
|
|||||||
requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
|
requests.antMatchers("/login", "/register", "/captchaImage").permitAll()
|
||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/zyreq/**").permitAll()
|
||||||
.antMatchers("/doc.html").permitAll() //Knife4j 过滤
|
.antMatchers("/doc.html").permitAll() //Knife4j 过滤
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated();
|
.anyRequest().authenticated();
|
||||||
|
|||||||
@ -48,14 +48,17 @@ public class DictController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("删除字典")
|
||||||
@DeleteMapping("/del")
|
@DeleteMapping("/del")
|
||||||
public Result delComDict(ComDict comDict){
|
public Result delComDict(ComDict comDict){
|
||||||
log.info("调用删除字典接口{}",comDict);
|
log.info("调用删除字典接口{}",comDict);
|
||||||
return comDictService.delComDict(comDict);
|
return comDictService.delComDict(comDict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改字典")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public Result updateComDict(ComDict comDict){
|
public Result updateComDict(@RequestBody ComDict comDict){
|
||||||
|
log.info("调用修改字典接口{}",comDict);
|
||||||
return comDictService.updateComDict(comDict);
|
return comDictService.updateComDict(comDict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.czlis.liswork.service.impl;
|
package com.czlis.liswork.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.common.utils.ComDictUtils;
|
import com.czlis.common.utils.ComDictUtils;
|
||||||
import com.czlis.liswork.mapper.dict.ComDictMapper;
|
import com.czlis.liswork.mapper.dict.ComDictMapper;
|
||||||
@ -44,6 +45,12 @@ public class ComDictServiceImpl implements ComDictService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public Result insertComDict(ComDict comDict) {
|
public Result insertComDict(ComDict comDict) {
|
||||||
|
String pinyin = PinyinUtil.getFirstLetter(comDict.getZdmc(), ""); //拼音首字母
|
||||||
|
if(pinyin.length() >= 9) {
|
||||||
|
pinyin = pinyin.substring(0, 9);
|
||||||
|
}
|
||||||
|
comDict.setZjf(pinyin);
|
||||||
|
comDict.setZdbz("Y");
|
||||||
int row = comDictMapper.insertComDict(comDict);
|
int row = comDictMapper.insertComDict(comDict);
|
||||||
if(row > 0){
|
if(row > 0){
|
||||||
List<ComDict> comDictList = comDictMapper.getComDictList(comDict);
|
List<ComDict> comDictList = comDictMapper.getComDictList(comDict);
|
||||||
@ -73,7 +80,7 @@ public class ComDictServiceImpl implements ComDictService {
|
|||||||
List<ComDict> comDictList = comDictMapper.getComDictList(comDict);
|
List<ComDict> comDictList = comDictMapper.getComDictList(comDict);
|
||||||
ComDictUtils.setDictCache(comDict.getZdlb(),comDictList);
|
ComDictUtils.setDictCache(comDict.getZdlb(),comDictList);
|
||||||
}
|
}
|
||||||
return null;
|
return new Result("0","修改成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
<insert id="insertComDict" parameterType="com.czlis.common.core.domain.entity.ComDict">
|
<insert id="insertComDict" parameterType="com.czlis.common.core.domain.entity.ComDict">
|
||||||
insert into com_dict(
|
insert into com_dict(
|
||||||
<if test="zdlb != null and zdlb != ''">zdlb,</if>
|
|
||||||
<if test="zddh != null and zddh != ''">zddh,</if>
|
<if test="zddh != null and zddh != ''">zddh,</if>
|
||||||
<if test="zdmc != null">zdmc,</if>
|
<if test="zdmc != null">zdmc,</if>
|
||||||
<if test="zjf != null and zjf != ''">zjf,</if>
|
<if test="zjf != null and zjf != ''">zjf,</if>
|
||||||
@ -35,15 +34,16 @@
|
|||||||
<if test="bz != null and bz != ''">bz,</if>
|
<if test="bz != null and bz != ''">bz,</if>
|
||||||
<if test="yljg != null and yljg != ''">yljg,</if>
|
<if test="yljg != null and yljg != ''">yljg,</if>
|
||||||
<if test="userflag != null and userflag != ''">userflag,</if>
|
<if test="userflag != null and userflag != ''">userflag,</if>
|
||||||
|
zdlb
|
||||||
)values(
|
)values(
|
||||||
<if test="zdlb != null and zdlb != ''">#{zdlb}</if>
|
<if test="zddh != null and zddh != ''">#{zddh},</if>
|
||||||
<if test="zddh != null and zddh != ''">#{zddh}</if>
|
<if test="zdmc != null">#{zdmc},</if>
|
||||||
<if test="zdmc != null">#{zdmc}</if>
|
<if test="zjf != null and zjf != ''">#{zjf},</if>
|
||||||
<if test="zjf != null and zjf != ''">#{zjf}</if>
|
<if test="zdbz != null and zdbz != ''">#{zdbz},</if>
|
||||||
<if test="zdbz != null and zdbz != ''">#{zdbz}</if>
|
<if test="bz != null and bz != ''">#{bz},</if>
|
||||||
<if test="bz != null and bz != ''">#{bz}</if>
|
<if test="yljg != null and yljg != ''">#{yljg},</if>
|
||||||
<if test="yljg != null and yljg != ''">#{yljg}</if>
|
<if test="userflag != null and userflag != ''">#{userflag},</if>
|
||||||
<if test="userflag != null and userflag != ''">#{userflag}</if>
|
#{zdlb}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -54,16 +54,15 @@
|
|||||||
<update id="updateComDict" parameterType="com.czlis.common.core.domain.entity.ComDict">
|
<update id="updateComDict" parameterType="com.czlis.common.core.domain.entity.ComDict">
|
||||||
update com_dict
|
update com_dict
|
||||||
<set>
|
<set>
|
||||||
<if test="zdlb != null and zdlb != ''">zdlb = #{zdlb}</if>
|
<if test="zdmc != null and zdmc !=''">zdmc= #{zdmc},</if>
|
||||||
<if test="zddh != null and zddh != ''">zddh = #{zddh}</if>
|
<if test="zjf != null and zjf != ''">zjf = #{zjf},</if>
|
||||||
<if test="zdmc != null">zdmc= #{zdmc}</if>
|
<if test="zdbz != null and zdbz != ''">zdbz = #{zdbz},</if>
|
||||||
<if test="zjf != null and zjf != ''">zjf = #{zjf}</if>
|
<if test="bz != null and bz != ''">bz = #{bz},</if>
|
||||||
<if test="zdbz != null and zdbz != ''">zdbz = #{zdbz}</if>
|
<if test="yljg != null and yljg != ''">yljg = #{yljg},</if>
|
||||||
<if test="bz != null and bz != ''">bz = #{bz}</if>
|
<if test="userflag != null and userflag != ''">userflag = #{userflag},</if>
|
||||||
<if test="yljg != null and yljg != ''">yljg = #{yljg}</if>
|
zddh = #{zddh}
|
||||||
<if test="userflag != null and userflag != ''">userflag = #{userflag}</if>
|
|
||||||
</set>
|
</set>
|
||||||
where zdlb = #{zdlb} and zddh = {zddh} and yljg = #{yljg}
|
where zdlb = #{zdlb} and zddh = #{zddh} and yljg = #{yljg}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
8
pom.xml
8
pom.xml
@ -38,6 +38,7 @@
|
|||||||
<lombok.version>1.18.26</lombok.version>
|
<lombok.version>1.18.26</lombok.version>
|
||||||
<knife4j.version>3.0.3</knife4j.version>
|
<knife4j.version>3.0.3</knife4j.version>
|
||||||
<sqlserver.version>8.2.2.jre8</sqlserver.version>
|
<sqlserver.version>8.2.2.jre8</sqlserver.version>
|
||||||
|
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||||
|
|
||||||
<!-- override dependency version -->
|
<!-- override dependency version -->
|
||||||
<tomcat.version>9.0.98</tomcat.version>
|
<tomcat.version>9.0.98</tomcat.version>
|
||||||
@ -268,6 +269,13 @@
|
|||||||
<artifactId>mssql-jdbc</artifactId>
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
<version>${sqlserver.version}</version>
|
<version>${sqlserver.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 中文转拼音 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.belerweb</groupId>
|
||||||
|
<artifactId>pinyin4j</artifactId>
|
||||||
|
<version>${pinyin4j.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,12 +8,10 @@ import com.czlis.zycx.pojo.Web_getBarcode;
|
|||||||
import com.czlis.zycx.service.ZycxService;
|
import com.czlis.zycx.service.ZycxService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -24,6 +22,7 @@ import java.util.List;
|
|||||||
@Api(tags = "住院采血接口")
|
@Api(tags = "住院采血接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/zyreq")
|
@RequestMapping("/zyreq")
|
||||||
|
@Slf4j
|
||||||
public class ZycxController extends BaseController {
|
public class ZycxController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ZycxService zycxService;
|
private ZycxService zycxService;
|
||||||
@ -38,6 +37,22 @@ public class ZycxController extends BaseController {
|
|||||||
return getDataTable(sqdInfoList);
|
return getDataTable(sqdInfoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("生成条码")
|
||||||
|
@GetMapping("/add")
|
||||||
|
public Result createSQD(String dept,String userid,String st,String et,String yljg){
|
||||||
|
log.info("调用生成条码接口:{},{},{},{},{}",dept,userid,st,et,yljg);
|
||||||
|
return zycxService.createSQD(dept,userid,st,et,yljg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("执行条码")
|
||||||
|
@GetMapping("/print")
|
||||||
|
public Result execSQD(String sqh,String userid,String status,String yljg){
|
||||||
|
log.info("执行条码接口:{},{},{},{}",sqh,userid,status,yljg);
|
||||||
|
return zycxService.execSQD(sqh,userid,status,yljg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,19 @@
|
|||||||
package com.czlis.zycx.mapper;
|
package com.czlis.zycx.mapper;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.common.core.domain.entity.LabReqmain;
|
import com.czlis.common.core.domain.entity.LabReqmain;
|
||||||
import com.czlis.zycx.pojo.Web_getBarcode;
|
import com.czlis.zycx.pojo.Web_getBarcode;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
public interface ZycxMapper {
|
public interface ZycxMapper {
|
||||||
|
|
||||||
List<LabReqmain> getSQDInfo(LabReqmain labReqmain);
|
List<LabReqmain> getSQDInfo(LabReqmain labReqmain);
|
||||||
|
|
||||||
|
void createSQD(Map<String, Object> map);
|
||||||
|
|
||||||
|
void execSQD(Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,4 +9,8 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface ZycxService {
|
public interface ZycxService {
|
||||||
List<LabReqmain> getSQDInfo(LabReqmain labReqmain);
|
List<LabReqmain> getSQDInfo(LabReqmain labReqmain);
|
||||||
|
|
||||||
|
Result createSQD(String dept, String userid, String st, String et, String yljg);
|
||||||
|
|
||||||
|
Result execSQD(String sqh,String userid,String status,String yljg );
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,9 +8,12 @@ import com.czlis.zycx.service.ZycxService;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@ -25,4 +28,46 @@ public class ZycxServiceImpl implements ZycxService {
|
|||||||
return zycxMapper.getSQDInfo(labReqmain);
|
return zycxMapper.getSQDInfo(labReqmain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public Result createSQD(String dept, String userid, String st, String et, String yljg) {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("dept", dept);
|
||||||
|
map.put("userid", userid);
|
||||||
|
map.put("st", st);
|
||||||
|
map.put("et", et);
|
||||||
|
map.put("yljg", yljg);
|
||||||
|
map.put("retcode","");
|
||||||
|
map.put("retmsg","");
|
||||||
|
zycxMapper.createSQD(map);
|
||||||
|
String retCode = String.valueOf(map.get("retcode"));
|
||||||
|
String retMsg = String.valueOf(map.get("retmsg"));
|
||||||
|
log.info("生成条码存储过程出参:{},{}",retCode,retMsg);
|
||||||
|
if(retCode.equals("0")){
|
||||||
|
return new Result("0","生成条码成功!");
|
||||||
|
}else{
|
||||||
|
return new Result("-1","生成条码失败!"+retMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result execSQD(String sqh,String userid,String status,String yljg) {
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("sqh", sqh);
|
||||||
|
map.put("userid", userid);
|
||||||
|
map.put("status", status);
|
||||||
|
//map.put("yljg", yljg);
|
||||||
|
map.put("retcode","");
|
||||||
|
map.put("retmsg","");
|
||||||
|
zycxMapper.execSQD(map);
|
||||||
|
String retCode = String.valueOf(map.get("retcode"));
|
||||||
|
String retMsg = String.valueOf(map.get("retmsg"));
|
||||||
|
log.info("调用执行状态存储过程出参:{},{}",retCode,retMsg);
|
||||||
|
if(retCode.equals("0")){
|
||||||
|
return new Result("0","修改状态成功!");
|
||||||
|
}else{
|
||||||
|
return new Result("-1","修改状态失败!"+retMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,5 +25,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="createSQD" parameterType="map" statementType="CALLABLE" useCache="false">
|
||||||
|
{call sp_getreqinterface(#{dept,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{userid,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{st,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{et,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{yljg,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{retcode,mode=OUT,jdbcType=INTEGER},
|
||||||
|
#{retmsg,mode=OUT,jdbcType=VARCHAR})
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="execSQD" parameterType="map" statementType="CALLABLE" useCache="false">
|
||||||
|
{call sp_setreqstatus(#{sqh,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{userid,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{status,mode=IN,jdbcType=VARCHAR},
|
||||||
|
#{retcode,mode=OUT,jdbcType=INTEGER},
|
||||||
|
#{retmsg,mode=OUT,jdbcType=VARCHAR})
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
x
Reference in New Issue
Block a user