南骏 池
2025-09-10 eb7aabaca44f5be20ad9fa533f130c96a7342a51
MES.Service/service/BasicData/MesRohInManager.cs
@@ -24,10 +24,13 @@
            return rohInErpRohIn.Type switch
            {
                "2" or "4" or "5" => SaveOrUpdateData(db, mesRohIn,
                    mesRohInDatas)
                    mesRohInDatas, rohInErpRohIn.Type)
                    ? 1
                    : 0,
                "3" => UpdateData(db, mesRohIn, mesRohInDatas) ? 1 : 0,
                "3" => SaveOrUpdateData(db, mesRohIn,
                    mesRohInDatas, rohInErpRohIn.Type)
                    ? 1
                    : 0, //UpdateData(db, mesRohIn, mesRohInDatas) ? 1 : 0,//反审核不删除,做update。
                _ => throw new NotImplementedException(
                    $"type没有{rohInErpRohIn.Type}这个类型")
            };
@@ -56,8 +59,14 @@
    // 插入或更新数据的方法
    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();