| | |
| | | return rohInErpRohIn.Type switch |
| | | { |
| | | "2" or "4" or "5" => SaveOrUpdateData(db, mesRohIn, |
| | | mesRohInDatas) |
| | | mesRohInDatas, rohInErpRohIn.Type) |
| | | ? 1 |
| | | : 0, |
| | | "3" => SaveOrUpdateData(db, mesRohIn, |
| | | mesRohInDatas) |
| | | mesRohInDatas, rohInErpRohIn.Type) |
| | | ? 1 |
| | | : 0, //UpdateData(db, mesRohIn, mesRohInDatas) ? 1 : 0,//反审核不删除,做update。 |
| | | _ => throw new NotImplementedException( |
| | |
| | | |
| | | // 插入或更新数据的方法 |
| | | private bool SaveOrUpdateData(SqlSugarScope db, MesRohIn mesRohIn, |
| | | List<MesRohInData> mesRohInDatas) |
| | | List<MesRohInData> mesRohInDatas, string type) |
| | | { |
| | | |
| | | if (type == "3") |
| | | { |
| | | mesRohIn.BillNo = mesRohIn.BillNo + "F"; |
| | | } |
| | | |
| | | if (mesRohIn.Guid != null) |
| | | db.Deleteable<MesRohIn>().Where(s => s.Guid == mesRohIn.Guid) |
| | | .ExecuteCommand(); |