71 lines
1.8 KiB
Java
Raw Normal View History

2025-06-24 18:01:25 +08:00
package com.czlis.interfaceCommon.utils;
import com.czlis.common.core.domain.entity.LabPat;
2025-06-27 13:05:23 +08:00
import com.czlis.common.core.domain.entity.LabReqmain;
2025-07-01 11:52:54 +08:00
import com.czlis.interfaceCommon.mapper.*;
2025-06-24 18:01:25 +08:00
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
2025-07-01 11:52:54 +08:00
import org.springframework.transaction.annotation.Transactional;
2025-06-24 18:01:25 +08:00
2025-07-01 11:52:54 +08:00
import java.util.*;
2025-06-24 18:01:25 +08:00
@Component
public class CommonUtil {
@Autowired
LabPatMapper labPatMapper;
@Autowired
ComOptMapper comOptMapper;
2025-06-27 13:05:23 +08:00
@Autowired
LabReqmainMapper labReqmainMapper;
2025-07-01 11:52:54 +08:00
@Autowired
CommonMapper commonMapper;
@Autowired
ComDictMapper comDictMapper;
2025-06-24 18:01:25 +08:00
public LabPat getLabPatOne(Date jyrq, String yq, String ybh){
return labPatMapper.getLabPatOne(jyrq, yq, ybh);
}
public String getComOptValue(String yq,String xxdh){
return comOptMapper.getComOptValue(yq,xxdh);
}
2025-06-27 13:05:23 +08:00
public LabReqmain getLabReqmainOne(String sqh){
return labReqmainMapper.getLabReqmainOne(sqh);
}
2025-07-01 11:52:54 +08:00
public List<LabPat> getLabPatList(String sqh){
return labPatMapper.getLabPatList(sqh);
}
@Transactional(rollbackFor = Exception.class)
public void insertLabPat(LabPat labPat){
labPatMapper.insertLabPat(labPat);
}
public Date getCurrentTime(){
return commonMapper.getCurrentTime();
}
public String getComDictNameById(String zdlb,String xxdh){
String zdmc = comDictMapper.getComDictNameById(zdlb,xxdh);
if(zdmc == null || zdmc.equals("")){
return xxdh;
}else{
return zdmc;
}
}
public String getComDictIdByName(String zdlb,String zdmc){
String zddh = comDictMapper.getComDictIdByName(zdlb,zdmc);
if(zddh == null || zddh.equals("")){
return zdmc;
}else{
return zddh;
}
}
2025-06-24 18:01:25 +08:00
}