|
@@ -25,10 +25,7 @@ import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
|
|
|
@Service
|
|
|
public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
@@ -83,7 +80,9 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
|
private MzyZdChargeTypeService mzyZdChargeTypeService;
|
|
|
@Autowired
|
|
|
private OrderStatusChangeService orderStatusChangeService;
|
|
|
-
|
|
|
+ //驾驶员id集合
|
|
|
+ private List<String> patientIds = Arrays.asList(new String [] {"422429-4","400758-4","399163-4","400429-4","377323-4","309261-4","134402-4","209695-4"});
|
|
|
+ private String jsyChargeType= "27";
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,timeout=36000,rollbackFor=Exception.class)
|
|
|
public int saveMzyReqrec(MzyReqrecPageDto mzyReqrecPageDto) throws MzException {
|
|
@@ -116,6 +115,8 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
|
MzVisitTable newMzVisitTable = getMzVisitTable(mzyReqrecPageDto, mzyReqrec, mzPatientMi, windows, times, serialNo, now);
|
|
|
mzVisitTableMapper.insertMzVisitTable(newMzVisitTable);
|
|
|
fomartReqrec(mzyReqrec, mzPatientMi, windows, mzyZdChargeType, times, serialNo, now, mzyRequest);
|
|
|
+ //不需要做重复挂号的校验id集合 ,只有入库的时候需要该参数
|
|
|
+ mzyReqrec.setCanRepeatedly(( jsyChargeType.equals(mzyReqrec.getChargeType()) && patientIds.contains(mzyReqrec.getPatientId()) )?YesNoEnum.YES.code:YesNoEnum.NO.code);
|
|
|
int num=mzyReqrecMapper.insertMzyReqrec(mzyReqrec);
|
|
|
if(num<=0){
|
|
|
throw new MzException("当前病人已经挂号成功,请不要重复挂号!");
|
|
@@ -309,6 +310,7 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
|
if(!Constants.BYJZ.equals(dbMzyReqrec.getPaymode())){
|
|
|
dbMzyReqrec.setPaymode(Constants.CASH);
|
|
|
}
|
|
|
+
|
|
|
mzyReqrecMapper.insertMzyReqrec(dbMzyReqrec);
|
|
|
reqrecRequestRelationMapper.selectReqrecRequestRelation(dbMzyReqrec.getSerialNo());
|
|
|
}
|