Ejemplo n.º 1
0
        //入库高级查询
        public List <WMS_Models.CoLinModel.PutStorageModel> Searchs(WMS_Models.CoLinModel.PutStorageModel m)
        {
            string sql = "select put.puid,put.puname,pro.prname,pro.PrNumber,put.PuBatch,spe.spname,put.puNumber,jli.StName,rul.jlname,put.PuSupplierName,put.PuPrepared,sta.SName,put.PuAudit,put.PuAuditTime from PutStorage put join ProductsTB pro on put.Prid = pro.prid join Specification spe on put.spid = spe.spid join Rulibrary rul on  put.jlid = rul.jlid join State sta on put.Sid = sta.Sid join jlibrary jli on put.Stid = jli.Stid where 1=1 ";

            if (!string.IsNullOrEmpty(m.PuName))
            {
                sql += $" and PuName= @PuName ";
            }
            if (!string.IsNullOrEmpty(m.JlName))
            {
                sql += $" and JlName =@JlName ";
            }
            if (!string.IsNullOrEmpty(m.SName))
            {
                sql += $" and SName= @SName ";
            }
            if (!string.IsNullOrEmpty(m.PuAuditNum))
            {
                sql += $" and PuAuditNum=@PuAuditNum ";
            }
            if (!string.IsNullOrEmpty(m.PuSupplierName))
            {
                sql += $" PuSupplierName=@PuSupplierName ";
            }
            // string sql = "select * from PutStorage where PuName= @PuName and Jlid =@Jlid and Sid= @Sid and PuAuditNum=@PuAuditNum and PuSupplierName=PuSupplierName";
            return(dal.Search <WMS_Models.CoLinModel.PutStorageModel, WMS_Models.CoLinModel.PutStorageModel>(sql, m));
        }
Ejemplo n.º 2
0
        //修改状态
        public int UpdateZT(WMS_Models.CoLinModel.PutStorageModel m)
        {
            string sql = "update PutStorage set Sid='" + m.Sid + "' where puid ='" + m.Puid + "'";

            return(dal.Updates(sql));
        }
Ejemplo n.º 3
0
        //修改
        public int Updates(WMS_Models.CoLinModel.PutStorageModel m)
        {
            string sql = "update PutStorage set Jlid='" + m.Jlid + "',PuRelevance ='" + m.PuRelevance + "',PuAuditPhone='" + m.PuAuditPhone + "',PuName = '" + m.PuName + "',PuBatch='" + m.PuBatch + "',PuSupplierName='" + m.PuSupplierName + "', PuPrepared='" + m.PuPrepared + "', PuAudit='" + m.PuAudit + "', PuAuditNum='" + m.PuAuditNum + "', PuAuditPeople='" + m.PuAuditPeople + "',PuAddres='" + m.PuAddres + "',PuPreparedTime='" + m.PuPreparedTime + "' where puid ='" + m.Puid + "'";

            return(dal.Updates(sql));
        }