输血报告单的视图条件

master
wyb 2 years ago
parent e212c83102
commit 86886a91f3

@ -0,0 +1,4 @@
{
"desc": "输血报告单视图采集额外配置",
"where": " AND FDESC NOT LIKE '%申请单%' "
}

@ -1,5 +1,6 @@
package com.docus.server.message.busservice.impl;
import com.alibaba.fastjson.JSONObject;
import com.docus.core.util.FileUtil;
import com.docus.core.util.Func;
import com.docus.infrastructure.core.exception.BaseException;
@ -60,6 +61,8 @@ public class SdBusinessServiceImpl implements SdBusinessService {
@Autowired
private SdRyBloodMapper sdRyBloodMapper;
private static final TableJsonRead JSON_READ = new TableJsonRead();
@Override
public MessageResponse recordSubmitHandle(Message message) {
try {
@ -200,11 +203,12 @@ public class SdBusinessServiceImpl implements SdBusinessService {
@Override
public List<SdRyBloodReportVO> getBloodView(String inpatientNo, Integer admissTimes) {
String disDate = tBasicMapper.getDischargeDateByInpatientNoAndTimes(inpatientNo, admissTimes);
if(Func.isBlank(disDate)){
disDate="18010203";
if (Func.isBlank(disDate)) {
disDate = "18010203";
}
String where = getBloodViewWhere();
// 视图数据
List<SdRyBloodReportDTO> bloodReportDtoList = sdRyBloodMapper.getByInpatientNoAndAdmissions(inpatientNo, admissTimes);
List<SdRyBloodReportDTO> bloodReportDtoList = sdRyBloodMapper.getByInpatientNoAndAdmissions(inpatientNo, admissTimes,where);
if (Func.isEmpty(bloodReportDtoList)) {
return new ArrayList<>();
}
@ -239,6 +243,21 @@ public class SdBusinessServiceImpl implements SdBusinessService {
return vos;
}
private static String getBloodViewWhere() {
try {
JSONObject jsonObject = JSON_READ.Read("data-config", "blood-view-collect-config.json", JSONObject.class);
String where = jsonObject.getString("where");
return where == null ? "" : where;
} catch (Exception ex) {
return "";
}
}
public static void main(String[] args) {
System.out.println(getBloodViewWhere());
}
private void compensateTask(List<String> patientIds, List<String> collectorIds) {
CompensateTasRequest dto = new CompensateTasRequest();
dto.setPatientIds(patientIds);

@ -17,7 +17,10 @@ public interface SdRyBloodMapper {
*
* @param inpatientNo
* @param admissions
* @param where
* @return
*/
List<SdRyBloodReportDTO> getByInpatientNoAndAdmissions(@Param("inpatientNo") String inpatientNo, @Param("admissions") Integer admissions);
List<SdRyBloodReportDTO> getByInpatientNoAndAdmissions(@Param("inpatientNo") String inpatientNo,
@Param("admissions") Integer admissions,
@Param("where") String where);
}

@ -17,5 +17,6 @@
WHERE
FBIHID = #{inpatientNo}
AND FBINCU = ${admissions}
${where}
</select>
</mapper>

Loading…
Cancel
Save