|
@@ -581,6 +581,13 @@ func (this *BusinessTrip) Delete() {
|
|
|
this.FailWithMessage("删除失败!", "删除失败!DeleteBusinessApply:"+err.Error())
|
|
|
return
|
|
|
}
|
|
|
+ if businessApplyItem.PeerPeopleId != "" {
|
|
|
+ err = business_trip.DeleteBusinessApplyPeer(businessApplyItem.BusinessApplyId)
|
|
|
+ if err != nil {
|
|
|
+ this.FailWithMessage("删除失败!", "删除失败!DeleteBusinessApplyPeer:"+err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
//删除系统消息
|
|
|
go company_approval_message.DeleteCompanyApprovalMessage(req.BusinessApplyId, 10)
|
|
|
this.OkWithMessage("删除成功")
|
|
@@ -645,6 +652,23 @@ func (this *BusinessTrip) Back() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ if businessApplyItem.PeerPeopleId != "" {
|
|
|
+ peerWhereParams := make(map[string]interface{})
|
|
|
+ peerUpdateParams := make(map[string]interface{})
|
|
|
+
|
|
|
+ whereParams["business_apply_id"] = req.BusinessApplyId
|
|
|
+
|
|
|
+ peerUpdateParams["status"] = "已撤回"
|
|
|
+ peerUpdateParams["modify_time"] = time.Now()
|
|
|
+
|
|
|
+ err = business_trip.UpdateBusinessApplyPeer(peerWhereParams, peerUpdateParams)
|
|
|
+
|
|
|
+ if err != nil {
|
|
|
+ this.FailWithMessage("撤回失败", "撤回失败!UpdateBusinessApplyPeer:"+err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//删除系统消息
|
|
|
go company_approval_message.DeleteCompanyApprovalMessage(req.BusinessApplyId, 10)
|
|
|
|