| | |
| | | MergeRegisterInfo(existing, qcDistributionRegister); |
| | | _qcDistributionRegisters.Update(existing); |
| | | qcDistributionRegister.Id = existing.Id; |
| | | LogHelper.Info(string.Format( |
| | | "[WARN] SaveQcDistributionRegister 命中已有行 Id={0}(入参 Id=0),已重定向 UPDATE:QCDist={1}, Lab={2}, Project={3}。请检查上层为何未先查重。", |
| | | LogHelper.Error(string.Format( |
| | | "SaveQcDistributionRegister 命中已有行 Id={0}(入参 Id=0),已重定向 UPDATE:QCDist={1}, Lab={2}, Project={3}。上层必定漏做查重或前端提交了脏 Id,必须排查根因。", |
| | | existing.Id, |
| | | qcDistributionRegister.QCDistributionId, |
| | | qcDistributionRegister.LabId, |
| | |
| | | |
| | | private static void MergeRegisterInfo(QCDistributionRegisterInfo target, QCDistributionRegisterInfo source) |
| | | { |
| | | if (source.LetterNo != null) target.LetterNo = source.LetterNo; |
| | | if (source.ChargeRemark != null) target.ChargeRemark = source.ChargeRemark; |
| | | if (source.SampleNo != null) target.SampleNo = source.SampleNo; |
| | | if (source.EMSNo != null) target.EMSNo = source.EMSNo; |
| | | if (source.PacketContent != null) target.PacketContent = source.PacketContent; |
| | | if (source.Remark != null) target.Remark = source.Remark; |
| | | if (source.ModifyUser != null) target.ModifyUser = source.ModifyUser; |
| | | if (source.AnswerJSON != null) target.AnswerJSON = source.AnswerJSON; |
| | | if (source.SubmitUserNo != null) target.SubmitUserNo = source.SubmitUserNo; |
| | | if (source.Score_Detail != null) target.Score_Detail = source.Score_Detail; |
| | | if (!string.IsNullOrEmpty(source.LetterNo)) target.LetterNo = source.LetterNo; |
| | | if (!string.IsNullOrEmpty(source.ChargeRemark)) target.ChargeRemark = source.ChargeRemark; |
| | | if (!string.IsNullOrEmpty(source.SampleNo)) target.SampleNo = source.SampleNo; |
| | | if (!string.IsNullOrEmpty(source.EMSNo)) target.EMSNo = source.EMSNo; |
| | | if (!string.IsNullOrEmpty(source.PacketContent)) target.PacketContent = source.PacketContent; |
| | | if (!string.IsNullOrEmpty(source.Remark)) target.Remark = source.Remark; |
| | | if (!string.IsNullOrEmpty(source.ModifyUser)) target.ModifyUser = source.ModifyUser; |
| | | if (!string.IsNullOrEmpty(source.AnswerJSON)) target.AnswerJSON = source.AnswerJSON; |
| | | if (!string.IsNullOrEmpty(source.SubmitUserNo)) target.SubmitUserNo = source.SubmitUserNo; |
| | | if (!string.IsNullOrEmpty(source.Score_Detail)) target.Score_Detail = source.Score_Detail; |
| | | if (source.ChargeTime.HasValue) target.ChargeTime = source.ChargeTime; |
| | | if (source.SendEMSTime.HasValue) target.SendEMSTime = source.SendEMSTime; |
| | | if (source.SubmitTime.HasValue) target.SubmitTime = source.SubmitTime; |