|
@ -1764,21 +1764,25 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
|
|
|
|
|
|
|
|
|
public JSONObject selectOrderTime(String relationCode){
|
|
|
WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("PAY_TIME").orElse(null);
|
|
|
WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("PAY_TIME").get();
|
|
|
BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
|
|
|
Date createDate = businessOrderDO.getCreateTime();
|
|
|
Date createDate;
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTime(createDate);
|
|
|
if (businessOrderDO.getOrderCategory().equalsIgnoreCase("4")){
|
|
|
calendar.add(Calendar.MINUTE,Integer.parseInt(wlyyHospitalSysDictDO.getPyCode()));
|
|
|
}else {
|
|
|
if (businessOrderDO!=null){
|
|
|
createDate = businessOrderDO.getCreateTime();
|
|
|
calendar.add(Calendar.MINUTE,Integer.parseInt(wlyyHospitalSysDictDO.getDictCode()));
|
|
|
calendar.setTime(createDate);
|
|
|
}else {
|
|
|
calendar.add(Calendar.MINUTE,Integer.parseInt(wlyyHospitalSysDictDO.getPyCode()));
|
|
|
WlyyPrescriptionDO prescriptionDO = prescriptionDao.findById(relationCode).get();
|
|
|
calendar.setTime(prescriptionDO.getCreateTime());
|
|
|
createDate =prescriptionDO.getCreateTime();
|
|
|
}
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
String time = sdf.format(calendar.getTime());
|
|
|
JSONObject object = new JSONObject();
|
|
|
object.put("endTime",time);
|
|
|
object.put("createTime",businessOrderDO.getCreateTime());
|
|
|
object.put("createTime",createDate);
|
|
|
return object;
|
|
|
}
|
|
|
|