参数模板
This commit is contained in:
parent
6fe3bb8789
commit
9b2d5e18a0
@ -25,6 +25,8 @@ public class ComOptionUtils {
|
||||
*/
|
||||
public static void setOptCache(String yq,String xxdh, ComOpt comOpt) {
|
||||
//先清除该key的所有缓存,然后再重新设置该key的缓存
|
||||
yq=yq.trim();
|
||||
xxdh=xxdh.toUpperCase();
|
||||
String key = yq+":"+xxdh;
|
||||
SpringUtils.getBean(RedisCache.class).deleteObject(key);
|
||||
SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), comOpt);
|
||||
@ -38,6 +40,8 @@ public class ComOptionUtils {
|
||||
}
|
||||
|
||||
public static void clearOptCache(String yq,String xxdh) {
|
||||
xxdh=xxdh.toUpperCase();
|
||||
yq=yq.trim();
|
||||
Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(CacheConstants.COM_OPT_KEY + yq+":"+xxdh);
|
||||
SpringUtils.getBean(RedisCache.class).deleteObject(keys);
|
||||
}
|
||||
@ -49,6 +53,8 @@ public class ComOptionUtils {
|
||||
* @return ComOpt 参数数据
|
||||
*/
|
||||
public static ComOpt getOptCache(String yq,String xxdh) {
|
||||
xxdh=xxdh.toUpperCase();
|
||||
yq=yq.trim();
|
||||
String key = yq+":"+xxdh;
|
||||
Object cacheObject = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
||||
if (StringUtils.isNotNull(cacheObject)) {
|
||||
|
||||
@ -773,13 +773,13 @@ public class LisWorkcom extends LisWorkBase{
|
||||
String jgbz0 = commonUtil.getLabPatJgbz(jyrq, is_instr_cbbg, ybh);
|
||||
if (jgbz0 != null) {
|
||||
if ("2".equals(jgbz0) || "3".equals(jgbz0)) {
|
||||
return new Result("1", "初步报告已经被审核,撤回前无法删除!");
|
||||
return new Result("-1", "初步报告已经被审核,撤回前无法删除!");
|
||||
}
|
||||
}
|
||||
String jgbz1 = commonUtil.getLabPatJgbz(jyrq, is_instr_ejbg, ybh);
|
||||
if (jgbz1 != null) {
|
||||
if ("2".equals(jgbz1) || "4".equals(jgbz1)) {
|
||||
return new Result("1", "二级报告已经被审核,撤回前无法删除!");
|
||||
return new Result("-1", "二级报告已经被审核,撤回前无法删除!");
|
||||
}
|
||||
}
|
||||
if (jgbz0 != null) delsample(jyrq, is_instr_cbbg, ybh);
|
||||
@ -912,7 +912,7 @@ public class LisWorkcom extends LisWorkBase{
|
||||
if (count > 0) {
|
||||
return new Result("0", "");
|
||||
} else {
|
||||
return new Result("1", "");
|
||||
return new Result("-1", "");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ public class LisWorkconfirm extends LisWorkcom{
|
||||
String yq = labPat.getYq();
|
||||
String ybh = labPat.getYbh();
|
||||
String jgbz = labPat.getJgbz();
|
||||
if ("2".equals(jgbz)) return new Result("1", "报告已审核!");
|
||||
if ("2".equals(jgbz)) return new Result("-1", "报告已审核!");
|
||||
if ("5".equals(jgbz)) return new Result("-1", "已锁定报告禁止审核!");
|
||||
if (!"1".equals(jgbz) && checktype == 2) {
|
||||
String f_check1 = commonUtil.getComOptValue(yq, "f_check1");
|
||||
@ -601,7 +601,7 @@ public class LisWorkconfirm extends LisWorkcom{
|
||||
* @return
|
||||
*/
|
||||
public Result unconfirm(Date jyrq, String yq, String ybh, String yhdh) {
|
||||
if (yhdh == null || yhdh.isEmpty()) return new Result("1", "操作者为空,无法解除审核!");
|
||||
if (yhdh == null || yhdh.isEmpty()) return new Result("-1", "操作者为空,无法解除审核!");
|
||||
int problemId = getProblemId();
|
||||
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||
if (problemId < 3) {
|
||||
@ -609,7 +609,7 @@ public class LisWorkconfirm extends LisWorkcom{
|
||||
if (!commonUtil.getUserPower(yq, yhdh, 10)) return new Result("-1", "当前操作者无权对本仪器报告解除审核!");
|
||||
//2:数据合法性校验
|
||||
String jgbz = labPat.getJgbz();
|
||||
if (!"2".equals(jgbz)) return new Result("1", "报告未审核,不需解除!");
|
||||
if (!"2".equals(jgbz)) return new Result("-1", "报告未审核,不需解除!");
|
||||
}
|
||||
if (problemId < 3) problemId = 3;
|
||||
if (problemId < 4) {
|
||||
@ -693,7 +693,7 @@ public class LisWorkconfirm extends LisWorkcom{
|
||||
}
|
||||
|
||||
public Result unconfirm1(Date jyrq, String yq, String ybh, String yhdh) {
|
||||
if (yhdh == null || yhdh.isEmpty()) return new Result("1", "操作者为空,无法解除审核!");
|
||||
if (yhdh == null || yhdh.isEmpty()) return new Result("-1", "操作者为空,无法解除审核!");
|
||||
int problemId = getProblemId();
|
||||
LabPat labPat = commonUtil.getLabPatOne(jyrq, yq, ybh);
|
||||
if (problemId < 3) {
|
||||
@ -701,8 +701,8 @@ public class LisWorkconfirm extends LisWorkcom{
|
||||
if (!commonUtil.getUserPower(yq, yhdh, 10)) return new Result("-1", "当前操作者无权对本仪器报告解除审核!");
|
||||
//2:数据合法性校验
|
||||
String jgbz = labPat.getJgbz();
|
||||
if ("2".equals(jgbz)) return new Result("1", "报告已审核,不能解除初审!");
|
||||
if (!"1".equals(jgbz)) return new Result("1", "报告未初审,不能解除初审!");
|
||||
if ("2".equals(jgbz)) return new Result("-1", "报告已审核,不能解除初审!");
|
||||
if (!"1".equals(jgbz)) return new Result("-1", "报告未初审,不能解除初审!");
|
||||
}
|
||||
// if (problemId < 3) problemId = 3;
|
||||
|
||||
|
||||
@ -223,7 +223,23 @@ public class ReportItemController extends BaseController {
|
||||
@ApiOperation("获取试剂厂家")
|
||||
@GetMapping("/querySjcs")
|
||||
public Result getSjcs(String yq){
|
||||
if(yq == null || yq.equals("")) return new Result("-1","参数不能为空!");
|
||||
if(yq == null || yq.equals("")) return new Result("-1","仪器不能为空!");
|
||||
return reportItemService.getSjcs(yq);
|
||||
}
|
||||
@ApiOperation("获取测试模板")
|
||||
@GetMapping("/querymbmc")
|
||||
public Result getmbmc(){
|
||||
return reportItemService.getmbmc();
|
||||
}
|
||||
@ApiOperation("获取仪器参数")
|
||||
@GetMapping("/querydouble")
|
||||
public Result getdouble(String yq,String xmdh){
|
||||
if(yq == null || yq.equals("")) return new Result("-1","仪器不能为空!");
|
||||
return reportItemService.getdouble(yq,xmdh);
|
||||
}
|
||||
@ApiOperation("保存仪器参数")
|
||||
@PostMapping("/savedouble")
|
||||
public Result savedouble(@RequestBody XmDouble xmDouble){
|
||||
return reportItemService.savedouble(xmDouble);
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,4 +76,5 @@ public interface ReportItemMapper {
|
||||
void updateXmLot(XmLot xmLot);
|
||||
|
||||
List<Map<String, Objects>> getSjcs(String yq);
|
||||
List<Map<String, Objects>>getmbmc();
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.czlis.liswork.service;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.*;
|
||||
import com.czlis.liswork.pojo.DTO.XmInfoNewDTO;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -55,10 +56,13 @@ public interface ReportItemService {
|
||||
Result delXmRefNew(XmRefNew xmRefNew);
|
||||
|
||||
Result getSjcs(String yq);
|
||||
Result getmbmc();
|
||||
Result queryXmInfoVsDYXH(String yq);
|
||||
|
||||
Result updateXminfoVsDYXH(List<XmInfoVs> list);
|
||||
Result getitemtdh(String yq);
|
||||
Result saveitemtdh(List<XmInter> list);
|
||||
Result delitemtdh(String yq,String tdh);
|
||||
Result getdouble(String yq ,String xmdh);
|
||||
Result savedouble(XmDouble xmDouble);
|
||||
}
|
||||
|
||||
@ -76,12 +76,12 @@ public class LisWorkPageInfoServiceImpl implements LisWorkPageInfoService {
|
||||
String jgbz = labPat.getJgbz();
|
||||
if (jgbz == null) jgbz = "0";
|
||||
if ("2".equals(jgbz) || "5".equals(jgbz)) {
|
||||
return new Result("1", "样本已审核禁止交换!");
|
||||
return new Result("-1", "样本已审核禁止交换!");
|
||||
}
|
||||
}
|
||||
LabResult labResult = commonUtil.getLabResult(jyrq, yq, ybh, xmdh);
|
||||
if (labResult == null) {
|
||||
return new Result("1", "当前结果为空无法交换!");
|
||||
return new Result("-1", "当前结果为空无法交换!");
|
||||
}
|
||||
String csjg0 = labResult.getCsjg();
|
||||
labResultRe.setCsjg(csjg0);
|
||||
|
||||
@ -60,7 +60,7 @@ public class LisWorkServiceImpl implements LisWorkService {
|
||||
if (labPat == null) return new Result("-1", "未找到报告单,打印失败!");
|
||||
String jgbz = labPat.getJgbz();
|
||||
if (jgbz == null || jgbz.isEmpty()) return new Result("-1", "未找到报告单,打印失败!");
|
||||
if (!"2".equals(jgbz)) return new Result("1", "报告单未审核,禁止打印!");
|
||||
if (!"2".equals(jgbz)) return new Result("-1", "报告单未审核,禁止打印!");
|
||||
Result res = reportUtil.printReport(labPat);
|
||||
if (!"1".equals(labPat.getDybz())) {
|
||||
commonUtil.updateLabPatByColumn(jyrq, yq, ybh, "dybz", "1");
|
||||
|
||||
@ -2,6 +2,7 @@ package com.czlis.liswork.service.impl;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.*;
|
||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||
import com.czlis.liswork.mapper.dict.ReportItemMapper;
|
||||
import com.czlis.liswork.pojo.DTO.XmInfoNewDTO;
|
||||
import com.czlis.liswork.service.ReportItemService;
|
||||
@ -20,7 +21,8 @@ public class ReportItemServiceImpl implements ReportItemService {
|
||||
|
||||
@Autowired
|
||||
private ReportItemMapper reportItemMapper;
|
||||
|
||||
@Autowired
|
||||
CommonUtil commonUtil;
|
||||
@Override
|
||||
public XmInfoNewDTO queryDetail(String xmid, String yq, String xmdh) {
|
||||
XmInfoNew xmInfoNew = new XmInfoNew();
|
||||
@ -419,6 +421,11 @@ public class ReportItemServiceImpl implements ReportItemService {
|
||||
return new Result("0","获取数据成功!",sjcsList);
|
||||
}
|
||||
@Override
|
||||
public Result getmbmc() {
|
||||
List<Map<String, Objects>> mbmcList = reportItemMapper.getmbmc();
|
||||
return new Result("0","获取数据成功!",mbmcList);
|
||||
}
|
||||
@Override
|
||||
public Result queryXmInfoVsDYXH(String yq) {
|
||||
return new Result("0","成功!",reportItemMapper.queryXmInfoVsDYXH(yq));
|
||||
}
|
||||
@ -471,4 +478,32 @@ public class ReportItemServiceImpl implements ReportItemService {
|
||||
}
|
||||
return new Result("0","成功!");
|
||||
}
|
||||
@Override
|
||||
public Result getdouble(String yq,String xmdh) {
|
||||
String haveparam=commonUtil.getComOptValue(yq,"haveparam");
|
||||
if(haveparam==null||!"1".equals(haveparam))return new Result("1","不提供参数设置");
|
||||
if(xmdh == null || xmdh.equals("")) return new Result("0","成功!");
|
||||
XmDouble xmDouble=new XmDouble();
|
||||
xmDouble.setYq(yq);
|
||||
xmDouble.setXmdh(xmdh);
|
||||
return new Result("0","成功!",reportItemMapper.queryXmDouble(xmDouble));
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Result savedouble(XmDouble xmDouble) {
|
||||
String yq= xmDouble.getYq();
|
||||
String xmdh=xmDouble.getXmdh();
|
||||
if(yq == null || yq.equals("")) return new Result("-1","仪器不能为空!");
|
||||
if(xmdh == null || xmdh.equals("")) return new Result("-1","项目不能为空!");
|
||||
XmDouble xmDouble0=new XmDouble();
|
||||
xmDouble0.setYq(yq);
|
||||
xmDouble0.setXmdh(xmdh);
|
||||
List<XmDouble> xmDouble01=reportItemMapper.queryXmDouble(xmDouble0);
|
||||
if(xmDouble01.isEmpty()||xmDouble01==null){
|
||||
reportItemMapper.addXmDoubleRow(xmDouble);
|
||||
}else{
|
||||
reportItemMapper.updateXmDoubleRow(xmDouble);
|
||||
}
|
||||
return new Result("0","成功!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,6 +51,7 @@
|
||||
<if test="yq !=null and yq !=''"> and yq = #{yq}</if>
|
||||
<if test="tdh !=null and tdh !=''"> and tdh = #{tdh}</if>
|
||||
</where>
|
||||
order by xmdh,tdh
|
||||
</select>
|
||||
|
||||
<select id="queryXmRefNew" resultType="com.czlis.common.core.domain.entity.lis.XmRefNew">
|
||||
@ -72,6 +73,7 @@
|
||||
<select id="queryXmInfoVsDYXH" resultType="com.czlis.common.core.domain.entity.lis.XmInfoVs">
|
||||
select xm_info_vs.*,xm_info_new.xmmc,xm_info_new.xmdh from xm_info_vs join xm_info_new on xm_info_new.xmid=xm_info_vs.xmid
|
||||
where xm_info_vs.yq = #{yq}
|
||||
order by xm_info_vs.dyxh
|
||||
</select>
|
||||
<select id="queryXmTextresultNew" resultType="com.czlis.common.core.domain.entity.lis.XmTextresultNew">
|
||||
select * from xm_textresult_new
|
||||
@ -641,4 +643,7 @@
|
||||
<select id="getSjcs">
|
||||
SELECT distinct sjcs as no,sjcs as na FROM xm_lot WHERE yq = #{yq} ORDER BY no asc
|
||||
</select>
|
||||
<select id="getmbmc">
|
||||
SELECT distinct mbmc as no, mbmc as na FROM xm_plate ORDER BY mbmc ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user