Merge branch 'master' of https://gitee.com/frane-yang/SGGL_CWCEC
This commit is contained in:
		
						commit
						0773e912df
					
				| 
						 | 
					@ -377,7 +377,8 @@ namespace BLL
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 根据id修改验收日期和是否一次合格
 | 
					        /// 根据id修改验收日期和是否一次合格
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public static void UpdateByInspectionManagementId(Model.ProcessControl_InspectionManagement inspectionManagement) {
 | 
					        public static void UpdateByInspectionManagementId(Model.ProcessControl_InspectionManagement inspectionManagement)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
 | 
					            using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                Model.ProcessControl_InspectionManagement newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(e => e.InspectionId == inspectionManagement.InspectionId);
 | 
					                Model.ProcessControl_InspectionManagement newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(e => e.InspectionId == inspectionManagement.InspectionId);
 | 
				
			||||||
| 
						 | 
					@ -385,6 +386,11 @@ namespace BLL
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    newInspectionManagement.InspectionDate = inspectionManagement.InspectionDate;
 | 
					                    newInspectionManagement.InspectionDate = inspectionManagement.InspectionDate;
 | 
				
			||||||
                    newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified;
 | 
					                    newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified;
 | 
				
			||||||
 | 
					                    if (newInspectionManagement.IsOnceQualified == false)
 | 
				
			||||||
 | 
					                    {
 | 
				
			||||||
 | 
					                        newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                    newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode;
 | 
				
			||||||
                    db.SubmitChanges();
 | 
					                    db.SubmitChanges();
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,8 @@ namespace WebAPI.Controllers.CQMS
 | 
				
			||||||
            try
 | 
					            try
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                InspectionManagementService.UpdateByInspectionManagementId(model);
 | 
					                InspectionManagementService.UpdateByInspectionManagementId(model);
 | 
				
			||||||
 | 
					                //上传附件
 | 
				
			||||||
 | 
					                SaveAttachFile(model.InspectionId + "R", BLL.Const.InspectionNoticeMenuId, model.AttachUrl);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            catch (Exception ex)
 | 
					            catch (Exception ex)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
| 
						 | 
					@ -35,5 +37,16 @@ namespace WebAPI.Controllers.CQMS
 | 
				
			||||||
            return responeData;
 | 
					            return responeData;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        #endregion
 | 
					        #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static void SaveAttachFile(string dataId, string menuId, string url)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            Model.ToDoItem toDoItem = new Model.ToDoItem
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                MenuId = menuId,
 | 
				
			||||||
 | 
					                DataId = dataId,
 | 
				
			||||||
 | 
					                UrlStr = url,
 | 
				
			||||||
 | 
					            };
 | 
				
			||||||
 | 
					            APIUpLoadFileService.SaveAttachUrl(toDoItem);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue