提交 e9910fea authored 作者: zhu's avatar zhu

1.订单相关接口丰富

2.修改部分数据库字段
上级 83379a5e
...@@ -53,6 +53,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements ...@@ -53,6 +53,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
private PrescriptionOrderRecordService prescriptionOrderRecordService; private PrescriptionOrderRecordService prescriptionOrderRecordService;
@Resource @Resource
private OrderOperationService orderOperationService; private OrderOperationService orderOperationService;
@Resource
private OrderPictureService orderPictureService;
@Override @Override
public int updateAllFieldsById(Order entity) { public int updateAllFieldsById(Order entity) {
...@@ -154,13 +156,35 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements ...@@ -154,13 +156,35 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
order.setPatientName(patientInfo.getPatientName()); order.setPatientName(patientInfo.getPatientName());
order.setPatientSex(patientInfo.getSex()); order.setPatientSex(patientInfo.getSex());
order.setPatientIdNo(patientInfo.getIdNo()); order.setPatientIdNo(patientInfo.getIdNo());
order.setPatientPhoneNumber(patientInfo.getPhoneNumber()); //如果存在监护人,则手机号码填写监护人的手机号码
if(patientInfo.getGuardianState() == YesNoEnum.YES){
order.setPatientPhoneNumber(patientInfo.getGuardianPhoneNumber());
}else {
order.setPatientPhoneNumber(patientInfo.getPhoneNumber());
}
order.setPatientBornDate(patientInfo.getBornDate()); order.setPatientBornDate(patientInfo.getBornDate());
order.setPatientSelfIntroduce(createOrderDto.getPatientSelfIntroduce()); order.setPatientSelfIntroduce(createOrderDto.getPatientSelfIntroduce());
order.setEditorId(sysUser.getId()); order.setEditorId(sysUser.getId());
order.setEditorName(sysUser.getUsername()); order.setEditorName(sysUser.getUsername());
this.save(order); this.save(order);
//写入患者自述相关图片
if(null != createOrderDto.getPictureList()
&& createOrderDto.getPictureList().size()>0){
ArrayList<OrderPicture> orderPictures = new ArrayList<>();
for (String picUrl:createOrderDto.getPictureList()) {
OrderPicture orderPicture = new OrderPicture();
orderPicture.setOrderId(order.getId());
orderPicture.setOrderNo(order.getOrderNo());
orderPicture.setPatientSelfImage(picUrl);
orderPicture.setEditorId(sysUser.getId());
orderPicture.setEditorName(sysUser.getUsername());
orderPictures.add(orderPicture);
}
orderPictureService.saveBatch(orderPictures);
}
//写入订单操作记录 //写入订单操作记录
OrderOperation orderOperation = new OrderOperation(); OrderOperation orderOperation = new OrderOperation();
orderOperation.setOrderId(order.getId()); orderOperation.setOrderId(order.getId());
...@@ -288,6 +312,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements ...@@ -288,6 +312,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
order.setConfirmTime(new Date()); order.setConfirmTime(new Date());
this.save(order); this.save(order);
} }
//todo 根据订单类型,写入相关记录表
//电话订单
if(order.getOrderType() == OrderTypeEnum.TELEPHONE){
}
return order; return order;
} }
...@@ -311,6 +340,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements ...@@ -311,6 +340,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
@Override @Override
public Order callPhone(String orderNo) { public Order callPhone(String orderNo) {
//todo sdk接入 //todo sdk接入
return null; return null;
} }
......
...@@ -433,7 +433,7 @@ create table `pms_prescription_order_record` ...@@ -433,7 +433,7 @@ create table `pms_prescription_order_record`
order_id int(11) not null comment '订单id', order_id int(11) not null comment '订单id',
order_no varchar(255) not null comment '订单号', order_no varchar(255) not null comment '订单号',
prescription_introduce varchar(255) not null comment '处方说明', prescription_introduce varchar(255) not null comment '处方说明',
r varchar(255) not null comment '处方图片', prescription_image varchar(255) not null comment '处方图片',
editor_id int(11) not null default 1 comment '操作人Id', editor_id int(11) not null default 1 comment '操作人Id',
editor_name varchar(255) not null default 'admin' comment '操作人', editor_name varchar(255) not null default 'admin' comment '操作人',
create_time datetime not null default CURRENT_TIMESTAMP comment '创建时间', create_time datetime not null default CURRENT_TIMESTAMP comment '创建时间',
...@@ -447,7 +447,12 @@ create table `pms_phone_order_record` ...@@ -447,7 +447,12 @@ create table `pms_phone_order_record`
id int(11) auto_increment not null comment 'Id', id int(11) auto_increment not null comment 'Id',
order_id int(11) not null comment '订单id', order_id int(11) not null comment '订单id',
order_no varchar(255) not null comment '订单号', order_no varchar(255) not null comment '订单号',
phone_contact_time varchar(255) not null comment '电话咨询开始时间', patient_phone_no varchar(32) null comment '患者被叫号码',
proxy_phone_no varchar(64) null comment '匿名小号号码',
mapping_id varchar(255) null comment '唯一绑定id',
mapping_state varchar(50) not null default 'NO' comment '是否解绑状态 [YES.是 NO.否]',
phone_contact_time varchar(255) null comment '电话咨询开始时间',
phone_release_time varchar(255) null comment '电话咨询结束时间',
editor_id int(11) not null default 1 comment '操作人Id', editor_id int(11) not null default 1 comment '操作人Id',
editor_name varchar(255) not null default 'admin' comment '操作人', editor_name varchar(255) not null default 'admin' comment '操作人',
create_time datetime not null default CURRENT_TIMESTAMP comment '创建时间', create_time datetime not null default CURRENT_TIMESTAMP comment '创建时间',
...@@ -615,89 +620,89 @@ create table `sys_role_authority` ...@@ -615,89 +620,89 @@ create table `sys_role_authority`
create unique index ix_id_no on `pms_doctor_info` (id_no); create unique index ix_doctor_info_id_no on `pms_doctor_info` (id_no);
create unique index ix_phone_number on `pms_doctor_info` (phone_number); create unique index ix_doctor_info_phone_number on `pms_doctor_info` (phone_number);
create index ix_phone_number on `pms_doctor_family_address_info` (phone_number); create index ix_doctor_family_address_info_phone_number on `pms_doctor_family_address_info` (phone_number);
create unique index ix_id_no on `pms_user_info` (id_no); create unique index ix_user_info_id_no on `pms_user_info` (id_no);
create unique index ix_phone_number on `pms_user_info` (phone_number); create unique index ix_user_info_phone_number on `pms_user_info` (phone_number);
create index ix_patient_id_no on `pms_medical_report` (patient_id_no); create index ix_medical_report_patient_id_no on `pms_medical_report` (patient_id_no);
create index ix_coupon_type on `pms_coupon_info` (coupon_type); create index ix_coupon_info_coupon_type on `pms_coupon_info` (coupon_type);
create index ix_coupon_id on `pms_user_coupon_info` (coupon_id); create index ix_user_coupon_info_coupon_id on `pms_user_coupon_info` (coupon_id);
create index ix_coupon_type on `pms_user_coupon_info` (coupon_type); create index ix_user_coupon_info_coupon_type on `pms_user_coupon_info` (coupon_type);
create index ix_user_info_id on `pms_user_attention_info` (user_info_id); create index ix_user_attention_info_user_info_id on `pms_user_attention_info` (user_info_id);
create index ix_doctor_id on `pms_user_attention_info` (doctor_id); create index ix_user_attention_info_doctor_id on `pms_user_attention_info` (doctor_id);
create index ix_patient_id on `pms_patient_prescription_info` (patient_id); create index ix_patient_prescription_info_patient_id on `pms_patient_prescription_info` (patient_id);
create index ix_user_info_id on `pms_family_doctor` (user_info_id); create index ix_family_doctor_user_info_id on `pms_family_doctor` (user_info_id);
create unique index ix_order_no on `pms_order` (order_no); create unique index ix_order_order_no on `pms_order` (order_no);
create index ix_order_state on `pms_order` (order_state); create index ix_order_order_state on `pms_order` (order_state);
create index ix_order_type on `pms_order` (order_type); create index ix_order_order_type on `pms_order` (order_type);
create index ix_order_no on `pms_order_picture` (order_no); create index ix_order_picture_order_no on `pms_order_picture` (order_no);
create index ix_order_no on `pms_order_operation` (order_no); create index ix_order_operation_order_no on `pms_order_operation` (order_no);
create index ix_order_no on `pms_order_appraise` (order_no); create index ix_order_appraise_order_no on `pms_order_appraise` (order_no);
create index ix_order_no on `pms_online_inquiry_order_record` (order_no); create index ix_online_inquiry_order_record_order_no on `pms_online_inquiry_order_record` (order_no);
create index ix_order_no on `pms_prescription_order_record` (order_no); create index ix_prescription_order_record_order_no on `pms_prescription_order_record` (order_no);
create index ix_order_no on `pms_phone_order_record` (order_no); create index ix_phone_order_record_order_no on `pms_phone_order_record` (order_no);
create unique index ix_order_no on `pms_order_pay` (order_no); create unique index ix_order_pay_order_no on `pms_order_pay` (order_no);
create unique index ix_pay_no on `pms_order_pay` (pay_no); create unique index ix_order_pay_pay_no on `pms_order_pay` (pay_no);
create unique index ix_order_no on `pms_order_refund` (order_no); create unique index ix_order_refund_order_no on `pms_order_refund` (order_no);
create unique index ix_refund_no on `pms_order_refund` (refund_no); create unique index ix_order_refund_refund_no on `pms_order_refund` (refund_no);
create index ix_msg_type on `sys_message` (msg_type); create index ix_message_msg_type on `sys_message` (msg_type);
create index ix_editor_id_create_time on `sys_message` (editor_id,create_time); create index ix_message_editor_id_create_time on `sys_message` (editor_id,create_time);
create unique index ix_code on `sys_setting` (code); create unique index ix_setting_code on `sys_setting` (code);
create index ix_create_time on `sys_operation_log` (create_time); create index ix_operation_log_create_time on `sys_operation_log` (create_time);
create unique index ix_name on `sys_role` (name); create unique index ix_role_name on `sys_role` (name);
create unique index ix_username on `sys_user` (username); create unique index ix_user_username on `sys_user` (username);
create unique index ix_phone on `sys_user` (phone); create unique index ix_user_phone on `sys_user` (phone);
create unique index ix_name on `sys_authority` (name); create unique index ix_authority_name on `sys_authority` (name);
create index ix_authority_id on `sys_authority` (authority_id); create index ix_authority_authority_id on `sys_authority` (authority_id);
create index ix_role_id on `sys_role_authority` (role_id); create index ix_role_authority_role_id on `sys_role_authority` (role_id);
create index ix_authority_id on `sys_role_authority` (authority_id); create index ix_role_authority_authority_id on `sys_role_authority` (authority_id);
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论